Skip to main content

Characteristic Endpoints

In the context of our API, a characteristic represents an entity that stores product particularities. A characteristic contains subsets, and these, in turn contain values.

Common Characteristic Characteristics​

  1. Unique Identification: Each Characteristic has a unique identifier id that distinguishes it from other characteristics in the system.

  2. Subsets and Values: Each Characteristic is made up of subsets. For example, the characteristic Size is made up of the subsets XS-XL and Shoe Sizes. In turn, the subsets store values. For example, for the subset XS-XL there is a value for each size within that range. We would have the values ​​XS, S, M, L and XL with an associated sequence number to control the order of these values.

  3. Status and Activity: There may be states that indicate whether the Characteristic is active, inactive, or temporarily suspended, depending on the business rules and policies of the platform.

  4. Type: Characteristics are grouped by generic types and we use the chType parameter which includes the id of the type and its value. For example, for the feature Size, the type is Fashion.

Endpoints​

GET/Characteristic/getCharacteristic​

Get all generic Characteristics stored in the system.

Description​

This endpoint retrieves a paginated list of generic system Characteristics. It allows clients to retrieve data based on pagination parameters such as page number (page) and number of items per page (pageSize). The list includes information about generic Characteristics only.

Parameters​
NameDescriptionTypeDefault Value
idCharacteristic IdString optionalid
pagePage numberInteger1
pageSizeNumber of items per pageInteger10
Responses​
JSON​
{
"data": [
{
"id": "string",
"idRemote": "string",
"chType": {
"id": "string",
"value": "string"
},
"name": "string",
"description": "string",
"isVariant": true,
"isMain": true,
"isSecondary": true,
"active": true
}
],
"pagination": {
"totalItems": 0,
"itemsPerPage": 0,
"currentPage": 0,
"totalPages": 0,
"nextPageUrl": "string"
}
}
XML​
<?xml version="1.0" encoding="UTF-8"?>
<export>
<data>
<item>
<id>string</id>
<idRemote>string</idRemote>
<chType>
<id>string</id>
<value>string</value>
</chType>
<name>string</name>
<description>string</description>
<isVariant>true</isVariant>
<isMain>true</isMain>
<isSecondary>true</isSecondary>
<active>true</active>
</item>
</data>
<pagination>
<totalItems>0</totalItems>
<itemsPerPage>0</itemsPerPage>
<currentPage>0</currentPage>
<totalPages>0</totalPages>
<nextPageUrl>string</nextPageUrl>
</pagination>
</export>

πŸ‘‰Try it out🌱

GET/Characteristic/getCharacteristicType​

Obtaining Types of Characteristics.

Description​

This endpoint retrieves a paginated list of system Characteristics types. It allows clients to get data about Characteristics types based on pagination parameters such as page number (page) and number of items per page (pageSize). The list includes details about each Characteristics types.

Parameters​
NameDescriptionTypeDefault Value
pagePage numberInteger1
pageSizeNumber of items per pageInteger10
Responses​
JSON​
{
"data": [
{
"id": "string",
"value": "string"
}
],
"pagination": {
"totalItems": 0,
"itemsPerPage": 0,
"currentPage": 0,
"totalPages": 0,
"nextPageUrl": "string"
}
}
XML​
<?xml version="1.0" encoding="UTF-8"?>
<export>
<data>
<item>
<id>string</id>
<value>string</value>
</item>
</data>
<pagination>
<totalItems>0</totalItems>
<itemsPerPage>0</itemsPerPage>
<currentPage>0</currentPage>
<totalPages>0</totalPages>
<nextPageUrl>string</nextPageUrl>
</pagination>
</export>

πŸ‘‰Prueba este endpoint🌱

GET/Characteristic/getCharWithSubset​

Get all generic Characteristics and their subsets stored in the system.

Description​

This endpoint retrieves a paginated list of Characteristics with system subsets. It allows clients to get data about characteristics and their subsets based on pagination parameters such as page number (page) and number of items per page (pageSize). The list includes details about each subset value associated with each Characteristic.

