variants.md

Variants

Filter Variants

Authentication

Headers

Accept-Language

Multiple culture codes or q-factor weighting are not supported.

OData Query Support

The endpoint supports a subset of OData v4.01 URI conventions. The full list of available properties can be obtained from GET /Variants/$metadata.

$select

$expand

$filter

$orderby

$top

$skip

$skipToken

Response

200 OK — Returns a CollectionRepresentation with the matching Variant resources.

Error Responses

Example

Request:

GET /Variants?$select=frmt_ref&$top=10 HTTP/1.1
X-API-KEY: your-api-key-here
Accept-Language: es

Response:

HTTP/1.1 200 OK
Content-Type: application/json

Create Variant

Authentication

Headers

Accept-Language

Request Body

A single JSON object whose properties match the writable fields published by /Variants/$metadata.

Response

201 Created — The Location header points to the new resource: /Variants({id}). No response body.

Error Responses

Example

Request:

POST /Variants HTTP/1.1
X-API-KEY: your-api-key-here
Accept-Language: en-US
Content-Type: application/json

{
  "frmt_ref": "SKU-001-RED-M",
  "prod_id": 456
}

Response:

HTTP/1.1 201 Created
Location: /Variants(789)

Get Variant

Authentication

Request:

GET /Variants(12345)?$select=frmt_ref HTTP/1.1
X-API-KEY: your-api-key-here
Accept-Language: es

Response:

HTTP/1.1 200 OK
Content-Type: application/json

Update Variant

Request Body

A single JSON object with the subset of writable fields to update. Field names must match those published by /Variants/$metadata.

Response

200 OK — Update applied.

Error Responses

Example

Request:

PATCH /Variants(789) HTTP/1.1
X-API-KEY: your-api-key-here
Accept-Language: en-US
Content-Type: application/json

{
  "frmt_ref": "SKU-001-RED-L"
}

Response:

HTTP/1.1 200 OK

Delete Variant

Response

204 No Content — Variant deleted.

Example

Request:

DELETE /Variants(789) HTTP/1.1
X-API-KEY: your-api-key-here

Response:

HTTP/1.1 204 No Content

Get Variants Changelog

Response

200 OK — Collection of changelog entries (CollectionRepresentation).

Example

Request:

GET /Variants/Changelog?$orderby=changedAt desc&$top=50 HTTP/1.1
X-API-KEY: your-api-key-here

Response:

HTTP/1.1 200 OK
Content-Type: application/json

Get Variant Metadata

Response

200 OK — Returns the JSON Schema as a ServiceDocumentRepresentation.