Card Definitions

Draft Card Definition

Changed on
<Info>

<Badge color="gray">Documentation in progress</Badge>

This documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact Voucherify support or your Technical Account Manager.

</Info>

Transitions the card definition from ACTIVE to DRAFT. No request body. Drafting from any other state returns 400 (invalid_state_transition). Returns 423 when the card definition is still used by a non-draft program (connected_non_draft_program), reward (connected_non_draft_reward), earning rule (connected_non_draft_earning_rule), benefit (connected_non_draft_benefit), or tier structure (connected_non_draft_tier_structure).

post/v2/loyalties/card-definitions/{cardDefinitionId}/draft

Request

  • Base URL
    https://api.voucherify.io
  • URL
    https://api.voucherify.io/v2/loyalties/card-definitions/{cardDefinitionId}/draft
  • Auth
    • API key in header X-App-Id and API key in header X-App-Token
    • or HTTP bearer

Response

The drafted card definition.

idstring required

Unique card definition ID.

namestring required

Card definition name.

type'INDIVIDUAL' required

Card definition type.

status'DRAFT' | 'ACTIVE' | 'DELETED' required

Current card definition status.

metadataobject required

Arbitrary key-value metadata. Empty object when not set.

created_atstring date-time required

Creation timestamp (ISO 8601).

updated_atstring date-time nullable required

Last update timestamp (ISO 8601). null when the card definition has never been updated.

object'card_definition' required

Object type marker. Always card_definition.

Changes

    • breaking

      the ///// response's property type changed from object to no type for status

    • breaking

      removed the required property ////// from the response with the status

    • breaking

      removed the required property ////// from the response with the status

    • warning

      removed the optional property ////// from the response with the status

    • warning

      removed the optional property ////// from the response with the status

    • warning

      removed the optional property ////// from the response with the status

    • info

      added subschema #2 to the ///// response property allOf list for the response status

    • breaking

      the ///// response's property type changed from no type to object for status

    • info

      added the optional property ////// to the response with the status

    • info

      added the optional property ////// to the response with the status

    • info

      added the optional property ////// to the response with the status

    • info

      removed subschema #2 from the ///// response property allOf list for the response status

    • info

      added the required property ////// to the response with the status

    • info

      added the required property ////// to the response with the status