> ## Documentation Index
> Fetch the complete documentation index at: https://docs.quackpay.com.br/llms.txt
> Use this file to discover all available pages before exploring further.

# Build a catalog workflow

> Create a reusable choice catalog and use it from decision requests.

Use this workflow when several callers share the same choices. Catalog endpoints require a bearer API key in the current contract.

## Create the catalog

Choose an ID that is stable in your application. The ID may contain letters, numbers, `.`, `_`, and `-`, and may be up to 128 characters long.

```bash cURL theme={null}
curl https://api.aspaslabs.com/v1/catalogs \
  -X POST \
  -H "Authorization: Bearer $ASPAS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "support-actions",
    "model": "goldenfish-g1",
    "choices": [
      "reset_password",
      "billing",
      "cancel_account",
      "technical_issue"
    ],
    "version": "20261011.120000",
    "visibility": "private"
  }'
```

The response contains the catalog ID, model, choices, version, and visibility.

## Read the catalog

```bash cURL theme={null}
curl https://api.aspaslabs.com/v1/catalogs/support-actions \
  -H "Authorization: Bearer $ASPAS_API_KEY"
```

Use this endpoint to verify the current definition before a deployment or to build an internal configuration view. It is not a dashboard endpoint; there is no hosted dashboard for managing catalogs yet.

## Use the catalog in a decision

Replace the inline `choices` array with `catalog`:

```bash cURL theme={null}
curl https://api.aspaslabs.com/v1/decisions \
  -H "Authorization: Bearer $ASPAS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "goldenfish-g1",
    "input": "I was charged twice for the same order.",
    "instruction": "Which support action applies?",
    "catalog": "support-actions"
  }'
```

The decision request must not include `choices` and `catalog` together. The model in the decision request should match the catalog's model.

## Delete a retired catalog

```bash cURL theme={null}
curl https://api.aspaslabs.com/v1/catalogs/support-actions \
  -X DELETE \
  -H "Authorization: Bearer $ASPAS_API_KEY"
```

A successful delete returns `204 No Content`. Remove the catalog from application configuration only after all callers have migrated or stopped using it.

## Change management

Treat catalog changes like code changes:

1. Review additions and removals.
2. Update the `version` label.
3. Test representative inputs against the new choices.
4. Deploy the new catalog and caller together when possible.
5. Keep the previous definition in your own change history if you need to interpret old decisions.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.