Create benefit
Changed on<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>Creates a new benefit. Exactly one type-specific configuration object (points, points_proportional, material, or digital) is required, matching the type. When status is omitted the benefit is created in DRAFT status. When stock is omitted it defaults to { "type": "UNLIMITED" }.
Referenced resources are validated: the card definition (for points-based types) must exist and - when creating with status: ACTIVE - must be ACTIVE (423 resource_locked otherwise); the product/SKU (for MATERIAL) and campaign (for DIGITAL) must exist, and the campaign type must match the digital benefit type (DISCOUNT_COUPONS or GIFT_VOUCHERS). The benefit name must be unique per project (409 duplicate_found).
Request
- Base URLhttps://api.voucherify.io
- URLhttps://api.voucherify.io/v2/loyalties/benefits
- Auth
- API key in header X-App-Id and API key in header X-App-Token
- or HTTP bearer
Request body
Response
The created benefit
Changes
- breaking
added to the request body
allOflist - breaking
removed the required property
from the response with the status - breaking
removed the required property
from the response with the status - breaking
removed the required property
from the response with the status - breaking
removed the required property
from the response with the status - breaking
removed the required property
from the response with the status - breaking
removed the required property
from the response with the 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
subschema #1subschema #2subschema #3subschema #4subschema #5from the request bodyallOflist - warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- 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 - warning
removed the optional property
from the response with the status - info
added to the response body
allOflist for the response status
- breaking
- breaking
added
subschema #1subschema #2subschema #3subschema #4subschema #5to the request bodyallOflist - warning
removed from the request body
allOflist - info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
removed from the response body
allOflist for the response 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
added the optional property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status
- breaking