Create new Purchase Orders in batch. Max Batch Size = 500 Purchase Orders
Body
Required
id should be omitted on creation of new orders
-
Date the Purchase Order was created in Madden
-
Status of the Delivery (0: Not Delivered, 1: PartiallyDelivered, 2: FullyDelivered, 3: Cancelled)
Default value is
0. -
Delivery Window of the Purchase Order
-
Any relevant comment
-
External Purchase No
-
Factory of the Purchase Order
-
Maddens Purcher Order id
-
The items on the Purchase Order
-
External Description/Label of PO
-
Date that the Purchase Order was created
-
Order Type of the Purchase Order
-
Transport Method of the Purchase Order
-
Date the Purchase Order was last updated in Madden
POST
/v2/api/purchaseorders
curl \
--request POST 'https://api.maddenanalytics.com/v2/api/purchaseorders' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '[
{
"cancelledDate": "2021-07-19T14:05:22.257Z",
"completedDate": "2021-07-19T14:05:22.257Z",
"createdAt": "2021-03-19T14:05:22.257Z",
"deliveryStatus": 10,
"deliveryWindow": "SS24",
"externalComment": "AW21 - Footwear",
"externalPurchaseNo": "PO-14534",
"factory": "Factory B",
"id": 42,
"items": [
{
"brandName": "Acme",
"deliveries": [
{
"deliveryDate": "2021-10-13T09:05:14.113Z",
"deliveryID": "RP-14534",
"quantity": 4
}
],
"deliveryDate": "2021-07-19T14:05:22.257Z",
"departureDate": "2021-07-19T14:05:22.257Z",
"ean": "7340192703345",
"externalRowID": "21020",
"externalWarehouseID": "ecom",
"fromExternalWarehouseID": "central",
"id": 42,
"key": "7340192703345",
"productName": "Petter",
"quantity": 4,
"revisedDeliveryDate": "2021-07-19T14:05:22.257Z",
"revisedDepartureDate": "2021-07-19T14:05:22.257Z",
"season": "Spring/Summer",
"sku": "123456-001-43",
"supplier": "Factory B",
"totalPriceCurrency": "EUR",
"totalPriceNet": 180,
"totalPriceVat": 0
}
],
"label": "string",
"orderDate": "2021-03-19T14:05:22.257Z",
"orderType": "Standard",
"transportMethod": "Air",
"updatedAt": "2021-03-19T14:05:22.257Z"
}
]'
Request examples
[
{
"cancelledDate": "2021-07-19T14:05:22.257Z",
"completedDate": "2021-07-19T14:05:22.257Z",
"createdAt": "2021-03-19T14:05:22.257Z",
"deliveryStatus": 10,
"deliveryWindow": "SS24",
"externalComment": "AW21 - Footwear",
"externalPurchaseNo": "PO-14534",
"factory": "Factory B",
"id": 42,
"items": [
{
"brandName": "Acme",
"deliveries": [
{
"deliveryDate": "2021-10-13T09:05:14.113Z",
"deliveryID": "RP-14534",
"quantity": 4
}
],
"deliveryDate": "2021-07-19T14:05:22.257Z",
"departureDate": "2021-07-19T14:05:22.257Z",
"ean": "7340192703345",
"externalRowID": "21020",
"externalWarehouseID": "ecom",
"fromExternalWarehouseID": "central",
"id": 42,
"key": "7340192703345",
"productName": "Petter",
"quantity": 4,
"revisedDeliveryDate": "2021-07-19T14:05:22.257Z",
"revisedDepartureDate": "2021-07-19T14:05:22.257Z",
"season": "Spring/Summer",
"sku": "123456-001-43",
"supplier": "Factory B",
"totalPriceCurrency": "EUR",
"totalPriceNet": 180,
"totalPriceVat": 0
}
],
"label": "string",
"orderDate": "2021-03-19T14:05:22.257Z",
"orderType": "Standard",
"transportMethod": "Air",
"updatedAt": "2021-03-19T14:05:22.257Z"
}
]
Response examples (201)
[
{
"cancelledDate": "2021-07-19T14:05:22.257Z",
"completedDate": "2021-07-19T14:05:22.257Z",
"createdAt": "2021-03-19T14:05:22.257Z",
"deliveryStatus": 10,
"deliveryWindow": "SS24",
"externalComment": "AW21 - Footwear",
"externalPurchaseNo": "PO-14534",
"factory": "Factory B",
"id": 42,
"items": [
{
"brandName": "Acme",
"deliveries": [
{
"deliveryDate": "2021-10-13T09:05:14.113Z",
"deliveryID": "RP-14534",
"quantity": 4
}
],
"deliveryDate": "2021-07-19T14:05:22.257Z",
"departureDate": "2021-07-19T14:05:22.257Z",
"ean": "7340192703345",
"externalRowID": "21020",
"externalWarehouseID": "ecom",
"fromExternalWarehouseID": "central",
"id": 42,
"key": "7340192703345",
"productName": "Petter",
"quantity": 4,
"revisedDeliveryDate": "2021-07-19T14:05:22.257Z",
"revisedDepartureDate": "2021-07-19T14:05:22.257Z",
"season": "Spring/Summer",
"sku": "123456-001-43",
"supplier": "Factory B",
"totalPriceCurrency": "EUR",
"totalPriceNet": 180,
"totalPriceVat": 0
}
],
"label": "string",
"orderDate": "2021-03-19T14:05:22.257Z",
"orderType": "Standard",
"transportMethod": "Air",
"updatedAt": "2021-03-19T14:05:22.257Z"
}
]
Response examples (default)
{
"error": "Error Type (if any)",
"message": "Message describing the error",
"statusCode": 400
}