Skip to content

Success responses

Sales Layer REST APIs use standard HTTP status codes to indicate successful operations.

The current OpenAPI specifications document these success status codes:

Status codeTypical use
200 OKSuccessful read operation, usually with a response body.
201 CreatedSuccessful resource creation. See implementation notes for endpoint-specific codes.
204 No ContentSuccessful update or delete operation without a response body.

200 OK

200 OK is used when the API returns data.

List responses may include metadata such as count or navigation links.

{
  "@readLink": "https://api2.saleslayer.com/catalog/Products?$top=10",
  "@nextLink": "https://api2.saleslayer.com/catalog/Products?$skipToken=TOKEN_VALUE",
  "value": [],
  "@count": 0
}

The exact response schema depends on the endpoint. Use the OpenAPI reference for the operation you call.

201 Created

201 Created is used when a resource is created successfully.

Catalog creates for Categories, Products, Variants, and Custom Entity items return 201 Created without a response body and include a Location header identifying the new resource. Use the identifier in that header when you need to read or update it. Attribute Sets v2 creates return 201 with a body and Location; the Beta attribute-management POST operations return 201 with a body. Check each operation's reference.

Example:

HTTP/1.1 201 Created
Location: https://api2.saleslayer.com/dam/images(product-123.jpg)

Note: POST /catalog/Products, POST /catalog/Variants, and POST /catalog/CustomEntities('{customEntityDenominator}') return 201 Created with no body. The numeric identifier is in the final parentheses of Location, for example /Products(46) identifies product 46. A Custom Entity item has no individual GET route; read it by filtering its collection by the item identifier.

204 No Content

204 No Content is used when an operation succeeds but there is no response body.

This is common for update and delete operations.

PATCH /catalog/Products({productId}), PATCH /catalog/Categories({categoryId}), PATCH /catalog/Variants({variantId}), and PATCH /catalog/CustomEntities('{customEntityDenominator}')/item({itemId}) return 204 No Content. Do not expect a response body from these updates.

Example:

HTTP/1.1 204 No Content

Date values

DAM createdOn and modifiedOn, Catalog system dates (*_creation, *_modify), and changelog modified_at are UTC instants returned with Z. For example, an asset record may contain:

{
  "createdOn": "2026-10-01T08:00:00Z",
  "modifiedOn": "2026-10-01T08:30:00Z"
}

This is a date-field excerpt; the complete response depends on the operation. Preserve UTC instants for system dates and synchronization checkpoints. Catalog custom attributes of type Date instead return a value without a time zone, such as "2026-10-21T16:22:00"; do not add Z or convert it before using the value in a date filter.

Implementation notes

  • Do not require a JSON body for 204 No Content.
  • Read Location headers on 201 Created when present.
  • Use the operation-specific OpenAPI schema to parse 200 OK responses.
  • Check the OpenAPI reference for the exact success code and body of each operation. Catalog create operations return 201 Created, but their response bodies differ by resource.