curl --request POST \
--url https://api.fabric.inc/v3/carts/{cartId}/actions/remove-coupon \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-fabric-tenant-id: <x-fabric-tenant-id>' \
--data '
{
"couponCode": "SUPERCOUPON1"
}
'{
"id": "c695af14-5e33-402c-9d8d-71edcf4856a8",
"createdAt": "2022-09-06T14:07:17.000Z",
"updatedAt": "2022-09-06T14:07:17.000Z",
"name": "cart_it",
"description": "IT department cart",
"lineItems": [
{
"id": "12gved0f-7645-40cb-y7b0-167f8bggdb3z",
"itemId": "<unknown>",
"position": 1,
"name": "Varnet Garden Light Kit",
"sku": "16B2GS8LD5FDS",
"productAttributes": [
{
"name": "gift wrapping (small)",
"value": "true",
"attributeId": "60c2a358eb2ec30008ae70a1",
"description": "Gift wrapping for a small package",
"mapping": "ITEM",
"type": "GIFT",
"price": 10,
"level": "order"
}
],
"createdAt": "2022-09-06T14:07:17.000Z",
"updatedAt": "2022-09-06T14:07:17.000Z",
"quantity": 15,
"priceListId": 108674,
"isActive": true,
"price": "<unknown>",
"discounts": [
"<unknown>"
],
"groups": [
"61d38e117162b7dba69c3d6d"
],
"attributes": {
"productFamily": "Laptop computers"
},
"channel": "12",
"isPickup": true,
"warehouseId": "XYZ-1234",
"shippingDetails": {
"id": "fef78121-bee3-4448-bf1c-d5b5461dbda2",
"createdAt": "2022-09-06T14:07:17.000Z",
"updatedAt": "2022-09-06T14:07:17.000Z",
"address": {
"addressLine1": "123 Main St.",
"city": "Seattle",
"region": "WA",
"country": "USA",
"postalCode": "98121",
"addressLine2": "Suite 100",
"addressLine3": "Seventh floor",
"addressLine4": "Attention: Pat E. Kake",
"attention": "Billing manager",
"email": "[email protected]",
"type": "shipping",
"name": "Pat E Kake",
"phone": {
"number": "123-456-7899",
"type": "MOBILE"
}
},
"type": "SHIP_TO_ADDRESS",
"taxCode": "FR1000",
"isPickup": true,
"altPickupPerson": {
"name": "Pat E Kake",
"phone": {
"number": "123-456-7899",
"type": "MOBILE"
},
"email": "[email protected]"
},
"pickupPerson": {
"name": "Pat E Kake",
"phone": {
"number": "123-456-7899",
"type": "MOBILE"
},
"email": "[email protected]"
},
"warehouseId": "XYZ-1234",
"storeId": "ABC-123",
"shippingCost": 150.25,
"shippingMethodId": "dfsae-2d32113-32lpdd",
"shippingDiscount": 150.25,
"shippingMethodName": "Express Delivery"
},
"fulfillment": {
"type": "WEB_SDD",
"networkCode": "ShipToHome",
"channelId": "12",
"inventoryType": "availableToPurchase",
"inventory": {
"inventoryId": "723910d81723",
"sku": "SKU1",
"itemId": 12345,
"locationNumber": 12345,
"region": "North America",
"channelId": "channel_xyz",
"vendorId": "vendor1",
"createdAt": "2022-08-01T18:03:28.483971941Z",
"updatedAt": "2022-08-01T20:03:28.483971941Z",
"leadTime": "5 days",
"type": "primary",
"hasInfiniteInventory": false,
"backorderShipmentAt": "2022-08-01T20:03:28.483971941Z",
"preorderShipmentAt": "2022-08-01T20:03:28.483971941Z",
"backorderLimit": 50,
"preorderLimit": 40,
"safetyStock": 10,
"lowStock": 10,
"networkCode": "ShipToHome",
"counters": {
"onHand": 100,
"allocated": 10,
"shipped": 20
},
"customAttributes": {
"isBopis": true
},
"networkCounters": {
"softReserve": 10
},
"virtualCounters": {
"availableToPurchase": 60
}
}
},
"fees": [
{
"feeId": "73bc09d0-874a-4c3d-84d0-df1670d03578",
"name": "gift",
"type": "gift_wrap",
"amount": 10.5,
"attributes": {
"from": "sam"
}
}
],
"adjustments": [
{
"id": "c695af14-5e33-402c-9d8d-71edcf4856a8",
"amount": 60.5,
"reason": "CSR Adjustment",
"attributes": {
"productFamily": "Laptop computers"
},
"createdAt": "2022-09-06T14:07:17.000Z",
"updatedAt": "2022-09-06T14:07:17.000Z"
}
]
}
],
"totalItems": 3,
"totalUniqueItems": 2,
"status": "PENDING",
"accountId": "5f689caa4216e7000750d1ef",
"configuration": {
"allowAnonymousUser": true,
"orderNumberSource": "CART_ID",
"isSoftReservationEnabled": false,
"orderSequence": {
"sequenceName": "ORDER_NUMBER",
"sequenceKey": "LOCATE"
},
"orderNumberGeneration": "NONE"
},
"customerContext": {
"id": "d7e78a21-bee3-4448-bf1c-d5b5461dbda2",
"type": "EMPLOYEE",
"attributes": {
"isAdmin": false
},
"segments": [
[
{
"name": "category",
"value": [
"GOLD",
"YELLOW"
]
}
]
]
},
"totalAmount": 10,
"totalDiscount": 10,
"totalFees": 10,
"subTotal": 10,
"currency": "USD",
"attributes": {
"approver": "620d8896058edb0009385311"
},
"appliedDiscounts": [
{
"promotionId": "6197ec46e836ff000952c665",
"promotionName": "Buy shoes get socks for free",
"couponCode": "SUPERCOUPON20",
"type": "COUPON",
"amount": 105.15
}
],
"fees": [
{
"feeId": "73bc09d0-874a-4c3d-84d0-df1670d03578",
"name": "gift",
"type": "gift_wrap",
"amount": 10.5,
"attributes": {
"from": "sam"
}
}
],
"suggestedProducts": [
{
"promotionId": "6197ec46e836ff000952c665",
"promotionName": "Buy shoes get socks for free",
"itemId": 234343,
"itemIds": [
500001
],
"sku": "SHOE1234",
"skus": [
"SHOE-4"
],
"eligiblePriceLists": [
1000
],
"quantity": 2,
"promotionQuantity": 10,
"isFree": true,
"discountType": "PERCENTAGE_OFF",
"amount": 100.15
}
],
"orderNumber": "121213",
"error": {
"prices": [
{
"price": {
"sale": 1000.15,
"cost": 900.15,
"base": 2000.15,
"unitPriceWithoutDiscounts": 2000.15,
"lineTotalWithoutDiscounts": 2000.15,
"lineTotalWithDiscounts": 2000.15,
"type": "BASE"
},
"channel": "12",
"kind": "PROMOTION",
"position": 1,
"discounts": [
{
"amount": 100.15,
"quantity": 1,
"proratedAmount": 100.15,
"proratedQuantity": 1,
"application": 1,
"promotion": {
"id": "6197ec46e836ff000952d668",
"value": 2000.15,
"groupId": "61a6354d0d70e30009415f16",
"level": 1,
"isStackable": true,
"isAlwaysApplied": true,
"name": "20% OFF",
"type": "Coupon",
"discountType": "AMOUNT_OFF"
}
}
]
}
],
"promotionErrors": [
{
"code": "UNKNOWN_ERROR",
"detail": "Item is out of stock",
"itemId": 1730902008,
"sku": "16B2GS8LD5FDS",
"position": 1
}
],
"inventoryErrors": [
{
"code": "UNKNOWN_ERROR",
"detail": "Item is out of stock",
"itemId": 1730902008,
"sku": "16B2GS8LD5FDS",
"position": 1
}
]
}
}Remove coupon from specified cart.
curl --request POST \
--url https://api.fabric.inc/v3/carts/{cartId}/actions/remove-coupon \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-fabric-tenant-id: <x-fabric-tenant-id>' \
--data '
{
"couponCode": "SUPERCOUPON1"
}
'{
"id": "c695af14-5e33-402c-9d8d-71edcf4856a8",
"createdAt": "2022-09-06T14:07:17.000Z",
"updatedAt": "2022-09-06T14:07:17.000Z",
"name": "cart_it",
"description": "IT department cart",
"lineItems": [
{
"id": "12gved0f-7645-40cb-y7b0-167f8bggdb3z",
"itemId": "<unknown>",
"position": 1,
"name": "Varnet Garden Light Kit",
"sku": "16B2GS8LD5FDS",
"productAttributes": [
{
"name": "gift wrapping (small)",
"value": "true",
"attributeId": "60c2a358eb2ec30008ae70a1",
"description": "Gift wrapping for a small package",
"mapping": "ITEM",
"type": "GIFT",
"price": 10,
"level": "order"
}
],
"createdAt": "2022-09-06T14:07:17.000Z",
"updatedAt": "2022-09-06T14:07:17.000Z",
"quantity": 15,
"priceListId": 108674,
"isActive": true,
"price": "<unknown>",
"discounts": [
"<unknown>"
],
"groups": [
"61d38e117162b7dba69c3d6d"
],
"attributes": {
"productFamily": "Laptop computers"
},
"channel": "12",
"isPickup": true,
"warehouseId": "XYZ-1234",
"shippingDetails": {
"id": "fef78121-bee3-4448-bf1c-d5b5461dbda2",
"createdAt": "2022-09-06T14:07:17.000Z",
"updatedAt": "2022-09-06T14:07:17.000Z",
"address": {
"addressLine1": "123 Main St.",
"city": "Seattle",
"region": "WA",
"country": "USA",
"postalCode": "98121",
"addressLine2": "Suite 100",
"addressLine3": "Seventh floor",
"addressLine4": "Attention: Pat E. Kake",
"attention": "Billing manager",
"email": "[email protected]",
"type": "shipping",
"name": "Pat E Kake",
"phone": {
"number": "123-456-7899",
"type": "MOBILE"
}
},
"type": "SHIP_TO_ADDRESS",
"taxCode": "FR1000",
"isPickup": true,
"altPickupPerson": {
"name": "Pat E Kake",
"phone": {
"number": "123-456-7899",
"type": "MOBILE"
},
"email": "[email protected]"
},
"pickupPerson": {
"name": "Pat E Kake",
"phone": {
"number": "123-456-7899",
"type": "MOBILE"
},
"email": "[email protected]"
},
"warehouseId": "XYZ-1234",
"storeId": "ABC-123",
"shippingCost": 150.25,
"shippingMethodId": "dfsae-2d32113-32lpdd",
"shippingDiscount": 150.25,
"shippingMethodName": "Express Delivery"
},
"fulfillment": {
"type": "WEB_SDD",
"networkCode": "ShipToHome",
"channelId": "12",
"inventoryType": "availableToPurchase",
"inventory": {
"inventoryId": "723910d81723",
"sku": "SKU1",
"itemId": 12345,
"locationNumber": 12345,
"region": "North America",
"channelId": "channel_xyz",
"vendorId": "vendor1",
"createdAt": "2022-08-01T18:03:28.483971941Z",
"updatedAt": "2022-08-01T20:03:28.483971941Z",
"leadTime": "5 days",
"type": "primary",
"hasInfiniteInventory": false,
"backorderShipmentAt": "2022-08-01T20:03:28.483971941Z",
"preorderShipmentAt": "2022-08-01T20:03:28.483971941Z",
"backorderLimit": 50,
"preorderLimit": 40,
"safetyStock": 10,
"lowStock": 10,
"networkCode": "ShipToHome",
"counters": {
"onHand": 100,
"allocated": 10,
"shipped": 20
},
"customAttributes": {
"isBopis": true
},
"networkCounters": {
"softReserve": 10
},
"virtualCounters": {
"availableToPurchase": 60
}
}
},
"fees": [
{
"feeId": "73bc09d0-874a-4c3d-84d0-df1670d03578",
"name": "gift",
"type": "gift_wrap",
"amount": 10.5,
"attributes": {
"from": "sam"
}
}
],
"adjustments": [
{
"id": "c695af14-5e33-402c-9d8d-71edcf4856a8",
"amount": 60.5,
"reason": "CSR Adjustment",
"attributes": {
"productFamily": "Laptop computers"
},
"createdAt": "2022-09-06T14:07:17.000Z",
"updatedAt": "2022-09-06T14:07:17.000Z"
}
]
}
],
"totalItems": 3,
"totalUniqueItems": 2,
"status": "PENDING",
"accountId": "5f689caa4216e7000750d1ef",
"configuration": {
"allowAnonymousUser": true,
"orderNumberSource": "CART_ID",
"isSoftReservationEnabled": false,
"orderSequence": {
"sequenceName": "ORDER_NUMBER",
"sequenceKey": "LOCATE"
},
"orderNumberGeneration": "NONE"
},
"customerContext": {
"id": "d7e78a21-bee3-4448-bf1c-d5b5461dbda2",
"type": "EMPLOYEE",
"attributes": {
"isAdmin": false
},
"segments": [
[
{
"name": "category",
"value": [
"GOLD",
"YELLOW"
]
}
]
]
},
"totalAmount": 10,
"totalDiscount": 10,
"totalFees": 10,
"subTotal": 10,
"currency": "USD",
"attributes": {
"approver": "620d8896058edb0009385311"
},
"appliedDiscounts": [
{
"promotionId": "6197ec46e836ff000952c665",
"promotionName": "Buy shoes get socks for free",
"couponCode": "SUPERCOUPON20",
"type": "COUPON",
"amount": 105.15
}
],
"fees": [
{
"feeId": "73bc09d0-874a-4c3d-84d0-df1670d03578",
"name": "gift",
"type": "gift_wrap",
"amount": 10.5,
"attributes": {
"from": "sam"
}
}
],
"suggestedProducts": [
{
"promotionId": "6197ec46e836ff000952c665",
"promotionName": "Buy shoes get socks for free",
"itemId": 234343,
"itemIds": [
500001
],
"sku": "SHOE1234",
"skus": [
"SHOE-4"
],
"eligiblePriceLists": [
1000
],
"quantity": 2,
"promotionQuantity": 10,
"isFree": true,
"discountType": "PERCENTAGE_OFF",
"amount": 100.15
}
],
"orderNumber": "121213",
"error": {
"prices": [
{
"price": {
"sale": 1000.15,
"cost": 900.15,
"base": 2000.15,
"unitPriceWithoutDiscounts": 2000.15,
"lineTotalWithoutDiscounts": 2000.15,
"lineTotalWithDiscounts": 2000.15,
"type": "BASE"
},
"channel": "12",
"kind": "PROMOTION",
"position": 1,
"discounts": [
{
"amount": 100.15,
"quantity": 1,
"proratedAmount": 100.15,
"proratedQuantity": 1,
"application": 1,
"promotion": {
"id": "6197ec46e836ff000952d668",
"value": 2000.15,
"groupId": "61a6354d0d70e30009415f16",
"level": 1,
"isStackable": true,
"isAlwaysApplied": true,
"name": "20% OFF",
"type": "Coupon",
"discountType": "AMOUNT_OFF"
}
}
]
}
],
"promotionErrors": [
{
"code": "UNKNOWN_ERROR",
"detail": "Item is out of stock",
"itemId": 1730902008,
"sku": "16B2GS8LD5FDS",
"position": 1
}
],
"inventoryErrors": [
{
"code": "UNKNOWN_ERROR",
"detail": "Item is out of stock",
"itemId": 1730902008,
"sku": "16B2GS8LD5FDS",
"position": 1
}
]
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
A header used by fabric to identify the tenant making the request. You must include tenant id in the authentication header for an API request to access any of fabric’s endpoints. You can retrieve the tenant id , which is also called account id, from Copilot. This header is required.
x-fabric-channel-id identifies the sales channel where the API request is being made; primarily for multichannel use cases. The channel ids are 12 corresponding to US and 13 corresponding to Canada. The default channel id is 12. This field is required.
Unique request ID
Cart ID
"b8a64b52-dab4-8137-8d6a-f2c2337abc1"
Request body to remove coupon from cart
Coupon to be applied or removed from cart
"SUPERCOUPON1"
OK
Unique cart identifier
"c695af14-5e33-402c-9d8d-71edcf4856a8"
Time cart was created
"2022-09-06T14:07:17.000Z"
Time cart was last updated
"2022-09-06T14:07:17.000Z"
Cart name
"cart_it"
Cart description
"IT department cart"
Show child attributes
Number of line items in the cart
3
Number of different (unique) line items in the cart based on line item ID
2
Cart status
PENDING - Cart is in pending state
DELETED - Cart is in deleted state
PENDING, DELETED "PENDING"
Customer account ID
"5f689caa4216e7000750d1ef"
Cart configurations
Show child attributes
Customer context
Show child attributes
Total price of line items after discount, including shipping and shipping discount
10
Total discount applied to cart
10
Total fees applied to cart
10
Total price of line items, including shipping, without discount
10
Currency type
"USD"
Cart attributes
Show child attributes
{ "approver": "620d8896058edb0009385311" }Applied discounts
Show child attributes
Show child attributes
Suggested free products
Show child attributes
The order number
"121213"
Errors in this cart
Show child attributes
Was this page helpful?