API Reference
memberships
25 endpoints across 2 paths
- /api/v1/memberships
- /api/v1/organizations
/api/v1/memberships
/api/v1/membershipsList Memberships
Get all active memberships for the current user across all organizations.
Returns membership details including organization name and tier information.
A membership the holder has given notice on is still listed and still
active: cancelled_at says notice was given and valid_until says when
access ends.
For org-scoped tokens, filters to only memberships in the scoped organization.
Query parameters
| default_backend | string | default: "primary" |
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* | UserMembershipWithOrgResponse[] | List of items on the current page | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
array items · UserMembershipWithOrgResponse
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 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/memberships" \
-H "Authorization: Bearer <token>"/api/v1/memberships/{organization_slug}Change My Tier
Move the caller's own membership to another of the organization's tiers.
The term comes with them, re-expressed in the new tier's days. What is left is worth what it is worth, so it buys fewer days on a dearer tier and more on a cheaper one, and no money changes hands either way — a membership with a fortnight of a cheap tier left arrives with a few days of an expensive one, not with a bill. The join date, the history and the membership itself are the ones they had.
Only a tier the organization offers openly can be moved to. A tier it
keeps closed, one belonging to another organization, and one that does not
exist all answer 404 alike, so a refusal cannot be used to find out what
an organization runs privately. A price agreed for the tier being left does
not follow the member to the new one, because it was agreed for that tier.
A membership that has already lapsed cannot be moved, and answers 409:
there is no term left to carry, and coming back is renewing or joining
rather than switching. Moving from a membership that costs nothing onto a
tier that costs something answers 402 — nothing was spent to carry over,
so that is a purchase and goes through a checkout first.
The organization's own version of this, which can also set a custom price
for the member, is
PATCH /api/v1/organizations/{organization_slug}/memberships/{user_uuid}.
Path parameters
| organization_slug* | string |
Query parameters
| default_backend | string | default: "primary" |
Request body*application/json
| Field | Type | Description |
|---|---|---|
| membership_tier_slug* | string | Slug of the tier to move to, which must be one the organization offers openly. |
Responses
| Field | Type | Description |
|---|---|---|
| uuid* | string | |
| user_uuid* | string | |
| organization_uuid* | string | |
| tier_uuid* | string | |
| custom_tier_price_cents | integer | null | |
| custom_tier_payment_interval | enum | null | |
| valid_until | string (date-time) | null | |
| renewable_until | string (date-time) | null | The last moment this membership can be renewed as itself. Access stops at `valid_until`; for a while after that the row is still here, so renewing continues the same membership on the same history rather than starting a new one. Past this the membership is retired, and coming back is joining again. Equal to `valid_until` once notice has been given, because a cancelled membership is retired at its term and gets no such window. Null for a membership that never expires, which has nothing to renew. |
| joined_at* | string (date-time) | |
| cancelled_at | string (date-time) | null | When the holder asked to end this membership. Set means it will not continue past `valid_until`, which is the date access actually ends — until then the membership is still active and still grants its tier's entitlements. |
| created_at* | string (date-time) | |
| updated_at | string (date-time) | null | |
| organization_name* | string | |
| organization_slug* | string | |
| tier_name* | string | |
| tier_slug* | string | |
| tier_price_cents* | integer | What the tier charges per term, in the minor units of `tier_currency`. `custom_tier_price_cents`, where set, overrides it for this member. Zero on both means the membership is free, which is the case it can be renewed without a payment. |
| tier_currency* | string | ISO 4217 code both `tier_price_cents` and `custom_tier_price_cents` are denominated in |
| tier_payment_interval* | enum | How often the tier charges. Part of the price rather than a detail beside it — the same amount monthly and yearly are twelve times apart — so an amount cannot be shown without it. `custom_tier_payment_interval`, where set, overrides it for this member. |
| tier_description | string | null | The tier in the organization's own words. |
| tier_inclusions | string[] | What the tier gets its members, in the organization's own words. Here rather than only on the tier listing because a member's own tier need not be listed — a private or unlisted one appears in no catalogue, and its holder would have nothing to read. Presentational: nothing tests these, and `entitlements` is what gates anything. |
| 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/memberships/{organization_slug}" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{ /* request body */ }'/api/v1/memberships/{organization_slug}Cancel My Membership
Cancel the caller's own membership at the end of its current term.
Access is not withdrawn here. The membership keeps its tier, its
entitlements and its wallet until valid_until, and simply does not
continue past it — so cancelling on the second day of a year that was paid
for does not forfeit the rest of it. The response carries cancelled_at
alongside the valid_until that access actually ends on.
Two memberships have no remaining term and so end at once, with
valid_until pulled back to now: a one-time membership, which never had an
expiry to wait for, and one that had already lapsed.
Reversible while it runs — POST /memberships/{organization_slug}/resume
withdraws the notice. Cancelling a membership already cancelled is a
conflict, not a second cancellation. Not enrolled and no such organization
both answer 404.
Path parameters
| organization_slug* | string |
Query parameters
| default_backend | string | default: "primary" |
Responses
| Field | Type | Description |
|---|---|---|
| uuid* | string | |
| user_uuid* | string | |
| organization_uuid* | string | |
| tier_uuid* | string | |
| custom_tier_price_cents | integer | null | |
| custom_tier_payment_interval | enum | null | |
| valid_until | string (date-time) | null | |
| renewable_until | string (date-time) | null | The last moment this membership can be renewed as itself. Access stops at `valid_until`; for a while after that the row is still here, so renewing continues the same membership on the same history rather than starting a new one. Past this the membership is retired, and coming back is joining again. Equal to `valid_until` once notice has been given, because a cancelled membership is retired at its term and gets no such window. Null for a membership that never expires, which has nothing to renew. |
| joined_at* | string (date-time) | |
| cancelled_at | string (date-time) | null | When the holder asked to end this membership. Set means it will not continue past `valid_until`, which is the date access actually ends — until then the membership is still active and still grants its tier's entitlements. |
| created_at* | string (date-time) | |
| updated_at | string (date-time) | null | |
| organization_name* | string | |
| organization_slug* | string | |
| tier_name* | string | |
| tier_slug* | string | |
| tier_price_cents* | integer | What the tier charges per term, in the minor units of `tier_currency`. `custom_tier_price_cents`, where set, overrides it for this member. Zero on both means the membership is free, which is the case it can be renewed without a payment. |
| tier_currency* | string | ISO 4217 code both `tier_price_cents` and `custom_tier_price_cents` are denominated in |
| tier_payment_interval* | enum | How often the tier charges. Part of the price rather than a detail beside it — the same amount monthly and yearly are twelve times apart — so an amount cannot be shown without it. `custom_tier_payment_interval`, where set, overrides it for this member. |
| tier_description | string | null | The tier in the organization's own words. |
| tier_inclusions | string[] | What the tier gets its members, in the organization's own words. Here rather than only on the tier listing because a member's own tier need not be listed — a private or unlisted one appears in no catalogue, and its holder would have nothing to read. Presentational: nothing tests these, and `entitlements` is what gates anything. |
| 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/memberships/{organization_slug}" \
-H "Authorization: Bearer <token>"/api/v1/memberships/{organization_slug}/cardsList My Membership Cards
List the cards linked to the caller's membership wallet here.
These are the cards that carry this membership rather than every card the caller holds — a membership mints a wallet, and a card linked to that wallet is one that identifies its holder to this organization. A membership with nothing linked to it answers with an empty list, which is ordinary: a membership joined on the web has no card until one is handed over.
is_frozen is the organization's doing and cannot be undone from here.
Requires a membership: not enrolled and no such organization both answer
404.
Path parameters
| organization_slug* | string |
Query parameters
| default_backend | string | default: "primary" |
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* | MembershipCardResponse[] | List of items on the current page | |||||||||||||||||||||
array items · MembershipCardResponse
| |||||||||||||||||||||||
| 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/memberships/{organization_slug}/cards" \
-H "Authorization: Bearer <token>"/api/v1/memberships/{organization_slug}/historyList My Membership History
List how the caller's membership in this organization got to where it is.
Newest first, and it covers more than the membership they hold now: a spell that lapsed and was later rejoined is a separate record, and both are here. Each entry names the tier that spell was on, so moving between tiers reads as the sequence it was.
A pending revocation is not in this. Where an organization has started removing the caller and the notice has not run out, the membership is still live and still granting what it always did, and nothing here says otherwise — the same silence the membership itself keeps. A spell already ended does carry the date it ended on.
Requires a membership: not enrolled and no such organization both answer
404, which is the same refusal as every other operation here.
Path parameters
| organization_slug* | string |
Query parameters
| default_backend | string | default: "primary" |
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* | OwnMembershipHistoryResponse[] | List of items on the current page | |||||||||||||||||||||||||||||||||
array items · OwnMembershipHistoryResponse
| |||||||||||||||||||||||||||||||||||
| 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/memberships/{organization_slug}/history" \
-H "Authorization: Bearer <token>"/api/v1/memberships/{organization_slug}/renewRenew My Membership
Extend the caller's own membership by another term.
The new term is added to the end of the one being served rather than to the moment of renewal, so renewing early keeps whatever was left. A membership that had already lapsed starts a fresh term from now. Renewing also withdraws a cancellation, since it is the opposite intent.
Only a membership that costs nothing can be renewed here. One carrying a
price — the tier's, or the custom price set for this member — answers 402
with the amount and currency owed, because nothing on this route collects
it; paying for a term is a checkout the member is sent through first, and
the grant then follows the settled payment rather than this call. A
one-time membership never expires and so has no term to add to; the call
succeeds and changes nothing.
Not enrolled and no such organization both answer 404.
Path parameters
| organization_slug* | string |
Query parameters
| default_backend | string | default: "primary" |
Responses
| Field | Type | Description |
|---|---|---|
| uuid* | string | |
| user_uuid* | string | |
| organization_uuid* | string | |
| tier_uuid* | string | |
| custom_tier_price_cents | integer | null | |
| custom_tier_payment_interval | enum | null | |
| valid_until | string (date-time) | null | |
| renewable_until | string (date-time) | null | The last moment this membership can be renewed as itself. Access stops at `valid_until`; for a while after that the row is still here, so renewing continues the same membership on the same history rather than starting a new one. Past this the membership is retired, and coming back is joining again. Equal to `valid_until` once notice has been given, because a cancelled membership is retired at its term and gets no such window. Null for a membership that never expires, which has nothing to renew. |
| joined_at* | string (date-time) | |
| cancelled_at | string (date-time) | null | When the holder asked to end this membership. Set means it will not continue past `valid_until`, which is the date access actually ends — until then the membership is still active and still grants its tier's entitlements. |
| created_at* | string (date-time) | |
| updated_at | string (date-time) | null | |
| organization_name* | string | |
| organization_slug* | string | |
| tier_name* | string | |
| tier_slug* | string | |
| tier_price_cents* | integer | What the tier charges per term, in the minor units of `tier_currency`. `custom_tier_price_cents`, where set, overrides it for this member. Zero on both means the membership is free, which is the case it can be renewed without a payment. |
| tier_currency* | string | ISO 4217 code both `tier_price_cents` and `custom_tier_price_cents` are denominated in |
| tier_payment_interval* | enum | How often the tier charges. Part of the price rather than a detail beside it — the same amount monthly and yearly are twelve times apart — so an amount cannot be shown without it. `custom_tier_payment_interval`, where set, overrides it for this member. |
| tier_description | string | null | The tier in the organization's own words. |
| tier_inclusions | string[] | What the tier gets its members, in the organization's own words. Here rather than only on the tier listing because a member's own tier need not be listed — a private or unlisted one appears in no catalogue, and its holder would have nothing to read. Presentational: nothing tests these, and `entitlements` is what gates anything. |
| 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/memberships/{organization_slug}/renew" \
-H "Authorization: Bearer <token>"/api/v1/memberships/{organization_slug}/resumeResume My Membership
Withdraw a cancellation, so the membership carries on past its term.
Clears cancelled_at and changes nothing else — the term, the tier and the
join date are all untouched, because nothing about them had changed. Only
reaches a membership that is still running: one that has already lapsed is
finished, and coming back from there is joining again on a new term.
A membership that was not cancelled is a conflict. Not enrolled and no such organization both answer 404.
Path parameters
| organization_slug* | string |
Query parameters
| default_backend | string | default: "primary" |
Responses
| Field | Type | Description |
|---|---|---|
| uuid* | string | |
| user_uuid* | string | |
| organization_uuid* | string | |
| tier_uuid* | string | |
| custom_tier_price_cents | integer | null | |
| custom_tier_payment_interval | enum | null | |
| valid_until | string (date-time) | null | |
| renewable_until | string (date-time) | null | The last moment this membership can be renewed as itself. Access stops at `valid_until`; for a while after that the row is still here, so renewing continues the same membership on the same history rather than starting a new one. Past this the membership is retired, and coming back is joining again. Equal to `valid_until` once notice has been given, because a cancelled membership is retired at its term and gets no such window. Null for a membership that never expires, which has nothing to renew. |
| joined_at* | string (date-time) | |
| cancelled_at | string (date-time) | null | When the holder asked to end this membership. Set means it will not continue past `valid_until`, which is the date access actually ends — until then the membership is still active and still grants its tier's entitlements. |
| created_at* | string (date-time) | |
| updated_at | string (date-time) | null | |
| organization_name* | string | |
| organization_slug* | string | |
| tier_name* | string | |
| tier_slug* | string | |
| tier_price_cents* | integer | What the tier charges per term, in the minor units of `tier_currency`. `custom_tier_price_cents`, where set, overrides it for this member. Zero on both means the membership is free, which is the case it can be renewed without a payment. |
| tier_currency* | string | ISO 4217 code both `tier_price_cents` and `custom_tier_price_cents` are denominated in |
| tier_payment_interval* | enum | How often the tier charges. Part of the price rather than a detail beside it — the same amount monthly and yearly are twelve times apart — so an amount cannot be shown without it. `custom_tier_payment_interval`, where set, overrides it for this member. |
| tier_description | string | null | The tier in the organization's own words. |
| tier_inclusions | string[] | What the tier gets its members, in the organization's own words. Here rather than only on the tier listing because a member's own tier need not be listed — a private or unlisted one appears in no catalogue, and its holder would have nothing to read. Presentational: nothing tests these, and `entitlements` is what gates anything. |
| 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/memberships/{organization_slug}/resume" \
-H "Authorization: Bearer <token>"/api/v1/memberships/{organization_slug}/tiersList Organization Tiers
List the tiers an organization offers, as this caller may see them.
The organization sees everything it runs. A tier is public,
unlisted or private, and all three are the organization's own business,
so a caller acting for it gets all of them.
Everyone else sees what it advertises, which is the public ones. An
unlisted tier appears in no listing at all — that is what makes its slug a
link worth handing out — and a private one is a tier somebody is put on.
Knowing a slug is never the check either way.
Being enrolled does not widen this. What an organization charges the people
it comps is not something it publishes to the rest of its members, and a
caller's own tier travels on their membership rather than on this list:
GET /api/v1/memberships names and prices it whatever its visibility.
Not being a person does not narrow it either. A client_credentials token
acts for no one, so it sees the advertised set — which is what lets a page
be rendered for a visitor who has not signed in, showing them only what the
organization has published.
An organization that advertises nothing answers with an empty list. An address with no organization behind it is not found, the same as every other operation addressing one.
The organization's own editable view of the same tiers is
/api/v1/organizations/{organization_slug}/membership-tiers.
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* | MembershipTierResponse[] | List of items on the current page | ||||||||||||||||||||||||||||||||||||||||||||||||
array items · MembershipTierResponse
| ||||||||||||||||||||||||||||||||||||||||||||||||||
| 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/memberships/{organization_slug}/tiers" \
-H "Authorization: Bearer <token>"/api/v1/organizations
/api/v1/organizations/{organization_slug}/membership-tiersList Membership Tiers
List membership tiers 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* | MembershipTierResponse[] | List of items on the current page | ||||||||||||||||||||||||||||||||||||||||||||||||
array items · MembershipTierResponse
| ||||||||||||||||||||||||||||||||||||||||||||||||||
| 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}/membership-tiers" \
-H "Authorization: Bearer <token>"/api/v1/organizations/{organization_slug}/membership-tiersCreate Membership Tier
Create a new membership tier.
Requires an org-scoped token for the target organization.
Path parameters
| organization_slug* | string |
Query parameters
| default_backend | string | default: "primary" |
Request body*application/json
| Field | Type | Description |
|---|---|---|
| name* | string | min length 1 · max length 100 |
| description | string | null | max length 500 |
| price_cents* | integer | ≥ 0 |
| currency | string | ISO 4217 code `price_cents` is denominated in. Defaults to PHP, which is what every tier predating this field is priced in. default: "PHP" |
| payment_interval* | enum | Payment interval: 'daily', 'weekly', 'monthly', 'yearly', or 'one_time' |
| entitlements | object | null | Capability keys this tier grants, mapped to their value (null for a boolean capability). The reserved 'member' key is implicit and stripped if supplied. |
| inclusions | string[] | What the tier gets you, in the organization's own words — one short line each, in the order they should read. Presentational only: nothing tests these, and `entitlements` is what gates anything. A tier may grant a key it never mentions here, and may list a line that gates nothing. |
| image_file_uuid | string | null | An uploaded file to show as the tier's banner, above its name wherever the tier is offered rather than merely named. |
| visibility | enum | How openly the tier is offered. `private` (the default) is neither advertised nor joinable on its own — staff put someone on it, or a card carrying it does. `unlisted` is joinable by anyone holding the tier's slug but named nowhere. `public` is both advertised and open. Card-granted membership ignores this: holding the card is its own authorization. default: "private" |
Responses
| Field | Type | Description |
|---|---|---|
| uuid* | string | |
| slug* | string | |
| organization_uuid* | string | |
| name* | string | |
| description | string | null | |
| price_cents* | integer | Price in the minor units of `currency` |
| currency* | string | ISO 4217 code `price_cents` is denominated in |
| payment_interval* | enum | |
| member_count | integer | How many live memberships sit on this tier. What makes editing it a decision about people rather than about a row nobody is on. default: 0 |
| visibility | enum | How openly the tier is offered: `private` (neither advertised nor joinable on its own), `unlisted` (joinable by anyone holding the slug), or `public` (both). A card carrying the tier enrolls its holder regardless. default: "private" |
| entitlements | object | Capability keys this tier grants, mapped to their value (null for a boolean capability). Excludes the implicit 'member' key every active member holds. These are the gates; `inclusions` is what a person reads, and neither stands in for the other. |
| image_url | string | null | The tier's banner, where it has one |
| inclusions | string[] | What the tier gets you, in the organization's own words, in the order they should read. Presentational — nothing tests these. |
| 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}/membership-tiers" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{ /* request body */ }'/api/v1/organizations/{organization_slug}/membership-tiers/{tier_uuid}Get Membership Tier
Get a specific membership tier.
Path parameters
| tier_uuid* | string | |
| organization_slug* | string |
Query parameters
| default_backend | string | default: "primary" |
Responses
| Field | Type | Description |
|---|---|---|
| uuid* | string | |
| slug* | string | |
| organization_uuid* | string | |
| name* | string | |
| description | string | null | |
| price_cents* | integer | Price in the minor units of `currency` |
| currency* | string | ISO 4217 code `price_cents` is denominated in |
| payment_interval* | enum | |
| member_count | integer | How many live memberships sit on this tier. What makes editing it a decision about people rather than about a row nobody is on. default: 0 |
| visibility | enum | How openly the tier is offered: `private` (neither advertised nor joinable on its own), `unlisted` (joinable by anyone holding the slug), or `public` (both). A card carrying the tier enrolls its holder regardless. default: "private" |
| entitlements | object | Capability keys this tier grants, mapped to their value (null for a boolean capability). Excludes the implicit 'member' key every active member holds. These are the gates; `inclusions` is what a person reads, and neither stands in for the other. |
| image_url | string | null | The tier's banner, where it has one |
| inclusions | string[] | What the tier gets you, in the organization's own words, in the order they should read. Presentational — nothing tests these. |
| 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/organizations/{organization_slug}/membership-tiers/{tier_uuid}" \
-H "Authorization: Bearer <token>"/api/v1/organizations/{organization_slug}/membership-tiers/{tier_uuid}Update Membership Tier
Update a membership tier.
Requires an org-scoped token for the target organization.
Path parameters
| tier_uuid* | string | |
| organization_slug* | string |
Query parameters
| default_backend | string | default: "primary" |
Request body*application/json
| Field | Type | Description |
|---|---|---|
| name | string | null | min length 1 · max length 100 |
| description | string | null | max length 500 |
| price_cents | integer | null | ≥ 0 |
| currency | string | null | ISO 4217 code `price_cents` is denominated in |
| payment_interval | enum | null | Payment interval: 'daily', 'weekly', 'monthly', 'yearly', or 'one_time' |
| visibility | enum | null | How openly the tier is offered. `private` (the default) is neither advertised nor joinable on its own — staff put someone on it, or a card carrying it does. `unlisted` is joinable by anyone holding the tier's slug but named nowhere. `public` is both advertised and open. Card-granted membership ignores this: holding the card is its own authorization. |
| entitlements | object | null | Full replacement of the capability keys this tier grants (null leaves them unchanged; {} clears all). The reserved 'member' key is implicit and stripped if supplied. |
| inclusions | string[] | null | Full replacement of the tier's own words (null leaves them unchanged; [] clears them). Presentational only — `entitlements` is what gates anything. |
| image_file_uuid | string | null | An uploaded file to show as the tier's banner. Send an empty string to remove the one it has. |
Responses
| Field | Type | Description |
|---|---|---|
| uuid* | string | |
| slug* | string | |
| organization_uuid* | string | |
| name* | string | |
| description | string | null | |
| price_cents* | integer | Price in the minor units of `currency` |
| currency* | string | ISO 4217 code `price_cents` is denominated in |
| payment_interval* | enum | |
| member_count | integer | How many live memberships sit on this tier. What makes editing it a decision about people rather than about a row nobody is on. default: 0 |
| visibility | enum | How openly the tier is offered: `private` (neither advertised nor joinable on its own), `unlisted` (joinable by anyone holding the slug), or `public` (both). A card carrying the tier enrolls its holder regardless. default: "private" |
| entitlements | object | Capability keys this tier grants, mapped to their value (null for a boolean capability). Excludes the implicit 'member' key every active member holds. These are the gates; `inclusions` is what a person reads, and neither stands in for the other. |
| image_url | string | null | The tier's banner, where it has one |
| inclusions | string[] | What the tier gets you, in the organization's own words, in the order they should read. Presentational — nothing tests these. |
| 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/organizations/{organization_slug}/membership-tiers/{tier_uuid}" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{ /* request body */ }'/api/v1/organizations/{organization_slug}/membership-tiers/{tier_uuid}Delete Membership Tier
Delete a membership tier.
Requires an org-scoped token for the target organization.
Path parameters
| tier_uuid* | string | |
| organization_slug* | string |
Query parameters
| default_backend | string | default: "primary" |
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/organizations/{organization_slug}/membership-tiers/{tier_uuid}" \
-H "Authorization: Bearer <token>"/api/v1/organizations/{organization_slug}/membership-tiers/{tier_uuid}/memberships/moveMove Tier Memberships
Move every membership on this tier to another the organization offers.
Retiring a tier is three steps and this is the middle one. Set the tier's
visibility to private so nobody else joins it, move the people who are
already on it with this, then delete it. Keeping them separate is
deliberate: an organization usually wants its members somewhere sensible
well before it decides the row should go, and a delete that also relocated
people would be a destructive operation depending on a fan-out completing.
dry_run first. It answers with the same report and changes nothing, so
an organization about to alter what everybody holds can see who is affected
and who is in the way before anybody is. That report is the reason this
endpoint is worth having over calling PATCH .../memberships/{user_uuid} in
a loop, quite apart from the loop being slower.
The move itself runs in the background and answers 202, because a tier
with a thousand members is a thousand rows and a thousand notifications, and
the request has nothing left to tell you by the time that finishes. Watch
member_count on the two tiers for where it has got to — no job to poll,
because those two counts moving is the same fact.
Lapsed memberships move too. A term that has run out is still on the roster and still renewable as the same membership, so one left behind is a holder who renews onto a tier that no longer exists.
Everything that can refuse a move is a property of the two tiers, so it is
settled here rather than in the background: a one-time tier and a recurring
one cannot be crossed, and a conversion between two priced tiers in
different currencies has no rate to use. The one per-member question is a
price agreed for the tier being left, which by default refuses the whole
call and names them — clearing an agreed price silently un-comps somebody,
and carrying one denominated in another tier means nothing. custom_pricing
is how to say which you want.
Requires an org-scoped token for the target organization.
Path parameters
| tier_uuid* | string | |
| organization_slug* | string |
Query parameters
| default_backend | string | default: "primary" |
Request body*application/json
| Field | Type | Description |
|---|---|---|
| membership_tier_slug* | string | Slug of the tier to move these memberships to. |
| term | enum | What happens to the time each member is part-way through. `keep` leaves it alone, which is what retiring a tier usually means — the organization is relabelling the plan, not repricing time already bought. `convert` re-expresses the remainder at what each tier charges for a day, for a move to a differently-priced tier that should stay fair. default: "keep" |
| custom_pricing | enum | What to do about members whose price or interval was agreed for the tier being left. `refuse` (the default) moves nobody and names them, because clearing an agreed price silently un-comps somebody and carrying one denominated in another tier is meaningless. `carry` keeps the figures, `clear` puts them on the target tier's own price. default: "refuse" |
| dry_run | boolean | Report what the move would do and change nothing. The counts and refusals are the ones the real call would produce, so this is the way to see who is affected before anybody is. default: false |
Responses
| Field | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| scheduled* | boolean | Whether the move was handed to the background worker. False for a dry run, which is the same report with nothing done. | ||||||||||||
| memberships* | integer | How many memberships the move covers. | ||||||||||||
| from_tier_uuid* | string | |||||||||||||
| to_tier_uuid* | string | |||||||||||||
| skipped | TierMoveSkippedEntry[] | Memberships this move leaves where they are. Always empty when `custom_pricing` is `refuse`, which fails the whole call instead. | ||||||||||||
array items · TierMoveSkippedEntry
| ||||||||||||||
| still_blocking_delete* | TierDeleteBlockers | What the tier will still be held down by once this is done. | ||||||||||||
object · TierDeleteBlockers
| ||||||||||||||
| 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}/membership-tiers/{tier_uuid}/memberships/move" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{ /* request body */ }'/api/v1/organizations/{organization_slug}/membershipsList Memberships
List the organization's members and the tier each holds.
current and ended split them; active and lapsed split current.
current— the default, and every membership the organization still has. A term that has run out is one of them: the row is live, the holder can still renew it as the same membership, and a roster that hid it would hide the people worth contacting most. One under a revocation that has not taken effect is here too, still granting what it always did.active— of those, the terms still running.lapsed— of those, the terms that have run out.ended— the retired ones: removed, refunded, or left too long past the term. Outsidecurrententirely, and the only setPOST .../restorecan act on, so it is how an ending is found again.
ended carries ended_at; the rest leave it null.
Path parameters
| organization_slug* | string |
Query parameters
| search | string | null | Search by name, username, or email |
| state | enum | Which set of memberships to list default: "current" |
| 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* | UserMembershipWithUserResponse[] | List of items on the current page | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
array items · UserMembershipWithUserResponse
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 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}/memberships" \
-H "Authorization: Bearer <token>"/api/v1/organizations/{organization_slug}/membershipsJoin Membership
Enrol a user in one of the organization's membership tiers.
Recorded as granted by the organization, which is what this route is: a membership added here is one the team decided on, and a card released or a payment refunded later never takes it away.
A tier the organization does not offer is refused by name.
Path parameters
| organization_slug* | string |
Query parameters
| default_backend | string | default: "primary" |
Request body*application/json
| Field | Type | Description |
|---|---|---|
| user_uuid* | string | UUID of the user joining the membership |
| membership_tier_slug* | string | Slug of the membership tier to join |
| custom_tier_price_cents | integer | null | Custom price in cents, if applicable |
| custom_tier_payment_interval | enum | null | Custom payment interval, if applicable |
| source | MembershipSource | null | What this membership is granted on. Left unset the membership rests on nothing recorded, and nothing can later revoke it. |
| source_card_uuid | string | null | The card that granted it. Only meaningful with source=card. |
Responses
| Field | Type | Description |
|---|---|---|
| uuid* | string | |
| user_uuid* | string | |
| organization_uuid* | string | |
| tier_uuid* | string | |
| custom_tier_price_cents | integer | null | |
| custom_tier_payment_interval | enum | null | |
| valid_until | string (date-time) | null | |
| revoke_at | string (date-time) | null | When the organization's revocation takes effect. Set means the membership is still live and still granting its tier's entitlements, and will be ended then unless the revocation is withdrawn. Distinct from `cancelled_at`, which is the holder's own notice. |
| 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}/memberships" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{ /* request body */ }'/api/v1/organizations/{organization_slug}/memberships/{user_uuid}Get User Membership
Get one member's active membership.
Path parameters
| user_uuid* | string | |
| organization_slug* | string |
Query parameters
| default_backend | string | default: "primary" |
Responses
| Field | Type | Description | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| uuid* | string | ||||||||||||||||||||||
| user_uuid* | string | ||||||||||||||||||||||
| organization_uuid* | string | ||||||||||||||||||||||
| tier_uuid* | string | ||||||||||||||||||||||
| custom_tier_price_cents | integer | null | ||||||||||||||||||||||
| custom_tier_payment_interval | enum | null | ||||||||||||||||||||||
| valid_until | string (date-time) | null | ||||||||||||||||||||||
| revoke_at | string (date-time) | null | When the organization's revocation takes effect. Set means the membership is still live and still granting its tier's entitlements, and will be ended then unless the revocation is withdrawn. Distinct from `cancelled_at`, which is the holder's own notice. | |||||||||||||||||||||
| created_at* | string (date-time) | ||||||||||||||||||||||
| updated_at | string (date-time) | null | ||||||||||||||||||||||
| user* | MemberUserSummary | ||||||||||||||||||||||
object · MemberUserSummary
| |||||||||||||||||||||||
| ended_at | string (date-time) | null | When this membership was retired, if it has been. Only a roster asked for the ended ones carries it; everything else is live and leaves it 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/organizations/{organization_slug}/memberships/{user_uuid}" \
-H "Authorization: Bearer <token>"/api/v1/organizations/{organization_slug}/memberships/{user_uuid}Update User Membership
Move a member's active membership to a different tier.
Preserves the join date and history instead of requiring a leave + rejoin,
and leaves the existing term (valid_until) alone — use renew to extend
that. The tier is the only part of a membership a caller sets directly.
Path parameters
| user_uuid* | string | |
| organization_slug* | string |
Query parameters
| default_backend | string | default: "primary" |
Request body*application/json
| Field | Type | Description |
|---|---|---|
| membership_tier_slug* | string | Slug of the membership tier to move the member to |
| custom_tier_price_cents | integer | null | Custom price in cents for the new tier, if applicable |
| custom_tier_payment_interval | enum | null | Custom payment interval for the new tier, if applicable |
Responses
| Field | Type | Description |
|---|---|---|
| uuid* | string | |
| user_uuid* | string | |
| organization_uuid* | string | |
| tier_uuid* | string | |
| custom_tier_price_cents | integer | null | |
| custom_tier_payment_interval | enum | null | |
| valid_until | string (date-time) | null | |
| revoke_at | string (date-time) | null | When the organization's revocation takes effect. Set means the membership is still live and still granting its tier's entitlements, and will be ended then unless the revocation is withdrawn. Distinct from `cancelled_at`, which is the holder's own notice. |
| 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/organizations/{organization_slug}/memberships/{user_uuid}" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{ /* request body */ }'/api/v1/organizations/{organization_slug}/memberships/{user_uuid}Leave Membership
End a member's membership, giving a week's notice by default.
The membership keeps granting what it granted until the notice runs out,
and is retired then. Removing the wrong person is a thing that happens in a
console, so for those seven days it costs nothing:
DELETE .../memberships/{user_uuid}/revocation calls it off, the member is
never told, and nothing has to be put back because nothing was taken.
revoke_immediately skips the week where the organization means now.
Afterwards the membership is outside the roster and only
.../memberships/{user_uuid}/restore reaches it.
This is the organization ending it. A member ending their own lets the term
they paid for run out — see DELETE /memberships/{organization_slug}.
Path parameters
| user_uuid* | string | |
| organization_slug* | string |
Query parameters
| revoke_immediately | boolean | End the membership at once instead of giving a week's notice in which it can be called off. default: false |
| default_backend | string | default: "primary" |
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/organizations/{organization_slug}/memberships/{user_uuid}" \
-H "Authorization: Bearer <token>"/api/v1/organizations/{organization_slug}/memberships/{user_uuid}/cardsGet Membership Cards
Cards linked to this membership's wallet.
Freezing one goes through the organization's card endpoints, which address the same cards by uuid.
Path parameters
| user_uuid* | string | |
| organization_slug* | string |
Query parameters
| default_backend | string | default: "primary" |
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* | MembershipCardResponse[] | List of items on the current page | |||||||||||||||||||||
array items · MembershipCardResponse
| |||||||||||||||||||||||
| 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}/memberships/{user_uuid}/cards" \
-H "Authorization: Bearer <token>"/api/v1/organizations/{organization_slug}/memberships/{user_uuid}/historyGet Membership History
Every membership record this user has held here, cancelled ones included.
Path parameters
| user_uuid* | string | |
| organization_slug* | string |
Query parameters
| default_backend | string | default: "primary" |
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* | UserMembershipHistoryResponse[] | List of items on the current page | |||||||||||||||||||||||||||||||||||||||||||||||||||
array items · UserMembershipHistoryResponse
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| 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}/memberships/{user_uuid}/history" \
-H "Authorization: Bearer <token>"/api/v1/organizations/{organization_slug}/memberships/{user_uuid}/renewRenew Membership
Extend a membership by another term.
The new term is derived from the tier rather than supplied, which is why this is an action and not a field on the membership.
Path parameters
| user_uuid* | string | |
| organization_slug* | string |
Query parameters
| default_backend | string | default: "primary" |
Responses
| Field | Type | Description |
|---|---|---|
| uuid* | string | |
| user_uuid* | string | |
| organization_uuid* | string | |
| tier_uuid* | string | |
| custom_tier_price_cents | integer | null | |
| custom_tier_payment_interval | enum | null | |
| valid_until | string (date-time) | null | |
| revoke_at | string (date-time) | null | When the organization's revocation takes effect. Set means the membership is still live and still granting its tier's entitlements, and will be ended then unless the revocation is withdrawn. Distinct from `cancelled_at`, which is the holder's own notice. |
| 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}/memberships/{user_uuid}/renew" \
-H "Authorization: Bearer <token>"/api/v1/organizations/{organization_slug}/memberships/{user_uuid}/restoreRestore Membership
Put back the membership that ended most recently, as it stood.
For a membership ended by mistake — a member removed, a card released that carried one, a payment refunded. The alternative is enrolling the person again, which starts a term from today and leaves the history reading as though they left and came back.
The term comes back as it was rather than restarting, so a membership cut short with two months left has two months left. One whose term has run out in the meantime comes back expired: this undoes an ending, it does not hand out time nobody paid for. Notice the holder had given is left standing, because withdrawing it is theirs to do and not the organization's.
Refused while the member already holds a live membership here — somebody
who rejoined in the meantime has one, and an organization cannot run two at
once for the same person. A member with nothing to put back answers 404,
the same as an organization that does not exist.
Path parameters
| user_uuid* | string | |
| organization_slug* | string |
Query parameters
| default_backend | string | default: "primary" |
Responses
| Field | Type | Description |
|---|---|---|
| uuid* | string | |
| user_uuid* | string | |
| organization_uuid* | string | |
| tier_uuid* | string | |
| custom_tier_price_cents | integer | null | |
| custom_tier_payment_interval | enum | null | |
| valid_until | string (date-time) | null | |
| revoke_at | string (date-time) | null | When the organization's revocation takes effect. Set means the membership is still live and still granting its tier's entitlements, and will be ended then unless the revocation is withdrawn. Distinct from `cancelled_at`, which is the holder's own notice. |
| 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}/memberships/{user_uuid}/restore" \
-H "Authorization: Bearer <token>"/api/v1/organizations/{organization_slug}/memberships/{user_uuid}/revocationWithdraw Membership Revocation
Call off a revocation that has not taken effect yet.
The ordinary way back from ending a membership by mistake. Nothing has happened yet — the membership never stopped granting and the member was never told — so this leaves no trace that anything was scheduled.
A member with no membership here, or one nobody is revoking, answers 404.
So does one already retired: its notice has run out and putting it back is
.../memberships/{user_uuid}/restore.
Path parameters
| user_uuid* | string | |
| organization_slug* | string |
Query parameters
| default_backend | string | default: "primary" |
Responses
| Field | Type | Description |
|---|---|---|
| uuid* | string | |
| user_uuid* | string | |
| organization_uuid* | string | |
| tier_uuid* | string | |
| custom_tier_price_cents | integer | null | |
| custom_tier_payment_interval | enum | null | |
| valid_until | string (date-time) | null | |
| revoke_at | string (date-time) | null | When the organization's revocation takes effect. Set means the membership is still live and still granting its tier's entitlements, and will be ended then unless the revocation is withdrawn. Distinct from `cancelled_at`, which is the holder's own notice. |
| 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 DELETE "https://api.davi.social/api/v1/organizations/{organization_slug}/memberships/{user_uuid}/revocation" \
-H "Authorization: Bearer <token>"/api/v1/organizations/{organization_slug}/memberships/{user_uuid}/walletGet Membership Wallet
The wallet this member holds within the organization.
Minted when they first enrol and kept afterwards: it is keyed on the person
and the organization together, so leaving, lapsing and rejoining all land
back on the same wallet and whatever it holds. A member who has never
enrolled here has none, which is a 404 — the same answer as an
organization that does not exist.
Path parameters
| user_uuid* | string | |
| organization_slug* | string |
Query parameters
| default_backend | string | default: "primary" |
Responses
| Field | Type | Description |
|---|---|---|
| wallet_uuid* | string | |
| wallet_address* | string | |
| user_uuid* | string | |
| created_at* | string (date-time) |
| 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/organizations/{organization_slug}/memberships/{user_uuid}/wallet" \
-H "Authorization: Bearer <token>"