Skip to content

Orders

Returns a list of orders for your account.

GET/api/v1/orders
ParameterTypeDefaultDescription
order_statusstring-Filter by order status: DRAFT, SENT_FOR_APPROVAL, APPROVED, CONFIRMED, PARTIALLY_RECEIVED, FULLY_RECEIVED
order_typesarray[FINISHED_GOOD, RAW_MATERIAL]Filter by order types: FINISHED_GOOD, RAW_MATERIAL, PRODUCTION_ORDER
updated_afterdatetime-Orders updated after this timestamp (ISO 8601 format, e.g., 2025-01-15T10:30:00Z)
date_fromdate-Creation date range start (YYYY-MM-DD format, e.g., 2025-01-01)
date_todate-Creation date range end (YYYY-MM-DD format, e.g., 2025-01-31)
supplier_namesarray-Filter by supplier names
Terminal window
curl -X GET "https://api.prediko.io/api/v1/orders?order_status=CONFIRMED" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"data": [
{
"id": "77de9865-941b-465d-95c0-3614ac2c70dd",
"reference": "PO-001",
"order_status": "CONFIRMED",
"supplier_name": "Acme Corp",
"order_type": "FINISHED_GOOD",
"origin": "replenish",
"quantity_confirmed": 100.0,
"quantity_received": 50.0,
"delivery_date": ["2025-02-15"],
"confirmed_delivery_date": ["2025-02-15"],
"initial_delivery_date": ["2025-02-15"],
"warehouse_names": ["Main Warehouse"],
"cost": 1500.0,
"currency": "USD",
"created_at": "2025-01-10T14:30:00.000000"
}
],
"total": 50
}
FieldTypeDescription
dataarrayList of order objects
totalintegerTotal number of orders matching the query
FieldTypeDescription
idstringUnique order identifier (UUID)
referencestringOrder/PO name identifier
order_statusstringCurrent order status
supplier_namestringName of the supplier
order_typestringType of order (FINISHED_GOOD, RAW_MATERIAL, PRODUCTION_ORDER)
originstringOrder origin (e.g., “replenish”, “plan”, “NEW”)
quantity_confirmednumberTotal quantity confirmed
quantity_receivednumberTotal quantity received so far
delivery_datearrayCurrent expected delivery dates
confirmed_delivery_datearrayConfirmed delivery dates
initial_delivery_datearrayInitial delivery dates
warehouse_namesarrayList of warehouse names
costnumberTotal order cost
currencystringCurrency code
created_atdatetimeWhen the order was created

Retrieve detailed information about a specific order.

GET/api/v1/orders/{order_id}
ParameterTypeDescription
order_idstringThe unique order identifier
ParameterTypeDefaultDescription
aggregation_levelstringSKUAggregation level: SKU (aggregated by SKU), SKU_LOCATION (by SKU and warehouse). When SKU_LOCATION is used, warehouse_name is included in each order part.
output_formatstringJSONOutput format: JSON (standard), EXCEL (spreadsheet-friendly), PDF (PDF document download)
Terminal window
curl -X GET "https://api.prediko.io/api/v1/orders/PO-001" \
-H "Authorization: Bearer YOUR_API_KEY"

To download a PDF of an order:

