En Mercately, todo contacto proveniente de conversaciones, compras o creados directamente se clasifica como cliente.
Mercately Retailers API (1.0.0)
La plataforma para desarrolladores de Mercately, está creada para ayudar a todos nuestros clientes y empoderarlos para que crezcan mejor. Nuestras API están diseñadas para permitir que los equipos de cualquier forma o tamaño construyan integraciones y aprovechar al máximo Mercately. Todas las API de Mercately se construyen usando convenciones REST y están diseñadas para tener una estructura de URL predecible. U tilizan muchas funciones HTTP estándar, incluidos métodos (POST, GET, PUT, DELETE) y códigos de respuesta de error.
https://app.mercately.com/
https://mercately.shop/
- Shops API Production server
https://mercately.shop/api/v1/products
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://mercately.shop/api/v1/products?page=1' \
-H 'api-key: YOUR_API_KEY_HERE'
{ "products": [ { … } ], "total_pages": 4 }
Request
Crea un nuevo producto.
Envía máximo 3 opciones.
Ejemplo de options
:
"options": [
{ "name": "Talla", "values": ["SM", "LG", "XL", "MD"] },
{ "name": "Color", "values": ["Red", "Blue"] }
]
Para las variantes, combina los valores de las opciones.
Ejemplo de variants
:
"variants": [
{ "price": 12, "wholesale_price": 10, "sku": "VAR-001", "option1": "SM", "option2": "Red" },
{ "price": 14, "wholesale_price": 10, "sku": "VAR-002", "option1": "LG", "option2": "Red" },
{ "price": 25, "wholesale_price": 13, "sku": "VAR-003", "option1": "XL", "option2": "Blue" }
]
- Shops API Production server
https://mercately.shop/api/v1/products
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://mercately.shop/api/v1/products \
-H 'Content-Type: application/json' \
-H 'api-key: YOUR_API_KEY_HERE' \
-d '{
"product": {
"title": "string",
"description": "string",
"sku": "string",
"quantity": 0,
"active": true,
"price": 0,
"subcategory_id": "string",
"image_urls": [
"string"
],
"options": [
{
"name": "string",
"values": [
"string"
]
}
],
"variants": [
{
"price": 0,
"wholesale_price": 0,
"sku": "string",
"quantity": 0,
"image": "string",
"variant_url": "string",
"option1": "string",
"option2": "string",
"option3": "string"
}
]
}
}'
{ "message": "Producto creado con éxito", "product": { "web_id": "FzOWVvUwbC", "title": "Product 001", "description": "Product 001", "quantity": 20, "price": "1.5", "active": true, "url": null, "sku": "p004", "wholesale_price": "0.0", "images": [ … ], "subcategory": { … }, "category": { … }, "product_variants": [ … ], "product_variant_combinations": [ … ] } }
- Shops API Production server
https://mercately.shop/api/v1/products/:id_or_sku
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://mercately.shop/api/v1/products/:id_or_sku?web_id=string&sku=string' \
-H 'api-key: YOUR_API_KEY_HERE'
{ "web_id": "CRasFSldo7", "title": "Mensajes", "description": "Paquete de mensajes Outbound", "quantity": 13, "price": "200.0", "active": true, "url": null, "sku": "Col.2556", "wholesale_price": null, "images": [], "subcategory": { "web_id": "GETPvRKnBD", "name": "Alámbricos", "description": "", "products_count": 5, "active_products_count": 2 }, "category": { "web_id": "ljsJpi0fTR", "name": "Tecnología", "description": "", "products_count": 11, "active_products_count": 6 } }
Request
Actualiza un producto buscado su id
Envía máximo 3 opciones.
Ejemplo de options
:
"options": [
{ "name": "Talla", "values": ["SM", "LG", "XL", "MD"] },
{ "name": "Color", "values": ["Red", "Blue"] }
]
Para las variantes, combina los valores de las opciones.
Ejemplo de variants
:
"variants": [
{ "price": 12, "wholesale_price": 10, "sku": "VAR-001", "option1": "SM", "option2": "Red" },
{ "price": 14, "wholesale_price": 10, "sku": "VAR-002", "option1": "LG", "option2": "Red" },
{ "price": 25, "wholesale_price": 13, "sku": "VAR-003", "option1": "XL", "option2": "Blue" }
]
Para eliminar todas las opciones y variantes envía:
"options": [],
"variants": []
Si no deseas hacer cambios en opciones ni variantes, no envíes los keys "options"
ni "variants"
.
Si quieres hacer actualizaciones, envía "options"
y "variants"
con los cambios.
- Shops API Production server
https://mercately.shop/api/v1/product/web_id
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
https://mercately.shop/api/v1/product/web_id \
-H 'Content-Type: application/json' \
-H 'api-key: YOUR_API_KEY_HERE' \
-d '{
"product": {
"title": "string",
"description": "string",
"sku": "string",
"quantity": 0,
"active": true,
"price": 0,
"subcategory_id": "string",
"image_urls": [
"string"
],
"options": [
{
"name": "string",
"values": [
"string"
]
}
],
"variants": [
{
"price": 0,
"wholesale_price": 0,
"sku": "string",
"quantity": 0,
"image": "string",
"variant_url": "string",
"option1": "string",
"option2": "string",
"option3": "string"
}
]
}
}'
{ "message": "Producto actualizado con éxito", "product": { "web_id": "FzOWVvUwbC", "title": "Product 001", "description": "Product 001", "quantity": 20, "price": "1.5", "active": true, "url": null, "sku": "p004", "wholesale_price": "0.0", "images": [ … ], "subcategory": { … }, "category": { … }, "product_variants": [ … ], "product_variant_combinations": [ … ] } }
- Shops API Production server
https://mercately.shop/api/v1/product/web_id
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
https://mercately.shop/api/v1/product/web_id \
-H 'api-key: YOUR_API_KEY_HERE'
{ "message": "Producto eliminado con éxito", "product": { "web_id": "tUCJZrCUs5", "title": "Abrigo borrego", "description": "Abrigo crema con lana de borrego.\r\nTallas: XS, S, M, L, XL, XXL.", "quantity": 41, "price": "8.0", "active": true, "url": null, "sku": "AB.577", "wholesale_price": "6.0", "images": [ … ], "subcategory": { … }, "category": { … } } }