priceSale: the product's selling price is a gross VAT amount;priceInvoice: the product's invoice price (purchase invoice) is a net VAT amount;pricePurchase: the product's purchase price (typically purchase order) is a net VAT amount.priceSale is mandotary instead priceInvoice, and pricePurchase are not provided, the system will attempt to retrieve prices based on the branchCode and the sale, invoice, and purchase price lists. If no matching price is found, the API will return an error, and the document will not be created.documentStatus is set to OPEN, the purchase order is created in an open state.documentStatus is set to CONFIRMED, the purchase order is created in a confirmed state, and the purchase movements are tracked, but the final stock is not updated.{
"documentHeader": {
"id": "02931b8a-a6c8-4e47-b3f1-041ffb1e412t",
"branchCode": 2,
"buyerCode": 2,
"currency": "EUR",
"currencySymbol": "€",
"discountType": "P",
"discount1": 10,
"documentDate": "2022-05-30 00:00:00",
"movementDate": "2022-05-30 00:00:00",
"confirmationDateOrder": "2022-05-30 00:00:00",
"deliveryDate": "2022-06-02 00:00:00",
"supplierCode": "1",
"documentType": "PURCHASE",
"cause": "PLANNED",
"system": "ECOMMERCE",
"paymentCode": "4",
"seasonCode": "22AI"
},
"documentRows": [
{
"barcode": "8000200017671",
"itemCode": "032B622-2--19059",
"dimension1": "4",
"dimension2": "01",
"dimension3": "4",
"dimension4": "K",
"quantity1": 2,
"taxRate": 22,
"priceSale": 320,
"pricePurchase": 150,
"priceInvoice": 135,
"discount1": 10,
"discount2": 20
}
],
"callback": "https://europe-west1-sinesy4wsplatform.cloudfunctions.net/fake-callback"
}{
"documentHeader": {
"id": "02931b8a-a6c8-4e47-b3f1-041ffb1e412t",
"branchCode": 2,
"buyerCode": 2,
"currency": "EUR",
"currencySymbol": "€",
"discountType": "P",
"discount1": 10,
"documentDate": "2022-05-30 00:00:00",
"movementDate": "2022-05-30 00:00:00",
"confirmationDateOrder": "2022-05-30 00:00:00",
"deliveryDate": "2022-06-02 00:00:00",
"supplierCode": "1",
"documentType": "PURCHASE",
"cause": "PLANNED",
"system": "ECOMMERCE",
"paymentCode": "4",
"seasonCode": "22AI",
"reserved": [
{"type": "SHOP", "code": "2"},
{"type": "WRH", "code": "1001"}
]
},
"documentRows": [
{
"barcode": "8000200017671",
"itemCode": "032B622-2--19059",
"dimension1": "4",
"dimension2": "01",
"dimension3": "4",
"dimension4": "K",
"quantity1": 2,
"quantity2": 10,
"taxRate": 22,
"priceSale": 320,
"pricePurchase": 150,
"priceInvoice": 135,
"discount1": 10,
"discount2": 20
}
],
"callback": "https://europe-west1-sinesy4wsplatform.cloudfunctions.net/fake-callback"
}2 (first in reserved) has 2 units reserved, as specified by quantity1.1001 (second in reserved) has 10 units reserved, as specified by quantity2.reserved array and quantity fields (ranging from quantity1 to quantity10) allow precise management of reserved quantities per SKU for multiple branch locations. This is useful when an order needs to reserve goods for different branches, with each branch receiving a specific quantity of the item.reserved array in the documentHeader specifies the locations (branches or warehouses) where the goods are reserved. Each entry in the array represents a specific location with two key properties:type: Type of location (e.g., "SHOP" for a retail branch, "WRH" for a warehouse).code: The unique code identifying the branch or warehouse.reserved array. The sequence of reserved entries determines which quantity applies to each location:quantity1 corresponds to the first entry in reserved,quantity2 corresponds to the second entry in reserved,quantity10.quantity3 to quantity10, ensuring each location in reserved has an associated quantity. This structure allows you to reserve different quantities for each branch location or warehouse, optimizing inventory allocation directly within the purchase order.{
"success": true,
"id": "02931b8a-a6c8-4e47-b3f1-041ffb1e412t"
}{
"success": false,
"message": "Error message"
}success: Indicates whether the processing was successful.id: References the transfer document.message: Describes the error if the processing failed.02931b8a-a6c8-4e47-b3f1-041ffb1e432q and links it uniquely to the collected order.