Product Endpoints
In the context of our API, a product represents a fundamental entity that interacts with the system. This product can be generic or variant. A generic product can have several variant products associated with it depending on its characteristics.
Common Product Characteristicsβ
-
Unique Identification: The Product entity has a unique identifier that distinguishes it from others and facilitates easy referencing. Additionally, it includes an
idRemotefield, which refers to the ID that may be stored in the client's ERP database. -
Product Data: Normally, a variant product has associated information such as the company, the generic product reference, observations, warehouses, season, characteristics and the subsets corresponding to each, the rate, images and other product details. If the product is generic, the product reference field will be null and will have no associated characteristics or warehouses.
-
Status and Activity: There may be states indicating whether the product is active, inactive, or temporarily suspended, depending on business rules and platform policies. Also, there is another status that indicates whether the product is generic or not.
-
Company: It is necessary to have a company associated with each product.
-
Rate: There must be a rate associated with each product by referencing the ProductRate entity.
-
Characteristic: You must have at least one characteristic and an associated subset value in order to create a variant product. Generic products have no characteristics.
-
Warehouse: Each variant product can be in one or more warehouses. With the warehouse information, the stock of these variants is also generated, which is initialized to zero.
-
Item: Each product can be associated with one or more items or images.
Importance in the APIβ
Our API provides specific endpoints to manage and manipulate generic products and variant products within the system. These endpoints enable operations such as creating products and product rates, updating, retrieval variant or generic products, and deletion of product information in a structured and secure manner.
Endpointsβ
GET/Product/getProductβ
Retrieve a paginated list of products from the system.
Descriptionβ
This endpoint retrieves a paginated list of products from the system. It allows clients to obtain product data based on pagination parameters such as page number (page) and number of items per page (pageSize). The response includes detailed information about each product, including its ID, associated company information, reference, sku, warehouses, whether it is generic or not, associated product (if it is variant), details of characteristics and the subsets corresponding to them, rate information and associated image information.
Parametersβ
| Name | Description | Type | Default Value |
|---|---|---|---|
id | Product id | String optional | id |
page | Page number | Integer | 1 |
pageSize | Number of items per page | Integer | 10 |
Responsesβ
JSONβ
{
"data": [
{
"id": "string",
"idRemote": "string",
"company": {
"id": "string",
"idRemote": "string",
"companyName": "string",
"commercialName": "string",
"tin": "string"
},
"productReference": "string",
"isGeneric": true,
"sku": "string",
"associateProduct": "string",
"observations": "string",
"warehouse": [
{
"id": "string",
"idRemote": "string",
"name": "string"
}
],
"blocked": true,
"characteristics": [
{
"characteristic": "string",
"value": "string"
}
],
"rate": [
{
"id": "string",
"rate": "string",
"price": 0,
"pvp": 0
}
],
"items": [
{
"id": "string",
"idRemote": "string",
"nameImage": "string",
"origin": "string",
"md5": "string"
}
],
"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>
<company>
<id>string</id>
<idRemote>string</idRemote>
<companyName>string</companyName>
<commercialName>string</commercialName>
<tin>string</tin>
</company>
<productReference>string</productReference>
<isGeneric>true</isGeneric>
<sku>string</sku>
<associateProduct>string</associateProduct>
<observations>string</observations>
<warehouse>
<item>
<id>string</id>
<idRemote>string</idRemote>
<name>string</name>
</item>
</warehouse>
<blocked>true</blocked>
<characteristics>
<item>
<characteristic>string</characteristic>
<value>string</value>
</item>
</characteristics>
<rate>
<item>
<id>string</id>
<rate>string</rate>
<price>0</price>
<pvp>0</pvp>
</item>
</rate>
<items>
<item>
<id>string</id>
<idRemote>string</idRemote>
<nameImage>string</nameImage>
<origin>string</origin>
<md5>string</md5>
</item>
</items>
<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/Product/getVariantProductβ
Retrieve a paginated list of variants products from the system.
Descriptionβ
This endpoint retrieves a paginated list of variants products from the system. It allows clients to obtain variant product data based on pagination parameters such as page number (page) and number of items per page (pageSize). The response includes detailed information about each product, including its ID, associated company information, reference, sku, warehouses, whether it is generic or not, associated product (if it is variant), details of characteristics and the subsets corresponding to them, rate information and associated image information.
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",
"company": {
"id": "string",
"idRemote": "string",
"companyName": "string",
"commercialName": "string",
"tin": "string"
},
"productReference": "string",
"isGeneric": true,
"sku": "string",
"associateProduct": "string",
"observations": "string",
"warehouse": [
{
"id": "string",
"idRemote": "string",
"name": "string"
}
],
"blocked": true,
"characteristics": [
{
"characteristic": "string",
"value": "string"
}
],
"rate": [
{
"id": "string",
"rate": "string",
"price": 0,
"pvp": 0
}
],
"items": [
{
"id": "string",
"idRemote": "string",
"nameImage": "string",
"origin": "string",
"md5": "string"
}
],
"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>
<company>
<id>string</id>
<idRemote>string</idRemote>
<companyName>string</companyName>
<commercialName>string</commercialName>
<tin>string</tin>
</company>
<productReference>string</productReference>
<isGeneric>true</isGeneric>
<sku>string</sku>
<associateProduct>string</associateProduct>
<observations>string</observations>
<warehouse>
<item>
<id>string</id>
<idRemote>string</idRemote>
<name>string</name>
</item>
</warehouse>
<blocked>true</blocked>
<characteristics>
<item>
<characteristic>string</characteristic>
<value>string</value>
</item>
</characteristics>
<rate>
<item>
<id>string</id>
<rate>string</rate>
<price>0</price>
<pvp>0</pvp>
</item>
</rate>
<items>
<item>
<id>string</id>
<idRemote>string</idRemote>
<nameImage>string</nameImage>
<origin>string</origin>
<md5>string</md5>
</item>
</items>
<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/Product/getGenericProductβ
Retrieve a paginated list of variants products from the system.
Descriptionβ
This endpoint retrieves a paginated list of generic products from the system. It allows clients to obtain variant product data based on pagination parameters such as page number (page) and number of items per page (pageSize). The response includes detailed information about each product, including its ID, associated company information, reference, sku, warehouses, whether it is generic or not, associated product (if it is variant), details of characteristics and the subsets corresponding to them, rate information and associated image information.
Parametersβ
| Name | Description | Type | Default Value |
|---|---|---|---|
id | Product Id | String optional | id |
page | Page number | Integer | 1 |
pageSize | Number of items per page | Integer | 10 |
Responsesβ
JSONβ
{
"data": [
{
"id": "string",
"idRemote": "string",
"company": {
"id": "string",
"idRemote": "string",
"companyName": "string",
"commercialName": "string",
"tin": "string"
},
"productReference": "string",
"isGeneric": true,
"sku": "string",
"associateProduct": "string",
"observations": "string",
"warehouse": [
{
"id": "string",
"idRemote": "string",
"name": "string"
}
],
"blocked": true,
"characteristics": [
{
"characteristic": "string",
"value": "string"
}
],
"rate": [
{
"id": "string",
"rate": "string",
"price": 0,
"pvp": 0
}
],
"items": [
{
"id": "string",
"idRemote": "string",
"nameImage": "string",
"origin": "string",
"md5": "string"
}
],
"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>
<company>
<id>string</id>
<idRemote>string</idRemote>
<companyName>string</companyName>
<commercialName>string</commercialName>
<tin>string</tin>
</company>
<productReference>string</productReference>
<isGeneric>true</isGeneric>
<sku>string</sku>
<associateProduct>string</associateProduct>
<observations>string</observations>
<warehouse>
<item>
<id>string</id>
<idRemote>string</idRemote>
<name>string</name>
</item>
</warehouse>
<blocked>true</blocked>
<characteristics>
<item>
<characteristic>string</characteristic>
<value>string</value>
</item>
</characteristics>
<rate>
<item>
<id>string</id>
<rate>string</rate>
<price>0</price>
<pvp>0</pvp>
</item>
</rate>
<items>
<item>
<id>string</id>
<idRemote>string</idRemote>
<nameImage>string</nameImage>
<origin>string</origin>
<md5>string</md5>
</item>
</items>
<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/Product/updatedFromβ
Retrieve products from a modification date
Descriptionβ
This endpoint retrieves a paginated list of system products, from a modification date using the date parameter. Allows customers to obtain product data based on pagination parameters such as page number (page) and number of items per page (pageSize). The response includes detailed information about each product, including its ID, associated company information, reference, sku, warehouses, whether it is generic or not, associated product (if it is variant), details of characteristics and the subsets corresponding to them, rate information and associated image information.
Parametersβ
| Name | Description | Type | Default Value |
|---|---|---|---|
id | Product ID | String required | id |
page | Page number | Integer | 1 |
pageSize | Number of items per page | Integer | 10 |
Responsesβ
JSONβ
{
"data": [
{
"id": "string",
"idRemote": "string",
"company": {
"id": "string",
"idRemote": "string",
"companyName": "string",
"commercialName": "string",
"tin": "string"
},
"productReference": "string",
"isGeneric": true,
"sku": "string",
"associateProduct": "string",
"observations": "string",
"warehouse": [
{
"id": "string",
"idRemote": "string",
"name": "string"
}
],
"blocked": true,
"characteristics": [
{
"characteristic": "string",
"value": "string"
}
],
"rate": [
{
"id": "string",
"rate": "string",
"price": 0,
"pvp": 0
}
],
"items": [
{
"id": "string",
"idRemote": "string",
"nameImage": "string",
"origin": "string",
"md5": "string"
}
],
"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>
<company>
<id>string</id>
<idRemote>string</idRemote>
<companyName>string</companyName>
<commercialName>string</commercialName>
<tin>string</tin>
</company>
<productReference>string</productReference>
<isGeneric>true</isGeneric>
<sku>string</sku>
<associateProduct>string</associateProduct>
<observations>string</observations>
<warehouse>
<item>
<id>string</id>
<idRemote>string</idRemote>
<name>string</name>
</item>
</warehouse>
<blocked>true</blocked>
<characteristics>
<item>
<characteristic>string</characteristic>
<value>string</value>
</item>
</characteristics>
<rate>
<item>
<id>string</id>
<rate>string</rate>
<price>0</price>
<pvp>0</pvp>
</item>
</rate>
<items>
<item>
<id>string</id>
<idRemote>string</idRemote>
<nameImage>string</nameImage>
<origin>string</origin>
<md5>string</md5>
</item>
</items>
<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/Product/getVariantProduct/byGenericId/{id}β
Retrieve a paginated list of variants products from the system given a generic product ID.
Descriptionβ
This endpoint retrieves a paginated list of variants products from the system given a generic product ID. It allows clients to obtain variant product data based on pagination parameters such as page number (page) and number of items per page (pageSize). The response includes detailed information about each product, including its ID, associated company information, reference, sku, warehouses, whether it is generic or not, associated product (if it is variant), details of characteristics and the subsets corresponding to them, rate information and associated image information.
Parametersβ
| Name | Description | Type | Default Value |
|---|---|---|---|
id | Product identifier | String required | id |
page | Page number | Integer | 1 |
pageSize | Number of items per page | Integer | 10 |
Responsesβ
JSONβ
{
"data": [
{
"id": "string",
"idRemote": "string",
"company": {
"id": "string",
"idRemote": "string",
"companyName": "string",
"commercialName": "string",
"tin": "string"
},
"productReference": "string",
"isGeneric": true,
"sku": "string",
"associateProduct": "string",
"observations": "string",
"warehouse": [
{
"id": "string",
"idRemote": "string",
"name": "string"
}
],
"blocked": true,
"characteristics": [
{
"characteristic": "string",
"value": "string"
}
],
"rate": [
{
"id": "string",
"rate": "string",
"price": 0,
"pvp": 0
}
],
"items": [
{
"id": "string",
"idRemote": "string",
"nameImage": "string",
"origin": "string",
"md5": "string"
}
],
"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>
<company>
<id>string</id>
<idRemote>string</idRemote>
<companyName>string</companyName>
<commercialName>string</commercialName>
<tin>string</tin>
</company>
<productReference>string</productReference>
<isGeneric>true</isGeneric>
<sku>string</sku>
<associateProduct>string</associateProduct>
<observations>string</observations>
<warehouse>
<item>
<id>string</id>
<idRemote>string</idRemote>
<name>string</name>
</item>
</warehouse>
<blocked>true</blocked>
<characteristics>
<item>
<characteristic>string</characteristic>
<value>string</value>
</item>
</characteristics>
<rate>
<item>
<id>string</id>
<rate>string</rate>
<price>0</price>
<pvp>0</pvp>
</item>
</rate>
<items>
<item>
<id>string</id>
<idRemote>string</idRemote>
<nameImage>string</nameImage>
<origin>string</origin>
<md5>string</md5>
</item>
</items>
<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π±
POST/Product/createGenericProductβ
Generic Product Registration in the API: Using the POST Methodβ
Currently, our POST method in the API exclusively handles JSON format. To effectively register product rates, it is crucial to follow a process that ensures data integrity and proper system functionality.
Registration Process:β
-
Creation of Company: Before registering a product, it is necessary to ensure that an associated Company exists. This is important since users can have multiple companies. πRegister Companyπ±
-
Creation of Item: Before associating an image with a product, you need to ensure that an associated element exists. This step is optional since the
itemIdparameter is not required. A generic product may or may not have an associated image. πRegister Itemπ± -
Include languages ββfor the product The new product may include language specifications. Language influences how products are translated in the B2B context. For the creation of the product with languages ββto be successful, you must attach a language already existing in the system, and provide the title and description in the corresponding language. For example, if you want to include translations in Spanish, you must select the corresponding id with the Spanish language and attach the title and description of the new product in Spanish. It is possible to add multiple translations of the new product at the time of execution of this endpoint. The
languagesparameter is optional so we can create a product without including languages.
In the
languageIdparameter you can attach theidor theisoof the Language that you want to relate to the new product, choosing the one that seems most convenient to you.
πView available languagesπ±
Mandatory Parametersβ
You can create a generic product without including translations or images. However, you must consider the following mandatory parameters:
| Name | Description | Type |
|---|---|---|
idRemote | Identifier of the new Generic Product | String |
companyId | Identifier of the Company related to the new Generic Product | String |
reference | Reference of the new Generic Product | String |
observations | Observations. Must be included in the body, but can be empty | String |
blocked | Indicates whether the Product is blocked or not | String |
active | Indicates whether the Product is active or not | String |
The body of the request must follow the following scheme:
[
{
"idRemote": "string",
"characteristicTypes": [
{
"id": "string"
}
],
"companyId": "string",
"reference": "string",
"observations": "string",
"blocked": true,
"languages": [
{
"languageId": "string",
"productTitle": "string",
"productDescription": "string"
}
],
"itemId": "string",
"active": true
}
]
It is possible to add multiple products through the same request by separating them with commas within the array in the body of the request.
Responsesβ
To avoid overloading the server, this endpoint sends a message to a consumer responsible for processing the request. To check the status of the submitted request, you need to access the URL provided in the response. A successfully sent message to the consumer should look like this:
{
"code": 201,
"message": "Generic Product message created successfully and dispatched to the queue.",
"statusUrl": "http://host/api/database/v1/message/status/66bf382938941"
}
The statusUrl field redirects us to a more detailed response about the request's status. A request successfully processed by the consumer will look like this:
{
"data": [
{
"status": "completed",
"errorMessage": null
}
],
"pagination": {
"totalItems": 1,
"itemsPerPage": 10,
"currentPage": 1,
"totalPages": 1,
"nextPageUrl": null
}
}
If any error occurs during message processing, the response will look something like this:
{
"code": 400,
"error": "Invalid generic product data format, a required parameter is missing"
}
πTry it outπ±
POST/Product/createVariantProductβ
Variant Product Registration in the API: Using the POST Methodβ
Currently, our POST method in the API exclusively handles JSON format. To effectively register product rates, it is crucial to follow a process that ensures data integrity and proper system functionality.
Registration Process:β
-
Creation of Generic Product: Before registering a variant product, you need to ensure that an associated Generic Product exists. This is important since a variant cannot exist if there is no generic. πRegister Productπ±
-
Creation of Characteristic: Before registering a product, you need to ensure that an associated characteristic exists. For product creation to be successful, you must attach a characteristic already existing in the system, and provide the corresponding subset value. πRegister Characteristicπ±
-
Creation of Characteristic Subset Value: Before registering a product, you need to ensure that an associated characteristic subset value exists. For product creation to be successful, you must attach a characteristic subset value already existing in the system, and provide its corresponding characteristic. πRegister Characteristic Subset Valueπ±
-
Include languages ββfor the product The new product may include language specifications. Language influences how products are translated in the B2B context. For the creation of the product with languages ββto be successful, you must attach a language already existing in the system, and provide the title and description in the corresponding language. For example, if you want to include translations in Spanish, you must select the corresponding id with the Spanish language and attach the title and description of the new product in Spanish. It is possible to add multiple translations of the new product at the time of execution of this endpoint. The
languagesparameter is optional so we can create a product without including languages. If we do not associate any language to the variant product, those of the generic product will be associated by default if it has one, otherwise it will not have associated languages. πView available languagesπ± -
Creation of Warehouse: In order to register a product we need to know which warehouse it is in. Thus, at the time the variant product is created, the stock corresponding to this product will also be created. In the Stock we relate the variant product to the warehouse in which it is located and the quantity starts at zero since the necessary modifications can then be made to the stock of each product. It is possible to add multiple stores by passing an
idRemote. πRegister Warehouseπ± -
Creation of Item: Before associating an image with a product, you need to ensure that an associated element exists. This step is optional since the
itemsparameter is not required. A generic product may or may not have an associated image. It is possible to add multiple items by passing anitemId. πRegister Itemπ± -
Creation of Season: You can attach a correct reference to a Season via the
seasonIdparameter, this parameter is optional. You can find information on how to obtain existing Seasons, or how to register a new Season in the system through this link. πRegister Seasonπ± -
Creation of Rate: Before associating a product rate with the variant product, you need to ensure that an associated rate exists. This step is optional since the
rateparameter is not required. A generic product may or may not have an associated product rate. It is possible to add multiple product rates by passing theidRemote,rateId,priceandpvpparameters. πRegister Rateπ±
Mandatory Parametersβ
You can create a product without including translations or images. However, you must consider the following mandatory parameters:
| Name | Description | Type |
|---|---|---|
idRemote | Identifier of the new Variant Product | String |
productGenericId | Identifier of the Generic Product related to the new Variant | String |
reference | Reference of the new Variant Product | String |
warehouses | Warehouses where the new Variant is available | Array |
blocked | Indicates whether the new Variant is blocked or not | Boolean |
characteristics | Characteristics associated with the new Variant Product | Array |
active | Indicates whether the Product is active or not | Boolean |
Mandatory Parameters for Warehousesβ
The warehouses attribute must include a list of idRemote identifiers of the warehouses where the new Variant will be available. The program will throw an exception if it does not find the identifier of the Warehouse included in the request.
Mandatory Parameters for Characteristicsβ
It is mandatory to assign characteristics to new variants. To ensure proper functionality, you must verify that the Subset related to the Value you want to add has the same Characteristic associated as the one you intend to add.
For example, if the Characteristic you want to associate with the new Product is color, the value you assign to the new Product must be an existing one for this characteristic.
Request Bodyβ
A request to create a variant with all its attributes should follow this schema:
[
{
"idRemote": "string",
"productGenericId": "string",
"reference": "string",
"observations": "string",
"sku": "string",
"seasonId": "string",
"blocked": true,
"warehouses": [
{
"idRemote": "string"
}
],
"characteristics": [
{
"characteristicId": "string",
"subsetValueId": "string"
}
],
"rates": [
{
"rateId": "string",
"price": "string",
"pvp": "string",
"pvpr": "string"
}
],
"languages": [
{
"languageId": "string",
"productTitle": "string",
"productDescription": "string"
}
],
"items": [
{
"itemId": "string"
}
],
"active": true
}
]
It is possible to add multiple products through the same request by separating them with commas within the array in the body of the request.
Responsesβ
To avoid overloading the server, this endpoint sends a message to a consumer responsible for processing the request. To check the status of the submitted request, you need to access the URL provided in the response. A successfully sent message to the consumer should look like this:
{
"code": 201,
"message": "Variant Product message created successfully and dispatched to the queue.",
"statusUrl": "http://host/api/database/v1/message/status/66bf382938941"
}
The statusUrl field redirects us to a more detailed response about the request's status. A request successfully processed by the consumer will look like this:
{
"data": [
{
"status": "completed",
"errorMessage": null
}
],
"pagination": {
"totalItems": 1,
"itemsPerPage": 10,
"currentPage": 1,
"totalPages": 1,
"nextPageUrl": null
}
}
If any error occurs during message processing, the response will look something like this:
{
"code": 400,
"error": "Invalid variant product data format, a required parameter is missing"
}
πTry it outπ±
POST/Product/createProductRateβ
Product Rate Registration in the API: Using the POST Methodβ
Currently, our POST method in the API exclusively handles JSON format. To effectively register product rates, it is crucial to follow a process that ensures data integrity and proper system functionality.
Registration Process:β
-
Creation of Product: Before registering a product rate, you need to ensure that an associated product exists. This step is essential since if we do not have a product we cannot carry out this action. πRegister Productπ±
-
Creation of Rate: Before registering a product rate, you need to ensure that an associated rate exists. This step is essential since if we do not have a rate we cannot carry out this action. πRegister Rateπ±
Details of the POST Method:β
When using the POST method to register product rates, structured data must be provided in JSON format that includes crucial information such as the associated product id, associated rate id, and price. The process ensures that each product rate has a unique identity and is properly configured to interact with the platform securely and efficiently. The idRemote field provided when creating a new entity corresponds to the idRemote that the user wants to give it and the system will automatically create a local id.
Mandatory parameters.β
You can create a product rate without including pvp or pvpr. However, you must take into account the following mandatory parameters:
| Name | Description | Type |
|---|---|---|
productId | Product Identifier related to the new Product Rate | String |
rateId | Rate Identifier related to the new Product Rate | String |
price | Price of the new Product Rate | String |
The request body must follow the following scheme:
[
{
"productId": "string",
"rateId": "string",
"price": "string",
"pvp": "string",
"pvpr": "string"
}
]
It is possible to add multiple product rate through the same request by separating them with commas within the array in the body of the request.
Responsesβ
To avoid overloading the server, this endpoint sends a message to a consumer responsible for processing the request. To check the status of the submitted request, you need to access the URL provided in the response. A successfully sent message to the consumer should look like this:
{
"code": 201,
"message": "ProductRate message created successfully and dispatched to the queue.",
"statusUrl": "http://host/api/database/v1/message/status/66bf382938941"
}
The statusUrl field redirects us to a more detailed response about the request's status. A request successfully processed by the consumer will look like this:
{
"data": [
{
"status": "completed",
"errorMessage": null
}
],
"pagination": {
"totalItems": 1,
"itemsPerPage": 10,
"currentPage": 1,
"totalPages": 1,
"nextPageUrl": null
}
}
If any error occurs during message processing, the response will look something like this:
{
"code": 400,
"error": "Invalid product rate data format, a required parameter is missing"
}
πTry it outπ±
PUT/Product/updateGenericProductβ
Descriptionβ
This endpoint allows updating multiple Generic Products in a single operation as a list. It is mandatory to include the productId of each product you want to update in every object within the list.
Mandatory Parametersβ
| Name | Description | Type |
|---|---|---|
productId | Identifier of the product you want to update. | String |
The languages attribute allows you to update or add new languages ββto the associated product.
Request Bodyβ
The request body must follow the schema below in JSON format:
[
{
"productId": "string",
"companyId": "string",
"languages": [
{
"languageId": "string",
"productTitle": "string",
"productDescription": "string"
}
],
"blocked": true,
"reference": "string",
"observations": "string",
"itemId": "string",
"active": true
}
]
Responsesβ
This endpoint works through the message consumer. A successful response should look like this:
{
"code": 201,
"message": "GenericProduct message created successfully and dispatched to the queue.",
"statusUrl": "http://host/api/database/v1/message/status/66bf382938941"
}
The statusUrl field redirects us to a more detailed response about the status of the request. A request successfully processed by the consumer looks like this:
{
"data": [
{
"status": "completed",
"errorMessage": null
}
],
"pagination": {
"totalItems": 1,
"itemsPerPage": 10,
"currentPage": 1,
"totalPages": 1,
"nextPageUrl": null
}
}
If any error occurs during message processing, the response will look something like this:
{
"code": 400,
"error": "Invalid GenericProduct format, a required parameter is missing"
}
πTry this endpointπ±
PUT/Product/updateVariantProductβ
Descriptionβ
This endpoint allows updating multiple Product Variants in a single operation as a list. It is mandatory to include the productId of each product you want to update in every object within the list.
If you want to update any of the attributes related to the Product, such as rates, warehouses, items, or characteristics, you must take into account that all their parameters are mandatory. The languages attribute allows you to update or add new languages ββto the associated product.
Request Bodyβ
The request body must follow the schema below in JSON format:
[
{
"productId": "string",
"sku": "string",
"seasonId": "string",
"warehouses": [
{
"idRemote": "string"
}
],
"characteristics": [
{
"characteristicId": "string",
"subsetValueId": "string"
}
],
"rates": [
{
"rateId": "string",
"price": 0,
"pvp": 0,
"pvpr": 0
}
],
"items": [
{
"itemId": "string"
}
],
"languages": [
{
"languageId": "string",
"productTitle": "string",
"productDescription": "string"
}
],
"active": true
}
]
Responsesβ
This endpoint works through the message consumer. A successful response should look like this:
{
"code": 201,
"message": "VariantProduct message created successfully and dispatched to the queue.",
"statusUrl": "http://host/api/database/v1/message/status/66bf382938941"
}
The statusUrl field redirects us to a more detailed response about the status of the request. A request successfully processed by the consumer looks like this:
{
"data": [
{
"status": "completed",
"errorMessage": null
}
],
"pagination": {
"totalItems": 1,
"itemsPerPage": 10,
"currentPage": 1,
"totalPages": 1,
"nextPageUrl": null
}
}
If any error occurs during message processing, the response will look something like this:
{
"code": 400,
"error": "Invalid VariantProduct format, a required parameter is missing"
}
πTry this endpointπ±
PUT/Product/updateProductRateβ
Descriptionβ
This endpoint allows updating multiple Rates associated with products in a single operation. To do this, you can assign a product to a different rate in each object of the request body. It is imperative that the Product and the Rate exist in the system, and that a prior relationship between the two exists.
Required Parametersβ
| Name | Description | Type |
|---|---|---|
productId | Identifier of the product you want to update. | String |
rateId | Identifier of the Rate associated with the Product you want to update. | String |
It is mandatory to include at least one of the parameters price and pvp. This allows you to update the price without modifying the pvp and vice versa.
Cuerpo de la solicitudβ
El cuerpo de la solicitud debe seguir el siguiente esquema en formato JSON:
[
{
"productId": "string",
"rateId": "string",
"price": "string",
"pvp": "string",
"pvpr": "string"
}
]
Responsesβ
This endpoint works through the message consumer. A successful response should look like this:
{
"code": 201,
"message": "ProductRate message created successfully and dispatched to the queue.",
"statusUrl": "http://host/api/database/v1/message/status/66bf382938941"
}
The statusUrl field redirects us to a more detailed response about the status of the request. A request successfully processed by the consumer looks like this:
{
"data": [
{
"status": "completed",
"errorMessage": null
}
],
"pagination": {
"totalItems": 1,
"itemsPerPage": 10,
"currentPage": 1,
"totalPages": 1,
"nextPageUrl": null
}
}
If any error occurs during message processing, the response will look something like this:
{
"code": 400,
"error": "Invalid ProductVariant format, a required parameter is missing"
}
πPrueba este endopintπ±
DELETE/Product/delete/{productId}β
Removing Product.
Descriptionβ
This endpoint allows the deletion of products using their unique identifier. This productId field can be either the identifier generated by the B2B database or the idRemote you provide when registering products. This approach ensures secure and flexible management of products within our platform. Once deleted, the Product is recorded in the Deleted History.
β οΈA Product that has an associated Product Rate cannot be deleted.
Parametersβ
| Name | Description | Type |
|---|---|---|
productId | Product identifier | String required |
πTry it outπ±
DELETE/Product/ProductRate/{productId}β
Removing Product Rate.
Descriptionβ
This endpoint allows the removal of product rates using their unique identifier. It is important to note that when you delete a product rate, the corresponding Rate is also deleted. Once deleted, the Product Rate is recorded in the Deleted History.
Parametersβ
| Name | Description | Type |
|---|---|---|
productId | Product identifier | String required |
rateId | Product Rate identifier | String |
πTry it outπ±
DELETE/Product/ProductLanguage/{productId}β
Removing Product Rate.
Descriptionβ
This endpoint allows the removal of product rates using their unique identifier. It is important to note that when you delete a product rate, the corresponding Rate is also deleted. Once deleted, the Product Rate is recorded in the Deleted History.
Parametersβ
| Name | Description | Type |
|---|---|---|
productId | Product identifier | String required |
languageId | Language Id of the product | String |
πTry it outπ±
DELETE/Product/ProductWarehouse/{productId}β
Removing Product Rate.
Descriptionβ
This endpoint allows the removal of product rates using their unique identifier. It is important to note that when you delete a product rate, the corresponding Rate is also deleted. Once deleted, the Product Rate is recorded in the Deleted History.
Parametersβ
| Name | Description | Type |
|---|---|---|
productId | Product identifier | String required |
warehouseId | Warehouse Id of the product | String |
πTry it outπ±
DELETE/Product/ProductItems/{productId}β
Removing Product Rate.
Descriptionβ
This endpoint allows the removal of product rates using their unique identifier. It is important to note that when you delete a product rate, the corresponding Rate is also deleted. Once deleted, the Product Rate is recorded in the Deleted History.
Parametersβ
| Name | Description | Type |
|---|---|---|
productId | Product identifier | String required |
itemId | Item Id of the product | String |
π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 Product could not be found. | 404 | {"code": 404,"error": "No entity found for Product with $id."} |
| This error occurs when you try to insert a Product 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"} |