Retrieve a specific purchase order using externalPurchaseNo
Query parameters
-
Fields of the product each line points at to return in its productFields object (LineProduct). Repeat the parameter once per field: ?productFields=size&productFields=color. The values are the product as it is now, not as sent with the order; a field the product has no value for (an empty text included) is left out, numbers are returned as stored (0 included), and productFields is left out for a line whose key matches no product. info, customFields and externalAttributes can make the response much larger
-
Find the purchase order under any api key. If several match, the caller's own is returned, otherwise the most recently updated. Default = false
GET
/v2/api/purchaseorders/{externalPurchaseNo}
curl \
--request GET 'https://api.maddenanalytics.com/v2/api/purchaseorders/{externalPurchaseNo}' \
--header "Authorization: $API_KEY"
Response examples (200)
{
"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",
"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"
},
"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",
"maDraftPurchaseNo": "MA-1041",
"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
}