Pirkimo peržiūra

Užklausa

GET https://restoranas.kitchenforce.lt/api/accountingpurchases/{purchaseId}

Sėkmingas atsakymas

{
    "id": 812,
    "number": "INV001",
    "date": "2024-06-06",
    "company": {
        "id": 9,
        "name": "Tiekėjas",
        "code": "1111111",
        "vatNumber": "LT000000",
        "address": "",
        "postalCode": "",
        "country": "",
        "phone": "",
        "email": ""
    },
    "agreement": {
        "id": 9,
        "number": "TIEK001"
    },
    "totalWithoutVat": 9.3,
    "totalVat": 1.95,
    "totalWithVat": 11.25,
    "items": [
        {
            "product": {
                "id": 76,
                "name": "Apelsinai",
                "unit": "kg",
                "supplierProductId": 107,
                "supplierProductName": "Apelsinai",
                "quantityPerPackage": 1
            },
            "itemPriceWithoutVat": 0.85,
            "itemVat": 0.1785,
            "itemPriceWithVat": 1.0285,
            "totalWithoutVat": 1.7,
            "totalVat": 0.357,
            "totalWithVat": 2.057,
            "vatSize": 21,
            "quantity": 2
        },
        {
            "product": {
                "id": 5,
                "name": "Pievagrybiai",
                "unit": "kg",
                "supplierProductId": 19,
                "supplierProductName": "Pievagrybiai",
                "quantityPerPackage": 1
            },
            "itemPriceWithoutVat": 1.52,
            "itemVat": 0.3192,
            "itemPriceWithVat": 1.8392,
            "totalWithoutVat": 7.6,
            "totalVat": 1.596,
            "totalWithVat": 9.196,
            "vatSize": 21,
            "quantity": 5
        }
    ]
}

Parametrų sąrašas

Parametras Tipas Aprašymas
id integer Pirkimo ID
number string Pirkimo sąskaitos numeris
date string Pirkimo sąskaitos data
company array Pardavėjas
- id integer Pardavėjo ID
- name string Pardavėjo pavadinimas
- code string Pardavėjo kodas
- vatNumber string Pardavėjo PVM mokėtojo kodas
- address string Pardavėjo adresas
- postalCode string Pardavėjo pašto kodas
- country string Pardavėjo šalis
- phone string Pardavėjo telefonas
- email string Pardavėjo el. paštas
agreement array Sutartis
- id integer Sutarties ID
- number string Sutarties numeris
totalWithoutVat double Pirkimo suma be PVM
totalVat double Pirkimo PVM suma
totalWithVat double Pirkimo suma su PVM
items array Pirkimo prekės
- product array Produktas
- - id integer Produkto ID
- - name string Produkto pavadinimas
- - unit string Produkto mato vienetas
- - supplierProductId integer Tiekėjo produkto ID
- - supplierProductName string Tiekėjo produkto pavadinimas
- - quantityPerPackage double Tiekėjo produkto pakuotės dydis
- itemPriceWithoutVat double Vieneto kaina be PVM
- itemVat double Vieneto PVM suma
- itemPriceWithVat double Vieneto kaina su PVM
- totalWithoutVat double Suma be PVM
- totalVat double PVM suma
- totalWithVat double Suma su PVM
- vatSize double PVM dydis %
- quantity double Kiekis

Klaidos atsakymas

{
    "errorCode": 5,
    "errorDescription": "Pirkimas nerastas"
}

Klaidos kodai

Žemiau pateikiami tik su pirkimo peržiūra susiję klaidų kodai. Klaidų kodai susiję su API raktu ir jo leidimais aprašyti skyriuje naudojimas.

Kodas Aprašymas
5 Pirkimas nerastas