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β
-
Unique Identification: Each Characteristic has a unique identifier
idthat distinguishes it from other characteristics in the system. -
Subsets and Values: Each Characteristic is made up of subsets. For example, the characteristic
Sizeis made up of the subsetsXS-XLandShoe Sizes. In turn, the subsets store values. For example, for the subsetXS-XLthere is a value for each size within that range. We would have the values ββXS,S,M,LandXLwith an associated sequence number to control the order of these values. -
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.
-
Type: Characteristics are grouped by generic types and we use the
chTypeparameter which includes theidof the type and itsvalue. For example, for the featureSize, the type isFashion.
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β
| Name | Description | Type | Default Value |
|---|---|---|---|
id | Characteristic Id | String optional | id |
page | Page number | Integer | 1 |
pageSize | Number of items per page | Integer | 10 |
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β
| Name | Description | Type | Default Value |
|---|---|---|---|
page | Page number | Integer | 1 |
pageSize | Number of items per page | Integer | 10 |
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β
| Name | Description | Type | Default Value |
|---|---|---|---|
page | Page number | Integer | 1 |
pageSize | Number of items per page | Integer | 10 |
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β
| Name | Description | Type | Default Value |
|---|---|---|---|
id | Subset Id | String optional | 1 |
page | Page number | Integer | 1 |
pageSize | Number of items per page | Integer | 10 |
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β
| Name | Description | Type |
|---|---|---|
idRemote | Identifier of the Characteristic | String |
name | Name of the Characteristic | String |
description | Description of the Characteristic | String |
active | Indicates whether the Characteristic is active or not | Boolean |
isVariant | Indicates whether the new Characteristic is a variant or not | Boolean |
characteristicTypeId | Identifier of the Characteristic Type associated with the new Characteristic | String |
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β
| Name | Description | Type |
|---|---|---|
idRemote | Identifier of the new Subset | String |
name | Name of the new Subset | String |
characteristicId | Identifier of the Characteristic related to the new Subset | String |
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:
| Name | Description | Type |
|---|---|---|
idRemote | Identifier of the new Subset | String |
value | Name of the new Value to be assigned to the Subset | String |
[
{
"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β
| Name | Description | Type |
|---|---|---|
idRemote | Identifier of the new value | String |
value | Name of the new value | String |
subsetId | Identifier of the Subset to which the new value or values ββare related | String |
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β
| Name | Description | Type |
|---|---|---|
id | Characteristic identifier | String 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β
| Name | Description | Type |
|---|---|---|
id | Subset value of Characteristics identifier | String 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β
| Name | Description | Type |
|---|---|---|
id | Characteristics identifier | String 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β
| Name | Description | Type |
|---|---|---|
id | Subset of Characteristics identifier | String 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β
| Name | Description | Type |
|---|---|---|
id | Subset value of Characteristics identifier | String required |
πTry it outπ±
Possible Response Errorsβ
| Error | Response Status | Response 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"} |