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.saveSale service.{
"barcodeInfo": "10012220071500002",
"branchCode": "1001",
"currency": "EUR",
"currencySymbol": "€",
"deviceId": "945d8af21d80556a",
"discountsManualCumulative": "Y",
"docNumber": 2,
"endDate": "2020-07-15 09:39:30",
"entityCode": "210",
"filling": "LAST",
"movementType": "R",
"pointsCode": "CUSTOMER_NOT_FOUND",
"pointsMessage": "Customer NOT found",
"printerSerial": "XXXXX-XXXXX-XXXXX",
"registerCode": 22,
"seller": "Marco Bianchi",
"sellerId": 1001,
"startDate": "2020-07-15 09:39:26",
"startDateRef": "2020-07-15 09:33:35",
"ticket": 2,
"ticketRT": "XXXX",
"ticketRTRef": "XXXXXX",
"transactionId": "257ba40c-59e2-43d2-a6f4-47c2b98662fc",
"zReportNumber": "#####",
"zReportNumberRef": "####",
"goodsVoucher":
[
{
"barcode": "8015948279786",
"amount": 19.9,
"description": "Buono merce",
"itemType": "FINANCIAL",
"itemSubType": "GOOD_PURCHASE",
"itemCode": "GOOD210_001",
"validityDays": 30,
"taxRate": 22,
"vatCode": 20,
"endDate": "2020-08-14 11:39:30",
"zReportNumber": "0474",
"ticketRT": "XXXXXX",
"printerSerial": "XXXXXXXX",
"docNumber": 3
}
],
"items":
[
{
"barcode": "010005600108",
"barcodeType": "BARCODE_ARTICOLO",
"currency": "EUR",
"currencySymbol": "€",
"description": "POLO IN COTONE PIQUET",
"dimension1": "8",
"dimension2": "BIANCO",
"dimensionDescription1": "S",
"dimensionDescription2": "BIANCO",
"dimensionType1": "TAGLIA",
"dimensionType1Desc": "Taglia",
"dimensionType2": "COLORE",
"dimensionType2Desc": "Colore",
"dimensionType3": "DROP",
"dimensionType3Desc": "Drop",
"dimensionType4": "STATURA",
"dimensionType4Desc": "Statura",
"itemCode": "BO00P794101",
"itemType": "PRODUCT",
"movementType": "R",
"note": "CAUSALE: Non piace , NOTE: Non piace perchè:",
"oldTaxRate": 22,
"oldUnitPrice": 19.9,
"priceList": "1001",
"printerDepartmentCode": 2,
"qty": 1,
"qtyType": "N",
"returnNote": "Non piace perchè:",
"returnReason": "Non piace",
"rounding": 2,
"rowId": "2fe567cf-b59a-42bb-9713-053b4539a0c1",
"rowIdRef": "dc3eee75-097b-4424-bd60-bba859ed05c4",
"rowOrder": 1,
"rowTaxableIncome": 16.31,
"rowTotal": 19.9,
"rowType": "ITEM",
"rowVat": 3.59,
"seller": "Marco Bianchi",
"sellerId": 1001,
"shopDescription": "POLO IN COTONE",
"taxRate": 22,
"unitPrice": 19.9,
"vatCode": 20
}
],
"payments":
[
{
"paymentCash": 19.9,
"paymentAmount": 19.9,
"paymentType": "B",
"paymentCode": 52
}
],
"totals":
{
"total": 16.31,
"allowance": 0,
"alreadyPayed": 0,
"taxableIncome": 16.31,
"vat": 3.59,
"grandTotal": 19.9
},"callback": "https://europe-west1-sinesy4wsplatform.cloudfunctions.net/fake-callback"
}rowIdRef in Return DocumentsrowIdRef field plays a crucial role in this process by linking each line item in the return document to the corresponding line item in the original sales document.rowIdRef Field**rowIdRef** field is used to uniquely identify and reference the specific line item from the original sales document that is being returned. This ensures that the system can accurately track which products are being returned and apply the appropriate processing, such as inventory adjustments, refunds, or exchanges.**rowIdRef** must be populated with the UUID of the line item in the original sales document. This UUID serves as a unique identifier, allowing the system to directly link the return to the exact line item in the original transaction.rowIdRef field of the corresponding line item in the return document.rowIdRef:rowIdRef field populated with the UUID of the original sales line item.123e4567-e89b-12d3-a456-426614174000.rowIdRef field set as follows:rowIdRef corresponds to an existing UUID in the original sales document.rowIdRef UsagerowIdRef reduces the potential for manual errors and accelerates the return handling process.goodsVoucher section of the return receipt, it is possible to request the creation of a goods voucher. This voucher can be issued to the customer as a refund for the value of the returned merchandise. The goods voucher serves as a store credit, allowing the customer to use it for future purchases within the ecommerce platform or at physical store locations. This approach provides a flexible and customer-friendly alternative to direct monetary refunds, encouraging repeat business and enhancing customer satisfaction. The specific details and value of the goods voucher can be specified in the goodsVoucher section when generating the return receipt document sent to 4ws.trade.{
"success": true,
"id": "7571b744-8e2d-4dde-99d8-b60c0dff1aca"
}{
"success": false,
"id": "64ee5dda-d2b5-4fbc-ae6d-fbd2ff13352b",
"message": "Invalid barcode value: 87654321 at row: 1"
}02931b8a-a6c8-4e47-b3f1-041ffb1e432q and links it uniquely to the collected order.