v1

latestOpenAPI 3.0.1MIT2026-07-263151,3912.3 MB
Redemptions

List Redemptions

Returns a list of redemptions previously created. The redemptions are returned in a sorted order, with the most recent redemptions appearing first. The response returns a list of redemptions of all vouchers.

Filtering results

The result can be narrowed according to specified (or default) filters, for example, you can sort redemptions by date: https://api.voucherify.io/v1/redemptions?limit=3&[created_at][before]=2017-09-08T13:52:18.227Z. A filter based on the object created_at field narrows down the results and lists redemptions done before or after a particular date time. You can use the following options: [created_at][after], [created_at][before]. A date value must be presented in ISO 8601 format (2016-11-16T14:14:31Z or 2016-11-16). An example: [created_at][before]=2017-09-08T13:52:18.227Z.

Failed Redemptions

A redemption may fail for various reasons. You can figure out an exact reason from the failure_code:

  • resource_not_found - voucher with given code does not exist
  • voucher_not_active - voucher is not active yet (before start date)
  • voucher_expired - voucher has already expired (after expiration date)
  • voucher_disabled - voucher has been disabled (active: false)
  • quantity_exceeded - voucher's redemptions limit has been exceeded
  • gift_amount_exceeded - gift amount has been exceeded
  • customer_rules_violated - customer did not match the segment
  • order_rules_violated - order did not match validation rules
  • invalid_order - order was specified incorrectly
  • invalid_amount - order amount was specified incorrectly
  • missing_amount - order amount was not specified
  • missing_order_items - order items were not specified
  • missing_customer - customer was not specified
get/v1/redemptions

Query parameters

limitinteger

Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.

pageinteger

Which page of results to return. The lowest value is 1, the highest value is 99.

resultstring

A filter on the list based on the redemption result. Available options are: SUCCESS, FAILURE. You can provide multiple values by repeating the param.

campaignstring

A filter by the campaign name that the redemption resources originate from.

customerstring
Example:cust_nk0N1uNQ1YnupAoJGOgvsODC

Return redemptions performed by the customer with given id or source_id.

order'created_at' | '-created_at' | 'id' | '-id' | 'voucher_code' | '-voucher_code' | 'tracking_id' | '-tracking_id' | 'customer_id' | '-customer_id'

Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.

beforestring date-time

Timestamp representing the date and time before the voucher was created. The value is shown in the ISO 8601 format.

afterstring date-time

Timestamp representing the date and time after the voucher was created. The value is shown in the ISO 8601 format.

A filter on the list based on the object created_at field. The value is a dictionary with the following options: before, after. A date value must be presented in ISO 8601 format (2016-11-16T14:14:31Z or 2016-11-16). An example: [created_at][before]=2017-09-08T13:52:18.227Z

{
  "before": "2021-12-22T10:13:06.487Z",
  "after": "2021-12-22T10:13:06.487Z"
}
junction'and' | 'or'

Logical Operator Between Filters. Filter by conditions set on the junction parameter indicating how the conditions should be accounted for in the query. An AND is an all-inclusive logical operator, meaning the AND operator displays a record if ALL the conditions separated by AND are TRUE, while an OR operator displays a record if ANY of the conditions separated by OR is TRUE.

Filters for listing responses.

Response

Returns a list of redemption objects. Each entry in the array is a separate redemption object. If no more redemptions are available, the resulting array will be empty. If you provide a non-existent customer ID, this call returns an empty object.

objectstring required

The type of the object represented by JSON. This object stores information about redemptions in a dictionary.

data_refstring required

Identifies the name of the attribute that contains the array of redemption objects.

totalinteger required

Total number of redemptions.