API Reference
rewards
16 endpoints across 3 paths
- /api/v1/activities
- /api/v1/organizations
- /api/v1/rewards
/api/v1/activities
/api/v1/activities/{activity_slug}/rewardsList Activity Rewards
List all reward templates for an activity.
Path parameters
| activity_slug* | string |
Query parameters
| default_backend | string | default: "primary" |
| page | integer | default: 1 · ≥ 1 |
| page_size | integer | default: 20 · ≥ 1 · ≤ 100 |
| sort_by | string | null | |
| sort_order | string | default: "asc" |
Responses
| Field | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| total_items* | integer | Total number of items available | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| total_pages* | integer | Total number of pages available | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| current_page* | integer | Current page number | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| items* | RewardTemplateResponse[] | List of items on the current page | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
array items · RewardTemplateResponse
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
Example request
curl -X GET "https://api.davi.social/api/v1/activities/{activity_slug}/rewards" \
-H "Authorization: Bearer <token>"/api/v1/organizations
/api/v1/organizations/{organization_slug}/rewardsList Organization Rewards
List all reward templates for an organization.
Path parameters
| organization_slug* | string |
Query parameters
| default_backend | string | default: "primary" |
| page | integer | default: 1 · ≥ 1 |
| page_size | integer | default: 20 · ≥ 1 · ≤ 100 |
| sort_by | string | null | |
| sort_order | string | default: "asc" |
Responses
| Field | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| total_items* | integer | Total number of items available | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| total_pages* | integer | Total number of pages available | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| current_page* | integer | Current page number | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| items* | RewardTemplateResponse[] | List of items on the current page | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
array items · RewardTemplateResponse
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
Example request
curl -X GET "https://api.davi.social/api/v1/organizations/{organization_slug}/rewards" \
-H "Authorization: Bearer <token>"/api/v1/organizations/{organization_slug}/rewardsCreate Reward
Create a new reward template for an organization.
Requires an org-scoped token for the target organization.
A reward carries no point value yet: points may be omitted or sent as 0,
and a non-zero value is refused.
Path parameters
| organization_slug* | string |
Query parameters
| default_backend | string | default: "primary" |
Request body*application/json
| Field | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| organization_uuid* | string | string (uuid) | UUID of the organization creating the reward template | |||||||||||||||||||||||||||||||||||||||||||||
| activity_uuid | string | string (uuid) | null | UUID of the associated activity, if any | |||||||||||||||||||||||||||||||||||||||||||||
| name* | string | Name of the reward template | |||||||||||||||||||||||||||||||||||||||||||||
| description | string | Description of the reward template default: "" | |||||||||||||||||||||||||||||||||||||||||||||
| points | integer | Points required to redeem the reward. Point values are not accepted yet: omit the field or send 0, and any other value is refused. default: 0 | |||||||||||||||||||||||||||||||||||||||||||||
| category | string | null | Category of the reward | |||||||||||||||||||||||||||||||||||||||||||||
| supply_total | integer | null | Total supply of the reward. None means unlimited | |||||||||||||||||||||||||||||||||||||||||||||
| required_entitlement | string | null | Entitlement gate. None = open to everyone; 'member' = any active member; any other key = the member's active tier must grant it (grant the same key to several tiers to allow all of them). | |||||||||||||||||||||||||||||||||||||||||||||
| content_config* | ContentConfig | Configuration for the reward content | |||||||||||||||||||||||||||||||||||||||||||||
object · ContentConfig
| |||||||||||||||||||||||||||||||||||||||||||||||
Responses
| Field | Type | Description |
|---|---|---|
| uuid* | string | |
| version* | integer | |
| slug* | string | |
| organization_uuid* | string | |
| activity_uuid | string | null | |
| name* | string | |
| description | string | null | |
| points* | integer | |
| category | string | null | |
| supply_total | integer | null | |
| supply_redeemed* | integer | |
| required_entitlement | string | null | |
| content_config | object | null | |
| status* | enum | Lifecycle state, derived from is_draft and archived_at. |
| is_draft* | boolean | |
| archived_at | string (date-time) | null | |
| created_at* | string (date-time) | |
| updated_at | string (date-time) | null |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
Example request
curl -X POST "https://api.davi.social/api/v1/organizations/{organization_slug}/rewards" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{ /* request body */ }'/api/v1/rewards
/api/v1/rewardsList Rewards
List the rewards held across all of the caller's wallets, most recent first.
Paging walks the caller's transaction history, so total_items counts
transactions and a page carries only those that hold reward content. A
transaction that carries none — a points-only reward, an attendance proof, a
transfer — is not a reward and is left out, as is one whose content cannot
be read at all. A page can therefore be shorter than total_items suggests,
and an empty one does not mean the last page has been reached: keep paging
while current_page is below total_pages.
Content is served from a cache and refreshed when stale. A refresh that
fails falls back to the copy already cached, so a reward stays listed while
whoever hosts its manifest is unreachable. Read one reward's content with
GET /rewards/transactions/{transaction_id}.
Query parameters
| default_backend | string | default: "primary" |
| page | integer | default: 1 · ≥ 1 |
| page_size | integer | default: 20 · ≥ 1 · ≤ 100 |
| sort_by | string | null | |
| sort_order | string | default: "asc" |
Responses
| Field | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| total_items* | integer | Total number of items available | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| total_pages* | integer | Total number of pages available | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| current_page* | integer | Current page number | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| items* | UserRewardCacheResponse[] | List of items on the current page | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
array items · UserRewardCacheResponse
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
Example request
curl -X GET "https://api.davi.social/api/v1/rewards" \
-H "Authorization: Bearer <token>"/api/v1/rewards/{reward_slug}Get Reward
Get a reward template by slug (or uuid, until v1 is frozen).
What the caller may see depends on the reward's state rather than on which
path they used. A published, unarchived reward is discoverable by anyone
holding reward:read — that is what makes shareable redemption links work.
A draft or archived one is visible only to its organization: it is either
not ready to be seen or deliberately withdrawn.
Path parameters
| reward_slug* | string |
Responses
| Field | Type | Description |
|---|---|---|
| uuid* | string | |
| version* | integer | |
| slug* | string | |
| organization_uuid* | string | |
| activity_uuid | string | null | |
| name* | string | |
| description | string | null | |
| points* | integer | |
| category | string | null | |
| supply_total | integer | null | |
| supply_redeemed* | integer | |
| required_entitlement | string | null | |
| content_config | object | null | |
| status* | enum | Lifecycle state, derived from is_draft and archived_at. |
| is_draft* | boolean | |
| archived_at | string (date-time) | null | |
| created_at* | string (date-time) | |
| updated_at | string (date-time) | null |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
Example request
curl -X GET "https://api.davi.social/api/v1/rewards/{reward_slug}" \
-H "Authorization: Bearer <token>"/api/v1/rewards/{reward_slug}Update Reward
Update a reward template, including its lifecycle state.
status moves the reward between draft, published and archived; the
remaining fields edit its content. Requires an org-scoped token for the
reward's organization.
Sending a field is what edits it, so description, category,
activity_uuid, supply_total and required_entitlement are cleared by
sending null. Omit a field to leave it alone. name, points and
content_config have nothing to clear to and refuse a null.
supply_total is fixed once a reward is published, so sending it at all on
a published reward is refused rather than ignored.
A reward carries no point value yet: points may be omitted or sent as 0,
and a non-zero value is refused.
Path parameters
| reward_slug* | string |
Request body*application/json
| Field | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| status | enum | null | Move the reward through its lifecycle. `published` makes a draft live, `draft` returns a published reward to draft (only while it has no redemptions), and `archived` withdraws it. Omit to leave the state alone. | |||||||||||||||||||||||||||||||||||||||||||||
| activity_uuid | string | string (uuid) | null | UUID of the associated activity, if any | |||||||||||||||||||||||||||||||||||||||||||||
| name | string | null | Name of the reward template. Cannot be set to null. | |||||||||||||||||||||||||||||||||||||||||||||
| description | string | null | Description of the reward template. Send null to remove it. | |||||||||||||||||||||||||||||||||||||||||||||
| points | integer | null | Points required to redeem the reward. Point values are not accepted yet: omit the field or send 0, and any other value is refused. | |||||||||||||||||||||||||||||||||||||||||||||
| category | string | null | Category of the reward. Send null to remove it. | |||||||||||||||||||||||||||||||||||||||||||||
| supply_total | integer | null | Total supply of the reward; null means unlimited. Immutable once the reward is published, so sending it at all on a published reward is refused. | |||||||||||||||||||||||||||||||||||||||||||||
| required_entitlement | string | null | Entitlement gate ('member' = any member; a tier key = that capability). Null or an empty string clears the requirement. | |||||||||||||||||||||||||||||||||||||||||||||
| content_config | ContentConfig | null | Configuration for the reward content | |||||||||||||||||||||||||||||||||||||||||||||
object · ContentConfig
| |||||||||||||||||||||||||||||||||||||||||||||||
Responses
| Field | Type | Description |
|---|---|---|
| uuid* | string | |
| version* | integer | |
| slug* | string | |
| organization_uuid* | string | |
| activity_uuid | string | null | |
| name* | string | |
| description | string | null | |
| points* | integer | |
| category | string | null | |
| supply_total | integer | null | |
| supply_redeemed* | integer | |
| required_entitlement | string | null | |
| content_config | object | null | |
| status* | enum | Lifecycle state, derived from is_draft and archived_at. |
| is_draft* | boolean | |
| archived_at | string (date-time) | null | |
| created_at* | string (date-time) | |
| updated_at | string (date-time) | null |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
Example request
curl -X PATCH "https://api.davi.social/api/v1/rewards/{reward_slug}" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{ /* request body */ }'/api/v1/rewards/{reward_slug}Delete Reward
Permanently delete a draft reward template.
Only allowed if template is a draft and has no redemptions.
Requires an org-scoped token for the reward's organization.
Path parameters
| reward_slug* | string |
Responses
| Field | Type | Description |
|---|---|---|
| message* | string | Success or status message |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
Example request
curl -X DELETE "https://api.davi.social/api/v1/rewards/{reward_slug}" \
-H "Authorization: Bearer <token>"/api/v1/rewards/{reward_slug}/claimClaim Reward
Claim a reward that is being offered by its link, for yourself.
The recipient is always the caller — there is no identifier to name
someone else. That is the difference from /redeem, which issues on an
organization's behalf and demands an org-scoped token: here the link is the
authority, so a visitor's own token is enough and no membership in the
issuing organization is needed.
A reward is claimable this way only while it is published, unarchived and
carries an enabled trigger on the reward's link. Anything else — a slug the
platform never made, a draft, a reward whose link was never switched on —
answers 404, so a caller cannot tell which by probing.
Claiming twice returns the first claim's transaction rather than issuing again, so a double-tap or a retried request costs nothing. A reward gated on membership or an entitlement still refuses a caller who lacks it, and a reward whose supply is exhausted refuses everyone.
Charged to the expensive rate-limit bucket: a claim signs a ledger
transfer.
Path parameters
| reward_slug* | string |
Query parameters
| default_backend | string | default: "primary" |
Responses
RedemptionResultCompleted | RedemptionResultPending
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
Example request
curl -X POST "https://api.davi.social/api/v1/rewards/{reward_slug}/claim" \
-H "Authorization: Bearer <token>"/api/v1/rewards/{reward_slug}/propagatePropagate Reward
Propagate template changes to all existing holders.
Creates a background job that reverses old reward transactions and issues new ones with updated content.
Path parameters
| reward_slug* | string |
Responses
| Field | Type | Description |
|---|---|---|
| uuid* | string | |
| reward_template_uuid* | string | |
| from_version* | integer | |
| to_version* | integer | |
| total_count* | integer | |
| completed_count* | integer | |
| failed_count* | integer | |
| status* | string | |
| points_delta* | integer | |
| initiated_by* | string | |
| completed_at | string (date-time) | null | |
| failure_reason | string | null | |
| created_at* | string (date-time) | |
| updated_at | string (date-time) | null |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
Example request
curl -X POST "https://api.davi.social/api/v1/rewards/{reward_slug}/propagate" \
-H "Authorization: Bearer <token>"/api/v1/rewards/{reward_slug}/propagationsList Propagations
List all propagation records for a reward template.
Path parameters
| reward_slug* | string |
Responses
| Field | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| total_items* | integer | Total number of items available | |||||||||||||||||||||||||||||||||||||||||||||
| total_pages* | integer | Total number of pages available | |||||||||||||||||||||||||||||||||||||||||||||
| current_page* | integer | Current page number | |||||||||||||||||||||||||||||||||||||||||||||
| items* | RewardPropagationResponse[] | List of items on the current page | |||||||||||||||||||||||||||||||||||||||||||||
array items · RewardPropagationResponse
| |||||||||||||||||||||||||||||||||||||||||||||||
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
Example request
curl -X GET "https://api.davi.social/api/v1/rewards/{reward_slug}/propagations" \
-H "Authorization: Bearer <token>"/api/v1/rewards/{reward_slug}/propagations/{propagation_uuid}Get Propagation
Get a single propagation record.
Path parameters
| reward_slug* | string | |
| propagation_uuid* | string |
Responses
| Field | Type | Description |
|---|---|---|
| uuid* | string | |
| reward_template_uuid* | string | |
| from_version* | integer | |
| to_version* | integer | |
| total_count* | integer | |
| completed_count* | integer | |
| failed_count* | integer | |
| status* | string | |
| points_delta* | integer | |
| initiated_by* | string | |
| completed_at | string (date-time) | null | |
| failure_reason | string | null | |
| created_at* | string (date-time) | |
| updated_at | string (date-time) | null |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
Example request
curl -X GET "https://api.davi.social/api/v1/rewards/{reward_slug}/propagations/{propagation_uuid}" \
-H "Authorization: Bearer <token>"/api/v1/rewards/{reward_slug}/redeemRedeem Reward
Issue a reward to a recipient, on the organization's behalf.
Requires an org-scoped token for the reward's organization. That is the
difference from /claim, where the reward's link is the authority and the
recipient is always the caller: here you name someone else. The recipient is
a tagged-union identifier that resolves to a wallet, including a custodial
wallet with no Davi account — which is how a ticket reaches an attendee who
has only a card.
Two shapes of answer. A reward Davi hosts is issued inside the request
and comes back with its transaction_id. One generated by an external
service comes back with a delivery_uuid and nothing else: supply is
already reserved, but no reward exists yet and generation can still fail.
Poll GET /rewards/deliveries/{delivery_uuid} for the outcome rather than
reading the 200 as "issued".
Redeeming twice returns the first redemption rather than issuing again.
Send an idempotency_key to say which redemption a request is: two calls
carrying the same key are one redemption, and a retry after a timeout is
safe. Omit it and one is derived from the reward, the recipient and the
scope, so a repeat with those three unchanged is treated as the same
redemption — send a key when you mean a genuinely separate issue of the same
reward to the same person.
A reward that is still a draft, has been withdrawn, or has no supply left
refuses everyone. A reward gated on a membership or an entitlement refuses a
recipient who does not hold it, and a recipient with no Davi account holds
none — an entitlement-gated reward cannot be issued to a card-only
identifier. A reward the platform never made and one belonging to another
organization both answer 404.
Charged to the expensive rate-limit bucket: issuing signs a ledger
transfer.
Path parameters
| reward_slug* | string |
Query parameters
| default_backend | string | default: "primary" |
Request body*application/json
| Field | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| identifier* | IdentifierRef | Tagged-union recipient identifier (wallet/card/username/user_id/link). Resolves to a wallet, including custodial wallets with no Davi account. Use {type: 'user_id', value: <uuid>} to issue to a known Davi user. | |||||||||
object · IdentifierRef
| |||||||||||
| scope* | string | Scope of the redemption | |||||||||
| metadata | object | Additional metadata | |||||||||
| idempotency_key | string | null | Client-provided idempotency key, at most 64 characters. If not provided, one is derived from stable identifiers, so a repeated redemption of the same reward by the same recipient is recognised without the caller supplying anything. min length 1 · max length 64 | |||||||||
Responses
RedemptionResultCompleted | RedemptionResultPending
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
Example request
curl -X POST "https://api.davi.social/api/v1/rewards/{reward_slug}/redeem" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{ /* request body */ }'/api/v1/rewards/{reward_slug}/triggerTrigger Reward
Run this reward's trigger for one user, outside the event that normally fires it.
Distribution goes through the reward's enabled trigger rather than around it, so the same scope rules, deduplication and audit trail apply as an automatic firing — the bypass flags are what opt out of each, individually.
Requires an org-scoped token for the reward's organization.
Path parameters
| reward_slug* | string |
Request body*application/json
| Field | Type | Description |
|---|---|---|
| user_uuid* | string | string (uuid) | User UUID to trigger reward for |
| bypass_scope_validation | boolean | Skip scope pattern matching (admin override) default: false |
| bypass_deduplication | boolean | Skip deduplication check (allow duplicate rewards) default: false |
| metadata | object | Additional metadata to merge with trigger metadata |
Responses
| Field | Type | Description |
|---|---|---|
| success* | boolean | |
| transaction_id | string | null | |
| delivery_uuid | string | null | |
| trigger_name* | string | |
| user_uuid* | string | |
| reward_template_uuid* | string | |
| points_distributed* | integer | |
| matched_scope | string | null | |
| error | string | null | |
| details | object | null |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
Example request
curl -X POST "https://api.davi.social/api/v1/rewards/{reward_slug}/trigger" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{ /* request body */ }'/api/v1/rewards/deliveries/{delivery_uuid}Get Delivery Status
Poll the status of an async external reward generation.
When redeeming an external reward, the webhook delivery is processed asynchronously. This endpoint allows clients to poll for the result by delivery UUID.
Path parameters
| delivery_uuid* | string |
Responses
| Field | Type | Description |
|---|---|---|
| status* | enum | Status of the external reward generation |
| delivery_uuid | string | null | Webhook delivery UUID for polling (when status is pending) |
| transaction_id | string | null | Transaction ID (when status is completed) |
| error | string | null | Error message (when status is failed) |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
Example request
curl -X GET "https://api.davi.social/api/v1/rewards/deliveries/{delivery_uuid}" \
-H "Authorization: Bearer <token>"/api/v1/rewards/files/{file_id}Get Reward File
Read one item out of a reward — a badge, certificate, attachment, coupon, ticket or profile asset — by the opaque id the reward listed it under.
The id is assigned when the reward is issued and names that item for as
long as the holder has it. Content being refetched, corrected or reordered
does not move it, which is what makes it safe to store or to put in a link.
Whoever authors a reward's content does not choose it — an uid sent on an
item is ignored and replaced.
The item is returned with the origin it was issued under: the transaction, the content version and when it was generated.
Reads the same cached content as the reward itself, on the same terms — a refresh that fails falls back to the copy already cached, so an item stays readable while its manifest's host is unreachable. An id naming an item the reward does not have, and one naming a reward held by somebody else, both answer as not found.
Path parameters
| file_id* | string |
Query parameters
| default_backend | string | default: "primary" |
Responses
| Field | Type | Description | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| transaction_id* | string | Transaction ID of the cached reward | |||||||||||||||||||||||||||
| content_version* | string | Version of the reward content schema | |||||||||||||||||||||||||||
| generated_at | string (date-time) | null | When the reward content was generated | |||||||||||||||||||||||||||
| template_slug | string | null | Public identifier of the reward this item was issued from. Null on content issued before it was recorded, and on content davi did not author. | |||||||||||||||||||||||||||
| reward_name | string | null | Reward template name at issuance | |||||||||||||||||||||||||||
| reward_description | string | null | Reward template description at issuance | |||||||||||||||||||||||||||
| issuer | IssuerSnapshot | null | Issuer details at time of issuance | |||||||||||||||||||||||||||
object · IssuerSnapshot
| |||||||||||||||||||||||||||||
| activity | ActivitySnapshot | null | Activity details at time of issuance (if activity-linked) | |||||||||||||||||||||||||||
object · ActivitySnapshot
| |||||||||||||||||||||||||||||
| data* | RewardBadge | RewardCertificate | RewardAttachment | RewardCoupon | RewardVoucher | RewardTicket | RewardAsset | The file data (badge, certificate, attachment, coupon, voucher, ticket, asset) | |||||||||||||||||||||||||||
| preview_url | string | null | Resolved media URL for previewing an asset item (media viewer). Populated for installable asset previews; null otherwise. | |||||||||||||||||||||||||||
| installable | boolean | Whether this item is an installable reward asset (show an Install button). default: false | |||||||||||||||||||||||||||
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
Example request
curl -X GET "https://api.davi.social/api/v1/rewards/files/{file_id}" \
-H "Authorization: Bearer <token>"/api/v1/rewards/transactions/{transaction_id}Get Reward By Transaction
Read one reward's content, keyed on the transaction that issued it.
Content is cached and refreshed once it goes stale. A refresh that fails falls back to the copy already cached, so the reward stays readable while whoever hosts its manifest is unreachable; only a reward with nothing cached and nothing reachable answers with the reason it could not be read.
A transaction that belongs to nobody's wallet and one that belongs to someone else's answer identically. A transaction carrying no reward content at all — points on their own, an attendance proof — is not found here.
Path parameters
| transaction_id* | string |
Query parameters
| default_backend | string | default: "primary" |
Responses
| Field | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| transaction_id* | string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| wallet_address | string | null | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cached_content* | IssuedRewardContent | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
object · IssuedRewardContent
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| content_hash* | string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cached_at* | string (date-time) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cache_expires_at | string (date-time) | null | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cache_hit_count* | integer | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| last_accessed_at | string (date-time) | null | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| source_type* | string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| source_url | string | null | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fetch_latency_ms | integer | null | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
| Field | Type | Description |
|---|---|---|
| errors* | object | Map of field names to error messages. Use '_root' for form-level errors. |
| message* | string | Human-readable error summary |
| code | string | null | Machine-readable error code |
| details | object | null | What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field. |
Example request
curl -X GET "https://api.davi.social/api/v1/rewards/transactions/{transaction_id}" \
-H "Authorization: Bearer <token>"