Update existing Distribution Orders
Body
Required
id is required when updating a orders, status is a derived field thus ignored
-
Date that the order was cancelled
-
Date that the order was received and completed:
-
Quantity that has been relocated
-
Date that the order will be delivered
-
Delivery Window of DO (if any)
-
External Comment
-
The external distribution order id used as a header
-
The external row id
-
The external id of the warehouse where quantity is moved from
-
Key, used as a reference to source system
-
Label of the DO (if any)
-
Date that the purchase order was created
-
Order type of DO (if any)
-
Quantity to be relocated
-
Season that the key belong to. Only used for product versioning.
-
Date that the order was shipped
-
SKU of variant. Should be unique per size/variant
-
Default values that are set based on other fields: CANCELLED if CancelledAt is set, COMPLETED if DeliveredQuantity >= Quantity else PROCESSING. Additional possible statuses: ALLOCATED, IN TRANSIT. (handled manually)
Values are
CANCELLED,PROCESSING,ALLOCATED,IN TRANSIT, orCOMPLETED. -
The external id of the warehouse where quantity is moved to
curl \
--request PUT 'https://api.maddenanalytics.com/v2/api/distributionorders' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '[
{
"cancelledDate": "2021-07-19T14:05:257Z",
"completedDate": "2021-07-19T14:05:257Z",
"deliveredQuantity": 2,
"deliveryDate": "2021-07-19T14:05:22.257Z",
"deliveryWindow": "SS24",
"externalComment": "Express delivery needed",
"externalDistributionOrderId": "DO-14534",
"externalRowId": "21020",
"fromWarehouseExternalId": "central",
"id": 42,
"key": "7340192703345",
"label": "DO-14534",
"orderDate": "2021-07-19T14:05:22.257Z",
"orderType": "Transfer",
"quantity": 4,
"season": "Spring/Summer",
"shippedAt": "2021-07-19T14:05:22.257Z",
"sku": "123456-001-43",
"status": "CANCELLED",
"toWarehouseExternalId": "store1"
}
]'
[
{
"cancelledDate": "2021-07-19T14:05:257Z",
"completedDate": "2021-07-19T14:05:257Z",
"deliveredQuantity": 2,
"deliveryDate": "2021-07-19T14:05:22.257Z",
"deliveryWindow": "SS24",
"externalComment": "Express delivery needed",
"externalDistributionOrderId": "DO-14534",
"externalRowId": "21020",
"fromWarehouseExternalId": "central",
"id": 42,
"key": "7340192703345",
"label": "DO-14534",
"orderDate": "2021-07-19T14:05:22.257Z",
"orderType": "Transfer",
"quantity": 4,
"season": "Spring/Summer",
"shippedAt": "2021-07-19T14:05:22.257Z",
"sku": "123456-001-43",
"status": "CANCELLED",
"toWarehouseExternalId": "store1"
}
]
[
{
"cancelledDate": "2021-07-19T14:05:257Z",
"completedDate": "2021-07-19T14:05:257Z",
"deliveredQuantity": 2,
"deliveryDate": "2021-07-19T14:05:22.257Z",
"deliveryWindow": "SS24",
"externalComment": "Express delivery needed",
"externalDistributionOrderId": "DO-14534",
"externalRowId": "21020",
"fromWarehouseExternalId": "central",
"id": 42,
"key": "7340192703345",
"label": "DO-14534",
"orderDate": "2021-07-19T14:05:22.257Z",
"orderType": "Transfer",
"productFields": {
"ageGroup": "string",
"brandName": "string",
"categoryName": "string",
"collection": "string",
"color": "string",
"costPrice": 42.0,
"costPriceCurrency": "string",
"customFields": {},
"department": "string",
"ean": "string",
"endDate": "string",
"externalAttributes": {},
"gender": "string",
"imageUrl": "string",
"info": {},
"key": "string",
"moq": 42,
"packsize": 42,
"productGroupID": "string",
"productMoq": 42,
"productName": "string",
"productType": 42.0,
"productionLeadTimeDays": 42,
"season": "string",
"shippingLeadTimeDays": 42,
"size": "string",
"sku": "string",
"startDate": "string",
"status": 42.0,
"subCategory": "string",
"supplier": "string",
"supplierPrice": 42.0,
"supplierPriceCurrency": "string",
"unitVolume": 42.0,
"variantExternalID": "string",
"variantGroupID": "string",
"variantName": "string",
"vatValue": 42.0,
"vendorSKU": "string",
"weight": 42.0,
"year": "string"
},
"quantity": 4,
"season": "Spring/Summer",
"shippedAt": "2021-07-19T14:05:22.257Z",
"sku": "123456-001-43",
"status": "CANCELLED",
"toWarehouseExternalId": "store1"
}
]
{
"error": "Error Type (if any)",
"message": "Message describing the error",
"statusCode": 400
}