API Reference
//
Create Product
Creates a new Product resource from the supplied JSON body and returns its location.
Requires a valid API key in the X-API-KEY header.
Culture used to interpret the localized field values supplied in the request body.
- omitted / null: tenant's default culture.
- culture-code (e.g.
en-US,es): the specified culture.
A single JSON object whose properties match the writable fields published by /Products/$metadata. The body is normalized before reaching the application layer:
- Must be a non-empty JSON object.
- A JSON array is accepted only if it contains exactly one element.
- Values are coerced to CLR primitives (
string,long,double,bool,null), nested objects and arrays.
201 Created — The Location header points to the new resource: /Products({id}). No response body.
- 400 Bad Request — Payload normalization or validation failure (empty body, multi-element array, invalid field values, etc.). Validation errors are returned as
ValidationFailureRepresentation. - 401 Unauthorized — Missing or invalid API key. Returned by the API gateway as
{ "message": "Unauthorized", "request_id": "d8aafa5b8f3e400b60bea0123dd33317" }. - 403 Forbidden — The API key does not have write permissions for this operation.
- 404 Not Found — Tenant or referenced resource not found.
- 500 Internal Server Error — Unexpected technical error.
Request:
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/1.1 201 Created
Location: /Products(456)POST
curl -i -X POST \
https://api2.saleslayer.com/catalog/Products \
-H 'Accept-Language: string' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: string'Response
{ "readLink": { "uri": "http://example.com" }, "value": null }