Skip to content

Get Category

Request

Returns a single Category resource identified by its route identifier, optionally shaping the response with $select and $expand.

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.

  • omitted / null: content in the tenant's default culture.
  • culture-code (e.g. en-US, es): content localized in the specified culture.
  • * and q-factor weighting are currently not supported.

OData Query Support

$select

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

Example: $select=cat_title,cat_description

$expand

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

Example: $expand=Products

$filter, $orderby, $top, $skip and $skipToken are not applicable to this endpoint.

Response

200 OK — EntityRepresentation with the requested Category resource.

Error Responses

  • 400 Bad Request — Invalid $select or $expand expression (returns ValidationFailureRepresentation).
  • 401 Unauthorized — Missing or invalid API key. Returned by the API gateway as { "message": "Unauthorized", "request_id": "d8aafa5b8f3e400b60bea0123dd33317" }.
  • 404 Not Found — Category with the given identifier does not exist.
  • 500 Internal Server Error — Unexpected technical error.

Example

Request:

GET /Categories(123)?$select=cat_title,cat_description&$expand=Products HTTP/1.1
X-API-KEY: your-api-key-here
Accept-Language: en-US

Response:

HTTP/1.1 200 OK
Content-Type: application/json
Path
categoryIdentifierinteger, (int32)required

Category resource identifier

Query
$selectstring
$expandstring
Headers
X-API-KEYstring

Tenant's API key (required)

Accept-Languagestring

Preferred localization culture (Accept-Language header)

GET
/Categories({categoryIdentifier})
curl -i -X GET \
  'https://api2.saleslayer.com/catalog/Categories({categoryIdentifier})?%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 }