Ultineo Logistics

Orders through the API

These routes do what the Orders screens do. An order is routed at once, exactly as an order created on the screen: to the partner site nearest the recipient that holds every product, split into parts when no single site does, or in exception.

RouteScopeDoes
POST /v1/order/createorder:writecreates one order and routes it
GET /v1/order/listorder:readlists your orders
GET /v1/order/detail/<id>order:readone order with its lines and, for a split order, its parts
PATCH /v1/order/detail/<id>order:write"status": "cancelled" cancels the order
POST /v1/order/cancel/<id>order:writecancels the order before picking

Create an order

curl -X POST https://api.logistic.ultineo.com/v1/order/create \
  -H "Authorization: Bearer YOUR_KEY" -H "Content-Type: application/json" \
  -d '{"source_ref": "SHOP-10045", "service": "standard",
       "ship_to": {"name": "Alex Sample", "line1": "12 Example Street", "postcode": "75011",
                   "city": "Paris", "country": "FR", "email": "alex@example.com"},
       "lines": [{"sku": "TEE-BLUE-M", "quantity": 2}]}'
FieldRule
source_refrequired: your order number
ship_torequired: name, line1, city and country (ISO 3166-1 alpha-2); optional company, line2, postcode, region, phone, email
linesrequired: 1 to 50 lines, each with a product_id or a sku and a quantity from 1 to 10000, a product at most once
servicestandard (default) or express
noteoptional

The answer is 201 with the order. An order is accepted once: sending the same source_ref again answers 200 with the order already created, never a second one, so you can send it again after a failure.

Read an order

GET /v1/order/detail/<id> answers its reference, status, service, site (name, city, country), exception_reason, parcel once shipped, totals, the dates routed_at, exception_at, picking_at, packed_at, shipped_at, delivered_at and cancelled_at, and its lines, each with quantity, reserved and picked. A split order lists its parts in children, each part points to it in parent.

statusMeans
newsaved, waiting for a site
routeda site holds the stock; it is reserved
splitsent as several parts, one per site
exceptioncannot go on; exception_reason says why (no_stock, for example)
picking, packed, shipped, deliveredthe site prepares, packs and ships it, then the carrier delivers it
cancelledwill not be prepared

GET /v1/order/list filters on status (a comma list, for example routed,exception), q (reference, order number, recipient name, company, e-mail or city), source and source_ref (exact), with limit (at most 100) and offset.

Cancel an order

Send POST /v1/order/cancel/<id>, with an optional note, or a PATCH with "status": "cancelled". An order is cancelled until the site starts picking it, and its reserved stock becomes available again; a split order is cancelled with its parts. Once picking has started, the answer is 409. To change the lines or the address, cancel the order and create a new one.