[POST] Products

Create Product

This operation allows you to create a new product in the catalog.
It follows REST architecture principles and complies with the OData v4.01 standard.

[POST] Products Endpoint

https://api2.saleslayer.com/rest/Catalog/Products

Making a request

  • Use the HTTP method: POST.
  • Include the API key in the request headers for authentication.
  • The body must be sent in json format.
  • You must include attributes using their identifiers (not database names)
  • The prod_ref field is mandatory.

Body Example:

{
  "prod_ref": "PROD_001",
  "prod_title": "Auriculares Bluetooth",
  "prod_stat": "V",
  "prod_description": "Auriculares inalámbricos con cancelación de ruido",
  "prod_image": "auriculares01.jpg",
  "cat_id": "12",
  "typ_id": "3"
}

📝You can include custom attributes as long as they are previously defined in the Attribute Set associated with the product (typ_id). View item attributes on metadata endpoint.

ℹ️ Currently it is only allowed to link the product to a single category (cat_id).

ℹ️ For image or file fields, they must be referenced by name if they are already loaded in the system. Direct uploads are not supported in this operation.

Response

🟢 201 Created

If the product was created correctly

Response Headers Example

content-length: 0 
 date: Tue,27 May 2025 23:06:09 GMT 
 location: https://api2.saleslayer.com/rest/Catalog/Products(3)

📝 Note that the response returns the prod_id so it can be queried on another Product GET endpoint

🔴 400 Bad Request

There is an error in the data sent (incorrect format, invalid or missing fields).

Response Body Example

"Attribute prod_ref is mandatory"

//or

"Missing file name(s):Corazon2.png."

Limitations

  • Allows you to create a product per call.
  • Create products in batch (bulk) not yet supported.
  • Supports one category per product.
  • Does not yet support direct loading of media assets

Multi-language fields support

You can include multilanguage values ​​in configured attributes

Making a request

  • Use the HTTP method: POST.
  • Include the API key in the request headers for authentication.
  • Indicate the Preferred Language of the response content in the parameter Accept-Language
  • The body must be sent in json format.
  • You must include attributes using their identifiers (not database names)
  • The prod_ref field is mandatory. You can include additional fields if they are already defined in your attribute structure
  • Multilanguage fields must be sent as JSON objects with each supported language as a key

Body Example

{
  "prod_ref": "PROD001",
  "prod_title": {
    "es": "Zapatillas Urbanas",
    "en": "Urban Sneakers"
  },
  "prod_stat": "V",
  "prod_description": {
    "es": "Calzado urbano para uso diario",
    "en": "Urban footwear for everyday use"
  },
  "prod_image": "zapatilla123.jpg",
  "cat_id": "5",
  "typ_id": "2"
}

📝Verify that the attribute supports multilanguage, and that languages ​​are enabled in the account

Conditions in multilingual fields

You can send attributes in multiple languages ​​as long as:

  • The field is configured as multilingual in the Attribute Set (typ_id)
  • Languages ​​are supported in your account

Common mistakes:

  • Unsupported language -> Response: 400 - Invalid language code
  • Field not multi-language -> Response: 400 - Attribute does not support multi-language