Add or Update Item to Cart API

Add products to a cart or update the quantity/denomination of existing items. Creates a cart when no cartId is supplied.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Request Schema

ParameterTypeDescription
cartIdStringExisting cart ID. Omit or leave empty to create a new cart.
productsArray of ObjectLine items to add or update.
products[].productIdIntProduct identifier from Get Vouchers API.
products[].quantityStringNumber of units. Pass "0" to remove the line item.
products[].denominationStringFace value of the product; must match a valid denomination.

Response Schema

PathTypeDescription
dataobjectRoot response object.
data.addOrUpdateItemToCartobjectContainer for the add/update result.
data.addOrUpdateItemToCart.statusnumberAPI execution status (1 = success).
data.addOrUpdateItemToCart.messagestringHuman-readable result message.

Implementation Notes

  1. Use Get Vouchers API to obtain valid productId and denomination values.
  2. Pass quantity "0" to remove a product from the cart.
  3. Omit cartId to create a new cart; the created cart's ID is returned for subsequent calls.
  4. The success envelope shown is representative; confirm the exact payload against a live response.
Body Params
string
required
Defaults to plumProAPI.mutation.addOrUpdateItemToCart

Please use 'plumProAPI.mutation.addOrUpdateItemToCart' always in query

string
required
Defaults to plumProAPI

Please use 'plumProAPI' always in query.

variables
object
required
Responses

Language
Credentials
OAuth2
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json