Sales Layer REST APIs use standard HTTP status codes to indicate successful operations.
The current OpenAPI specifications document these success status codes:
| Status code | Typical use |
|---|---|
200 OK | Successful read operation, usually with a response body. |
201 Created | Successful create operation. |
204 No Content | Successful update or delete operation without a response body. |
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/rest/Catalog/Products?$top=10",
"@nextLink": "https://api2.saleslayer.com/catalog/rest/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 is used when a resource is created successfully.
Create operations may include a Location response header with the URL of the created resource.
Example:
HTTP/1.1 201 Created
Location: https://api2.saleslayer.com/catalog/rest/Catalog/Products(3)204 No Content is used when an operation succeeds but there is no response body.
This is common for update and delete operations.
Example:
HTTP/1.1 204 No Content- Do not require a JSON body for
204 No Content. - Read
Locationheaders on201 Createdwhen present. - Use the operation-specific OpenAPI schema to parse
200 OKresponses.