---
updatedAt: 2026-07-09T09:40:41.000Z
agentTools:
  projectIndex: https://open-api.docs.shoplineapp.com/llms.txt
---

# Update cart items

Update items to cart

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "SHOPLINE Storefront API",
    "description": "Welcome to the shopline open-api developer hub. You'll find comprehensive guides and documentation to help you start working with shopline storefront-api as quickly as possible, as well as support if you get stuck. Let's jump right in!",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://{handle}.shoplineapp.com/storefront-api/v1",
      "description": "Production server",
      "variables": {
        "handle": {
          "default": "dummyHandle",
          "description": "Your Shop Handle"
        }
      }
    }
  ],
  "paths": {
    "/carts/{cart_id}/items": {
      "patch": {
        "responses": {
          "207": {
            "description": "",
            "headers": {
              "x-shopline-api-version": {
                "description": "The API version used to process the request",
                "schema": {
                  "type": "string",
                  "example": "v1"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "index": {
                                "type": "integer",
                                "description": "Cart item index",
                                "example": 0
                              },
                              "code": {
                                "type": "string",
                                "description": "Cart item error code",
                                "example": "INVALID_ITEM"
                              },
                              "reason": {
                                "type": "string",
                                "description": "Cart item error reason",
                                "example": "invalid cart item at index 0: invalid item"
                              }
                            },
                            "nullable": true
                          },
                          "nullable": true
                        }
                      }
                    },
                    "trace_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Carts"
        ],
        "summary": "Update cart items",
        "description": "Update items to cart",
        "parameters": [
          {
            "name": "cart_id",
            "in": "path",
            "description": "Cart identifier",
            "required": true,
            "example": "298f1d18e7914500b9c6328c4720d38e",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "cart_item_id",
                        "quantity"
                      ],
                      "properties": {
                        "cart_item_id": {
                          "type": "string",
                          "description": "Cart item identifier",
                          "example": "393fe83b1c1842e58428cf65cb9bb450"
                        },
                        "quantity": {
                          "type": "integer",
                          "description": "Cart item quantity",
                          "example": 2
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "required": true
        }
      }
    }
  },
  "tags": [
    {
      "name": "Carts"
    }
  ],
  "components": {
    "securitySchemes": {
      "storefront_token_auth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Storefront-Token"
      },
      "customer_token_auth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Customer-Token"
      }
    }
  },
  "security": [
    {
      "storefront_token_auth": []
    },
    {
      "storefront_token_auth": [],
      "customer_token_auth": []
    }
  ]
}
```