fabric · Example Payload

Fabric Create Cart Example

CommerceComposable CommerceHeadless CommerceE-commerceRetailCartCatalogPIMOMSInventoryOffersPricingPromotionsCheckoutIdentityExperiencesAgentic Commerce

Fabric Create Cart Example is an example object payload from fabric, with 2 top-level fields. It illustrates the shape of data this provider's APIs accept or return.

Top-level fields

requestresponse

Example Payload

Raw ↑
{
  "request": {
    "method": "POST",
    "url": "https://api.fabric.inc/v3/carts",
    "headers": {
      "Authorization": "Bearer {{FABRIC_ACCESS_TOKEN}}",
      "Content-Type": "application/json",
      "x-fabric-tenant-id": "demo-tenant"
    },
    "body": {
      "currency": "USD",
      "customerId": "cust_01HXYZ",
      "items": [
        {"sku": "SKU-1001", "quantity": 2},
        {"sku": "SKU-2042", "quantity": 1}
      ]
    }
  },
  "response": {
    "status": 201,
    "headers": {"x-fabric-request-id": "263e731c-45c8-11ed-b878-0242ac120002"},
    "body": {
      "cartId": "cart_01HXYZA",
      "status": "ACTIVE",
      "currency": "USD",
      "items": [
        {"itemId": "li_1", "sku": "SKU-1001", "quantity": 2, "unitPrice": 24.99},
        {"itemId": "li_2", "sku": "SKU-2042", "quantity": 1, "unitPrice": 89.00}
      ],
      "totals": {"subtotal": 138.98, "discount": 0, "tax": 0, "shipping": 0, "grandTotal": 138.98}
    }
  }
}