Parameters​
NameDescriptionTypeDefault Value
pagePage numberInteger1
pageSizeNumber of items per pageInteger10
Responses​
JSON​
{
"data": [
{
"id": "string",
"idRemote": "string",
"chType": {
"id": "string",
"value": "string"
},
"name": "string",
"description": "string",
"isVariant": true,
"isMain": true,
"isSecondary": true,
"active": true,
"subsets": [
{
"id": "string",
"idRemote": "string",
"name": "string",
"description": "string",
"values": [
{
"id": "string",
"idRemote": "string",
"sequence": "string",
"value": "string"
}
]
}
]
}
],
"pagination": {
"totalItems": 0,
"itemsPerPage": 0,
"currentPage": 0,
"totalPages": 0,
"nextPageUrl": "string"
}
}
XML​
<?xml version="1.0" encoding="UTF-8"?>
<export>
<data>
<item>
<id>string</id>
<idRemote>string</idRemote>
<chType>
<id>string</id>
<value>string</value>
</chType>
<name>string</name>
<description>string</description>
<isVariant>true</isVariant>
<isMain>true</isMain>
<isSecondary>true</isSecondary>
<active>true</active>
<subsets>
<item>
<id>string</id>
<idRemote>string</idRemote>
<name>string</name>
<description>string</description>
<values>
<item>
<id>string</id>
<idRemote>string</idRemote>
<sequence>string</sequence>
<value>string</value>
</item>
</values>
<item>
</subsets>
</item>
</data>
<pagination>
<totalItems>0</totalItems>
<itemsPerPage>0</itemsPerPage>
<currentPage>0</currentPage>
<totalPages>0</totalPages>
<nextPageUrl>string</nextPageUrl>
</pagination>
</export>

πŸ‘‰Try it out🌱

GET/Characteristic/getCharacteristic/Subset​

Get all generic Characteristics and their subsets stored in the system, focused on Subsets.

Description​

This endpoint retrieves a paginated list of subsets that are within the system's capabilities. It allows clients to obtain data for the subsets based on pagination parameters such as page number (page) and number of items per page (pageSize). The list provides detailed information about subsets and their values.

Parameters​
NameDescriptionTypeDefault Value
idSubset IdString optional1
pagePage numberInteger1
pageSizeNumber of items per pageInteger10
Responses​
JSON​
{
"data": [
{
"id": "string",
"idRemote": "string",
"characteristic": {
"id": "string",
"name": "string",
"description": "string"
},
"name": "string",
"description": "string",
"values": [
{
"id": "string",
"idRemote": "string",
"sequence": 0,
"value": "string"
}
]
}
],
"pagination": {
"totalItems": 0,
"itemsPerPage": 0,
"currentPage": 0,
"totalPages": 0,
"nextPageUrl": "string"
}
}
XML​
<?xml version="1.0" encoding="UTF-8"?>
<export>
<data>
<item>
<id>string</id>
<idRemote>string</idRemote>
<characteristic>
<id>string</id>
<name>string</name>
<description>string</description>
</characteristic>
<name>string</name>
<description>string</description>
<values>
<item>
<id>string</id>
<idRemote>string</idRemote>
<sequence>0</sequence>
<value>string</value>
</item>
</values>
</item>
</data>
<pagination>
<totalItems>0</totalItems>
<itemsPerPage>0</itemsPerPage>
<currentPage>0</currentPage>
<totalPages>0</totalPages>
<nextPageUrl>string</nextPageUrl>
</pagination>
</export>

πŸ‘‰Try it out🌱

POST/Characteristic/createCharacteristic​

Factors to consider​

To create a new Characteristic, you must take into account that the type of characteristic to which you want to associate through the characteristicTypeId parameter must exist in the system.

A Characteristic can be primary main or secondary secondary. For example, in footwear a primary characteristic would be Color and a secondary characteristic would be Size. Thus, once you have chosen the product by its color, you can select its size. If a characteristic is not a variant, it cannot be primary or secondary.

