OBTÉN Y ACTUALIZA LOS DATOS DE TUS Productos
Obtener tus productos
Headers
Response 200
Json
{
"products": [
{
"web_id": "DWKCs8rvAp",
"title": "Product 001",
"description": "Product 001",
"quantity": 9,
"price": "2.0",
"active": true,
"deleted": false,
"url": null,
"sku": "FF55",
"images": [
"https://d3a4wxp51vazl1.cloudfront.net/uploads/4/product_attachment/DWKCs8rvAp/CK8Hm5oC91giYVsiNftoWFKV.jpg"
],
"subcategory": {
"name": "Platillos",
"web_id": "aor7cvTANo"
},
"category": {
"name": "Comida",
"web_id": "q9wvpT4C7W"
}
}
],
"total_pages": 1
}
Obtener un producto
Headers
Json
Api-Key: retailer_api_key
Response 200
Json
{
"web_id": "DWKCs8rvAp",
"title": "Product 001",
"description": "Product 001",
"quantity": 9,
"price": "2.0",
"active": true,
"deleted": false,
"url": null,
"sku": "FF55",
"images": [
"https://d3a4wxp51vazl1.cloudfront.net/uploads/4/product_attachment/DWKCs8rvAp/CK8Hm5oC91giYVsiNftoWFKV.jpg"
],
"subcategory": {
"web_id": "aor7cvTANo",
"name": "Platillos",
"description": "Platillos especiales",
"products_count": 93,
"active_products_count": 93
},
"category": {
"web_id": "q9wvpT4C7W",
"name": "Comida",
"description": "De comer",
"products_count": 233,
"active_products_count": 233
}
}
Crear un producto
Header
Json
Api-Key: retailer_api_key
Body
Json
{
"product":
{
"title": "Product 001",
"description": "Product 001",
"sku": "p001",
"quantity": 20,
"active": "true",
"image_urls": [ "https://res.cloudinary.com/favia/image/upload/v1657259416/qrGZwYdhfNDCqW3hv4MTiwFq.jpg" ],
"subcategory_id": "aor7cvTANo",
"price": 1.5
}
}
Response 201 - Created
Json
{
"message": "Producto actualizado con éxito",
"product": {
"web_id": "0afdqkaCaQ",
"title": "Product 002 updated",
"description": "Product 002 updated",
"quantity": 20,
"price": "1.5",
"active": true,
"deleted": false,
"url": null,
"sku": "p002",
"images": [
"https://d3a4wxp51vazl1.cloudfront.net/uploads/4/product_attachment/0afdqkaCaQ/qrGZwYdhfNDCqW3hv4MTiwFq.jpg",
"https://d3a4wxp51vazl1.cloudfront.net/uploads/4/product_attachment/0afdqkaCaQ/qrGZwYdhfNDCqW3hv4MTiwFq.jpg"
],
"subcategory": {
"name": "Platillos",
"web_id": "aor7cvTANo"
},
"category": {
"name": "Comida",
"web_id": "q9wvpT4C7W"
}
}
}
Actualizar un producto
Header
Json
Api-Key: retailer_api_key
Body:
Json
{
"product":
{
"title": "Product 002",
"description": "Product 002",
"sku": "p002",
"quantity": 20,
"active": "true",
"image_urls": [ "https://res.cloudinary.com/favia/image/upload/v1657259416/qrGZwYdhfNDCqW3hv4MTiwFq.jpg" ],
"subcategory_id": "aor7cvTANo",
"price": 1.5
}
}
Response 200
Json
{
"message": "Producto actualizado con éxito",
"product": {
"web_id": "0afdqkaCaQ",
"title": "Product 002 updated",
"description": "Product 002 updated",
"quantity": 20,
"price": "1.5",
"active": true,
"deleted": false,
"url": null,
"sku": "p002",
"images": [
"https://d3a4wxp51vazl1.cloudfront.net/uploads/4/product_attachment/0afdqkaCaQ/qrGZwYdhfNDCqW3hv4MTiwFq.jpg",
"https://d3a4wxp51vazl1.cloudfront.net/uploads/4/product_attachment/0afdqkaCaQ/qrGZwYdhfNDCqW3hv4MTiwFq.jpg"
],
"subcategory": {
"name": "Platillos",
"web_id": "aor7cvTANo"
},
"category": {
"name": "Comida",
"web_id": "q9wvpT4C7W"
}
}
}
Borrar un producto
Header
Json
Api-Key: retailer_api_key
Response 200
Json
{
"message": "Producto eliminado con éxito",
"product": {
"web_id": "0afdqkaCaQ",
"title": "Product 002 updated",
"description": "Product 002 updated",
"quantity": 20,
"price": "1.5",
"active": true,
"deleted": true,
"url": null,
"sku": "p002",
"images": [
"https://d3a4wxp51vazl1.cloudfront.net/uploads/4/product_attachment/0afdqkaCaQ/qrGZwYdhfNDCqW3hv4MTiwFq.jpg",
"https://d3a4wxp51vazl1.cloudfront.net/uploads/4/product_attachment/0afdqkaCaQ/qrGZwYdhfNDCqW3hv4MTiwFq.jpg"
],
"subcategory": {
"name": "Platillos",
"web_id": "aor7cvTANo"
},
"category": {
"name": "Comida",
"web_id": "q9wvpT4C7W"
}
}
}