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

# Display progress and gifts

> Read campaign progress and display each member’s saved retailer gifts.

Read current progress using the member ID saved for the signed-in user:

```sh theme={null}
curl --silent --show-error \
  "$HYDRA_BASE_URL/integration/members/7b9b1e00-1100-4000-8000-000000000001/rewards" \
  --header "Authorization: Bearer $HYDRA_TOKEN"
```

A `200` response might show a reached goal while the gift is being prepared:

```json theme={null}
{
  "member_id": "7b9b1e00-1100-4000-8000-000000000001",
  "points_balance": 30,
  "campaigns": [{
    "id": "7b9b1e00-3300-4000-8000-000000000001",
    "name": "Member reward",
    "status": "active",
    "member_status": "goal_reached",
    "trigger_type": "points",
    "progress": 30,
    "remaining": 0,
    "threshold": 30,
    "occurrence": 1,
    "repeatable": false,
    "window_ends_at": null,
    "window_expired": false,
    "reward": {
      "title": "Retailer gift",
      "retailer": "Example retailer",
      "amount_cents": 500,
      "currency": "ZAR"
    },
    "reward_status": "processing",
    "reason": null
  }],
  "rewards": [{
    "id": "7b9b1e00-5500-4000-8000-000000000001",
    "status": "processing",
    "reason": null
  }],
  "next_campaign_after": null,
  "next_reward_after": null
}
```

Keep these meanings separate:

| Field | How to use it |
| - | - |
| `points_balance` | Current total from this business's point records. It can include permitted activity outside the app. It is not automatically this campaign's progress. |
| `status` on a campaign | The business's campaign configuration: draft, active, paused or ended. |
| `member_status` | `not_entered`, `in_progress`, `goal_reached` or `awarded`. A reached goal can still be waiting for a gift; confirmed retailer issuance or an existing house achievement is awarded. |
| `trigger_type`, `progress`, `threshold` | The goal's units and current counted progress. Units can be points, a selected action or joining; existing visit goals retain their rules. The first qualifying action counts when it opens campaign entry. |
| `remaining` | Additional units needed. Use this value instead of calculating threshold minus progress; previous rewards and goal edits can affect it. |
| `occurrence`, `repeatable` | Which reward occurrence the progress describes, and whether the campaign repeats. A non-repeatable campaign normally has occurrence 1. |
| `window_ends_at`, `window_expired` | When the member's campaign window ends and whether it has elapsed. Reading does not restart it. |
| `reward_status`, `reason` | The gift's current state or the reason it is delayed. A reached goal may not have a gift ID yet. |
| `rewards` | Saved retailer gift summaries for this linked member at the business, including separate staff gifts. Open a gift for its details. |

Use the returned progress: a member's existing balance may differ from what counts
toward a campaign. Campaigns appear according to their audience, prerequisites and
dates; entered paused or ended campaigns can remain visible. Business-created
rewards can also appear in campaign progress, while gift details cover retailer gifts.

When a member has already qualified, `goal_reached` and zero remaining preserve
that pending reward through later goal or repeatability edits. Keep displaying it
even if the current progress is below the new threshold. After it is settled,
the response follows the current rules for further earning.

### Read all relevant pages

Both arrays default to at most 20 entries per request. Use `limit` from 1 to 50.
Campaigns and gifts have independent UUID cursors and are ordered by UUID, not
by the most recent activity.

```http theme={null}
GET /v1/integration/members/{memberId}/rewards?limit=20&campaign_after={next_campaign_after}&reward_after={next_reward_after}
```

Send a cursor only when it is non-null. To advance one list, pass its returned
cursor and keep the other list's cursor unchanged. Each response includes both
lists, so unchanged pages from the other list can repeat; deduplicate by ID.
Continue each list until its next cursor is null.

A campaign page can be empty and still have a next cursor; continue until the
cursor is null. Pages reflect current data, so refresh from the beginning when
you need an updated list. UUID order does not indicate when a gift was earned.

