---
updatedAt: 2026-06-19T16:07:00.000Z
---

# Update Cart (Ecwid)

Update a cart by ID in Ecwid.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "version": "1.0.0",
    "title": "Ecwid"
  },
  "servers": [
    {
      "url": "https://api.ecartapi.com/api/v2"
    }
  ],
  "paths": {
    "/carts/{cartId}": {
      "put": {
        "summary": "Update Cart (Ecwid)",
        "description": "Update a cart by ID in Ecwid.",
        "operationId": "update_cart_ecwid",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "cart": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "example": "B87ED958-9FE0-411C-B8ED-681471C624BD"
                        },
                        "langId": {
                          "type": "string",
                          "nullable": true
                        },
                        "productId": {
                          "type": "array",
                          "items": {
                            "type": "integer"
                          }
                        },
                        "totals": {
                          "type": "object",
                          "properties": {
                            "total": {
                              "type": "string",
                              "example": "40.95"
                            },
                            "subtotal": {
                              "type": "string",
                              "example": "40.95"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "cartId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The unique identifier of the cart."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "cart": {
                    "type": "object",
                    "properties": {
                      "hidden": {
                        "type": "boolean",
                        "example": true
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "Authorization": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "description": "Used to authenticate API requests after completing the store authorization or integration process. The access_token is generated once the e-commerce store grants access and must be included in every request header to validate the authorized connection."
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "security": [
    {
      "Authorization": []
    }
  ]
}
```