Skip to main content

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​

  1. Unique Identification: The Product entity has a unique identifier that distinguishes it from others and facilitates easy referencing. Additionally, it includes an idRemote field, which refers to the ID that may be stored in the client's ERP database.

  2. 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.

  3. 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.

  4. Company: It is necessary to have a company associated with each product.

  5. Rate: There must be a rate associated with each product by referencing the ProductRate entity.

  6. 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.

  7. 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.

  8. 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​
NameDescriptionTypeDefault Value
idProduct idString optionalid
pagePage numberInteger1
pageSizeNumber of items per pageInteger10
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​
NameDescriptionTypeDefault Value
pagePage numberInteger1
pageSizeNumber of items per pageInteger10
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​
NameDescriptionTypeDefault Value
idProduct IdString optionalid
pagePage numberInteger1
pageSizeNumber of items per pageInteger10
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​
NameDescriptionTypeDefault Value
idProduct IDString requiredid
pagePage numberInteger1
pageSizeNumber of items per pageInteger10
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​
NameDescriptionTypeDefault Value
idProduct identifierString requiredid
pagePage numberInteger1
pageSizeNumber of items per pageInteger10
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:​
  1. 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🌱

  2. 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 itemId parameter is not required. A generic product may or may not have an associated image. πŸ‘‰Register Item🌱

  3. 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 languages parameter is optional so we can create a product without including languages.

In the languageId parameter you can attach the id or the iso of 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:

NameDescriptionType
idRemoteIdentifier of the new Generic ProductString
companyIdIdentifier of the Company related to the new Generic ProductString
referenceReference of the new Generic ProductString
observationsObservations. Must be included in the body, but can be emptyString
blockedIndicates whether the Product is blocked or notString
activeIndicates whether the Product is active or notString

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:​
  1. 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🌱

  2. 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🌱

  3. 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🌱

  4. 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 languages parameter 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🌱

  5. 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🌱

  6. 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 items parameter is not required. A generic product may or may not have an associated image. It is possible to add multiple items by passing an itemId. πŸ‘‰Register Item🌱

  7. Creation of Season: You can attach a correct reference to a Season via the seasonId parameter, 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🌱

  8. 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 rate parameter 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 the idRemote, rateId, price and pvp parameters. πŸ‘‰Register Rate🌱

Mandatory Parameters​

You can create a product without including translations or images. However, you must consider the following mandatory parameters:

NameDescriptionType
idRemoteIdentifier of the new Variant ProductString
productGenericIdIdentifier of the Generic Product related to the new VariantString
referenceReference of the new Variant ProductString
warehousesWarehouses where the new Variant is availableArray
blockedIndicates whether the new Variant is blocked or notBoolean
characteristicsCharacteristics associated with the new Variant ProductArray
activeIndicates whether the Product is active or notBoolean
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:​
  1. 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🌱

  2. 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:

NameDescriptionType
productIdProduct Identifier related to the new Product RateString
rateIdRate Identifier related to the new Product RateString
pricePrice of the new Product RateString

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​
NameDescriptionType
productIdIdentifier 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​
NameDescriptionType
productIdIdentifier of the product you want to update.String
rateIdIdentifier 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​
NameDescriptionType
productIdProduct identifierString 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​
NameDescriptionType
productIdProduct identifierString required
rateIdProduct Rate identifierString

πŸ‘‰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​
NameDescriptionType
productIdProduct identifierString required
languageIdLanguage Id of the productString

πŸ‘‰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​
NameDescriptionType
productIdProduct identifierString required
warehouseIdWarehouse Id of the productString

πŸ‘‰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​
NameDescriptionType
productIdProduct identifierString required
itemIdItem Id of the productString

πŸ‘‰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 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"}