Contrato histórico: GET get-order-options
Contrato histórico de API. Esta página describe un contrato anterior. Los métodos, las rutas y las respuestas pueden diferir de la API vigente.
Significado histórico
Obtener opciones de pedido
Este endpoint de la API se utiliza para obtener el conjunto de datos de los carritos y los carritos activos actuales
API vigente
Para desarrollar una integración nueva, consulta la referencia o guía vigente enlazada.
Ver la referencia de la API vigenteParámetros
[
{
"name": "language",
"in": "path",
"schema": {
"type": "string",
"default": "en"
},
"required": true
},
{
"name": "project",
"in": "path",
"schema": {
"type": "string",
"default": "<redacted-personal>"
},
"required": true
},
{
"name": "api_version",
"in": "path",
"schema": {
"type": "string",
"default": "v400"
},
"required": true
},
{
"name": "params",
"in": "query",
"schema": {
"type": "string"
}
}
]
Cuerpo de solicitud
null
Respuestas
{
"200": {
"description": "200",
"content": {
"application/json": {
"examples": {
"Result": {
"value": "{\n \"error\": false,\n \"result\": {\n \"user_id\": 0,\n \"address_id\": 0,\n \"type\": 1,\n \"moment\": null,\n \"carts\": [\n {\n \"uuid\": \"<redacted-secret>\",\n \"user_id\": 0,\n \"status\": 0,\n \"business_id\": 0,\n \"driver_tip_rate\": 0,\n \"quantity\": 1,\n \"paymethod_data\": null,\n \"products\": [\n {\n \"id\": 1309,\n \"category_id\": 251,\n \"images\": \"https://example.com/ordering/image/upload/v1534195202/mtyyhn7wflkppxgyyhnx.jpg\",\n \"business_id\": 0,\n \"inventoried\": false,\n \"stock\": 0,\n \"name\": \"<redacted-personal>\",\n \"price\": 12,\n \"code\": \"fCUW6Zp484\",\n \"comment\": null,\n \"quantity\": 1,\n \"total\": 12,\n \"balance\": 1,\n \"valid_quantity\": true,\n \"ingredients\": {\n \"id:21\": {\n \"selected\": true,\n \"id\": 21,\n \"name\": \"<redacted-personal>\"\n },\n \"id:22\": {\n \"selected\": true,\n \"id\": 22,\n \"name\": \"<redacted-personal>\"\n },\n \"id:23\": {\n \"selected\": true,\n \"id\": 23,\n \"name\": \"<redacted-personal>\"\n },\n \"id:24\": {\n \"selected\": true,\n \"id\": 24,\n \"name\": \"<redacted-personal>\"\n }\n },\n \"options\": {\n \"id:54\": {\n \"id\": 54,\n \"name\": \"<redacted-personal>\",\n \"suboptions\": {\n \"id:175\": {\n \"id\": 175,\n \"name\": \"<redacted-personal>\",\n \"price\": 0,\n \"selected\": true,\n \"quantity\": 1,\n \"position\": \"whole\",\n \"total\": 0\n }\n },\n \"balance\": 1\n },\n \"id:55\": {\n \"id\": 55,\n \"name\": \"<redacted-personal>\",\n \"suboptions\": {\n \"id:177\": {\n \"id\": 177,\n \"name\": \"<redacted-personal>\",\n \"price\": 0,\n \"selected\": true,\n \"quantity\": 1,\n \"position\": \"whole\",\n \"total\": 0\n }\n },\n \"balance\": 1\n }\n },\n \"valid_menu\": true,\n \"valid\": true\n }\n ],\n \"business\": {\n \"name\": \"<redacted-personal>\",\n \"slug\": \"mcbonalds\",\n \"logo\": \"https://example.com/ordering/image/upload/v1534195165/o2mimlwnv0ib7ilkim65.jpg\",\n \"header\": \"https://example.com/ordering/image/upload/v1534195141/zdtztjdsxw3pw6pnsxeb.jpg\",\n \"service_fee\": 20,\n \"tax_type\": 1,\n \"tax\": 10,\n \"currency\": \"USD\"\n },\n \"subtotal\": 10.91,\n \"valid_address\": true,\n \"delivery_zone_id\": 65,\n \"delivery_price\": 4,\n \"minimum\": 0,\n \"valid_schedule\": true,\n \"valid_products\": true,\n \"valid\": true,\n \"discount\": 0,\n \"subtotal_with_discount\": 10.91,\n \"tax\": 1.09,\n \"subtotal_with_tax\": 12,\n \"service_fee\": 2.18,\n \"driver_tip\": 0,\n \"total\": 18.18\n }\n ],\n \"address\": {\n \"id\": 56,\n \"address\": \"<redacted-personal>\",\n \"location\": {\n \"lat\": 0,\n \"lng\": 0\n },\n \"address_notes\": null,\n \"internal_number\": null,\n \"zipcode\": null,\n \"map_data\": {\n \"library\": \"google\",\n \"place_id\": \"<redacted-secret>\"\n },\n \"tag\": \"other\"\n }\n }\n}"
}
},
"schema": {
"type": "object",
"properties": {
"error": {
"type": "boolean",
"example": false,
"default": true
},
"result": {
"type": "object",
"properties": {
"user_id": {
"type": "integer",
"example": 0,
"default": 0
},
"address_id": {
"type": "integer",
"example": 0,
"default": 0
},
"type": {
"type": "integer",
"example": 1,
"default": 0
},
"moment": {},
"carts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"uuid": {
"type": "string",
"example": "<redacted-secret>"
},
"user_id": {
"type": "integer",
"example": 0,
"default": 0
},
"status": {
"type": "integer",
"example": 0,
"default": 0
},
"business_id": {
"type": "integer",
"example": 0,
"default": 0
},
"driver_tip_rate": {
"type": "integer",
"example": 0,
"default": 0
},
"quantity": {
"type": "integer",
"example": 1,
"default": 0
},
"paymethod_data": {},
"products": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 1309,
"default": 0
},
"category_id": {
"type": "integer",
"example": 251,
"default": 0
},
"images": {
"type": "string",
"example": "https://example.com/ordering/image/upload/v1534195202/mtyyhn7wflkppxgyyhnx.jpg"
},
"business_id": {
"type": "integer",
"example": 0,
"default": 0
},
"inventoried": {
"type": "boolean",
"example": false,
"default": true
},
"stock": {
"type": "integer",
"example": 0,
"default": 0
},
"name": {
"type": "string",
"example": "<redacted-personal>"
},
"price": {
"type": "integer",
"example": 12,
"default": 0
},
"code": {
"type": "string",
"example": "fCUW6Zp484"
},
"comment": {},
"quantity": {
"type": "integer",
"example": 1,
"default": 0
},
"total": {
"type": "integer",
"example": 12,
"default": 0
},
"balance": {
"type": "integer",
"example": 1,
"default": 0
},
"valid_quantity": {
"type": "boolean",
"example": true,
"default": true
},
"ingredients": {
"type": "object",
"properties": {
"id:21": {
"type": "object",
"properties": {
"selected": {
"type": "boolean",
"example": true,
"default": true
},
"id": {
"type": "integer",
"example": 21,
"default": 0
},
"name": {
"type": "string",
"example": "<redacted-personal>"
}
}
},
"id:22": {
"type": "object",
"properties": {
"selected": {
"type": "boolean",
"example": true,
"default": true
},
"id": {
"type": "integer",
"example": 22,
"default": 0
},
"name": {
"type": "string",
"example": "<redacted-personal>"
}
}
},
"id:23": {
"type": "object",
"properties": {
"selected": {
"type": "boolean",
"example": true,
"default": true
},
"id": {
"type": "integer",
"example": 23,
"default": 0
},
"name": {
"type": "string",
"example": "<redacted-personal>"
}
}
},
"id:24": {
"type": "object",
"properties": {
"selected": {
"type": "boolean",
"example": true,
"default": true
},
"id": {
"type": "integer",
"example": 24,
"default": 0
},
"name": {
"type": "string",
"example": "<redacted-personal>"
}
}
}
}
},
"options": {
"type": "object",
"properties": {
"id:54": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 54,
"default": 0
},
"name": {
"type": "string",
"example": "<redacted-personal>"
},
"suboptions": {
"type": "object",
"properties": {
"id:175": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 175,
"default": 0
},
"name": {
"type": "string",
"example": "<redacted-personal>"
},
"price": {
"type": "integer",
"example": 0,
"default": 0
},
"selected": {
"type": "boolean",
"example": true,
"default": true
},
"quantity": {
"type": "integer",
"example": 1,
"default": 0
},
"position": {
"type": "string",
"example": "whole"
},
"total": {
"type": "integer",
"example": 0,
"default": 0
}
}
}
}
},
"balance": {
"type": "integer",
"example": 1,
"default": 0
}
}
},
"id:55": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 55,
"default": 0
},
"name": {
"type": "string",
"example": "<redacted-personal>"
},
"suboptions": {
"type": "object",
"properties": {
"id:177": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 177,
"default": 0
},
"name": {
"type": "string",
"example": "<redacted-personal>"
},
"price": {
"type": "integer",
"example": 0,
"default": 0
},
"selected": {
"type": "boolean",
"example": true,
"default": true
},
"quantity": {
"type": "integer",
"example": 1,
"default": 0
},
"position": {
"type": "string",
"example": "whole"
},
"total": {
"type": "integer",
"example": 0,
"default": 0
}
}
}
}
},
"balance": {
"type": "integer",
"example": 1,
"default": 0
}
}
}
}
},
"valid_menu": {
"type": "boolean",
"example": true,
"default": true
},
"valid": {
"type": "boolean",
"example": true,
"default": true
}
}
}
},
"business": {
"type": "object",
"properties": {
"name": {
"type": "string",
"example": "<redacted-personal>"
},
"slug": {
"type": "string",
"example": "mcbonalds"
},
"logo": {
"type": "string",
"example": "https://example.com/ordering/image/upload/v1534195165/o2mimlwnv0ib7ilkim65.jpg"
},
"header": {
"type": "string",
"example": "https://example.com/ordering/image/upload/v1534195141/zdtztjdsxw3pw6pnsxeb.jpg"
},
"service_fee": {
"type": "integer",
"example": 20,
"default": 0
},
"tax_type": {
"type": "integer",
"example": 1,
"default": 0
},
"tax": {
"type": "integer",
"example": 10,
"default": 0
},
"currency": {
"type": "string",
"example": "USD"
}
}
},
"subtotal": {
"type": "number",
"example": 10.91,
"default": 0
},
"valid_address": {
"type": "boolean",
"example": true,
"default": true
},
"delivery_zone_id": {
"type": "integer",
"example": 65,
"default": 0
},
"delivery_price": {
"type": "integer",
"example": 4,
"default": 0
},
"minimum": {
"type": "integer",
"example": 0,
"default": 0
},
"valid_schedule": {
"type": "boolean",
"example": true,
"default": true
},
"valid_products": {
"type": "boolean",
"example": true,
"default": true
},
"valid": {
"type": "boolean",
"example": true,
"default": true
},
"discount": {
"type": "integer",
"example": 0,
"default": 0
},
"subtotal_with_discount": {
"type": "number",
"example": 10.91,
"default": 0
},
"tax": {
"type": "number",
"example": 1.09,
"default": 0
},
"subtotal_with_tax": {
"type": "integer",
"example": 12,
"default": 0
},
"service_fee": {
"type": "number",
"example": 2.18,
"default": 0
},
"driver_tip": {
"type": "integer",
"example": 0,
"default": 0
},
"total": {
"type": "number",
"example": 18.18,
"default": 0
}
}
}
},
"address": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 56,
"default": 0
},
"address": {
"type": "string",
"example": "<redacted-personal>"
},
"location": {
"type": "object",
"properties": {
"lat": {
"type": "number",
"example": 0,
"default": 0
},
"lng": {
"type": "number",
"example": 0,
"default": 0
}
}
},
"address_notes": {},
"internal_number": {},
"zipcode": {},
"map_data": {
"type": "object",
"properties": {
"library": {
"type": "string",
"example": "google"
},
"place_id": {
"type": "string",
"example": "<redacted-secret>"
}
}
},
"tag": {
"type": "string",
"example": "other"
}
}
}
}
}
}
}
}
}
},
"400": {
"description": "400",
"content": {
"application/json": {
"examples": {
"Result": {
"value": "{}"
}
},
"schema": {
"type": "object",
"properties": {}
}
}
}
}
}