Skip to content

Style API

Workflow guides for Style endpoints under /api-user/v1/style/. 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.

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.
  • URL-encode style_number when it appears in the path (e.g. ABC/123ABC%2F123). See Overview — URL Encoding.
  • Reference codes (brand_code, category_code, etc.) must exist in Site Settings — verify in Swagger or your tenant admin UI.

Business context

For how style fields appear in the Style application, see Style › Style Details.

Base paths

Area Base path Swagger tag
Create / delete /api-user/v1/style/ v1 - Style
Detail / update / colours / pricing /api-user/v1/style/basic/ v1 - Style > Details
Barcodes, keycodes, tuncodes, skucodes /api-user/v1/style/codes/ v1 - Style > Codes
eCommerce /api-user/v1/style/ecommerce/ v1 - Style > eCommerce
Inventory /api-user/v1/style/inventory/ v1 - Style > Inventory

Workflow 1 — Get style detail

Retrieve a single style by style number.

  1. Confirm the style exists on your tenant.
  2. URL-encode the style number if it contains / or other special characters.
  3. Send a GET to /api-user/v1/style/basic/{styleNumber}.
curl -X 'GET' \
  'https://[your-api-domain]/api-user/v1/style/basic/STY3456' \
  -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 style detail in content. See Swagger Style - Detail for the full response shape.


Workflow 2 — Create style

Create a new style record.

  1. Choose a unique style_number.
  2. Gather Site Settings codes for the attributes you need (brand, category, season, etc.).
  3. Send a POST to /api-user/v1/style/ with a JSON body (snake_case keys). Only style_number is required.
curl -X 'POST' \
  'https://[your-api-domain]/api-user/v1/style/' \
  -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": "STY-API-001",
    "description": "API integration test style",
    "brand_code": "BR01",
    "category_code": "CAT01",
    "season": "SS26",
    "gender_code": "W",
    "size_scale_code": "AU",
    "department_code": "DEPT01"
  }'

Workflow 3 — Update style

Partially update an existing style (description, codes, custom fields, etc.).

  1. Use the target style_number in the path (URL-encoded if needed).
  2. Send only the fields you want to change in the PATCH body.
  3. Send a PATCH to /api-user/v1/style/basic/{styleNumber}.
curl -X 'PATCH' \
  'https://[your-api-domain]/api-user/v1/style/basic/STY3456' \
  -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 '{
    "description": "Updated via API integration",
    "composition": "100% Cotton",
    "season": "FW26",
    "custom_fields": {
      "design_ref": "DR-100"
    }
  }'

Field reference

See Swagger Style - Update for the full StyleUpdateParam schema. Do not duplicate every updatable field here.


Workflow 4 — Codes (barcode, keycode, tuncode, skucode)

The Codes API manages unit-size and pack codes per style colour. Operations are grouped under /api-user/v1/style/codes/.

Code type Example paths Swagger summaries
Barcode GET/POST/PATCH/DELETE …/codes/barcode/… Style - Codes - * barcode
Keycode …/codes/keycode/… Style - Codes - * keycode
Tuncode …/codes/tuncode/… Style - Codes - * tuncode
Skucode …/codes/skucode/… Style - Codes - * skucode

Example — get barcodes for a style (GET):

curl -X 'GET' \
  'https://[your-api-domain]/api-user/v1/style/codes/barcode/STY3456' \
  -H 'accept: */*' \
  -H 'X-Api-Key: your-api-key' \
  -H 'X-Api-Signature: your-signature' \
  -H 'X-Api-Timestamp: 1717127589'

Browse tag v1 - Style > Codes in Swagger UI for create, update, delete, and column-delete operations.


Workflow 5 — eCommerce and inventory (overview)

These sub-APIs extend a style for portal and stock integrations. Use Swagger for full request schemas — this guide lists entry points only.

Area Base path Common operations
eCommerce /api-user/v1/style/ecommerce/ Detail, description update, tags, colour sell price / weight
Inventory /api-user/v1/style/inventory/ Detail, create, update, delete inventory rows

Example — get eCommerce detail (GET):

curl -X 'GET' \
  'https://[your-api-domain]/api-user/v1/style/ecommerce/STY3456' \
  -H 'accept: */*' \
  -H 'X-Api-Key: your-api-key' \
  -H 'X-Api-Signature: your-signature' \
  -H 'X-Api-Timestamp: 1717127589'

Schema source of truth

See Swagger tags v1 - Style > eCommerce and v1 - Style > Inventory for every field and validation rule.


Further reading