Custom Entities Overview
The Custom Entities resource provides information about tables that are not strictly product information and their relationships with other entities, such as Products, Variants. Using the metadata and endpoints described here, you can query, filter, and navigate through Custom Entities data efficiently.
NOTE: Custom Entities formerly called Sales Material
Metadata
The metadata is a JSON schema document that describes all resources within the Custom Entities entity and their relationships to other entities. This metadata can be used to construct queries for the API and to understand the structure of related entities.
Key Details about Metadata
- When requesting metadata for a table, you also receive metadata for its related tables (e.g.,).
- The metadata is essential for understanding which fields can be queried and expanded.
[GET] Custom Entities Metadata Endpoint
https://api2.saleslayer.com/rest/Catalog/CustomEntities/$metadata
Making a request
To make a request to our API, you will need to use the appropriate method (GET), endpoint URL and include the API key in the request headers for authentication.
Receiving a response
When you make a request to our API, you will receive a response in the form of a JSON object. This object will contain the data requested, as well as any relevant metadata such as status codes and error messages.
{
"value": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "/metadata/10650/CustomEntity('Clothing accessories')/1.0.0.0",
"type": "object",
"title": "CustomEntities('Clothing accessories')",
"description": "CustomEntities('Clothing accessories') context metadata definition",
"default": {
"culture": "es"
},
"properties": {
"acfk_id": {
"title": "acfk_id",
"type": "integer",
"minimum": 0,
"maximum": 18446744073709552000
},
"acfk_ref": {
"title": "Referencia",
"type": [
"string",
"null"
],
"x-custom-type": "reference"
},
"acfk_stat": {
"title": "Estatus",
"type": [
"string",
"null"
],
"enum": [
"V",
"I",
"D",
"R"
],
"default": "R"
},
"acfk_title": {
"title": "Nombre",
"type": "string"
},
"acfk_image": {
"title": "Imagen",
"type": "object",
"properties": {
"information": {
"type": "string"
},
"reference": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"Vd",
"Up",
"Ok",
"Re",
"Er",
"Dv"
]
},
"modifiedOn": {
"type": "string",
"format": "date-time"
}
},
"x-custom-type": "image_pack"
},
"acfk_modify": {
"title": "acfk_modify",
"type": [
"string",
"null"
],
"format": "date-time"
},
"acfk_creation": {
"title": "acfk_creation",
"type": [
"string",
"null"
],
"format": "date-time"
},
"acfk_tags": {
"title": "Etiquetas",
"type": [
"string",
"null"
]
},
"acfk_bundleproduct": {
"title": "Bundle-Product",
"type": [
"string",
"null"
],
"x-custom-type": "link_items"
}
},
"required": [
"acfk_title",
"acfk_id"
],
"x-storage-object-name": "mat_tabla_comercial_prueba",
"x-storage-object-identifier-attribute": "acfk_id",
"x-storage-object-status-attribute": "acfk_stat",
"x-storage-object-reference-attribute": "acfk_ref"
}
],
"readLink": {
"uri": "https://api2.saleslayer.com/rest/Catalog/CustomEntities/$metadata"
}
}
[GET] Metadata of a specific custom entity Endpoint
https://api2.saleslayer.com/rest/Catalog/CustomEntities('{customEntityDenominator}')/$metadata
Making a request
https://api2.saleslayer.com/rest/Catalog/CustomEntities('Ironing-products')/$metadata
Receiving a response
When you make a request to our API, you will receive a response in the form of a JSON object. This object will contain the data requested, as well as any relevant metadata such as status codes and error messages.
{
"value": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "/metadata/10650/CustomEntity('Ironing-products')/1.0.0.0",
"type": "object",
"title": "CustomEntities('Ironing-products')",
"description": "CustomEntities('Ironing-products') context metadata definition",
"default": {
"culture": "es"
},
"properties": {
"stwu_id": {
"title": "stwu_id",
"type": "integer",
"minimum": 0,
"maximum": 18446744073709552000
},
"stwu_ref": {
"title": "Referencia",
"type": [
"string",
"null"
],
"x-custom-type": "reference"
},
"stwu_stat": {
"title": "Estatus",
"type": [
"string",
"null"
],
"enum": [
"V",
"I",
"D",
"R"
],
"default": "R"
},
"stwu_title": {
"title": "Nombre",
"type": "string"
},
"stwu_image": {
"title": "Imagen",
"type": "object",
"properties": {
"information": {
"type": "string"
},
"reference": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"Vd",
"Up",
"Ok",
"Re",
"Er",
"Dv"
]
},
"modifiedOn": {
"type": "string",
"format": "date-time"
}
},
"x-custom-type": "image_pack"
},
"stwu_modify": {
"title": "stwu_modify",
"type": [
"string",
"null"
],
"format": "date-time"
},
"stwu_creation": {
"title": "stwu_creation",
"type": [
"string",
"null"
],
"format": "date-time"
},
"stwu_tags": {
"title": "Etiquetas",
"type": [
"string",
"null"
]
},
"stwu_bundleplanchado": {
"title": "Bundle-Planchado",
"type": [
"string",
"null"
],
"x-custom-type": "link_items"
}
},
"required": [
"stwu_title",
"stwu_id"
],
"x-storage-object-name": "mat_ironing_products",
"x-storage-object-identifier-attribute": "stwu_id",
"x-storage-object-status-attribute": "stwu_stat",
"x-storage-object-reference-attribute": "stwu_ref"
}
],
"readLink": {
"uri": "https://api2.saleslayer.com/rest/Catalog/CustomEntities('Ironing-products')/$metadata"
}
}
Querying Custom entities
To retrieve category data, use the Custom entities with the desired parameters.
[GET] A Custom entity resource Endpoint
https://api2.saleslayer.com/rest/Catalog/CustomEntities('{customEntityDenominator}')
Making a request
- Use the HTTP method: GET
- Include the API key in the request headers for authentication.
- Specify the fields to retrieve using the $select parameter
- Specify customEntityDenominator. The denominator is the natural language name under which the Custom Entity was created in the PIM
https://api2.saleslayer.com/rest/Catalog/CustomEntities('Ironing-products')?$select=stwu_id, stwu_bundleplanchado,stwu_tags
Receiving a response
When you make a request to our API, you will receive a response in the form of a JSON object. This object will contain the data requested, as well as any relevant metadata such as status codes and error messages.
{
"value": [
{
"stwu_id": 1,
"stwu_bundleplanchado": "42PM026320361",
"stwu_tags": "CamisaSeda"
},
{
"stwu_id": 2,
"stwu_bundleplanchado": "42PH201100693,42PM213705071",
"stwu_tags": "toda-tela"
}
],
"@count": 2,
"@readLink": "https://api2.saleslayer.com/rest/Catalog/CustomEntities('Ironing-products')?$select=stwu_id, stwu_bundleplanchado,stwu_tags"
}