Terminal window
curl -X GET "https://api.prediko.io/api/v1/orders/PO-001?output_format=PDF" \
-H "Authorization: Bearer YOUR_API_KEY" \
-o order.pdf
{
"id": "77de9865-941b-465d-95c0-3614ac2c70dd",
"reference": "13-jan",
"order_status": "PARTIALLY_RECEIVED",
"supplier_name": "VANS",
"order_type": "FINISHED_GOOD",
"origin": "replenish",
"quantity_confirmed": 15.0,
"quantity_received": 6.0,
"delivery_date": ["2026-01-18", "2026-01-20"],
"confirmed_delivery_date": ["2026-01-15", "2026-01-18", "2026-01-20", "2026-01-25"],
"initial_delivery_date": ["2026-01-15", "2026-01-18", "2026-01-20"],
"warehouse_names": ["Paris Warehouse", "Paris WH", "Shop location"],
"cost": 0.0,
"currency": "EUR",
"created_at": "2026-01-12T15:03:58.161156",
"order_parts": [
{
"id": "49b89a4b-f8fc-4b4e-a6c7-b0702d384d4b",
"sku_name": "VN-08-white-5",
"product_name": "VANS | OLD SKOOL (BUTTERFLY) TRUE WHITE | BLACK",
"is_material": false,
"supplier_name": "VANS",
"supplier_currency": "eur",
"options": {
"Color": "white",
"Size": "5"
},
"url": "https://cdn.shopify.com/s/files/1/...",
"quantity_confirmed": 10.0,
"received": 6.0,
"in_transit": 7.0,
"confirmed_delivery_date": "2026-01-25",
"initial_delivery_date": "2026-01-20",
"total_cost": 0.0,
"barcode": "NaN",
"moq_met": false,
"missing_moq": 10,
"moq": 300,
"moq_type": "PRODUCT",
"is_composite": false,
"pack_quantity": 1,
"pack_type": "SKU",
"pack_met": true,
"packs_to_order": 10.0,
"is_closed": false
}
]
}

When using SKU_LOCATION, each order part includes the warehouse_name field:

{
"id": "77de9865-941b-465d-95c0-3614ac2c70dd",
"reference": "13-jan",
"order_status": "PARTIALLY_RECEIVED",
"supplier_name": "VANS",
"order_type": "FINISHED_GOOD",
"origin": "replenish",
"quantity_confirmed": 15.0,
"quantity_received": 6.0,
"delivery_date": ["2026-01-18", "2026-01-20"],
"confirmed_delivery_date": ["2026-01-15", "2026-01-18", "2026-01-20", "2026-01-25"],
"initial_delivery_date": ["2026-01-15", "2026-01-18", "2026-01-20"],
"warehouse_names": ["Paris Warehouse", "Paris WH", "Shop location"],
"cost": 0.0,
"currency": "EUR",
"created_at": "2026-01-12T15:03:58.161156",
"order_parts": [
{
"id": "49b89a4b-f8fc-4b4e-a6c7-b0702d384d4b",
"sku_name": "VN-08-white-5",
"product_name": "VANS | OLD SKOOL (BUTTERFLY) TRUE WHITE | BLACK",
"warehouse_name": "Paris Warehouse",
"is_material": false,
"supplier_name": "VANS",
"supplier_currency": "eur",
"options": {
"Color": "white",
"Size": "5"
},
"url": "https://cdn.shopify.com/s/files/1/...",
"quantity_confirmed": 10.0,
"received": 6.0,
"in_transit": 7.0,
"confirmed_delivery_date": "2026-01-25",
"initial_delivery_date": "2026-01-20",
"total_cost": 0.0,
"barcode": "NaN",
"moq_met": false,
"missing_moq": 10,
"moq": 300,
"moq_type": "PRODUCT",
"is_composite": false,
"pack_quantity": 1,
"pack_type": "SKU",
"pack_met": true,
"packs_to_order": 10.0,
"is_closed": false
}
]
}
FieldTypeDescription
idstringUnique part identifier
sku_namestringSKU identifier
product_namestringProduct name
warehouse_namestringWarehouse name (only included when aggregation_level=SKU_LOCATION)
is_materialbooleanWhether this is a raw material
supplier_namestringSupplier name for this line
supplier_currencystringSupplier’s currency
optionsobjectProduct variant options (e.g., Color, Size)
urlstringProduct image URL
quantity_confirmednumberConfirmed quantity
receivednumberQuantity received
in_transitnumberQuantity in transit
confirmed_delivery_datestringConfirmed delivery date for this line
initial_delivery_datestringInitial delivery date
total_costnumberTotal cost for this line
barcodestringProduct barcode
moq_metbooleanWhether minimum order quantity is met
missing_moqnumberUnits missing to meet MOQ
moqnumberMinimum order quantity
moq_typestringMOQ type (e.g., PRODUCT, SUPPLIER)
is_compositebooleanWhether this is a composite/bundle product
pack_quantitynumberPack quantity
pack_typestringPack type (e.g., SKU)
pack_metbooleanWhether pack quantity is met
packs_to_ordernumberNumber of packs to order
is_closedbooleanWhether this line is closed. true when receivedquantity_confirmed but no more deliveries are expected
StatusDescription
404Order not found
401Invalid or missing API key

