API Reference

card-models

5 endpoints

  • /api/v1/organizations
GET/api/v1/organizations/{organization_slug}/card-models

List 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_inactiveboolean

Include inactive card models in the list

default: false

default_backendstring

default: "primary"

pageinteger

default: 1 · ≥ 1

page_sizeinteger

default: 20 · ≥ 1 · ≤ 100

sort_bystring | null
sort_orderstring

default: "asc"

Responses

200Successful Response
FieldTypeDescription
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

FieldTypeDescription
uuid*string
name*string
descriptionstring | null
organization_uuidstring | null
front_image_urlstring | null
back_image_urlstring | null
order_site_template_idstring | 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_uuidstring | null

The membership tier cards made from this design carry, unless the card overrides it.

is_active*boolean
profile_template_uuidstring | 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_atstring (date-time) | null
401Authentication failed
FieldTypeDescription
errors*object

Map of field names to error messages. Use '_root' for form-level errors.

message*string

Human-readable error summary

codestring | null

Machine-readable error code

detailsobject | 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.

403Insufficient permissions
FieldTypeDescription
errors*object

Map of field names to error messages. Use '_root' for form-level errors.

message*string

Human-readable error summary

codestring | null

Machine-readable error code

detailsobject | 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.

422Validation error
FieldTypeDescription
errors*object

Map of field names to error messages. Use '_root' for form-level errors.

message*string

Human-readable error summary

codestring | null

Machine-readable error code

detailsobject | 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>"
POST/api/v1/organizations/{organization_slug}/card-models

Create 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_backendstring

default: "primary"

Request body*application/json

FieldTypeDescription
organization_uuidstring | 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

descriptionstring | null

Optional description of the card design

max length 2000

front_image_file_uuidstring | string (uuid) | null

UUID of the uploaded file for the front image

back_image_file_uuidstring | string (uuid) | null

UUID of the uploaded file for the back image

profile_template_uuidstring | 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_idstring | 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_uuidstring | 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_activeboolean

Whether the card model is active and can be assigned to cards

default: true

Responses

200Successful Response
FieldTypeDescription
uuid*string
name*string
descriptionstring | null
organization_uuidstring | null
front_image_urlstring | null
back_image_urlstring | null
order_site_template_idstring | 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_uuidstring | null

The membership tier cards made from this design carry, unless the card overrides it.

is_active*boolean
profile_template_uuidstring | 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_atstring (date-time) | null
400Invalid request
FieldTypeDescription
errors*object

Map of field names to error messages. Use '_root' for form-level errors.

message*string

Human-readable error summary

codestring | null

Machine-readable error code

detailsobject | 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.

401Authentication failed
FieldTypeDescription
errors*object

Map of field names to error messages. Use '_root' for form-level errors.

message*string

Human-readable error summary

codestring | null

Machine-readable error code

detailsobject | 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.

403Insufficient permissions
FieldTypeDescription
errors*object

Map of field names to error messages. Use '_root' for form-level errors.

message*string

Human-readable error summary

codestring | null

Machine-readable error code

detailsobject | 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.

409Resource already exists
FieldTypeDescription
errors*object

Map of field names to error messages. Use '_root' for form-level errors.

message*string

Human-readable error summary

codestring | null

Machine-readable error code

detailsobject | 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.

422Validation error
FieldTypeDescription
errors*object

Map of field names to error messages. Use '_root' for form-level errors.

message*string

Human-readable error summary

codestring | null

Machine-readable error code

detailsobject | 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 */ }'
GET/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_backendstring

default: "primary"

Responses

200Successful Response
FieldTypeDescription
uuid*string
name*string
descriptionstring | null
organization_uuidstring | null
front_image_urlstring | null
back_image_urlstring | null
order_site_template_idstring | 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_uuidstring | null

The membership tier cards made from this design carry, unless the card overrides it.

