Order tags

GET /order-tags

List the organization's order tags, alphabetically by default. Supports filtering and cursor pagination.

Requires the orders: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 name.

filterstring

A JSON-encoded filter document, for example {"createdAt":{"$gte":"2025-01-01T00:00:00Z"}}. Filterable fields: id, name, createdAt. See Filtering for the syntax.

Request
curl \
  "https://api.cascade.dev/order-tags" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY"
Response
{
  "data": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "string",
      "createdAt": "2025-01-15T09:30:00Z",
      "updatedAt": "2025-01-15T09:30:00Z"
    }
  ],
  "nextCursor": "string"
}

POST /order-tags

Create an order tag. Triggers the orderTag.created webhook.

Requires the orders:write permission.

Body Parameters

dataobjectrequired

The tag to create.

Request
curl \
  -X POST \
  "https://api.cascade.dev/order-tags" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "data": {
    "name": "string"
  }
}'
Response
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "string",
  "createdAt": "2025-01-15T09:30:00Z",
  "updatedAt": "2025-01-15T09:30:00Z"
}

GET /order-tags/{id}

Get a single order tag by ID.

Requires the orders:read permission.

Path Parameters

idstring (uuid)required

The ID of the tag.

Request
curl \
  "https://api.cascade.dev/order-tags/550e8400-e29b-41d4-a716-446655440000" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY"
Response
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "string",
  "createdAt": "2025-01-15T09:30:00Z",
  "updatedAt": "2025-01-15T09:30:00Z"
}

PUT /order-tags/{id}

Rename an order tag. Every order carrying it picks up the new name. Triggers the orderTag.updated webhook.

Requires the orders:write permission.

Path Parameters

idstring (uuid)required

The ID of the tag to rename.

Body Parameters

dataobjectrequired

The fields to update.

Request
curl \
  -X PUT \
  "https://api.cascade.dev/order-tags/550e8400-e29b-41d4-a716-446655440000" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "data": {
    "name": "string"
  }
}'
Response
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "string",
  "createdAt": "2025-01-15T09:30:00Z",
  "updatedAt": "2025-01-15T09:30:00Z"
}

DELETE /order-tags/{id}

Delete an order tag and remove it from every order carrying it. The orders themselves are untouched. Triggers the orderTag.deleted webhook.

Requires the orders:write permission.

Path Parameters

idstring (uuid)required

The ID of the tag to delete.

Request
curl \
  -X DELETE \
  "https://api.cascade.dev/order-tags/550e8400-e29b-41d4-a716-446655440000" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY"
Response
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "string",
  "createdAt": "2025-01-15T09:30:00Z",
  "updatedAt": "2025-01-15T09:30:00Z"
}