PurchaseOrders API (Add whsId as PreAdviceValue) - Documentation
This document provides detailed instructions on where and how to include the whsId
parameter in the Purchase Orders API request using the purchaseOrderRowPreAdviceValue
JSON (Extend Commerce API).
This will allow incoming goods to be labeled with pre-printed labels, enabling the customer to use these instead of our standard labels. The purpose is to ensure smooth handling and traceability by integrating the customer’s labels into our processes for warehouse movement and confirmation similar like SmartworkCode (Pallet id).
Instructions
Add Pallet id (whsId) to PurchaseOrders API:
Now it is possible to PreAdvice the Pallet id (whsId) like all other values that could be PreAdviced for a purchase order in purchaseOrderRowPreAdviceValue array of PurchaseOrders API by using POST request.
The “whsId” field must be used to add/set the PreAdvice Pallet id/Smartworkcode via PurchaseOrders API.
The preAdviceQuantity must also be set in the purchaseOrderRowPreAdviceValue for warehouse products in the PurchaseOrders API.
Important Note:
The whsId
field is optional and should be a string.
If
whsId
is not specified, the process will work as before.
Change in PurchaseOrders API Model:
Following is the sample JSON for the PurchaseOrders API to PreAdvice (add) the whsId (Pallet id).
POST Request:
{
"header": {
"purchaseNumber": "ExtendTest001",
"externalOrderNumber": "",
"warehouse": "gm1",
"supplier": {
"supplierNumber": "505",
"supplierAgreementNumber": 50501
}
},
"rows": [
{
"productNumber": "00001_zain_warehouse",
"purchaseDataPurchaseUnit": {
"quantity": 10,
"unit": "ST"
},
"purchaseDataProductUnit": {
"quantity": 10,
"unit": "ST",
"unitPrice": 2,
"vatPercent": 25,
"currency": "SEK"
},
"expectedDeliveryDate": "2025-01-31T00:00:00+01:00",
"purchaseOrderRowPreAdviceValue": [
{
"serialNumber": null,
"batchNumber": null,
"bestBeforeDate": null,
"iMEINumber": null,
"macAddress": null,
"antiTheftID": null,
"uUID": null,
"mSPKID": null,
"wLANMAC": null,
"packageInfo": null,
"palletInfo": null,
"iMEI2": null,
"computerName": null,
"assetNumber": null,
"preAdviceQuantity": 10,
"whsId": "ExtendTest001"
}
]
}
]
}
API Response Body:
{
"header": {
"purchaseNumber": "ExtendTest001",
"externalOrderNumber": "",
"supplierOrderNumber": null,
"status": "Ordered",
"createDate": "2025-01-09T10:29:32.07+01:00",
"warehouse": "GM1",
"deliveryAddress": {
"name1": "Grillmaster1",
"name2": "Centrallager GM1 Grillmaster",
"address1": "Västra Storgatan 7",
"address2": null,
"address3": null,
"postalCode": "55315",
"city": "Jönköping",
"state": null,
"countryCode": "SE",
"doorCode": null
},
"supplier": {
"supplierNumber": "505",
"supplierName": "Zain Hzkazmi Supplier2",
"supplierAgreementNumber": 50501,
"supplierAgreement": "hzkazmi beverages Agr",
"supplierAgreementAddress": {
"name1": "Zain Hzkazmi Supplier2",
"name2": null,
"address1": "Zain address supplier agreement storgatan",
"address2": null,
"address3": null,
"postalCode": "10316",
"city": "StockholmZain",
"state": null,
"countryCode": "SE",
"doorCode": null
},
"supplierContact": {
"name": "Zain kazmi",
"phone": "",
"email": "zain.kazmi@webtechpk.com"
},
"paymentTerms": "0",
"deliveryMethod": "CONS_336",
"deliveryMethodName": "SO & PUR",
"transportCondition": "DAP",
"forwarder": "Bring",
"forwarderCustomerNumber": "5050001",
"transportConditionDescription": "zain kazmi trasnport for hzkazmi supplier agr"
},
"buyerContact": {
"name": "Zain hzkazmi",
"phone": "",
"email": "hzkazmi@gmail.com"
},
"reference": null,
"notes": null,
"internalNotes": null,
"currencyExchangeRate": null,
"shippedDate": null,
"requestedDeliveryDate": null,
"autoReception": false
},
"rows": [
{
"position": 10,
"subPosition": 0,
"externalPosition": null,
"externalSubPosition": null,
"rowStatus": "Ordered",
"statusChangeDate": "2025-01-09T10:29:32.25+01:00",
"productNumber": "00001_zain_warehouse",
"productName": "00001_zain_warehouse",
"supplierProductNumber": null,
"purchaseDataPurchaseUnit": {
"quantity": 10,
"unit": "ST",
"gtiNumber": "00001_zain_warehouse"
},
"purchaseDataProductUnit": {
"quantity": 10,
"unit": "ST",
"unitPrice": 2,
"vatPercent": 25,
"currency": "SEK",
"unitExplicitCost": null,
"listPrice": null,
"unitExplicitCurrency": null
},
"expectedDeliveryDate": "2025-01-31T00:00:00+01:00",
"originalExpectedDeliveryDate": "2025-01-31T00:00:00+01:00",
"shipDate": null,
"requestedDeliveryDate": null,
"notes": null,
"purchaseCode": null,
"purchaseCodeName": null,
"loadingPurchaseCode": null,
"loadingPurchaseCodeName": null,
"unitDetails": [],
"purchaseOrderRowPreAdviceValue": [
{
"serialNumber": null,
"batchNumber": null,
"bestBeforeDate": null,
"iMEINumber": null,
"macAddress": null,
"antiTheftID": null,
"uUID": null,
"mSPKID": null,
"wLANMAC": null,
"packageInfo": null,
"palletInfo": null,
"iMEI2": null,
"computerName": null,
"assetNumber": null,
"preAdviceQuantity": 10,
"whsId": "ExtendTest001"
}
],
"autoReceptionStoragePlace": null
}
],
"shipments": []
}
WMS:
Summary
Use the purchaseOrderRowPreAdviceValue array to include whsId (Pallet ID) in your Purchase Orders API request.
Ensure preAdviceQuantity is set for all required items.
If whsId is not provided, the system will continue with the default process.
For further assistance, refer to the Extend Commerce API documentation or contact support.