Carts

Add cart items

Add items to cart by cart id and mid

post/carts/{cart_id}/items

Request

  • Base URL
    https://dummyHandle.shoplineapp.com/storefront-api/v1
  • URL
    https://dummyHandle.shoplineapp.com/storefront-api/v1/carts/{cart_id}/items
  • Auth
    • API key in header X-Storefront-Token
    • or API key in header X-Storefront-Token and API key in header X-Customer-Token

Path parameters

cart_idstring required

Cart identifier

Request body

Example request

{
  "items": [
    {
      "created_by": "openapi",
      "variation_id": "680ee3fcb45601001d9834d7",
      "main_product_id": "67cfa5a44029af003b96d6d9",
      "product_id": "6125ac5b95c022004560d146",
      "quantity": 1,
      "type": "addon_product"
    }
  ]
}

Response

Bad Request

trace_idstring

Example response

{
  "error": {
    "message": [
      {
        "code": "INVALID_ITEM",
        "reason": "invalid cart item at index 0: invalid item"
      }
    ]
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.