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

Deletes a reward (moves it to the DELETED status). Returns the deleted reward. Returns 400 (resource_in_use) when a program still references the reward.

delete/v2/loyalties/rewards/{rewardId}

Request

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

Response

The deleted reward.

idstring required

Unique reward identifier, prefixed with lrew_.

namestring required

Display name of the reward.

type'MATERIAL' | 'DIGITAL' required

Reward type.

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

Current lifecycle status of the reward.

start_datestring date-time nullable required

Date from which the reward is available, or null when not set.

end_datestring date-time nullable required

Date until which the reward is available, or null when not set.

metadataobject required

Arbitrary key-value metadata attached to the reward. Empty object when not set.

created_atstring date-time required

Timestamp when the reward was created (ISO-8601).

updated_atstring date-time nullable required

Timestamp when the reward was last updated (ISO-8601), or null when never updated.

object'reward' required

Object type marker; always reward.

Example response

{
  "validity_hours": {
    "daily": [
      {
        "start_time": "09:00",
        "end_time": "17:00"
      }
    ]
  }
}

Changes

    • 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

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

    • info

      removed the non-success response with the status

    • info

      removed from the response body allOf list for the response status

    • info

      added the non-success 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

    • 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