This API allows users to create a free goods entry document for a specific site. The document can include various details such as supplier information, item codes, quantities, pricing, and additional notes. Once submitted, the API processes the request asynchronously and returns a unique identifier for the created document, allowing users to track the status of their entries.
Document prices
The external system must ensure that prices in the documents are valued according to the following rules:
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.
If the fields 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.
API Client sends a POST request containing document details and the callback URL.
Document date
All Date information within the API is expressed in the GMT time zone. API users are therefore responsible for converting dates to their desired time zone if needed. Please refer to Date Handling
2.
4ws.trade acknowledges receipt with an immediate response containing:
success: Indicates receipt of the request.
id: A unique UUID identifier for tracking the document.
3.
The platform processes the request asynchronously and sends the final document details to the callback URL.
4.
The Callback Endpoint receives information, including:
id: The document unique UUID identifier.
barcode: The document's barcode.
documentNumber: The unique document number.
documentStatus: The final status of the document
OPEN: the document can be updated or modified with new products, discounts, quantities etc... .
CLOSE: the document is ready for fulfillment and the products, quantities, discounts are final.
Document & row id must be a valid UUID
If the id field is not provided or does not contain a valid UUID, the value will be automatically generated by the suite and will overwrite the value received in the request payload.The processed document, including the generated id, will then be returned in the service response.
In this scenario, the suite retrieves the barcode associated with the specified SKU. If multiple barcodes are linked to the same SKU, one will be selected at random.
Invalid Input Data: If the input data fails validation (e.g., incorrect barcode), the API returns success: false with an appropriate error message.
Authentication Failure: If the credentials provided are invalid, the API will not process the request and will return an error indicating authentication failure.
Maximum Number Of Rows: If 1000 or more rows are passed the following error will be returned: Exceeded row limit for document.