Products through the API
These routes do what the Stock screens do for your catalogue. A product never carries a quantity: stock arrives through an inbound received at a partner site.
| Route | Scope | Does |
|---|---|---|
POST /v1/product/create | product:write | creates one product |
GET /v1/product/list | product:read | lists your products |
GET /v1/product/detail/<id> | product:read | one product with its stock per site |
PATCH /v1/product/detail/<id> | product:write | changes the fields you send, archives or restores |
POST /v1/product/create?id=<id> | product:write | the same change, for a client that cannot send PATCH |
Create a product
Send sku and name; the other fields are optional:
curl -X POST https://api.logistic.ultineo.com/v1/product/create \
-H "Authorization: Bearer YOUR_KEY" -H "Content-Type: application/json" \
-d '{"sku": "TEE-BLUE-M", "name": "Blue tee, size M", "barcode": "4006381333931",
"weight_g": 180, "dimensions_mm": {"length": 300, "width": 250, "height": 20},
"customs": {"hs_code": "610910", "origin_country": "PT", "value": 6.50, "currency": "EUR"}}' | Field | Rule |
|---|---|
sku | required, unique in your catalogue, up to 100 characters |
name | required, up to 250 characters |
barcode | EAN-8, UPC-A, EAN-13 or GTIN-14 with a valid check digit |
weight_g, dimensions_mm | whole numbers, in grams and millimetres |
customs.hs_code | 6 to 10 digits |
customs.origin_country | ISO 3166-1 alpha-2 country code |
customs.value, customs.currency | a number from 0 to 99999999.99, an ISO 4217 code (EUR by default) |
source_ref | your own reference for the product, up to 200 characters |
The answer is 201 with the product. A SKU you already have is never created twice: the answer is 409 with the id of the product that holds it, so you can send your whole catalogue again after a failure.
Read and list your products
GET /v1/product/detail/<id> answers the product and its stock: one entry per partner site with its site (id, name, city, country), on_hand, reserved, damaged and available. The site id is the one you name to announce an inbound.
GET /v1/product/list answers your active products. It filters on status (activated, archived or all), q (SKU, name or barcode) and sku (exact), with limit (at most 100) and offset.
Change, archive or restore a product
Send a PATCH with the fields to change; the others keep their value. Send "status": "archived" to archive a product and "status": "activated" to restore it. Only an activated product is changed: an archived one answers 409 until you restore it.