---
title: "Historical contract: Add Product to cart"
description: "Historical Ordering.co API contract for POST /carts/add_product (Add Product to cart), kept for reference. Use the current API reference for new integrations."
canonical: https://docs.ordering.co/api-reference/guides/history/add-product-to-cart/
---

# Historical contract: Add Product to cart

[]()

> **Historical API contract.** This page describes an earlier API contract. Methods, paths, and responses may differ from the current API.

## Historical meaning

Add Product to cart

## Current API

For new integrations, use the linked current API reference or guide.

[View the current API reference](https://docs.ordering.co/api-reference/#tag/carts/POST/carts/add_product)

## Parameters

```json
[
  {
    "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
  }
]
```

## Request body

```json
{
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "product"
        ],
        "properties": {
          "product": {
            "type": "string",
            "format": "json"
          },
          "business_id": {
            "type": "integer",
            "description": "Only to add product to a diferent business cart when product is shared from other business",
            "format": "int32"
          }
        }
      }
    }
  }
}
```

## Responses

```json
{
  "200": {
    "description": "200",
    "content": {
      "application/json": {
        "examples": {
          "Result": {
            "value": "{\n  \"error\": false,\n  \"result\": {\n    \"uuid\": \"<redacted-secret>\",\n    \"user_id\": 0,\n    \"status\": null,\n    \"business_id\": 0,\n    \"driver_tip_rate\": 0,\n    \"quantity\": 1,\n    \"paymethod_data\": null,\n    \"products\": [\n      {\n        \"id\": 501,\n        \"category_id\": 103,\n        \"images\": \"https://example.com/ordering/image/upload/v1534196990/meu5wdjzamtnwbpvod6m.jpg\",\n        \"business_id\": 0,\n        \"inventoried\": false,\n        \"stock\": 0,\n        \"name\": \"<redacted-personal>\",\n        \"price\": 18,\n        \"code\": \"1ArC0Su_8b\",\n        \"comment\": null,\n        \"quantity\": 1,\n        \"total\": 18,\n        \"balance\": 1,\n        \"valid_quantity\": true,\n        \"ingredients\": {},\n        \"options\": {},\n        \"valid_menu\": true,\n        \"valid\": true\n      }\n    ],\n    \"business\": {\n      \"name\": \"<redacted-personal>\",\n      \"slug\": \"laundrytake\",\n      \"logo\": \"https://example.com/ordering/image/upload/v1534196832/eayptjjwkavqs4qyoqab.jpg\",\n      \"header\": \"https://example.com/ordering/image/upload/v1534196820/jypheynmcvohvptgts2p.jpg\",\n      \"service_fee\": 0,\n      \"tax_type\": 2,\n      \"tax\": 0,\n      \"currency\": null\n    },\n    \"subtotal\": 18,\n    \"valid_address\": true,\n    \"delivery_zone_id\": 71,\n    \"delivery_price\": 1,\n    \"minimum\": 2,\n    \"valid_schedule\": true,\n    \"valid_products\": true,\n    \"valid\": true,\n    \"discount\": 0,\n    \"subtotal_with_discount\": 18,\n    \"tax\": 0,\n    \"subtotal_with_tax\": 18,\n    \"service_fee\": 0,\n    \"driver_tip\": 0,\n    \"total\": 19\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": {},
                "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": 501,
                        "default": 0
                      },
                      "category_id": {
                        "type": "integer",
                        "example": 103,
                        "default": 0
                      },
                      "images": {
                        "type": "string",
                        "example": "https://example.com/ordering/image/upload/v1534196990/meu5wdjzamtnwbpvod6m.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": 18,
                        "default": 0
                      },
                      "code": {
                        "type": "string",
                        "example": "1ArC0Su_8b"
                      },
                      "comment": {},
                      "quantity": {
                        "type": "integer",
                        "example": 1,
                        "default": 0
                      },
                      "total": {
                        "type": "integer",
                        "example": 18,
                        "default": 0
                      },
                      "balance": {
                        "type": "integer",
                        "example": 1,
                        "default": 0
                      },
                      "valid_quantity": {
                        "type": "boolean",
                        "example": true,
                        "default": true
                      },
                      "ingredients": {
                        "type": "object",
                        "properties": {}
                      },
                      "options": {
                        "type": "object",
                        "properties": {}
                      },
                      "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": "laundrytake"
                    },
                    "logo": {
                      "type": "string",
                      "example": "https://example.com/ordering/image/upload/v1534196832/eayptjjwkavqs4qyoqab.jpg"
                    },
                    "header": {
                      "type": "string",
                      "example": "https://example.com/ordering/image/upload/v1534196820/jypheynmcvohvptgts2p.jpg"
                    },
                    "service_fee": {
                      "type": "integer",
                      "example": 0,
                      "default": 0
                    },
                    "tax_type": {
                      "type": "integer",
                      "example": 2,
                      "default": 0
                    },
                    "tax": {
                      "type": "integer",
                      "example": 0,
                      "default": 0
                    },
                    "currency": {}
                  }
                },
                "subtotal": {
                  "type": "integer",
                  "example": 18,
                  "default": 0
                },
                "valid_address": {
                  "type": "boolean",
                  "example": true,
                  "default": true
                },
                "delivery_zone_id": {
                  "type": "integer",
                  "example": 71,
                  "default": 0
                },
                "delivery_price": {
                  "type": "integer",
                  "example": 1,
                  "default": 0
                },
                "minimum": {
                  "type": "integer",
                  "example": 2,
                  "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": "integer",
                  "example": 18,
                  "default": 0
                },
                "tax": {
                  "type": "integer",
                  "example": 0,
                  "default": 0
                },
                "subtotal_with_tax": {
                  "type": "integer",
                  "example": 18,
                  "default": 0
                },
                "service_fee": {
                  "type": "integer",
                  "example": 0,
                  "default": 0
                },
                "driver_tip": {
                  "type": "integer",
                  "example": 0,
                  "default": 0
                },
                "total": {
                  "type": "integer",
                  "example": 19,
                  "default": 0
                }
              }
            }
          }
        }
      }
    }
  },
  "400": {
    "description": "400",
    "content": {
      "application/json": {
        "examples": {
          "Result": {
            "value": "{}"
          }
        },
        "schema": {
          "type": "object",
          "properties": {}
        }
      }
    }
  }
}
```