It is possible to add translations to Characteristics via the languages attribute. This attribute is optional, but if you decide to include it, you should keep in mind that its attributes (languageId and value) are mandatory. In the languageId attribute you can attach the id of the Language or the iso code.

πŸ‘‰Endpoints related to Languages🌱

Mandatory Parameters​
NameDescriptionType
idRemoteIdentifier of the CharacteristicString
nameName of the CharacteristicString
descriptionDescription of the CharacteristicString
activeIndicates whether the Characteristic is active or notBoolean
isVariantIndicates whether the new Characteristic is a variant or notBoolean
characteristicTypeIdIdentifier of the Characteristic Type associated with the new CharacteristicString
Mandatory Parameters​

The request body must follow the following schema:

[
{
"idRemote": "string",
"name": "string",
"description": "string",
"characteristicTypeId": "string",
"active": true,
"isMain": true,
"isSecondary": true,
"isVariant": true,
"languages": [
{
"languageId": "string",
"value": "string"
}
]
}
]

It is possible to add multiple characteristics through the same request by separating them with commas within the array in the request body.

πŸ‘‰Try it out🌱

POST/Characteristic/createSubCharacteristic​

Factors to consider​

In order to create a Subset and assign values ​​to it, it is crucial to ensure that the characteristic you want to associate the subset with via the characteristicId parameter exists in the system. πŸ‘‰Register Characteristic🌱


Subset values ​​assigned upon subset creation are created on the fly and do not need to reference existing fields. Additionally, it is possible to assign an order to these values ​​with the sequence parameter. If sequence is the default value, that is, sequence is 0, it is assigned a special sequential value calculated in multiples of 10. On the other hand, if there is a defined sequence, that assigned value is used directly.

When creating a new value attached to the new subset, you can add translations to it via the languages attribute. This attribute is optional, but if you decide to include it, you should keep in mind that its attributes (languageId and value) are mandatory. In the languageId attribute you can attach the id of the Language or the iso code. πŸ‘‰Endpoints related to Languages🌱

Mandatory Parameters​
NameDescriptionType
idRemoteIdentifier of the new SubsetString
nameName of the new SubsetString
characteristicIdIdentifier of the Characteristic related to the new SubsetString
Mandatory Parameters for Subset Values​

Using this endpoint, you can create Values for the new Subset. If you wish to add new values to the Subset, you must consider the following mandatory parameters:

NameDescriptionType
idRemoteIdentifier of the new SubsetString
valueName of the new Value to be assigned to the SubsetString
[
{
"idRemote": "string",
"name": "string",
"description": "string",
"characteristicId": "string",
"subsetValue": [
{
"idRemote": "string",
"value": "string",
"sequence": 0,
"languages": [
{
"languageId": "string",
"value": "string"
}
]
}
]
}
]

It is possible to add multiple subsets through the same request by separating them with commas within the array in the request body.

πŸ‘‰Try it out🌱

POST/Characteristic/createSubValueCharacteristic​

Factors to consider​

In order to create a Subset Value, it is crucial to ensure that the subset you want to associate the value with via the subsetId parameter exists in the system. πŸ‘‰Register Subset🌱

When assigning a new value or values ​​to a subset, you can attach translations for the new values ​​via the languages attribute. This attribute is optional, but if you choose to include it, you should keep in mind that its attributes (languageId and value) are mandatory. In the languageId attribute you can attach the Language id or the iso code. πŸ‘‰Language-related endpoints🌱

If you choose not to include the sequence attribute, the system will create a numerical sequence for the value or values ​​adding 10 by 10 starting from 0.

Required Parameters​
NameDescriptionType
idRemoteIdentifier of the new valueString
valueName of the new valueString
subsetIdIdentifier of the Subset to which the new value or values ​​are relatedString

The request body must follow this schema in JSON format:

[
{
"idRemote": "string",
"value": "string",
"sequence": 0,
"subsetId": "string",
"languages": [
{
"languageId": "string",
"value": "string"
}
]
}
]

It is possible to add multiple subset values through the same request by separating them with commas within the array in the request body.

