Wishlists

GET /wishlists

List the organization's wishlists, newest first by default. Supports search, filtering and cursor pagination.

Requires the wishlists:read permission.

Query Parameters

limitnumber

The number of records to return.

cursorstring

A pagination cursor. Fetch the next page by passing the nextCursor value from the previous response.

sortname | -name | createdAt | -createdAt

The sort order. Prefix a field with - to sort descending. Defaults to -createdAt.

searchstring

A free-text search term, matched case-insensitively against the record's most identifying fields. Combined with filter using AND.

filterstring

A JSON-encoded filter document, for example {"createdAt":{"$gte":"2025-01-01T00:00:00Z"}}. Filterable fields: id, name, metadata, shared, isDefault, createdAt, customer.id, customer.email, customer.firstName, customer.lastName, customer.metadata, customer.emailOptOut, customer.emailOptOutSource, customer.createdAt, items.productId, items.productVariantId. See Filtering for the syntax.

includestring

A comma-separated list of extra fields to compute and return. Each one costs an additional query, so ask only for what you need. Available: importJob, itemsCount, customer, items.

Request
curl \
  "https://api.cascade.dev/wishlists" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY"
Response
{
  "data": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "customerId": "550e8400-e29b-41d4-a716-446655440000",
      "name": "string",
      "metadata": "...",
      "notes": "string",
      "shared": true,
      "shareToken": "string",
      "isDefault": true,
      "createdAt": "2025-01-15T09:30:00Z",
      "updatedAt": "2025-01-15T09:30:00Z",
      "shareUrl": "https://example.com",
      "importJob": {
        "id": "...",
        "type": "...",
        "action": "...",
        "row": "...",
        "createdAt": "..."
      },
      "itemsCount": 0,
      "customer": {
        "id": "...",
        "email": "...",
        "phone": "...",
        "firstName": "...",
        "lastName": "...",
        "country": "...",
        "birthday": "...",
        "metadata": "...",
        "notes": "...",
        "emailOptOut": "...",
        "emailOptOutAt": "...",
        "emailOptOutSource": "...",
        "createdAt": "...",
        "updatedAt": "..."
      },
      "items": ["..."]
    }
  ],
  "nextCursor": "string"
}

POST /wishlists/import

Create or update wishlists in bulk, matching on customer email and wishlist name. Items are replaced with exactly what you send, so include the full set. A customer Cascade has never seen is created from the email; every product referenced has to exist already. A wishlist with any item that doesn't resolve is skipped whole and reported in skipped, one entry per bad item; set strict to fail on the first such item instead.

Requires the wishlists:write permission.

Costs 10 rate limit tokens instead of the usual one. See Rate limits.

Body Parameters

dataobject[]required

The wishlists to create or update.

strictboolean

When true, a row that references something missing fails the whole import with an error. Off by default: rows whose references don't resolve are skipped and reported in skipped.

Request
curl \
  -X POST \
  "https://api.cascade.dev/wishlists/import" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "data": [
    {
      "customer": "[email protected]",
      "name": "string",
      "isDefault": true,
      "metadata": "...",
      "shared": true,
      "items": [
        "..."
      ]
    }
  ],
  "strict": true
}'
Response
{
  "data": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "customerId": "550e8400-e29b-41d4-a716-446655440000",
      "name": "string",
      "metadata": "...",
      "notes": "string",
      "shared": true,
      "shareToken": "string",
      "isDefault": true,
      "createdAt": "2025-01-15T09:30:00Z",
      "updatedAt": "2025-01-15T09:30:00Z",
      "shareUrl": "https://example.com",
      "importJob": {
        "id": "...",
        "type": "...",
        "action": "...",
        "row": "...",
        "createdAt": "..."
      },
      "itemsCount": 0,
      "customer": {
        "id": "...",
        "email": "...",
        "phone": "...",
        "firstName": "...",
        "lastName": "...",
        "country": "...",
        "birthday": "...",
        "metadata": "...",
        "notes": "...",
        "emailOptOut": "...",
        "emailOptOutAt": "...",
        "emailOptOutSource": "...",
        "createdAt": "...",
        "updatedAt": "..."
      },
      "items": ["..."]
    }
  ],
  "skipped": [
    {
      "index": 0,
      "message": "string",
      "itemIndex": 0
    }
  ]
}

GET /wishlists/{id}

