input object contains the unique identifier (ID) for the cart and the items that need to be deleted.12345678910111213{ "input": { "id": "{{cartId}}", "items": { "amazonProducts": [{ "productId": "{{productId}}" }], "shopifyProducts": [{ "variantId": "{{variantId}}" }] } } }
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139mutation ($input: CartItemsDeleteInput!) { deleteCartItems(input: $input) { cart { id buyerIdentity { firstName lastName address1 address2 city provinceCode countryCode postalCode email phone } stores { ... on AmazonStore { errors { code message details { productIds } } store cartLines { quantity product { id } } offer { errors { code message details { ... on AmazonOfferErrorDetails { productIds } } } subtotal { value displayValue currency } margin { value displayValue currency } notAvailableIds shippingMethods { id label price { value displayValue currency } taxes { value displayValue currency } total { value displayValue currency } } } } ... on ShopifyStore { errors { code message details { variantIds } } store cartLines { quantity variant { id } } offer { errors { code message details { ... on ShopifyOfferErrorDetails { variantIds } } } subtotal { value displayValue currency } margin { value displayValue currency } notAvailableIds shippingMethods { id label price { value displayValue currency } taxes { value displayValue currency } total { value displayValue currency } } } } } } errors { code message } } }
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071{ "data": { "deleteCartItems": { "cart": { "id": "ufiqi0dgMfywFaskeEIY", "buyerIdentity": { "firstName": "John", "lastName": "Doe", "address1": "1st St.", "address2": "apt.1", "city": "Redmond", "provinceCode": "WA", "countryCode": "US", "postalCode": "98052", "email": "[[email protected]](/cdn-cgi/l/email-protection)", "phone": "4255100000" }, "stores": [ { "errors": [], "store": "amazon", "cartLines": [ { "quantity": 1, "product": { "id": "B00A2KD8NY" } } ], "offer": { "errors": [], "subtotal": { "value": 795, "displayValue": "$7.95", "currency": "USD" }, "margin": { "value": 0, "displayValue": "$0.00", "currency": "USD" }, "notAvailableIds": [], "shippingMethods": [ { "id": "3.99-Default shipping method", "label": "Default shipping method", "price": { "value": 399, "displayValue": "$3.99", "currency": "USD" }, "taxes": { "value": 0, "displayValue": "$0.00", "currency": "USD" }, "total": { "value": 1194, "displayValue": "$11.94", "currency": "USD" } } ] } } ] }, "errors": [] } } }
1234567891011121314{ "errors": [ { "message": "Cart not found: someInvalidCartId", "path": [ "deleteCartItems" ], "extensions": { "code": "CART_NOT_FOUND_ERROR" } } ], "data": null }
1234567891011121314{ "errors": [ { "message": "Cart expired: someExpiredCartId", "path": [ "deleteCartItems" ], "extensions": { "code": "CART_EXPIRED_ERROR" } } ], "data": null }
PRODUCT_NOT_FOUND error is returned1234567891011121314151617181920212223242526272829303132{ "data": { "deleteCartItems": { "cart": { "id": "4KkkP5uoug23WtiyoZ5c", "buyerIdentity": { "firstName": "John", "lastName": "Doe", "address1": "360 w 34th st", "address2": "{{address2}}", "city": "new york", "provinceCode": "10001", "countryCode": "US", "postalCode": "10001", "email": "[[email protected]](/cdn-cgi/l/email-protection)", "phone": "425000000" }, "stores": [] }, "errors": [ { "code": "PRODUCT_NOT_FOUND", "message": "Shopify product not found. Variant Id: 1" }, { "code": "PRODUCT_NOT_FOUND", "message": "Amazon product not found. ASIN: 1" } ] } } }
STORE_NOT_FOUND error is returned1234567891011121314151617181920212223242526272829303132{ "data": { "deleteCartItems": { "cart": { "id": "4KkkP5uoug23WtiyoZ5c", "buyerIdentity": { "firstName": "John", "lastName": "Doe", "address1": "360 w 34th st", "address2": "{{address2}}", "city": "new york", "provinceCode": "10001", "countryCode": "US", "postalCode": "10001", "email": "[[email protected]](/cdn-cgi/l/email-protection)", "phone": "425000000" }, "stores": [] }, "errors": [ { "code": "STORE_NOT_FOUND", "message": "Store not found: rye-test-store.myshopify.com" }, { "code": "STORE_NOT_FOUND", "message": "Store not found: amazon" } ] } } }