## Open and display a saved gift

Use a reward ID returned by an activity receipt or the current member program.
Gifts created during later recovery appear in current progress without changing
the original activity receipt.

```sh theme={null}
curl --silent --show-error \
  "$HYDRA_BASE_URL/integration/rewards/7b9b1e00-5500-4000-8000-000000000001" \
  --header "Authorization: Bearer $HYDRA_TOKEN"
```

A confirmed issued gift with a saved code can return:

```json theme={null}
{
  "id": "7b9b1e00-5500-4000-8000-000000000001",
  "member_id": "7b9b1e00-1100-4000-8000-000000000001",
  "campaign_id": "7b9b1e00-3300-4000-8000-000000000001",
  "status": "issued",
  "reason": null,
  "title": "Retailer gift",
  "retailer": "Example retailer",
  "amount_cents": 500,
  "currency": "ZAR",
  "voucher": {
    "code": "EXAMPLE-NOT-A-VALID-VOUCHER",
    "qr_payload": null,
    "issued_at": null,
    "expires_at": null,
    "expiry_source": null,
    "instructions": "Follow the confirmed retailer instructions returned for this gift."
  },
  "redeemed_at": null
}
```

Before returning these details to your app, check that `member_id` matches the
signed-in account's saved member ID.

Render a QR only when `qr_payload` is present, using that exact payload. Otherwise,
show the saved code and instructions without generating a QR from the code.
Confirm the retailer's redemption requirements during your live test.

Responses use `Cache-Control: no-store`. Keep codes and QR payloads out of shared
caches, public pages, logs and analytics. Clear private reward data on sign-out
or account switch.

### Interpret gift states

| State | What to show and do |
| - | - |
| `processing` | The saved request is pending. No usable voucher is confirmed. Refresh within the [shared request budget](https://docs.usehydra.co.za/integrations/app-rewards/support.md#budget-reads-and-retries) while the rewards page is open. |
| `blocked` | Issuance needs attention. Keep earned progress visible and follow the [support process](https://docs.usehydra.co.za/integrations/app-rewards/support.md). |
| `under_review` | The outcome needs checking. Contact us; do not create another activity or attempt a replacement gift. |
| `issued` | Issuance is confirmed. Show voucher details only if `voucher` is non-null. This is saved evidence, not a live guarantee of till acceptance. |
| `redeemed` | Recorded evidence confirms redemption. The voucher is null; show the recorded outcome. |
| `reversed` | Reversal is recorded and the voucher is null. Any preserved redemption history does not make it usable again. |
| `expired` | Verified expiry was explicitly recorded. The voucher is null. A date passing on the app's clock alone is not this status. |

Reasons are null except on blocked outcomes. An issuance request awaiting a result
can become `under_review` after 90 seconds. Reading a gift does not retry issuance
or send a message.

### Handle optional gift details

| Field | How to handle it |
| - | - |
| `voucher` | Null before issuance and after redemption, reversal or verified expiry. An older issued gift without a saved code can also return null. |
| `amount_cents` | Saved gift amount; may be null for legacy staff gifts. |
| `retailer`, `currency` | Current offering descriptions when known; they are not historical snapshots and may be null. |
| `campaign_id` | Hydra's campaign UUID when linked, otherwise null, such as an independent staff gift. |
| `issued_at` | Currently null. Leave it unknown rather than substituting activity or request time. |
| `expires_at`, `expiry_source` | Saved deadline evidence. Source is `provider`, `local` or null; unknown values stay null. Do not fabricate an expiry date or infer a new gift status from a local deadline. |
| `redeemed_at` | Recorded redemption evidence when available. Preserved history can remain after reversal. |

`issued` confirms gift issuance, independently of WhatsApp delivery or redemption.
These API calls let you read outcomes; they do not mark gifts redeemed, reversed
or expired.

Next: [Support and recovery](https://docs.usehydra.co.za/integrations/app-rewards/support.md).


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