Get a single wishlist by ID.

Requires the wishlists:read permission.

Path Parameters

idstring (uuid)required

The ID of the wishlist.

Query Parameters

includestring

A comma-separated list of extra fields to compute and return. Each one costs an additional query, so ask only for what you need. Available: importJob, itemsCount, customer, items.

Request
curl \
  "https://api.cascade.dev/wishlists/550e8400-e29b-41d4-a716-446655440000" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY"
Response
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "customerId": "550e8400-e29b-41d4-a716-446655440000",
  "name": "string",
  "metadata": "...",
  "notes": "string",
  "shared": true,
  "shareToken": "string",
  "isDefault": true,
  "createdAt": "2025-01-15T09:30:00Z",
  "updatedAt": "2025-01-15T09:30:00Z",
  "shareUrl": "https://example.com",
  "importJob": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "type": "customers",
    "action": "created",
    "row": 0,
    "createdAt": "2025-01-15T09:30:00Z"
  },
  "itemsCount": 0,
  "customer": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "email": "[email protected]",
    "phone": "string",
    "firstName": "string",
    "lastName": "string",
    "country": "string",
    "birthday": "string",
    "metadata": "...",
    "notes": "string",
    "emailOptOut": true,
    "emailOptOutAt": "2025-01-15T09:30:00Z",
    "emailOptOutSource": "customer",
    "createdAt": "2025-01-15T09:30:00Z",
    "updatedAt": "2025-01-15T09:30:00Z"
  },
  "items": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "productId": "550e8400-e29b-41d4-a716-446655440000",
      "productVariantId": "550e8400-e29b-41d4-a716-446655440000",
      "quantity": 0,
      "note": "string",
      "purchasedQuantity": 0,
      "purchasedAt": "2025-01-15T09:30:00Z",
      "purchases": ["..."],
      "product": {
        "id": "...",
        "slug": "...",
        "title": "...",
        "description": "...",
        "imageUrl": "...",
        "url": "...",
        "metadata": "...",
        "notes": "...",
        "createdAt": "...",
        "updatedAt": "..."
      },
      "variant": {
        "id": "...",
        "slug": "...",
        "title": "...",
        "imageUrl": "...",
        "priceCents": "...",
        "currencyCode": "...",
        "available": "...",
        "metadata": "..."
      }
    }
  ]
}

PATCH /wishlists/{id}

Update a wishlist's metadata, notes, sharing state, or share token. The name and items belong to the customer and are changed through the storefront widget or an import. Sharing changes made here act on the customer's behalf and are recorded in the audit trail. Triggers the wishlist.updated webhook.

Requires the wishlists:write permission.

Path Parameters

idstring (uuid)required

The ID of the wishlist to update.

Body Parameters

metadataobject

Replaces the wishlist's metadata wholesale. Omit to leave it alone.

notesstring

Internal notes about the wishlist.

sharedboolean

Turns the wishlist's share link on or off. The customer normally controls this from the storefront.

shareTokenstring

Replaces the token in the wishlist's share link, invalidating the old link. Use 8 to 64 lowercase letters, digits, or hyphens. It has to be unique across all wishlists.

Request
curl \
  -X PATCH \
  "https://api.cascade.dev/wishlists/550e8400-e29b-41d4-a716-446655440000" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "metadata": "...",
  "notes": "string",
  "shared": true,
  "shareToken": "string"
}'
Response
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "customerId": "550e8400-e29b-41d4-a716-446655440000",
  "name": "string",
  "metadata": "...",
  "notes": "string",
  "shared": true,
  "shareToken": "string",
  "isDefault": true,
  "createdAt": "2025-01-15T09:30:00Z",
  "updatedAt": "2025-01-15T09:30:00Z",
  "shareUrl": "https://example.com",
  "importJob": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "type": "customers",
    "action": "created",
    "row": 0,
    "createdAt": "2025-01-15T09:30:00Z"
  },
  "itemsCount": 0,
  "customer": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "email": "[email protected]",
    "phone": "string",
    "firstName": "string",
    "lastName": "string",
    "country": "string",
    "birthday": "string",
    "metadata": "...",
    "notes": "string",
    "emailOptOut": true,
    "emailOptOutAt": "2025-01-15T09:30:00Z",
    "emailOptOutSource": "customer",
    "createdAt": "2025-01-15T09:30:00Z",
    "updatedAt": "2025-01-15T09:30:00Z"
  },
  "items": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "productId": "550e8400-e29b-41d4-a716-446655440000",
      "productVariantId": "550e8400-e29b-41d4-a716-446655440000",
      "quantity": 0,
      "note": "string",
      "purchasedQuantity": 0,
      "purchasedAt": "2025-01-15T09:30:00Z",
      "purchases": ["..."],
      "product": {
        "id": "...",
        "slug": "...",
        "title": "...",
        "description": "...",
        "imageUrl": "...",
        "url": "...",
        "metadata": "...",
        "notes": "...",
        "createdAt": "...",
        "updatedAt": "..."
      },
      "variant": {
        "id": "...",
        "slug": "...",
        "title": "...",
        "imageUrl": "...",
        "priceCents": "...",
        "currencyCode": "...",
        "available": "...",
        "metadata": "..."
      }
    }
  ]
}

