Webhooks

Cart Created

Webhook event fired when a new cart is created on the storefront

Overview

The Cart Created event fires when a new cart is created on the storefront. The payload contains the cart details including the customer (if known) and any items present at the time of creation.

When it triggers

This webhook fires when:

  • A customer creates a new cart via the storefront.
  • An anonymous cart is created before the customer has logged in (i.e. before the cart is claimed).

At the moment of creation, carts always have zero items - parts are added to the cart separately after it is created. The items array will be empty in all CART_CREATED payloads.

Payload

The decrypted payload is a JSON object with the following fields:

FieldTypeNullableDescription
cartIdnumberNoUnique identifier for the cart.
cartNumbernumberYesSequential cart number assigned to the cart.
statusstringNoCurrent cart status. Always "OPEN" at creation.
customerobjectYesThe customer who created the cart. null for anonymous carts. See Customer object.
customerOrganisationIdnumberYesID of the customer organisation. null for anonymous carts.
customerOrganisationNamestringYesName of the customer organisation. null for anonymous carts.
itemsarrayNoList of items in the cart. Always [] at creation time. See Item object.
createdAtstringNoISO 8601 date-time when the cart was created (e.g., "2025-06-15T10:30:00Z").

Customer object

Present when the cart was created by an authenticated customer. null for anonymous carts.

FieldTypeNullableDescription
idnumberNoUnique identifier for the customer.
emailstringYesCustomer's email address.
firstNamestringYesCustomer's first name.
lastNamestringYesCustomer's last name.
phoneNumberstringYesCustomer's phone number.

Item object

Each item in the items array has the following fields. This array is always empty at cart creation time - it is included for schema consistency with any future CART_UPDATED event.

FieldTypeNullableDescription
idnumberNoUnique identifier for the cart item.
namestringYesName of the part.
quantitynumberNoNumber of units.
technologystringYesManufacturing technology (e.g., "FDM", "SLS").
materialstringYesMaterial used (e.g., "PA12 Nylon").
colorstringYesColor specification, if applicable.
infillstringYesInfill percentage, if applicable.
precisionstringYesPrecision/tolerance level, if applicable.

Example payload

{
  "cartId": 4201,
  "cartNumber": 42,
  "status": "OPEN",
  "customer": {
    "id": 99,
    "email": "alex@acme.com",
    "firstName": "Alex",
    "lastName": "Johnson",
    "phoneNumber": "+1-555-0199"
  },
  "customerOrganisationId": 678,
  "customerOrganisationName": "Acme Manufacturing",
  "items": [],
  "createdAt": "2025-06-15T10:30:00Z"
}

Anonymous cart example

{
  "cartId": 4202,
  "cartNumber": 43,
  "status": "OPEN",
  "customer": null,
  "customerOrganisationId": null,
  "customerOrganisationName": null,
  "items": [],
  "createdAt": "2025-06-15T11:05:00Z"
}

Last updated on