Skip to content

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 create operation.
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/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

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

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

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.