DELETE /wishlists/{id}

Delete a wishlist and its items. Triggers the wishlist.deleted webhook.

Requires the wishlists:write permission.

Path Parameters

idstring (uuid)required

The ID of the wishlist to delete.

Request
curl \
  -X DELETE \
  "https://api.cascade.dev/wishlists/550e8400-e29b-41d4-a716-446655440000" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY"
Response
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "customerId": "550e8400-e29b-41d4-a716-446655440000",
  "name": "string",
  "metadata": "...",
  "notes": "string",
  "shared": true,
  "shareToken": "string",
  "isDefault": true,
  "createdAt": "2025-01-15T09:30:00Z",
  "updatedAt": "2025-01-15T09:30:00Z",
  "shareUrl": "https://example.com",
  "importJob": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "type": "customers",
    "action": "created",
    "row": 0,
    "createdAt": "2025-01-15T09:30:00Z"
  },
  "itemsCount": 0,
  "customer": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "email": "[email protected]",
    "phone": "string",
    "firstName": "string",
    "lastName": "string",
    "country": "string",
    "birthday": "string",
    "metadata": "...",
    "notes": "string",
    "emailOptOut": true,
    "emailOptOutAt": "2025-01-15T09:30:00Z",
    "emailOptOutSource": "customer",
    "createdAt": "2025-01-15T09:30:00Z",
    "updatedAt": "2025-01-15T09:30:00Z"
  },
  "items": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "productId": "550e8400-e29b-41d4-a716-446655440000",
      "productVariantId": "550e8400-e29b-41d4-a716-446655440000",
      "quantity": 0,
      "note": "string",
      "purchasedQuantity": 0,
      "purchasedAt": "2025-01-15T09:30:00Z",
      "purchases": ["..."],
      "product": {
        "id": "...",
        "slug": "...",
        "title": "...",
        "description": "...",
        "imageUrl": "...",
        "url": "...",
        "metadata": "...",
        "notes": "...",
        "createdAt": "...",
        "updatedAt": "..."
      },
      "variant": {
        "id": "...",
        "slug": "...",
        "title": "...",
        "imageUrl": "...",
        "priceCents": "...",
        "currencyCode": "...",
        "available": "...",
        "metadata": "..."
      }
    }
  ]
}

GET /wishlists/{id}/items/{itemId}/purchases

Read what has been bought against one wishlist item. This is the plain view: the customer's own orders and other people's gifts alike, because a merchant is not the gift recipient.

Requires the wishlists:read permission.

Path Parameters

idstring (uuid)required

The ID of the wishlist.

itemIdstring (uuid)required

The ID of the wishlist item.

Request
curl \
  "https://api.cascade.dev/wishlists/550e8400-e29b-41d4-a716-446655440000/items/550e8400-e29b-41d4-a716-446655440000/purchases" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY"
Response
{
  "itemId": "550e8400-e29b-41d4-a716-446655440000",
  "quantity": 0,
  "purchasedQuantity": 0,
  "purchases": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "source": "owner",
      "quantity": 0,
      "note": "string",
      "orderId": "550e8400-e29b-41d4-a716-446655440000",
      "purchasedAt": "2025-01-15T09:30:00Z"
    }
  ]
}

POST /wishlists/{id}/items/{itemId}/purchases

Mark a wishlist item as purchased on a gift buyer's behalf, for stores that detect gift purchases themselves. It counts as a gift, so the list's owner is never shown it. A purchase that would take the item past the quantity the customer asked for is rejected. The marking is recorded in the audit trail.