Create or update purchase orders using UPSERT semantics. Uses purchase_order_name as the unique identifier for idempotent operations.

POST/api/v1/orders
FieldTypeRequiredDescription
dataarrayYesArray of PO line items (minimum 1)
date_formatstringNoDate format for delivery dates. Default: YYYY-MM-DD
FieldTypeRequiredDescription
skustringYesExact SKU identifier
warehousestringYesWarehouse name
quantity_orderedintegerYesTotal ordered quantity
quantity_receivedintegerNoTotal received so far (cumulative, default: 0)
supplierstringYesSupplier name
purchase_order_namestringYesStable PO identifier for updates
deliverystringYesExpected delivery date (format depends on date_format)
statusstringYesDRAFT, PARTIALLY_RECEIVED, or FULLY_RECEIVED

The date_format parameter accepts:

  • JavaScript format: YYYY-MM-DD, DD/MM/YYYY, MM/DD/YYYY
  • Python strptime format: %Y-%m-%d, %d/%m/%Y, %m/%d/%Y
  • DRAFT: PO created, nothing received
  • PARTIALLY_RECEIVED: Some units received
  • FULLY_RECEIVED: All units received
Terminal window
curl -X POST "https://api.prediko.io/api/v1/orders" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"data": [
{
"sku": "SKU-001",
"warehouse": "Main Warehouse",
"quantity_ordered": 100,
"quantity_received": 0,
"supplier": "Acme Corp",
"purchase_order_name": "PO-001",
"delivery": "2025-02-15",
"status": "DRAFT"
}
]
}'

On success, the response includes an order_ids array containing the IDs of all created or updated orders:

{
"errors": [],
"created_orders": {
"77de9865-941b-465d-95c0-3614ac2c70dd": "PO-001"
},
"order_ids": ["77de9865-941b-465d-95c0-3614ac2c70dd"]
}
FieldTypeDescription
order_idsarrayList of order IDs that were created or updated
created_ordersobjectMapping of order ID to purchase order reference name
errorsarrayList of errors (empty on full success)

To record units received, send the updated cumulative quantity:

Terminal window
curl -X POST "https://api.prediko.io/api/v1/orders" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"data": [
{
"sku": "SKU-001",
"warehouse": "Main Warehouse",
"quantity_ordered": 100,
"quantity_received": 50,
"supplier": "Acme Corp",
"purchase_order_name": "PO-001",
"delivery": "2025-02-15",
"status": "PARTIALLY_RECEIVED"
}
]
}'

Update the status of one or more orders.

PATCH/api/v1/orders/status
FieldTypeRequiredDescription
order_idsarrayYesList of order IDs to update
order_statusstringYesNew status: DRAFT, SENT_FOR_APPROVAL, APPROVED, CONFIRMED, PARTIALLY_RECEIVED, or FULLY_RECEIVED
Terminal window
curl -X PATCH "https://api.prediko.io/api/v1/orders/status" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"order_ids": ["PO-001", "PO-002"],
"order_status": "CONFIRMED"
}'

Delete an order by ID.

DELETE/api/v1/orders/{order_id}
ParameterTypeDescription
order_idstringThe unique order identifier
Terminal window
curl -X DELETE "https://api.prediko.io/api/v1/orders/PO-001" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"message": "Order 'PO-001' deleted successfully"
}
StatusDescription
404Order not found
401Invalid or missing API key