is_active*boolean
profile_template_uuidstring | 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_atstring (date-time) | null
401Authentication failed
FieldTypeDescription
errors*object

Map of field names to error messages. Use '_root' for form-level errors.

message*string

Human-readable error summary

codestring | null

Machine-readable error code

detailsobject | 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.

403Insufficient permissions
FieldTypeDescription
errors*object

Map of field names to error messages. Use '_root' for form-level errors.

message*string

Human-readable error summary

codestring | null

Machine-readable error code

detailsobject | 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.

404Resource not found
FieldTypeDescription
errors*object

Map of field names to error messages. Use '_root' for form-level errors.

message*string

Human-readable error summary

codestring | null

Machine-readable error code

detailsobject | 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.

422Validation error
FieldTypeDescription
errors*object

Map of field names to error messages. Use '_root' for form-level errors.

message*string

Human-readable error summary

codestring | null

Machine-readable error code

detailsobject | 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>"
PATCH/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_backendstring

default: "primary"

Request body*application/json

FieldTypeDescription
namestring | null

Display name for the card design

max length 255

descriptionstring | null

Optional description of the card design

max length 2000

front_image_file_uuidstring | string (uuid) | null

UUID of the uploaded file for the front image

back_image_file_uuidstring | string (uuid) | null

UUID of the uploaded file for the back image

profile_template_uuidstring | 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_idstring | 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_uuidstring | 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_activeboolean | null

Whether the card model is active and can be assigned to cards

Responses

200Successful Response
FieldTypeDescription
uuid*string
name*string
descriptionstring | null
organization_uuidstring | null
front_image_urlstring | null
back_image_urlstring | null
order_site_template_idstring | 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_uuidstring | null

The membership tier cards made from this design carry, unless the card overrides it.

is_active*boolean
profile_template_uuidstring | 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_atstring (date-time) | null
400Invalid request
FieldTypeDescription
errors*object

Map of field names to error messages. Use '_root' for form-level errors.

message*string

Human-readable error summary

codestring | null

Machine-readable error code

detailsobject | 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.

401Authentication failed
FieldTypeDescription
errors*object

Map of field names to error messages. Use '_root' for form-level errors.

message*string

Human-readable error summary

codestring | null

Machine-readable error code

detailsobject | 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.

403Insufficient permissions
FieldTypeDescription
errors*object

Map of field names to error messages. Use '_root' for form-level errors.

message*string

Human-readable error summary

codestring | null

Machine-readable error code

detailsobject | 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.

404Resource not found
FieldTypeDescription
errors*object

Map of field names to error messages. Use '_root' for form-level errors.

message*string

Human-readable error summary

codestring | null

Machine-readable error code

detailsobject | 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.

422Validation error
FieldTypeDescription
errors*object

Map of field names to error messages. Use '_root' for form-level errors.

message*string

Human-readable error summary

codestring | null

Machine-readable error code

detailsobject | 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 */ }'
DELETE/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_backendstring

default: "primary"

Responses

200Successful Response
FieldTypeDescription
message*string

Success or status message

401Authentication failed
FieldTypeDescription
errors*object

Map of field names to error messages. Use '_root' for form-level errors.

message*string

Human-readable error summary

codestring | null

Machine-readable error code

detailsobject | 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.

403Insufficient permissions
FieldTypeDescription
errors*object

Map of field names to error messages. Use '_root' for form-level errors.

message*string

Human-readable error summary

codestring | null

Machine-readable error code

detailsobject | 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.

404Resource not found
FieldTypeDescription
errors*object

Map of field names to error messages. Use '_root' for form-level errors.

message*string

Human-readable error summary

codestring | null

Machine-readable error code

detailsobject | 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.

422Validation error
FieldTypeDescription
errors*object

Map of field names to error messages. Use '_root' for form-level errors.

message*string

Human-readable error summary

codestring | null

Machine-readable error code

detailsobject | 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>"