Skip to content

Order API

Workflow guides for Order endpoints under /api-user/v1/order/. For authentication, URL encoding, and signature rules, see API Overview. For request/response field schemas, use Swagger UI at https://[your-api-domain]/api-user-doc (tags v1 - Order and v1 - Order > Details).

Quick Check - Before You Start
  • You have a valid API Key and API Secret from your 3 Clicks administrator.
  • Strict auth is recommended for create and update operations (X-Api-Key, X-Api-Signature, X-Api-Timestamp).
  • Order dates use DD/MM/YYYY format (e.g. 17/06/2026).
  • style_number, customer_code, factory_code, and critical_path must exist on your tenant — verify values in Swagger UI or Site Settings.

Business context

For how order fields relate to the Order application UI, see Order › Style Details.

Base paths

Controller Base path Swagger tag
Create / delete /api-user/v1/order/ v1 - Order
Detail / update / quantity / pricing /api-user/v1/order/basic/ v1 - Order > Details

Workflow 1 — Get order detail

Retrieve a single order by order number.

  1. Confirm the order number exists on your tenant.
  2. URL-encode the order number if it contains special characters (see Overview — URL Encoding).
  3. Send a GET request with strict auth (or simple auth with key + secret).
curl -X 'GET' \
  'https://[your-api-domain]/api-user/v1/order/basic/ORD-12345' \
  -H 'accept: */*' \
  -H 'X-Api-Key: your-api-key' \
  -H 'X-Api-Signature: your-signature' \
  -H 'X-Api-Timestamp: 1717127589'

Response

Success responses return result.code "0" and order detail in content. See Swagger Order - Detail for the full response shape.


Workflow 2 — Create normal order

Create a single-style (normal) order.

  1. Gather required reference data: style_number, customer_code, factory_code, critical_path, and terms.
  2. Choose a unique order_number for your integration.
  3. Set start_date and etd_date in DD/MM/YYYY format (start_date must not be before today).
  4. Send a POST to /api-user/v1/order/normal with a JSON body (snake_case keys).
curl -X 'POST' \
  'https://[your-api-domain]/api-user/v1/order/normal' \
  -H 'accept: */*' \
  -H 'Content-Type: application/json' \
  -H 'X-Api-Key: your-api-key' \
  -H 'X-Api-Signature: your-signature' \
  -H 'X-Api-Timestamp: 1717128481' \
  -d '{
    "style_number": "STY3456",
    "order_number": "ORD-API-001",
    "critical_path": "40 Days",
    "customer_code": "0004",
    "factory_code": "FGK",
    "terms": "CFR",
    "start_date": "DD/MM/YYYY",
    "etd_date": "DD/MM/YYYY",
    "eta_date": "DD/MM/YYYY",
    "in_store_date": "DD/MM/YYYY",
    "ex_factory_date": "DD/MM/YYYY"
  }'

Required fields

Swagger and @Schema on Order(Normal) - Create list required vs optional fields. At minimum include style_number, order_number, critical_path, customer_code, factory_code, terms, start_date, and etd_date.


Workflow 3 — Update order

Partially update an existing order (dates, description, vessel, season, custom fields, etc.).

  1. Use the same order_number returned from create or detail.
  2. Send only the fields you want to change in the PATCH body.
  3. Send a PATCH to /api-user/v1/order/basic/{orderNumber}.
curl -X 'PATCH' \
  'https://[your-api-domain]/api-user/v1/order/basic/ORD-API-001' \
  -H 'accept: */*' \
  -H 'Content-Type: application/json' \
  -H 'X-Api-Key: your-api-key' \
  -H 'X-Api-Signature: your-signature' \
  -H 'X-Api-Timestamp: 1717128481' \
  -d '{
    "etd_date": "DD/MM/YYYY",
    "eta_date": "DD/MM/YYYY",
    "description": "Updated via API integration",
    "vessel": "Ever Given",
    "season": "S15",
    "custom_fields": {
      "po_number": "PO-12345"
    }
  }'

Field reference

Do not duplicate every updatable field here — use Swagger Order - Update for the full OrderUpdateParam schema.


Workflow 4 — Quantity operations

Order quantity endpoints differ by order type (normal, bulk style, bulk component). All live under /api-user/v1/order/basic/quantity/….

Order type Example operations Swagger summaries
Normal List, detail, create, update, delete colour quantities Order(Normal) - Quantity - *
Bulk style List, create, update, delete style/colour quantities Order(Bulk Style) - Quantity - *
Bulk component List, create, update, delete component quantities Order(Bulk Component) - Quantity - *

Example — add normal order quantity (POST):

curl -X 'POST' \
  'https://[your-api-domain]/api-user/v1/order/basic/quantity/normal' \
  -H 'accept: */*' \
  -H 'Content-Type: application/json' \
  -H 'X-Api-Key: your-api-key' \
  -H 'X-Api-Signature: your-signature' \
  -H 'X-Api-Timestamp: 1717128481' \
  -d '{
    "order_number": "ORD-API-001",
    "style_coloursize_id": 1,
    "is_definition_approval": false,
    "is_advertised": false,
    "in_store_date": "DD/MM/YYYY",
    "sizes": [
      {"size": "S", "qty": 10, "ratio": 1},
      {"size": "M", "qty": 20, "ratio": 2}
    ]
  }'

Full quantity API

See Swagger UI tag v1 - Order > Details for every quantity, pricing, and bulk-variant endpoint. Field names and validation rules are defined there — not duplicated in this guide.


Operation Method Path
Create bulk style order POST /api-user/v1/order/bulk-style
Create bulk component order POST /api-user/v1/order/bulk-component
Delete order DELETE /api-user/v1/order/{orderNumber}

Browse all Order operations in Swagger UI at https://[your-api-domain]/api-user-doc.

Further reading