Publications Create Response Body
Response body schema for POST v1/publication
and GET v1/publications/create
.
One of:
Publications Create Voucher Response Body, Publications Create Vouchers Response Body
Publications Create Voucher Response Body
Response body schema for POST v1/publication
and GET v1/publications/create
.
All of:
- Publications Create Base Response Body
-
Attributes Description voucher See: Voucher
Publications Create Vouchers Response Body
Response body schema for POST v1/publication
and GET v1/publications/create
.
All of:
- Publications Create Base Response Body
-
Attributes Description vouchers array
Contains the unique voucher codes that was assigned by Voucherify.
Publications Create Base Response Body
Attributes | Description |
---|---|
idstring | Unique publication ID, assigned by Voucherify. Example:pub_BbjAXnmm8e0SIm3zG8qvvFCP0KuLywtp |
objectstring | The type of the object represented by the JSON. This object stores information about the publication |
created_atstring | Timestamp representing the date and time when the publication was created. The value is shown in the ISO 8601 format. Example:2022-09-23T09:57:00.434Z |
customer_idstring | Unique customer ID of the customer receiving the publication. Example:cust_eWgXlBBiY6THFRJwX45Iakv4 |
tracking_idstring | Customer's |
metadataobject | The metadata object stores all custom attributes assigned to the publication. A set of key/value pairs that you can attach to a publication object. It can be useful for storing additional information about the publication in a structured format. |
channelstring | How the publication was originated. It can be your own custom channel or an example value provided here. Available values:API |
source_idstring , null | The merchant's publication ID if it is different from the Voucherify publication ID. It's an optional tracking identifier of a publication. It is really useful in case of an integration between multiple systems. It can be a publication ID from a CRM system, database or 3rd-party service. |
resultstring | Status of the publication attempt. Available values:SUCCESS |
customer | See: Customer With Summary Loyalty Referrals |
vouchers_idarray | Contains the unique internal voucher ID that was assigned by Voucherify. |
Voucher
This is an object representing a voucher with categories and validation rules assignments.
All of:
- Voucher Base
-
Attributes Description categories array
Contains details about the category.
Array of Categoryvalidation_rules_assignments See: Validation Rules Assignments List
Customer With Summary Loyalty Referrals
All of:
-
Customer Response Data
Attributes Description id string
The ID of an existing customer that will be linked to redemption in this request.
source_id string
A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored.
summary Customer Summary loyalty Customer Loyalty referrals Customer Referrals system_metadata object
Object used to store system metadata information.
created_at string
Timestamp representing the date and time when the customer was created. The value is shown in the ISO 8601 format.
Example:2022-08-30T06:32:07.380Z
updated_at string
Timestamp representing the date and time when the customer was updated. The value is shown in the ISO 8601 format.
Example:2022-08-31T06:32:07.380Z
assets object
Contains information about the customer's cockpit.
Attributes Description cockpit_url string
Customer's cockpit URL address.
object string
The type of the object represented by JSON.
Available values:customer
- Customer Base
Voucher Base
Attributes | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
idstring | Assigned by the Voucherify API, identifies the voucher. Example:v_mkZN9v7vjYUadXnHrMza8W5c34fE5KiV | ||||||||||||
codestring | A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters. Example:WVPblOYX | ||||||||||||
campaignstring | A unique campaign name, identifies the voucher's parent campaign. Example:Gift Card Campaign | ||||||||||||
campaign_idstring | Assigned by the Voucherify API, identifies the voucher's parent campaign. Example:camp_FNYR4jhqZBM9xTptxDGgeNBV | ||||||||||||
categorystring | Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint. | ||||||||||||
category_idstring | Unique category ID assigned by Voucherify. Example:cat_0bb343dee3cdb5ec0c | ||||||||||||
typestring | Defines the type of the voucher. Available values:GIFT_VOUCHER , DISCOUNT_VOUCHER , LOYALTY_CARD | ||||||||||||
discount | See: Discount | ||||||||||||
giftobject | Object representing gift parameters. Child attributes are present only if
| ||||||||||||
loyalty_cardobject | Object representing loyalty card parameters. Child attributes are present only if
| ||||||||||||
start_datestring | Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is inactive before this date. Example:2021-12-01T00:00:00.000Z | ||||||||||||
expiration_datestring | Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is inactive after this date. Example:2021-12-31T00:00:00.000Z | ||||||||||||
validity_timeframe | See: Validity Timeframe | ||||||||||||
validity_day_of_week | See: Validity Day Of Week | ||||||||||||
validity_hours | See: Validity Hours | ||||||||||||
activeboolean , null | A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the
| ||||||||||||
additional_infostring | An optional field to keep any extra textual information about the code such as a code description and details. | ||||||||||||
metadataobject | The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format. | ||||||||||||
assets | See: Voucher Assets | ||||||||||||
is_referral_codeboolean , null | Flag indicating whether this voucher is a referral code; | ||||||||||||
created_atstring | Timestamp representing the date and time when the voucher was created. The value is shown in the ISO 8601 format. Example:2021-12-22T10:13:06.487Z | ||||||||||||
updated_atstring | Timestamp representing the date and time when the voucher was last updated in ISO 8601 format. Example:2021-12-22T10:14:45.316Z | ||||||||||||
holder_idstring | Unique customer identifier of the redeemable holder. It equals to the customer ID assigned by Voucherify. Example:cust_eWgXlBBiY6THFRJwX45Iakv4 | ||||||||||||
referrer_idstring | Unique identifier of the referring person. Example:cust_Vzck5i8U3OhcEUFY6MKhN9Rv | ||||||||||||
objectstring | The type of the object represented by JSON. Default is | ||||||||||||
publishobject | Stores a summary of publication events: an event counter and endpoint to return details of each event. Publication is an assignment of a code to a customer, e.g. through a distribution.
| ||||||||||||
redemptionobject | Stores a summary of redemptions that have been applied to the voucher.
|
Category
Attributes | Description |
---|---|
idstring | Unique category ID assigned by Voucherify. |
namestring | Category name. |
hierarchyinteger | Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value. |
objectstring | The type of the object represented by the JSON. This object stores information about the category. Available values:category |
created_atstring | Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format. Example:2022-07-14T10:45:13.156Z |
updated_atstring | Timestamp representing the date and time when the category was updated. The value is shown in the ISO 8601 format. Example:2022-08-16T10:52:08.094Z |
Validation Rules Assignments List
Attributes | Description |
---|---|
objectstring | The type of the object represented by JSON. This object stores information about validation rules assignments. Available values:list |
data_refstring | Identifies the name of the attribute that contains the array of validation rules assignments. Available values:data |
dataarray | Contains array of validation rules assignments. Array of Business Validation Rule Assignment |
totalinteger | Total number of validation rules assignments. |
Customer Summary
Attributes | Description |
---|---|
redemptions | See: Customer Summary Redemptions |
orders | See: Customer Summary Orders |
Customer Loyalty
Attributes | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
pointsinteger | Customer's loyalty points. | ||||||||||||
referred_customersinteger | Total number of customers referred by the customer. | ||||||||||||
campaignsobject | Contains campaigns with details about point balances and how many customers were referred by the customer.
|
Customer Referrals
Customer Base
Attributes | Description | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
namestring | Customer's first and last name. | ||||||||||||||
descriptionstring | An arbitrary string that you can attach to a customer object. | ||||||||||||||
emailstring | Customer's email address. | ||||||||||||||
phonestring | Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel. | ||||||||||||||
birthdaystring |
| ||||||||||||||
birthdatestring | Customer's birthdate; format YYYY-MM-DD. | ||||||||||||||
addressobject , null | Customer's address.
| ||||||||||||||
metadataobject | A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. |
Discount
Contains information about discount.
One of:
Amount, Unit, Unit Multiple, Percent, Fixed
Validity Timeframe
Attributes | Description |
---|---|
durationstring | Defines the amount of time an earning rule will be active in ISO 8601 format. For example, an earning rule with a PT1H |
intervalstring | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, an earning rule with an P2D |
Validity Day Of Week
Integer array corresponding to the particular days of the week in which the voucher is valid.
0
Sunday1
Monday2
Tuesday3
Wednesday4
Thursday5
Friday6
Saturday
Validity Hours
Attributes | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
dailyarray | Defines the reccuring period(s) when the resource is active. The periods should not overlap. Array of:
|
Voucher Assets
Attributes | Description | ||||||
---|---|---|---|---|---|---|---|
qrobject | Stores Quick Response (QR) representation of encrypted code.
| ||||||
barcodeobject | Stores barcode representation of encrypted code.
|
Business Validation Rule Assignment
Attributes | Description |
---|---|
idstring | The unique identifier for a assignment |
rule_idstring | The unique identifier for a rule |
related_object_idstring | The unique identifier for a related object |
related_object_typestring | The type of related object |
created_atstring | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. Example:2022-03-09T11:19:04.819Z |
updated_atstring | Timestamp representing the date and time when the object was last updated in ISO 8601 format. Example:2022-03-09T11:19:04.819Z |
objectstring | The type of the object represented by JSON. Available values:validation_rules_assignment |
validation_statusstring | The validation status of the assignment Available values:VALID , PARTIALLY_VALID , INVALID |
validation_omitted_rulesarray | The list of omitted rules |
Customer Summary Redemptions
Attributes | Description | ||||||
---|---|---|---|---|---|---|---|
total_redeemedinteger | Total number of redemptions made by the customer. | ||||||
total_failedinteger | Total number of redemptions that failed. | ||||||
total_succeededinteger | Total number of redemptions that succeeded. | ||||||
total_rolled_backinteger | Total number of redemptions that were rolled back for the customer. | ||||||
total_rollback_failedinteger | Total number of redemption rollbacks that failed. | ||||||
total_rollback_succeededinteger | Total number of redemption rollbacks that succeeded. | ||||||
giftobject | Summary of gift card credits.
| ||||||
loyalty_cardobject | Summary of loyalty points.
|
Customer Summary Orders
Attributes | Description |
---|---|
total_amountinteger | The total amount spent by the customer. Value is multiplied by 100 to precisely represent 2 decimal places. For example |
total_countinteger | Total number of orders made by the customer. |
average_amountinteger | Average amount spent on orders. |
last_order_amountinteger | Amount spent on last order. Value is multiplied by 100 to precisely represent 2 decimal places. For example |
last_order_datestring | Timestamp representing the date and time of the customer's last order in ISO 8601 format. Example:2022-08-30T11:51:08.029Z |
Amount
Attributes | Description |
---|---|
typestring | Defines the type of the voucher. Available values:AMOUNT |
amount_offnumber | Amount taken off the subtotal of a price. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 discount is written as 1000. |
amount_off_formulastring | |
aggregated_amount_limitinteger | Maximum discount amount per order. |
effect | Defines how the discount is applied to the customer's order. Discount Amount Vouchers Effect Types |
is_dynamicboolean | Flag indicating whether the discount was calculated using a formula. |
Unit
Attributes | Description |
---|---|
typestring | Discount type. Available values:UNIT |
unit_offinteger | Number of units to be granted a full value discount. |
unit_off_formulastring | |
effect | Defines how the unit is added to the customer's order. Discount Unit Vouchers Effect Types |
unit_typestring | The product deemed as free, chosen from product inventory (e.g. time, items). |
product | Contains information about the product. Simple Product Discount Unit |
sku | See: Simple Sku Discount Unit |
is_dynamicboolean | Flag indicating whether the discount was calculated using a formula. |
Unit Multiple
Attributes | Description |
---|---|
typestring | Discount type. Available values:UNIT |
effectstring | Defines how the discount is applied to the customer's order. Available values:ADD_MANY_ITEMS |
unitsarray | Array of One Unit |
Percent
Attributes | Description |
---|---|
typestring | Defines the type of the voucher. Available values:PERCENT |
percent_offnumber | The percent discount that the customer will receive. |
percent_off_formulastring | |
amount_limitnumber | Upper limit allowed to be applied as a discount. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount is written as 600. |
aggregated_amount_limitinteger | Maximum discount amount per order. |
effect | Defines how the discount is applied to the customer's order. Discount Percent Vouchers Effect Types |
is_dynamicboolean | Flag indicating whether the discount was calculated using a formula. |
Fixed
Attributes | Description |
---|---|
typestring | Defines the type of the voucher. Available values:FIXED |
fixed_amountnumber | Sets a fixed value for an order total or the item price. The value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 discount is written as 1000. If the fixed amount is calculated by the formula, i.e. the |
fixed_amount_formulastring | |
effect | Defines how the discount is applied to the customer's order. Discount Fixed Vouchers Effect Types |
is_dynamicboolean | Flag indicating whether the discount was calculated using a formula. |
Discount Amount Vouchers Effect Types
Available values: APPLY_TO_ORDER
, APPLY_TO_ITEMS
, APPLY_TO_ITEMS_PROPORTIONALLY
, APPLY_TO_ITEMS_PROPORTIONALLY_BY_QUANTITY
, APPLY_TO_ITEMS_BY_QUANTITY
Discount Unit Vouchers Effect Types
Available values: ADD_MISSING_ITEMS
, ADD_NEW_ITEMS
, ADD_MANY_ITEMS
Simple Product Discount Unit
Attributes | Description |
---|---|
idstring | Unique product ID, assigned by Voucherify. |
source_idstring | Product's source ID. |
namestring | Product name. |
Simple Sku Discount Unit
Attributes | Description |
---|---|
idstring | Unique SKU ID, assigned by Voucherify. |
source_idstring | Product variant's source ID. |
namestring | Sku name |
One Unit
Attributes | Description |
---|---|
unit_offnumber | Number of units to be granted a full value discount. |
unit_off_formulastring | |
effectstring | Defines how the unit is added to the customer's order. Available values:ADD_NEW_ITEMS , ADD_MISSING_ITEMS |
unit_typestring | The product deemed as free, chosen from product inventory (e.g. time, items). |
product | Contains information about the product. Simple Product Discount Unit |
sku | Contains information about the sku. Simple Sku Discount Unit |
Discount Percent Vouchers Effect Types
Available values: APPLY_TO_ORDER
, APPLY_TO_ITEMS
Discount Fixed Vouchers Effect Types
Available values: APPLY_TO_ORDER
, APPLY_TO_ITEMS