Historical contract: Edit Cart
Historical API contract. This page describes an earlier API contract. Methods, paths, and responses may differ from the current API.
Historical meaning
Edit Cart
This API endpoint is to Edit the cart fields
Current API
For new integrations, use the linked current API reference or guide.
View the current API referenceParameters
[
{
"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": "cart_id",
"in": "path",
"schema": {
"type": "string",
"default": "<redacted-secret>"
},
"required": true
}
]
Request body
{
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"business_id": {
"type": "integer",
"default": 0,
"format": "int32"
},
"delivery_option_id": {
"type": "integer",
"format": "int32"
},
"comment": {
"type": "string"
},
"user_id": {
"type": "string",
"description": "Owner of the cart (use this param when retrieving data as admin)"
},
"use_wallet": {
"type": "boolean"
},
"order_option_id": {
"type": "string"
}
}
}
}
}
}
Responses
{
"200": {
"description": "200",
"content": {
"application/json": {
"examples": {
"Result": {
"value": "{\n \"error\": false,\n \"result\": {\n \"uuid\": \"<redacted-secret>\",\n \"user_id\": 0,\n \"status\": 0,\n \"business_id\": 0,\n \"comment\": null,\n \"driver_tip_rate\": 0,\n \"paymethod_id\": null,\n \"driver_tip\": 0,\n \"quantity\": 6,\n \"pay_reference\": null,\n \"paymethod_data\": null,\n \"place_id\": null,\n \"delivery_option_id\": null,\n \"products\": [\n {\n \"id\": 820,\n \"category_id\": 154,\n \"images\": \"https://example.com/ordering2/image/upload/v1613424590/skh7yefgnxwhqbcbfrq7.png\",\n \"business_id\": 0,\n \"inventoried\": false,\n \"stock\": 0,\n \"name\": \"<redacted-personal>\",\n \"price\": 2.99,\n \"in_offer\": false,\n \"offer_price\": null,\n \"estimated_person\": null,\n \"barcode\": null,\n \"barcode_alternative\": null,\n \"code\": \"dACCLjT9wH\",\n \"comment\": null,\n \"quantity\": 3,\n \"total\": 8.97,\n \"status\": 0,\n \"priority\": 0,\n \"tax\": {\n \"id\": null,\n \"name\": \"<redacted-personal>\",\n \"description\": \"General tax\",\n \"rate\": 1,\n \"type\": 2\n },\n \"fee\": {\n \"id\": null,\n \"name\": \"<redacted-personal>\",\n \"description\": \"General service fee\",\n \"fixed\": 0,\n \"percentage\": 1\n },\n \"balance\": 3,\n \"valid_quantity\": true,\n \"ingredients\": {},\n \"options\": {},\n \"summary\": {\n \"total\": 9.15,\n \"subtotal\": 8.97,\n \"subtotal_with_discount\": 8.97,\n \"tax\": 0.09,\n \"tax_after_discount\": 0.09,\n \"fee_fixed\": 0,\n \"fee_percentage\": 0.09,\n \"fee_percentage_after_discount\": 0.09,\n \"discount\": 0\n },\n \"valid_menu\": true,\n \"valid\": true,\n \"offer_rate\": 0,\n \"offer_rate_type\": 1,\n \"offer_include_options\": true\n },\n {\n \"id\": 807,\n \"category_id\": 154,\n \"images\": \"https://example.com/ordering2/image/upload/v1613424633/bao5vo8vbiepnsm0q3p4.png\",\n \"business_id\": 0,\n \"inventoried\": false,\n \"stock\": 0,\n \"name\": \"<redacted-personal>\",\n \"price\": 3,\n \"in_offer\": false,\n \"offer_price\": null,\n \"estimated_person\": null,\n \"barcode\": null,\n \"barcode_alternative\": null,\n \"code\": \"Avr01DQ0Qq\",\n \"comment\": null,\n \"quantity\": 3,\n \"total\": 9,\n \"status\": 0,\n \"priority\": 0,\n \"tax\": {\n \"id\": null,\n \"name\": \"<redacted-personal>\",\n \"description\": \"General tax\",\n \"rate\": 1,\n \"type\": 2\n },\n \"fee\": {\n \"id\": null,\n \"name\": \"<redacted-personal>\",\n \"description\": \"General service fee\",\n \"fixed\": 0,\n \"percentage\": 1\n },\n \"balance\": 3,\n \"valid_quantity\": true,\n \"ingredients\": {},\n \"options\": {},\n \"summary\": {\n \"total\": 9.18,\n \"subtotal\": 9,\n \"subtotal_with_discount\": 9,\n \"tax\": 0.09,\n \"tax_after_discount\": 0.09,\n \"fee_fixed\": 0,\n \"fee_percentage\": 0.09,\n \"fee_percentage_after_discount\": 0.09,\n \"discount\": 0\n },\n \"valid_menu\": true,\n \"valid\": true,\n \"offer_rate\": 0,\n \"offer_rate_type\": 1,\n \"offer_include_options\": true\n }\n ],\n \"business\": {\n \"name\": \"<redacted-personal>\",\n \"slug\": \"honeyfoodsmarket\",\n \"logo\": \"https://example.com/ordering-images2/res/ordering/image/upload/m399dpg7zbhn1jqucuge/1534196596.jpg\",\n \"header\": \"https://example.com/ordering2/image/upload/v1612896237/snkvvfkd6ktliqvqslv2.jpg\",\n \"service_fee\": 1,\n \"tax_type\": 2,\n \"tax\": 1,\n \"currency\": \"USD\",\n \"delivery_time\": \"1:0\",\n \"pickup_time\": \"1:5\"\n },\n \"metafields\": [],\n \"place\": null,\n \"subtotal\": 17.97,\n \"valid_address\": true,\n \"delivery_zone_id\": null,\n \"delivery_price\": 0,\n \"minimum\": 0,\n \"valid_minimum\": true,\n \"valid_maximum\": true,\n \"maximum\": null,\n \"valid_schedule\": true,\n \"valid_products\": true,\n \"valid\": true,\n \"tax\": 0.18,\n \"tax_with_discount\": 0.18,\n \"service_fee\": 0.18,\n \"service_fee_with_discount\": 0.18,\n \"subtotal_to_calculate\": 17.97,\n \"subtotal_with_discount\": 17.97,\n \"delivery_price_with_discount\": 0,\n \"discount\": 0,\n \"offers\": [],\n \"taxes\": [\n {\n \"id\": null,\n \"name\": \"<redacted-personal>\",\n \"description\": \"General tax\",\n \"rate\": 1,\n \"type\": 2,\n \"summary\": {\n \"tax\": 0.18,\n \"tax_after_discount\": 0.18\n }\n }\n ],\n \"tax_rate\": 1,\n \"fees\": [\n {\n \"id\": null,\n \"name\": \"<redacted-personal>\",\n \"description\": \"General service fee\",\n \"fixed\": 0,\n \"percentage\": 1,\n \"summary\": {\n \"fixed\": 0,\n \"percentage\": 0.18,\n \"percentage_after_discount\": 0.18\n }\n }\n ],\n \"service_fee_rate\": 1,\n \"tax_after_discount\": 0.18,\n \"total\": 18.33\n }\n}"
}
},
"schema": {
"type": "object",
"properties": {
"error": {
"type": "boolean",
"example": false,
"default": true
},
"result": {
"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
},
"comment": {},
"driver_tip_rate": {
"type": "integer",
"example": 0,
"default": 0
},
"paymethod_id": {},
"driver_tip": {
"type": "integer",
"example": 0,
"default": 0
},
"quantity": {
"type": "integer",
"example": 6,
"default": 0
},
"pay_reference": {},
"paymethod_data": {},
"place_id": {},
"delivery_option_id": {},
"products": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 820,
"default": 0
},
"category_id": {
"type": "integer",
"example": 154,
"default": 0
},
"images": {
"type": "string",
"example": "https://example.com/ordering2/image/upload/v1613424590/skh7yefgnxwhqbcbfrq7.png"
},
"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": "number",
"example": 2.99,
"default": 0
},
"in_offer": {
"type": "boolean",
"example": false,
"default": true
},
"offer_price": {},
"estimated_person": {},
"barcode": {},
"barcode_alternative": {},
"code": {
"type": "string",
"example": "dACCLjT9wH"
},
"comment": {},
"quantity": {
"type": "integer",
"example": 3,
"default": 0
},
"total": {
"type": "number",
"example": 8.97,
"default": 0
},
"status": {
"type": "integer",
"example": 0,
"default": 0
},
"priority": {
"type": "integer",
"example": 0,
"default": 0
},
"tax": {
"type": "object",
"properties": {
"id": {},
"name": {
"type": "string",
"example": "<redacted-personal>"
},
"description": {
"type": "string",
"example": "General tax"
},
"rate": {
"type": "integer",
"example": 1,
"default": 0
},
"type": {
"type": "integer",
"example": 2,
"default": 0
}
}
},
"fee": {
"type": "object",
"properties": {
"id": {},
"name": {
"type": "string",
"example": "<redacted-personal>"
},
"description": {
"type": "string",
"example": "General service fee"
},
"fixed": {
"type": "integer",
"example": 0,
"default": 0
},
"percentage": {
"type": "integer",
"example": 1,
"default": 0
}
}
},
"balance": {
"type": "integer",
"example": 3,
"default": 0
},
"valid_quantity": {
"type": "boolean",
"example": true,
"default": true
},
"ingredients": {
"type": "object",
"properties": {}
},
"options": {
"type": "object",
"properties": {}
},
"summary": {
"type": "object",
"properties": {
"total": {
"type": "number",
"example": 9.15,
"default": 0
},
"subtotal": {
"type": "number",
"example": 8.97,
"default": 0
},
"subtotal_with_discount": {
"type": "number",
"example": 8.97,
"default": 0
},
"tax": {
"type": "number",
"example": 0.09,
"default": 0
},
"tax_after_discount": {
"type": "number",
"example": 0.09,
"default": 0
},
"fee_fixed": {
"type": "integer",
"example": 0,
"default": 0
},
"fee_percentage": {
"type": "number",
"example": 0.09,
"default": 0
},
"fee_percentage_after_discount": {
"type": "number",
"example": 0.09,
"default": 0
},
"discount": {
"type": "integer",
"example": 0,
"default": 0
}
}
},
"valid_menu": {
"type": "boolean",
"example": true,
"default": true
},
"valid": {
"type": "boolean",
"example": true,
"default": true
},
"offer_rate": {
"type": "integer",
"example": 0,
"default": 0
},
"offer_rate_type": {
"type": "integer",
"example": 1,
"default": 0
},
"offer_include_options": {
"type": "boolean",
"example": true,
"default": true
}
}
}
},
"business": {
"type": "object",
"properties": {
"name": {
"type": "string",
"example": "<redacted-personal>"
},
"slug": {
"type": "string",
"example": "honeyfoodsmarket"
},
"logo": {
"type": "string",
"example": "https://example.com/ordering-images2/res/ordering/image/upload/m399dpg7zbhn1jqucuge/1534196596.jpg"
},
"header": {
"type": "string",
"example": "https://example.com/ordering2/image/upload/v1612896237/snkvvfkd6ktliqvqslv2.jpg"
},
"service_fee": {
"type": "integer",
"example": 1,
"default": 0
},
"tax_type": {
"type": "integer",
"example": 2,
"default": 0
},
"tax": {
"type": "integer",
"example": 1,
"default": 0
},
"currency": {
"type": "string",
"example": "USD"
},
"delivery_time": {
"type": "string",
"example": "1:0"
},
"pickup_time": {
"type": "string",
"example": "1:5"
}
}
},
"metafields": {
"type": "array"
},
"place": {},
"subtotal": {
"type": "number",
"example": 17.97,
"default": 0
},
"valid_address": {
"type": "boolean",
"example": true,
"default": true
},
"delivery_zone_id": {},
"delivery_price": {
"type": "integer",
"example": 0,
"default": 0
},
"minimum": {
"type": "integer",
"example": 0,
"default": 0
},
"valid_minimum": {
"type": "boolean",
"example": true,
"default": true
},
"valid_maximum": {
"type": "boolean",
"example": true,
"default": true
},
"maximum": {},
"valid_schedule": {
"type": "boolean",
"example": true,
"default": true
},
"valid_products": {
"type": "boolean",
"example": true,
"default": true
},
"valid": {
"type": "boolean",
"example": true,
"default": true
},
"tax": {
"type": "number",
"example": 0.18,
"default": 0
},
"tax_with_discount": {
"type": "number",
"example": 0.18,
"default": 0
},
"service_fee": {
"type": "number",
"example": 0.18,
"default": 0
},
"service_fee_with_discount": {
"type": "number",
"example": 0.18,
"default": 0
},
"subtotal_to_calculate": {
"type": "number",
"example": 17.97,
"default": 0
},
"subtotal_with_discount": {
"type": "number",
"example": 17.97,
"default": 0
},
"delivery_price_with_discount": {
"type": "integer",
"example": 0,
"default": 0
},
"discount": {
"type": "integer",
"example": 0,
"default": 0
},
"offers": {
"type": "array"
},
"taxes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {},
"name": {
"type": "string",
"example": "<redacted-personal>"
},
"description": {
"type": "string",
"example": "General tax"
},
"rate": {
"type": "integer",
"example": 1,
"default": 0
},
"type": {
"type": "integer",
"example": 2,
"default": 0
},
"summary": {
"type": "object",
"properties": {
"tax": {
"type": "number",
"example": 0.18,
"default": 0
},
"tax_after_discount": {
"type": "number",
"example": 0.18,
"default": 0
}
}
}
}
}
},
"tax_rate": {
"type": "integer",
"example": 1,
"default": 0
},
"fees": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {},
"name": {
"type": "string",
"example": "<redacted-personal>"
},
"description": {
"type": "string",
"example": "General service fee"
},
"fixed": {
"type": "integer",
"example": 0,
"default": 0
},
"percentage": {
"type": "integer",
"example": 1,
"default": 0
},
"summary": {
"type": "object",
"properties": {
"fixed": {
"type": "integer",
"example": 0,
"default": 0
},
"percentage": {
"type": "number",
"example": 0.18,
"default": 0
},
"percentage_after_discount": {
"type": "number",
"example": 0.18,
"default": 0
}
}
}
}
}
},
"service_fee_rate": {
"type": "integer",
"example": 1,
"default": 0
},
"tax_after_discount": {
"type": "number",
"example": 0.18,
"default": 0
},
"total": {
"type": "number",
"example": 18.33,
"default": 0
}
}
}
}
}
}
}
},
"400": {
"description": "400",
"content": {
"application/json": {
"examples": {
"Result": {
"value": "{\n \"error\": true,\n \"result\": [\n \"ERROR_YOU_HAVE_NOT_CART\"\n ]\n}"
}
},
"schema": {
"type": "object",
"properties": {
"error": {
"type": "boolean",
"example": true,
"default": true
},
"result": {
"type": "array",
"items": {
"type": "string",
"example": "ERROR_YOU_HAVE_NOT_CART"
}
}
}
}
}
}
}
}