Benefits
<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>

Updates a benefit. When the benefit is in DRAFT status all properties can be updated. When the benefit is not in DRAFT status, only name, stock, points, points_proportional, and digital may be updated (400 invalid_payload otherwise). Referenced resources (card definition, product/SKU, campaign) are validated the same way as on create; a points-based benefit can only reference an ACTIVE card definition (423 resource_locked otherwise). The benefit name must remain unique per project (409 duplicate_found).

put/v2/loyalties/benefits/{benefitId}

Request

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

Request body

namestring

Benefit name. Must be unique within the project.

type'POINTS' | 'POINTS_PROPORTIONAL' | 'MATERIAL' | 'DIGITAL'

Benefit type. Determines which configuration object is required.

Response

The updated benefit

idstring required

Unique benefit ID, prefixed with lben_.

namestring required

Benefit name, unique within the project.

type'POINTS' | 'POINTS_PROPORTIONAL' | 'MATERIAL' | 'DIGITAL' required

Benefit type.

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

Current benefit status. DELETED appears only in the response of the delete endpoint and in activity snapshots.

created_atstring date-time required

Timestamp of when the benefit was created, in ISO 8601 format.

updated_atstring date-time nullable required

Timestamp of the last update, in ISO 8601 format. null when the benefit was never updated.

object'benefit' required

Type of the object. Always benefit.

Changes

    • breaking

      added to the request body allOf list

    • 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

      deleted the path request parameter benefitId

    • 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 allOf list for the response status

    • breaking

      added the new path request parameter benefitId

    • warning

      removed from the request body allOf list

    • 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 allOf list 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