magento2: PUT /V1/carts/{cartId}/items/{itemId} No such entity with cartId = null

Actual url

PUT /V1/carts/81/items/1

Post body

{
    "cartItem":{
        "qty":1
    }
}

Response

{
  "message": "No such entity with %fieldName = %fieldValue",
  "parameters": {
    "fieldName": "cartId",
    "fieldValue": null
  }
}

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 17 (5 by maintainers)

Most upvoted comments

@userException To update the item in cart please try the following: PUT /V1/carts/:cartId/items/:itemId

{
    "cartItem": {
        "itemId": 1,
        "qty": 10,
        "quoteId": 1
    }
}

You may obtain the list of items and their itemId for the specific cart using GET /V1/carts/:cartId/items.