¿Qué son los atributos personalizados de tus productos?
- Los atributos son características de los productos que dependen de la categoría a las que pertenecen y que son fijados individualmente por el vendedor según requerimiento de cada canal de venta.
- La función principal de los atributos personalizados es describir al consumidor propiedades adicionales del producto y a nivel técnico los atributos facilitan la conexión de tu catálogo de productos en cada canal de venta con Multivende.
- Puedes crear tus atributos personalizados a través de nuestra API, a continuación te mostramos los Endpoint disponibles y cómo puedes utilizarlos.
Lo primero que debes realizar es crear un conjunto de atributos personalizados asociados al Merchant, esto lo realizamos utilizando Create Custom Attribute Sets quien nos habilita un conjunto de atributos personalizados para el Merchant, por ejemplo: “Atributos de Mercadolibre”.
- Para crear un conjunto de atributos personalizados para productos, debes configurar la variable {{attribute_set_scope}} = productos.
- Para crear un conjunto de atributos personalizados para las versiones del producto, se debe configurar la variable {{attribute_set_scope}} = product_versions.
Un ejemplo de lo enviado es el siguiente:
curl --location -g '{{base_url}}/api/m/{{merchant_id}}/custom-attribute-sets/
{{attribute_set_scope}}' \
--header 'Authorization: Bearer {{access_token}}' \
--data '{
"name": "Atributos de Mercadolibre",
"description": "Productos custom para meli"
}'
En donde la API nos devolverá el siguiente mensaje indicando la creación del conjunto:
{
"_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"position": 0,
"status": "created",
"name": "Atributos de Mercadolibre",
"description": "Productos custom para meli",
"CreatedById": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"UpdatedById": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"MerchantId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"CustomAttributeScopeId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"updatedAt": "2022-02-15T19:04:14.000Z",
"createdAt": "2022-02-15T19:04:14.000Z"
}
Una vez creado el conjunto de atributos personalizados podemos realizar la actualización de estos, es por ellos que disponemos del Endpoint Update Custom Attribute Sets, para poder visualizar el conjunto de atributos personalizados a través de nuestra API consultar Get Custom Attribute Sets en donde enviaremos el MerchantId dentro del request.
Consultar Conjunto de atributos personalizados asociado al Merchant:
curl --location -g '{{base_url}}/api/m/{{merchant_id}}/custom-attribute-sets/
{{attribute_set_scope}}' \
--header 'Authorization: Bearer {{access_token}}'
Obteniendo el detalle correspondiente:
"entries": [
{
"_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx",
"name": "Atributos Dafiti - Versiones",
"code": null,
"description": null,
"position": 0,
"tags": null,
"status": "created",
"createdAt": "2021-08-02T19:14:00.000Z",
"updatedAt": "2021-08-02T19:33:46.000Z",
"MerchantId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx",
"CustomAttributeScopeId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx",
"CreatedById": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx",
"UpdatedById": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx",
"CustomAttributes": [
{
"_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx",
"name": "Material de la correa - version",
"code": "material_de_la_correa_version",
"description": null,
"position": 0,
"tags": null,
"status": "created",
"createdAt": "2021-08-02T19:30:21.000Z",
"updatedAt": "2021-08-02T19:37:23.000Z",
"MerchantId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx",
"CustomAttributeSetId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx",
"CustomAttributeScopeId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx",
"CustomAttributeTypeId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx",
"CustomAttributeSpecificityId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx",
"CreatedById": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx",
"UpdatedById": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx",
"CustomAttributeScope": {
"_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx",
"name": "CUSTOM_ATTRIBUTE_SCOPES.Scopes_product_versions.Name",
"code": "product_versions",
"description": "CUSTOM_ATTRIBUTE_SCOPES.Scopes_product_versions.Description",
"position": 1,
"tags": null,
"status": "created",
"createdAt": "2018-07-14T14:38:00.000Z",
"updatedAt": "2018-07-14T14:38:00.000Z"
},
"CustomAttributeType": {
"_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx",
"name": "CUSTOM_ATTRIBUTE_TYPES.Single_line_text.Name",
"code": "single_line_text",
"description": "CUSTOM_ATTRIBUTE_TYPES.Single_line_text.Description",
"position": 0,
"tags": null,
"status": "created",
"createdAt": "2018-01-14T18:23:56.000Z",
"updatedAt": "2018-01-14T18:23:56.000Z"
},
"CustomAttributeSpecificity": {
"_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx",
"name": "CUSTOM_ATTRIBUTE_SPECIFICITIES.Specificities_all.Name",
"code": "all",
"description": "CUSTOM_ATTRIBUTE_SPECIFICITIES.Specificities_all.Description",
"position": 0,
"tags": null,
"status": "created",
"createdAt": "2018-01-14T18:23:56.000Z",
"updatedAt": "2018-01-14T18:23:56.000Z"
},
"CustomAttributeOptions": []
}
]
},
Finalizada la creación del conjunto de atributos personalizados, podemos realizar la creación de un atributo personalizado.
Create Custom Attribute: Te permite crear un atributo personalizado en un conjunto de atributos personalizados.
curl --location -g '{{base_url}}/api/custom-attribute-sets/{{custom_attribute_set_id}}/custom-attributes' \
--header 'Authorization: Bearer {{access_token}}' \
--data '{
"code": "test_custom_att",
"CustomAttributeTypeId": "763c2831-b9af-462f-8974-d401f358949c",
"CustomAttributeSpecificityId": "7464869d-968b-46d4-85c5-0e349052c5c9",
"name": "test - custom att",
"description": "test custom",
"CustomAttributeOptions": [
{
"text": "Option 1",
"code": "option_1",
"status": "waiting-for-creation"
},
{
"text": "Option 2",
"code": "option_2",
"status": "waiting-for-creation"
},
{
"text": "Option 3",
"code": "option_3",
"status": "waiting-for-creation"
}
]
}'
- Update Custom Attribute: Enviando el {{custom_attributes_id}} podemos realizar la actualización del atributo personalizado.
- Get Custom Attributes Type: Lista los tipos de atributos personalizados que se pueden crear.
- Get Product Custom Attributes: Permite ver los detalles de un atributo personalizado, enviando dentro del request el {{custom_attributes_id}}.
Si tienes dudas sobre este tema contáctanos a través de api@multivende.com y estaremos felices de ayudarte.
Equipo Integraciones API Multivende