Skip to main content
This mutation is an entry point for Sell Anything API. Any other queries and mutations should be called after the cart is created via this mutation.

Arguments

input
required
The input object contains items with their quantities and optionally the identity of the buyer.If BuyerIdentity is not provided upon cart creation then AmazonOffer.shippingMethods and ShopifyOffer.shippingMethods will contain only the preliminary estimated default shipping method. To get more accurate shipping information use updateCartBuyerIdentity mutation to provide buyer information.

Returns

CartResponse.*
Any requested field from the CartResponse object.

Example - request

Query arguments
GraphQL

Example - response

Response

Errors

If the provided items are not found in the inventory PRODUCT_NOT_FOUND error is returned
if the provided BuyerIdentity contains invalid fields then a corresponding error is returned.
JSON
In this case the cart will still be created and the provided products will be added to the cart, providing they are present in the inventory.buyerIdentity field in this case will be null
If the provided product/variant quantity is less or equal to zero then ADD_PRODUCTS_FAILED error is returned
JSON
If the store has no items added to it then after attempting to get an offer for this store PRODUCTS_EMPTYerror is returned for AmazonOffer/ShopifyOffer object as in the example above.