πŸ‘‰Try it out🌱

PUT/Characteristic/updateCharacteristic/{id}​

Updating an existing characteristic: Using the PUT Method.​

In order to update a characteristic's attributes through this endpoint, it is necessary to attach the characteristic id in the request parameters and follow the JSON schema attached in this documentation. The id parameter can be either the idRemote or the local id stored in the B2B context.

Parameters​
NameDescriptionType
idCharacteristic identifierString required

It is not necessary to include the entire JSON structure, you only need to include the attributes you want to modify.


Request body​
{
"name": "string",
"description": "string",
"characteristicTypeId": "string",
"active": true,
"isMain": true,
"isSecondary": true,
"isVariant": true,
"languages": [
{
"languageId": "string",
"value": "string"
}
]
}

πŸ‘‰Try it out🌱

PUT/Characteristic/updateSubValueCharacteristic/{id}​

Updating an existing subset value of a characteristic: Using the PUT Method.​

In order to update a subset value of a characteristic's attributes, it is necessary to attach the characteristic id in the request parameters and follow the JSON schema attached in this documentation. The id parameter can be either the idRemote or the local id stored in the B2B context.

Parameters​
NameDescriptionType
idSubset value of Characteristics identifierString required
PUT Method details:​

The request body must follow the following scheme for the endpoint to perform the update operation successfully:

{
"value": "string",
"sequence": 0,
"languages": [
{
"languageId": "string",
"value": "string"
}
]
}

πŸ‘‰Try it out🌱

DELETE/Characteristic/deleteCharacteristic/{id}​

Removing Characteristics

Description​

This endpoint allows the deletion of Characteristics using their unique identifier, which can be either the B2B system's own id or the idRemote provided by you when registering the characteristic on our platform. Once deleted, the characteristic is recorded in the Deleted History.


⚠️A Characteristic cannot be deleted if it has values ​​related to any product.

Parameters​
NameDescriptionType
idCharacteristics identifierString required

πŸ‘‰Try it out🌱

DELETE/Characteristic/deleteSubCharacteristic/{id}​

Removing Subset of Characteristics

Description​

This endpoint allows the deletion of Subsets of Characteristics using their unique identifier, which can be either the B2B system's own id or the idRemote provided by you when registering the characteristic subsets on our platform. It is important to note that deleting a subset does not delete the corresponding Characteristic. The associated values with the deleted SubCharacteristic ​​are deleted on cascade. Once deleted, the subset is recorded in the Deleted History.


⚠️A Subset cannot be deleted if it has values ​​related to any product.

Parameters​
NameDescriptionType
idSubset of Characteristics identifierString required

πŸ‘‰Try it out🌱

DELETE/Characteristic/deleteSubValueCharacteristic/{id}​

Removing Subset Values

Description​

This endpoint allows the deletion of Subsets Value using their unique identifier, which can be either the B2B system's own id or the idRemote provided by you when registering the subset values on our platform. It is important to note that deleting a subset value does not delete the corresponding Subset. Once deleted, the subset is recorded in the Deleted History.

Parameters​
NameDescriptionType
idSubset value of Characteristics identifierString required

πŸ‘‰Try it out🌱

Possible Response Errors​

ErrorResponse StatusResponse Body
This error occurs when a connection to the database cannot be established. It is an internal server problem.500{"code": 500,"error": "Database connection failed."}
This error occurs when you cannot insert or update items into the database.500{"code": 500,"error": "Invalid connection name, you cannot insert in default"}
This error occurs when a parameter is missing.400{"code": 400,"error": "Parameter $parameter is required"}
This error occurs when you are not authorized.401{"code": 401,"error": "Unauthorized."}
This error occurs when the Characteristic could not be found.404{"code": 404,"error": "No entity found for Characteristic."}
This error occurs when you try to insert an Characteristic that already exists.409{"code": 409,"error": "Duplicate entry"}
This error occurs when you try to send too many requests in a short period of time.429{"code": 429,"error": "Too Many Requests"}