Card Definitions
Create Card Definition
<Warning><Badge color="yellow">BETA endpoint</Badge>
This is a work-in-progress documentation of a BETA endpoint. The parameters, fields, request and response bodies, and other data may subject to change. If you want to share feedback or improvements, contact Voucherify support or your Technical Account Manager.
</Warning>Creates a new card definition. Only name and type are required; all other sections default server-side as follows:
- code_config: 10-character alphanumeric code pattern (##########)
- points_expiration: NO_EXPIRATION
- pending_points: IMMEDIATE
- earning_limits: global NO_LIMIT, transactions NO_LIMIT
- spending_limits: global NO_LIMIT, transactions NO_LIMIT
- refunds: spent points NONE, earned points NONE
- balance_settings: allow_negative: false
- pay_with_points: NO_PAYMENTS
Cross-field rules:
- balance_settings.allow_negative can only be true when points_expiration.type is NO_EXPIRATION. Additionally, the earned points refund mode REVOKE_BELOW_ZERO requires balance_settings.allow_negative to be true.
- The earned points refund method REVOKE_FROM_PENDING requires pending_points.type to be one of PERIOD_BASED, FIXED_DATES, EVENT_BASED.
post/v2/loyalties/card-definitions
Request body
Response
The created card definition.