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

# List challenges

Lists restaurant challenges — reward campaigns a member completes to earn FLY.
A challenge's `type` sets how it's completed: `PAYMENT` (spend), `REFERRALS`,
`DINES`, or `PASSPORT`. The `threshold` object carries the relevant target for
that type, and `fly_reward` is what the member earns.

Pass the `restaurant` UUID you want challenges for (required); `location`
optionally narrows the results to a single venue.

Auth: API key in `X-API-Key`. The key must carry the
`read:restaurant_challenges` scope.

## Example

```bash theme={null}
curl "https://api.staging.blackbird.xyz/flynet/v1/challenges?restaurant=14339db3-2e7a-42c4-aa98-4c0fb18679eb&page=0&page_size=50" \
  -H "X-API-Key: $API_KEY"
```

## Response

```json theme={null}
{
  "challenges": [
    {
      "id": "c1a2b3c4-d5e6-4f70-8a9b-0c1d2e3f4a5b",
      "object": "challenge",
      "type": "PAYMENT",
      "title": "Pay with Blackbird",
      "description": "Spend $50 with Blackbird Pay to earn FLY.",
      "image": null,
      "threshold": {
        "spend_threshold": { "value": "5000", "currency": "USD" }
      },
      "fly_reward": { "value": "1000000000000000000", "currency": "FLY" },
      "start_time": null,
      "end_time": null,
      "terms": ["One reward per member."],
      "accepted_currencies": ["USD"],
      "created_at": "2026-06-01T00:00:00Z",
      "updated_at": "2026-06-01T00:00:00Z"
    }
  ],
  "pagination": {
    "total_count": 1,
    "total_pages": 1,
    "current_page": 0,
    "next_page": null,
    "page_size": 50
  }
}
```

<Note>
  **Tasting note** — the money fields (`fly_reward`, and the
  `threshold.spend_threshold` / `threshold.minimum_spend` amounts) are
  big-integer strings in the smallest unit of their currency — parse them with a
  big-integer type, never a float. The other thresholds (`dine_threshold`,
  `referral_threshold`) are plain integer counts. Currency casing isn't
  guaranteed across endpoints; compare it case-insensitively.
</Note>

| Field        | Type   | Notes                                                           |
| ------------ | ------ | --------------------------------------------------------------- |
| `type`       | string | `PAYMENT`, `REFERRALS`, `DINES`, or `PASSPORT`.                 |
| `threshold`  | object | Targets for completion; which fields are set depends on `type`. |
| `fly_reward` | object | FLY earned on completion.                                       |
| `terms`      | array  | Human-readable terms.                                           |
