API Reference
card-models
5 endpoints
- /api/v1/organizations
/api/v1/organizations/{organization_slug}/card-modelsList Card Models
List card models for an organization.
Returns a paginated list of card models owned by the organization.
By default, only active card models are returned. Use include_inactive=true
to include deactivated models.
Path parameters
| organization_slug* | string |
Query parameters
| include_inactive | boolean | Include inactive card models in the list default: false |
| 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* | CardModelResponse[] | List of items on the current page | |||||||||||||||||||||||||||||||||||||||
array items · CardModelResponse
| |||||||||||||||||||||||||||||||||||||||||
| 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}/card-models" \
-H "Authorization: Bearer <token>"/api/v1/organizations/{organization_slug}/card-modelsCreate Card Model
Create a new card model for an organization.
Card models are reusable card designs with front/back images that can be assigned to managed cards. Organizations can create multiple card models for different purposes (e.g., member cards, VIP cards, event cards).
Path parameters
| organization_slug* | string |
Query parameters
| default_backend | string | default: "primary" |
Request body*application/json
| Field | Type | Description |
|---|---|---|
| organization_uuid | string | string (uuid) | null | The organization that owns this design. Only read on the platform route, where the fulfillment site publishes on an organization's behalf; the organization-scoped route takes it from the path and ignores this. |
| name* | string | Display name for the card design max length 255 |
| description | string | null | Optional description of the card design max length 2000 |
| front_image_file_uuid | string | string (uuid) | null | UUID of the uploaded file for the front image |
| back_image_file_uuid | string | string (uuid) | null | UUID of the uploaded file for the back image |
| profile_template_uuid | string | string (uuid) | null | UUID of the profile page template attached to this card model. Must be platform-owned or owned by the same organization as the card model. When NULL, cards using this model do not auto-generate a profile. |
| order_site_template_id | string | null | The design this was published from, on the fulfillment site that owns it. A trace back to the source, not a key — many card models can share one design, since every personalized render is a render of the same design. Never resolved by davi. max length 255 |
| membership_tier_uuid | string | string (uuid) | null | The membership tier cards made from this design carry. Must belong to the same organization as the design; a platform-owned design cannot carry one, having no organization to enroll anyone in. |
| is_active | boolean | Whether the card model is active and can be assigned to cards default: true |
Responses
| Field | Type | Description |
|---|---|---|
| uuid* | string | |
| name* | string | |
| description | string | null | |
| organization_uuid | string | null | |
| front_image_url | string | null | |
| back_image_url | string | null | |
| order_site_template_id | string | null | The design this was published from, on the fulfillment site that owns it. Not unique: many card models can share one design. |
| membership_tier_uuid | string | null | The membership tier cards made from this design carry, unless the card overrides it. |
| is_active* | boolean | |
| profile_template_uuid | string | null | UUID of the profile page template attached to this card model. Must be platform-owned or owned by the same organization as the card model. When NULL, cards using this model do not auto-generate a profile. |
| 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}/card-models" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{ /* request body */ }'/api/v1/organizations/{organization_slug}/card-models/{card_model_uuid}Get Card Model
Get a card model.
Returns the card model details including presigned URLs for the front and back images (if set).
Path parameters
| card_model_uuid* | string | |
| organization_slug* | string |
Query parameters
| default_backend | string | default: "primary" |
Responses
| Field | Type | Description |
|---|---|---|
| uuid* | string | |
| name* | string | |
| description | string | null | |
| organization_uuid | string | null | |
| front_image_url | string | null | |
| back_image_url | string | null | |
| order_site_template_id | string | null | The design this was published from, on the fulfillment site that owns it. Not unique: many card models can share one design. |
| membership_tier_uuid | string | null | The membership tier cards made from this design carry, unless the card overrides it. |
| is_active* | boolean | |
| profile_template_uuid | string | null | UUID of the profile page template attached to this card model. Must be platform-owned or owned by the same organization as the card model. When NULL, cards using this model do not auto-generate a profile. |
| 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}/card-models/{card_model_uuid}" \
-H "Authorization: Bearer <token>"/api/v1/organizations/{organization_slug}/card-models/{card_model_uuid}Update Card Model
Update a card model.
Only the fields provided in the request body will be updated.
Set is_active=false to deactivate a card model (soft disable).
Path parameters
| card_model_uuid* | string | |
| organization_slug* | string |
Query parameters
| default_backend | string | default: "primary" |
Request body*application/json
| Field | Type | Description |
|---|---|---|
| name | string | null | Display name for the card design max length 255 |
| description | string | null | Optional description of the card design max length 2000 |
| front_image_file_uuid | string | string (uuid) | null | UUID of the uploaded file for the front image |
| back_image_file_uuid | string | string (uuid) | null | UUID of the uploaded file for the back image |
| profile_template_uuid | string | string (uuid) | null | UUID of the profile page template attached to this card model. Must be platform-owned or owned by the same organization as the card model. When NULL, cards using this model do not auto-generate a profile. |
| order_site_template_id | string | null | The design this was published from, on the fulfillment site that owns it. Re-publishing a design updates it in place. max length 255 |
| membership_tier_uuid | string | string (uuid) | null | The membership tier cards made from this design carry. Must belong to the same organization as the design; a platform-owned design cannot carry one, having no organization to enroll anyone in. |
| is_active | boolean | null | Whether the card model is active and can be assigned to cards |
Responses
| Field | Type | Description |
|---|---|---|
| uuid* | string | |
| name* | string | |
| description | string | null | |
| organization_uuid | string | null | |
| front_image_url | string | null | |
| back_image_url | string | null | |
| order_site_template_id | string | null | The design this was published from, on the fulfillment site that owns it. Not unique: many card models can share one design. |
| membership_tier_uuid | string | null | The membership tier cards made from this design carry, unless the card overrides it. |
| is_active* | boolean | |
| profile_template_uuid | string | null | UUID of the profile page template attached to this card model. Must be platform-owned or owned by the same organization as the card model. When NULL, cards using this model do not auto-generate a profile. |
| 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}/card-models/{card_model_uuid}" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{ /* request body */ }'/api/v1/organizations/{organization_slug}/card-models/{card_model_uuid}Delete Card Model
Delete a card model.
Deleting a card model will unassign it from any managed cards that reference it (their card_model_uuid will be set to NULL).
Consider deactivating the card model instead by setting is_active=false
to preserve history while preventing new assignments.
Path parameters
| card_model_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}/card-models/{card_model_uuid}" \
-H "Authorization: Bearer <token>"