API Reference
//
Get Variant Metadata
The metadata is a JSON Schema document that describes:
- The implicit and custom properties exposed by the Variant resource.
- The associated resources (
Product) and their relationships.
The schema should be consulted to build requests against the other Variant endpoints (which fields can be used in $select, $filter, $orderby, request bodies, etc.).
Requires a valid API key in the X-API-KEY header.
200 OK — Returns the JSON Schema as a ServiceDocumentRepresentation.
- 401 Unauthorized — Missing or invalid API key. Returned by the API gateway as
{ "message": "Unauthorized", "request_id": "d8aafa5b8f3e400b60bea0123dd33317" }. - 404 Not Found — Tenant or model not found.
- 500 Internal Server Error — Unexpected technical error.
Request:
GET /Variants/$metadata HTTP/1.1
X-API-KEY: your-api-key-hereResponse:
HTTP/1.1 200 OK
Content-Type: application/jsonGET
curl -i -X GET \
'https://api2.saleslayer.com/catalog/Variants/$metadata' \
-H 'X-API-KEY: string'Response
{ "readLink": { "uri": "http://example.com" }, "value": null }