Requires the wishlists:write permission.

Path Parameters

idstring (uuid)required

The ID of the wishlist.

itemIdstring (uuid)required

The ID of the wishlist item.

Body Parameters

quantityinteger

How many were bought. Defaults to one.

notestring

A short note shown to other people viewing the list, such as who bought it.

Request
curl \
  -X POST \
  "https://api.cascade.dev/wishlists/550e8400-e29b-41d4-a716-446655440000/items/550e8400-e29b-41d4-a716-446655440000/purchases" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "quantity": 0,
  "note": "string"
}'
Response
{
  "itemId": "550e8400-e29b-41d4-a716-446655440000",
  "quantity": 0,
  "purchasedQuantity": 0,
  "purchases": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "source": "owner",
      "quantity": 0,
      "note": "string",
      "orderId": "550e8400-e29b-41d4-a716-446655440000",
      "purchasedAt": "2025-01-15T09:30:00Z"
    }
  ]
}

DELETE /wishlists/{id}/items/{itemId}/purchases

Clear every purchase recorded against a wishlist item, whether it came from the customer's own order, the shared page or your marking API. The reset is recorded in the audit trail.

Requires the wishlists:write permission.

Path Parameters

idstring (uuid)required

The ID of the wishlist.

itemIdstring (uuid)required

The ID of the wishlist item.

Request
curl \
  -X DELETE \
  "https://api.cascade.dev/wishlists/550e8400-e29b-41d4-a716-446655440000/items/550e8400-e29b-41d4-a716-446655440000/purchases" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY"
Response
{
  "data": {
    "itemId": "550e8400-e29b-41d4-a716-446655440000",
    "quantity": 0,
    "purchasedQuantity": 0,
    "purchases": [
      {
        "id": "...",
        "source": "...",
        "quantity": "...",
        "note": "...",
        "orderId": "...",
        "purchasedAt": "..."
      }
    ]
  },
  "clearedCount": 0
}

POST /wishlists/{id}/share-token

Generate a new share token for a wishlist on the customer's behalf, invalidating the old share link. The change is recorded in the audit trail. Triggers the wishlist.updated webhook.

Requires the wishlists:write permission.

Path Parameters

idstring (uuid)required

The ID of the wishlist.

Request
curl \
  -X POST \
  "https://api.cascade.dev/wishlists/550e8400-e29b-41d4-a716-446655440000/share-token" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY"
Response
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "customerId": "550e8400-e29b-41d4-a716-446655440000",
  "name": "string",
  "metadata": "...",
  "notes": "string",
  "shared": true,
  "shareToken": "string",
  "isDefault": true,
  "createdAt": "2025-01-15T09:30:00Z",
  "updatedAt": "2025-01-15T09:30:00Z",
  "shareUrl": "https://example.com",
  "importJob": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "type": "customers",
    "action": "created",
    "row": 0,
    "createdAt": "2025-01-15T09:30:00Z"
  },
  "itemsCount": 0,
  "customer": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "email": "[email protected]",
    "phone": "string",
    "firstName": "string",
    "lastName": "string",
    "country": "string",
    "birthday": "string",
    "metadata": "...",
    "notes": "string",
    "emailOptOut": true,
    "emailOptOutAt": "2025-01-15T09:30:00Z",
    "emailOptOutSource": "customer",
    "createdAt": "2025-01-15T09:30:00Z",
    "updatedAt": "2025-01-15T09:30:00Z"
  },
  "items": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "productId": "550e8400-e29b-41d4-a716-446655440000",
      "productVariantId": "550e8400-e29b-41d4-a716-446655440000",
      "quantity": 0,
      "note": "string",
      "purchasedQuantity": 0,
      "purchasedAt": "2025-01-15T09:30:00Z",
      "purchases": ["..."],
      "product": {
        "id": "...",
        "slug": "...",
        "title": "...",
        "description": "...",
        "imageUrl": "...",
        "url": "...",
        "metadata": "...",
        "notes": "...",
        "createdAt": "...",
        "updatedAt": "..."
      },
      "variant": {
        "id": "...",
        "slug": "...",
        "title": "...",
        "imageUrl": "...",
        "priceCents": "...",
        "currencyCode": "...",
        "available": "...",
        "metadata": "..."
      }
    }
  ]
}