v2

latestOpenAPI 3.1.02026-07-26102336742.6 KB
Carts

Create a cart

Rate limit: 100 requests / 10 seconds per shop. See Rate limiting.

Creates a new cart with the specified items

post/open-api/v1.0/carts

Request body

metadataobject

Custom metadata key-value pairs. Max 10 keys, keys must be alphanumeric with underscores, max 256 chars per key, max 512 bytes per value, max 2KB total.

Example request

{
  "items": [
    {
      "variantId": "00aa4abd-5778-4199-8161-0b49b2f212e5",
      "quantity": 1
    }
  ],
  "metadata": {
    "asset_id": "abc123",
    "campaign": "summer_2026"
  }
}

Response

Created

idstring required
metadataobject

Custom metadata key-value pairs.

Example response

{
  "id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
  "items": [
    {
      "variant": {
        "id": "00aa4abd-5778-4199-8161-0b49b2f212e5",
        "name": "My t-shirt - Black, L",
        "sku": "WDEK-DRE200L",
        "unitPrice": {
          "value": 10,
          "currency": "USD"
        },
        "compareAtPrice": {
          "value": 10,
          "currency": "USD"
        },
        "attributes": {
          "description": "Black, L",
          "color": {
            "name": "Black",
            "swatch": "#000000"
          },
          "size": {
            "name": "L"
          }
        },
        "stock": {
          "inStock": 5
        },
        "weight": {
          "value": 1,
          "unit": "kg"
        },
        "dimensions": {
          "length": 1,
          "width": 2,
          "height": 3,
          "unit": "cm"
        },
        "images": [
          {
            "id": "00aa4abd-5778-4199-8161-0b49b2f212e5",
            "url": "https://fourthwall.com/image.png",
            "width": 800,
            "height": 600,
            "transformedUrl": "https://fourthwall.com/image.png"
          }
        ],
        "product": {
          "id": "00aa4abd-5778-4199-8161-0b49b2f212e5",
          "name": "My t-shirt",
          "slug": "my-t-shirt"
        }
      },
      "quantity": 5
    }
  ],
  "metadata": {
    "asset_id": "abc123",
    "campaign": "summer_2026"
  }
}