Skip to content

Get Product Variant

Request

Returns a single Variant resource nested within the specified Product, with the published fields selected via OData query options.

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:

  • culture-code (e.g. es, en-us) — returns content localized in the specified culture.
  • null / not set — returns content localized in the default culture.
  • * — currently disabled.

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.

  • Example: frmt_ref
  • Example: frmt_ref,frmt_tags

$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

  • 400 Bad Request — Invalid OData expression or query parameter.
  • 401 Unauthorized — Missing or invalid API key. Returned by the API gateway as { "message": "Unauthorized", "request_id": "d8aafa5b8f3e400b60bea0123dd33317" }.
  • 404 Not Found — Product, Variant or tenant not found.
  • 500 Internal Server Error — Unexpected technical error.

Example

Request:

GET /Products(987)/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
Path
productIdentifierinteger, (int64)required

Product resource identifier (path parameter)

variantIdentifierinteger, (int64)required

Variant resource identifier (path parameter)

Query
$selectstring
$expandstring
Headers
X-API-KEYstring

Tenant's API key (required)

Accept-Languagestring

Preferred localization culture (e.g. es, en-us)

GET
/Products({productIdentifier})/Variants({variantIdentifier})
curl -i -X GET \
  'https://api2.saleslayer.com/catalog/Products({productIdentifier})/Variants({variantIdentifier})?%24select=string&%24expand=string' \
  -H 'Accept-Language: string' \
  -H 'X-API-KEY: string'

Responses

OK

Bodyapplication/json
@etagstring or null
@contextstring or null
valueany or null
Response
{ "@readLink": "string", "@editLink": "string", "@etag": "string", "@navigationLinks": [ { … } ], "@associationLinks": [ { … } ], "@context": "string", "value": null }