products.md

Products

Filter Products

Authentication

Requires a valid API key in the X-API-KEY header.

Headers

Accept-Language

Indicates the preferred natural language and locale for localized content.

OData Query Support

$select

Comma-separated list of root-resource property names to include in the response. See /Products/$metadata for the available properties. Selecting properties of embedded resources is not supported.

Example: $select=prod_description,prod_tags

$expand

Comma-separated list of embedded collections to include (e.g. Variants). By default, embedded collections are not included. Only embedded collections (not embedded resources) are supported.

Example: $expand=Variants

$filter

OData v4.01 URI conventions. Filtering is restricted to properties of the root resource (Product).

Comparison operators: eq, ne, gt, ge, lt, le

Logical operators: and, or, not

Set operator: in

String functions: contains, startswith, endswith

Examples:

$orderby

Single property, ascending by default. Multi-property ordering and ordering on embedded properties are not supported.

Examples:

Pagination — $top, $skip, $skipToken

Paging applies only to the root resource (Product), never to embedded collections.

Response

200 OK — CollectionRepresentation with the matching Product resources, pagination metadata (Count, Skip, Top, HasNext, continuation token) and the cultures echoed from Accept-Language.

Error Responses

Example

Request: http GET /Products?$filter=contains(prod_description,'pro')&$orderby=prod_description asc&$top=20 HTTP/1.1 X-API-KEY: your-api-key-here Accept-Language: en-US

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

Create Product

Authentication

Requires a valid API key in the X-API-KEY header.

Headers

Accept-Language

Culture used to interpret the localized field values supplied in the request body.

Request Body

A single JSON object whose properties match the writable fields published by /Products/$metadata. The body is normalized before reaching the application layer:

Response

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

Error Responses

Example

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

{ "prod_ref": "SKU-001", "prod_description": "New product", "cat_id": 123 }

Response: http HTTP/1.1 201 Created Location: /Products(456)

Get Product

Authentication

Requires a valid API key in the X-API-KEY header.

Headers

Accept-Language

Indicates the preferred natural language and locale for localized content.

OData Query Support

$select

Comma-separated list of root-resource property names to include in the response. See /Products/$metadata for the available properties. Selecting properties of embedded resources is not supported.

Example: $select=prod_description,prod_tags

$expand

Comma-separated list of embedded collections to include (e.g. Variants). By default, embedded collections are not included. Only embedded collections (not embedded resources) are supported.

Example: $expand=Variants

Response

200 OK — EntityRepresentation with the Product resource.

Error Responses

Example

Request: http GET /Products(456)?$select=prod_description,prod_tags&$expand=Variants HTTP/1.1 X-API-KEY: your-api-key-here Accept-Language: en-US

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

Update Product

Authentication

Requires a valid API key in the X-API-KEY header.

Headers

Accept-Language

Culture used to interpret the localized field values supplied in the request body.

Request Body

A single JSON object with the subset of writable fields to update (PATCH semantics — only the supplied fields are modified). Field names must match those published by /Products/$metadata. Normalization rules:

Response

200 OK — Update applied.

Error Responses

Example

Request: http PATCH /Products(456) HTTP/1.1 X-API-KEY: your-api-key-here Accept-Language: en-US Content-Type: application/json

{ "prod_description": "Updated description", "cat_id": [123, 124] }

Response: http HTTP/1.1 200 OK

Delete Product

Authentication

Requires a valid API key in the X-API-KEY header.

Response

204 No Content — Product deleted.

Error Responses

Example

Request: http DELETE /Products(456) HTTP/1.1 X-API-KEY: your-api-key-here

Response: http HTTP/1.1 204 No Content

Filter Product Variants

Authentication

Requires a valid API key in the X-API-KEY header.

Headers

Accept-Language

Indicates the preferred natural language and locale for the localized content:

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

Comma-separated list of Variant properties (implicit or custom) to include in the result. Selection of properties inside embedded resources/collections is not supported.

$expand

Comma-separated list of embedded collections to include in the result. By default, embedded collections are not included. Only embedded collections are supported (not embedded resources).

$filter

Boolean expression applied on root resource properties. Filtering on nested resource properties is not supported.

$orderby

Sorting expression on a single root resource property. Multiple properties and embedded properties are not supported. Format: PROPERTY (asc|desc). Default direction is asc.

$top

Page size. Maximum and default is 100 items.

$skip

Offset for the limit-and-offset paging strategy (used together with $top). Recommended when $orderby is required.

$skipToken

Continuation token for the continuation-token paging strategy. Faster than limit-and-offset but does not support $orderby.

Response

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

Error Responses

Example

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

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

Get Product Variant

Authentication

Requires a valid API key in the X-API-KEY header.

Headers

Accept-Language

Indicates the preferred natural language and locale for the localized content:

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

Comma-separated list of Variant properties (implicit or custom) to include in the result. Selection of properties inside embedded resources/collections is not supported.

$expand

Comma-separated list of embedded collections to include in the result. By default, embedded collections are not included. Only embedded collections are supported (not embedded resources).

Response

200 OK — Returns an EntityRepresentation with the requested Variant.

Error Responses

Example

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

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

Get Products Changelog

Authentication

Requires a valid API key in the X-API-KEY header.

OData Query Support

Supports $filter, $orderby, $top, $skip over the changelog fields. $select, $expand and $skipToken are not supported by this endpoint.

Response

200 OK — Collection of changelog entries (CollectionRepresentation).

Error Responses

Example

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

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

Get Product Changelog

Authentication

Requires a valid API key in the X-API-KEY header.

OData Query Support

Supports $filter, $orderby, $top, $skip over the changelog fields. $select, $expand and $skipToken are not supported by this endpoint.

Response

200 OK — Collection of changelog entries for the specified Product.

Error Responses

Example

Request: http GET /Products(123)/Changelog?$top=20 HTTP/1.1 X-API-KEY: your-api-key-here

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

Get Product Metadata

The schema should be consulted to build requests against the other Product endpoints (which fields can be used in $select, $filter, $orderby, request bodies, etc.).

Authentication

Requires a valid API key in the X-API-KEY header.

Response

200 OK — Returns the JSON Schema as a ServiceDocumentRepresentation.

Error Responses

Example

Request: http GET /Products/$metadata HTTP/1.1 X-API-KEY: your-api-key-here

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