This is an object representing an asynchronous action.
+ +All of: + +1. [Async Action Base](#async-action-base) +2.Async action unique ID.
**Example:**aa_0adad13d6f057f088e
| +| type`string` |Type of async action.
Available values: `CAMPAIGN.VOUCHERS_IMPORT`, `CAMPAIGN.VOUCHERS_IMPORT_CSV`, `CAMPAIGN.VOUCHERS_UPDATE`, `CAMPAIGN.VOUCHERS_DELETE`, `CAMPAIGN.VOUCHERS_GENERATE`, `CAMPAIGNS.METADATA_KEY_PURGE`, `CUSTOMERS.IMPORT_CSV`, `CUSTOMERS.BULK_UPDATE`, `CUSTOMERS.METADATA_UPDATE`, `CUSTOMERS.METADATA_KEY_PURGE`, `PRODUCTS.BULK_UPDATE`, `PRODUCTS.METADATA_UPDATE`, `PRODUCTS.METADATA_KEY_PURGE`, `PRODUCTS.IMPORT_CSV`, `SKUS.IMPORT_CSV`, `VOUCHERS.IMPORT`, `VOUCHERS.IMPORT_CSV`, `VOUCHERS.BULK_UPDATE`, `VOUCHERS.METADATA_UPDATE`, `VOUCHERS.METADATA_KEY_PURGE`, `ORDERS.IMPORT`, `ORDERS.METADATA_KEY_PURGE` | +| status`string` |Status of the async action. Informs you whether the async action has already been completed.
Available values: `DONE`, `ENQUEUED`, `FAILED`, `IN_PROGRESS` | +| operation_status`string` |Status of async action processing. Informs about the async action status, whether it failed, succeeded, or the status is unknown.
Available values: `FAILED`, `SUCCESS`, `UNKNOWN` | +| created_at`string` |Timestamp representing the date and time when the async action was scheduled in ISO 8601 format.
**Example:**2022-06-23T11:21:45.578Z
| +| updated_at`string` |Timestamp representing the date and time when the async action was updated. The value is shown in the ISO 8601 format.
**Example:**2022-06-23T11:21:46.795Z
| +| request_id`string` |Unique request ID.
**Example:**v-0b45cee140c3c9b5ca
| +| processing_time`integer` |The length of time it took to process the request in milliseconds.
**Example:**1217
| +| progress`integer` |% progress to completion of the asynchronous action.
| +| object`string` |The type of the object represented by JSON. This object stores information about the async_action
.
A human-readable message providing a short description about the result.
| +| failed`array` |If any records failed during the process, this array shows the failure details.
Array of:Attributes | Description |
---|---|
codestring | Unique voucher code. |
reasonstring | Detailed failure cause for the voucher code import. |
Number of resources processed successfully.
| +| failed_count`integer` |Number of resources failed to process.
| + +## CAMPAIGN.VOUCHERS_IMPORT_CSV +| Attributes | Description | +|:-----|:--------| +| message`string` |A human-readable message providing a short description about the result.
| +| failed`array` |If any records failed during the process, this array shows the failure details.
Array of:Attributes | Description |
---|---|
codestring | Unique voucher code. |
rowinteger | The CSV file row number where the code definition is recorded. The row counter excludes the file headers row. |
reasonstring | Detailed failure cause for the voucher code import. |
Number of resources processed successfully.
| +| failed_count`integer` |Number of resources failed to process.
| + +## CAMPAIGN.VOUCHERS_UPDATE +| Attributes | Description | +|:-----|:--------| +| message`string` |A human-readable message providing a short description about the result.
| +| done_count`integer` |Number of resources processed successfully.
| + +## CAMPAIGN.VOUCHERS_DELETE +| Attributes | Description | +|:-----|:--------| +| message`string` |A human-readable message providing a short description about the result.
| +| done_count`integer` |Number of resources processed successfully.
| + +## CAMPAIGN.VOUCHERS_GENERATE +| Attributes | Description | +|:-----|:--------| +| message`string` |A human-readable message providing a short description about the result.
| +| done_count`integer` |Number of resources processed successfully.
| + +## CAMPAIGNS.METADATA_KEY_PURGE +| Attributes | Description | +|:-----|:--------| +| message`string` |A human-readable message providing a short description about the result.
| +| done_count`integer` |Number of resources processed successfully.
| + +## CUSTOMERS.IMPORT_CSV +| Attributes | Description | +|:-----|:--------| +| message`string` |A human-readable message providing a short description about the result.
| +| failed`array` |If any records failed during the process, this array shows the failure details.
Array of:Attributes | Description |
---|---|
source_idstring | Unique customer ID from your inventory system as indicated in the CSV file. |
rowinteger | The CSV file row number where the customer is recorded. The row counter excludes the file headers row. |
reasonstring | Detailed failure cause for the customer import. |
Number of resources processed successfully.
| +| failed_count`integer` |Number of resources failed to process.
| + +## CUSTOMERS.BULK_UPDATE +All of: + +1. [Async Action Voucher Customer Product Bulk Update Result](#async-action-voucher-customer-product-bulk-update-result) +2.Attributes | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
errorsarray | List of errors encountered during processing. Array of:
|
List of errors encountered during processing.
Array of:Attributes | Description |
---|---|
messagestring | A human-readable message providing a short description of the error. |
detailsstring | A human-readable message providing more details about the error. |
keystring | Short string describing the kind of error which occurred. |
A human-readable message providing a short description about the result.
| +| done_count`integer` |Number of resources processed successfully.
| + +## PRODUCTS.BULK_UPDATE +All of: + +1. [Async Action Voucher Customer Product Bulk Update Result](#async-action-voucher-customer-product-bulk-update-result) +2.Attributes | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
errorsarray | List of errors encountered during processing. Array of:
|
List of errors encountered during processing.
Array of:Attributes | Description |
---|---|
messagestring | A human-readable message providing a short description of the error. |
detailsstring | A human-readable message providing more details about the error. |
keystring | Short string describing the kind of error which occurred. |
A human-readable message providing a short description about the result.
| +| failed`array` |If any records failed during the process, this array shows the failure details.
Array of:Attributes | Description |
---|---|
rowinteger | The CSV file row number where the product definition is recorded. The row counter excludes the file headers row. |
source_idstring | The source identifier of the product that caused the error. |
reasonstring | Detailed failure cause for the product import. |
Number of resources processed successfully.
| +| failed_count`integer` |Number of resources failed to process.
| + +## SKUS.IMPORT_CSV +| Attributes | Description | +|:-----|:--------| +| message`string` |A human-readable message providing a short description about the result.
**Example:**2 sku(s) imported successfully, 6 failed.
| +| failed`array` |If any records failed during the process, this array shows the failure details.
Array of:Attributes | Description |
---|---|
rowinteger | The CSV file row number where the SKU definition is recorded. The row counter excludes the file headers row. Example:2 |
reasonstring | Detailed failure cause for the SKU import. Example:Resource sku with id size-small is in use by products with ids [prod_0b0e3441c2462eff2c] |
Number of resources processed successfully.
| +| failed_count`integer` |Number of resources failed to process.
| + +## PRODUCTS.METADATA_KEY_PURGE +| Attributes | Description | +|:-----|:--------| +| message`string` |A human-readable message providing a short description about the result.
| +| done_count`integer` |Number of resources updated successfully.
| + +## VOUCHERS.IMPORT +| Attributes | Description | +|:-----|:--------| +| message`string` |A human-readable message providing a short description about the result.
| +| failed`object` |If any records failed during the process, this array shows the failure details.
Attributes | Description |
---|---|
codestring | Unique voucher code. |
reasonstring | Detailed failure cause for the voucher code import. |
Number of resources processed successfully.
| +| failed_count`integer` |Number of resources failed to process.
| + +## VOUCHERS.IMPORT_CSV +| Attributes | Description | +|:-----|:--------| +| message`string` |A human-readable message providing a short description about the result.
| +| failed`array` |If any records failed during the process, this array shows the failure details.
Array of:Attributes | Description |
---|---|
codestring | Unique voucher code. |
rowinteger | The CSV file row number where the code definition is recorded. The row counter excludes the file headers row. |
reasonstring | Detailed failure cause for the voucher code import. |
Number of resources processed successfully.
| +| failed_count`integer` |Number of resources failed to process.
| + +## VOUCHERS.BULK_UPDATE +All of: + +1. [Async Action Voucher Customer Product Bulk Update Result](#async-action-voucher-customer-product-bulk-update-result) +2.Attributes | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
errorsarray | List of errors encountered during processing. Array of:
|
List of errors encountered during processing.
Array of:Attributes | Description |
---|---|
messagestring | A human-readable message providing a short description of the error. |
detailsstring | A human-readable message providing more details about the error. |
keystring | Short string describing the kind of error which occurred. |
A human-readable message providing a short description about the result.
| +| done_count`integer` |Number of resources processed successfully.
| + +## ORDERS.IMPORT +| Attributes | Description | +|:-----|:--------| +| message`string` |A human-readable message providing a short description about the result.
| +| failed`object` |If any records failed during the process, this array shows the failure details.
Attributes | Description |
---|---|
source_idstring | Unique order source ID. |
reasonstring | Detailed failure cause for the voucher code import. |
Number of resources processed successfully.
| +| failed_count`integer` |Number of resources failed to process.
| + +## ORDERS.METADATA_KEY_PURGE +| Attributes | Description | +|:-----|:--------| +| message`string` |A human-readable message providing a short description about the result.
| +| done_count`integer` |Number of resources processed successfully.
| + +## Async Action Voucher Customer Product Bulk Update Result +| Attributes | Description | +|:-----|:--------| +| done_count`integer` |Number of items successfully processed.
| +| failed_count`integer` |Number of items that failed to be processed.
| +| reports`array` |List of URLs to report files.
| +| reports_available_till`string` |Timestamp until the reports are available.
| + +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/ASYNC-ACTIONS-Get-Async-Action.md b/reference-docs/ASYNC-ACTIONS-Get-Async-Action.md new file mode 100644 index 00000000..3843ec8b --- /dev/null +++ b/reference-docs/ASYNC-ACTIONS-Get-Async-Action.md @@ -0,0 +1,14 @@ +--- +title: Get Async Action +type: endpoint +categorySlug: voucherify-api +slug: get-async-action +parentDocSlug: async-actions +hidden: false +order: 3 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/ASYNC-ACTIONS-List-Async-Actions.md b/reference-docs/ASYNC-ACTIONS-List-Async-Actions.md new file mode 100644 index 00000000..54024449 --- /dev/null +++ b/reference-docs/ASYNC-ACTIONS-List-Async-Actions.md @@ -0,0 +1,14 @@ +--- +title: List Async Actions +type: endpoint +categorySlug: voucherify-api +slug: list-async-actions +parentDocSlug: async-actions +hidden: false +order: 2 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/CAMPAIGNS-Add-Voucher-With-Specific-Code-To-Campaign.md b/reference-docs/CAMPAIGNS-Add-Voucher-With-Specific-Code-To-Campaign.md new file mode 100644 index 00000000..1701126f --- /dev/null +++ b/reference-docs/CAMPAIGNS-Add-Voucher-With-Specific-Code-To-Campaign.md @@ -0,0 +1,14 @@ +--- +title: Add Voucher with Specific Code to Campaign +type: endpoint +categorySlug: voucherify-api +slug: add-voucher-with-specific-code-to-campaign +parentDocSlug: campaigns +hidden: false +order: 80 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/CAMPAIGNS-Add-Vouchers-To-Campaign.md b/reference-docs/CAMPAIGNS-Add-Vouchers-To-Campaign.md new file mode 100644 index 00000000..3ffeffc2 --- /dev/null +++ b/reference-docs/CAMPAIGNS-Add-Vouchers-To-Campaign.md @@ -0,0 +1,14 @@ +--- +title: Add Voucher to Campaign +type: endpoint +categorySlug: voucherify-api +slug: add-vouchers-to-campaign +parentDocSlug: campaigns +hidden: false +order: 70 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/CAMPAIGNS-Campaign-Object.md b/reference-docs/CAMPAIGNS-Campaign-Object.md new file mode 100644 index 00000000..d46d4ea3 --- /dev/null +++ b/reference-docs/CAMPAIGNS-Campaign-Object.md @@ -0,0 +1,319 @@ +--- +title: Campaign Object +type: basic +categorySlug: voucherify-api +parentDocSlug: campaigns +slug: campaign-object +hidden: false +order: 1 +--- + +## Campaign +All of: + +1. [Campaign Base](#campaign-base) +2.Attributes | Description |
---|---|
promotion | See: Promotion Tiers |
validation_rules_assignments | See: Validation Rules Assignments List |
Unique campaign ID, assigned by Voucherify.
**Example:**camp_f7fBbQxUuTN7dI7tGOo5XMDA
| +| name`string` |Campaign name.
| +| description`string` |An optional field to keep any extra textual information about the campaign such as a campaign description and details.
| +| campaign_type`string` |Type of campaign.
Available values: `LOYALTY_PROGRAM`, `GIFT_VOUCHERS`, `DISCOUNT_COUPONS`, `PROMOTION`, `REFERRAL_PROGRAM` | +| type`string` |Defines whether the campaign can be updated with new vouchers after campaign creation or if the campaign consists of generic (standalone) voucherss.
AUTO_UPDATE
: the campaign is dynamic, i.e. vouchers will generate based on set criteriaSTATIC
: vouchers need to be manually publishedSTANDALONE
: campaign for single vouchersIndicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled.
| +| join_once`boolean` |If this value is set to true
, customers will be able to join the campaign only once. It is always false
for generic (standalone) vouchers campaigns and it cannot be changed in them. It is always true
for loyalty campaigns and it cannot be changed in them.
Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema.
| +| validity_timeframe | See: [Validity Timeframe](#validity-timeframe) | +| validity_day_of_week | See: [Validity Day Of Week](#validity-day-of-week) | +| validity_hours | See: [Validity Hours](#validity-hours) | +| activity_duration_after_publishing`string` |Defines the amount of time the vouchers will be active after publishing. The value is shown in the ISO 8601 format. For example, a voucher with the value of P24D will be valid for a duration of 24 days.
| +| vouchers_count`integer` |Total number of unique vouchers in campaign.
| +| start_date`string` |Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is inactive before this date.
**Example:**2022-09-20T00:00:00.000Z
| +| expiration_date`string` |Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is inactive after this date.
**Example:**2022-09-30T00:00:00.000Z
| +| active`boolean` |A flag to toggle the campaign on or off. You can disable a campaign even though it's within the active period defined by the start_date
and expiration_date
.
true
indicates an active campaignfalse
indicates an inactive campaignThe metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.
| +| created_at`string` |Timestamp representing the date and time when the campaign was created. The value is shown in the ISO 8601 format.
**Example:**2021-12-01T08:00:50.038Z
| +| updated_at`string` |Timestamp representing the date and time when the campaign was last updated in ISO 8601 format.
**Example:**2022-09-20T09:18:19.623Z
| +| category`string` |Unique category name.
| +| creation_status`string` |Indicates the status of the campaign creation.
Available values: `DONE`, `IN_PROGRESS`, `FAILED`, `DRAFT`, `MODIFYING` | +| vouchers_generation_status`string` |Indicates the status of the campaign's voucher generation.
Available values: `DONE`, `IN_PROGRESS`, `FAILED`, `DRAFT`, `MODIFYING` | +| readonly`boolean` |Indicates whether the campaign can be only read by a restricted user in the Areas and Stores enterprise feature. It is returned only to restricted users; this field is not returned for users with other roles. It is also not returned for restricted users who use the GET Campaign summary endpoint.
| +| protected`boolean` |Indicates whether the resource can be deleted.
| +| category_id`string`, `null` |Unique category ID that this campaign belongs to.
**Example:**cat_0b688929a2476386a7
| +| categories`array` |Contains details about the campaign category. For the GET List campaigns endpoint, this is returned only if the expand=category
query parameter is passed in the request. Otherwise, it is returned as an empty array. For GET Campaign summary endpoint, it is always returned as an empty array.
The type of the object represented by JSON. This object stores information about the campaign.
| +| referral_program | See: [Referral Program](#referral-program) | +| loyalty_tiers_expiration | See: [Loyalty Tiers Expiration](#loyalty-tiers-expiration) | +| access_settings_assignments | See: [Access Settings Campaign Assignments List](#access-settings-campaign-assignments-list) | + +## Promotion Tiers +| Attributes | Description | +|:-----|:--------| +| object`string` |The type of the object represented by JSON. This object stores information about promotion tiers in a dictionary.
| +| data_ref`string` |Identifies the name of the attribute that contains the array of promotion tier objects.
| +| tiers`array` |Contains array of promotion tier objects.
Array of [Promotion Tier](#promotion-tier) | +| total`integer` |Total number of promotion tiers.
| +| has_more`boolean` |As query results are always limited (by the limit parameter), the has_more
flag indicates if there are more records for given filter parameters. This lets you know if you can run another request to get more records returned in the results.
The type of the object represented by JSON. This object stores information about validation rules assignments.
Available values: `list` | +| data_ref`string` |Identifies the name of the attribute that contains the array of validation rules assignments.
Available values: `data` | +| data`array` |Contains array of validation rules assignments.
Array of [Business Validation Rule Assignment](#business-validation-rule-assignment) | +| total`integer` |Total number of validation rules assignments.
| + +## Campaign Voucher +| Attributes | Description | +|:-----|:--------| +| type`string` |Type of voucher.
| +| discount |Defines the voucher discount type and details.
[Discount](#discount) | +| gift |Defines the voucher gift details.
[Gift](#gift) | +| loyalty_card |Defines the voucher loyalty card details.
[Campaign Loyalty Card](#campaign-loyalty-card) | +| redemption`object` |Defines the redemption limits on vouchers.
Attributes | Description |
---|---|
quantityinteger , null | How many times a voucher can be redeemed. A |
Flag indicating whether this voucher is a referral code; true
for campaign type REFERRAL_PROGRAM
.
Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is inactive before this date.
**Example:**2022-09-20T00:00:00.000Z
| +| expiration_date`string` |Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is inactive after this date.
**Example:**2022-09-30T00:00:00.000Z
| +| validity_timeframe | See: [Validity Timeframe](#validity-timeframe) | +| validity_day_of_week | See: [Validity Day Of Week](#validity-day-of-week) | +| validity_hours | See: [Validity Hours](#validity-hours) | + +## Validity Timeframe +| Attributes | Description | +|:-----|:--------| +| duration`string` |Defines the amount of time an earning rule will be active in ISO 8601 format. For example, an earning rule with a duration
of PT1H
will be valid for a duration of one hour.
PT1H
| +| interval`string` |Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, an earning rule with an interval
of P2D
will be valid every other day.
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
SaturdayDefines the reccuring period(s) when the resource is active. The periods should not overlap.
Array of:Attributes | Description |
---|---|
start_timestring | Defines the starting hour of validity in the HH:mm format. The resource is inactive before this time. Example:12:00 |
days_of_weekarray | Integer array corresponding to the particular days of the week in which the resource is valid.
|
expiration_timestring | Defines the ending hour of validity in the HH:mm format. The resource is inactive after this time. Example:14:00 |
Unique category ID assigned by Voucherify.
| +| name`string` |Category name.
| +| hierarchy`integer` |Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value.
| +| object`string` |The type of the object represented by the JSON. This object stores information about the category.
Available values: `category` | +| created_at`string` |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_at`string` |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
| + +## Referral Program +| Attributes | Description | +|:-----|:--------| +| conversion_event_type`string` |Define how a referral is triggered.
Available values: `redemption`, `custom_event` | +| custom_event`object` |Contains details about the custom event.
Attributes | Description |
---|---|
idstring | Unique custom event ID. Example:ms_Ll9enAm2BCN0M1s4VxWobLFM |
namestring | Custom event name. |
Defines the referee reward.
Attributes | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
related_object_parentobject | Details of the resource from which the reward originates.
| ||||||||
typestring | Type of reward. Available values:LOYALTY_CARD , GIFT_VOUCHER | ||||||||
amountstring | Define the number of |
Tier qualification.
BALANCE
: Points balance is based on the customer's current points balance. Customers qualify for the tier if their points balance is in the points range of the tier.POINTS_IN_PERIOD
: A customer qualifies for the tier only if the sum of the accumulated points in a defined time interval reaches the tier threshold.
Customers can qualify for the tier if they collected enough points in a given time period. So, in addition to the customer having to reach a points range, they also need to have collected the points within a set time period.
Period | Definition |
---|---|
Calendar Month | Points collected in one calendar month January, February, March, etc. |
Calendar Quarter | Points collected in the quarter - January - March - April - June - July - September - October - December |
Calendar Half-year | Points collected in the half-year - January - June - July - December |
Calendar Year | Points collected in one calendar year January - December |
Defines the conditions for the start date of the tier.
Attributes | Description |
---|---|
typestring | What triggers the tier to be valid for a customer. IMMEDIATE , NEXT_PERIOD |
Defines the conditions for the expiration date of a tier.
Attributes | Description |
---|---|
typestring | What triggers the tier to expire for a customer. END_OF_PERIOD , END_OF_NEXT_PERIOD , BALANCE_DROP , CUSTOM |
extendstring | Extend the expiration by adding extra months or days in ISO 8601 format. The tier will remain active even though it reaches its expiration time period. For example, a tier with a duration of |
rounding | Defines the rounding mechanism for tier expiration. |
The type of the object represented by JSON. Default is list
. This object stores information about campaign assignments to areas and stores
Identifies the name of the attribute that contains the array of campaign assignments.
Available values: `data` | +| data`array` |Contains an array of campaign assignments.
Array of [Areas and Stores Campain Assignment](#areas-and-stores-campain-assignment) | +| total`integer` |Total number of areas and stores to which the campaign is assigned.
| + +## Promotion Tier +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique promotion tier ID.
**Example:**promo_63fYCt81Aw0h7lzyRkrGZh9p
| +| created_at`string` |Timestamp representing the date and time when the promotion tier was created. The value is shown in the ISO 8601 format.
**Example:**2021-12-15T11:34:01.333Z
| +| updated_at`string` |Timestamp representing the date and time when the promotion tier was updated. The value is shown in the ISO 8601 format.
**Example:**2022-02-09T09:20:05.603Z
| +| name`string` |Name of the promotion tier.
| +| banner`string` |Text to be displayed to your customers on your website.
| +| action`object` |Contains details about the discount applied by the promotion tier.
Attributes | Description |
---|---|
discount | See: Discount |
The metadata object stores all custom attributes assigned to the promotion tier. A set of key/value pairs that you can attach to a promotion tier object. It can be useful for storing additional information about the promotion tier in a structured format.
| +| hierarchy`integer` |The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy.
| +| promotion_id`string` |Promotion unique ID.
| +| campaign`object` |Contains details about promotion tier's parent campaign.
Attributes | Description |
---|---|
idstring | Unique campaign ID. |
start_datestring | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is inactive before this date. Example:2022-09-22T00:00:00.000Z |
expiration_datestring | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is inactive after this date. Example:2022-09-30T00:00:00.000Z |
validity_timeframe | See: Validity Timeframe |
validity_day_of_week | See: Validity Day Of Week |
validity_hours | See: Validity Hours |
activeboolean | A flag indicating whether the campaign is active or not active. A campaign can be disabled even though it's within the active period defined by the
|
category_idstring | Unique category ID that this campaign belongs to. Example:cat_0b688929a2476386a6 |
objectstring | The type of the object represented by the campaign object. This object stores information about the campaign. |
Promotion tier's parent campaign's unique ID.
| +| active`boolean` |A flag to toggle the promotion tier on or off. You can disable a promotion tier even though it's within the active period defined by the start_date
and expiration_date
.
true
indicates an active promotion tierfalse
indicates an inactive promotion tierActivation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Promotion tier is inactive before this date.
**Example:**2022-09-23T00:00:00.000Z
| +| expiration_date`string` |Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is inactive after this date.
**Example:**2022-09-26T00:00:00.000Z
| +| validity_timeframe | See: [Validity Timeframe](#validity-timeframe) | +| validity_day_of_week | See: [Validity Day Of Week](#validity-day-of-week) | +| validity_hours | See: [Validity Hours](#validity-hours) | +| summary`object` |Contains statistics about promotion tier redemptions and orders.
Attributes | Description | ||||||
---|---|---|---|---|---|---|---|
redemptionsobject | Contains statistics about promotion tier redemptions.
| ||||||
ordersobject | Contains statistics about orders related to the promotion tier.
|
The type of the object represented by JSON. This object stores information about the promotion tier.
| +| validation_rule_assignments | See: [Validation Rule Assignments List](#validation-rule-assignments-list) | +| category_id`string` |Promotion tier category ID.
**Example:**cat_0c9da30e7116ba6bba
| +| categories`array` | Array of [Category](#category) | + +## Business Validation Rule Assignment +| Attributes | Description | +|:-----|:--------| +| id`string` |The unique identifier for a assignment
| +| rule_id`string` |The unique identifier for a rule
| +| related_object_id`string` |The unique identifier for a related object
| +| related_object_type`string` |The type of related object
| +| created_at`string` |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_at`string` |Timestamp representing the date and time when the object was last updated in ISO 8601 format.
**Example:**2022-03-09T11:19:04.819Z
| +| object`string` |The type of the object represented by JSON.
Available values: `validation_rules_assignment` | +| validation_status`string` |The validation status of the assignment
Available values: `VALID`, `PARTIALLY_VALID`, `INVALID` | +| validation_omitted_rules`array` |The list of omitted rules
| + +## Discount +Contains information about discount.
+ +One of: + +[Amount](#amount), [Unit](#unit), [Unit Multiple](#unit-multiple), [Percent](#percent), [Fixed](#fixed) + +## Gift +| Attributes | Description | +|:-----|:--------| +| amount`number` |Total gift card income over the lifetime of the card. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents
for $100.00
.
Total amount of subtracted credits over the gift card lifetime.
| +| balance`number` |Available funds. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents
for $100.00
. balance
= amount
- subtracted_amount
- redemption.redeemed_amount
.
Defines how the credits are applied to the customer's order.
Available values: `APPLY_TO_ORDER`, `APPLY_TO_ITEMS` | + +## Campaign Loyalty Card +| Attributes | Description | +|:-----|:--------| +| points`integer` |The initial number of points to assign to the loyalty card. This is the current loyalty card score i.e. the number of loyalty points on the card.
| +| expiration_rules`object` |Defines the loyalty point expiration rule. This expiration rule applies when there are no expiration_rules
defined for an earning rule.
Attributes | Description |
---|---|
period_typestring | Type of period. Can be set for FIXED_DAY_OF_YEAR , MONTH |
period_valueinteger | Value of the period. Required for the |
rounding_typestring | Type of rounding of the expiration period. Optional for the END_OF_MONTH , END_OF_QUARTER , END_OF_HALF_YEAR , END_OF_YEAR , PARTICULAR_MONTH |
rounding_valueinteger | Value of rounding of the expiration period. Required for the |
fixed_monthinteger | Determines the month when the points expire; |
fixed_dayinteger | Determines the day of the month when the points expire. Required for the |
Number of characters in a generated code (excluding prefix and postfix).
| +| charset`string` |Characters that can appear in the code.
Examples:
0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ
0123456789
A text appended before the code.
| +| postfix`string` |A text appended after the code.
| +| pattern`string` |A pattern for codes where hashes (#) will be replaced with random characters. Overrides length
.
Internal value, does not change anything if provided.
| + +## Areas and Stores Campain Assignment +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique identifier of the campaign assignment.
**Example:**arsca_0ef5ee192117ae2416
| +| area_id`string` |Unique identifier of the area to which the campaign is assigned.
**Example:**ar_0ea6cd7b781b8f857f
| +| all_stores`boolean` |Determines if the campaign is assigned to all of the stores in the area, i.e. if an area ID is passed in the access_settings.assign.area_all_stores_ids
in the request.
Unique identifier of the store to which the campaign is assigned.
**Example:**ars_0ec347e2016bed85f4
| +| created_at`string` |Date and time when the assignment was made. The value is shown in the ISO 8601 format.
**Example:**2024-06-25T19:04:16.260Z
| +| object`string` |The type of the object represented by JSON. This object stores information about the campaign assignment to areas or stores.
Available values: `area_store_campaign_assignment` | + +## Validation Rule Assignments List +| Attributes | Description | +|:-----|:--------| +| object`string` |The type of the object represented by JSON. This object stores information about validation rule assignments.
| +| data_ref`string` |Identifies the name of the JSON property that contains the array of validation rule assignments.
| +| data`array` |A dictionary that contains an array of validation rule assignments.
Array of [Validation Rule Assignment](#validation-rule-assignment) | +| total`integer` |Total number of validation rule assignments.
| + +## Amount +| Attributes | Description | +|:-----|:--------| +| type`string` |Defines the type of the voucher.
Available values: `AMOUNT` | +| amount_off`number` |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_formula`string` | | +| aggregated_amount_limit`integer` |Maximum discount amount per order.
| +| effect |Defines how the discount is applied to the customer's order.
[Discount Amount Vouchers Effect Types](#discount-amount-vouchers-effect-types) | +| is_dynamic`boolean` |Flag indicating whether the discount was calculated using a formula.
| + +## Unit +| Attributes | Description | +|:-----|:--------| +| type`string` |Discount type.
Available values: `UNIT` | +| unit_off`integer` |Number of units to be granted a full value discount.
| +| unit_off_formula`string` |Formula used to calculate the number of units.
| +| effect |Defines how the unit is added to the customer's order.
[Discount Unit Vouchers Effect Types](#discount-unit-vouchers-effect-types) | +| unit_type`string` |The product deemed as free, chosen from product inventory (e.g. time, items).
| +| product |Contains information about the product.
[Simple Product Discount Unit](#simple-product-discount-unit) | +| sku | See: [Simple Sku Discount Unit](#simple-sku-discount-unit) | +| is_dynamic`boolean` |Flag indicating whether the discount was calculated using a formula.
| + +## Unit Multiple +| Attributes | Description | +|:-----|:--------| +| type`string` |Discount type.
Available values: `UNIT` | +| effect`string` |Defines how the discount is applied to the customer's order.
Available values: `ADD_MANY_ITEMS` | +| units`array` | Array of [One Unit](#one-unit) | + +## Percent +| Attributes | Description | +|:-----|:--------| +| type`string` |Defines the type of the voucher.
Available values: `PERCENT` | +| percent_off`number` |The percent discount that the customer will receive.
| +| percent_off_formula`string` | | +| amount_limit`number` |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_limit`integer` |Maximum discount amount per order.
| +| effect |Defines how the discount is applied to the customer's order.
[Discount Percent Vouchers Effect Types](#discount-percent-vouchers-effect-types) | +| is_dynamic`boolean` |Flag indicating whether the discount was calculated using a formula.
| + +## Fixed +| Attributes | Description | +|:-----|:--------| +| type`string` |Defines the type of the voucher.
Available values: `FIXED` | +| fixed_amount`number` |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_formula
parameter is present in the fixed amount definition, this value becomes the fallback value. As a result, if the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed value.
Defines how the discount is applied to the customer's order.
[Discount Fixed Vouchers Effect Types](#discount-fixed-vouchers-effect-types) | +| is_dynamic`boolean` |Flag indicating whether the discount was calculated using a formula.
| + +## Validation Rule Assignment +| Attributes | Description | +|:-----|:--------| +| id`string` |Validation rule assignment ID.
**Example:**asgm_74F7QZoYbUoljwQO
| +| rule_id`string` |Validation rule ID.
**Example:**val_4j7DCRm2IS59
| +| related_object_id`string` |The resource ID to which the validation rule was assigned.
**Example:**v_JtWunK6jUo7X2qOFj0SyRHq4p9tgENlT
| +| related_object_type`string` |The type of resource to which the validation rule was assigned.
Available values: `voucher`, `campaign`, `earning_rule`, `reward_assignment`, `promotion_tier`, `distribution` | +| created_at`string` |Timestamp representing the date and time when the validation rule assignment was created. The value is shown in the ISO 8601 format.
**Example:**2022-02-17T08:18:15.085Z
| +| object`string` |The type of the object represented by the ID.
Available values: `validation_rules_assignment` | + +## 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 | +|:-----|:--------| +| id`string` |Unique product ID, assigned by Voucherify.
| +| source_id`string` |Product's source ID.
| +| name`string` |Product name.
| + +## Simple Sku Discount Unit +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique SKU ID, assigned by Voucherify.
| +| source_id`string` |Product variant's source ID.
| +| name`string` |Sku name
| + +## One Unit +| Attributes | Description | +|:-----|:--------| +| unit_off`number` |Number of units to be granted a full value discount.
| +| unit_off_formula`string` |Formula used to calculate the number of units.
| +| effect`string` |Defines how the unit is added to the customer's order.
Available values: `ADD_NEW_ITEMS`, `ADD_MISSING_ITEMS` | +| unit_type`string` |The product deemed as free, chosen from product inventory (e.g. time, items).
| +| product |Contains information about the product.
[Simple Product Discount Unit](#simple-product-discount-unit) | +| sku |Contains information about the sku.
[Simple Sku Discount Unit](#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` + +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/CAMPAIGNS-Create-Campaign.md b/reference-docs/CAMPAIGNS-Create-Campaign.md new file mode 100644 index 00000000..c1c322ed --- /dev/null +++ b/reference-docs/CAMPAIGNS-Create-Campaign.md @@ -0,0 +1,14 @@ +--- +title: Create Campaign +type: endpoint +categorySlug: voucherify-api +slug: create-campaign +parentDocSlug: campaigns +hidden: false +order: 30 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/CAMPAIGNS-Delete-Campaign.md b/reference-docs/CAMPAIGNS-Delete-Campaign.md new file mode 100644 index 00000000..1b035464 --- /dev/null +++ b/reference-docs/CAMPAIGNS-Delete-Campaign.md @@ -0,0 +1,14 @@ +--- +title: Delete Campaign +type: endpoint +categorySlug: voucherify-api +slug: delete-campaign +parentDocSlug: campaigns +hidden: false +order: 50 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/CAMPAIGNS-Disable-Campaign.md b/reference-docs/CAMPAIGNS-Disable-Campaign.md new file mode 100644 index 00000000..739b2aa0 --- /dev/null +++ b/reference-docs/CAMPAIGNS-Disable-Campaign.md @@ -0,0 +1,14 @@ +--- +title: Disable Campaign +type: endpoint +categorySlug: voucherify-api +slug: disable-campaign +parentDocSlug: campaigns +hidden: false +order: 120 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/CAMPAIGNS-Enable-Campaign.md b/reference-docs/CAMPAIGNS-Enable-Campaign.md new file mode 100644 index 00000000..46f02904 --- /dev/null +++ b/reference-docs/CAMPAIGNS-Enable-Campaign.md @@ -0,0 +1,14 @@ +--- +title: Enable Campaign +type: endpoint +categorySlug: voucherify-api +slug: enable-campaign +parentDocSlug: campaigns +hidden: false +order: 110 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/CAMPAIGNS-Examine-Qualification.md b/reference-docs/CAMPAIGNS-Examine-Qualification.md new file mode 100644 index 00000000..fb2bd34e --- /dev/null +++ b/reference-docs/CAMPAIGNS-Examine-Qualification.md @@ -0,0 +1,14 @@ +--- +title: Examine Qualification [Deprecated] +type: endpoint +categorySlug: voucherify-api +slug: examine-campaigns-qualification +parentDocSlug: campaigns +hidden: false +order: 130 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/CAMPAIGNS-Export-Campaign-Transactions.md b/reference-docs/CAMPAIGNS-Export-Campaign-Transactions.md new file mode 100644 index 00000000..b6db821a --- /dev/null +++ b/reference-docs/CAMPAIGNS-Export-Campaign-Transactions.md @@ -0,0 +1,14 @@ +--- +title: Export Campaign Transactions +type: endpoint +categorySlug: voucherify-api +slug: export-campaign-transactions +parentDocSlug: campaigns +hidden: false +order: 65 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/CAMPAIGNS-Get-Campaign-Summary.md b/reference-docs/CAMPAIGNS-Get-Campaign-Summary.md new file mode 100644 index 00000000..f27862cb --- /dev/null +++ b/reference-docs/CAMPAIGNS-Get-Campaign-Summary.md @@ -0,0 +1,14 @@ +--- +title: Get Campaign Summary +type: endpoint +categorySlug: voucherify-api +slug: get-campaign-summary +parentDocSlug: campaigns +hidden: false +order: 67 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/CAMPAIGNS-Get-Campaign.md b/reference-docs/CAMPAIGNS-Get-Campaign.md new file mode 100644 index 00000000..a6afdb50 --- /dev/null +++ b/reference-docs/CAMPAIGNS-Get-Campaign.md @@ -0,0 +1,14 @@ +--- +title: Get Campaign +type: endpoint +categorySlug: voucherify-api +slug: get-campaign +parentDocSlug: campaigns +hidden: false +order: 20 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/CAMPAIGNS-Import-Vouchers-To-Campaign-Using-CSV.md b/reference-docs/CAMPAIGNS-Import-Vouchers-To-Campaign-Using-CSV.md new file mode 100644 index 00000000..4c57b9c4 --- /dev/null +++ b/reference-docs/CAMPAIGNS-Import-Vouchers-To-Campaign-Using-CSV.md @@ -0,0 +1,14 @@ +--- +title: Import Vouchers to Campaign by CSV +type: endpoint +categorySlug: voucherify-api +slug: import-vouchers-to-campaign-using-csv +parentDocSlug: campaigns +hidden: false +order: 100 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/CAMPAIGNS-Import-Vouchers-To-Campaign.md b/reference-docs/CAMPAIGNS-Import-Vouchers-To-Campaign.md new file mode 100644 index 00000000..391c088e --- /dev/null +++ b/reference-docs/CAMPAIGNS-Import-Vouchers-To-Campaign.md @@ -0,0 +1,14 @@ +--- +title: Import Vouchers to Campaign +type: endpoint +categorySlug: voucherify-api +slug: import-vouchers-to-campaign +parentDocSlug: campaigns +hidden: false +order: 90 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/CAMPAIGNS-List-Campaign-Transactions.md b/reference-docs/CAMPAIGNS-List-Campaign-Transactions.md new file mode 100644 index 00000000..d556e8e7 --- /dev/null +++ b/reference-docs/CAMPAIGNS-List-Campaign-Transactions.md @@ -0,0 +1,14 @@ +--- +title: List Campaign Transactions +type: endpoint +categorySlug: voucherify-api +slug: list-campaign-transactions +parentDocSlug: campaigns +hidden: false +order: 60 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/CAMPAIGNS-List-Campaigns.md b/reference-docs/CAMPAIGNS-List-Campaigns.md new file mode 100644 index 00000000..0c0fd984 --- /dev/null +++ b/reference-docs/CAMPAIGNS-List-Campaigns.md @@ -0,0 +1,14 @@ +--- +title: List Campaigns +type: endpoint +categorySlug: voucherify-api +slug: list-campaigns +parentDocSlug: campaigns +hidden: false +order: 10 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/CAMPAIGNS-Update-Campaign.md b/reference-docs/CAMPAIGNS-Update-Campaign.md new file mode 100644 index 00000000..e555b188 --- /dev/null +++ b/reference-docs/CAMPAIGNS-Update-Campaign.md @@ -0,0 +1,14 @@ +--- +title: Update Campaign +type: endpoint +categorySlug: voucherify-api +slug: update-campaign +parentDocSlug: campaigns +hidden: false +order: 40 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/CATEGORIES-Category-Object.md b/reference-docs/CATEGORIES-Category-Object.md new file mode 100644 index 00000000..b077222b --- /dev/null +++ b/reference-docs/CATEGORIES-Category-Object.md @@ -0,0 +1,25 @@ +--- +title: Category Object +type: basic +categorySlug: voucherify-api +parentDocSlug: categories +slug: category-object +hidden: false +order: 1 +--- + +## Category +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique category ID assigned by Voucherify.
| +| name`string` |Category name.
| +| hierarchy`integer` |Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value.
| +| object`string` |The type of the object represented by the JSON. This object stores information about the category.
Available values: `category` | +| created_at`string` |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_at`string` |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
| + +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/CATEGORIES-Create-Category.md b/reference-docs/CATEGORIES-Create-Category.md new file mode 100644 index 00000000..d9cc2e60 --- /dev/null +++ b/reference-docs/CATEGORIES-Create-Category.md @@ -0,0 +1,14 @@ +--- +title: Create Category +type: endpoint +categorySlug: voucherify-api +slug: create-category +parentDocSlug: categories +hidden: false +order: 4 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/CATEGORIES-Delete-Category.md b/reference-docs/CATEGORIES-Delete-Category.md new file mode 100644 index 00000000..5385e974 --- /dev/null +++ b/reference-docs/CATEGORIES-Delete-Category.md @@ -0,0 +1,14 @@ +--- +title: Delete Category +type: endpoint +categorySlug: voucherify-api +slug: delete-category +parentDocSlug: categories +hidden: false +order: 6 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/CATEGORIES-Get-Category.md b/reference-docs/CATEGORIES-Get-Category.md new file mode 100644 index 00000000..2c3da89b --- /dev/null +++ b/reference-docs/CATEGORIES-Get-Category.md @@ -0,0 +1,14 @@ +--- +title: Get Category +type: endpoint +categorySlug: voucherify-api +slug: get-category +parentDocSlug: categories +hidden: false +order: 3 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/CATEGORIES-List-Categories.md b/reference-docs/CATEGORIES-List-Categories.md new file mode 100644 index 00000000..1849ce17 --- /dev/null +++ b/reference-docs/CATEGORIES-List-Categories.md @@ -0,0 +1,14 @@ +--- +title: List Categories +type: endpoint +categorySlug: voucherify-api +slug: list-categories +parentDocSlug: categories +hidden: false +order: 2 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/CATEGORIES-Update-Category.md b/reference-docs/CATEGORIES-Update-Category.md new file mode 100644 index 00000000..40ea7b98 --- /dev/null +++ b/reference-docs/CATEGORIES-Update-Category.md @@ -0,0 +1,14 @@ +--- +title: Update Category +type: endpoint +categorySlug: voucherify-api +slug: update-category +parentDocSlug: categories +hidden: false +order: 5 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/CLIENT-SIDE-Check-Eligibility-Client-Side.md b/reference-docs/CLIENT-SIDE-Check-Eligibility-Client-Side.md new file mode 100644 index 00000000..4afc7c57 --- /dev/null +++ b/reference-docs/CLIENT-SIDE-Check-Eligibility-Client-Side.md @@ -0,0 +1,15 @@ +--- +title: Check Eligibility (client-side) +type: endpoint +categorySlug: voucherify-api +parentDocSlug: client-side +slug: check-eligibility-client-side +hidden: false +order: 2 +--- + +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/CLIENT-SIDE-Create-Publication.md b/reference-docs/CLIENT-SIDE-Create-Publication.md new file mode 100644 index 00000000..f338d1bb --- /dev/null +++ b/reference-docs/CLIENT-SIDE-Create-Publication.md @@ -0,0 +1,15 @@ +--- +title: Create Publication (client-side) +type: endpoint +categorySlug: voucherify-api +parentDocSlug: client-side +slug: create-publication-client-side +hidden: false +order: 1 +--- + +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/CLIENT-SIDE-List-Promotion-Tiers-Client-Side.md b/reference-docs/CLIENT-SIDE-List-Promotion-Tiers-Client-Side.md new file mode 100644 index 00000000..c5050e91 --- /dev/null +++ b/reference-docs/CLIENT-SIDE-List-Promotion-Tiers-Client-Side.md @@ -0,0 +1,14 @@ +--- +title: List Promotion Tiers (client-side) +type: endpoint +categorySlug: voucherify-api +slug: list-promotion-tiers-client-side +parentDocSlug: client-side +hidden: false +order: 5 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/CLIENT-SIDE-Redeem-Stackable-Discounts-Client-Side.md b/reference-docs/CLIENT-SIDE-Redeem-Stackable-Discounts-Client-Side.md new file mode 100644 index 00000000..b003de47 --- /dev/null +++ b/reference-docs/CLIENT-SIDE-Redeem-Stackable-Discounts-Client-Side.md @@ -0,0 +1,14 @@ +--- +title: Redeem Stackable Discounts (client-side) +type: endpoint +categorySlug: voucherify-api +slug: redeem-stacked-discounts-client-side +parentDocSlug: client-side +hidden: false +order: 4 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/CLIENT-SIDE-Redeem-Voucher-Client-Side.md b/reference-docs/CLIENT-SIDE-Redeem-Voucher-Client-Side.md new file mode 100644 index 00000000..90ad765f --- /dev/null +++ b/reference-docs/CLIENT-SIDE-Redeem-Voucher-Client-Side.md @@ -0,0 +1,14 @@ +--- +title: Redeem Voucher (client-side) +type: endpoint +categorySlug: voucherify-api +slug: redeem-voucher-client-side +parentDocSlug: client-side +hidden: false +order: 200 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/CLIENT-SIDE-Track-Custom-Event-Client-Side.md b/reference-docs/CLIENT-SIDE-Track-Custom-Event-Client-Side.md new file mode 100644 index 00000000..3c775e6b --- /dev/null +++ b/reference-docs/CLIENT-SIDE-Track-Custom-Event-Client-Side.md @@ -0,0 +1,14 @@ +--- +title: Track Custom Event (client-side) +type: endpoint +categorySlug: voucherify-api +slug: track-custom-event-client-side +parentDocSlug: client-side +hidden: false +order: 7 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/CLIENT-SIDE-Validate-Stackable-Discounts-Client-Side.md b/reference-docs/CLIENT-SIDE-Validate-Stackable-Discounts-Client-Side.md new file mode 100644 index 00000000..b9cf97e1 --- /dev/null +++ b/reference-docs/CLIENT-SIDE-Validate-Stackable-Discounts-Client-Side.md @@ -0,0 +1,14 @@ +--- +title: Validate Stackable Discounts (client-side) +type: endpoint +categorySlug: voucherify-api +slug: validate-stacked-discounts-client-side +parentDocSlug: client-side +hidden: false +order: 3 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/CLIENT-SIDE-Validate-Voucher-Client-Side.md b/reference-docs/CLIENT-SIDE-Validate-Voucher-Client-Side.md new file mode 100644 index 00000000..79ee1c8f --- /dev/null +++ b/reference-docs/CLIENT-SIDE-Validate-Voucher-Client-Side.md @@ -0,0 +1,14 @@ +--- +title: Validate Voucher (client-side) +type: endpoint +categorySlug: voucherify-api +slug: validate-voucher-client-side +parentDocSlug: client-side +hidden: false +order: 100 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/CUSTOMERS-Create-Customer.md b/reference-docs/CUSTOMERS-Create-Customer.md new file mode 100644 index 00000000..eda4cc04 --- /dev/null +++ b/reference-docs/CUSTOMERS-Create-Customer.md @@ -0,0 +1,14 @@ +--- +title: Create Customer +type: endpoint +categorySlug: voucherify-api +slug: create-customer +parentDocSlug: customers +hidden: false +order: 80 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/CUSTOMERS-Customer-Activity-Object.md b/reference-docs/CUSTOMERS-Customer-Activity-Object.md new file mode 100644 index 00000000..9701afe5 --- /dev/null +++ b/reference-docs/CUSTOMERS-Customer-Activity-Object.md @@ -0,0 +1,1650 @@ +--- +title: Customer Activity Object +type: basic +categorySlug: voucherify-api +parentDocSlug: customers +slug: customer-activity-object +hidden: false +order: 20 +--- + +## Customer Activity +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique event ID, assigned by Voucherify.
**Example:**evcus_0c150c51730c6b60b1
| +| type`string` |Event type.
Available values: `customer.confirmed`, `customer.created`, `customer.updated`, `customer.deleted`, `customer.referred`, `customer.custom_event`, `customer.segment.entered`, `customer.segment.left`, `customer.sms.sent`, `customer.sms.recovered`, `customer.sms.failed`, `customer.email.sent`, `customer.email.recovered`, `customer.email.failed`, `customer.activecampaign.sent`, `customer.activecampaign.recovered`, `customer.activecampaign.failed`, `customer.braze.sent`, `customer.braze.recovered`, `customer.braze.failed`, `customer.mailchimp.sent`, `customer.mailchimp.recovered`, `customer.mailchimp.failed`, `customer.intercom.sent`, `customer.intercom.recovered`, `customer.intercom.failed`, `customer.shopify.sent`, `customer.shopify.recovered`, `customer.shopify.failed`, `customer.klaviyo.sent`, `customer.klaviyo.recovered`, `customer.klaviyo.failed`, `customer.batch.sent`, `customer.batch.recovered`, `customer.batch.failed`, `customer.rewarded`, `customer.rewarded.loyalty_points`, `customer.voucher.gift.balance_added`, `customer.voucher.loyalty_card.pending_points.activated`, `customer.voucher.loyalty_card.pending_points.added`, `customer.voucher.loyalty_card.pending_points.canceled`, `customer.voucher.loyalty_card.pending_points.updated`, `customer.voucher.loyalty_card.points_activated`, `customer.voucher.loyalty_card.points_added`, `customer.voucher.loyalty_card.points_transferred`, `customer.voucher.loyalty_card.points_expired`, `customer.voucher.deleted`, `customer.publication.succeeded`, `customer.publication.failed`, `customer.validation.succeeded`, `customer.validation.failed`, `customer.redemption.failed`, `customer.redemption.succeeded`, `customer.redemption.rollback.failed`, `customer.redemption.rollback.succeeded`, `customer.order.canceled`, `customer.order.created`, `customer.order.fulfilled`, `customer.order.paid`, `customer.order.processing`, `customer.order.updated`, `customer.reward_redemptions.created`, `customer.reward_redemptions.pending`, `customer.reward_redemptions.completed`, `customer.reward_redemptions.rolledback`, `customer.loyalty.updated`, `customer.loyalty.tier.upgraded`, `customer.loyalty.tier.downgraded`, `customer.loyalty.tier.prolonged`, `customer.loyalty.tier.expiration.changed`, `customer.loyalty.tier.joined`, `customer.loyalty.tier.left`, `customer.holder.assignment.created`, `customer.holder.assignment.deleted` | +| data`object` |Contains details about the event. The objects that are returned in the data attribute differ based on the context of the event type.
Attributes | Description |
---|---|
data | See: Customer Activity Data |
event_source | See: Event Source |
Timestamp representing the date and time when the customer activity occurred in ISO 8601 format.
**Example:**2022-08-30T09:14:07.660Z
| +| group_id`string` |Unique identifier of the request that caused the event.
**Example:**v-1f36113948e50fc4ge
| + +## Customer Activity Data +Event data object schema.
+ +One of: + +[Event Customer Confirmed](#event-customer-confirmed), [Event Customer Created](#event-customer-created), [Event Customer Updated](#event-customer-updated), [Event Customer Deleted](#event-customer-deleted), [Event Customer Referred](#event-customer-referred), [Event Customer Custom Event](#event-customer-custom-event), [Event Customer Segment Entered](#event-customer-segment-entered), [Event Customer Segment Left](#event-customer-segment-left), [Event Customer SMS Sent](#event-customer-sms-sent), [Event Customer SMS Recovered](#event-customer-sms-recovered), [Event Customer SMS Failed](#event-customer-sms-failed), [Event Customer Email Sent](#event-customer-email-sent), [Event Customer Email Recovered](#event-customer-email-recovered), [Event Customer Email Failed](#event-customer-email-failed), [Event Customer ActiveCampaign Sent](#event-customer-activecampaign-sent), [Event Customer ActiveCampaign Recovered](#event-customer-activecampaign-recovered), [Event Customer ActiveCampaign Failed](#event-customer-activecampaign-failed), [Event Customer Braze Sent](#event-customer-braze-sent), [Event Customer Braze Recovered](#event-customer-braze-recovered), [Event Customer Braze Failed](#event-customer-braze-failed), [Event Customer Mailchimp Sent](#event-customer-mailchimp-sent), [Event Customer Mailchimp Recovered](#event-customer-mailchimp-recovered), [Event Customer Mailchimp Failed](#event-customer-mailchimp-failed), [Event Customer Intercom Sent](#event-customer-intercom-sent), [Event Customer Intercom Recovered](#event-customer-intercom-recovered), [Event Customer Intercom Failed](#event-customer-intercom-failed), [Event Customer Shopify Sent](#event-customer-shopify-sent), [Event Customer Shopify Recovered](#event-customer-shopify-recovered), [Event Customer Shopify Failed](#event-customer-shopify-failed), [Event Customer Klaviyo Sent](#event-customer-klaviyo-sent), [Event Customer Klaviyo Recovered](#event-customer-klaviyo-recovered), [Event Customer Klaviyo Failed](#event-customer-klaviyo-failed), [Event Customer Batch Sent](#event-customer-batch-sent), [Event Customer Batch Recovered](#event-customer-batch-recovered), [Event Customer Batch Failed](#event-customer-batch-failed), [Event Customer Rewarded](#event-customer-rewarded), [Event Customer Rewarded Loyalty Points](#event-customer-rewarded-loyalty-points), [Event Customer Gift Voucher Balance Added](#event-customer-gift-voucher-balance-added), [Event Customer Loyalty Card Pending Points Activated](#event-customer-loyalty-card-pending-points-activated), [Event Customer Loyalty Card Pending Points Added](#event-customer-loyalty-card-pending-points-added), [Event Customer Loyalty Card Pending Points Canceled](#event-customer-loyalty-card-pending-points-canceled), [Event Customer Loyalty Card Pending Points Updated](#event-customer-loyalty-card-pending-points-updated), [Event Customer Loyalty Card Points Added](#event-customer-loyalty-card-points-added), [Event Customer Loyalty Card Points Transferred](#event-customer-loyalty-card-points-transferred), [Event Customer Loyalty Card Points Expired](#event-customer-loyalty-card-points-expired), [Event Customer Voucher Deleted](#event-customer-voucher-deleted), [Event Customer Publication Succeeded](#event-customer-publication-succeeded), [Event Customer Publication Failed](#event-customer-publication-failed), [Event Customer Validation Succeeded](#event-customer-validation-succeeded), [Event Customer Validation Failed](#event-customer-validation-failed), [Event Customer Redemption Succeeded](#event-customer-redemption-succeeded), [Event Customer Redemption Failed](#event-customer-redemption-failed), [Event Customer Redemption Rollback Succeeded](#event-customer-redemption-rollback-succeeded), [Event Customer Redemption Rollback Failed](#event-customer-redemption-rollback-failed), [Event Customer Order Canceled](#event-customer-order-canceled), [Event Customer Order Created](#event-customer-order-created), [Event Customer Order Fulfilled](#event-customer-order-fulfilled), [Event Customer Order Paid](#event-customer-order-paid), [Event Customer Order Processing](#event-customer-order-processing), [Event Customer Order Updated](#event-customer-order-updated), [Event Customer Reward Redemptions Created](#event-customer-reward-redemptions-created), [Event Customer Reward Redemptions Pending](#event-customer-reward-redemptions-pending), [Event Customer Reward Redemptions Completed](#event-customer-reward-redemptions-completed), [Event Customer Reward Redemptions Rolled Back](#event-customer-reward-redemptions-rolled-back), [Event Customer Loyalty Updated](#event-customer-loyalty-updated), [Event Customer Loyalty Tier Upgraded](#event-customer-loyalty-tier-upgraded), [Event Customer Loyalty Tier Downgraded](#event-customer-loyalty-tier-downgraded), [Event Customer Loyalty Tier Prolonged](#event-customer-loyalty-tier-prolonged), [Event Customer Loyalty Tier Expiration Changed](#event-customer-loyalty-tier-expiration-changed), [Event Customer Loyalty Tier Joined](#event-customer-loyalty-tier-joined), [Event Customer Loyalty Tier Left](#event-customer-loyalty-tier-left), [Event Customer Holder Assignment Created](#event-customer-holder-assignment-created), [Event Customer Holder Assignment Deleted](#event-customer-holder-assignment-deleted) + +## Event Source +| Attributes | Description | +|:-----|:--------| +| channel`string` |Determines the channel that initiated the event.
Available values: `USER_PORTAL`, `API`, `CLIENT_API`, `INTERNAL` **Example:**API
| +| user`object` |Determines the Voucherify user who triggered the event.
Attributes | Description |
---|---|
idstring | Unique identifier of the user. Example:user_xyzfghSTprSTUVWXYlk6tuvXYst7FGH7 |
Determines the API key used to initiate the event.
Attributes | Description |
---|---|
namestring | Channel name in the application keys. |
app_idstring | Contains the application ID from the Voucherify API key pair. Example:1XXXX5XX-0XXX-XXXb-X7XX-XX2XXaXXX6XX |
Attributes | Description |
---|---|
idstring | Example: ucust_1qa70mVfYkl11Ab0ZxDPdWNa |
Details about the referral.
Attributes | Description |
---|---|
referrer | Details about the referrer. Simple Customer |
voucher | Details about the referral code. Simple Voucher |
campaign | Details about the referral campaign. Simple Campaign |
Details about the loyalty activity.
Attributes | Description |
---|---|
voucher | Details about the loyalty code. Simple Voucher |
campaign | Details about the loyalty campaign. Simple Campaign |
Event data object schema for customer.sms.sent
.
Event data object schema for customer.sms.recovered
.
Event data object schema for customer.sms.failed
.
Event data object schema for customer.email.sent
.
Event data object schema for customer.email.recovered
.
Event data object schema for customer.email.failed
.
Event data object schema for customer.activecampaign.sent
.
Event data object schema for customer.activecampaign.recovered
.
Event data object schema for customer.activecampaign.failed
.
Event data object schema for customer.braze.sent
.
Event data object schema for customer.braze.recovered
.
Event data object schema for customer.braze.failed
.
Event data object schema for customer.mailchimp.sent
.
Event data object schema for customer.mailchimp.recovered
.
Event data object schema for customer.mailchimp.failed
.
Event data object schema for customer.intercom.sent
.
Event data object schema for customer.intercom.recovered
.
Event data object schema for customer.intercom.failed
.
Event data object schema for customer.shopify.sent
.
Event data object schema for customer.shopify.recovered
.
Event data object schema for customer.shopify.failed
.
Event data object schema for customer.klaviyo.sent
.
Event data object schema for customer.klaviyo.recovered
.
Event data object schema for customer.klaviyo.failed
.
Event data object schema for customer.batch.sent
.
Event data object schema for customer.batch.recovered
.
Event data object schema for customer.batch.failed
.
Balance changed by the event. The amount
property details a change in a gift card. The points
property details a change in a loyalty card.
Attributes | Description |
---|---|
amountinteger | |
pointsinteger |
Attributes | Description |
---|---|
segment | See: Simple Segment |
event_typestring | Type of activity that triggered the event. |
Attributes | Description |
---|---|
itemsarray | Array of items applied to the order. It can include up to 500 items. Array of Order Item Calculated |
Attributes | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
detailsobject | Contains the detailed information about the transaction.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
typestring | Transaction type concerning gift card credits. Available values:CREDITS_ADDITION |
Attributes | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
detailsobject | Contains the detailed information about the transaction.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
typestring | Transaction type concerning loyalty card points. Available values:POINTS_ACCRUAL |
Attributes | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
detailsobject | Contains the detailed information about the transaction.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
typestring | Transaction type concerning loyalty card points. Available values:POINTS_TRANSFER_IN , POINTS_TRANSFER_OUT |
The number of expired points.
| +| buckets`array` | Array of [Loyalty Point Bucket](#loyalty-point-bucket) | +| transaction | All of: 1. [Voucher Transaction Base](#voucher-transaction-base) +2.Attributes | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
detailsobject | Contains the detailed information about the transaction.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
typestring | Transaction type concerning loyalty card points. Available values:POINTS_EXPIRATION |
Event data object schema for customer.redemption.succeeded
.
Event data object schema for customer.redemption.failed
.
Event data object schema for customer.redemption.rollback.succeeded
.
Attributes | Description |
---|---|
redemption_rollback | See: Simple Redemption |
Event data object schema for customer.redemption.rollback.failed
.
Attributes | Description |
---|---|
redemption_rollback | See: Simple Redemption |
Event data object schema for customer.order.canceled
.
Event data object schema for customer.order.created
.
Event data object schema for customer.order.fulfilled
.
Event data object schema for customer.order.paid
.
Event data object schema for customer.order.processing
.
Event data object schema for customer.order.updated
.
Event data object schema for customer.reward_redemptions.created
.
Event data object schema for customer.reward_redemptions.pending
.
Event data object schema for customer.reward_redemptions.completed
.
Event data object schema for customer.reward_redemptions.rolledback
.
2022-02-25T13:32:08.734Z
| + +## Event Customer Loyalty Tier Upgraded +Event data object schema for customer.loyalty.tier.upgraded
.
Attributes | Description |
---|---|
loyalty_tier_from | See: Loyalty Tier |
loyalty_tier_to | See: Loyalty Tier |
created_atstring | Example: 2022-02-25T13:32:08.734Z |
Event data object schema for customer.loyalty.tier.downgraded
.
Attributes | Description |
---|---|
loyalty_tier_from | See: Loyalty Tier |
loyalty_tier_to | See: Loyalty Tier |
created_atstring | Example: 2022-02-25T13:32:08.734Z |
Event data object schema for customer.loyalty.tier.prolonged
.
Attributes | Description |
---|---|
loyalty_tier | See: Loyalty Tier |
created_atstring | Example: 2022-02-25T13:32:08.734Z |
Event data object schema for customer.loyalty.tier.expiration.changed
.
Attributes | Description |
---|---|
loyalty_tier | See: Loyalty Tier |
created_atstring | Example: 2022-02-25T13:32:08.734Z |
expiration_datestring | Example: 2022-02-25T13:32:08.734Z |
Event data object schema for customer.loyalty.tier.joined
.
Attributes | Description |
---|---|
loyalty_tier | See: Loyalty Tier |
created_atstring | Example: 2022-02-25T13:32:08.734Z |
Event data object schema for customer.loyalty.tier.left
.
Attributes | Description |
---|---|
loyalty_tier | See: Loyalty Tier |
created_atstring | Example: 2022-02-25T13:32:08.734Z |
Attributes | Description | ||||
---|---|---|---|---|---|
idstring | The ID of an existing customer that will be linked to redemption in this request. | ||||
source_idstring | 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_metadataobject | Object used to store system metadata information. | ||||
created_atstring | 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_atstring | 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 | ||||
assetsobject | Contains information about the customer's cockpit.
| ||||
objectstring | The type of the object represented by JSON. Available values:customer |
Unique identifier of an existing customer. It is assigned by Voucherify.
| +| name`string` |Customer's first and last name.
| +| email`string` |Customer's email address.
| +| source_id`string` |A unique identifier of the customer. It can be a customer ID or email from a CRM system, database, or a third-party service.
| +| metadata`object` |A set of custom key/value pairs that are attached to the customer. It stores all custom attributes assigned to the customer.
| +| object`string` |The type of the object represented by JSON.
Available values: `customer` | + +## Simple Campaign +| Attributes | Description | +|:-----|:--------| +| id`string` |Campaign ID.
| +| name`string` |Campaign name.
| +| campaign_type`string` |Type of campaign.
| +| type`string` |Defines whether the campaign can be updated with new vouchers after campaign creation or if the campaign consists of generic (standalone) voucherss.
AUTO_UPDATE
: the campaign is dynamic, i.e. vouchers will generate based on set criteriaSTATIC
: vouchers need to be manually publishedSTANDALONE
: campaign for single vouchersFlag indicating whether this voucher is a referral code; true
for campaign type REFERRAL_PROGRAM
.
Indicates whether customers will be able to auto-join the campaign if any earning rule is fulfilled.
| +| join_once`boolean` |If this value is set to true
, customers will be able to join the campaign only once. It is always false
for generic (standalone) vouchers campaigns and it cannot be changed in them. It is always true
for loyalty campaigns and it cannot be changed in them.
Indicates whether the campaign is active.
| +| category_id`string`, `null` |The unique category ID that this campaign belongs to.
| +| category`string` |Unique category name.
| +| categories`array` |Contains details about the category.
Array of [Category](#category) | +| metadata`object` |A set of custom key/value pairs that you can attach to a campaign. The metadata object stores all custom attributes assigned to the campaign.
| +| start_date`string` |Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is inactive before this date.
**Example:**2022-09-20T00:00:00.000Z
| +| expiration_date`string` |Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is inactive after this date.
**Example:**2022-09-30T00:00:00.000Z
| +| description`string` |An optional field to keep extra textual information about the campaign such as a campaign description and details.
| +| created_at`string` |Timestamp representing the date and time when the campaign was created. The value is shown in the ISO 8601 format.
**Example:**2024-01-01T11:11:11.111Z
| +| updated_at`string` |Timestamp representing the date and time when the campaign was updated in the ISO 8601 format.
**Example:**2024-01-01T11:11:11.111Z
| +| object`string` |The type of the object represented by JSON. This object stores information about the campaign.
Available values: `campaign` | + +## Simple Voucher +| Attributes | Description | +|:-----|:--------| +| id`string` |A unique identifier that represents the voucher assigned by Voucherify.
| +| code`string` |Voucher code.
| +| gift |Gift object response.
[Gift](#gift) | +| discount | See: [Discount](#discount) | +| loyalty_card`object` |Defines the loyalty card details.
[Simple Loyalty Card](#simple-loyalty-card) | +| type`string` |Type of the voucher.
Available values: `DISCOUNT_VOUCHER`, `LOYALTY_CARD`, `GIFT_VOUCHER` | +| campaign`string` |Campaign name.
| +| campaign_id`string` |Campaign unique ID.
| +| is_referral_code`boolean` |Flag indicating whether this voucher is a referral code; true
for campaign type REFERRAL_PROGRAM
.
Unique customer identifier of the redeemable holder. It equals to the customer ID assigned by Voucherify.
**Example:**cust_eWgXlBBiY6THFRJwX45Iakv4
| +| referrer_id`string` |Unique identifier of the referrer assigned by Voucherify.
**Example:**cust_nM4jqPiaXUvQdVSA6vTRUnix
| +| category_id`string`, `null` |Unique identifier of the category that this voucher belongs to.
**Example:**cat_0b6152ce12414820dc
| +| categories`array` |Contains details about the category.
Array of [Category](#category) | +| active`boolean` |Shows whether the voucher is on or off. true
indicates an active voucher and false
indicates an inactive voucher.
Timestamp representing the date and time when the order was created in the ISO 8601 format.
**Example:**2021-12-22T10:13:06.487Z
| +| updated_at`string` |Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.
**Example:**2024-01-01T11:11:11.111Z
| +| redemption`object` |Defines the redemption limits on vouchers.
Attributes | Description |
---|---|
quantityinteger , null | How many times a voucher can be redeemed. A |
redeemed_quantityinteger | How many times a voucher has already been redeemed. Example:1 |
redeemed_pointsinteger | Total loyalty points redeemed. |
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_date`string` |Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is inactive after this date.
**Example:**2021-12-31T00:00:00.000Z
| +| metadata`object` |A set of custom key/value pairs that you can attach to a voucher. The metadata object stores all custom attributes assigned to the voucher.
| +| object`string` |The type of the object represented by JSON.
Available values: `voucher` | + +## Custom Event +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique custom event ID.
| +| object`string` |The object represented is an event
.
The event name.
| +| customer |A simple customer object
[Customer Object Required Object Type](#customer-object-required-object-type) | +| referral`object` |Referral object.
Attributes | Description |
---|---|
referrer_idstring | Unique referrer ID. Example:cust_nM4jqPiaXUvQdVSA6vTRUnix |
codestring | Voucher code. |
idstring | Unique voucher ID. |
Loyalty object.
Attributes | Description |
---|---|
codestring | Loyalty card code. |
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 object.
| +| created_at`string` |Timestamp representing the date and time when the custom event was created. The value is shown in the ISO 8601 format.
**Example:**2021-12-22T10:13:06.487Z
| + +## Redemption Internal +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique redemption ID.
**Example:**r_0bc92f81a6801f9bca
| +| object`string` |The type of the object represented by the JSON. This object stores information about the redemption
.
Timestamp representing the date and time when the redemption was created. The value is shown in the ISO 8601 format.
**Example:**2021-12-22T10:13:06.487Z
| +| tracking_id`string` |Hashed customer source ID.
| +| metadata`object` |The metadata object stores all custom attributes assigned to the redemption.
| +| channel_type`string` |The source of the channel for the redemption rollback. A USER
corresponds to the Voucherify Dashboard and an API
corresponds to the API.
Unique channel ID of the user performing the redemption. This is either a user ID from a user using the Voucherify Dashboard or an X-APP-Id of a user using the API.
**Example:**user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH
| +| failure_code`string` |If the result is FAILURE
, this parameter will provide a generic reason as to why the redemption failed.
customer_rules_violated
| +| failure_message`string` |If the result is FAILURE
, this parameter will provide a more expanded reason as to why the redemption failed.
Attributes | Description |
---|---|
itemsarray | Array of items applied to the order. It can include up to 500 items. Array of Order Item Calculated |
Attributes | Description |
---|---|
itemsarray | Array of items applied to the order. It can include up to 500 items. Array of Order Item Calculated |
For gift cards, this is a positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the number of redeemed credits.
For loyalty cards, this is the number of loyalty points used in the transaction.
10000
| +| reason`string` |System generated cause for the redemption being invalid in the context of the provided parameters.
| +| result`string` |Redemption result.
Available values: `SUCCESS`, `FAILURE` | +| status`string` |Redemption status.
Available values: `SUCCEEDED`, `FAILED` | +| related_redemptions`object` |Attributes | Description | ||||||
---|---|---|---|---|---|---|---|
rollbacksarray | Array of: Redemption Internal Related Redemptions Rollbacks Item
| ||||||
redemptionsarray | Array of: Redemption Internal Related Redemptions Item
|
Unique redemption ID of the parent redemption.
**Example:**r_0c656311b5878a2031
| +| redemption`string` |Unique redemption ID of the parent redemption.
**Example:**r_0c656311b5878a2031
| +| customer | See: [Simple Customer](#simple-customer) | +| customer_id`string`, `null` |Unique customer ID of the redeeming customer.
**Example:**cust_i8t5Tt6eiKG5K79KQlJ0Vs64
| +| related_object_type`string` |Defines the related object.
Available values: `voucher`, `promotion_tier` | +| related_object_id`string` |Unique related object ID assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher.
| +| related_object_parent_id`string` |Unique related parent object ID assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher.
| +| campaign_name`string` |Campaign name
| +| voucher |Defines the details of the voucher being redeemed.
All of: 1. [Voucher](#voucher) +2. [Voucher Holder](#voucher-holder) | +| promotion_tier |Contains details of the promotion tier and the parent campaign.
[Promotion Tier](#promotion-tier) | + +## Simple Custom Event +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique identifier of the custom event.
| +| name`string` |Name of the custom event.
| + +## Simple Segment +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique segment ID.
**Example:**seg_DNAOhUtJffvX0f57ajLMFBYR
| +| name`string` |Segment name.
| +| object`string` |The type of the object represented by the ID.
Available values: `segment` | + +## Event Customer Sent +| Attributes | Description | +|:-----|:--------| +| customer | See: [Simple Customer](#simple-customer) | +| distribution`object` | | +| sent_at`string` |Timestamp representing the date and time when the distribution was sent in ISO 8601 format.
**Example:**2021-12-22T10:13:06.487Z
| + +## Event Customer Recovered +| Attributes | Description | +|:-----|:--------| +| customer | See: [Simple Customer](#simple-customer) | +| distribution`object` | | +| recovered_at`string` |Timestamp representing the date and time when the distribution was recovered in ISO 8601 format.
**Example:**2021-12-22T10:13:06.487Z
| + +## Event Customer Failed +| Attributes | Description | +|:-----|:--------| +| customer | See: [Simple Customer](#simple-customer) | +| distribution`object` | | +| failed_at`string` |Timestamp representing the date and time when the distribution failed in ISO 8601 format.
**Example:**2021-12-22T10:13:06.487Z
| + +## Simple Redemption Reward Result +| Attributes | Description | +|:-----|:--------| +| customer | See: [Simple Customer](#simple-customer) | +| assignment_id`string` |Unique reward assignment ID assigned by Voucherify.
| +| voucher | [Simple Voucher](#simple-voucher) | +| product | [Simple Product](#simple-product) | +| sku | [Simple Sku](#simple-sku) | +| loyalty_tier_id`string` |Unique loyalty tier ID assigned by Voucherify.
| +| id`string` |Unique reward ID, assigned by Voucherify.
**Example:**rew_nIy4gHpQHle2c3pNMwuj7G6j
| +| object`string` |The type of the object represented by the JSON. This object stores information about the reward.
Available values: `reward` | +| name`string` |Reward name.
| +| created_at`string` |Timestamp representing the date and time when the reward was created. The value is shown in the ISO 8601 format.
**Example:**2024-01-01T11:11:11.111Z
| +| updated_at`string`, `null` |Timestamp representing the date and time when the reward was updated. The value is shown in the ISO 8601 format.
**Example:**2024-01-01T11:11:11.111Z
| +| parameters`object` |Defines how the reward is generated.
[Reward type](#reward-type) | +| metadata`object` |A set of custom key/value pairs that you can attach to a reward. The metadata object stores all custom attributes assigned to the reward.
| +| type`string` |Reward type.
Available values: `CAMPAIGN`, `COIN`, `MATERIAL` | + +## Simple Referral Tier +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique referral tier ID.
**Example:**seg_DNAOhUtJffvX0f57ajLMFBYR
| +| campaign_id`string` |Campaign Id.
| +| banner`string` |Text to be displayed to your customers on your website.
| +| parameters`object` |Referral tier parameters
| + +## Loyalty Tier +All of: + +1. [Loyalty Tier Base](#loyalty-tier-base) +2.Attributes | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
idstring | Unique loyalty tier ID. | ||||||||||
campaign_idstring | Unique parent campaign ID. | ||||||||||
metadataobject , null | The metadata object stores all custom attributes assigned to the loyalty tier. A set of key/value pairs that you can attach to a loyalty tier object. It can be useful for storing additional information about the loyalty tier in a structured format. | ||||||||||
created_atstring | Timestamp representing the date and time when the loyalty tier was created. The value is shown in the ISO 8601 format. | ||||||||||
updated_atstring , null | Timestamp representing the date and time when the loyalty tier was updated. The value is shown in the ISO 8601 format. | ||||||||||
configobject | Defines loyalty tier range in points.
| ||||||||||
expiration | See: Loyalty Tier Expiration | ||||||||||
objectstring | The type of the object represented by JSON. This object stores information about the loyalty. Available values:loyalty_tier |
Attributes | Description |
---|---|
validation_rule_idstring , null | A unique validation rule identifier assigned by the Voucherify API. The validation rule is verified before points are added to the balance. |
updated_atstring , null | Timestamp representing the date and time when the earning rule was last updated in ISO 8601 format. |
activeboolean | A flag to toggle the earning rule on or off. You can disable an earning rule even though it's within the active period defined by the start_date and expiration_date of the campaign or the earning rule's own start_date and expiration_date.
|
The type of voucher whose balance is being adjusted due to the transaction.
Available values: `loyalty_card`, `gift_voucher` | +| total`integer` |The number of all points or credits accumulated on the card as affected by add or subtract operations.
| +| object`string` |The type of the object represented by the JSON.
Available values: `balance` | +| points`integer` |Points added or subtracted in the transaction of a loyalty card.
| +| balance`integer` |The available points or credits on the card after the transaction as affected by redemption or rollback.
| +| operation_type`string` |The type of the operation being performed. The operation type is AUTOMATIC
if it is an automatic redemption.
Defines the resource that is being modified with the values that are returned in the balance object.
Attributes | Description |
---|---|
idstring | Identifies the voucher that is being modified. The ID is assigned by the Voucherify API. |
typestring | The object being modified, i.e. voucher. Available values:voucher |
Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.
| +| source_id`string`, `null` |Unique source ID of an existing order that will be linked to the redemption of this request.
| +| status`string` |The order status.
Available values: `CREATED`, `PAID`, `CANCELED`, `FULFILLED` | +| amount`integer` |This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| initial_amount`integer` |This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| discount_amount`integer` |Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| items_discount_amount`integer` |Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| total_discount_amount`integer` |Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| total_amount`integer` |Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| applied_discount_amount`integer` |This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| items_applied_discount_amount`integer` |Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).sum(items, i => i.applied_discount_amount)
Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).total_applied_discount_amount
= applied_discount_amount
+ items_applied_discount_amount
A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.
| +| object`string` |The type of the object represented by JSON.
Available values: `order` | +| created_at`string` |Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.
**Example:**2021-12-22T10:13:06.487Z
| +| updated_at`string`, `null` |Timestamp representing the date and time when the order was last updated in ISO 8601 format.
**Example:**2021-12-22T10:14:45.316Z
| +| customer_id`string`, `null` |Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify.
**Example:**cust_7iUa6ICKyU6gH40dBU25kQU1
| +| referrer_id`string`, `null` |Unique referrer ID.
**Example:**cust_nM4jqPiaXUvQdVSA6vTRUnix
| +| customer | [Customer Id](#customer-id) | +| referrer | [Referrer Id](#referrer-id) | +| redemptions`object` |Attributes | Description |
---|---|
[propertyName] | See: Order Redemptions |
Unique identifier of the order line item.
| +| sku_id`string` |Unique identifier of the SKU. It is assigned by Voucherify.
| +| product_id`string` |Unique identifier of the product. It is assigned by Voucherify.
| +| related_object`string` |Used along with the source_id property, can be set to either sku or product.
Available values: `product`, `sku` | +| source_id`string` |The merchant's product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service.
| +| quantity`integer` |The quantity of the particular item in the cart.
| +| discount_quantity`integer` |Number of dicounted items.
| +| initial_quantity`integer` |A positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items' quantity.
| +| amount`integer` |The total amount of the order item (price * quantity).
| +| discount_amount`integer` |Sum of all order-item-level discounts applied to the order.
| +| applied_discount_amount`integer` |This field shows the order-level discount applied.
| +| applied_discount_quantity`integer` |Number of the discounted items applied in the transaction.
| +| applied_quantity`integer` |Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.
| +| applied_quantity_amount`integer` |Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.
| +| initial_amount`integer` |A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.
| +| price`integer` |Unit price of an item. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents
for $100.00
.
Final order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the amount
.subtotal_amount
=amount
-applied_discount_amount
An object containing details of the related product.
Attributes | Description |
---|---|
idstring | A unique identifier that represents the product and is assigned by Voucherify. |
source_idstring | The merchant's product ID (if it is different than Voucherify's product ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service. |
overrideboolean | The override set to |
namestring | Product name. |
metadataobject | A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections. |
pricenumber | Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00). |
An object containing details of the related SKU.
Attributes | Description |
---|---|
idstring | A unique identifier that represents the SKU and is assigned by Voucherify. |
source_idstring | The merchant's SKU ID (if it is different than Voucherify's SKU ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service. |
overrideboolean | The override set to |
skustring | The SKU name. |
pricenumber | SKU price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00). |
metadataobject | A set of custom key/value pairs that you can attach to an SKU. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections. |
The type of the object represented by JSON.
Available values: `order_item` | +| metadata`object` |A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas.
| + +## Simple Event +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique identifier assigned by Voucherify that will be linked to the this event.
**Example:**evcus_0e3070fef399b70b00
| +| type`string` |Type of the triggering event.
**Example:**customer.order.paid
| +| category`string` |Type of the event.
Available values: `EFFECT`, `ACTION` | +| entity_id`string` |ID of the entity that initiated the event.
**Example:**cust_ADqZIwGvWFvugWXVbrHwXRHO
| +| created_at`string` |Timestamp representing the date and time when the event was created in the ISO 8601 format.
**Example:**2024-01-01T11:11:11.111Z
| +| group_id`string` |Unique identifier of the request that triggered the event.
**Example:**v-1f36113948e50fc4ge
| + +## Voucher Transaction Base +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique transaction ID.
| +| source_id`string`, `null` |The merchant's transaction ID if it is different from the Voucherify transaction ID. It is really useful in case of an integration between multiple systems. It can be a transaction ID from a CRM system, database or 3rd-party service. In case of a redemption, this value is null.
| +| voucher_id`string` |Unique voucher ID.
| +| campaign_id`string` |Unqiue campaign ID of the voucher's parent campaign if it is part of campaign that generates bulk codes.
| +| source`string`, `null` |The channel through which the transaction took place, whether through the API or the the Dashboard. In case of a redemption, this value is null.
| +| reason`string`, `null` |Reason why the transaction occurred. In case of a redemption, this value is null.
| +| related_transaction_id`string`, `null` |The related transaction ID on the receiving card.
| +| created_at`string` |Timestamp representing the date and time when the transaction was created. The value is shown in the ISO 8601 format.
| + +## Simple Order +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique identifier of an existing order that will be linked to the redemption of this request.
| +| source_id`string` |Unique source identifier of an existing order that will be linked to the redemption of this request.
| +| status`string` |The order status.
Available values: `CREATED`, `PAID`, `CANCELED`, `FULFILLED` | +| customer_id`string`, `null` |Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify.
**Example:**cust_7iUa6ICKyU6gH40dBU25kQU1
| +| referrer_id`string`, `null` |Unique identifier of the referrer assigned by Voucherify.
**Example:**cust_nM4jqPiaXUvQdVSA6vTRUnix
| +| amount`integer` |A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.
| +| discount_amount`integer` |Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| applied_discount_amount`integer` |This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| items_discount_amount`integer` |Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| items_applied_discount_amount`integer` |Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).sum(items, i => i.applied_discount_amount)
Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| total_applied_discount_amount`integer` |Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).total_applied_discount_amount
= applied_discount_amount
+ items_applied_discount_amount
Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| items`array` |Array of items applied to the order. It can include up to 500 items.
Array of [Simple Order Item](#simple-order-item) | +| metadata`object` |A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.
| +| object`string` |The type of the object represented by JSON.
Available values: `order` | + +## Voucher Transaction +All of: + +1. [Voucher Transaction Base](#voucher-transaction-base) +2.Attributes | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
detailsobject | Contains the detailed information about the transaction.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
type | One of: Gift Card Transactions Type, Loyalty Card Transactions Type |
Unique identifier of the pending point entry, assigned by Voucherify.
**Example:**lopp_0ffd593d5ad207ba6b
| +| voucher_id`string` |Unique identifier of the loyalty card, assigned by Voucherify.
**Example:**v_abCdEfghI1JKLMNPqRS2Tu3vWXyza4bc
| +| campaign_id`string` |Unique campaign identifier, assigned by Voucherify.
**Example:**camp_weer1c3p5ZgktqfW56RfoNaG
| +| customer_id`string` |Unique customer identifier, assigned by Voucherify.
**Example:**cust_IdgAFZxYwwHctOk9ppZMu319
| +| order_id`string` |Unique order identifier, assigned by Voucherify.
**Example:**ord_0ffc0fa65f15d2df17
| +| points`integer` |Number of points in the pending state.
| +| activates_at`string` |Date when the pending points are activated and added to the customer's loyalty card.
| +| details | See: [Pending Point Details](#pending-point-details) | +| created_at`string` |Timestamp representing the date and time when the pending point entry was created. The value is shown in the ISO 8601 format.
| +| updated_at`string` |Timestamp representing the date and time when the pending point entry was modified. The value is shown in the ISO 8601 format.
| + +## Loyalty Point Bucket +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique identifier of the loyalty points bucket.
| +| voucher_id`string` |Unique identifier of the parent loyalty card.
| +| campaign_id`string` |Unique identifier of the parent campaign.
| +| bucket`object` |Defines the number of points stored in this loyalty point bucket.
Attributes | Description |
---|---|
total_pointsinteger | Total number of points in the loyalty point bucket. |
Loyalty point point bucket status.
| +| expires_at`string` |Date when the number of points defined in the bucket object are due to expire.
| +| created_at`string` |Timestamp representing the date and time when the loyalty point bucket object was created in ISO 8601 format.
| +| updated_at`string` |Timestamp representing the date and time when the loyalty point bucket object was updated in ISO 8601 format.
| +| object`string` |The type of the object represented by JSON. This object stores information about the loyalty point bucket.
Available values: `loyalty_points_bucket` | + +## Valid Single Voucher +All of: + +1. [List Publications Item Base](#list-publications-item-base) +2.Attributes | Description |
---|---|
resultstring | Status of the publication attempt. Available values:SUCCESS |
voucher | See: List Publications Item Voucher |
Unique validation id.
| +| session_id`string` |Unique session id.
| +| status`string` |The validation status
Available values: `VALID`, `INVALID` | +| created_at`string` |Timestamp representing the date and time when the validation was created. The value is shown in the ISO 8601 format.
**Example:**2021-12-22T10:13:06.487Z
| +| customer_id`string` |Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify.
**Example:**cust_7iUa6ICKyU6gH40dBU25kQU1
| +| redeemables`array` |Lists validation results of each redeemable.
Array of:Attributes | Description |
---|---|
idstring | Unique identifier of the redeemable, assigned by Voucherify. |
typestring | Type of the redeemable. Available values:voucher , promotion_tier |
Lists validation results of each redeemable.
Array of:Attributes | Description |
---|---|
idstring | Unique identifier of the redeemable, assigned by Voucherify. |
typestring | Type of the redeemable. Available values:voucher , promotion_tier |
Lists validation results of each redeemable.
Array of:Attributes | Description |
---|---|
idstring | Unique identifier of the redeemable, assigned by Voucherify. |
typestring | Type of the redeemable. Available values:voucher , promotion_tier |
Unique redemption ID.
**Example:**r_0bc92f81a6801f9bca
| +| customer_id`string`, `null` |Unique customer ID of the redeeming customer.
**Example:**cust_i8t5Tt6eiKG5K79KQlJ0Vs64
| +| tracking_id`string` |Hashed customer source ID.
| +| date`string` |Timestamp representing the date and time when the redemption was created in the ISO 8601 format.
**Example:**2021-12-22T10:13:06.487Z
| +| amount`integer` |For gift cards, this is a positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the number of redeemed credits.
For loyalty cards, this is the number of loyalty points used in the transaction.
In the case of redemption rollback, the numbers are expressed as negative integers.
10000
| +| order | See: [Simple Order](#simple-order) | +| reward | See: [Simple Redemption Reward Result](#simple-redemption-reward-result) | +| customer | See: [Simple Customer](#simple-customer) | +| result`string` |Redemption result.
Available values: `SUCCESS`, `FAILURE` | +| status`string`, `null` | Available values: `SUCCEEDED`, `FAILED`, `ROLLED BACK` | +| voucher |Defines the details of the voucher being redeemed.
[Simple Voucher](#simple-voucher) | +| promotion_tier | See: [Simple Promotion Tier](#simple-promotion-tier) | +| redemption`string` |Unique redemption ID of the parent redemption.
**Example:**r_0c656311b5878a2031
| +| metadata`object` |The metadata object stores all custom attributes in the form of key/value pairs assigned to the redemption.
| +| failure_code`string` |If the result is FAILURE
, this parameter will provide a generic reason as to why the redemption failed.
customer_rules_violated
| +| failure_message`string` |If the result is FAILURE
, this parameter will provide an expanded reason as to why the redemption failed.
The reason for the redemption rollback.
| +| channel`object` |Defines the details of the channel through which the redemption was issued.
Attributes | Description |
---|---|
channel_idstring | Unique channel ID of the user performing the redemption. This is either a user ID from a user using the Voucherify Dashboard, an X-APP-Id of a user using the API, or the reward assignment ID for automatic reward redemption. |
channel_typestring | The source of the channel for the redemption: API , AUTO_REDEEM , USER |
The type of the object represented by the JSON. This object stores information about the redemption
.
Attributes | Description |
---|---|
itemsarray | Array of items applied to the order. It can include up to 500 items. Array of Order Item Calculated |
Unique identifier of the redeemable holder.
**Example:**rh_0e7b8db4700106a852
| +| created_at`string` |Timestamp representing the date and time when the redeemable was assigned. The value is shown in the ISO 8601 format.
**Example:**2024-03-22T17:48:25.910Z
| +| redeemable_id`string` |Identifier of the redeemable item.
**Example:**v_GXVguPhq2khgFxH7GrRXWA91gDr1LiA1
| +| redeemable_object`string` |Type of the redeemable.
Available values: `voucher` **Example:**voucher
| +| campaign_id`string` |Unique identifier of the campaign as assigned by Voucherify.
**Example:**camp_weer1c3p5ZgktqfW56RfoNaG
| +| campaign_type`string` |Defines the type of the campaign.
Available values: `REFERRAL_PROGRAM` **Example:**REFERRAL_PROGRAM
| +| voucher_type`string` |Defines the type of the voucher.
Available values: `GIFT_VOUCHER`, `DISCOUNT_VOUCHER`, `LOYALTY_CARD` **Example:**DISCOUNT_VOUCHER
| +| publication_id`string`, `null` |Unique identifier of the publication.
| +| customer_id`string` |Unique identifier of the customer.
**Example:**cust_p1ufreYbVbwZ1x70nFkH9rF9
| +| holder_role`string` |Role of the holder.
Available values: `OWNER`, `REFERRER`, `REFEREE` **Example:**REFERRER
| +| object`string` |The type of the object represented by JSON.
Available values: `redeemable_holder` | + +## Customer Summary +| Attributes | Description | +|:-----|:--------| +| redemptions | See: [Customer Summary Redemptions](#customer-summary-redemptions) | +| orders | See: [Customer Summary Orders](#customer-summary-orders) | + +## Customer Loyalty +| Attributes | Description | +|:-----|:--------| +| points`integer` |Customer's loyalty points minus expired for all loyalty cards which the customer has.
| +| referred_customers`integer` |Total number of customers referred by the customer.
| +| campaigns`object` |Contains campaigns with details about point balances and how many customers were referred by the customer.
Attributes | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
[propertyName]object | Contains details about the point balances left on loyalty cards and the number of referred customers in each campaign.
|
Total number of times this customer received a referral, i.e. was referred by another customer.
| +| campaigns`array` |Contains an array of campaigns that served as the source of a referral for the customer.
Array of:Attributes | Description |
---|---|
campaign_idstring | Unique campaign ID, assigned by Voucherify. Example:camp_rRsfatlwN7unSeUIJDCYedal |
referrer_idstring | Unique referrer ID, assigned by Voucherify. This is the customer ID of a customer that is referring this customer. Example:cust_sehkNIi8Uq2qQuRqSr7xn4Zi |
related_object_idstring | Related object id Example:r_0b9d4cc4aa164dd073 |
related_object_typestring | Related object type, i.e. |
datestring | Timestamp representing the date and time when the customer was referred in ISO 8601 format. Example:2022-08-30T10:19:39.196Z |
Customer's first and last name.
| +| description`string` |An arbitrary string that you can attach to a customer object.
| +| email`string` |Customer's email address.
| +| phone`string` |Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel.
| +| birthday`string` |Deprecated
. Customer's birthdate; format YYYY-MM-DD.
Customer's birthdate; format YYYY-MM-DD.
| +| address`object`, `null` |Customer's address.
Attributes | Description |
---|---|
citystring | City |
statestring | State |
line_1string | First line of address. |
line_2string | Second line of address. |
countrystring | Country. |
postal_codestring | Postal code. |
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.
| + +## Simple Campaign Voucher +| Attributes | Description | +|:-----|:--------| +| type`string` |Type of the voucher.
Available values: `DISCOUNT_VOUCHER`, `LOYALTY_CARD`, `GIFT_VOUCHER` | +| discount |Defines the voucher discount type and details.
[Discount](#discount) | +| gift |Defines the voucher gift details.
[Gift](#gift) | +| loyalty_card |Defines the voucher loyalty card details.
[Campaign Loyalty Card](#campaign-loyalty-card) | +| redemption`object` |Defines the redemption limits on vouchers.
Attributes | Description |
---|---|
quantityinteger , null | How many times a voucher can be redeemed. A |
redeemed_quantityinteger | How many times a voucher has already been redeemed. Example:1 |
Define how a referral is triggered.
Available values: `redemption`, `custom_event` | +| custom_event`object` |Contains details about the custom event.
Attributes | Description |
---|---|
idstring | Unique custom event ID. Example:ms_Ll9enAm2BCN0M1s4VxWobLFM |
namestring | Custom event name. |
Defines the referee reward.
Attributes | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
related_object_parentobject | Details of the resource from which the reward originates.
| ||||||||
typestring | Type of reward. Available values:LOYALTY_CARD , GIFT_VOUCHER | ||||||||
amountstring | Define the number of |
Unique category ID assigned by Voucherify.
| +| name`string` |Category name.
| +| hierarchy`integer` |Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value.
| +| object`string` |The type of the object represented by the JSON. This object stores information about the category.
Available values: `category` | +| created_at`string` |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_at`string` |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
| + +## Gift +| Attributes | Description | +|:-----|:--------| +| amount`number` |Total gift card income over the lifetime of the card. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents
for $100.00
.
Total amount of subtracted credits over the gift card lifetime.
| +| balance`number` |Available funds. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents
for $100.00
. balance
= amount
- subtracted_amount
- redemption.redeemed_amount
.
Defines how the credits are applied to the customer's order.
Available values: `APPLY_TO_ORDER`, `APPLY_TO_ITEMS` | + +## Discount +Contains information about discount.
+ +One of: + +[Amount](#amount), [Unit](#unit), [Unit Multiple](#unit-multiple), [Percent](#percent), [Fixed](#fixed) + +## Simple Loyalty Card +| Attributes | Description | +|:-----|:--------| +| points`integer` |Total number of points added to the loyalty card over its lifespan.
| +| balance`integer` |Points available for reward redemption. This is calculated as follows: balance
= points
- expired_points
- subtracted_points
- redemption.redeemed_points
.
The next closest date when the next set of points are due to expire.
| +| next_expiration_points`integer` |The amount of points that are set to expire next.
| +| pending_points`integer` |Shows the number of pending points that will be added to the loyalty card when they are activated automatically or manually.
| +| expired_points`integer` |Shows the total number of expired points over the lifetime of the loyalty card.
| +| subtracted_points`integer` |Shows the total number of subtracted points over the lifetime of the loyalty card.
| + +## Customer Object Required Object Type +| Attributes | Description | +|:-----|:--------| +| id`string` |The unique ID of a customer that is assigned by Voucherify.
**Example:**cust_CSnYd37MXmrbS19XCrghjBsv
| +| source_id`string` |The merchant's customer ID if it is different from the Voucherify customer ID. It is really useful in case of an integration between multiple systems. It can be a customer ID from a CRM system, database or 3rd-party service.
| +| name`string` |Customer's first and last name.
| +| email`string` |Customer's email address.
| +| metadata`object` |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.
| +| object`string` |The type of the object represented by the JSON. This object stores information about the customer.
| + +## Redemption Reward Result +| Attributes | Description | +|:-----|:--------| +| customer | [Simple Customer](#simple-customer) | +| assignment_id`string`, `null` |Unique reward assignment ID assigned by Voucherify.
| +| voucher | [Voucher](#voucher) | +| product | [Product](#product) | +| sku | [SKU Object](#sku-object) | +| loyalty_tier_id`string`, `null` |Unique loyalty tier ID assigned by Voucherify.
| +| id`string` |Unique reward ID.
**Example:**rew_0bc92f81a6801f9bca
| +| name`string` |Name of the reward.
**Example:**Reward Name
| +| object`string` |The type of the object represented by the JSON
Available values: `reward` | +| created_at`string` |Timestamp representing the date and time when the redemption was created. The value is shown in the ISO 8601 format.
**Example:**2021-12-22T10:13:06.487Z
| +| updated_at`string` |Timestamp in ISO 8601 format indicating when the reward was updated.
**Example:**2022-10-03T12:24:58.008Z
| +| parameters`object` |These are parameters representing a material reward.
Attributes | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
campaignobject | Defines the product redeemed as a reward.
| ||||||||
productobject | Defines the product redeemed as a reward.
| ||||||||
coinobject | Defines the ratio by mapping the number of loyalty points in
|
A set of custom key/value pairs that you can attach to a reward. The metadata object stores all custom attributes assigned to the reward.
| +| type`string` |Reward type.
Available values: `CAMPAIGN`, `COIN`, `MATERIAL` | + +## Voucher +This is an object representing a voucher with categories and validation rules assignments.
+ +All of: + +1. [Voucher Base](#voucher-base) +2.Attributes | Description |
---|---|
categoriesarray | Contains details about the category. Array of Category |
validation_rules_assignments | See: Validation Rules Assignments List |
Unique promotion tier ID.
**Example:**promo_63fYCt81Aw0h7lzyRkrGZh9p
| +| created_at`string` |Timestamp representing the date and time when the promotion tier was created. The value is shown in the ISO 8601 format.
**Example:**2021-12-15T11:34:01.333Z
| +| updated_at`string` |Timestamp representing the date and time when the promotion tier was updated. The value is shown in the ISO 8601 format.
**Example:**2022-02-09T09:20:05.603Z
| +| name`string` |Name of the promotion tier.
| +| banner`string` |Text to be displayed to your customers on your website.
| +| action`object` |Contains details about the discount applied by the promotion tier.
Attributes | Description |
---|---|
discount | See: Discount |
The metadata object stores all custom attributes assigned to the promotion tier. A set of key/value pairs that you can attach to a promotion tier object. It can be useful for storing additional information about the promotion tier in a structured format.
| +| hierarchy`integer` |The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy.
| +| promotion_id`string` |Promotion unique ID.
| +| campaign`object` |Contains details about promotion tier's parent campaign.
Attributes | Description |
---|---|
idstring | Unique campaign ID. |
start_datestring | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is inactive before this date. Example:2022-09-22T00:00:00.000Z |
expiration_datestring | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is inactive after this date. Example:2022-09-30T00:00:00.000Z |
validity_timeframe | See: Validity Timeframe |
validity_day_of_week | See: Validity Day Of Week |
validity_hours | See: Validity Hours |
activeboolean | A flag indicating whether the campaign is active or not active. A campaign can be disabled even though it's within the active period defined by the
|
category_idstring | Unique category ID that this campaign belongs to. Example:cat_0b688929a2476386a6 |
objectstring | The type of the object represented by the campaign object. This object stores information about the campaign. |
Promotion tier's parent campaign's unique ID.
| +| active`boolean` |A flag to toggle the promotion tier on or off. You can disable a promotion tier even though it's within the active period defined by the start_date
and expiration_date
.
true
indicates an active promotion tierfalse
indicates an inactive promotion tierActivation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Promotion tier is inactive before this date.
**Example:**2022-09-23T00:00:00.000Z
| +| expiration_date`string` |Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is inactive after this date.
**Example:**2022-09-26T00:00:00.000Z
| +| validity_timeframe | See: [Validity Timeframe](#validity-timeframe) | +| validity_day_of_week | See: [Validity Day Of Week](#validity-day-of-week) | +| validity_hours | See: [Validity Hours](#validity-hours) | +| summary`object` |Contains statistics about promotion tier redemptions and orders.
Attributes | Description | ||||||
---|---|---|---|---|---|---|---|
redemptionsobject | Contains statistics about promotion tier redemptions.
| ||||||
ordersobject | Contains statistics about orders related to the promotion tier.
|
The type of the object represented by JSON. This object stores information about the promotion tier.
| +| validation_rule_assignments | See: [Validation Rule Assignments List](#validation-rule-assignments-list) | +| category_id`string` |Promotion tier category ID.
**Example:**cat_0c9da30e7116ba6bba
| +| categories`array` | Array of [Category](#category) | + +## Simple Product +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique product ID.
| +| source_id`string` |Product source id.
| +| name`string` |Product name.
| + +## Simple Sku +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique sku ID.
| +| source_id`string` |Sku source id.
| +| sku`string` |Sku name.
| + +## Reward type +One of: + +[Digital](#digital), [Pay with Points](#pay-with-points), [Material](#material) + +## Loyalty Tier Base +| Attributes | Description | +|:-----|:--------| +| name`string` |Loyalty Tier name.
| +| earning_rules`object` |Contains a list of earning rule IDs and their points mapping for the given earning rule.
Attributes | Description |
---|---|
[propertyName] | See: MappingPoints |
Contains a list of reward IDs and their points mapping for the given reward.
Attributes | Description |
---|---|
[propertyName] | See: MappingPoints |
Defines range of loyalty tier in points.
Attributes | Description |
---|---|
frominteger | Bottom points threshold value. |
tointeger | Top points threshold value. |
Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify.
**Example:**cust_7iUa6ICKyU6gH40dBU25kQU1
| +| campaign_id`string` |Unique campaign ID, assigned by Voucherify.
**Example:**camp_rRsfatlwN7unSeUIJDCYedal
| +| tier_id`string` |Unique tier ID, assigned by Voucherify.
| +| start_date`string` |Activation timestamp defines when the loyalty tier starts to be active in ISO 8601 format. Loyalty tier is inactive before this date.
| +| expiration_date`string` |Expiration timestamp defines when the loyalty tier expires in ISO 8601 format. Loyalty tier is inactive after this date.
| +| created_at`string` |Timestamp representing the date and time when the loyalty tier was created. The value is shown in the ISO 8601 format.
**Example:**2021-12-22T10:13:06.487Z
| +| updated_at`string` |Timestamp representing the date and time when the loyalty tier was updated. The value is shown in the ISO 8601 format.
**Example:**2021-12-22T10:13:06.487Z
| + +## EarningRuleBase +| Attributes | Description | +|:-----|:--------| +| id`string` |Assigned by the Voucherify API, identifies the earning rule object.
| +| created_at`string` |Timestamp representing the date and time when the earning rule was created. The value is shown in the ISO 8601 format.
| +| loyalty | One of: [Define fixed amount of points](#define-fixed-amount-of-points), [Calculate points proportionally](#calculate-points-proportionally) | +| event |Defines the event which triggers the earning rule to add points to a loyalty card.
[Earning Rule Event](#earning-rule-event) | +| custom_event`object` |Contains details about the custom event.
Attributes | Description |
---|---|
schema_idstring | Unique identifier of the custom event schema |
Contains the ID of a customer segment. Required for the customer.segment.entered
option in the event.
Attributes | Description |
---|---|
idstring | Contains a unique identifier of a customer segment. Assigned by the Voucherify API. |
Defines the tier associated with the earning rule definition.
Attributes | Description |
---|---|
idstring | Unique loyalty tier ID associated with the earning rule.
ltr_pudTGWasuIqxdiDM0go31OV1 |
Defines the configuration for pending points. Pending points can be used only with the order.paid
event.
Attributes | Description |
---|---|
period_typestring | Defines the type of the period during which the points are in the pending state. Currently, only DAY |
period_valueinteger | Defines for how long the points are in the pending state. The minimum value is 1, maximum is 90. |
Contains the custom earning rule name and parent campaign.
Attributes | Description |
---|---|
bannerstring | Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard. |
object_idstring | A unique campaign identifier assigned by the Voucherify API. |
object_typestring | Defines the object associated with the earning rule. Defaults to campaign |
The type of the object represented by JSON. Default is earning_rule.
Available values: `earning_rule` | +| automation_id`string` |For internal use by Voucherify.
| +| start_date`string` |Start date defines when the earning rule starts to be active. Activation timestamp is presented in the ISO 8601 format. The earning rule is inactive before this date. If you do not define the start date for an earning rule, it will inherit the campaign start date by default.
| +| expiration_date`string` |Expiration date defines when the earning rule expires. Expiration timestamp is presented in the ISO 8601 format. The earning rule is inactive after this date. If you do not define the expiration date for an earning rule, it will inherit the campaign expiration date by default.
| +| validity_timeframe | See: [Validity Timeframe](#validity-timeframe) | +| validity_day_of_week | See: [Validity Day Of Week](#validity-day-of-week) | +| validity_hours | See: [Validity Hours](#validity-hours) | +| metadata`object` |The metadata object stores all custom attributes assigned to the earning rule. A set of key/value pairs that you can attach to an earning rule object. It can be useful for storing additional information about the earning rule in a structured format.
| +| expiration_rules | See: [Earning Rule Expiration Rules](#earning-rule-expiration-rules) | + +## Customer Id +| Attributes | Description | +|:-----|:--------| +| id`string` |A unique identifier of an existing customer.
| +| object`string` |The type of the object represented by JSON.
Available values: `customer` | + +## Referrer Id +[Customer Id](#customer-id) + +## Order Redemptions +| Attributes | Description | +|:-----|:--------| +| date`string` |Timestamp representing the date and time when the redemption was created. The value is shown in the ISO 8601 format.
**Example:**2022-09-02T17:06:56.649Z
| +| rollback_id`string` |Unique ID of the redemption rollback.
**Example:**rr_0c63c84eb78ee0a6c0
| +| rollback_date`string` |Timestamp representing the date and time when the redemption rollback was created. The value is shown in the ISO 8601 format.
**Example:**2023-01-31T14:18:37.150Z
| +| related_object_type`string` |The source of the incentive.
| +| related_object_id`string` |Unique ID of the parent redemption.
**Example:**r_0ba186c4824e4881e1
| +| related_object_parent_id`string` |Represent's the campaign ID of the voucher if the redemption was based on a voucher that was part of bulk codes generated within a campaign. In case of a promotion tier, this represents the campaign ID of the promotion tier's parent campaign.
| +| stacked`array` |Contains a list of unique IDs of child redemptions, which belong to the stacked incentives.
| +| rollback_stacked`array` |Lists the rollback redemption IDs of the particular child redemptions.
| + +## Simple Order Item +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique identifier of the order line item.
| +| object`string` |The type of the object represented by JSON. This object stores information about the order_item
.
The merchant's product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service.
| +| related_object`string` |Used along with the source_id
property, can be set to either SKU or product.
Unique identifier of the product. It is assigned by Voucherify.
| +| sku_id`string` |Unique identifier of the SKU. It is assigned by Voucherify.
| +| quantity`integer` |Quantity of the particular item in the cart.
| +| applied_quantity`integer` |Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.
| +| applied_quantity_amount`integer` |Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.
| +| discount_quantity`integer` |Number of discounted items.
| +| applied_discount_quantity`integer` |Number of the discounted items applied in the transaction.
| +| amount`integer` |Total amount of the order item (price * quantity).
| +| discount_amount`integer` |Sum of all order-item-level discounts applied to the order.
| +| applied_discount_amount`integer` |Order-level discount amount applied in the transaction.
| +| price`integer` |Unit price of an item. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents
for $100.00
.
Final order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the amount
.subtotal_amount
=amount
-discount_amount
Transaction types concerning gift card credits.
+ +Available values: `CREDITS_REDEMPTION`, `CREDITS_REFUND`, `CREDITS_ADDITION`, `CREDITS_REMOVAL` + +## Loyalty Card Transactions Type +Transaction types concerning loyalty points.
+ +Available values: `PENDING_POINTS_ACTIVATION`, `POINTS_ACCRUAL`, `POINTS_REDEMPTION`, `POINTS_REFUND`, `POINTS_ADDITION`, `POINTS_REMOVAL`, `POINTS_EXPIRATION`, `POINTS_TRANSFER_IN`, `POINTS_TRANSFER_OUT` + +## Pending Point Details +| Attributes | Description | +|:-----|:--------| +| loyalty_tier`object` |The loyalty tier that is mapped for the earning rule and used in the pending point transaction.
Attributes | Description |
---|---|
idstring | Unique identifier of the loyalty tier, assigned by Voucherify. |
namestring | User-defined name of the loyalty tier. |
Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was at the moment pending points were created.
Attributes | Description |
---|---|
idstring | Unique identifier of the loyalty tier, assigned by Voucherify. |
namestring | User-defined name of the loyalty tier. |
Details about the event that created pending points.
Attributes | Description |
---|---|
idstring | Unique event identifier, assigned by Voucherify. |
typestring | Type of the event that triggered the creation of pending points. Available values:customer.order.paid |
group_idstring | Unique identifier of the request that triggered the event, assigned by Voucherify. |
entity_idstring | Unique identifier of the entity that triggered the event, assigned by Voucherify. For pending points, it is the |
created_atstring | Timestamp representing the date and time when the event occurred. The value is shown in the ISO 8601 format. |
categorystring | Type of the event. Available values:ACTION , EFFECT |
event_source | See: Event Source |
Contains information about the earning rule.
Attributes | Description | ||||
---|---|---|---|---|---|
idstring | Unique identifier of an earning rule, assigned by Voucherify. | ||||
sourceobject | Contains the custom earning rule name.
|
Details about the order that caused adding pending points.
Attributes | Description |
---|---|
idstring | Unique order identifier, assigned by Voucherify. |
source_idstring , null | User-defined order identifier. |
Unique publication ID, assigned by Voucherify.
**Example:**pub_BbjAXnmm8e0SIm3zG8qvvFCP0KuLywtp
| +| object`string` |The type of the object represented by the JSON. This object stores information about the publication
.
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_id`string` |Unique customer ID of the customer receiving the publication.
**Example:**cust_eWgXlBBiY6THFRJwX45Iakv4
| +| tracking_id`string` |Customer's source_id
.
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.
Attributes | Description |
---|---|
source_typestring | Defines the type of the distribution source. |
source_idstring | Unique identifier of the distribution source. |
distribution_idstring | Unique identifier of the distribution. |
How the publication was originated. It can be your own custom channel or an example value provided here.
| +| source_id`string`, `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.
| +| customer | See: [Customer With Summary Loyalty Referrals](#customer-with-summary-loyalty-referrals) | +| vouchers`array` |Contains the voucher IDs that was assigned by Voucherify.
| +| vouchers_id`array` |Contains the unique internal voucher IDs that was assigned by Voucherify.
| + +## List Publications Item Voucher +| Attributes | Description | +|:-----|:--------| +| code`string` |Voucher code.
| +| object`string` |The type of the object represented by JSON.
Available values: `voucher` | +| campaign`string` |Campaign name
| +| gift |Gift object response
[Gift](#gift) | +| loyalty_card`object` |Defines the loyalty card details.
| +| discount | See: [Discount](#discount) | +| is_referral_code`boolean` |Flag indicating whether this voucher is a referral code; true
for campaign type REFERRAL_PROGRAM
.
Unique promotion tier ID.
**Example:**promo_63fYCt81Aw0h7lzyRkrGZh9p
| +| name`string` |Name of the promotion tier.
| +| banner`string` |Text to be displayed to your customers on your website.
| +| campaign`object` |Contains details about promotion tier's parent campaign.
Attributes | Description |
---|---|
idstring | Unique campaign ID. |
A set of custom key/value pairs that you can attach to a promotion tier. The metadata object stores all custom attributes assigned to the promotion tier.
| + +## Simple Promotion Stack +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique identifier of the promotion stack.
| +| name`string` |Name of the promotion stack.
| +| category_id`string` |Unique identifier of the category of the promotion stack.
| +| campaign`object` |Represents simplified promotion stack campaign data.
Attributes | Description |
---|---|
idstring | Unique identifier of the campaign. |
Contains the tier configuration. A promotion stack can include up to 30 tiers.
Attributes | Description |
---|---|
idsarray | Contains the list of tiers in a pre-defined sequence. |
hierarchy_modestring | Available values: MANUAL |
Total number of redemptions made by the customer.
| +| total_failed`integer` |Total number of redemptions that failed.
| +| total_succeeded`integer` |Total number of redemptions that succeeded.
| +| total_rolled_back`integer` |Total number of redemptions that were rolled back for the customer.
| +| total_rollback_failed`integer` |Total number of redemption rollbacks that failed.
| +| total_rollback_succeeded`integer` |Total number of redemption rollbacks that succeeded.
| +| gift`object` |Summary of gift card credits.
Attributes | Description |
---|---|
redeemed_amountinteger | Total amount of gift card credits redeemed by customer. The value is multiplied by 100 to represent 2 decimal places. For example |
amount_to_gointeger | Remaining gift card balance across all gift cards. The value is multiplied by 100 to represent 2 decimal places. For example |
Summary of loyalty points.
Attributes | Description |
---|---|
redeemed_pointsinteger | Total number of loyalty points redeemed by the customer. |
points_to_gointeger | Sum of remaining available point balance across all loyalty cards. |
The total amount spent by the customer. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents
for $100.00
.
Total number of orders made by the customer.
| +| average_amount`integer` |Average amount spent on orders. total_amount
÷ total_count
. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents
for $100.00
.
Amount spent on last order. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents
for $100.00
.
Timestamp representing the date and time of the customer's last order in ISO 8601 format.
**Example:**2022-08-30T11:51:08.029Z
| + +## Campaign Loyalty Card +| Attributes | Description | +|:-----|:--------| +| points`integer` |The initial number of points to assign to the loyalty card. This is the current loyalty card score i.e. the number of loyalty points on the card.
| +| expiration_rules`object` |Defines the loyalty point expiration rule. This expiration rule applies when there are no expiration_rules
defined for an earning rule.
Attributes | Description |
---|---|
period_typestring | Type of period. Can be set for FIXED_DAY_OF_YEAR , MONTH |
period_valueinteger | Value of the period. Required for the |
rounding_typestring | Type of rounding of the expiration period. Optional for the END_OF_MONTH , END_OF_QUARTER , END_OF_HALF_YEAR , END_OF_YEAR , PARTICULAR_MONTH |
rounding_valueinteger | Value of rounding of the expiration period. Required for the |
fixed_monthinteger | Determines the month when the points expire; |
fixed_dayinteger | Determines the day of the month when the points expire. Required for the |
Number of characters in a generated code (excluding prefix and postfix).
| +| charset`string` |Characters that can appear in the code.
Examples:
0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ
0123456789
A text appended before the code.
| +| postfix`string` |A text appended after the code.
| +| pattern`string` |A pattern for codes where hashes (#) will be replaced with random characters. Overrides length
.
Internal value, does not change anything if provided.
| + +## Amount +| Attributes | Description | +|:-----|:--------| +| type`string` |Defines the type of the voucher.
Available values: `AMOUNT` | +| amount_off`number` |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_formula`string` | | +| aggregated_amount_limit`integer` |Maximum discount amount per order.
| +| effect |Defines how the discount is applied to the customer's order.
[Discount Amount Vouchers Effect Types](#discount-amount-vouchers-effect-types) | +| is_dynamic`boolean` |Flag indicating whether the discount was calculated using a formula.
| + +## Unit +| Attributes | Description | +|:-----|:--------| +| type`string` |Discount type.
Available values: `UNIT` | +| unit_off`integer` |Number of units to be granted a full value discount.
| +| unit_off_formula`string` |Formula used to calculate the number of units.
| +| effect |Defines how the unit is added to the customer's order.
[Discount Unit Vouchers Effect Types](#discount-unit-vouchers-effect-types) | +| unit_type`string` |The product deemed as free, chosen from product inventory (e.g. time, items).
| +| product |Contains information about the product.
[Simple Product Discount Unit](#simple-product-discount-unit) | +| sku | See: [Simple Sku Discount Unit](#simple-sku-discount-unit) | +| is_dynamic`boolean` |Flag indicating whether the discount was calculated using a formula.
| + +## Unit Multiple +| Attributes | Description | +|:-----|:--------| +| type`string` |Discount type.
Available values: `UNIT` | +| effect`string` |Defines how the discount is applied to the customer's order.
Available values: `ADD_MANY_ITEMS` | +| units`array` | Array of [One Unit](#one-unit) | + +## Percent +| Attributes | Description | +|:-----|:--------| +| type`string` |Defines the type of the voucher.
Available values: `PERCENT` | +| percent_off`number` |The percent discount that the customer will receive.
| +| percent_off_formula`string` | | +| amount_limit`number` |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_limit`integer` |Maximum discount amount per order.
| +| effect |Defines how the discount is applied to the customer's order.
[Discount Percent Vouchers Effect Types](#discount-percent-vouchers-effect-types) | +| is_dynamic`boolean` |Flag indicating whether the discount was calculated using a formula.
| + +## Fixed +| Attributes | Description | +|:-----|:--------| +| type`string` |Defines the type of the voucher.
Available values: `FIXED` | +| fixed_amount`number` |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_formula
parameter is present in the fixed amount definition, this value becomes the fallback value. As a result, if the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed value.
Defines how the discount is applied to the customer's order.
[Discount Fixed Vouchers Effect Types](#discount-fixed-vouchers-effect-types) | +| is_dynamic`boolean` |Flag indicating whether the discount was calculated using a formula.
| + +## Product +This is an object representing a product.
This entity should be used to map product items from your inventory management system. The aim of products is to build which reflect product-specific campaigns.
+ +All of: + +1. [Product without Skus Object](#product-without-skus-object) +2.Attributes | Description |
---|---|
skus | See: Skus List For Product |
A unique identifier that represents the SKU and is assigned by Voucherify.
**Example:**sku_0b1621b319d248b79f
| +| source_id`string`, `null` |A unique SKU identifier from your inventory system.
**Example:**sku_source_id_4
| +| product_id`string` |The parent product's unique ID.
**Example:**prod_0b15f6b9f650c16990
| +| sku`string`, `null` |Unique user-defined SKU name.
**Example:**Large Pink Shirt
| +| price`integer`, `null` |Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as $100.00
being expressed as 10000
.
SKU price currency.
**Example:**USD
| +| attributes`object` |The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family.
| +| image_url`string`, `null` |The HTTPS URL pointing to the .png or .jpg file that will be used to render the SKU image.
| +| metadata`object` |The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections.
| +| created_at`string` |Timestamp representing the date and time when the SKU was created. The value is shown in the ISO 8601 format.
**Example:**2022-05-17T10:36:30.187Z
| +| updated_at`string`, `null` |Timestamp representing the date and time when the SKU was updated. The value is shown in the ISO 8601 format.
**Example:**2022-05-17T10:55:09.137Z
| +| object`string` |The type of the object represented by JSON. This object stores information about the SKU
.
Assigned by the Voucherify API, identifies the voucher.
**Example:**v_mkZN9v7vjYUadXnHrMza8W5c34fE5KiV
| +| code`string` |A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters.
**Example:**WVPblOYX
| +| campaign`string` |A unique campaign name, identifies the voucher's parent campaign.
**Example:**Gift Card Campaign
| +| campaign_id`string` |Assigned by the Voucherify API, identifies the voucher's parent campaign.
**Example:**camp_FNYR4jhqZBM9xTptxDGgeNBV
| +| category`string` |Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint.
| +| category_id`string` |Unique category ID assigned by Voucherify.
**Example:**cat_0bb343dee3cdb5ec0c
| +| type`string` |Defines the type of the voucher.
Available values: `GIFT_VOUCHER`, `DISCOUNT_VOUCHER`, `LOYALTY_CARD` | +| discount | See: [Discount](#discount) | +| gift`object` |Object representing gift parameters. Child attributes are present only if type
is GIFT_VOUCHER
. Defaults to null
.
Attributes | Description |
---|---|
amountinteger | Total gift card income over the lifetime of the card. The value is multiplied by 100 to represent 2 decimal places. For example 10000 |
subtracted_amountinteger | Total amount of subtracted credits over the gift card lifetime. The value is multiplied by 100 to represent 2 decimal places. For example |
balanceinteger | Available funds. The value is multiplied by 100 to represent 2 decimal places. For example 500 |
effectstring | Defines how the credits are applied to the customer's order. Available values:APPLY_TO_ORDER , APPLY_TO_ITEMS |
Object representing loyalty card parameters. Child attributes are present only if type
is LOYALTY_CARD
. Defaults to null
.
Attributes | Description |
---|---|
pointsinteger | Total number of points added to the loyalty card over its lifespan. Example:7000 |
balanceinteger | Points available for reward redemption. This is calculated as follows: 6970 |
next_expiration_datestring | The next closest date when the next set of points are due to expire. Example:2023-05-30 |
next_expiration_pointsinteger | The amount of points that are set to expire next. |
pending_pointsinteger | Shows the number of pending points that will be added to the loyalty card when they are activated automatically or manually. |
expired_pointsinteger | Shows the total number of expired points over the lifetime of the loyalty card. |
subtracted_pointsinteger | Shows the total number of subtracted points over the lifetime of the loyalty card. |
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_date`string` |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-timeframe) | +| validity_day_of_week | See: [Validity Day Of Week](#validity-day-of-week) | +| validity_hours | See: [Validity Hours](#validity-hours) | +| active`boolean`, `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 start_date
and expiration_date
.
true
indicates an active voucherfalse
indicates an inactive voucherAn optional field to keep any extra textual information about the code such as a code description and details.
| +| metadata`object` |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](#voucher-assets) | +| is_referral_code`boolean`, `null` |Flag indicating whether this voucher is a referral code; true
for campaign type REFERRAL_PROGRAM
.
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_at`string` |Timestamp representing the date and time when the voucher was last updated in ISO 8601 format.
**Example:**2021-12-22T10:14:45.316Z
| +| holder_id`string` |Unique customer identifier of the redeemable holder. It equals to the customer ID assigned by Voucherify.
**Example:**cust_eWgXlBBiY6THFRJwX45Iakv4
| +| referrer_id`string` |Unique identifier of the referring person.
**Example:**cust_Vzck5i8U3OhcEUFY6MKhN9Rv
| +| object`string` |The type of the object represented by JSON. Default is voucher
.
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.
Attributes | Description |
---|---|
objectstring | The type of the object represented is by default |
countinteger | Publication events counter. Example:0 |
urlstring | The endpoint where this list of publications can be accessed using a GET method. /v1/vouchers/WVPblOYX/publications?page=1&limit=10 |
Stores a summary of redemptions that have been applied to the voucher.
Attributes | Description |
---|---|
quantityinteger | How many times a voucher can be redeemed. A |
redeemed_quantityinteger | How many times a voucher has already been redeemed. Example:1 |
redeemed_pointsinteger | Total loyalty points redeemed. Example:100000 |
objectstring | The type of the object represented is by default |
urlstring | The endpoint where this list of redemptions can be accessed using a GET method. /v1/vouchers/WVPblOYX/redemptions?page=1&limit=10 |
The type of the object represented by JSON. This object stores information about validation rules assignments.
Available values: `list` | +| data_ref`string` |Identifies the name of the attribute that contains the array of validation rules assignments.
Available values: `data` | +| data`array` |Contains array of validation rules assignments.
Array of [Business Validation Rule Assignment](#business-validation-rule-assignment) | +| total`integer` |Total number of validation rules assignments.
| + +## Validity Timeframe +| Attributes | Description | +|:-----|:--------| +| duration`string` |Defines the amount of time an earning rule will be active in ISO 8601 format. For example, an earning rule with a duration
of PT1H
will be valid for a duration of one hour.
PT1H
| +| interval`string` |Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, an earning rule with an interval
of P2D
will be valid every other day.
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
SaturdayDefines the reccuring period(s) when the resource is active. The periods should not overlap.
Array of:Attributes | Description |
---|---|
start_timestring | Defines the starting hour of validity in the HH:mm format. The resource is inactive before this time. Example:12:00 |
days_of_weekarray | Integer array corresponding to the particular days of the week in which the resource is valid.
|
expiration_timestring | Defines the ending hour of validity in the HH:mm format. The resource is inactive after this time. Example:14:00 |
The type of the object represented by JSON. This object stores information about validation rule assignments.
| +| data_ref`string` |Identifies the name of the JSON property that contains the array of validation rule assignments.
| +| data`array` |A dictionary that contains an array of validation rule assignments.
Array of [Validation Rule Assignment](#validation-rule-assignment) | +| total`integer` |Total number of validation rule assignments.
| + +## Digital +| Attributes | Description | +|:-----|:--------| +| campaign`object` |Objects stores information about the campaign related to the reward.
Attributes | Description |
---|---|
idstring | Unique campaign ID, assigned by Voucherify. |
balanceinteger | The number of points to be added to a loyalty card or the amount to be added to the current balance on the gift card. For gift cards, the value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. |
typestring | Campaign type. Available values:DISCOUNT_COUPONS , GIFT_VOUCHERS , LOYALTY_PROGRAM |
Defines the ratio by mapping the number of loyalty points in points_ratio to a predefined cash amount in exchange_ratio.
Attributes | Description |
---|---|
exchange_rationumber | The cash equivalent of the points defined in the points_ratio property. |
points_ratiointeger | The number of loyalty points that will map to the predefined cash amount defined by the exchange_ratio property. |
Contains information about the product given as a reward.
Attributes | Description |
---|---|
idstring | Unique product ID, assigned by Voucherify. Example:prod_0b7d7dfb05cbe5c616 |
sku_idstring , null | Unique SKU ID, assigned by Voucherify, of the SKU given as a reward. Example:sku_0b7d7dfb090be5c619 |
The number of points to be added to the loyalty card.
Available values: `FIXED` | +| points`integer` |Defines how the points will be added to the loyalty card. FIXED adds a fixed number of points.
| + +## Calculate points proportionally +One of: + +[Define amount of points proportional to the order](#define-amount-of-points-proportional-to-the-order), [Define amount of points proportional to order items](#define-amount-of-points-proportional-to-order-items), [Define amount of points proportional to customer metadata](#define-amount-of-points-proportional-to-customer-metadata), [Earning Rule Proportional Custom Event](#earning-rule-proportional-custom-event) + +## Earning Rule Event + + +## Earning Rule Expiration Rules +| Attributes | Description | +|:-----|:--------| +| period_type`string` |Type of period. Can be set for MONTH
or FIXED_DAY_OF_YEAR
. MONTH
requires the period_value
field. FIXED_DAY_OF_YEAR
requires the fixed_month
and fixed_day
fields.
Value of the period. Required for the period_type: MONTH
.
Type of rounding of the expiration period. Optional for the period_type: MONTH
.
Value of rounding of the expiration period. Required for the rounding_type
.
Determines the month when the points expire; 1
is January, 2
is February, and so on. Required for the period_type: FIXED_DAY_OF_YEAR
.
Determines the day of the month when the points expire. Required for the period_type: FIXED_DAY_OF_YEAR
.
Unique reward assignment ID, assigned by Voucherify.
**Example:**rewa_PbIRoMXpwe5QhobW4JKu0VjH
| +| reward_id`string` |Associated reward ID.
**Example:**rew_C7wS9eHFDN4CIbXI5PpLSkGY
| +| created_at`string` |Timestamp representing the date and time when the reward assignment was created. The value is shown in the ISO 8601 format.
**Example:**2022-08-11T14:49:22.586Z
| +| updated_at`string`, `null` |Timestamp representing the date and time when the reward assignment was updated. The value is shown in the ISO 8601 format.
**Example:**2022-08-11T16:01:34.885Z
| +| object`string` |The type of the object represented by the JSON. This object stores information about the reward assignment.
Available values: `reward_assignment` | +| related_object_id`string` |Related object ID to which the reward was assigned.
**Example:**camp_wciTvaOfYmAa3EmIIW3QpXXZ
| +| related_object_type`string` |Related object type to which the reward was assigned.
Available values: `campaign` | + +## Digital or Material Reward - Parameters +| Attributes | Description | +|:-----|:--------| +| parameters`object` |Defines the cost of the reward.
Attributes | Description | ||||||
---|---|---|---|---|---|---|---|
loyaltyobject | Defines the equivalent points value of the reward.
|
Unique product ID, assigned by Voucherify.
| +| source_id`string` |Product's source ID.
| +| name`string` |Product name.
| + +## Simple Sku Discount Unit +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique SKU ID, assigned by Voucherify.
| +| source_id`string` |Product variant's source ID.
| +| name`string` |Sku name
| + +## One Unit +| Attributes | Description | +|:-----|:--------| +| unit_off`number` |Number of units to be granted a full value discount.
| +| unit_off_formula`string` |Formula used to calculate the number of units.
| +| effect`string` |Defines how the unit is added to the customer's order.
Available values: `ADD_NEW_ITEMS`, `ADD_MISSING_ITEMS` | +| unit_type`string` |The product deemed as free, chosen from product inventory (e.g. time, items).
| +| product |Contains information about the product.
[Simple Product Discount Unit](#simple-product-discount-unit) | +| sku |Contains information about the sku.
[Simple Sku Discount Unit](#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` + +## Product without Skus Object +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique product ID assigned by Voucherify.
**Example:**prod_0b1da8105693710357
| +| source_id`string`, `null` |Unique product source ID.
**Example:**productSourceID16
| +| name`string`, `null` |Unique user-defined product name.
**Example:**T-shirt
| +| price`integer`, `null` |Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as $100.00
being expressed as 10000
.
A list of product attributes whose values you can customize for given SKUs: ["color","size","ranking"]
. Each child SKU can have a unique value for a given attribute.
The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections.
| +| image_url`string`, `null` |The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image.
**Example:**https://images.com/original.jpg
| +| created_at`string` |Timestamp representing the date and time when the product was created. The value is shown in the ISO 8601 format.
**Example:**2022-05-23T06:52:55.008Z
| +| updated_at`string`, `null` |Timestamp representing the date and time when the product was updated. The value is shown in the ISO 8601 format.
**Example:**2022-05-23T09:24:07.405Z
| +| object`string` |The type of the object represented by JSON. This object stores information about the product.
Available values: `product` | + +## Skus List For Product +| Attributes | Description | +|:-----|:--------| +| object`string` |The type of the object represented by JSON. This object stores information about SKUs.
| +| data_ref`string` |Identifies the name of the JSON property that contains the array of SKUs.
| +| data`array` |A dictionary that contains an array of SKUs.
Array of [SKU Object](#sku-object) | +| total`integer` |Total number of SKUs in the product.
| + +## Voucher Assets +| Attributes | Description | +|:-----|:--------| +| qr`object` |Stores Quick Response (QR) representation of encrypted code.
Attributes | Description |
---|---|
idstring | Encrypted voucher code ID. Example:U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK+t4pp7U7oFzjGJzj9q/bmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg+BaZk5QwXMf8k/OzSlOEVybpwSq+AiqPoNtjeuqtIgkDyvT6Q== |
urlstring | URL to QR code Optional: Attach query parameters to base URL to customize the image of the encrypted voucher code.
https://dev.dl.voucherify.io/api/v1/assets/qr/U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK%2Bt4pp7U7oFzjGJzj9q%2FbmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg%2BBaZk5QwXMf8k%2FOzSlOEVybpwSq%2BAiqPoNtjeuqtIgkDyvT6Q%3D%3D |
Stores barcode representation of encrypted code.
Attributes | Description |
---|---|
idstring | Encrypted voucher code ID. Example:U2FsdGVkX19eJhGfWwUrH9+tulBkON+AnMktic+N6CVWzZ9+fHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ+kJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6/pFs61apEn9SJx32ttCF6d3oxKISQQ== |
urlstring | URL to barcode Optional: Attach query parameters to base URL to customize the image of the encrypted voucher code.
https://dev.dl.voucherify.io/api/v1/assets/barcode/U2FsdGVkX19eJhGfWwUrH9%2BtulBkON%2BAnMktic%2BN6CVWzZ9%2BfHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ%2BkJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6%2FpFs61apEn9SJx32ttCF6d3oxKISQQ%3D%3D |
The unique identifier for a assignment
| +| rule_id`string` |The unique identifier for a rule
| +| related_object_id`string` |The unique identifier for a related object
| +| related_object_type`string` |The type of related object
| +| created_at`string` |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_at`string` |Timestamp representing the date and time when the object was last updated in ISO 8601 format.
**Example:**2022-03-09T11:19:04.819Z
| +| object`string` |The type of the object represented by JSON.
Available values: `validation_rules_assignment` | +| validation_status`string` |The validation status of the assignment
Available values: `VALID`, `PARTIALLY_VALID`, `INVALID` | +| validation_omitted_rules`array` |The list of omitted rules
| + +## Validation Rule Assignment +| Attributes | Description | +|:-----|:--------| +| id`string` |Validation rule assignment ID.
**Example:**asgm_74F7QZoYbUoljwQO
| +| rule_id`string` |Validation rule ID.
**Example:**val_4j7DCRm2IS59
| +| related_object_id`string` |The resource ID to which the validation rule was assigned.
**Example:**v_JtWunK6jUo7X2qOFj0SyRHq4p9tgENlT
| +| related_object_type`string` |The type of resource to which the validation rule was assigned.
Available values: `voucher`, `campaign`, `earning_rule`, `reward_assignment`, `promotion_tier`, `distribution` | +| created_at`string` |Timestamp representing the date and time when the validation rule assignment was created. The value is shown in the ISO 8601 format.
**Example:**2022-02-17T08:18:15.085Z
| +| object`string` |The type of the object represented by the ID.
Available values: `validation_rules_assignment` | + +## MappingMultiply +| Attributes | Description | +|:-----|:--------| +| type`string` |Type of calculation.
Available values: `MULTIPLY` | +| multiplier`number` |Multiplication factor used to multiply the points to obtain the mapped points.
| + +## MappingFixed +| Attributes | Description | +|:-----|:--------| +| type`string` |Type of calculation.
Available values: `CUSTOM` | +| points`integer` |Fixed number of points to be applied.
| + +## Define amount of points proportional to the order +One of: + +[Order Amount](#order-amount), [Order Total Amount](#order-total-amount), [Order Metadata](#order-metadata) + +## Define amount of points proportional to order items +One of: + +[Order Items Quantity](#order-items-quantity), [Order Items Amount](#order-items-amount), [Order Items Subtotal Amount](#order-items-subtotal-amount) + +## Define amount of points proportional to customer metadata +| Attributes | Description | +|:-----|:--------| +| type`string` |Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio.
Available values: `PROPORTIONAL` | +| calculation_type`string` |CUSTOMER_METADATA: Customer Metadata (X points for every Y in metadata attribute, defined in the property key under the customer.metadata object)
Available values: `CUSTOMER_METADATA` | +| customer`object` |Attributes | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
metadataobject | Defines the ratio based on the property defined in the calculation_type parameter. For every given increment of value (1, 10, etc) defined in the every parameter for the property defined in calculation_type, give the customer the number of points defined in the points parameter. In other words, for every order metadata property value, give points.
|
Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio.
Available values: `PROPORTIONAL` | +| calculation_type`string` |CUSTOM_EVENT_METADATA: Custom event metadata (X points for every Y in metadata attribute).
Available values: `CUSTOM_EVENT_METADATA` | +| custom_event`object` |Attributes | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
metadataobject | Defines the ratio based on the property defined in the calculation_type parameter. For every given increment of value (1, 10, etc) defined in the every parameter for the property defined in calculation_type, give the customer the number of points defined in the points parameter. In other words, for every order metadata property value, give points.
|
Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio.
Available values: `PROPORTIONAL` | +| calculation_type`string` |ORDER_AMOUNT
: Pre-discount order amount (X points for every Y spent excluding discounts)
Attributes | Description | ||||||
---|---|---|---|---|---|---|---|
amountobject | Defines the ratio based on the property defined in the calculation_type parameter. For every set of value (1, 10, etc) defined in the every parameter for the property defined in calculation_type, give the customer the number of points defined in the points parameter. In other words, for every calculation_type, give points.
|
Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio.
Available values: `PROPORTIONAL` | +| calculation_type`string` |ORDER_TOTAL_AMOUNT
: Total order amount (X points for every Y spent including discount)
Attributes | Description | ||||||
---|---|---|---|---|---|---|---|
total_amountobject | Defines the ratio based on the property defined in the calculation_type parameter. For every set of value (1, 10, etc) defined in the every parameter for the property defined in calculation_type, give the customer the number of points defined in the points parameter. In other words, for every calculation_type, give points.
|
Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio.
Available values: `PROPORTIONAL` | +| calculation_type`string` |ORDER_METADATA
: Order Metadata (X points for every Y in metadata attribute, defined in the property key under the order.metadata object)
Defines the formula for calculating points proportionally.
Attributes | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
metadataobject | Defines the ratio based on the property defined in the calculation_type parameter. For every given increment of value (1, 10, etc) defined in the every parameter for the property defined in calculation_type, give the customer the number of points defined in the points parameter. In other words, for every order metadata property value, give points.
|
Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio.
Available values: `PROPORTIONAL` | +| calculation_type`string` |ORDER_ITEMS_QUANTITY
: Quantity of items defined in order_items.quantity.object & .id (X points for every Y items excluding free items)
Attributes | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
quantityobject | Defines the ratio based on the property defined in the calculation_type parameter. For every set of value (1, 10, etc) defined in the every parameter for the property defined in calculation_type, give the customer the number of points defined in the points parameter. In other words, for every calculation_type, give points.
|
Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio.
Available values: `PROPORTIONAL` | +| calculation_type`string` |ORDER_ITEMS_AMOUNT; Pre-discount amount spent on items defined in the order_items.amount.object & .id (X points for every Y spent on items excluding discounts)
Available values: `ORDER_ITEMS_AMOUNT` | +| order_items`object` |Attributes | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
amountobject | Defines the ratio based on the property defined in the calculation_type parameter. For every set of value (1, 10, etc) defined in the every parameter for the property defined in calculation_type, give the customer the number of points defined in the points parameter. In other words, for every calculation_type, give points.
|
Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio.
Available values: `PROPORTIONAL` | +| calculation_type`string` |ORDER_ITEMS_SUBTOTAL_AMOUNT; Amount spent on items defined in the order_items.subtotal_amount.object & .id (X points for every Y spent on items including discounts)
Available values: `ORDER_ITEMS_SUBTOTAL_AMOUNT` | +| order_items`object` |Attributes | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
subtotal_amountobject | Defines the ratio based on the property defined in the calculation_type parameter. For every set of value (1, 10, etc) defined in the every parameter for the property defined in calculation_type, give the customer the number of points defined in the points parameter. In other words, for every calculation_type, give points.
|
Attributes | Description | ||||
---|---|---|---|---|---|
idstring | The ID of an existing customer that will be linked to redemption in this request. | ||||
source_idstring | 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_metadataobject | Object used to store system metadata information. | ||||
created_atstring | 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_atstring | 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 | ||||
assetsobject | Contains information about the customer's cockpit.
| ||||
objectstring | The type of the object represented by JSON. Available values:customer |
Customer's loyalty points minus expired for all loyalty cards which the customer has.
| +| referred_customers`integer` |Total number of customers referred by the customer.
| +| campaigns`object` |Contains campaigns with details about point balances and how many customers were referred by the customer.
Attributes | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
[propertyName]object | Contains details about the point balances left on loyalty cards and the number of referred customers in each campaign.
|
Total number of times this customer received a referral, i.e. was referred by another customer.
| +| campaigns`array` |Contains an array of campaigns that served as the source of a referral for the customer.
Array of:Attributes | Description |
---|---|
campaign_idstring | Unique campaign ID, assigned by Voucherify. Example:camp_rRsfatlwN7unSeUIJDCYedal |
referrer_idstring | Unique referrer ID, assigned by Voucherify. This is the customer ID of a customer that is referring this customer. Example:cust_sehkNIi8Uq2qQuRqSr7xn4Zi |
related_object_idstring | Related object id Example:r_0b9d4cc4aa164dd073 |
related_object_typestring | Related object type, i.e. |
datestring | Timestamp representing the date and time when the customer was referred in ISO 8601 format. Example:2022-08-30T10:19:39.196Z |
Customer's first and last name.
| +| description`string` |An arbitrary string that you can attach to a customer object.
| +| email`string` |Customer's email address.
| +| phone`string` |Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel.
| +| birthday`string` |Deprecated
. Customer's birthdate; format YYYY-MM-DD.
Customer's birthdate; format YYYY-MM-DD.
| +| address`object`, `null` |Customer's address.
Attributes | Description |
---|---|
citystring | City |
statestring | State |
line_1string | First line of address. |
line_2string | Second line of address. |
countrystring | Country. |
postal_codestring | Postal code. |
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.
| + +## Customer Summary Redemptions +| Attributes | Description | +|:-----|:--------| +| total_redeemed`integer` |Total number of redemptions made by the customer.
| +| total_failed`integer` |Total number of redemptions that failed.
| +| total_succeeded`integer` |Total number of redemptions that succeeded.
| +| total_rolled_back`integer` |Total number of redemptions that were rolled back for the customer.
| +| total_rollback_failed`integer` |Total number of redemption rollbacks that failed.
| +| total_rollback_succeeded`integer` |Total number of redemption rollbacks that succeeded.
| +| gift`object` |Summary of gift card credits.
Attributes | Description |
---|---|
redeemed_amountinteger | Total amount of gift card credits redeemed by customer. The value is multiplied by 100 to represent 2 decimal places. For example |
amount_to_gointeger | Remaining gift card balance across all gift cards. The value is multiplied by 100 to represent 2 decimal places. For example |
Summary of loyalty points.
Attributes | Description |
---|---|
redeemed_pointsinteger | Total number of loyalty points redeemed by the customer. |
points_to_gointeger | Sum of remaining available point balance across all loyalty cards. |
The total amount spent by the customer. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents
for $100.00
.
Total number of orders made by the customer.
| +| average_amount`integer` |Average amount spent on orders. total_amount
÷ total_count
. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents
for $100.00
.
Amount spent on last order. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents
for $100.00
.
Timestamp representing the date and time of the customer's last order in ISO 8601 format.
**Example:**2022-08-30T11:51:08.029Z
| + +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/CUSTOMERS-Delete-Customer-Permanently.md b/reference-docs/CUSTOMERS-Delete-Customer-Permanently.md new file mode 100644 index 00000000..944ae0e8 --- /dev/null +++ b/reference-docs/CUSTOMERS-Delete-Customer-Permanently.md @@ -0,0 +1,14 @@ +--- +title: Delete Customer Permanently +type: endpoint +categorySlug: voucherify-api +slug: customer-permanently-deletion +parentDocSlug: customers +hidden: false +order: 150 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/CUSTOMERS-Get-Customer.md b/reference-docs/CUSTOMERS-Get-Customer.md new file mode 100644 index 00000000..be590357 --- /dev/null +++ b/reference-docs/CUSTOMERS-Get-Customer.md @@ -0,0 +1,14 @@ +--- +title: Get Customer +type: endpoint +categorySlug: voucherify-api +slug: get-customer +parentDocSlug: customers +hidden: false +order: 40 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/CUSTOMERS-Import-Customers-Using-CSV.md b/reference-docs/CUSTOMERS-Import-Customers-Using-CSV.md new file mode 100644 index 00000000..4ea01b2b --- /dev/null +++ b/reference-docs/CUSTOMERS-Import-Customers-Using-CSV.md @@ -0,0 +1,14 @@ +--- +title: Import and Update Customers using CSV +type: endpoint +categorySlug: voucherify-api +slug: import-customers-using-csv +parentDocSlug: customers +hidden: false +order: 90 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/CUSTOMERS-List-Customer-Activities.md b/reference-docs/CUSTOMERS-List-Customer-Activities.md new file mode 100644 index 00000000..4ffd62a7 --- /dev/null +++ b/reference-docs/CUSTOMERS-List-Customer-Activities.md @@ -0,0 +1,14 @@ +--- +title: List Customer Activities [Deprecated] +type: endpoint +categorySlug: voucherify-api +slug: list-customer-activities +parentDocSlug: customers +hidden: false +order: 160 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/CUSTOMERS-List-Customer-Activity.md b/reference-docs/CUSTOMERS-List-Customer-Activity.md new file mode 100644 index 00000000..c9ec844e --- /dev/null +++ b/reference-docs/CUSTOMERS-List-Customer-Activity.md @@ -0,0 +1,14 @@ +--- +title: List Customer Activity +type: endpoint +categorySlug: voucherify-api +slug: list-customer-activity +parentDocSlug: customers +hidden: false +order: 50 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/CUSTOMERS-List-Customer-Redeemables.md b/reference-docs/CUSTOMERS-List-Customer-Redeemables.md new file mode 100644 index 00000000..2058799c --- /dev/null +++ b/reference-docs/CUSTOMERS-List-Customer-Redeemables.md @@ -0,0 +1,14 @@ +--- +title: List Customer Redeemables +type: endpoint +categorySlug: voucherify-api +slug: list-customer-redeemables +parentDocSlug: customers +hidden: false +order: 70 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/CUSTOMERS-List-Customer-Segments.md b/reference-docs/CUSTOMERS-List-Customer-Segments.md new file mode 100644 index 00000000..67abe0dc --- /dev/null +++ b/reference-docs/CUSTOMERS-List-Customer-Segments.md @@ -0,0 +1,14 @@ +--- +title: List Customer's Segments +type: endpoint +categorySlug: voucherify-api +slug: list-customer-segments +parentDocSlug: customers +hidden: false +order: 60 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/CUSTOMERS-List-Customers.md b/reference-docs/CUSTOMERS-List-Customers.md new file mode 100644 index 00000000..9efd4a4f --- /dev/null +++ b/reference-docs/CUSTOMERS-List-Customers.md @@ -0,0 +1,14 @@ +--- +title: List Customers +type: endpoint +categorySlug: voucherify-api +slug: list-customers +parentDocSlug: customers +hidden: false +order: 30 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/CUSTOMERS-Update-Customer.md b/reference-docs/CUSTOMERS-Update-Customer.md new file mode 100644 index 00000000..190674c3 --- /dev/null +++ b/reference-docs/CUSTOMERS-Update-Customer.md @@ -0,0 +1,14 @@ +--- +title: Update Customer +type: endpoint +categorySlug: voucherify-api +slug: update-customer +parentDocSlug: customers +hidden: false +order: 100 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/CUSTOMERS-Update-Customers-In-Bulk.md b/reference-docs/CUSTOMERS-Update-Customers-In-Bulk.md new file mode 100644 index 00000000..eddd29c5 --- /dev/null +++ b/reference-docs/CUSTOMERS-Update-Customers-In-Bulk.md @@ -0,0 +1,14 @@ +--- +title: Update Customers in bulk +type: endpoint +categorySlug: voucherify-api +slug: update-customers-in-bulk +parentDocSlug: customers +hidden: false +order: 130 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/CUSTOMERS-Update-Customers-Metadata-In-Bulk.md b/reference-docs/CUSTOMERS-Update-Customers-Metadata-In-Bulk.md new file mode 100644 index 00000000..2f506351 --- /dev/null +++ b/reference-docs/CUSTOMERS-Update-Customers-Metadata-In-Bulk.md @@ -0,0 +1,14 @@ +--- +title: Update Customers' Metadata in bulk +type: endpoint +categorySlug: voucherify-api +slug: update-customers-metadata-in-bulk +parentDocSlug: customers +hidden: false +order: 140 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/CUSTOMES-Delete-Customer.md b/reference-docs/CUSTOMES-Delete-Customer.md new file mode 100644 index 00000000..c50ea4e5 --- /dev/null +++ b/reference-docs/CUSTOMES-Delete-Customer.md @@ -0,0 +1,14 @@ +--- +title: Delete Customer +type: endpoint +categorySlug: voucherify-api +slug: delete-customer +parentDocSlug: customers +hidden: false +order: 150 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/EVENTS-Custom-Event-Object.md b/reference-docs/EVENTS-Custom-Event-Object.md new file mode 100644 index 00000000..aab1f7ad --- /dev/null +++ b/reference-docs/EVENTS-Custom-Event-Object.md @@ -0,0 +1,42 @@ +--- +title: Custom Event Object +type: basic +categorySlug: voucherify-api +parentDocSlug: events +slug: custom-event-object +hidden: false +order: 1 +--- + +## Events Create Request Body +| Attributes | Description | +|:-----|:--------| +| event`string` |Event name. This is the same name that you used to define a custom event in the Dashboard > Project Settings > Event Schema.
| +| customer |Customer's information.
[Customer](#customer) | +| referral`object` |If a conversion event for a referral program is set to a custom event, then you need to send the referral code in the payload to make a record of the conversion event.
Attributes | Description |
---|---|
codestring | A code through which a new visitor has been referred to a service. |
referrer_idstring | Unique ID of the referring person - it is optional and not required if the referral code is provided. Example:cust_Vzck5i8U3OhcEUFY6MKhN9Rv |
If an earning rule in a loyalty program is based on a custom event. This objects let's you specify the loyalty card to which the custom event should be attributed to.
Attributes | Description |
---|---|
codestring | Code of the loyalty card to receive points based on the calculation method defined in the related earning rule. An earning rule is triggered for the loyalty card when the event passed in the L-CARD-BUHuH6g |
The metadata object stores all custom attributes assigned to the event. A set of key/value pairs that you can attach to an event object. It can be useful for storing additional information about the event in a structured format. Event metadata schema is defined in the Dashboard > Project Settings > Event Schema > Edit particular event > Metadata property definition.
| + +## Customer +All of: + +1.Attributes | Description |
---|---|
idstring | The ID of an existing customer. |
source_idstring | 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. |
Customer's first and last name.
| +| description`string` |An arbitrary string that you can attach to a customer object.
| +| email`string` |Customer's email address.
| +| phone`string` |Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel.
| +| birthday`string` |Deprecated
. Customer's birthdate; format YYYY-MM-DD.
Customer's birthdate; format YYYY-MM-DD.
| +| address`object`, `null` |Customer's address.
Attributes | Description |
---|---|
citystring | City |
statestring | State |
line_1string | First line of address. |
line_2string | Second line of address. |
countrystring | Country. |
postal_codestring | Postal code. |
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.
| + +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/EVENTS-Track-Custom-Event.md b/reference-docs/EVENTS-Track-Custom-Event.md new file mode 100644 index 00000000..51f17214 --- /dev/null +++ b/reference-docs/EVENTS-Track-Custom-Event.md @@ -0,0 +1,14 @@ +--- +title: Track Custom Event +type: endpoint +categorySlug: voucherify-api +slug: track-custom-event +parentDocSlug: events +hidden: false +order: 2 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/EXPORTS-Create-Export.md b/reference-docs/EXPORTS-Create-Export.md new file mode 100644 index 00000000..211d21bf --- /dev/null +++ b/reference-docs/EXPORTS-Create-Export.md @@ -0,0 +1,14 @@ +--- +title: Create Export +type: endpoint +categorySlug: voucherify-api +slug: create-export +parentDocSlug: exports +hidden: false +order: 4 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/EXPORTS-Delete-Export.md b/reference-docs/EXPORTS-Delete-Export.md new file mode 100644 index 00000000..d9279968 --- /dev/null +++ b/reference-docs/EXPORTS-Delete-Export.md @@ -0,0 +1,14 @@ +--- +title: Delete Export +type: endpoint +categorySlug: voucherify-api +slug: delete-export +parentDocSlug: exports +hidden: false +order: 6 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/EXPORTS-Download-Export.md b/reference-docs/EXPORTS-Download-Export.md new file mode 100644 index 00000000..5ecc0290 --- /dev/null +++ b/reference-docs/EXPORTS-Download-Export.md @@ -0,0 +1,14 @@ +--- +title: Download Export +type: endpoint +categorySlug: voucherify-api +slug: download-export +parentDocSlug: exports +hidden: false +order: 5 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/EXPORTS-Export-Object.md b/reference-docs/EXPORTS-Export-Object.md new file mode 100644 index 00000000..79e00f1e --- /dev/null +++ b/reference-docs/EXPORTS-Export-Object.md @@ -0,0 +1,308 @@ +--- +title: Export Object +type: basic +categorySlug: voucherify-api +parentDocSlug: exports +slug: export-object +hidden: false +order: 1 +--- + +## Export +One of: + +[Export Voucher](#export-voucher), [Export Redemption](#export-redemption), [Export Customers](#export-customers), [Export Publication](#export-publication), [Export Orders](#export-orders), [Export Points Expiration](#export-points-expiration), [Export Vouchers Transactions](#export-vouchers-transactions) + +## Export Voucher +All of: + +1. [Export Base](#export-base) +2. [Export Vouchers](#export-vouchers) + +## Export Redemption +All of: + +1. [Export Base](#export-base) +2. [Export Redemptions](#export-redemptions) + +## Export Customers +All of: + +1. [Export Base](#export-base) +2. [Export Customers](#export-customers) + +## Export Publication +All of: + +1. [Export Base](#export-base) +2. [Export Publications](#export-publications) + +## Export Orders +All of: + +1. [Export Base](#export-base) +2. [Export Orders](#export-orders) + +## Export Points Expiration +All of: + +1. [Export Base](#export-base) +2. [Export Points Expirations](#export-points-expirations) + +## Export Vouchers Transactions +All of: + +1. [Export Base](#export-base) +2. [Export Vouchers Transactions](#export-vouchers-transactions) + +## Export Base +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique export ID.
| +| object`string` |The type of object being represented. This object stores information about the export.
Available values: `export` | +| created_at`string` |Timestamp representing the date and time when the export was scheduled in ISO 8601 format.
| +| status`string` |Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated.
Available values: `SCHEDULED`, `IN_PROGRESS`, `DONE`, `ERROR` | +| channel`string` |The channel through which the export was triggered.
| +| result`object`, `null` |Contains the URL of the CSV file.
Attributes | Description |
---|---|
urlstring | URL of the CSV file location. It contains the token used for authorization in the Download export method. |
Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the channel value is WEBSITE.
| + +## Export Vouchers +| Attributes | Description | +|:-----|:--------| +| exported_object`string` |The type of object to be exported.
Available values: `voucher` | +| parameters`object` |Attributes | Description |
---|---|
order | How the export is filtered, where the dash - preceding a sorting option means sorting in a descending order. Export Voucher Order |
fieldsarray | Array of strings containing the data in the export. These fields define the headers in the CSV file. Array of Export Voucher Fields |
filters | Filter conditions. Export Voucher Filters |
The type of object to be exported.
Available values: `redemption` | +| parameters`object` |List of available fields and filters that can be exported with an order along with the sorting order of the returned data.
Attributes | Description |
---|---|
order | How the export is filtered, where the dash - preceding a sorting option means sorting in a descending order. Export Redemption Order |
fieldsarray | Array of strings containing the data in the export. These fields define the headers in the CSV file. Array of Export Redemption Fields |
filters | Filter conditions. Export Redemption Filters |
The type of object to be exported.
Available values: `customer` | +| parameters`object` |List of available fields and filters that can be exported with an order along with the sorting order of the returned data.
Attributes | Description |
---|---|
order | How the export is filtered, where the dash - preceding a sorting option means sorting in a descending order. Export Customer Order |
fieldsarray | Array of strings containing the data in the export. These fields define the headers in the CSV file. Array of Export Customer Fields |
filters | Filter conditions. Export Customer Filters |
The type of object to be exported.
Available values: `publication` | +| parameters`object` |List of available fields and filters that can be exported with an order along with the sorting order of the returned data.
Attributes | Description |
---|---|
order | How the export is filtered, where the dash - preceding a sorting option means sorting in a descending order. Export Publication Order |
fieldsarray | Array of strings containing the data in the export. These fields define the headers in the CSV file. Array of Export Publication Fields |
filters | Filter conditions. Export Publication Filters |
The type of object to be exported.
Available values: `order` | +| parameters`object` |List of available fields and filters that can be exported with an order along with the sorting order of the returned data.
Attributes | Description |
---|---|
order | How the export is filtered, where the dash - preceding a sorting option means sorting in a descending order. Export Order Order |
fieldsarray | Array of strings containing the data in the export. These fields define the headers in the CSV file. Array of Export Order Fields |
filters | Filter conditions. Export Order Filters |
The type of object to be exported.
Available values: `points_expiration` | +| parameters`object` |List of available fields and filters that can be exported with an order along with the sorting order of the returned data.
Attributes | Description |
---|---|
order | How the export is filtered, where the dash - preceding a sorting option means sorting in a descending order. Export Points Expiration Order |
fieldsarray | Array of strings containing the data in the export. These fields define the headers in the CSV file. Array of Export Points Expiration Fields |
filters | Filter conditions. Export Points Expiration Filters |
The type of object to be exported.
Available values: `voucher_transactions` | +| parameters`object` |List of available fields and filters that can be exported with an order along with the sorting order of the returned data.
Attributes | Description |
---|---|
order | How the export is filtered, where the dash - preceding a sorting option means sorting in a descending order. Export Voucher Transactions Order |
fieldsarray | Array of strings containing the data in the export. These fields define the headers in the CSV file. Array of Export Voucher Transactions Fields |
filters | Filter conditions. Export Voucher Transactions 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.
[Junction](#junction) | +| created_at | See: [Field Conditions](#field-conditions) | +| updated_at | See: [Field Conditions](#field-conditions) | +| created_date | See: [Field Conditions](#field-conditions) | +| active | See: [Field Conditions](#field-conditions) | +| redemption_status | See: [Field Conditions](#field-conditions) | +| start_date | See: [Field Conditions](#field-conditions) | +| expiration_date | See: [Field Conditions](#field-conditions) | +| validity_day_of_week | See: [Field Conditions](#field-conditions) | +| code | See: [Field Conditions](#field-conditions) | +| categories | See: [Field Conditions](#field-conditions) | +| vouchers | See: [Field Conditions](#field-conditions) | +| holder_id | See: [Field Conditions](#field-conditions) | +| is_referral_code | See: [Field Conditions](#field-conditions) | +| published_for_customer_id | See: [Field Conditions](#field-conditions) | +| validity_timeframe | See: [Field Conditions](#field-conditions) | +| category_ids | See: [Field Conditions](#field-conditions) | +| [propertyName] | See: [Field Conditions](#field-conditions) | + +## Export Redemption Order +Available values: `-id`, `id`, `-voucher_code`, `voucher_code`, `-tracking_id`, `tracking_id`, `-customer_id`, `customer_id`, `-created_at`, `created_at` + +## Export Redemption Fields +Available values: `id`, `object`, `date`, `voucher_code`, `campaign`, `promotion_tier_id`, `customer_id`, `customer_source_id`, `customer_name`, `tracking_id`, `order_id`, `order_amount`, `gift_amount`, `loyalty_points`, `result`, `failure_code`, `failure_message`, `metadata` + +## Export Redemption Filters +| Attributes | Description | +|:-----|:--------| +| junction | See: [Junction](#junction) | +| created_at`object` |Attributes | Description | ||||||
---|---|---|---|---|---|---|---|
conditionsobject | Filters Condition
|
Attributes | Description | ||||
---|---|---|---|---|---|
conditionsobject | Filters Condition
|
Attributes | Description | ||||
---|---|---|---|---|---|
conditionsobject | Filters Condition
|
Attributes | Description | ||||
---|---|---|---|---|---|
conditionsobject | Filters Condition
|
Attributes | Description | ||||
---|---|---|---|---|---|
conditionsobject | Filters Condition
|
Attributes | Description | ||||||
---|---|---|---|---|---|---|---|
conditionsobject | Filters Condition
|
Attributes | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
conditionsobject | Filters Condition
|
Attributes | Description | ||||
---|---|---|---|---|---|
conditionsobject | Filters Condition
|
Attributes | Description | ||||||
---|---|---|---|---|---|---|---|
conditionsobject | Filters Condition
|
Attributes | Description | ||||
---|---|---|---|---|---|
conditionsobject | Filters Condition
|
Attributes | Description | ||||
---|---|---|---|---|---|
conditionsobject | Filters Condition
|
Attributes | Description | ||||
---|---|---|---|---|---|
conditionsobject | Filters Condition
|
Attributes | Description | ||||||
---|---|---|---|---|---|---|---|
conditionsobject | Filters Condition
|
Attributes | Description | ||||||
---|---|---|---|---|---|---|---|
conditionsobject | Filters Condition
|
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.
Data filters used to narrow down the data records to be returned in the result.
[Filters Condition](#filters-condition) | + +## Any +Array any of: string, string, string, number, object + +## Filters Condition +| Attributes | Description | +|:-----|:--------| +| $in | See: [Any](#any) | +| $not_in | See: [Any](#any) | +| $is | See: [Any](#any) | +| $is_days_ago | See: [Any](#any) | +| $is_days_in_future | See: [Any](#any) | +| $is_not | See: [Any](#any) | +| $has_value | See: [Any](#any) | +| $is_unknown | See: [Any](#any) | +| $contains | See: [Any](#any) | +| $not_contain | See: [Any](#any) | +| $starts_with | See: [Any](#any) | +| $ends_with | See: [Any](#any) | +| $more_than | See: [Any](#any) | +| $less_than | See: [Any](#any) | +| $more_than_ago | See: [Any](#any) | +| $less_than_ago | See: [Any](#any) | +| $more_than_future | See: [Any](#any) | +| $less_than_future | See: [Any](#any) | +| $more_than_equal | See: [Any](#any) | +| $less_than_equal | See: [Any](#any) | +| $after | See: [Any](#any) | +| $before | See: [Any](#any) | +| $count | See: [Any](#any) | +| $count_less | See: [Any](#any) | +| $count_more | See: [Any](#any) | + +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/EXPORTS-Get-Export.md b/reference-docs/EXPORTS-Get-Export.md new file mode 100644 index 00000000..3cd32423 --- /dev/null +++ b/reference-docs/EXPORTS-Get-Export.md @@ -0,0 +1,14 @@ +--- +title: Get Export +type: endpoint +categorySlug: voucherify-api +slug: get-export +parentDocSlug: exports +hidden: false +order: 3 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/EXPORTS-List-Exports.md b/reference-docs/EXPORTS-List-Exports.md new file mode 100644 index 00000000..fd23104a --- /dev/null +++ b/reference-docs/EXPORTS-List-Exports.md @@ -0,0 +1,14 @@ +--- +title: List Exports +type: endpoint +categorySlug: voucherify-api +slug: list-exports +parentDocSlug: exports +hidden: false +order: 2 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/Errors.md b/reference-docs/Errors.md new file mode 100644 index 00000000..9eb69a95 --- /dev/null +++ b/reference-docs/Errors.md @@ -0,0 +1,206 @@ +--- +title: Errors +excerpt: Learn about the errors returned to responses and how you can customize them to improve your customer experience. +categorySlug: introduction +slug: errors +type: basic +hidden: false +order: 2 +--- + +The Voucherify API uses conventional HTTP status codes to indicate success or failure. Responses with a status code starting with 4xx or 5xx can be considered as failed. The API returns errors in a JSON format in the following structure: + +```json Error structure +{ + "code": 405, + "message": "HTTP Method Not Allowed", + "details": "PUT is not supported by this endpoint. Did you mean GET or POST?" +} +``` + +> 📘 Developer-friendly API +> +> Voucherify attempts to provide a developer-friendly API, hence sometimes you can find a hint on how to fix an error right in its details (like in the example above). + + +| Attributes | Description | +|:---:|:---| +| `code` | The HTTP status code of error returned. Possible values are varients of: `2xx`, `4xx`, or `5xx`. | +| `key` | For API object errors, a short string from the list on the right hand side, describing the kind of error which occurred. | +| `message` | A human-readable message providing a short description about the error. | +| `details` | A human-readable message providing more details about the error. | + +## HTTP status code summary + +| HTTP Status Code | Text | Description | +|:---|:---|:---| +| 400 | Bad Request | The request was invalid. It may occur for various reasons - a malformed JSON or a violated rule (e.g. an attempt to redeem an expired voucher). | +| 401 | Unauthorized | Authentication has failed or has not been provided yet. | +| 402 | Payment Required | The request exceeded your current pricing plan (we send friendly reminders first). | +| 404 | Not Found | The requested resource could not be found. | +| 405 | Method Not Allowed | The request used a method (GET, POST, etc.) that is not available for a given resource. Error details include a hint on which methods are allowed. | +| 406 | Not Acceptable | The API is unable to produce a response in a format specified by the `Accept` header. In most cases the only available response format is `application/json`. | +| 415 | Unsupported Media Type | The API is unable to consume a request in a format specified by the `Content-Type` header. | +| 429 | API limit reached | Error occurs when you exceed your limit of API calls or when your subscription plan has ended. | +| 500 | Internal Server Error | An internal API error occurred. Don't worry, we track and verify all such errors and try to react as asap as possible. | + +## Error Messages + + +The table below shows a list of errors that may be returned along with a brief description of the reason why it occurs. + +> 🚧 Customize Error Messages +> A subset of the messages returned for the errors listed below can be customized in the UI. +> +> Go to **Project Settings** > Error Messages to customize an error message. Then click on *Create new translations group* to create specific error messages. [Read more here](https://support.voucherify.io/article/264-how-can-i-create-custom-errors). + +| **Error** | **Reason** | +|:---|:---| +| `already_rolled_back` | redemption was rolled back before the current operation start time | +| `customer_rules_violated` | customer did not match to the segment | +| `duplicate_resource_key` | resource identifier is in use | +| `gift_amount_exceeded` | gift amount has been exceeded | +| `invalid_add_balance_params` | balance object was specified incorrectly | +| `invalid_amount` | order amount was specified incorrectly | +| `invalid_campaign_params` | campaign object was specified incorrectly | +| `invalid_code_config` | voucher code configuration object was specified incorrectly | +| `invalid_customer` | customer object was specified incorrectly | +| `invalid_export_params` | export object was specified incorrectly | +| `invalid_gift` | gift object was specified incorrectly | +| `invalid_order` | order object was specified incorrectly | +| `invalid_payload` | a request body is invalid and cannot be processed | +| `invalid_product` | product object was specified incorrectly | +| `invalid_publish_params` | publication object was specified incorrectly | +| `invalid_query_params` | input request query parameters are invalid | +| `invalid_rollback_params` | redemption rollback object was specified incorrectly | +| `invalid_sku` | SKU object was specified incorrectly | +| `invalid_validation_rules` | validation rules object was specified incorrectly | +| `invalid_voucher` | voucher object was specified incorrectly (e.g., `gift` or `discount` is missing) | +| `loyalty_card_points_exceeded` | loyalty card points were exceeded | +| `missing_amount` | order amount was not specified | +| `missing_customer` | customer was not specified | +| `missing_order` | order is missing | +| `missing_order_items` | order items were not specified | +| `missing_order_items_amount` | missing order item's amount(s) | +| `missing_reward` | reward is missing | +| `multiple_requests` | multiple requests detected; i.e. when a redemption is in progress and a session lock is in place, then an attempt to validate the voucher will result in this error because it is unknown whether the voucher can or cannot be used | +| `no_voucher_suitable_for_publication` | lack of vouchers suitable for publication | +| `not_found` | resource with given ID/code does not exist | +| `order_rules_violated` | order did not match validation rules | +| `promotion_inactive` | promotion is inactive | +| `promotion_not_active_now` | promotion is not active in the given timeframe | +| `quantity_exceeded` | voucher's redemptions limit has been exceeded | +| `query_too_large` | request body payload too large or query string too large | +| `redemption_rules_violated` | the redemption did not match validation rules | +| `referrer_not_permitted_to_redeem` | the referral code is being redeemed by the referrer | +| `resource_not_found` | voucher with given code does not exist | +| `voucher_disabled` | voucher has been disabled (active: false) | +| `voucher_expired` | voucher has already expired (after expiration date) | +| `voucher_not_active` | voucher is not active yet (before start date) | +| `voucher_not_active_now` | voucher is not active in the given timeframe | + +## Custom error messages with Validation Rules + +Voucherify allows you to define your custom error message per Validation Rule; such message is going to be returned in API Response when validation or redemption of your promotion campaign or code fails due to not meeting requirements of that rule. +Additionally, you can specify a fallback error message that should be used when there is no error message defined for the rule. +You can define your custom error message both from the API or your Dashboard. + +The content of custom error message is going to be returned in `error` object under `message` property. +If you do not specify any error message for your Validation Rule then `error` property will not be included in the API response. + +**Example**: + +Let's assume that you create a new Validation Rule via API and would like to have a custom error message "You can't get a discount because you are not new customer" returned from API. +The second condition says that your customer who is validating a voucher is not a new one (for that, we are going to use a segment represented by ID: `seg_n3vVcU5t0m3rs4rEPr3C1oU5`). +Additionally, you wish that the customer cart must contain an iPhone (`prod_f1r5Tpr0DuC7` is our iPhone), and if not, then a fallback error message should be used: "You must buy iPhone and be our new customer to get a discount." +Let's examine how a request for creating such Validation Rule would look like, later we are also going to explore in details how API response is going to look: + +```json +{ + "name": "My validation rule", + "error": { + "message": "You must buy IPhone and be our new customer in order to get a discount" + }, + "rules": { + "1": { + "name": "customer.segment", + "conditions": { + "$is": ["seg_n3vVcU5t0m3rs4rEPr3C1oU5"] + }, + "error": { + "message": "You can't get discount because you are not a new customer" + }, + "rules": {} + }, + "2": { + "name": "product.id", + "conditions": { + "$is": [{ + "id": "prod_f1r5Tpr0DuC7" + }] + }, + "rules": {} + }, + "logic": "1 AND 2" + } +} +``` + +As you can see in request body above, there is an `error` property defined at the top level which is going to serve as a fallback. There is also an `error` message set per rule which is going to be returned in the API response when validation / redemption fail due to that specific rule. + +Let's see below how the API Response is going to look in different scenarios with validation voucher: + +**Provided required iPhone in order but the customer does not belong to required segment:** + +```json +{ + "code": "MY-TEST-CODE", + "valid": false, + "reason": "customer does not match segment rules", + "tracking_id": "track_BRR0eIl/xcEftRmZCj65AQ==", + "metadata": {}, + "error": { + "message": "You can't get discount because you are not a new customer" + } +} +``` + +**Provided customer belongs to required segment, but the iPhone was not specified in the order:** + +```json +{ + "code": "MY-TEST-CODE", + "valid": false, + "reason": "order does not match validation rules", + "tracking_id": "track_BRR0eIl/xcFGi+qDwBt2E8W3LQP5W8Np", + "metadata": {}, + "error": { + "message": "You must buy IPhone and be our new customer in order to get a discount" + } +} +``` + +**Passing both checks - providing customer who belongs to the required segment and items list with iPhone:** + +```json +{ + "code": "MY-TEST-CODE", + "valid": true, + "discount": { + "type": "AMOUNT", + "amount_off": 10000 + }, + "order": { + "object": "order", + "items": [ + { + "object": "order_item", + "product_id": "prod_f1r5Tpr0DuC7", + "quantity": 1 + } + ] + }, + "tracking_id": "track_BRR0eIl/xcFGi+qDwBt2E8W3LQP5W8Np", + "metadata": {} +} +``` diff --git a/reference-docs/Establish-Validation-Session.md b/reference-docs/Establish-Validation-Session.md new file mode 100644 index 00000000..29951b91 --- /dev/null +++ b/reference-docs/Establish-Validation-Session.md @@ -0,0 +1,10 @@ +--- +title: Establish Validation Session +categorySlug: voucherify-api +parentDocSlug: validations +slug: establish-validation-session +type: link +hidden: true +order: 22 +link_url: https://docs.voucherify.io/docs/locking-validation-session +--- diff --git a/reference-docs/Fetching-Data.md b/reference-docs/Fetching-Data.md new file mode 100644 index 00000000..71443095 --- /dev/null +++ b/reference-docs/Fetching-Data.md @@ -0,0 +1,268 @@ +--- +title: Fetching Data +excerpt: Learn how to specify the data you would like to fetch. +categorySlug: introduction +slug: listing +type: basic +hidden: false +order: 4 +--- + +All top-level API resources have support for fetches via **list** API methods. For instance, you can list redemptions, list publications, list customers, list products, and more. + +These list API methods share a common structure, using at least these _query parameters_: `limit` and `created_at`. + +| **Parameter name** | **Description** | +| :----------------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `limit` | A limit on the number of objects to be returned; between 1 and 100. | +| `created_at` | A filter on the list based on the object `created_at` field.Unique location ID, assigned by the Voucherify API.
**Example:**loc_NoMGXmHO9OUs7iz9mGWpamma
| +| object`string` |The type of the object represented by JSON. This object stores information about a location
.
Location name.
| +| shape`object` |Defines the shape and boundaries of the location.
One of: [Circle](#circle), [Polygon](#polygon) | +| created_at`string` |Timestamp representing the date and time when the location was created. The value is shown in the ISO 8601 format.
**Example:**2022-02-14T15:12:06.817Z
| +| updated_at`string`, `null` |Timestamp representing the date and time when the location was updated. The value is shown in the ISO 8601 format.
**Example:**2022-03-14T15:12:06.817Z
| + +## Circle +| Attributes | Description | +|:-----|:--------| +| type`string` |The type of shape being defined is a circle
.
The location is defined in terms of a distance
object.
Defines the parameters for the circle.
Attributes | Description |
---|---|
centerstring | Center of the circle identified by GPS coordinates in decimal degrees. Example:geo:40.79372699823857,-74.15092132694554 |
radiusstring | Defines the radius of the circle. |
The type of shape being defined is a polygon
.
The location is defined in terms of a geojson
object.
Type of geojson coordinates, i.e. Polygon
.
Type of geojson coordinates, i.e. MultiPolygon
.
Attributes | Description |
---|---|
validation_rule_idstring , null | A unique validation rule identifier assigned by the Voucherify API. The validation rule is verified before points are added to the balance. |
updated_atstring , null | Timestamp representing the date and time when the earning rule was last updated in ISO 8601 format. |
activeboolean | A flag to toggle the earning rule on or off. You can disable an earning rule even though it's within the active period defined by the start_date and expiration_date of the campaign or the earning rule's own start_date and expiration_date.
|
Assigned by the Voucherify API, identifies the earning rule object.
| +| created_at`string` |Timestamp representing the date and time when the earning rule was created. The value is shown in the ISO 8601 format.
| +| loyalty | One of: [Define fixed amount of points](#define-fixed-amount-of-points), [Calculate points proportionally](#calculate-points-proportionally) | +| event |Defines the event which triggers the earning rule to add points to a loyalty card.
[Earning Rule Event](#earning-rule-event) | +| custom_event`object` |Contains details about the custom event.
Attributes | Description |
---|---|
schema_idstring | Unique identifier of the custom event schema |
Contains the ID of a customer segment. Required for the customer.segment.entered
option in the event.
Attributes | Description |
---|---|
idstring | Contains a unique identifier of a customer segment. Assigned by the Voucherify API. |
Defines the tier associated with the earning rule definition.
Attributes | Description |
---|---|
idstring | Unique loyalty tier ID associated with the earning rule.
ltr_pudTGWasuIqxdiDM0go31OV1 |
Defines the configuration for pending points. Pending points can be used only with the order.paid
event.
Attributes | Description |
---|---|
period_typestring | Defines the type of the period during which the points are in the pending state. Currently, only DAY |
period_valueinteger | Defines for how long the points are in the pending state. The minimum value is 1, maximum is 90. |
Contains the custom earning rule name and parent campaign.
Attributes | Description |
---|---|
bannerstring | Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard. |
object_idstring | A unique campaign identifier assigned by the Voucherify API. |
object_typestring | Defines the object associated with the earning rule. Defaults to campaign |
The type of the object represented by JSON. Default is earning_rule.
Available values: `earning_rule` | +| automation_id`string` |For internal use by Voucherify.
| +| start_date`string` |Start date defines when the earning rule starts to be active. Activation timestamp is presented in the ISO 8601 format. The earning rule is inactive before this date. If you do not define the start date for an earning rule, it will inherit the campaign start date by default.
| +| expiration_date`string` |Expiration date defines when the earning rule expires. Expiration timestamp is presented in the ISO 8601 format. The earning rule is inactive after this date. If you do not define the expiration date for an earning rule, it will inherit the campaign expiration date by default.
| +| validity_timeframe | See: [Validity Timeframe](#validity-timeframe) | +| validity_day_of_week | See: [Validity Day Of Week](#validity-day-of-week) | +| validity_hours | See: [Validity Hours](#validity-hours) | +| metadata`object` |The metadata object stores all custom attributes assigned to the earning rule. A set of key/value pairs that you can attach to an earning rule object. It can be useful for storing additional information about the earning rule in a structured format.
| +| expiration_rules | See: [Earning Rule Expiration Rules](#earning-rule-expiration-rules) | + +## Define fixed amount of points +| Attributes | Description | +|:-----|:--------| +| type`string` |The number of points to be added to the loyalty card.
Available values: `FIXED` | +| points`integer` |Defines how the points will be added to the loyalty card. FIXED adds a fixed number of points.
| + +## Calculate points proportionally +One of: + +[Define amount of points proportional to the order](#define-amount-of-points-proportional-to-the-order), [Define amount of points proportional to order items](#define-amount-of-points-proportional-to-order-items), [Define amount of points proportional to customer metadata](#define-amount-of-points-proportional-to-customer-metadata), [Earning Rule Proportional Custom Event](#earning-rule-proportional-custom-event) + +## Earning Rule Event + + +## Validity Timeframe +| Attributes | Description | +|:-----|:--------| +| duration`string` |Defines the amount of time an earning rule will be active in ISO 8601 format. For example, an earning rule with a duration
of PT1H
will be valid for a duration of one hour.
PT1H
| +| interval`string` |Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, an earning rule with an interval
of P2D
will be valid every other day.
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
SaturdayDefines the reccuring period(s) when the resource is active. The periods should not overlap.
Array of:Attributes | Description |
---|---|
start_timestring | Defines the starting hour of validity in the HH:mm format. The resource is inactive before this time. Example:12:00 |
days_of_weekarray | Integer array corresponding to the particular days of the week in which the resource is valid.
|
expiration_timestring | Defines the ending hour of validity in the HH:mm format. The resource is inactive after this time. Example:14:00 |
Type of period. Can be set for MONTH
or FIXED_DAY_OF_YEAR
. MONTH
requires the period_value
field. FIXED_DAY_OF_YEAR
requires the fixed_month
and fixed_day
fields.
Value of the period. Required for the period_type: MONTH
.
Type of rounding of the expiration period. Optional for the period_type: MONTH
.
Value of rounding of the expiration period. Required for the rounding_type
.
Determines the month when the points expire; 1
is January, 2
is February, and so on. Required for the period_type: FIXED_DAY_OF_YEAR
.
Determines the day of the month when the points expire. Required for the period_type: FIXED_DAY_OF_YEAR
.
Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio.
Available values: `PROPORTIONAL` | +| calculation_type`string` |CUSTOMER_METADATA: Customer Metadata (X points for every Y in metadata attribute, defined in the property key under the customer.metadata object)
Available values: `CUSTOMER_METADATA` | +| customer`object` |Attributes | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
metadataobject | Defines the ratio based on the property defined in the calculation_type parameter. For every given increment of value (1, 10, etc) defined in the every parameter for the property defined in calculation_type, give the customer the number of points defined in the points parameter. In other words, for every order metadata property value, give points.
|
Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio.
Available values: `PROPORTIONAL` | +| calculation_type`string` |CUSTOM_EVENT_METADATA: Custom event metadata (X points for every Y in metadata attribute).
Available values: `CUSTOM_EVENT_METADATA` | +| custom_event`object` |Attributes | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
metadataobject | Defines the ratio based on the property defined in the calculation_type parameter. For every given increment of value (1, 10, etc) defined in the every parameter for the property defined in calculation_type, give the customer the number of points defined in the points parameter. In other words, for every order metadata property value, give points.
|
Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio.
Available values: `PROPORTIONAL` | +| calculation_type`string` |ORDER_AMOUNT
: Pre-discount order amount (X points for every Y spent excluding discounts)
Attributes | Description | ||||||
---|---|---|---|---|---|---|---|
amountobject | Defines the ratio based on the property defined in the calculation_type parameter. For every set of value (1, 10, etc) defined in the every parameter for the property defined in calculation_type, give the customer the number of points defined in the points parameter. In other words, for every calculation_type, give points.
|
Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio.
Available values: `PROPORTIONAL` | +| calculation_type`string` |ORDER_TOTAL_AMOUNT
: Total order amount (X points for every Y spent including discount)
Attributes | Description | ||||||
---|---|---|---|---|---|---|---|
total_amountobject | Defines the ratio based on the property defined in the calculation_type parameter. For every set of value (1, 10, etc) defined in the every parameter for the property defined in calculation_type, give the customer the number of points defined in the points parameter. In other words, for every calculation_type, give points.
|
Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio.
Available values: `PROPORTIONAL` | +| calculation_type`string` |ORDER_METADATA
: Order Metadata (X points for every Y in metadata attribute, defined in the property key under the order.metadata object)
Defines the formula for calculating points proportionally.
Attributes | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
metadataobject | Defines the ratio based on the property defined in the calculation_type parameter. For every given increment of value (1, 10, etc) defined in the every parameter for the property defined in calculation_type, give the customer the number of points defined in the points parameter. In other words, for every order metadata property value, give points.
|
Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio.
Available values: `PROPORTIONAL` | +| calculation_type`string` |ORDER_ITEMS_QUANTITY
: Quantity of items defined in order_items.quantity.object & .id (X points for every Y items excluding free items)
Attributes | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
quantityobject | Defines the ratio based on the property defined in the calculation_type parameter. For every set of value (1, 10, etc) defined in the every parameter for the property defined in calculation_type, give the customer the number of points defined in the points parameter. In other words, for every calculation_type, give points.
|
Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio.
Available values: `PROPORTIONAL` | +| calculation_type`string` |ORDER_ITEMS_AMOUNT; Pre-discount amount spent on items defined in the order_items.amount.object & .id (X points for every Y spent on items excluding discounts)
Available values: `ORDER_ITEMS_AMOUNT` | +| order_items`object` |Attributes | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
amountobject | Defines the ratio based on the property defined in the calculation_type parameter. For every set of value (1, 10, etc) defined in the every parameter for the property defined in calculation_type, give the customer the number of points defined in the points parameter. In other words, for every calculation_type, give points.
|
Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio.
Available values: `PROPORTIONAL` | +| calculation_type`string` |ORDER_ITEMS_SUBTOTAL_AMOUNT; Amount spent on items defined in the order_items.subtotal_amount.object & .id (X points for every Y spent on items including discounts)
Available values: `ORDER_ITEMS_SUBTOTAL_AMOUNT` | +| order_items`object` |Attributes | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
subtotal_amountobject | Defines the ratio based on the property defined in the calculation_type parameter. For every set of value (1, 10, etc) defined in the every parameter for the property defined in calculation_type, give the customer the number of points defined in the points parameter. In other words, for every calculation_type, give points.
|
Unique campaign ID, assigned by Voucherify.
**Example:**camp_f7fBbQxUuTN7dI7tGOo5XMDA
| +| name`string` |Loyalty campaign name.
| +| campaign_type`string` |Type of campaign.
Available values: `LOYALTY_PROGRAM` | +| type`string` |Defines whether the campaign can be updated with new vouchers after campaign creation.
AUTO_UPDATE
: the campaign is dynamic, i.e. vouchers will generate based on set criteriaSTATIC
: vouchers need to be manually publishedIndicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled.
| +| join_once`boolean` |If this value is set to true
, customers will be able to join the campaign only once.
Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema.
| +| start_date`string` |Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is inactive before this date.
**Example:**2022-09-20T00:00:00.000Z
| +| expiration_date`string` |Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is inactive after this date.
**Example:**2022-09-30T00:00:00.000Z
| +| validity_timeframe | See: [Validity Timeframe](#validity-timeframe) | +| validity_day_of_week | See: [Validity Day Of Week](#validity-day-of-week) | +| validity_hours | See: [Validity Hours](#validity-hours) | +| activity_duration_after_publishing`string` |Defines the amount of time the vouchers will be active after publishing. The value is shown in the ISO 8601 format. For example, a voucher with the value of P24D will be valid for a duration of 24 days.
| +| description`string` |An optional field to keep any extra textual information about the campaign such as a campaign description and details.
| +| vouchers_count`integer` |Total number of unique vouchers in campaign.
| +| active`boolean` |A flag to toggle the campaign on or off. You can disable a campaign even though it's within the active period defined by the start_date
and expiration_date
.
true
indicates an active campaignfalse
indicates an inactive campaignThe metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.
| +| created_at`string` |Timestamp representing the date and time when the campaign was created. The value is shown in the ISO 8601 format.
**Example:**2021-12-01T08:00:50.038Z
| +| updated_at`string` |Timestamp representing the date and time when the voucher was updated. The value is shown in the ISO 8601 format.
**Example:**2022-09-20T09:18:19.623Z
| +| creation_status`string` |Indicates the status of the campaign creation.
Available values: `DONE`, `IN_PROGRESS`, `FAILED`, `DRAFT`, `MODIFYING` | +| vouchers_generation_status`string` |Indicates the status of the campaign's vouchers.
Available values: `DONE`, `IN_PROGRESS`, `FAILED`, `DRAFT` | +| protected`boolean` |Indicates whether the resource can be deleted.
| +| access_settings_assignments | See: [Access Settings Campaign Assignments List](#access-settings-campaign-assignments-list) | +| category_id`string` |Unique category ID that this campaign belongs to.
**Example:**cat_0b688929a2476386a7
| +| categories | See: [Category](#category) | +| loyalty_tiers_expiration`object` |Defines the expiration mechanism for loyalty tiers.
One of: [Balance](#balance), [Points in Period](#points-in-period) | +| object`string` |The type of the object represented by JSON. This object stores information about the campaign.
| + +## Loyalty Card +| Attributes | Description | +|:-----|:--------| +| type`string` |Type of voucher.
| +| loyalty_card`object` |Defines the loyalty card details.
Attributes | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
pointsinteger | Initial loyalty card income in points to be applied to the loyalty card at voucher generation. | ||||||||
expiration_rulesobject | Defines point expiration rules.
|
Defines the redemption limits on vouchers.
Attributes | Description |
---|---|
quantityinteger | How many times a voucher can be redeemed. A |
Defines code's pattern (prefix, suffix, length, charset, etc).
Attributes | Description |
---|---|
lengthstring | Number of characters in a generated code (excluding prefix and postfix). |
charsetstring | Characters that can appear in the code. Examples:
|
prefixstring | A text appended before the code. |
postfixstring | A text appended after the code. |
patternstring | A pattern for codes where hashes (#) will be replaced with random characters. Overrides |
Flag indicating whether this voucher is a referral code; true
for campaign type REFERRAL_PROGRAM
.
Defines the amount of time an earning rule will be active in ISO 8601 format. For example, an earning rule with a duration
of PT1H
will be valid for a duration of one hour.
PT1H
| +| interval`string` |Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, an earning rule with an interval
of P2D
will be valid every other day.
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
SaturdayDefines the reccuring period(s) when the resource is active. The periods should not overlap.
Array of:Attributes | Description |
---|---|
start_timestring | Defines the starting hour of validity in the HH:mm format. The resource is inactive before this time. Example:12:00 |
days_of_weekarray | Integer array corresponding to the particular days of the week in which the resource is valid.
|
expiration_timestring | Defines the ending hour of validity in the HH:mm format. The resource is inactive after this time. Example:14:00 |
The type of the object represented by JSON. Default is list
. This object stores information about campaign assignments to areas and stores
Identifies the name of the attribute that contains the array of campaign assignments.
Available values: `data` | +| data`array` |Contains an array of campaign assignments.
Array of [Areas and Stores Campain Assignment](#areas-and-stores-campain-assignment) | +| total`integer` |Total number of areas and stores to which the campaign is assigned.
| + +## Category +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique category ID assigned by Voucherify.
| +| name`string` |Category name.
| +| hierarchy`integer` |Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value.
| +| object`string` |The type of the object represented by the JSON. This object stores information about the category.
Available values: `category` | +| created_at`string` |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_at`string` |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
| + +## Balance +| Attributes | Description | +|:-----|:--------| +| qualification_type`string` |Tier qualification.
BALANCE
: Points balance is based on the customer's current points balance. Customers qualify for the tier if their points balance is in the points range of the tier.
Defines the conditions for the start date of the tier.
Attributes | Description |
---|---|
typestring | What triggers the tier to be valid for a customer. IMMEDIATE |
Defines the conditions for the expiration date of a tier.
One of: [Balance Drop](#balance-drop), [Custom](#custom) | + +## Points in Period +| Attributes | Description | +|:-----|:--------| +| qualification_type`string` |Tier qualification.
POINTS_IN_PERIOD
: A customer qualifies for the tier only if the sum of the accumulated points in a defined time interval reaches the tier threshold.
Customers can qualify for the tier if they collected enough points in a given time period. So, in addition to the customer having to reach a points range, they also need to have collected the points within a set time period.
Period | Definition |
---|---|
Calendar Month | Points collected in one calendar month January, February, March, etc. |
Calendar Quarter | Points collected in the quarter - January - March - April - June - July - September - October - December |
Calendar Half-year | Points collected in the half-year - January - June - July - December |
Calendar Year | Points collected in one calendar year January - December |
Defines the conditions for the start date of the tier.
Attributes | Description |
---|---|
typestring | What triggers the tier to be valid for a customer. IMMEDIATE , NEXT_PERIOD |
Defines the conditions for the expiration date of a tier.
Attributes | Description |
---|---|
typestring | What triggers the tier to expire for a customer. END_OF_PERIOD , END_OF_NEXT_PERIOD |
extendstring | Extend the expiration by adding extra months or days in ISO 8601 format. The tier will remain active even though it reaches its expiration time period. For example, a tier with a duration of |
Unique identifier of the campaign assignment.
**Example:**arsca_0ef5ee192117ae2416
| +| area_id`string` |Unique identifier of the area to which the campaign is assigned.
**Example:**ar_0ea6cd7b781b8f857f
| +| all_stores`boolean` |Determines if the campaign is assigned to all of the stores in the area, i.e. if an area ID is passed in the access_settings.assign.area_all_stores_ids
in the request.
Unique identifier of the store to which the campaign is assigned.
**Example:**ars_0ec347e2016bed85f4
| +| created_at`string` |Date and time when the assignment was made. The value is shown in the ISO 8601 format.
**Example:**2024-06-25T19:04:16.260Z
| +| object`string` |The type of the object represented by JSON. This object stores information about the campaign assignment to areas or stores.
Available values: `area_store_campaign_assignment` | + +## Balance Drop +| Attributes | Description | +|:-----|:--------| +| type`string` |What triggers the tier to expire for a customer.BALANCE_DROP
: Tier expires when the points balance drops below the required range of the tier.
What triggers the tier to expire for a customer.CUSTOM
: Tier expires after a certain time period passes following the instance the points balance drops below the required range of the tier.
Defines the amount of time the tier will remain active in ISO 8601 format. The expiration date counter starts at the moment when the customer reaches the minimum required points that are required to be in the tier. For example, a tier with a duration of P3M will be valid for a duration of 3 months.
| +| rounding |Defines the rounding mechanism for tier expiration.
One of: [Calendar Periods](#calendar-periods), [Specific Month](#specific-month) | + +## Calendar Periods +| Attributes | Description | +|:-----|:--------| +| type`string` |Period to which the expiration will be rounded to.
MONTH
: The expiration date will be rounded to the end of the month.QUARTER
: The expiration date will be rounded to the end of the quarter.HALF_YEAR
: The expiration date will be rounded to the half year.YEAR
: The expiration date will be rounded to the end of the year.Which portion of the given period should the rounding be applied to.
Available values: `END` | + +## Specific Month +| Attributes | Description | +|:-----|:--------| +| type`string` |This mechanism describes a custom rounding for the expiration date.
Available values: `CUSTOM` | +| strategy`string` |Which portion of the given period should the rounding be applied to.
Available values: `END` | +| unit`string` |Defines the type of unit of time in which the rounding period is counted.
Available values: `MONTH` | +| value`integer` |Value for the unit of time that the rounding applies to. Units for this parameter are defined by the rounding.unit
parameter.
0
: January1
: February2
: March3
: April4
: May5
: June6
: July7
: August8
: September9
: October10
: November11
: DecemberAssigned by the Voucherify API, identifies the voucher.
**Example:**v_mkZN9v7vjYUadXnHrMza8W5c34fE5KiV
| +| code`string` |A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters.
**Example:**WVPblOYX
| +| campaign`string` |A unique campaign name, identifies the voucher's parent campaign.
**Example:**Loyalty Card Campaign
| +| campaign_id`string` |Assigned by the Voucherify API, identifies the voucher's parent campaign.
**Example:**camp_FNYR4jhqZBM9xTptxDGgeNBV
| +| category`string` |Tag defining the category that this voucher belongs to.
| +| category_id`string` |Unique category ID assigned by Voucherify.
**Example:**cat_0bb343dee3cdb5ec0c
| +| categories`array` |Contains details about the category.
Array of [Category](#category) | +| type`string` |Defines the type of the voucher.
Available values: `LOYALTY_CARD` | +| discount`object`, `null` |Object representing discount parameters. Child attributes are present only if type
is DISCOUNT_VOUCHER
. Defaults to null
.
Object representing gift parameters. Child attributes are present only if type
is GIFT_VOUCHER
. Defaults to null
.
Object representing loyalty card parameters. Child attributes are present only if type
is LOYALTY_CARD
.
Attributes | Description |
---|---|
pointsinteger | Total number of points added to the loyalty card over its lifespan. Example:7000 |
balanceinteger | Points available for reward redemption. This is calculated as follows: 6970 |
next_expiration_datestring | The next closest date when the next set of points are due to expire. Example:2023-05-30 |
next_expiration_pointsinteger | The amount of points that are set to expire next. |
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_date`string` |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-timeframe) | +| validity_day_of_week | See: [Validity Day Of Week](#validity-day-of-week) | +| validity_hours | See: [Validity Hours](#validity-hours) | +| active`boolean` |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 start_date
and expiration_date
.
true
indicates an active voucherfalse
indicates an inactive voucherAn optional field to keep any extra textual information about the code such as a code description and details.
| +| metadata`object` |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`object` |Stores links to images of QR and barcode that correspond to an encrypted voucher code.
Attributes | Description | ||||||
---|---|---|---|---|---|---|---|
qrobject | Stores Quick Response (QR) representation of encrypted code.
| ||||||
barcodeobject | Stores barcode representation of encrypted code.
|
Flag indicating whether this voucher is a referral code; true
for campaign type REFERRAL_PROGRAM
.
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_at`string` |Timestamp representing the date and time when the voucher was last updated in ISO 8601 format.
**Example:**2021-12-22T10:14:45.316Z
| +| holder_id`string` |Unique customer identifier of the redeemable holder. It equals to the customer ID assigned by Voucherify.
**Example:**cust_eWgXlBBiY6THFRJwX45Iakv4
| +| redemption`object` |Stores a summary of redemptions that have been applied to the voucher.
Attributes | Description |
---|---|
quantityinteger | How many times a voucher can be redeemed. A |
redeemed_quantityinteger | How many times a voucher has already been redeemed. Example:1 |
redeemed_pointsinteger | Total loyalty points redeemed. Example:100000 |
objectstring | The type of the object represented is by default |
urlstring | The endpoint where this list of redemptions can be accessed using a GET method. /v1/vouchers/WVPblOYX/redemptions?page=1&limit=10 |
This object stores a summary of publish events: an events counter and an endpoint which can be called to return details of each event. A publication is required for loyalty cards and referral codes. This object gets updated whenever a voucher has been published. Publication means assigning a code to a particular customer. Typically, a publication is made by distributing your codes to your customers, e.g. through Export to MailChimp or publish voucher API method.
Required | Optional |
---|---|
type :LOYALTY_CARD | type :DISCOUNT_VOUCHER |
is_referral_code :true | type :GIFT_VOUCHER |
Attributes | Description |
---|---|
objectstring | The type of the object represented is by default |
countinteger | Publication events counter. Example:0 |
urlstring | The endpoint where this list of publications can be accessed using a GET method. /v1/vouchers/WVPblOYX/publications?page=1&limit=10 |
The type of the object represented by JSON. Default is voucher
.
Unique category ID assigned by Voucherify.
| +| name`string` |Category name.
| +| hierarchy`integer` |Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value.
| +| object`string` |The type of the object represented by the JSON. This object stores information about the category.
Available values: `category` | +| created_at`string` |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_at`string` |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
| + +## Validity Timeframe +| Attributes | Description | +|:-----|:--------| +| duration`string` |Defines the amount of time an earning rule will be active in ISO 8601 format. For example, an earning rule with a duration
of PT1H
will be valid for a duration of one hour.
PT1H
| +| interval`string` |Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, an earning rule with an interval
of P2D
will be valid every other day.
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
SaturdayDefines the reccuring period(s) when the resource is active. The periods should not overlap.
Array of:Attributes | Description |
---|---|
start_timestring | Defines the starting hour of validity in the HH:mm format. The resource is inactive before this time. Example:12:00 |
days_of_weekarray | Integer array corresponding to the particular days of the week in which the resource is valid.
|
expiration_timestring | Defines the ending hour of validity in the HH:mm format. The resource is inactive after this time. Example:14:00 |
Attributes | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
idstring | Unique loyalty tier ID. | ||||||||||
campaign_idstring | Unique parent campaign ID. | ||||||||||
metadataobject , null | The metadata object stores all custom attributes assigned to the loyalty tier. A set of key/value pairs that you can attach to a loyalty tier object. It can be useful for storing additional information about the loyalty tier in a structured format. | ||||||||||
created_atstring | Timestamp representing the date and time when the loyalty tier was created. The value is shown in the ISO 8601 format. | ||||||||||
updated_atstring , null | Timestamp representing the date and time when the loyalty tier was updated. The value is shown in the ISO 8601 format. | ||||||||||
configobject | Defines loyalty tier range in points.
| ||||||||||
expiration | See: Loyalty Tier Expiration | ||||||||||
objectstring | The type of the object represented by JSON. This object stores information about the loyalty. Available values:loyalty_tier |
Loyalty Tier name.
| +| earning_rules`object` |Contains a list of earning rule IDs and their points mapping for the given earning rule.
Attributes | Description |
---|---|
[propertyName] | See: MappingPoints |
Contains a list of reward IDs and their points mapping for the given reward.
Attributes | Description |
---|---|
[propertyName] | See: MappingPoints |
Defines range of loyalty tier in points.
Attributes | Description |
---|---|
frominteger | Bottom points threshold value. |
tointeger | Top points threshold value. |
Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify.
**Example:**cust_7iUa6ICKyU6gH40dBU25kQU1
| +| campaign_id`string` |Unique campaign ID, assigned by Voucherify.
**Example:**camp_rRsfatlwN7unSeUIJDCYedal
| +| tier_id`string` |Unique tier ID, assigned by Voucherify.
| +| start_date`string` |Activation timestamp defines when the loyalty tier starts to be active in ISO 8601 format. Loyalty tier is inactive before this date.
| +| expiration_date`string` |Expiration timestamp defines when the loyalty tier expires in ISO 8601 format. Loyalty tier is inactive after this date.
| +| created_at`string` |Timestamp representing the date and time when the loyalty tier was created. The value is shown in the ISO 8601 format.
**Example:**2021-12-22T10:13:06.487Z
| +| updated_at`string` |Timestamp representing the date and time when the loyalty tier was updated. The value is shown in the ISO 8601 format.
**Example:**2021-12-22T10:13:06.487Z
| + +## MappingPoints +One of: + +[MappingMultiply](#mappingmultiply), [MappingFixed](#mappingfixed) + +## MappingMultiply +| Attributes | Description | +|:-----|:--------| +| type`string` |Type of calculation.
Available values: `MULTIPLY` | +| multiplier`number` |Multiplication factor used to multiply the points to obtain the mapped points.
| + +## MappingFixed +| Attributes | Description | +|:-----|:--------| +| type`string` |Type of calculation.
Available values: `CUSTOM` | +| points`integer` |Fixed number of points to be applied.
| + +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/LOYALTIES-Redeem-Reward.md b/reference-docs/LOYALTIES-Redeem-Reward.md new file mode 100644 index 00000000..1d87729e --- /dev/null +++ b/reference-docs/LOYALTIES-Redeem-Reward.md @@ -0,0 +1,14 @@ +--- +title: Redeem Reward +type: endpoint +categorySlug: voucherify-api +slug: redeem-reward +parentDocSlug: loyalties +hidden: false +order: 340 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-Reedem-Reward-1.md b/reference-docs/LOYALTIES-Reedem-Reward-1.md new file mode 100644 index 00000000..1ac98349 --- /dev/null +++ b/reference-docs/LOYALTIES-Reedem-Reward-1.md @@ -0,0 +1,14 @@ +--- +title: Redeem Reward +type: endpoint +categorySlug: voucherify-api +slug: redeem-reward-1 +parentDocSlug: loyalties +hidden: false +order: 350 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-Transfer-Loyalty-Points.md b/reference-docs/LOYALTIES-Transfer-Loyalty-Points.md new file mode 100644 index 00000000..1e1c4fdb --- /dev/null +++ b/reference-docs/LOYALTIES-Transfer-Loyalty-Points.md @@ -0,0 +1,14 @@ +--- +title: Transfer Points +type: endpoint +categorySlug: voucherify-api +slug: transfer-points +parentDocSlug: loyalties +hidden: false +order: 180 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-Update-Earning-Rule.md b/reference-docs/LOYALTIES-Update-Earning-Rule.md new file mode 100644 index 00000000..a0c6adee --- /dev/null +++ b/reference-docs/LOYALTIES-Update-Earning-Rule.md @@ -0,0 +1,14 @@ +--- +title: Update Earning Rule +type: endpoint +categorySlug: voucherify-api +slug: update-earning-rule +parentDocSlug: loyalties +hidden: false +order: 280 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-Update-Loyalty-Campaign.md b/reference-docs/LOYALTIES-Update-Loyalty-Campaign.md new file mode 100644 index 00000000..caff46c2 --- /dev/null +++ b/reference-docs/LOYALTIES-Update-Loyalty-Campaign.md @@ -0,0 +1,14 @@ +--- +title: Update Loyalty Campaign +type: endpoint +categorySlug: voucherify-api +slug: update-loyalty-program +parentDocSlug: loyalties +hidden: false +order: 80 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-Update-Reward-Assignment-1.md b/reference-docs/LOYALTIES-Update-Reward-Assignment-1.md new file mode 100644 index 00000000..7e87fd1b --- /dev/null +++ b/reference-docs/LOYALTIES-Update-Reward-Assignment-1.md @@ -0,0 +1,14 @@ +--- +title: Update Reward Assignment +type: endpoint +categorySlug: voucherify-api +slug: update-reward-assignment-1 +parentDocSlug: loyalties +hidden: false +order: 410 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/MANAGEMENT-Assign-User.md b/reference-docs/MANAGEMENT-Assign-User.md new file mode 100644 index 00000000..dbc75953 --- /dev/null +++ b/reference-docs/MANAGEMENT-Assign-User.md @@ -0,0 +1,14 @@ +--- +title: Assign User +type: endpoint +categorySlug: voucherify-api +slug: assign-user +parentDocSlug: management +hidden: false +order: 60 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/MANAGEMENT-Copy-Campaign-Template.md b/reference-docs/MANAGEMENT-Copy-Campaign-Template.md new file mode 100644 index 00000000..7fb02ad7 --- /dev/null +++ b/reference-docs/MANAGEMENT-Copy-Campaign-Template.md @@ -0,0 +1,14 @@ +--- +title: Copy Campaign Template +type: endpoint +categorySlug: voucherify-api +slug: management-copy-campaign-template +parentDocSlug: management +hidden: false +order: 370 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/MANAGEMENT-Create-Brand.md b/reference-docs/MANAGEMENT-Create-Brand.md new file mode 100644 index 00000000..1f194546 --- /dev/null +++ b/reference-docs/MANAGEMENT-Create-Brand.md @@ -0,0 +1,14 @@ +--- +title: Create Brand +type: endpoint +categorySlug: voucherify-api +slug: create-brand +parentDocSlug: management +hidden: false +order: 310 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/MANAGEMENT-Create-Custom-Event-Schema.md b/reference-docs/MANAGEMENT-Create-Custom-Event-Schema.md new file mode 100644 index 00000000..8b3c545d --- /dev/null +++ b/reference-docs/MANAGEMENT-Create-Custom-Event-Schema.md @@ -0,0 +1,14 @@ +--- +title: Create Custom Event Schema +type: endpoint +categorySlug: voucherify-api +slug: create-custom-event-schema +parentDocSlug: management +hidden: false +order: 160 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/MANAGEMENT-Create-Metadata-Schema.md b/reference-docs/MANAGEMENT-Create-Metadata-Schema.md new file mode 100644 index 00000000..91b01c40 --- /dev/null +++ b/reference-docs/MANAGEMENT-Create-Metadata-Schema.md @@ -0,0 +1,14 @@ +--- +title: Create Metadata Schema +type: endpoint +categorySlug: voucherify-api +slug: create-metadata-schema +parentDocSlug: management +hidden: false +order: 110 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/MANAGEMENT-Create-Project.md b/reference-docs/MANAGEMENT-Create-Project.md new file mode 100644 index 00000000..20bff6d1 --- /dev/null +++ b/reference-docs/MANAGEMENT-Create-Project.md @@ -0,0 +1,14 @@ +--- +title: Create Project +type: endpoint +categorySlug: voucherify-api +slug: create-project +parentDocSlug: management +hidden: false +order: 10 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/MANAGEMENT-Create-Stacking-Rules.md b/reference-docs/MANAGEMENT-Create-Stacking-Rules.md new file mode 100644 index 00000000..b6571cf0 --- /dev/null +++ b/reference-docs/MANAGEMENT-Create-Stacking-Rules.md @@ -0,0 +1,14 @@ +--- +title: Create Stacking Rules +type: endpoint +categorySlug: voucherify-api +slug: create-stacking-rules +parentDocSlug: management +hidden: false +order: 210 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/MANAGEMENT-Create-Webhook.md b/reference-docs/MANAGEMENT-Create-Webhook.md new file mode 100644 index 00000000..e53e6730 --- /dev/null +++ b/reference-docs/MANAGEMENT-Create-Webhook.md @@ -0,0 +1,14 @@ +--- +title: Create Webhook +type: endpoint +categorySlug: voucherify-api +slug: create-webhook +parentDocSlug: management +hidden: false +order: 260 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/MANAGEMENT-Delete-Brand.md b/reference-docs/MANAGEMENT-Delete-Brand.md new file mode 100644 index 00000000..81fa3c50 --- /dev/null +++ b/reference-docs/MANAGEMENT-Delete-Brand.md @@ -0,0 +1,14 @@ +--- +title: Delete Brand +type: endpoint +categorySlug: voucherify-api +slug: delete-brand +parentDocSlug: management +hidden: false +order: 350 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/MANAGEMENT-Delete-Custom-Event-Schema.md b/reference-docs/MANAGEMENT-Delete-Custom-Event-Schema.md new file mode 100644 index 00000000..dc88ade7 --- /dev/null +++ b/reference-docs/MANAGEMENT-Delete-Custom-Event-Schema.md @@ -0,0 +1,14 @@ +--- +title: Delete Custom Event Schema +type: endpoint +categorySlug: voucherify-api +slug: delete-custom-event-schema +parentDocSlug: management +hidden: false +order: 200 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/MANAGEMENT-Delete-Metadata-Schema.md b/reference-docs/MANAGEMENT-Delete-Metadata-Schema.md new file mode 100644 index 00000000..21ecd5c9 --- /dev/null +++ b/reference-docs/MANAGEMENT-Delete-Metadata-Schema.md @@ -0,0 +1,14 @@ +--- +title: Delete Metadata Schema +type: endpoint +categorySlug: voucherify-api +slug: delete-metadata-schema +parentDocSlug: management +hidden: false +order: 150 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/MANAGEMENT-Delete-Project.md b/reference-docs/MANAGEMENT-Delete-Project.md new file mode 100644 index 00000000..02ecfdef --- /dev/null +++ b/reference-docs/MANAGEMENT-Delete-Project.md @@ -0,0 +1,14 @@ +--- +title: Delete Project +type: endpoint +categorySlug: voucherify-api +slug: delete-project +parentDocSlug: management +hidden: false +order: 50 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/MANAGEMENT-Delete-Stacking-Rules.md b/reference-docs/MANAGEMENT-Delete-Stacking-Rules.md new file mode 100644 index 00000000..3f55ca3a --- /dev/null +++ b/reference-docs/MANAGEMENT-Delete-Stacking-Rules.md @@ -0,0 +1,14 @@ +--- +title: Delete Stacking Rules +type: endpoint +categorySlug: voucherify-api +slug: delete-stacking-rules +parentDocSlug: management +hidden: false +order: 250 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/MANAGEMENT-Delete-Webhook.md b/reference-docs/MANAGEMENT-Delete-Webhook.md new file mode 100644 index 00000000..d2f6d5ed --- /dev/null +++ b/reference-docs/MANAGEMENT-Delete-Webhook.md @@ -0,0 +1,14 @@ +--- +title: Delete Webhook +type: endpoint +categorySlug: voucherify-api +slug: delete-webhook +parentDocSlug: management +hidden: false +order: 300 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/MANAGEMENT-Get-Brand.md b/reference-docs/MANAGEMENT-Get-Brand.md new file mode 100644 index 00000000..4b7aa22b --- /dev/null +++ b/reference-docs/MANAGEMENT-Get-Brand.md @@ -0,0 +1,14 @@ +--- +title: Get Brand +type: endpoint +categorySlug: voucherify-api +slug: get-brand +parentDocSlug: management +hidden: false +order: 330 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/MANAGEMENT-Get-Custom-Event-Schema.md b/reference-docs/MANAGEMENT-Get-Custom-Event-Schema.md new file mode 100644 index 00000000..59e37dc0 --- /dev/null +++ b/reference-docs/MANAGEMENT-Get-Custom-Event-Schema.md @@ -0,0 +1,14 @@ +--- +title: Get Custom Event Schema +type: endpoint +categorySlug: voucherify-api +slug: get-custom-event-schema +parentDocSlug: management +hidden: false +order: 180 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/MANAGEMENT-Get-Metadata-Schema.md b/reference-docs/MANAGEMENT-Get-Metadata-Schema.md new file mode 100644 index 00000000..83c80a4e --- /dev/null +++ b/reference-docs/MANAGEMENT-Get-Metadata-Schema.md @@ -0,0 +1,14 @@ +--- +title: Get Metadata Schema +type: endpoint +categorySlug: voucherify-api +slug: get-metadata-schema-1 +parentDocSlug: management +hidden: false +order: 130 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/MANAGEMENT-Get-Project.md b/reference-docs/MANAGEMENT-Get-Project.md new file mode 100644 index 00000000..f68e73f5 --- /dev/null +++ b/reference-docs/MANAGEMENT-Get-Project.md @@ -0,0 +1,14 @@ +--- +title: Get Project +type: endpoint +categorySlug: voucherify-api +slug: get-project +parentDocSlug: management +hidden: false +order: 30 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/MANAGEMENT-Get-Stacking-Rules.md b/reference-docs/MANAGEMENT-Get-Stacking-Rules.md new file mode 100644 index 00000000..f8cf6e7f --- /dev/null +++ b/reference-docs/MANAGEMENT-Get-Stacking-Rules.md @@ -0,0 +1,14 @@ +--- +title: Get Stacking Rules +type: endpoint +categorySlug: voucherify-api +slug: get-stacking-rules +parentDocSlug: management +hidden: false +order: 230 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/MANAGEMENT-Get-User.md b/reference-docs/MANAGEMENT-Get-User.md new file mode 100644 index 00000000..7d8f4565 --- /dev/null +++ b/reference-docs/MANAGEMENT-Get-User.md @@ -0,0 +1,14 @@ +--- +title: Get User +type: endpoint +categorySlug: voucherify-api +slug: get-user +parentDocSlug: management +hidden: false +order: 80 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/MANAGEMENT-Get-Webhook.md b/reference-docs/MANAGEMENT-Get-Webhook.md new file mode 100644 index 00000000..cd84ef02 --- /dev/null +++ b/reference-docs/MANAGEMENT-Get-Webhook.md @@ -0,0 +1,14 @@ +--- +title: Get Webhook +type: endpoint +categorySlug: voucherify-api +slug: get-webhook +parentDocSlug: management +hidden: false +order: 280 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/MANAGEMENT-Invite-User.md b/reference-docs/MANAGEMENT-Invite-User.md new file mode 100644 index 00000000..2eecfc13 --- /dev/null +++ b/reference-docs/MANAGEMENT-Invite-User.md @@ -0,0 +1,14 @@ +--- +title: Invite a New User +type: endpoint +categorySlug: voucherify-api +slug: invite-user +parentDocSlug: management +hidden: false +order: 55 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/MANAGEMENT-List-Brands.md b/reference-docs/MANAGEMENT-List-Brands.md new file mode 100644 index 00000000..c0f95f95 --- /dev/null +++ b/reference-docs/MANAGEMENT-List-Brands.md @@ -0,0 +1,14 @@ +--- +title: List Brands +type: endpoint +categorySlug: voucherify-api +slug: list-brands +parentDocSlug: management +hidden: false +order: 320 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/MANAGEMENT-List-Campaign-Templates.md b/reference-docs/MANAGEMENT-List-Campaign-Templates.md new file mode 100644 index 00000000..3d4caef3 --- /dev/null +++ b/reference-docs/MANAGEMENT-List-Campaign-Templates.md @@ -0,0 +1,14 @@ +--- +title: List Campaign Templates +type: endpoint +categorySlug: voucherify-api +slug: management-list-campaign-templates +parentDocSlug: management +hidden: false +order: 360 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/MANAGEMENT-List-Custom-Event-Schemas.md b/reference-docs/MANAGEMENT-List-Custom-Event-Schemas.md new file mode 100644 index 00000000..d0315b18 --- /dev/null +++ b/reference-docs/MANAGEMENT-List-Custom-Event-Schemas.md @@ -0,0 +1,14 @@ +--- +title: List Custom Event Schemas +type: endpoint +categorySlug: voucherify-api +slug: list-custom-event-schemas +parentDocSlug: management +hidden: false +order: 170 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/MANAGEMENT-List-Metadata-Schemas-1.md b/reference-docs/MANAGEMENT-List-Metadata-Schemas-1.md new file mode 100644 index 00000000..478c751f --- /dev/null +++ b/reference-docs/MANAGEMENT-List-Metadata-Schemas-1.md @@ -0,0 +1,14 @@ +--- +title: List Metadata Schemas +type: endpoint +categorySlug: voucherify-api +slug: list-metadata-schemas-1 +parentDocSlug: management +hidden: false +order: 120 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/MANAGEMENT-List-Projects.md b/reference-docs/MANAGEMENT-List-Projects.md new file mode 100644 index 00000000..702c9702 --- /dev/null +++ b/reference-docs/MANAGEMENT-List-Projects.md @@ -0,0 +1,14 @@ +--- +title: List Projects +type: endpoint +categorySlug: voucherify-api +slug: list-projects +parentDocSlug: management +hidden: false +order: 20 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/MANAGEMENT-List-Stacking-Rules.md b/reference-docs/MANAGEMENT-List-Stacking-Rules.md new file mode 100644 index 00000000..4fa19a46 --- /dev/null +++ b/reference-docs/MANAGEMENT-List-Stacking-Rules.md @@ -0,0 +1,14 @@ +--- +title: List Stacking Rules +type: endpoint +categorySlug: voucherify-api +slug: list-stacking-rules +parentDocSlug: management +hidden: false +order: 220 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/MANAGEMENT-List-Users.md b/reference-docs/MANAGEMENT-List-Users.md new file mode 100644 index 00000000..16e82365 --- /dev/null +++ b/reference-docs/MANAGEMENT-List-Users.md @@ -0,0 +1,14 @@ +--- +title: List Users +type: endpoint +categorySlug: voucherify-api +slug: list-users +parentDocSlug: management +hidden: false +order: 70 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/MANAGEMENT-List-Webhooks.md b/reference-docs/MANAGEMENT-List-Webhooks.md new file mode 100644 index 00000000..9df8ed2e --- /dev/null +++ b/reference-docs/MANAGEMENT-List-Webhooks.md @@ -0,0 +1,14 @@ +--- +title: List Webhooks +type: endpoint +categorySlug: voucherify-api +slug: list-webhooks +parentDocSlug: management +hidden: false +order: 270 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/MANAGEMENT-Unassigned-User.md b/reference-docs/MANAGEMENT-Unassigned-User.md new file mode 100644 index 00000000..7602788c --- /dev/null +++ b/reference-docs/MANAGEMENT-Unassigned-User.md @@ -0,0 +1,14 @@ +--- +title: Unassign User +type: endpoint +categorySlug: voucherify-api +slug: unassign-user +parentDocSlug: management +hidden: false +order: 100 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/MANAGEMENT-Update-Brand.md b/reference-docs/MANAGEMENT-Update-Brand.md new file mode 100644 index 00000000..4ce46f85 --- /dev/null +++ b/reference-docs/MANAGEMENT-Update-Brand.md @@ -0,0 +1,14 @@ +--- +title: Update Brand +type: endpoint +categorySlug: voucherify-api +slug: update-brand +parentDocSlug: management +hidden: false +order: 340 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/MANAGEMENT-Update-Custom-Event-Schema.md b/reference-docs/MANAGEMENT-Update-Custom-Event-Schema.md new file mode 100644 index 00000000..51d2d490 --- /dev/null +++ b/reference-docs/MANAGEMENT-Update-Custom-Event-Schema.md @@ -0,0 +1,14 @@ +--- +title: Update Custom Event Schema +type: endpoint +categorySlug: voucherify-api +slug: update-custom-event-schema +parentDocSlug: management +hidden: false +order: 190 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/MANAGEMENT-Update-Metadata-Schema.md b/reference-docs/MANAGEMENT-Update-Metadata-Schema.md new file mode 100644 index 00000000..e7b31782 --- /dev/null +++ b/reference-docs/MANAGEMENT-Update-Metadata-Schema.md @@ -0,0 +1,14 @@ +--- +title: Update Metadata Schema +type: endpoint +categorySlug: voucherify-api +slug: update-metadata-schema +parentDocSlug: management +hidden: false +order: 140 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/MANAGEMENT-Update-Project.md b/reference-docs/MANAGEMENT-Update-Project.md new file mode 100644 index 00000000..9a3a9bf9 --- /dev/null +++ b/reference-docs/MANAGEMENT-Update-Project.md @@ -0,0 +1,14 @@ +--- +title: Update Project +type: endpoint +categorySlug: voucherify-api +slug: update-project +parentDocSlug: management +hidden: false +order: 40 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/MANAGEMENT-Update-Stacking-Rules.md b/reference-docs/MANAGEMENT-Update-Stacking-Rules.md new file mode 100644 index 00000000..12832e5d --- /dev/null +++ b/reference-docs/MANAGEMENT-Update-Stacking-Rules.md @@ -0,0 +1,14 @@ +--- +title: Update Stacking Rules +type: endpoint +categorySlug: voucherify-api +slug: update-stacking-rules +parentDocSlug: management +hidden: false +order: 240 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/MANAGEMENT-Update-User.md b/reference-docs/MANAGEMENT-Update-User.md new file mode 100644 index 00000000..7ed62d13 --- /dev/null +++ b/reference-docs/MANAGEMENT-Update-User.md @@ -0,0 +1,14 @@ +--- +title: Update User +type: endpoint +categorySlug: voucherify-api +slug: update-user +parentDocSlug: management +hidden: false +order: 90 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/MANAGEMENT-Update-Webhook.md b/reference-docs/MANAGEMENT-Update-Webhook.md new file mode 100644 index 00000000..7c9e7e70 --- /dev/null +++ b/reference-docs/MANAGEMENT-Update-Webhook.md @@ -0,0 +1,14 @@ +--- +title: Update Webhook +type: endpoint +categorySlug: voucherify-api +slug: update-webhook +parentDocSlug: management +hidden: false +order: 290 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/METADATA-SCHEMAS-Get-Metadata-Schema.md b/reference-docs/METADATA-SCHEMAS-Get-Metadata-Schema.md new file mode 100644 index 00000000..190a6674 --- /dev/null +++ b/reference-docs/METADATA-SCHEMAS-Get-Metadata-Schema.md @@ -0,0 +1,14 @@ +--- +title: Get Metadata Schema +type: endpoint +categorySlug: voucherify-api +slug: get-metadata-schema +parentDocSlug: metadata-schemas +hidden: false +order: 3 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/METADATA-SCHEMAS-List-Metadata-Schemas.md b/reference-docs/METADATA-SCHEMAS-List-Metadata-Schemas.md new file mode 100644 index 00000000..b8f35e4e --- /dev/null +++ b/reference-docs/METADATA-SCHEMAS-List-Metadata-Schemas.md @@ -0,0 +1,14 @@ +--- +title: List Metadata Schemas +type: endpoint +categorySlug: voucherify-api +slug: list-metadata-schemas +parentDocSlug: metadata-schemas +hidden: false +order: 2 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/METADATA-SCHEMAS-Metadata-Schema-Object.md b/reference-docs/METADATA-SCHEMAS-Metadata-Schema-Object.md new file mode 100644 index 00000000..e5801046 --- /dev/null +++ b/reference-docs/METADATA-SCHEMAS-Metadata-Schema-Object.md @@ -0,0 +1,26 @@ +--- +title: Metadata Schema Object +type: basic +categorySlug: voucherify-api +parentDocSlug: metadata-schemas +slug: metadata-schema-object +hidden: false +order: 1 +--- + +## Metadata Schema Object +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique metadata schema ID.
**Example:**ms_OF36L2rk4EqhdxvZs56IW9iE
| +| related_object`string` |The resource type. There is an infinite number of possibilities for the resource type because you can define custom metadata schemas. Some examples are included here to show you the standard metadata schema resource types.
Available values: `campaign`, `customer`, `earning_rule`, `loyalty_tier`, `order`, `order_item`, `product`, `promotion_tier`, `publication`, `redemption`, `reward`, `voucher` | +| properties`object` |Contains the metadata definitions. There can be many properties within this object.
Attributes | Description | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
custom_property_nameobject | Custom property name. This is defined in Project Settings > Metadata Schema in the Dashboard.
|
Restricts the creation of metadata fields when set to true
. In other words, it indicates whether or not you are allowed to create new metadata definitions; for example, in the campaign manager or publication manager. If it is set to true, then only the defined fields will be available for assigning values.
Timestamp representing the date and time when the metadata schema was created. The value is shown in the ISO 8601 format.
**Example:**2021-12-03T13:33:44.556Z
| +| updated_at`string` |Timestamp representing the date and time when the metadata schema was updated. The value is shown in the ISO 8601 format.
**Example:**2022-08-11T08:05:30.695Z
| +| object`string` |The type of the object represented by the JSON. This object stores information about the metadata schema.
| + +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/OAUTH-Generate-OAuth-Token.md b/reference-docs/OAUTH-Generate-OAuth-Token.md new file mode 100644 index 00000000..fbb3b253 --- /dev/null +++ b/reference-docs/OAUTH-Generate-OAuth-Token.md @@ -0,0 +1,14 @@ +--- +title: Generate OAuth 2.0 Token +type: endpoint +categorySlug: voucherify-api +slug: generate-oauth-token +parentDocSlug: oauth +hidden: false +order: 10 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/OAUTH-Introspect-OAuth-Token.md b/reference-docs/OAUTH-Introspect-OAuth-Token.md new file mode 100644 index 00000000..2da039d8 --- /dev/null +++ b/reference-docs/OAUTH-Introspect-OAuth-Token.md @@ -0,0 +1,14 @@ +--- +title: Introspect OAuth 2.0 Token +type: endpoint +categorySlug: voucherify-api +slug: introspect-oauth-token +parentDocSlug: oauth +hidden: false +order: 20 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/OAUTH-Revoke-OAuth-Token.md b/reference-docs/OAUTH-Revoke-OAuth-Token.md new file mode 100644 index 00000000..d85831a9 --- /dev/null +++ b/reference-docs/OAUTH-Revoke-OAuth-Token.md @@ -0,0 +1,14 @@ +--- +title: Revoke OAuth 2.0 Token +type: endpoint +categorySlug: voucherify-api +slug: revoke-oauth-token +parentDocSlug: oauth +hidden: false +order: 30 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/ORDERS-Create-Order.md b/reference-docs/ORDERS-Create-Order.md new file mode 100644 index 00000000..3bed937f --- /dev/null +++ b/reference-docs/ORDERS-Create-Order.md @@ -0,0 +1,14 @@ +--- +title: Create Order +type: endpoint +categorySlug: voucherify-api +slug: create-order +parentDocSlug: orders +hidden: false +order: 5 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/ORDERS-Create-Orders-Export.md b/reference-docs/ORDERS-Create-Orders-Export.md new file mode 100644 index 00000000..157dd254 --- /dev/null +++ b/reference-docs/ORDERS-Create-Orders-Export.md @@ -0,0 +1,14 @@ +--- +title: Create Orders Export +type: endpoint +categorySlug: voucherify-api +slug: create-order-export +parentDocSlug: orders +hidden: false +order: 8 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/ORDERS-Get-Order.md b/reference-docs/ORDERS-Get-Order.md new file mode 100644 index 00000000..c0359d23 --- /dev/null +++ b/reference-docs/ORDERS-Get-Order.md @@ -0,0 +1,14 @@ +--- +title: Get Order +type: endpoint +categorySlug: voucherify-api +slug: get-order +parentDocSlug: orders +hidden: false +order: 4 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/ORDERS-Import-Orders.md b/reference-docs/ORDERS-Import-Orders.md new file mode 100644 index 00000000..a8037e0a --- /dev/null +++ b/reference-docs/ORDERS-Import-Orders.md @@ -0,0 +1,14 @@ +--- +title: Import Orders +type: endpoint +categorySlug: voucherify-api +slug: import-orders +parentDocSlug: orders +hidden: false +order: 7 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/ORDERS-List-Orders.md b/reference-docs/ORDERS-List-Orders.md new file mode 100644 index 00000000..0b76ed70 --- /dev/null +++ b/reference-docs/ORDERS-List-Orders.md @@ -0,0 +1,14 @@ +--- +title: List Orders +type: endpoint +categorySlug: voucherify-api +slug: list-orders +parentDocSlug: orders +hidden: false +order: 3 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/ORDERS-Order-Object.md b/reference-docs/ORDERS-Order-Object.md new file mode 100644 index 00000000..1b6344c9 --- /dev/null +++ b/reference-docs/ORDERS-Order-Object.md @@ -0,0 +1,61 @@ +--- +title: Order Object +type: basic +categorySlug: voucherify-api +parentDocSlug: orders +slug: order-object +hidden: false +order: 1 +--- + +## Order Calculated No Customer Data +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.
| +| source_id`string`, `null` |Unique source ID of an existing order that will be linked to the redemption of this request.
| +| status`string` |The order status.
Available values: `CREATED`, `PAID`, `CANCELED`, `FULFILLED` | +| amount`integer` |This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| initial_amount`integer` |This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| discount_amount`integer` |Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| items_discount_amount`integer` |Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| total_discount_amount`integer` |Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| total_amount`integer` |Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| applied_discount_amount`integer` |This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| items_applied_discount_amount`integer` |Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).sum(items, i => i.applied_discount_amount)
Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).total_applied_discount_amount
= applied_discount_amount
+ items_applied_discount_amount
A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.
| +| object`string` |The type of the object represented by JSON.
Available values: `order` | +| created_at`string` |Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.
**Example:**2021-12-22T10:13:06.487Z
| +| updated_at`string`, `null` |Timestamp representing the date and time when the order was last updated in ISO 8601 format.
**Example:**2021-12-22T10:14:45.316Z
| +| customer_id`string`, `null` |Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify.
**Example:**cust_7iUa6ICKyU6gH40dBU25kQU1
| +| referrer_id`string`, `null` |Unique referrer ID.
**Example:**cust_nM4jqPiaXUvQdVSA6vTRUnix
| +| customer | [Customer Id](#customer-id) | +| referrer | [Referrer Id](#referrer-id) | +| redemptions`object` |Attributes | Description |
---|---|
[propertyName] | See: Order Redemptions |
A unique identifier of an existing customer.
| +| object`string` |The type of the object represented by JSON.
Available values: `customer` | + +## Referrer Id +[Customer Id](#customer-id) + +## Order Redemptions +| Attributes | Description | +|:-----|:--------| +| date`string` |Timestamp representing the date and time when the redemption was created. The value is shown in the ISO 8601 format.
**Example:**2022-09-02T17:06:56.649Z
| +| rollback_id`string` |Unique ID of the redemption rollback.
**Example:**rr_0c63c84eb78ee0a6c0
| +| rollback_date`string` |Timestamp representing the date and time when the redemption rollback was created. The value is shown in the ISO 8601 format.
**Example:**2023-01-31T14:18:37.150Z
| +| related_object_type`string` |The source of the incentive.
| +| related_object_id`string` |Unique ID of the parent redemption.
**Example:**r_0ba186c4824e4881e1
| +| related_object_parent_id`string` |Represent's the campaign ID of the voucher if the redemption was based on a voucher that was part of bulk codes generated within a campaign. In case of a promotion tier, this represents the campaign ID of the promotion tier's parent campaign.
| +| stacked`array` |Contains a list of unique IDs of child redemptions, which belong to the stacked incentives.
| +| rollback_stacked`array` |Lists the rollback redemption IDs of the particular child redemptions.
| + +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/ORDERS-Update-Order.md b/reference-docs/ORDERS-Update-Order.md new file mode 100644 index 00000000..683ec9ea --- /dev/null +++ b/reference-docs/ORDERS-Update-Order.md @@ -0,0 +1,14 @@ +--- +title: Update Order +type: endpoint +categorySlug: voucherify-api +slug: update-order +parentDocSlug: orders +hidden: false +order: 6 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/Object-Schemas.md b/reference-docs/Object-Schemas.md new file mode 100644 index 00000000..05936e97 --- /dev/null +++ b/reference-docs/Object-Schemas.md @@ -0,0 +1,35 @@ +--- +title: Object Schemas +excerpt: Schema model definitions +categorySlug: introduction +slug: object-schemas +type: basic +hidden: false +order: 5 +--- + +You can find the object definitions for the given schemas by navigating to the respective endpoint and viewing the response schema definition and examples. + +| **API** | **Object** | +|:---|:---| +| Vouchers | [Voucher object](ref:voucher-object) | +| Campaigns | [Campaign object](ref:campaign-object) | +| Promotions | [Promotion tier object](ref:promotion-tier-object) | +| Rewards | [Reward object](ref:reward-object)Product collection ID.
| +| name`string` |Unique user-defined product collection name.
**Example:**All Products
| +| type`string` |Describes whether the product collection is dynamic (products come in and leave based on set criteria) or static (manually selected products).
Available values: `STATIC`, `AUTO_UPDATE` | +| filter`object` |Defines a set of criteria and boundary conditions for an AUTO_UPDATE
product collection type.
Attributes | Description |
---|---|
junction | See: Junction |
[propertyName] | Valid keys: |
Defines a set of products for a STATIC
product collection type.
Attributes | Description |
---|---|
idstring | The product ID. Example:prod_0a41bcf807c5fcaaf6 |
product_idstring | Product ID for SKUs. |
objectstring | Denotes the type of the object represented by the ID. Available values:sku , product |
Timestamp representing the date and time when the product collection was created. The value is shown in the ISO 8601 format.
**Example:**2021-12-09T12:51:29.898Z
| +| object`string` |The type of the object represented by JSON. This object stores information about the static product collection.
Available values: `products_collection` | + +## Junction +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.
Data filters used to narrow down the data records to be returned in the result.
[Filters Condition](#filters-condition) | + +## Filters Condition +| Attributes | Description | +|:-----|:--------| +| $in | See: [Any](#any) | +| $not_in | See: [Any](#any) | +| $is | See: [Any](#any) | +| $is_days_ago | See: [Any](#any) | +| $is_days_in_future | See: [Any](#any) | +| $is_not | See: [Any](#any) | +| $has_value | See: [Any](#any) | +| $is_unknown | See: [Any](#any) | +| $contains | See: [Any](#any) | +| $not_contain | See: [Any](#any) | +| $starts_with | See: [Any](#any) | +| $ends_with | See: [Any](#any) | +| $more_than | See: [Any](#any) | +| $less_than | See: [Any](#any) | +| $more_than_ago | See: [Any](#any) | +| $less_than_ago | See: [Any](#any) | +| $more_than_future | See: [Any](#any) | +| $less_than_future | See: [Any](#any) | +| $more_than_equal | See: [Any](#any) | +| $less_than_equal | See: [Any](#any) | +| $after | See: [Any](#any) | +| $before | See: [Any](#any) | +| $count | See: [Any](#any) | +| $count_less | See: [Any](#any) | +| $count_more | See: [Any](#any) | + +## Any +Array any of: string, string, string, number, object + +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/PRODUCTS-Delete-Product.md b/reference-docs/PRODUCTS-Delete-Product.md new file mode 100644 index 00000000..32ab8785 --- /dev/null +++ b/reference-docs/PRODUCTS-Delete-Product.md @@ -0,0 +1,14 @@ +--- +title: Delete Product +type: endpoint +categorySlug: voucherify-api +slug: delete-product +parentDocSlug: products +hidden: false +order: 10 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/PRODUCTS-Delete-SKU.md b/reference-docs/PRODUCTS-Delete-SKU.md new file mode 100644 index 00000000..b86a2c33 --- /dev/null +++ b/reference-docs/PRODUCTS-Delete-SKU.md @@ -0,0 +1,14 @@ +--- +title: Delete SKU +type: endpoint +categorySlug: voucherify-api +slug: delete-sku +parentDocSlug: products +hidden: false +order: 16 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/PRODUCTS-Get-Product.md b/reference-docs/PRODUCTS-Get-Product.md new file mode 100644 index 00000000..c1c2147b --- /dev/null +++ b/reference-docs/PRODUCTS-Get-Product.md @@ -0,0 +1,14 @@ +--- +title: Get Product +type: endpoint +categorySlug: voucherify-api +slug: get-product +parentDocSlug: products +hidden: false +order: 4 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/PRODUCTS-Get-SKU.md b/reference-docs/PRODUCTS-Get-SKU.md new file mode 100644 index 00000000..c0bdcd81 --- /dev/null +++ b/reference-docs/PRODUCTS-Get-SKU.md @@ -0,0 +1,14 @@ +--- +title: Get SKU +type: endpoint +categorySlug: voucherify-api +slug: get-sku +parentDocSlug: products +hidden: false +order: 12 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/PRODUCTS-Import-Products-Using-CSV.md b/reference-docs/PRODUCTS-Import-Products-Using-CSV.md new file mode 100644 index 00000000..b6b94e96 --- /dev/null +++ b/reference-docs/PRODUCTS-Import-Products-Using-CSV.md @@ -0,0 +1,14 @@ +--- +title: Import Products using CSV +type: endpoint +categorySlug: voucherify-api +slug: import-products-using-csv +parentDocSlug: products +hidden: false +order: 6 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/PRODUCTS-Import-SKUS-Using-CSV.md b/reference-docs/PRODUCTS-Import-SKUS-Using-CSV.md new file mode 100644 index 00000000..d6fecbb8 --- /dev/null +++ b/reference-docs/PRODUCTS-Import-SKUS-Using-CSV.md @@ -0,0 +1,14 @@ +--- +title: Import SKUs using CSV +type: endpoint +categorySlug: voucherify-api +slug: import-skus-using-csv +parentDocSlug: products +hidden: false +order: 14 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/PRODUCTS-List-Products.md b/reference-docs/PRODUCTS-List-Products.md new file mode 100644 index 00000000..75cf79ad --- /dev/null +++ b/reference-docs/PRODUCTS-List-Products.md @@ -0,0 +1,14 @@ +--- +title: List Products +type: endpoint +categorySlug: voucherify-api +slug: list-products +parentDocSlug: products +hidden: false +order: 3 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/PRODUCTS-List-SKUS-In-Product.md b/reference-docs/PRODUCTS-List-SKUS-In-Product.md new file mode 100644 index 00000000..50d09465 --- /dev/null +++ b/reference-docs/PRODUCTS-List-SKUS-In-Product.md @@ -0,0 +1,14 @@ +--- +title: List SKUs in Product +type: endpoint +categorySlug: voucherify-api +slug: list-skus-in-product +parentDocSlug: products +hidden: false +order: 11 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/PRODUCTS-Product-Object.md b/reference-docs/PRODUCTS-Product-Object.md new file mode 100644 index 00000000..a09b5e57 --- /dev/null +++ b/reference-docs/PRODUCTS-Product-Object.md @@ -0,0 +1,61 @@ +--- +title: Product Object +type: basic +categorySlug: voucherify-api +parentDocSlug: products +slug: product-object +hidden: false +order: 1 +--- + +## Product +This is an object representing a product.
This entity should be used to map product items from your inventory management system. The aim of products is to build which reflect product-specific campaigns.
+ +All of: + +1. [Product without Skus Object](#product-without-skus-object) +2.Attributes | Description |
---|---|
skus | See: Skus List For Product |
Unique product ID assigned by Voucherify.
**Example:**prod_0b1da8105693710357
| +| source_id`string`, `null` |Unique product source ID.
**Example:**productSourceID16
| +| name`string`, `null` |Unique user-defined product name.
**Example:**T-shirt
| +| price`integer`, `null` |Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as $100.00
being expressed as 10000
.
A list of product attributes whose values you can customize for given SKUs: ["color","size","ranking"]
. Each child SKU can have a unique value for a given attribute.
The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections.
| +| image_url`string`, `null` |The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image.
**Example:**https://images.com/original.jpg
| +| created_at`string` |Timestamp representing the date and time when the product was created. The value is shown in the ISO 8601 format.
**Example:**2022-05-23T06:52:55.008Z
| +| updated_at`string`, `null` |Timestamp representing the date and time when the product was updated. The value is shown in the ISO 8601 format.
**Example:**2022-05-23T09:24:07.405Z
| +| object`string` |The type of the object represented by JSON. This object stores information about the product.
Available values: `product` | + +## Skus List For Product +| Attributes | Description | +|:-----|:--------| +| object`string` |The type of the object represented by JSON. This object stores information about SKUs.
| +| data_ref`string` |Identifies the name of the JSON property that contains the array of SKUs.
| +| data`array` |A dictionary that contains an array of SKUs.
Array of [SKU Object](#sku-object) | +| total`integer` |Total number of SKUs in the product.
| + +## SKU Object +| Attributes | Description | +|:-----|:--------| +| id`string` |A unique identifier that represents the SKU and is assigned by Voucherify.
**Example:**sku_0b1621b319d248b79f
| +| source_id`string`, `null` |A unique SKU identifier from your inventory system.
**Example:**sku_source_id_4
| +| product_id`string` |The parent product's unique ID.
**Example:**prod_0b15f6b9f650c16990
| +| sku`string`, `null` |Unique user-defined SKU name.
**Example:**Large Pink Shirt
| +| price`integer`, `null` |Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as $100.00
being expressed as 10000
.
SKU price currency.
**Example:**USD
| +| attributes`object` |The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family.
| +| image_url`string`, `null` |The HTTPS URL pointing to the .png or .jpg file that will be used to render the SKU image.
| +| metadata`object` |The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections.
| +| created_at`string` |Timestamp representing the date and time when the SKU was created. The value is shown in the ISO 8601 format.
**Example:**2022-05-17T10:36:30.187Z
| +| updated_at`string`, `null` |Timestamp representing the date and time when the SKU was updated. The value is shown in the ISO 8601 format.
**Example:**2022-05-17T10:55:09.137Z
| +| object`string` |The type of the object represented by JSON. This object stores information about the SKU
.
A unique identifier that represents the SKU and is assigned by Voucherify.
**Example:**sku_0b1621b319d248b79f
| +| source_id`string`, `null` |A unique SKU identifier from your inventory system.
**Example:**sku_source_id_4
| +| product_id`string` |The parent product's unique ID.
**Example:**prod_0b15f6b9f650c16990
| +| sku`string`, `null` |Unique user-defined SKU name.
**Example:**Large Pink Shirt
| +| price`integer`, `null` |Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as $100.00
being expressed as 10000
.
SKU price currency.
**Example:**USD
| +| attributes`object` |The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family.
| +| image_url`string`, `null` |The HTTPS URL pointing to the .png or .jpg file that will be used to render the SKU image.
| +| metadata`object` |The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections.
| +| created_at`string` |Timestamp representing the date and time when the SKU was created. The value is shown in the ISO 8601 format.
**Example:**2022-05-17T10:36:30.187Z
| +| updated_at`string`, `null` |Timestamp representing the date and time when the SKU was updated. The value is shown in the ISO 8601 format.
**Example:**2022-05-17T10:55:09.137Z
| +| object`string` |The type of the object represented by JSON. This object stores information about the SKU
.
Unique promotion tier ID.
**Example:**promo_63fYCt81Aw0h7lzyRkrGZh9p
| +| created_at`string` |Timestamp representing the date and time when the promotion tier was created. The value is shown in the ISO 8601 format.
**Example:**2021-12-15T11:34:01.333Z
| +| updated_at`string` |Timestamp representing the date and time when the promotion tier was updated. The value is shown in the ISO 8601 format.
**Example:**2022-02-09T09:20:05.603Z
| +| name`string` |Name of the promotion tier.
| +| banner`string` |Text to be displayed to your customers on your website.
| +| action`object` |Contains details about the discount applied by the promotion tier.
Attributes | Description |
---|---|
discount | See: Discount |
The metadata object stores all custom attributes assigned to the promotion tier. A set of key/value pairs that you can attach to a promotion tier object. It can be useful for storing additional information about the promotion tier in a structured format.
| +| hierarchy`integer` |The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy.
| +| promotion_id`string` |Promotion unique ID.
| +| campaign`object` |Contains details about promotion tier's parent campaign.
Attributes | Description |
---|---|
idstring | Unique campaign ID. |
start_datestring | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is inactive before this date. Example:2022-09-22T00:00:00.000Z |
expiration_datestring | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is inactive after this date. Example:2022-09-30T00:00:00.000Z |
validity_timeframe | See: Validity Timeframe |
validity_day_of_week | See: Validity Day Of Week |
validity_hours | See: Validity Hours |
activeboolean | A flag indicating whether the campaign is active or not active. A campaign can be disabled even though it's within the active period defined by the
|
category_idstring | Unique category ID that this campaign belongs to. Example:cat_0b688929a2476386a6 |
objectstring | The type of the object represented by the campaign object. This object stores information about the campaign. |
Promotion tier's parent campaign's unique ID.
| +| active`boolean` |A flag to toggle the promotion tier on or off. You can disable a promotion tier even though it's within the active period defined by the start_date
and expiration_date
.
true
indicates an active promotion tierfalse
indicates an inactive promotion tierActivation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Promotion tier is inactive before this date.
**Example:**2022-09-23T00:00:00.000Z
| +| expiration_date`string` |Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is inactive after this date.
**Example:**2022-09-26T00:00:00.000Z
| +| validity_timeframe | See: [Validity Timeframe](#validity-timeframe) | +| validity_day_of_week | See: [Validity Day Of Week](#validity-day-of-week) | +| validity_hours | See: [Validity Hours](#validity-hours) | +| summary`object` |Contains statistics about promotion tier redemptions and orders.
Attributes | Description | ||||||
---|---|---|---|---|---|---|---|
redemptionsobject | Contains statistics about promotion tier redemptions.
| ||||||
ordersobject | Contains statistics about orders related to the promotion tier.
|
The type of the object represented by JSON. This object stores information about the promotion tier.
| +| validation_rule_assignments | See: [Validation Rule Assignments List](#validation-rule-assignments-list) | +| category_id`string` |Promotion tier category ID.
**Example:**cat_0c9da30e7116ba6bba
| +| categories`array` | Array of [Category](#category) | + +## Discount +Contains information about discount.
+ +One of: + +[Amount](#amount), [Unit](#unit), [Unit Multiple](#unit-multiple), [Percent](#percent), [Fixed](#fixed) + +## Validity Timeframe +| Attributes | Description | +|:-----|:--------| +| duration`string` |Defines the amount of time an earning rule will be active in ISO 8601 format. For example, an earning rule with a duration
of PT1H
will be valid for a duration of one hour.
PT1H
| +| interval`string` |Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, an earning rule with an interval
of P2D
will be valid every other day.
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
SaturdayDefines the reccuring period(s) when the resource is active. The periods should not overlap.
Array of:Attributes | Description |
---|---|
start_timestring | Defines the starting hour of validity in the HH:mm format. The resource is inactive before this time. Example:12:00 |
days_of_weekarray | Integer array corresponding to the particular days of the week in which the resource is valid.
|
expiration_timestring | Defines the ending hour of validity in the HH:mm format. The resource is inactive after this time. Example:14:00 |
The type of the object represented by JSON. This object stores information about validation rule assignments.
| +| data_ref`string` |Identifies the name of the JSON property that contains the array of validation rule assignments.
| +| data`array` |A dictionary that contains an array of validation rule assignments.
Array of [Validation Rule Assignment](#validation-rule-assignment) | +| total`integer` |Total number of validation rule assignments.
| + +## Category +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique category ID assigned by Voucherify.
| +| name`string` |Category name.
| +| hierarchy`integer` |Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value.
| +| object`string` |The type of the object represented by the JSON. This object stores information about the category.
Available values: `category` | +| created_at`string` |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_at`string` |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
| + +## Amount +| Attributes | Description | +|:-----|:--------| +| type`string` |Defines the type of the voucher.
Available values: `AMOUNT` | +| amount_off`number` |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_formula`string` | | +| aggregated_amount_limit`integer` |Maximum discount amount per order.
| +| effect |Defines how the discount is applied to the customer's order.
[Discount Amount Vouchers Effect Types](#discount-amount-vouchers-effect-types) | +| is_dynamic`boolean` |Flag indicating whether the discount was calculated using a formula.
| + +## Unit +| Attributes | Description | +|:-----|:--------| +| type`string` |Discount type.
Available values: `UNIT` | +| unit_off`integer` |Number of units to be granted a full value discount.
| +| unit_off_formula`string` |Formula used to calculate the number of units.
| +| effect |Defines how the unit is added to the customer's order.
[Discount Unit Vouchers Effect Types](#discount-unit-vouchers-effect-types) | +| unit_type`string` |The product deemed as free, chosen from product inventory (e.g. time, items).
| +| product |Contains information about the product.
[Simple Product Discount Unit](#simple-product-discount-unit) | +| sku | See: [Simple Sku Discount Unit](#simple-sku-discount-unit) | +| is_dynamic`boolean` |Flag indicating whether the discount was calculated using a formula.
| + +## Unit Multiple +| Attributes | Description | +|:-----|:--------| +| type`string` |Discount type.
Available values: `UNIT` | +| effect`string` |Defines how the discount is applied to the customer's order.
Available values: `ADD_MANY_ITEMS` | +| units`array` | Array of [One Unit](#one-unit) | + +## Percent +| Attributes | Description | +|:-----|:--------| +| type`string` |Defines the type of the voucher.
Available values: `PERCENT` | +| percent_off`number` |The percent discount that the customer will receive.
| +| percent_off_formula`string` | | +| amount_limit`number` |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_limit`integer` |Maximum discount amount per order.
| +| effect |Defines how the discount is applied to the customer's order.
[Discount Percent Vouchers Effect Types](#discount-percent-vouchers-effect-types) | +| is_dynamic`boolean` |Flag indicating whether the discount was calculated using a formula.
| + +## Fixed +| Attributes | Description | +|:-----|:--------| +| type`string` |Defines the type of the voucher.
Available values: `FIXED` | +| fixed_amount`number` |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_formula
parameter is present in the fixed amount definition, this value becomes the fallback value. As a result, if the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed value.
Defines how the discount is applied to the customer's order.
[Discount Fixed Vouchers Effect Types](#discount-fixed-vouchers-effect-types) | +| is_dynamic`boolean` |Flag indicating whether the discount was calculated using a formula.
| + +## Validation Rule Assignment +| Attributes | Description | +|:-----|:--------| +| id`string` |Validation rule assignment ID.
**Example:**asgm_74F7QZoYbUoljwQO
| +| rule_id`string` |Validation rule ID.
**Example:**val_4j7DCRm2IS59
| +| related_object_id`string` |The resource ID to which the validation rule was assigned.
**Example:**v_JtWunK6jUo7X2qOFj0SyRHq4p9tgENlT
| +| related_object_type`string` |The type of resource to which the validation rule was assigned.
Available values: `voucher`, `campaign`, `earning_rule`, `reward_assignment`, `promotion_tier`, `distribution` | +| created_at`string` |Timestamp representing the date and time when the validation rule assignment was created. The value is shown in the ISO 8601 format.
**Example:**2022-02-17T08:18:15.085Z
| +| object`string` |The type of the object represented by the ID.
Available values: `validation_rules_assignment` | + +## 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 | +|:-----|:--------| +| id`string` |Unique product ID, assigned by Voucherify.
| +| source_id`string` |Product's source ID.
| +| name`string` |Product name.
| + +## Simple Sku Discount Unit +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique SKU ID, assigned by Voucherify.
| +| source_id`string` |Product variant's source ID.
| +| name`string` |Sku name
| + +## One Unit +| Attributes | Description | +|:-----|:--------| +| unit_off`number` |Number of units to be granted a full value discount.
| +| unit_off_formula`string` |Formula used to calculate the number of units.
| +| effect`string` |Defines how the unit is added to the customer's order.
Available values: `ADD_NEW_ITEMS`, `ADD_MISSING_ITEMS` | +| unit_type`string` |The product deemed as free, chosen from product inventory (e.g. time, items).
| +| product |Contains information about the product.
[Simple Product Discount Unit](#simple-product-discount-unit) | +| sku |Contains information about the sku.
[Simple Sku Discount Unit](#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` + +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/PROMOTIONS-Update-Promotion-Stack.md b/reference-docs/PROMOTIONS-Update-Promotion-Stack.md new file mode 100644 index 00000000..4b9e3b7b --- /dev/null +++ b/reference-docs/PROMOTIONS-Update-Promotion-Stack.md @@ -0,0 +1,14 @@ +--- +title: Update Promotion Stack +type: endpoint +categorySlug: voucherify-api +slug: update-promotion-stack +parentDocSlug: promotions +hidden: false +order: 15 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/PROMOTIONS-Update-Promotion-Tier.md b/reference-docs/PROMOTIONS-Update-Promotion-Tier.md new file mode 100644 index 00000000..158a3315 --- /dev/null +++ b/reference-docs/PROMOTIONS-Update-Promotion-Tier.md @@ -0,0 +1,14 @@ +--- +title: Update Promotion Tier +type: endpoint +categorySlug: voucherify-api +slug: update-promotion-tier +parentDocSlug: promotions +hidden: false +order: 7 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/PUBLICATIONS-Create-Publication-1.md b/reference-docs/PUBLICATIONS-Create-Publication-1.md new file mode 100644 index 00000000..0469c810 --- /dev/null +++ b/reference-docs/PUBLICATIONS-Create-Publication-1.md @@ -0,0 +1,14 @@ +--- +title: Create Publication +type: endpoint +categorySlug: voucherify-api +slug: create-publication-1 +parentDocSlug: publications +hidden: false +order: 4 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/PUBLICATIONS-Create-Publication.md b/reference-docs/PUBLICATIONS-Create-Publication.md new file mode 100644 index 00000000..9481600e --- /dev/null +++ b/reference-docs/PUBLICATIONS-Create-Publication.md @@ -0,0 +1,14 @@ +--- +title: Create Publication +type: endpoint +categorySlug: voucherify-api +slug: create-publication +parentDocSlug: publications +hidden: false +order: 3 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/PUBLICATIONS-List-Publications.md b/reference-docs/PUBLICATIONS-List-Publications.md new file mode 100644 index 00000000..02baf8a5 --- /dev/null +++ b/reference-docs/PUBLICATIONS-List-Publications.md @@ -0,0 +1,14 @@ +--- +title: List Publications +type: endpoint +categorySlug: voucherify-api +slug: list-publications +parentDocSlug: publications +hidden: false +order: 2 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/PUBLICATIONS-Publication-Object.md b/reference-docs/PUBLICATIONS-Publication-Object.md new file mode 100644 index 00000000..a4ba2bd4 --- /dev/null +++ b/reference-docs/PUBLICATIONS-Publication-Object.md @@ -0,0 +1,287 @@ +--- +title: Publication Object +type: basic +categorySlug: voucherify-api +parentDocSlug: publications +slug: publication-object +hidden: false +order: 1 +--- + +## Publications Create Response Body +Response body schema for POST v1/publication
and GET v1/publications/create
.
Response body schema for POST v1/publication
and GET v1/publications/create
.
Attributes | Description |
---|---|
voucher | See: Voucher |
Response body schema for POST v1/publication
and GET v1/publications/create
.
Attributes | Description |
---|---|
vouchersarray | Contains the unique voucher codes that was assigned by Voucherify. |
Unique publication ID, assigned by Voucherify.
**Example:**pub_BbjAXnmm8e0SIm3zG8qvvFCP0KuLywtp
| +| object`string` |The type of the object represented by the JSON. This object stores information about the publication
.
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_id`string` |Unique customer ID of the customer receiving the publication.
**Example:**cust_eWgXlBBiY6THFRJwX45Iakv4
| +| tracking_id`string` |Customer's source_id
.
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.
| +| channel`string` |How the publication was originated. It can be your own custom channel or an example value provided here.
Available values: `API` | +| source_id`string`, `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.
| +| result`string` |Status of the publication attempt.
Available values: `SUCCESS` | +| customer | See: [Customer With Summary Loyalty Referrals](#customer-with-summary-loyalty-referrals) | +| vouchers_id`array` |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: + +1. [Voucher Base](#voucher-base) +2.Attributes | Description |
---|---|
categoriesarray | Contains details about the category. Array of Category |
validation_rules_assignments | See: Validation Rules Assignments List |
Attributes | Description | ||||
---|---|---|---|---|---|
idstring | The ID of an existing customer that will be linked to redemption in this request. | ||||
source_idstring | 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_metadataobject | Object used to store system metadata information. | ||||
created_atstring | 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_atstring | 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 | ||||
assetsobject | Contains information about the customer's cockpit.
| ||||
objectstring | The type of the object represented by JSON. Available values:customer |
Assigned by the Voucherify API, identifies the voucher.
**Example:**v_mkZN9v7vjYUadXnHrMza8W5c34fE5KiV
| +| code`string` |A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters.
**Example:**WVPblOYX
| +| campaign`string` |A unique campaign name, identifies the voucher's parent campaign.
**Example:**Gift Card Campaign
| +| campaign_id`string` |Assigned by the Voucherify API, identifies the voucher's parent campaign.
**Example:**camp_FNYR4jhqZBM9xTptxDGgeNBV
| +| category`string` |Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint.
| +| category_id`string` |Unique category ID assigned by Voucherify.
**Example:**cat_0bb343dee3cdb5ec0c
| +| type`string` |Defines the type of the voucher.
Available values: `GIFT_VOUCHER`, `DISCOUNT_VOUCHER`, `LOYALTY_CARD` | +| discount | See: [Discount](#discount) | +| gift`object` |Object representing gift parameters. Child attributes are present only if type
is GIFT_VOUCHER
. Defaults to null
.
Attributes | Description |
---|---|
amountinteger | Total gift card income over the lifetime of the card. The value is multiplied by 100 to represent 2 decimal places. For example 10000 |
subtracted_amountinteger | Total amount of subtracted credits over the gift card lifetime. The value is multiplied by 100 to represent 2 decimal places. For example |
balanceinteger | Available funds. The value is multiplied by 100 to represent 2 decimal places. For example 500 |
effectstring | Defines how the credits are applied to the customer's order. Available values:APPLY_TO_ORDER , APPLY_TO_ITEMS |
Object representing loyalty card parameters. Child attributes are present only if type
is LOYALTY_CARD
. Defaults to null
.
Attributes | Description |
---|---|
pointsinteger | Total number of points added to the loyalty card over its lifespan. Example:7000 |
balanceinteger | Points available for reward redemption. This is calculated as follows: 6970 |
next_expiration_datestring | The next closest date when the next set of points are due to expire. Example:2023-05-30 |
next_expiration_pointsinteger | The amount of points that are set to expire next. |
pending_pointsinteger | Shows the number of pending points that will be added to the loyalty card when they are activated automatically or manually. |
expired_pointsinteger | Shows the total number of expired points over the lifetime of the loyalty card. |
subtracted_pointsinteger | Shows the total number of subtracted points over the lifetime of the loyalty card. |
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_date`string` |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-timeframe) | +| validity_day_of_week | See: [Validity Day Of Week](#validity-day-of-week) | +| validity_hours | See: [Validity Hours](#validity-hours) | +| active`boolean`, `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 start_date
and expiration_date
.
true
indicates an active voucherfalse
indicates an inactive voucherAn optional field to keep any extra textual information about the code such as a code description and details.
| +| metadata`object` |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](#voucher-assets) | +| is_referral_code`boolean`, `null` |Flag indicating whether this voucher is a referral code; true
for campaign type REFERRAL_PROGRAM
.
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_at`string` |Timestamp representing the date and time when the voucher was last updated in ISO 8601 format.
**Example:**2021-12-22T10:14:45.316Z
| +| holder_id`string` |Unique customer identifier of the redeemable holder. It equals to the customer ID assigned by Voucherify.
**Example:**cust_eWgXlBBiY6THFRJwX45Iakv4
| +| referrer_id`string` |Unique identifier of the referring person.
**Example:**cust_Vzck5i8U3OhcEUFY6MKhN9Rv
| +| object`string` |The type of the object represented by JSON. Default is voucher
.
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.
Attributes | Description |
---|---|
objectstring | The type of the object represented is by default |
countinteger | Publication events counter. Example:0 |
urlstring | The endpoint where this list of publications can be accessed using a GET method. /v1/vouchers/WVPblOYX/publications?page=1&limit=10 |
Stores a summary of redemptions that have been applied to the voucher.
Attributes | Description |
---|---|
quantityinteger | How many times a voucher can be redeemed. A |
redeemed_quantityinteger | How many times a voucher has already been redeemed. Example:1 |
redeemed_pointsinteger | Total loyalty points redeemed. Example:100000 |
objectstring | The type of the object represented is by default |
urlstring | The endpoint where this list of redemptions can be accessed using a GET method. /v1/vouchers/WVPblOYX/redemptions?page=1&limit=10 |
Unique category ID assigned by Voucherify.
| +| name`string` |Category name.
| +| hierarchy`integer` |Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value.
| +| object`string` |The type of the object represented by the JSON. This object stores information about the category.
Available values: `category` | +| created_at`string` |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_at`string` |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 | +|:-----|:--------| +| object`string` |The type of the object represented by JSON. This object stores information about validation rules assignments.
Available values: `list` | +| data_ref`string` |Identifies the name of the attribute that contains the array of validation rules assignments.
Available values: `data` | +| data`array` |Contains array of validation rules assignments.
Array of [Business Validation Rule Assignment](#business-validation-rule-assignment) | +| total`integer` |Total number of validation rules assignments.
| + +## Customer Summary +| Attributes | Description | +|:-----|:--------| +| redemptions | See: [Customer Summary Redemptions](#customer-summary-redemptions) | +| orders | See: [Customer Summary Orders](#customer-summary-orders) | + +## Customer Loyalty +| Attributes | Description | +|:-----|:--------| +| points`integer` |Customer's loyalty points minus expired for all loyalty cards which the customer has.
| +| referred_customers`integer` |Total number of customers referred by the customer.
| +| campaigns`object` |Contains campaigns with details about point balances and how many customers were referred by the customer.
Attributes | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
[propertyName]object | Contains details about the point balances left on loyalty cards and the number of referred customers in each campaign.
|
Total number of times this customer received a referral, i.e. was referred by another customer.
| +| campaigns`array` |Contains an array of campaigns that served as the source of a referral for the customer.
Array of:Attributes | Description |
---|---|
campaign_idstring | Unique campaign ID, assigned by Voucherify. Example:camp_rRsfatlwN7unSeUIJDCYedal |
referrer_idstring | Unique referrer ID, assigned by Voucherify. This is the customer ID of a customer that is referring this customer. Example:cust_sehkNIi8Uq2qQuRqSr7xn4Zi |
related_object_idstring | Related object id Example:r_0b9d4cc4aa164dd073 |
related_object_typestring | Related object type, i.e. |
datestring | Timestamp representing the date and time when the customer was referred in ISO 8601 format. Example:2022-08-30T10:19:39.196Z |
Customer's first and last name.
| +| description`string` |An arbitrary string that you can attach to a customer object.
| +| email`string` |Customer's email address.
| +| phone`string` |Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel.
| +| birthday`string` |Deprecated
. Customer's birthdate; format YYYY-MM-DD.
Customer's birthdate; format YYYY-MM-DD.
| +| address`object`, `null` |Customer's address.
Attributes | Description |
---|---|
citystring | City |
statestring | State |
line_1string | First line of address. |
line_2string | Second line of address. |
countrystring | Country. |
postal_codestring | Postal code. |
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](#amount), [Unit](#unit), [Unit Multiple](#unit-multiple), [Percent](#percent), [Fixed](#fixed) + +## Validity Timeframe +| Attributes | Description | +|:-----|:--------| +| duration`string` |Defines the amount of time an earning rule will be active in ISO 8601 format. For example, an earning rule with a duration
of PT1H
will be valid for a duration of one hour.
PT1H
| +| interval`string` |Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, an earning rule with an interval
of P2D
will be valid every other day.
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
SaturdayDefines the reccuring period(s) when the resource is active. The periods should not overlap.
Array of:Attributes | Description |
---|---|
start_timestring | Defines the starting hour of validity in the HH:mm format. The resource is inactive before this time. Example:12:00 |
days_of_weekarray | Integer array corresponding to the particular days of the week in which the resource is valid.
|
expiration_timestring | Defines the ending hour of validity in the HH:mm format. The resource is inactive after this time. Example:14:00 |
Stores Quick Response (QR) representation of encrypted code.
Attributes | Description |
---|---|
idstring | Encrypted voucher code ID. Example:U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK+t4pp7U7oFzjGJzj9q/bmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg+BaZk5QwXMf8k/OzSlOEVybpwSq+AiqPoNtjeuqtIgkDyvT6Q== |
urlstring | URL to QR code Optional: Attach query parameters to base URL to customize the image of the encrypted voucher code.
https://dev.dl.voucherify.io/api/v1/assets/qr/U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK%2Bt4pp7U7oFzjGJzj9q%2FbmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg%2BBaZk5QwXMf8k%2FOzSlOEVybpwSq%2BAiqPoNtjeuqtIgkDyvT6Q%3D%3D |
Stores barcode representation of encrypted code.
Attributes | Description |
---|---|
idstring | Encrypted voucher code ID. Example:U2FsdGVkX19eJhGfWwUrH9+tulBkON+AnMktic+N6CVWzZ9+fHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ+kJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6/pFs61apEn9SJx32ttCF6d3oxKISQQ== |
urlstring | URL to barcode Optional: Attach query parameters to base URL to customize the image of the encrypted voucher code.
https://dev.dl.voucherify.io/api/v1/assets/barcode/U2FsdGVkX19eJhGfWwUrH9%2BtulBkON%2BAnMktic%2BN6CVWzZ9%2BfHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ%2BkJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6%2FpFs61apEn9SJx32ttCF6d3oxKISQQ%3D%3D |
The unique identifier for a assignment
| +| rule_id`string` |The unique identifier for a rule
| +| related_object_id`string` |The unique identifier for a related object
| +| related_object_type`string` |The type of related object
| +| created_at`string` |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_at`string` |Timestamp representing the date and time when the object was last updated in ISO 8601 format.
**Example:**2022-03-09T11:19:04.819Z
| +| object`string` |The type of the object represented by JSON.
Available values: `validation_rules_assignment` | +| validation_status`string` |The validation status of the assignment
Available values: `VALID`, `PARTIALLY_VALID`, `INVALID` | +| validation_omitted_rules`array` |The list of omitted rules
| + +## Customer Summary Redemptions +| Attributes | Description | +|:-----|:--------| +| total_redeemed`integer` |Total number of redemptions made by the customer.
| +| total_failed`integer` |Total number of redemptions that failed.
| +| total_succeeded`integer` |Total number of redemptions that succeeded.
| +| total_rolled_back`integer` |Total number of redemptions that were rolled back for the customer.
| +| total_rollback_failed`integer` |Total number of redemption rollbacks that failed.
| +| total_rollback_succeeded`integer` |Total number of redemption rollbacks that succeeded.
| +| gift`object` |Summary of gift card credits.
Attributes | Description |
---|---|
redeemed_amountinteger | Total amount of gift card credits redeemed by customer. The value is multiplied by 100 to represent 2 decimal places. For example |
amount_to_gointeger | Remaining gift card balance across all gift cards. The value is multiplied by 100 to represent 2 decimal places. For example |
Summary of loyalty points.
Attributes | Description |
---|---|
redeemed_pointsinteger | Total number of loyalty points redeemed by the customer. |
points_to_gointeger | Sum of remaining available point balance across all loyalty cards. |
The total amount spent by the customer. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents
for $100.00
.
Total number of orders made by the customer.
| +| average_amount`integer` |Average amount spent on orders. total_amount
÷ total_count
. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents
for $100.00
.
Amount spent on last order. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents
for $100.00
.
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 | +|:-----|:--------| +| type`string` |Defines the type of the voucher.
Available values: `AMOUNT` | +| amount_off`number` |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_formula`string` | | +| aggregated_amount_limit`integer` |Maximum discount amount per order.
| +| effect |Defines how the discount is applied to the customer's order.
[Discount Amount Vouchers Effect Types](#discount-amount-vouchers-effect-types) | +| is_dynamic`boolean` |Flag indicating whether the discount was calculated using a formula.
| + +## Unit +| Attributes | Description | +|:-----|:--------| +| type`string` |Discount type.
Available values: `UNIT` | +| unit_off`integer` |Number of units to be granted a full value discount.
| +| unit_off_formula`string` |Formula used to calculate the number of units.
| +| effect |Defines how the unit is added to the customer's order.
[Discount Unit Vouchers Effect Types](#discount-unit-vouchers-effect-types) | +| unit_type`string` |The product deemed as free, chosen from product inventory (e.g. time, items).
| +| product |Contains information about the product.
[Simple Product Discount Unit](#simple-product-discount-unit) | +| sku | See: [Simple Sku Discount Unit](#simple-sku-discount-unit) | +| is_dynamic`boolean` |Flag indicating whether the discount was calculated using a formula.
| + +## Unit Multiple +| Attributes | Description | +|:-----|:--------| +| type`string` |Discount type.
Available values: `UNIT` | +| effect`string` |Defines how the discount is applied to the customer's order.
Available values: `ADD_MANY_ITEMS` | +| units`array` | Array of [One Unit](#one-unit) | + +## Percent +| Attributes | Description | +|:-----|:--------| +| type`string` |Defines the type of the voucher.
Available values: `PERCENT` | +| percent_off`number` |The percent discount that the customer will receive.
| +| percent_off_formula`string` | | +| amount_limit`number` |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_limit`integer` |Maximum discount amount per order.
| +| effect |Defines how the discount is applied to the customer's order.
[Discount Percent Vouchers Effect Types](#discount-percent-vouchers-effect-types) | +| is_dynamic`boolean` |Flag indicating whether the discount was calculated using a formula.
| + +## Fixed +| Attributes | Description | +|:-----|:--------| +| type`string` |Defines the type of the voucher.
Available values: `FIXED` | +| fixed_amount`number` |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_formula
parameter is present in the fixed amount definition, this value becomes the fallback value. As a result, if the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed value.
Defines how the discount is applied to the customer's order.
[Discount Fixed Vouchers Effect Types](#discount-fixed-vouchers-effect-types) | +| is_dynamic`boolean` |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 | +|:-----|:--------| +| id`string` |Unique product ID, assigned by Voucherify.
| +| source_id`string` |Product's source ID.
| +| name`string` |Product name.
| + +## Simple Sku Discount Unit +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique SKU ID, assigned by Voucherify.
| +| source_id`string` |Product variant's source ID.
| +| name`string` |Sku name
| + +## One Unit +| Attributes | Description | +|:-----|:--------| +| unit_off`number` |Number of units to be granted a full value discount.
| +| unit_off_formula`string` |Formula used to calculate the number of units.
| +| effect`string` |Defines how the unit is added to the customer's order.
Available values: `ADD_NEW_ITEMS`, `ADD_MISSING_ITEMS` | +| unit_type`string` |The product deemed as free, chosen from product inventory (e.g. time, items).
| +| product |Contains information about the product.
[Simple Product Discount Unit](#simple-product-discount-unit) | +| sku |Contains information about the sku.
[Simple Sku Discount Unit](#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` \ No newline at end of file diff --git a/reference-docs/QUALIFICATIONS-Check-Eligibility.md b/reference-docs/QUALIFICATIONS-Check-Eligibility.md new file mode 100644 index 00000000..264d8336 --- /dev/null +++ b/reference-docs/QUALIFICATIONS-Check-Eligibility.md @@ -0,0 +1,15 @@ +--- +title: Check Eligibility +type: endpoint +categorySlug: voucherify-api +parentDocSlug: qualifications +slug: check-eligibility +hidden: false +order: 2 +--- + +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/QUALIFICATIONS-Qualification-Object.md b/reference-docs/QUALIFICATIONS-Qualification-Object.md new file mode 100644 index 00000000..a0636ff6 --- /dev/null +++ b/reference-docs/QUALIFICATIONS-Qualification-Object.md @@ -0,0 +1,355 @@ +--- +title: Qualification Object +type: basic +categorySlug: voucherify-api +parentDocSlug: qualifications +slug: qualification-object +hidden: false +order: 1 +--- + +> 👍 Scenario Guide +> +> Read our dedicated guide to learn about some use cases these endpoints can cover [here](doc:checking-eligibility). + +## Qualifications Check Eligibility Response Body +| Attributes | Description | +|:-----|:--------| +| redeemables | See: [Redeemables](#redeemables) | +| tracking_id`string` |This identifier is generated during voucher qualification based on your internal id (e.g., email, database ID). This is a hashed customer source ID.
| +| order`object` | All of: 1. [Order Calculated No Customer Data](#order-calculated-no-customer-data) +2.Attributes | Description |
---|---|
itemsarray | Array of items applied to the order. It can include up to 500 items. |
The type of the object represented by JSON. Default is list
.
Identifies the name of the attribute that contains the array of qualified redeemables.
Available values: `data` | +| data`array` |Array of qualified redeemables.
Array of [Combined response of redeemable object and multiple redeemables within](#combined-response-of-redeemable-object-and-multiple-redeemables-within) | +| total`integer` |The number of redeemables returned in the API request.
**Example:**5
| +| has_more`boolean` |As results are always limited, the has_more
flag indicates if there are more records for given parameters. This lets you know if you can run another request (with different options) to get more records returned in the results.
Timestamp representing the date and time to use in starting_after
cursor to get more redeemables.
2023-10-31T12:13:16.374Z
| + +## Order Calculated No Customer Data +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.
| +| source_id`string`, `null` |Unique source ID of an existing order that will be linked to the redemption of this request.
| +| status`string` |The order status.
Available values: `CREATED`, `PAID`, `CANCELED`, `FULFILLED` | +| amount`integer` |This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| initial_amount`integer` |This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| discount_amount`integer` |Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| items_discount_amount`integer` |Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| total_discount_amount`integer` |Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| total_amount`integer` |Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| applied_discount_amount`integer` |This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| items_applied_discount_amount`integer` |Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).sum(items, i => i.applied_discount_amount)
Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).total_applied_discount_amount
= applied_discount_amount
+ items_applied_discount_amount
A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.
| +| object`string` |The type of the object represented by JSON.
Available values: `order` | +| created_at`string` |Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.
**Example:**2021-12-22T10:13:06.487Z
| +| updated_at`string`, `null` |Timestamp representing the date and time when the order was last updated in ISO 8601 format.
**Example:**2021-12-22T10:14:45.316Z
| +| customer_id`string`, `null` |Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify.
**Example:**cust_7iUa6ICKyU6gH40dBU25kQU1
| +| referrer_id`string`, `null` |Unique referrer ID.
**Example:**cust_nM4jqPiaXUvQdVSA6vTRUnix
| +| customer | [Customer Id](#customer-id) | +| referrer | [Referrer Id](#referrer-id) | +| redemptions`object` |Attributes | Description |
---|---|
[propertyName] | See: Order Redemptions |
Defines how many redeemables can be sent in one request. Note: more redeemables means more processing time.
| +| applicable_redeemables_limit`integer` |Defines how many redeemables can be applied in one request. The number must be less than or equal to redeemables_limit
. For example, a user can select 30 discounts but only 5 will be applied to the order and the remaining will be SKIPPED
according to the redeemables_sorting_rule
.
Defines how many redeemables with the same category can be applied in one request. The number must be less than or equal to applicable_redeemables_limit
. The ones above the limit will be SKIPPED
according to the redeemables_sorting_rule
.
Defines how many redeemables with an assigned exclusive category can be applied in one request. The ones above the limit will be SKIPPED
according to the redeemables_sorting_rule
.
Defines how many redeemables with an exclusive category per category in stacking rules can be applied in one request. The ones above the limit will be SKIPPED
according to the redeemables_sorting_rule
.
Lists the IDs of exclusive categories. A redeemable from a campaign with an exclusive category is the only redeemable to be redeemed when applied with redeemables from other campaigns unless these campaigns are exclusive or joint.
| +| joint_categories`array` |Lists the IDs of the joint categories. A campaign with a joint category is always applied regardless of the exclusivity of other campaigns.
| +| redeemables_application_mode`string` |Defines the application mode for redeemables."ALL"
means that all redeemables must be validated for the redemption to be successful."PARTIAL"
means that only those redeemables that can be validated will be redeemed. The redeemables that fail validaton will be skipped.
Defines redeemables sorting rule. CATEGORY_HIERARCHY
means that redeemables are applied oaccording to the category priority. REQUESTED_ORDER
means that redeemables are applied in the sequence provided in the request.
Defines redeemables products application mode. STACK
means that multiple discounts can be applied to a product. ONCE
means that only one discount can be applied to the same product.
Defines redeemables no effect rule. REDEEM_ANYWAY
means that the redeemable will be redeemed regardless of any restrictions or conditions in place. SKIP
means that the redeemable will be processed only when an applicable effect is calculated.
Lists category IDs. Redeemables with a given category are skipped even if the redeemables_no_effect_rule
is set to REDEEM_ANYWAY
. Category IDs can't overlap with the IDs in no_effect_redeem_anyway_categories
.
Lists category IDs. Redeemables with a given category are redeemed anyway even if the redeemables_no_effect_rule
is set to SKIP
. Category IDs can't overlap with the IDs in no_effect_skip_categories
.
Defines the rollback mode for the order. WITH_ORDER
is a default setting. The redemption is rolled back together with the data about the order, including related discount values. WITHOUT_ORDER
allows rolling the redemption back without affecting order data, including the applied discount values.
Attributes | Description |
---|---|
redeemablesarray | Array of Single redeemable |
A unique identifier of an existing customer.
| +| object`string` |The type of the object represented by JSON.
Available values: `customer` | + +## Referrer Id +[Customer Id](#customer-id) + +## Order Redemptions +| Attributes | Description | +|:-----|:--------| +| date`string` |Timestamp representing the date and time when the redemption was created. The value is shown in the ISO 8601 format.
**Example:**2022-09-02T17:06:56.649Z
| +| rollback_id`string` |Unique ID of the redemption rollback.
**Example:**rr_0c63c84eb78ee0a6c0
| +| rollback_date`string` |Timestamp representing the date and time when the redemption rollback was created. The value is shown in the ISO 8601 format.
**Example:**2023-01-31T14:18:37.150Z
| +| related_object_type`string` |The source of the incentive.
| +| related_object_id`string` |Unique ID of the parent redemption.
**Example:**r_0ba186c4824e4881e1
| +| related_object_parent_id`string` |Represent's the campaign ID of the voucher if the redemption was based on a voucher that was part of bulk codes generated within a campaign. In case of a promotion tier, this represents the campaign ID of the promotion tier's parent campaign.
| +| stacked`array` |Contains a list of unique IDs of child redemptions, which belong to the stacked incentives.
| +| rollback_stacked`array` |Lists the rollback redemption IDs of the particular child redemptions.
| + +## Single redeemable +| Attributes | Description | +|:-----|:--------| +| id`string` |Id of the redeemable.
| +| object`string` |Object type of the redeemable.
Available values: `campaign`, `promotion_tier`, `promotion_stack`, `voucher` | +| created_at`string` |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
| +| result | See: [Redeemable Result](#redeemable-result) | +| order | All of: 1. [Order Calculated No Customer Data](#order-calculated-no-customer-data) +2.Attributes | Description |
---|---|
itemsarray | Array of items applied to the order. It can include up to 500 items. |
A unique validation rule identifier assigned by the Voucherify API. The validation rule is verified before points are added to the balance.
| +| applicable_to |Contains list of items that qualify in the scope of the discount. These are definitions of included products, SKUs, and product collections. These can be discounted.
[Applicable To Result List](#applicable-to-result-list) | +| inapplicable_to |Contains list of items that do not qualify in the scope of the discount. These are definitions of excluded products, SKUs, and product collections. These CANNOT be discounted.
[Inapplicable To Result List](#inapplicable-to-result-list) | +| metadata`object` |The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format.
| +| categories`array` |List of category information.
Array of [Category with Stacking Rules Type](#category-with-stacking-rules-type) | +| banner`string` |Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard.
**Example:**Order Paid - You will get 100 points
| +| name`string` |Name of the redeemable.
**Example:**promotion_tier_get_points
| +| campaign_name`string` |Name of the campaign associated to the redeemable. This field is available only if object is not campaign
PromotionCampaign
| +| campaign_id`string` |Id of the campaign associated to the redeemable. This field is available only if object is not campaign
camp_Mow7u4gSxagLlZ2oDQ01ZS5N
| +| validation_rules_assignments | See: [Validation Rules Assignments List](#validation-rules-assignments-list) | + +## Redeemable Result +| Attributes | Description | +|:-----|:--------| +| discount | See: [Discount](#discount) | +| bundle | See: [Bundle Details](#bundle-details) | +| gift | See: [Redeemable Gift](#redeemable-gift) | +| loyalty_card |Loyalty Card object response
[Redeemable Loyalty Card](#redeemable-loyalty-card) | +| error |Error in result
[Error Object](#error-object) | + +## Applicable To Result List +| Attributes | Description | +|:-----|:--------| +| data`array` |Contains array of items to which the discount can apply.
Array of [Applicable To](#applicable-to) | +| total`integer` |Total number of objects defining included products, SKUs, or product collections.
| +| object`string` |The type of the object represented by JSON.
Available values: `list` | +| data_ref`string` |The type of the object represented by JSON.
Available values: `data` | + +## Inapplicable To Result List +| Attributes | Description | +|:-----|:--------| +| data`array` |Contains array of items to which the discount cannot apply.
Array of [Inapplicable To](#inapplicable-to) | +| total`integer` |Total number of objects defining included products, SKUs, or product collections.
| +| object`string` |The type of the object represented by JSON.
Available values: `list` | +| data_ref`string` |The type of the object represented by JSON.
Available values: `data` | + +## Category with Stacking Rules Type +Category object with stacking_rules_type
Attributes | Description |
---|---|
stacking_rules_typestring | The type of the stacking rule eligibility. Available values:JOINT , EXCLUSIVE |
The type of the object represented by JSON. This object stores information about validation rules assignments.
Available values: `list` | +| data_ref`string` |Identifies the name of the attribute that contains the array of validation rules assignments.
Available values: `data` | +| data`array` |Contains array of validation rules assignments.
Array of [Business Validation Rule Assignment](#business-validation-rule-assignment) | +| total`integer` |Total number of validation rules assignments.
| + +## Discount +Contains information about discount.
+ +One of: + +[Amount](#amount), [Unit](#unit), [Unit Multiple](#unit-multiple), [Percent](#percent), [Fixed](#fixed) + +## Bundle Details +| Attributes | Description | +|:-----|:--------| +| quantity`integer` |Determines how many bundles are qualified. If there are missing bundle products, the value is 0
. If the bundle is qualified, the value is 1
. The maximum number of identified bundles can equal the number set in limit
. Also defines the multiplier of the discount for AMOUNT
, PERCENT
, and UNIT
discount types. To inform end-customers that more products can be added to meet additional bundles, compare this parameter with limit
.
Determines the maximum number of identified bundles. This also defines the maximum multiplier of the bundle discount.
| +| identified`array` |Determines products from the customer's order items that meet bundle conditions. SKUs meet the conditions for their product that is used in the bundle. Returns only the products and their quantity that meet the bundle.
Array of:Attributes | Description |
---|---|
idstring | Unique identifier of the product or SKU that meets the bundle condition. This is an ID assigned by Voucherify. |
objectstring | Determines the type of the object that meets the bundle condition. Available values:product , sku |
item_indexinteger | Number assigned to the order line item in accordance with the order sent in the request. It starts with |
item_quantityinteger | Quantity of items that meet the bundle conditions. If the quantity in the order is higher than the quantity required by the bundle, this returns only the number that meets the bundle. For example, if the bundle requires |
Determines products, SKUs, or collections from the bundle that are missing in the customer's order items. Determines also the missing quantity. For collections, this means that order items do not include a sufficient number of items that belong to the collection. Not returned when all required bundle items are in the order.
Array of:Attributes | Description |
---|---|
idstring | Unique identifier of the collection, product, or SKU that is missing in the customer's order items. This is an ID assigned by Voucherify. |
objectstring | Determines the type of the object that is missing in the customer's order items. Available values:product , products_collection , sku |
item_quantityinteger | Quantity of items that are missing in the order items to meet the bundle conditions. |
Available funds. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents
for $100.00
.
The number of credits that the user wants to use from the gift card to fulfil the order. The value of credits cannot be higher than the current balance on the gift card. If the user gives more points than he has on the gift card, the application will return an error code in response. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents
for $100.00
.
The number of credits that are locked under a validation session. This is returned if the qualification request includes session.type: LOCK
parameter in the body. The value is multiplied by 100 to represent 2 decimal places. For example 10000
for $100.00
. Returns 0
if there aren't any active validation sessions for the gift card.
Total number of points added to the loyalty card over its lifespan.
**Example:**7000
| +| balance`integer` |Points available for reward redemption. This is calculated as follows: balance
= points
- expired_points
- subtracted_points
- redemption.redeemed_points
.
6970
| +| exchange_ratio`number` |The cash equivalent of the points defined in the points_ratio property.
| +| points_ratio`integer` |The number of loyalty points that will map to the predefined cash amount defined by the exchange_ratio property.
| +| transfers`array` | Array of [Loyalties Transfer Points](#loyalties-transfer-points) | + +## Error Object +| Attributes | Description | +|:-----|:--------| +| code`integer` |Error's HTTP status code.
| +| key`string` |Short string describing the kind of error which occurred.
| +| message`string` |A human-readable message providing a short description of the error.
| +| details`string` |A human-readable message providing more details about the error.
| +| request_id`string` |This ID is useful when troubleshooting and/or finding the root cause of an error response by our support team.
**Example:**v-0a885062c80375740f
| +| resource_id`string` |Unique resource ID that can be used in another endpoint to get more details.
**Example:**rf_0c5d710a87c8a31f86
| +| resource_type`string` |The resource type.
**Example:**voucher
| +| error`object` |Includes additional information about the error.
Attributes | Description |
---|---|
messagestring | The message configured by the user in a validation rule. |
This object stores information about the resource to which the discount is applicable.
Available values: `product`, `sku`, `products_collection` | +| id`string` |Unique product collection, product, or SKU identifier assigned by Voucherify.
| +| source_id`string` |The source identifier from your inventory system.
| +| product_id`string` |Parent product's unique ID assigned by Voucherify.
| +| product_source_id`string` |Parent product's source ID from your inventory system.
| +| price`number` |New fixed price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 price is written as 1000. In case of the fixed price being calculated by the formula, i.e. the price_formula parameter is present in the fixed price definition, this value becomes the fallback value. Such that in a case where the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed price.
| +| price_formula`number` |Formula used to calculate the discounted price of an item.
| +| effect |Defines how the discount is applied to the customer's order.
[Applicable To Effect](#applicable-to-effect) | +| quantity_limit`integer` |The maximum number of units allowed to be discounted per order line item.
| +| aggregated_quantity_limit`integer` |The maximum number of units allowed to be discounted combined across all matched order line items.
| +| amount_limit`integer` |Upper limit allowed to be applied as a discount per order line item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount is written as 600.
| +| aggregated_amount_limit`integer` |Maximum discount amount per order. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount on the entire order is written as 600. This value is definable for the following discount effects:
APPLY_TO_ITEMS
(each item subtotal is discounted equally)APPLY_TO_ITEMS_BY_QUANTITY
(each unit of matched products has the same discount value)Lists which order lines are (not) covered by the discount. The order in the array is determined by the sequence of applied discounts, while the numbers correspond to the order lines sent in the order
object in the request. The first order line is assigned 0
, the second order line is assigned 1
, and so on.
Lists which units within order lines are covered by the discount. The order line items are listed according to sequence of applied discounts while the index
corresponds to the order line sent in the order
object in the request.
Attributes | Description |
---|---|
indexinteger | Number assigned to the order line item in accordance with the order sent in the request. |
unitsarray | Numbers of units in the order line covered by the discount; e.g. |
units_limit_exceededboolean | Returned as |
Determines the recurrence of the discount, e.g. "repeat": 3
means that the discount is applied to every third item.
Determines how many items are skipped before the discount is applied.
| +| target`string` |Determines to which kinds of objects the discount is applicable. ITEM
includes products and SKUs. UNIT
means particular units within an order line.
Unique category ID assigned by Voucherify.
| +| name`string` |Category name.
| +| hierarchy`integer` |Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value.
| +| object`string` |The type of the object represented by the JSON. This object stores information about the category.
Available values: `category` | +| created_at`string` |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_at`string` |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
| + +## Business Validation Rule Assignment +| Attributes | Description | +|:-----|:--------| +| id`string` |The unique identifier for a assignment
| +| rule_id`string` |The unique identifier for a rule
| +| related_object_id`string` |The unique identifier for a related object
| +| related_object_type`string` |The type of related object
| +| created_at`string` |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_at`string` |Timestamp representing the date and time when the object was last updated in ISO 8601 format.
**Example:**2022-03-09T11:19:04.819Z
| +| object`string` |The type of the object represented by JSON.
Available values: `validation_rules_assignment` | +| validation_status`string` |The validation status of the assignment
Available values: `VALID`, `PARTIALLY_VALID`, `INVALID` | +| validation_omitted_rules`array` |The list of omitted rules
| + +## Amount +| Attributes | Description | +|:-----|:--------| +| type`string` |Defines the type of the voucher.
Available values: `AMOUNT` | +| amount_off`number` |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_formula`string` | | +| aggregated_amount_limit`integer` |Maximum discount amount per order.
| +| effect |Defines how the discount is applied to the customer's order.
[Discount Amount Vouchers Effect Types](#discount-amount-vouchers-effect-types) | +| is_dynamic`boolean` |Flag indicating whether the discount was calculated using a formula.
| + +## Unit +| Attributes | Description | +|:-----|:--------| +| type`string` |Discount type.
Available values: `UNIT` | +| unit_off`integer` |Number of units to be granted a full value discount.
| +| unit_off_formula`string` |Formula used to calculate the number of units.
| +| effect |Defines how the unit is added to the customer's order.
[Discount Unit Vouchers Effect Types](#discount-unit-vouchers-effect-types) | +| unit_type`string` |The product deemed as free, chosen from product inventory (e.g. time, items).
| +| product |Contains information about the product.
[Simple Product Discount Unit](#simple-product-discount-unit) | +| sku | See: [Simple Sku Discount Unit](#simple-sku-discount-unit) | +| is_dynamic`boolean` |Flag indicating whether the discount was calculated using a formula.
| + +## Unit Multiple +| Attributes | Description | +|:-----|:--------| +| type`string` |Discount type.
Available values: `UNIT` | +| effect`string` |Defines how the discount is applied to the customer's order.
Available values: `ADD_MANY_ITEMS` | +| units`array` | Array of [One Unit](#one-unit) | + +## Percent +| Attributes | Description | +|:-----|:--------| +| type`string` |Defines the type of the voucher.
Available values: `PERCENT` | +| percent_off`number` |The percent discount that the customer will receive.
| +| percent_off_formula`string` | | +| amount_limit`number` |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_limit`integer` |Maximum discount amount per order.
| +| effect |Defines how the discount is applied to the customer's order.
[Discount Percent Vouchers Effect Types](#discount-percent-vouchers-effect-types) | +| is_dynamic`boolean` |Flag indicating whether the discount was calculated using a formula.
| + +## Fixed +| Attributes | Description | +|:-----|:--------| +| type`string` |Defines the type of the voucher.
Available values: `FIXED` | +| fixed_amount`number` |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_formula
parameter is present in the fixed amount definition, this value becomes the fallback value. As a result, if the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed value.
Defines how the discount is applied to the customer's order.
[Discount Fixed Vouchers Effect Types](#discount-fixed-vouchers-effect-types) | +| is_dynamic`boolean` |Flag indicating whether the discount was calculated using a formula.
| + +## Loyalties Transfer Points +| Attributes | Description | +|:-----|:--------| +| code`string` |Unique loyalty card code from which the user wants to transfer loyalty points (source).
| +| points`integer` |The number of loyalty points that the user wants to transfer to another loyalty card. The number of points cannot be higher than the current balance on the loyalty card (source).
| +| reason`string` |Reason for the transfer.
| +| source_id`string` |The merchant's transaction ID if it is different from the Voucherify transaction ID. It is really useful in case of an integration between multiple systems. It can be a transaction ID from a CRM system, database or 3rd-party service.
| + +## Applicable To Effect +Available values: `APPLY_TO_EVERY`, `APPLY_TO_CHEAPEST`, `APPLY_FROM_CHEAPEST`, `APPLY_TO_MOST_EXPENSIVE`, `APPLY_FROM_MOST_EXPENSIVE` + +## 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 | +|:-----|:--------| +| id`string` |Unique product ID, assigned by Voucherify.
| +| source_id`string` |Product's source ID.
| +| name`string` |Product name.
| + +## Simple Sku Discount Unit +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique SKU ID, assigned by Voucherify.
| +| source_id`string` |Product variant's source ID.
| +| name`string` |Sku name
| + +## One Unit +| Attributes | Description | +|:-----|:--------| +| unit_off`number` |Number of units to be granted a full value discount.
| +| unit_off_formula`string` |Formula used to calculate the number of units.
| +| effect`string` |Defines how the unit is added to the customer's order.
Available values: `ADD_NEW_ITEMS`, `ADD_MISSING_ITEMS` | +| unit_type`string` |The product deemed as free, chosen from product inventory (e.g. time, items).
| +| product |Contains information about the product.
[Simple Product Discount Unit](#simple-product-discount-unit) | +| sku |Contains information about the sku.
[Simple Sku Discount Unit](#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` + +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/REDEMPTIONS-Get-Redemption.md b/reference-docs/REDEMPTIONS-Get-Redemption.md new file mode 100644 index 00000000..515aa806 --- /dev/null +++ b/reference-docs/REDEMPTIONS-Get-Redemption.md @@ -0,0 +1,14 @@ +--- +title: Get Redemption +type: endpoint +categorySlug: voucherify-api +slug: get-redemption +parentDocSlug: redemptions +hidden: false +order: 5 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/REDEMPTIONS-Get-Vouchers-Redemptions.md b/reference-docs/REDEMPTIONS-Get-Vouchers-Redemptions.md new file mode 100644 index 00000000..c6425097 --- /dev/null +++ b/reference-docs/REDEMPTIONS-Get-Vouchers-Redemptions.md @@ -0,0 +1,14 @@ +--- +title: Get Voucher's Redemptions +type: endpoint +categorySlug: voucherify-api +slug: get-voucher-redemptions +parentDocSlug: redemptions +hidden: false +order: 6 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/REDEMPTIONS-List-Redemptions.md b/reference-docs/REDEMPTIONS-List-Redemptions.md new file mode 100644 index 00000000..02354092 --- /dev/null +++ b/reference-docs/REDEMPTIONS-List-Redemptions.md @@ -0,0 +1,14 @@ +--- +title: List Redemptions +type: endpoint +categorySlug: voucherify-api +slug: list-redemptions +parentDocSlug: redemptions +hidden: false +order: 7 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/REDEMPTIONS-Redeem-Promotion.md b/reference-docs/REDEMPTIONS-Redeem-Promotion.md new file mode 100644 index 00000000..2571aaad --- /dev/null +++ b/reference-docs/REDEMPTIONS-Redeem-Promotion.md @@ -0,0 +1,14 @@ +--- +title: Redeem Promotion [Deprecated] +type: endpoint +categorySlug: voucherify-api +slug: redeem-promotion +parentDocSlug: redemptions +hidden: false +order: 60 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/REDEMPTIONS-Redeem-Stackable-Discounts.md b/reference-docs/REDEMPTIONS-Redeem-Stackable-Discounts.md new file mode 100644 index 00000000..14607c22 --- /dev/null +++ b/reference-docs/REDEMPTIONS-Redeem-Stackable-Discounts.md @@ -0,0 +1,14 @@ +--- +title: Redeem Stackable Discounts +type: endpoint +categorySlug: voucherify-api +slug: redeem-stacked-discounts +parentDocSlug: redemptions +hidden: false +order: 4 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/REDEMPTIONS-Redeem-Voucher.md b/reference-docs/REDEMPTIONS-Redeem-Voucher.md new file mode 100644 index 00000000..1c42f9de --- /dev/null +++ b/reference-docs/REDEMPTIONS-Redeem-Voucher.md @@ -0,0 +1,14 @@ +--- +title: Redeem Voucher [Deprecated] +type: endpoint +categorySlug: voucherify-api +slug: redeem-voucher +parentDocSlug: redemptions +hidden: false +order: 50 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/REDEMPTIONS-Redemption-Object.md b/reference-docs/REDEMPTIONS-Redemption-Object.md new file mode 100644 index 00000000..9e87b8bf --- /dev/null +++ b/reference-docs/REDEMPTIONS-Redemption-Object.md @@ -0,0 +1,510 @@ +--- +title: Redemption Object +type: basic +categorySlug: voucherify-api +parentDocSlug: redemptions +slug: redemption-object +hidden: false +order: 1 +--- + +## Redemptions Redeem Response Body +| Attributes | Description | +|:-----|:--------| +| redemptions`array` | Array of [Redemption](#redemption) | +| parent_redemption | See: [Redemption](#redemption) | +| order |Contains the order details associated with the redemption.
All of: 1. [Order Calculated No Customer Data](#order-calculated-no-customer-data) +2.Attributes | Description |
---|---|
itemsarray | Array of items applied to the order. It can include up to 500 items. |
Lists validation results of each inapplicable redeemable.
Array of [Inapplicable Redeemable](#inapplicable-redeemable) | +| skipped_redeemables`array` |Lists validation results of each redeemable. If a redeemable can be applied, the API returns "status": "APPLICABLE"
.
This is an object representing a redemption for POST v1/redemptions
and POST /client/v1/redemptions
.
Attributes | Description |
---|---|
voucher | Defines the details of the voucher being redeemed. All of: 1. Voucher with categories and validation rules assignments |
Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.
| +| source_id`string`, `null` |Unique source ID of an existing order that will be linked to the redemption of this request.
| +| status`string` |The order status.
Available values: `CREATED`, `PAID`, `CANCELED`, `FULFILLED` | +| amount`integer` |This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| initial_amount`integer` |This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| discount_amount`integer` |Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| items_discount_amount`integer` |Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| total_discount_amount`integer` |Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| total_amount`integer` |Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| applied_discount_amount`integer` |This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| items_applied_discount_amount`integer` |Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).sum(items, i => i.applied_discount_amount)
Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).total_applied_discount_amount
= applied_discount_amount
+ items_applied_discount_amount
A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.
| +| object`string` |The type of the object represented by JSON.
Available values: `order` | +| created_at`string` |Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.
**Example:**2021-12-22T10:13:06.487Z
| +| updated_at`string`, `null` |Timestamp representing the date and time when the order was last updated in ISO 8601 format.
**Example:**2021-12-22T10:14:45.316Z
| +| customer_id`string`, `null` |Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify.
**Example:**cust_7iUa6ICKyU6gH40dBU25kQU1
| +| referrer_id`string`, `null` |Unique referrer ID.
**Example:**cust_nM4jqPiaXUvQdVSA6vTRUnix
| +| customer | [Customer Id](#customer-id) | +| referrer | [Referrer Id](#referrer-id) | +| redemptions`object` |Attributes | Description |
---|---|
[propertyName] | See: Order Redemptions |
Indicates whether the redeemable can be applied or not applied based on the validation rules.
Available values: `INAPPLICABLE` | +| id`string` |Redeemable ID, i.e. the voucher code.
| +| object`string` |Redeemable's object type.
Available values: `voucher`, `promotion_tier` | +| result`object` |Includes the error object with details about the reason why the redeemable is inapplicable
Attributes | Description | ||||||
---|---|---|---|---|---|---|---|
error | See: Error Object | ||||||
detailsobject | Provides details about the reason why the redeemable is inapplicable.
| ||||||
bundle | See: Bundle Details |
The metadata object stores all custom attributes in the form of key/value pairs assigned to the redeemable.
| +| categories`array` | Array of [Category with Stacking Rules Type](#category-with-stacking-rules-type) | +| campaign_name`string` |Campaign name. Displayed only if the options.expand
is passed with a redeemable
value in the validation request body.
Unique campaign ID assigned by Voucherify. Displayed only if the options.expand
is passed with a redeemable
value in the validation request body.
camp_pqZjuhG6Mgtp4GD0zD7b8hA3
| +| name`string` |Name of the promotion tier. Displayed only if the options.expand
is passed with a redeemable
value in the validation request body.
Indicates whether the redeemable can be applied or not applied based on the validation rules.
Available values: `SKIPPED` | +| id`string` |Redeemable ID, i.e. the voucher code.
| +| object`string` |Redeemable's object type.
Available values: `voucher`, `promotion_tier` | +| result`object` |Provides details about the reason why the redeemable is skipped.
The metadata object stores all custom attributes in the form of key/value pairs assigned to the redeemable.
| +| categories`array` | Array of [Category with Stacking Rules Type](#category-with-stacking-rules-type) | +| campaign_name`string` |Campaign name. Displayed only if the options.expand
is passed with a redeemable
value in the validation request body.
Unique campaign ID assigned by Voucherify. Displayed only if the options.expand
is passed with a redeemable
value in the validation request body.
camp_pqZjuhG6Mgtp4GD0zD7b8hA3
| +| name`string` |Name of the promotion tier. Displayed only if the options.expand
is passed with a redeemable
value in the validation request body.
Unique redemption ID.
**Example:**r_0bc92f81a6801f9bca
| +| object`string` |The type of the object represented by the JSON
Available values: `redemption` | +| date`string` |Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.
**Example:**2021-12-22T10:13:06.487Z
| +| customer_id`string`, `null` |Unique customer ID of the redeeming customer.
**Example:**cust_i8t5Tt6eiKG5K79KQlJ0Vs64
| +| tracking_id`string`, `null` |Hashed customer source ID.
| +| metadata`object`, `null` |The metadata object stores all custom attributes assigned to the redemption.
| +| amount`integer` |For gift cards, this is a positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the number of redeemed credits.
For loyalty cards, this is the number of loyalty points used in the transaction.
10000
| +| redemption`string`, `null` |Unique redemption ID of the parent redemption.
**Example:**r_0c656311b5878a2031
| +| result`string` |Redemption result.
Available values: `SUCCESS`, `FAILURE` | +| status`string` |Redemption status.
Available values: `SUCCEEDED`, `FAILED`, `ROLLED_BACK` | +| session`object` |Contains details about the redemption session lock. Sessions can be established only for discount vouchers, promotions, and gift cards.
Attributes | Description |
---|---|
keystring | The session unique ID assigned by Voucherify or your own unique session ID sent in the request. |
Attributes | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
rollbacksarray | Array of: Redemption Related Redemptions Rollbacks Item
| ||||||||
redemptionsarray | Array of: Redemption Related Redemptions Item
|
If the result is FAILURE
, this parameter will provide a generic reason as to why the redemption failed.
customer_rules_violated
| +| failure_message`string` |If the result is FAILURE
, this parameter will provide a more expanded reason as to why the redemption failed.
Attributes | Description |
---|---|
itemsarray | Array of items applied to the order. It can include up to 500 items. |
Defines the details of the channel through which the redemption was issued.
Attributes | Description |
---|---|
channel_idstring | Unique channel ID of the user performing the redemption. This is either a user ID from a user using the Voucherify Dashboard or an X-APP-Id of a user using the API. For user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH |
channel_typestring | The source of the channel for the redemption. A USER , API , AUTO_REDEEM |
Defines the related object.
Available values: `voucher`, `promotion_tier`, `redemption` | +| related_object_id`string` |Unique related object ID assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher.
| +| promotion_tier |Contains details of the promotion tier and the parent campaign.
[Promotion Tier](#promotion-tier) | +| reward | See: [Redemption Reward Result](#redemption-reward-result) | +| gift`object` |Contains the amount subtracted from the gift card for the redemption.
Attributes | Description |
---|---|
amountinteger | Amount subtracted from the gift card as a result of the redemption. The amount is expressed as the smallest currency unit (e.g. 100 cents for $1.00). |
Contains the number of points subtracted from the loyalty card for the redemption.
Attributes | Description |
---|---|
pointsinteger | Number of points subtracted from the loyalty card as a result of the redemption. |
This is an object representing a voucher with categories and validation rules assignments for POST v1/qualifications
, POST v1/redemptions
, and POST v1/validations
.
Attributes | Description |
---|---|
categoriesarray | Contains details about the category. Array of Category with Stacking Rules Type |
validation_rules_assignments | See: Validation Rules Assignments List |
A unique identifier of an existing customer.
| +| object`string` |The type of the object represented by JSON.
Available values: `customer` | + +## Referrer Id +[Customer Id](#customer-id) + +## Order Redemptions +| Attributes | Description | +|:-----|:--------| +| date`string` |Timestamp representing the date and time when the redemption was created. The value is shown in the ISO 8601 format.
**Example:**2022-09-02T17:06:56.649Z
| +| rollback_id`string` |Unique ID of the redemption rollback.
**Example:**rr_0c63c84eb78ee0a6c0
| +| rollback_date`string` |Timestamp representing the date and time when the redemption rollback was created. The value is shown in the ISO 8601 format.
**Example:**2023-01-31T14:18:37.150Z
| +| related_object_type`string` |The source of the incentive.
| +| related_object_id`string` |Unique ID of the parent redemption.
**Example:**r_0ba186c4824e4881e1
| +| related_object_parent_id`string` |Represent's the campaign ID of the voucher if the redemption was based on a voucher that was part of bulk codes generated within a campaign. In case of a promotion tier, this represents the campaign ID of the promotion tier's parent campaign.
| +| stacked`array` |Contains a list of unique IDs of child redemptions, which belong to the stacked incentives.
| +| rollback_stacked`array` |Lists the rollback redemption IDs of the particular child redemptions.
| + +## Error Object +| Attributes | Description | +|:-----|:--------| +| code`integer` |Error's HTTP status code.
| +| key`string` |Short string describing the kind of error which occurred.
| +| message`string` |A human-readable message providing a short description of the error.
| +| details`string` |A human-readable message providing more details about the error.
| +| request_id`string` |This ID is useful when troubleshooting and/or finding the root cause of an error response by our support team.
**Example:**v-0a885062c80375740f
| +| resource_id`string` |Unique resource ID that can be used in another endpoint to get more details.
**Example:**rf_0c5d710a87c8a31f86
| +| resource_type`string` |The resource type.
**Example:**voucher
| +| error`object` |Includes additional information about the error.
Attributes | Description |
---|---|
messagestring | The message configured by the user in a validation rule. |
Determines how many bundles are qualified. If there are missing bundle products, the value is 0
. If the bundle is qualified, the value is 1
. The maximum number of identified bundles can equal the number set in limit
. Also defines the multiplier of the discount for AMOUNT
, PERCENT
, and UNIT
discount types. To inform end-customers that more products can be added to meet additional bundles, compare this parameter with limit
.
Determines the maximum number of identified bundles. This also defines the maximum multiplier of the bundle discount.
| +| identified`array` |Determines products from the customer's order items that meet bundle conditions. SKUs meet the conditions for their product that is used in the bundle. Returns only the products and their quantity that meet the bundle.
Array of:Attributes | Description |
---|---|
idstring | Unique identifier of the product or SKU that meets the bundle condition. This is an ID assigned by Voucherify. |
objectstring | Determines the type of the object that meets the bundle condition. Available values:product , sku |
item_indexinteger | Number assigned to the order line item in accordance with the order sent in the request. It starts with |
item_quantityinteger | Quantity of items that meet the bundle conditions. If the quantity in the order is higher than the quantity required by the bundle, this returns only the number that meets the bundle. For example, if the bundle requires |
Determines products, SKUs, or collections from the bundle that are missing in the customer's order items. Determines also the missing quantity. For collections, this means that order items do not include a sufficient number of items that belong to the collection. Not returned when all required bundle items are in the order.
Array of:Attributes | Description |
---|---|
idstring | Unique identifier of the collection, product, or SKU that is missing in the customer's order items. This is an ID assigned by Voucherify. |
objectstring | Determines the type of the object that is missing in the customer's order items. Available values:product , products_collection , sku |
item_quantityinteger | Quantity of items that are missing in the order items to meet the bundle conditions. |
Category object with stacking_rules_type
Attributes | Description |
---|---|
stacking_rules_typestring | The type of the stacking rule eligibility. Available values:JOINT , EXCLUSIVE |
Applicable redeemables limit exceeded
| + +## Validations Redeemable Skipped Result Category Limit Exceeded +| Attributes | Description | +|:-----|:--------| +| key`string` | Available values: `applicable_redeemables_per_category_limit_exceeded` | +| message`string` | **Example:**Applicable redeemables limit per category exceeded
| + +## Validations Redeemable Skipped Result Redeemables Limit Exceeded +| Attributes | Description | +|:-----|:--------| +| key`string` | Available values: `applicable_exclusive_redeemables_limit_exceeded` | +| message`string` | **Example:**Applicable exclusive redeemables limit exceeded
| + +## Validations Redeemable Skipped Result Redeemables Category Limit Exceeded +| Attributes | Description | +|:-----|:--------| +| key`string` | Available values: `applicable_exclusive_redeemables_per_category_limit_exceeded` | +| message`string` | **Example:**Applicable exclusive redeemables limit per category exceeded
| + +## Validations Redeemable Skipped Result Exclusion Rules Not Met +| Attributes | Description | +|:-----|:--------| +| key`string` | Available values: `exclusion_rules_not_met` | +| message`string` | **Example:**Redeemable cannot be applied due to exclusion rules
| + +## Validations Redeemable Skipped Result Preceding Validation Failed +| Attributes | Description | +|:-----|:--------| +| key`string` | Available values: `preceding_validation_failed` | +| message`string` | **Example:**Redeemable cannot be applied due to preceding validation failure
| + +## Simple Customer +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique identifier of an existing customer. It is assigned by Voucherify.
| +| name`string` |Customer's first and last name.
| +| email`string` |Customer's email address.
| +| source_id`string` |A unique identifier of the customer. It can be a customer ID or email from a CRM system, database, or a third-party service.
| +| metadata`object` |A set of custom key/value pairs that are attached to the customer. It stores all custom attributes assigned to the customer.
| +| object`string` |The type of the object represented by JSON.
Available values: `customer` | + +## Promotion Tier +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique promotion tier ID.
**Example:**promo_63fYCt81Aw0h7lzyRkrGZh9p
| +| created_at`string` |Timestamp representing the date and time when the promotion tier was created. The value is shown in the ISO 8601 format.
**Example:**2021-12-15T11:34:01.333Z
| +| updated_at`string` |Timestamp representing the date and time when the promotion tier was updated. The value is shown in the ISO 8601 format.
**Example:**2022-02-09T09:20:05.603Z
| +| name`string` |Name of the promotion tier.
| +| banner`string` |Text to be displayed to your customers on your website.
| +| action`object` |Contains details about the discount applied by the promotion tier.
Attributes | Description |
---|---|
discount | See: Discount |
The metadata object stores all custom attributes assigned to the promotion tier. A set of key/value pairs that you can attach to a promotion tier object. It can be useful for storing additional information about the promotion tier in a structured format.
| +| hierarchy`integer` |The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy.
| +| promotion_id`string` |Promotion unique ID.
| +| campaign`object` |Contains details about promotion tier's parent campaign.
Attributes | Description |
---|---|
idstring | Unique campaign ID. |
start_datestring | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is inactive before this date. Example:2022-09-22T00:00:00.000Z |
expiration_datestring | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is inactive after this date. Example:2022-09-30T00:00:00.000Z |
validity_timeframe | See: Validity Timeframe |
validity_day_of_week | See: Validity Day Of Week |
validity_hours | See: Validity Hours |
activeboolean | A flag indicating whether the campaign is active or not active. A campaign can be disabled even though it's within the active period defined by the
|
category_idstring | Unique category ID that this campaign belongs to. Example:cat_0b688929a2476386a6 |
objectstring | The type of the object represented by the campaign object. This object stores information about the campaign. |
Promotion tier's parent campaign's unique ID.
| +| active`boolean` |A flag to toggle the promotion tier on or off. You can disable a promotion tier even though it's within the active period defined by the start_date
and expiration_date
.
true
indicates an active promotion tierfalse
indicates an inactive promotion tierActivation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Promotion tier is inactive before this date.
**Example:**2022-09-23T00:00:00.000Z
| +| expiration_date`string` |Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is inactive after this date.
**Example:**2022-09-26T00:00:00.000Z
| +| validity_timeframe | See: [Validity Timeframe](#validity-timeframe) | +| validity_day_of_week | See: [Validity Day Of Week](#validity-day-of-week) | +| validity_hours | See: [Validity Hours](#validity-hours) | +| summary`object` |Contains statistics about promotion tier redemptions and orders.
Attributes | Description | ||||||
---|---|---|---|---|---|---|---|
redemptionsobject | Contains statistics about promotion tier redemptions.
| ||||||
ordersobject | Contains statistics about orders related to the promotion tier.
|
The type of the object represented by JSON. This object stores information about the promotion tier.
| +| validation_rule_assignments | See: [Validation Rule Assignments List](#validation-rule-assignments-list) | +| category_id`string` |Promotion tier category ID.
**Example:**cat_0c9da30e7116ba6bba
| +| categories`array` | Array of [Category](#category) | + +## Redemption Reward Result +| Attributes | Description | +|:-----|:--------| +| customer | [Simple Customer](#simple-customer) | +| assignment_id`string`, `null` |Unique reward assignment ID assigned by Voucherify.
| +| voucher | [Voucher](#voucher) | +| product | [Product](#product) | +| sku | [SKU Object](#sku-object) | +| loyalty_tier_id`string`, `null` |Unique loyalty tier ID assigned by Voucherify.
| +| id`string` |Unique reward ID.
**Example:**rew_0bc92f81a6801f9bca
| +| name`string` |Name of the reward.
**Example:**Reward Name
| +| object`string` |The type of the object represented by the JSON
Available values: `reward` | +| created_at`string` |Timestamp representing the date and time when the redemption was created. The value is shown in the ISO 8601 format.
**Example:**2021-12-22T10:13:06.487Z
| +| updated_at`string` |Timestamp in ISO 8601 format indicating when the reward was updated.
**Example:**2022-10-03T12:24:58.008Z
| +| parameters`object` |These are parameters representing a material reward.
Attributes | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
campaignobject | Defines the product redeemed as a reward.
| ||||||||
productobject | Defines the product redeemed as a reward.
| ||||||||
coinobject | Defines the ratio by mapping the number of loyalty points in
|
A set of custom key/value pairs that you can attach to a reward. The metadata object stores all custom attributes assigned to the reward.
| +| type`string` |Reward type.
Available values: `CAMPAIGN`, `COIN`, `MATERIAL` | + +## Voucher Base +| Attributes | Description | +|:-----|:--------| +| id`string` |Assigned by the Voucherify API, identifies the voucher.
**Example:**v_mkZN9v7vjYUadXnHrMza8W5c34fE5KiV
| +| code`string` |A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters.
**Example:**WVPblOYX
| +| campaign`string` |A unique campaign name, identifies the voucher's parent campaign.
**Example:**Gift Card Campaign
| +| campaign_id`string` |Assigned by the Voucherify API, identifies the voucher's parent campaign.
**Example:**camp_FNYR4jhqZBM9xTptxDGgeNBV
| +| category`string` |Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint.
| +| category_id`string` |Unique category ID assigned by Voucherify.
**Example:**cat_0bb343dee3cdb5ec0c
| +| type`string` |Defines the type of the voucher.
Available values: `GIFT_VOUCHER`, `DISCOUNT_VOUCHER`, `LOYALTY_CARD` | +| discount | See: [Discount](#discount) | +| gift`object` |Object representing gift parameters. Child attributes are present only if type
is GIFT_VOUCHER
. Defaults to null
.
Attributes | Description |
---|---|
amountinteger | Total gift card income over the lifetime of the card. The value is multiplied by 100 to represent 2 decimal places. For example 10000 |
subtracted_amountinteger | Total amount of subtracted credits over the gift card lifetime. The value is multiplied by 100 to represent 2 decimal places. For example |
balanceinteger | Available funds. The value is multiplied by 100 to represent 2 decimal places. For example 500 |
effectstring | Defines how the credits are applied to the customer's order. Available values:APPLY_TO_ORDER , APPLY_TO_ITEMS |
Object representing loyalty card parameters. Child attributes are present only if type
is LOYALTY_CARD
. Defaults to null
.
Attributes | Description |
---|---|
pointsinteger | Total number of points added to the loyalty card over its lifespan. Example:7000 |
balanceinteger | Points available for reward redemption. This is calculated as follows: 6970 |
next_expiration_datestring | The next closest date when the next set of points are due to expire. Example:2023-05-30 |
next_expiration_pointsinteger | The amount of points that are set to expire next. |
pending_pointsinteger | Shows the number of pending points that will be added to the loyalty card when they are activated automatically or manually. |
expired_pointsinteger | Shows the total number of expired points over the lifetime of the loyalty card. |
subtracted_pointsinteger | Shows the total number of subtracted points over the lifetime of the loyalty card. |
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_date`string` |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-timeframe) | +| validity_day_of_week | See: [Validity Day Of Week](#validity-day-of-week) | +| validity_hours | See: [Validity Hours](#validity-hours) | +| active`boolean`, `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 start_date
and expiration_date
.
true
indicates an active voucherfalse
indicates an inactive voucherAn optional field to keep any extra textual information about the code such as a code description and details.
| +| metadata`object` |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](#voucher-assets) | +| is_referral_code`boolean`, `null` |Flag indicating whether this voucher is a referral code; true
for campaign type REFERRAL_PROGRAM
.
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_at`string` |Timestamp representing the date and time when the voucher was last updated in ISO 8601 format.
**Example:**2021-12-22T10:14:45.316Z
| +| holder_id`string` |Unique customer identifier of the redeemable holder. It equals to the customer ID assigned by Voucherify.
**Example:**cust_eWgXlBBiY6THFRJwX45Iakv4
| +| referrer_id`string` |Unique identifier of the referring person.
**Example:**cust_Vzck5i8U3OhcEUFY6MKhN9Rv
| +| object`string` |The type of the object represented by JSON. Default is voucher
.
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.
Attributes | Description |
---|---|
objectstring | The type of the object represented is by default |
countinteger | Publication events counter. Example:0 |
urlstring | The endpoint where this list of publications can be accessed using a GET method. /v1/vouchers/WVPblOYX/publications?page=1&limit=10 |
Stores a summary of redemptions that have been applied to the voucher.
Attributes | Description |
---|---|
quantityinteger | How many times a voucher can be redeemed. A |
redeemed_quantityinteger | How many times a voucher has already been redeemed. Example:1 |
redeemed_pointsinteger | Total loyalty points redeemed. Example:100000 |
objectstring | The type of the object represented is by default |
urlstring | The endpoint where this list of redemptions can be accessed using a GET method. /v1/vouchers/WVPblOYX/redemptions?page=1&limit=10 |
The type of the object represented by JSON. This object stores information about validation rules assignments.
Available values: `list` | +| data_ref`string` |Identifies the name of the attribute that contains the array of validation rules assignments.
Available values: `data` | +| data`array` |Contains array of validation rules assignments.
Array of [Business Validation Rule Assignment](#business-validation-rule-assignment) | +| total`integer` |Total number of validation rules assignments.
| + +## Category +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique category ID assigned by Voucherify.
| +| name`string` |Category name.
| +| hierarchy`integer` |Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value.
| +| object`string` |The type of the object represented by the JSON. This object stores information about the category.
Available values: `category` | +| created_at`string` |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_at`string` |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
| + +## Discount +Contains information about discount.
+ +One of: + +[Amount](#amount), [Unit](#unit), [Unit Multiple](#unit-multiple), [Percent](#percent), [Fixed](#fixed) + +## Validity Timeframe +| Attributes | Description | +|:-----|:--------| +| duration`string` |Defines the amount of time an earning rule will be active in ISO 8601 format. For example, an earning rule with a duration
of PT1H
will be valid for a duration of one hour.
PT1H
| +| interval`string` |Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, an earning rule with an interval
of P2D
will be valid every other day.
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
SaturdayDefines the reccuring period(s) when the resource is active. The periods should not overlap.
Array of:Attributes | Description |
---|---|
start_timestring | Defines the starting hour of validity in the HH:mm format. The resource is inactive before this time. Example:12:00 |
days_of_weekarray | Integer array corresponding to the particular days of the week in which the resource is valid.
|
expiration_timestring | Defines the ending hour of validity in the HH:mm format. The resource is inactive after this time. Example:14:00 |
The type of the object represented by JSON. This object stores information about validation rule assignments.
| +| data_ref`string` |Identifies the name of the JSON property that contains the array of validation rule assignments.
| +| data`array` |A dictionary that contains an array of validation rule assignments.
Array of [Validation Rule Assignment](#validation-rule-assignment) | +| total`integer` |Total number of validation rule assignments.
| + +## Voucher +This is an object representing a voucher with categories and validation rules assignments.
+ +All of: + +1. [Voucher Base](#voucher-base) +2.Attributes | Description |
---|---|
categoriesarray | Contains details about the category. Array of Category |
validation_rules_assignments | See: Validation Rules Assignments List |
This is an object representing a product.
This entity should be used to map product items from your inventory management system. The aim of products is to build which reflect product-specific campaigns.
+ +All of: + +1. [Product without Skus Object](#product-without-skus-object) +2.Attributes | Description |
---|---|
skus | See: Skus List For Product |
A unique identifier that represents the SKU and is assigned by Voucherify.
**Example:**sku_0b1621b319d248b79f
| +| source_id`string`, `null` |A unique SKU identifier from your inventory system.
**Example:**sku_source_id_4
| +| product_id`string` |The parent product's unique ID.
**Example:**prod_0b15f6b9f650c16990
| +| sku`string`, `null` |Unique user-defined SKU name.
**Example:**Large Pink Shirt
| +| price`integer`, `null` |Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as $100.00
being expressed as 10000
.
SKU price currency.
**Example:**USD
| +| attributes`object` |The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family.
| +| image_url`string`, `null` |The HTTPS URL pointing to the .png or .jpg file that will be used to render the SKU image.
| +| metadata`object` |The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections.
| +| created_at`string` |Timestamp representing the date and time when the SKU was created. The value is shown in the ISO 8601 format.
**Example:**2022-05-17T10:36:30.187Z
| +| updated_at`string`, `null` |Timestamp representing the date and time when the SKU was updated. The value is shown in the ISO 8601 format.
**Example:**2022-05-17T10:55:09.137Z
| +| object`string` |The type of the object represented by JSON. This object stores information about the SKU
.
Stores Quick Response (QR) representation of encrypted code.
Attributes | Description |
---|---|
idstring | Encrypted voucher code ID. Example:U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK+t4pp7U7oFzjGJzj9q/bmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg+BaZk5QwXMf8k/OzSlOEVybpwSq+AiqPoNtjeuqtIgkDyvT6Q== |
urlstring | URL to QR code Optional: Attach query parameters to base URL to customize the image of the encrypted voucher code.
https://dev.dl.voucherify.io/api/v1/assets/qr/U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK%2Bt4pp7U7oFzjGJzj9q%2FbmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg%2BBaZk5QwXMf8k%2FOzSlOEVybpwSq%2BAiqPoNtjeuqtIgkDyvT6Q%3D%3D |
Stores barcode representation of encrypted code.
Attributes | Description |
---|---|
idstring | Encrypted voucher code ID. Example:U2FsdGVkX19eJhGfWwUrH9+tulBkON+AnMktic+N6CVWzZ9+fHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ+kJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6/pFs61apEn9SJx32ttCF6d3oxKISQQ== |
urlstring | URL to barcode Optional: Attach query parameters to base URL to customize the image of the encrypted voucher code.
https://dev.dl.voucherify.io/api/v1/assets/barcode/U2FsdGVkX19eJhGfWwUrH9%2BtulBkON%2BAnMktic%2BN6CVWzZ9%2BfHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ%2BkJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6%2FpFs61apEn9SJx32ttCF6d3oxKISQQ%3D%3D |
The unique identifier for a assignment
| +| rule_id`string` |The unique identifier for a rule
| +| related_object_id`string` |The unique identifier for a related object
| +| related_object_type`string` |The type of related object
| +| created_at`string` |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_at`string` |Timestamp representing the date and time when the object was last updated in ISO 8601 format.
**Example:**2022-03-09T11:19:04.819Z
| +| object`string` |The type of the object represented by JSON.
Available values: `validation_rules_assignment` | +| validation_status`string` |The validation status of the assignment
Available values: `VALID`, `PARTIALLY_VALID`, `INVALID` | +| validation_omitted_rules`array` |The list of omitted rules
| + +## Amount +| Attributes | Description | +|:-----|:--------| +| type`string` |Defines the type of the voucher.
Available values: `AMOUNT` | +| amount_off`number` |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_formula`string` | | +| aggregated_amount_limit`integer` |Maximum discount amount per order.
| +| effect |Defines how the discount is applied to the customer's order.
[Discount Amount Vouchers Effect Types](#discount-amount-vouchers-effect-types) | +| is_dynamic`boolean` |Flag indicating whether the discount was calculated using a formula.
| + +## Unit +| Attributes | Description | +|:-----|:--------| +| type`string` |Discount type.
Available values: `UNIT` | +| unit_off`integer` |Number of units to be granted a full value discount.
| +| unit_off_formula`string` |Formula used to calculate the number of units.
| +| effect |Defines how the unit is added to the customer's order.
[Discount Unit Vouchers Effect Types](#discount-unit-vouchers-effect-types) | +| unit_type`string` |The product deemed as free, chosen from product inventory (e.g. time, items).
| +| product |Contains information about the product.
[Simple Product Discount Unit](#simple-product-discount-unit) | +| sku | See: [Simple Sku Discount Unit](#simple-sku-discount-unit) | +| is_dynamic`boolean` |Flag indicating whether the discount was calculated using a formula.
| + +## Unit Multiple +| Attributes | Description | +|:-----|:--------| +| type`string` |Discount type.
Available values: `UNIT` | +| effect`string` |Defines how the discount is applied to the customer's order.
Available values: `ADD_MANY_ITEMS` | +| units`array` | Array of [One Unit](#one-unit) | + +## Percent +| Attributes | Description | +|:-----|:--------| +| type`string` |Defines the type of the voucher.
Available values: `PERCENT` | +| percent_off`number` |The percent discount that the customer will receive.
| +| percent_off_formula`string` | | +| amount_limit`number` |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_limit`integer` |Maximum discount amount per order.
| +| effect |Defines how the discount is applied to the customer's order.
[Discount Percent Vouchers Effect Types](#discount-percent-vouchers-effect-types) | +| is_dynamic`boolean` |Flag indicating whether the discount was calculated using a formula.
| + +## Fixed +| Attributes | Description | +|:-----|:--------| +| type`string` |Defines the type of the voucher.
Available values: `FIXED` | +| fixed_amount`number` |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_formula
parameter is present in the fixed amount definition, this value becomes the fallback value. As a result, if the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed value.
Defines how the discount is applied to the customer's order.
[Discount Fixed Vouchers Effect Types](#discount-fixed-vouchers-effect-types) | +| is_dynamic`boolean` |Flag indicating whether the discount was calculated using a formula.
| + +## Validation Rule Assignment +| Attributes | Description | +|:-----|:--------| +| id`string` |Validation rule assignment ID.
**Example:**asgm_74F7QZoYbUoljwQO
| +| rule_id`string` |Validation rule ID.
**Example:**val_4j7DCRm2IS59
| +| related_object_id`string` |The resource ID to which the validation rule was assigned.
**Example:**v_JtWunK6jUo7X2qOFj0SyRHq4p9tgENlT
| +| related_object_type`string` |The type of resource to which the validation rule was assigned.
Available values: `voucher`, `campaign`, `earning_rule`, `reward_assignment`, `promotion_tier`, `distribution` | +| created_at`string` |Timestamp representing the date and time when the validation rule assignment was created. The value is shown in the ISO 8601 format.
**Example:**2022-02-17T08:18:15.085Z
| +| object`string` |The type of the object represented by the ID.
Available values: `validation_rules_assignment` | + +## Product without Skus Object +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique product ID assigned by Voucherify.
**Example:**prod_0b1da8105693710357
| +| source_id`string`, `null` |Unique product source ID.
**Example:**productSourceID16
| +| name`string`, `null` |Unique user-defined product name.
**Example:**T-shirt
| +| price`integer`, `null` |Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as $100.00
being expressed as 10000
.
A list of product attributes whose values you can customize for given SKUs: ["color","size","ranking"]
. Each child SKU can have a unique value for a given attribute.
The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections.
| +| image_url`string`, `null` |The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image.
**Example:**https://images.com/original.jpg
| +| created_at`string` |Timestamp representing the date and time when the product was created. The value is shown in the ISO 8601 format.
**Example:**2022-05-23T06:52:55.008Z
| +| updated_at`string`, `null` |Timestamp representing the date and time when the product was updated. The value is shown in the ISO 8601 format.
**Example:**2022-05-23T09:24:07.405Z
| +| object`string` |The type of the object represented by JSON. This object stores information about the product.
Available values: `product` | + +## Skus List For Product +| Attributes | Description | +|:-----|:--------| +| object`string` |The type of the object represented by JSON. This object stores information about SKUs.
| +| data_ref`string` |Identifies the name of the JSON property that contains the array of SKUs.
| +| data`array` |A dictionary that contains an array of SKUs.
Array of [SKU Object](#sku-object) | +| total`integer` |Total number of SKUs in the product.
| + +## 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 | +|:-----|:--------| +| id`string` |Unique product ID, assigned by Voucherify.
| +| source_id`string` |Product's source ID.
| +| name`string` |Product name.
| + +## Simple Sku Discount Unit +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique SKU ID, assigned by Voucherify.
| +| source_id`string` |Product variant's source ID.
| +| name`string` |Sku name
| + +## One Unit +| Attributes | Description | +|:-----|:--------| +| unit_off`number` |Number of units to be granted a full value discount.
| +| unit_off_formula`string` |Formula used to calculate the number of units.
| +| effect`string` |Defines how the unit is added to the customer's order.
Available values: `ADD_NEW_ITEMS`, `ADD_MISSING_ITEMS` | +| unit_type`string` |The product deemed as free, chosen from product inventory (e.g. time, items).
| +| product |Contains information about the product.
[Simple Product Discount Unit](#simple-product-discount-unit) | +| sku |Contains information about the sku.
[Simple Sku Discount Unit](#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` + +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/REDEMPTIONS-Rollback-Redemption-Object.md b/reference-docs/REDEMPTIONS-Rollback-Redemption-Object.md new file mode 100644 index 00000000..6689725b --- /dev/null +++ b/reference-docs/REDEMPTIONS-Rollback-Redemption-Object.md @@ -0,0 +1,414 @@ +--- +title: Rollback Redemption Object +type: basic +categorySlug: voucherify-api +parentDocSlug: redemptions +slug: rollback-redemption-object +hidden: false +order: 2 +--- + +## Redemption Rollback +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique identifier of the redemption rollback.
**Example:**rr_0efeb3dab05e62e599
| +| object`string` |The type of the object represented by the JSON
Available values: `redemption_rollback` | +| date`string` |Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.
**Example:**2021-12-22T10:13:06.487Z
| +| customer_id`string`, `null` |Unique customer ID of the redeeming customer.
**Example:**cust_i8t5Tt6eiKG5K79KQlJ0Vs64
| +| tracking_id`string`, `null` |Hashed customer source ID.
| +| metadata`object`, `null` |The metadata object stores all custom attributes assigned to the redemption.
| +| amount`integer` |For gift cards, this represents the number of the credits restored to the card in the rolledback redemption. The number is a negative integer in the smallest currency unit, e.g. -100 cents for $1.00 added back to the card.
For loyalty cards, this represents the number of loyalty points restored to the card in the rolledback redemption. The number is a negative integer.
-10000
| +| redemption`string`, `null` |Unique redemption ID of the parent redemption.
**Example:**r_0c656311b5878a2031
| +| reason`string` |System generated cause for the redemption being invalid in the context of the provided parameters.
| +| result`string` |Redemption result.
Available values: `SUCCESS`, `FAILURE` | +| status`string` |Redemption status.
Available values: `SUCCEEDED`, `FAILED` | +| failure_code`string` |If the result is FAILURE
, this parameter will provide a generic reason as to why the redemption failed.
customer_rules_violated
| +| failure_message`string` |If the result is FAILURE
, this parameter will provide a more expanded reason as to why the redemption failed.
Attributes | Description |
---|---|
itemsarray | Array of items applied to the order. It can include up to 500 items. Array of Order Item Calculated |
Defines the details of the channel through which the redemption was issued.
Attributes | Description |
---|---|
channel_idstring | Unique identifier of the channel which was used by the user performing the redemption rollback. This is either a user ID from the user using the Voucherify Dashboard or an X-APP-Id of a user using the API. Example:user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH |
channel_typestring | The source of the channel for the redemption. A USER , API |
Defines the related object.
Available values: `voucher`, `promotion_tier`, `redemption` | +| related_object_id`string` |Unique identifier of the related object. It is assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno
for a voucher.
Defines the details of the voucher being originally redeemed.
[Voucher](#voucher) | +| promotion_tier |Contains details of the promotion tier and the parent campaign.
[Promotion Tier](#promotion-tier) | +| reward | See: [Redemption Reward Result](#redemption-reward-result) | +| gift`object` |Contains the amount returned to the gift card in the redemption rollback. It is expressed as a negative integer.
Attributes | Description |
---|---|
amountinteger | Amount returned to the gift card as a result of the redemption rollback and expressed as a negative integer. The amount is expressed as the smallest currency unit (e.g. -100 cents for $1.00 returned). |
Contains the number of points returned to the loyalty card in the reward redemption rollback. It is expressed as a negative integer.
Attributes | Description |
---|---|
pointsinteger | Number of points being returned to the loyalty card for the reward redemption rollback. It is expressed as a negative integer. |
Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.
| +| source_id`string`, `null` |Unique source ID of an existing order that will be linked to the redemption of this request.
| +| status`string` |The order status.
Available values: `CREATED`, `PAID`, `CANCELED`, `FULFILLED` | +| amount`integer` |This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| initial_amount`integer` |This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| discount_amount`integer` |Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| items_discount_amount`integer` |Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| total_discount_amount`integer` |Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| total_amount`integer` |Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| applied_discount_amount`integer` |This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| items_applied_discount_amount`integer` |Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).sum(items, i => i.applied_discount_amount)
Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).total_applied_discount_amount
= applied_discount_amount
+ items_applied_discount_amount
A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.
| +| object`string` |The type of the object represented by JSON.
Available values: `order` | +| created_at`string` |Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.
**Example:**2021-12-22T10:13:06.487Z
| +| updated_at`string`, `null` |Timestamp representing the date and time when the order was last updated in ISO 8601 format.
**Example:**2021-12-22T10:14:45.316Z
| +| customer_id`string`, `null` |Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify.
**Example:**cust_7iUa6ICKyU6gH40dBU25kQU1
| +| referrer_id`string`, `null` |Unique referrer ID.
**Example:**cust_nM4jqPiaXUvQdVSA6vTRUnix
| +| customer | [Customer Id](#customer-id) | +| referrer | [Referrer Id](#referrer-id) | +| redemptions`object` |Attributes | Description |
---|---|
[propertyName] | See: Order Redemptions |
Unique identifier of the order line item.
| +| sku_id`string` |Unique identifier of the SKU. It is assigned by Voucherify.
| +| product_id`string` |Unique identifier of the product. It is assigned by Voucherify.
| +| related_object`string` |Used along with the source_id property, can be set to either sku or product.
Available values: `product`, `sku` | +| source_id`string` |The merchant's product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service.
| +| quantity`integer` |The quantity of the particular item in the cart.
| +| discount_quantity`integer` |Number of dicounted items.
| +| initial_quantity`integer` |A positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items' quantity.
| +| amount`integer` |The total amount of the order item (price * quantity).
| +| discount_amount`integer` |Sum of all order-item-level discounts applied to the order.
| +| applied_discount_amount`integer` |This field shows the order-level discount applied.
| +| applied_discount_quantity`integer` |Number of the discounted items applied in the transaction.
| +| applied_quantity`integer` |Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.
| +| applied_quantity_amount`integer` |Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.
| +| initial_amount`integer` |A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.
| +| price`integer` |Unit price of an item. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents
for $100.00
.
Final order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the amount
.subtotal_amount
=amount
-applied_discount_amount
An object containing details of the related product.
Attributes | Description |
---|---|
idstring | A unique identifier that represents the product and is assigned by Voucherify. |
source_idstring | The merchant's product ID (if it is different than Voucherify's product ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service. |
overrideboolean | The override set to |
namestring | Product name. |
metadataobject | A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections. |
pricenumber | Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00). |
An object containing details of the related SKU.
Attributes | Description |
---|---|
idstring | A unique identifier that represents the SKU and is assigned by Voucherify. |
source_idstring | The merchant's SKU ID (if it is different than Voucherify's SKU ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service. |
overrideboolean | The override set to |
skustring | The SKU name. |
pricenumber | SKU price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00). |
metadataobject | A set of custom key/value pairs that you can attach to an SKU. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections. |
The type of the object represented by JSON.
Available values: `order_item` | +| metadata`object` |A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas.
| + +## Simple Customer +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique identifier of an existing customer. It is assigned by Voucherify.
| +| name`string` |Customer's first and last name.
| +| email`string` |Customer's email address.
| +| source_id`string` |A unique identifier of the customer. It can be a customer ID or email from a CRM system, database, or a third-party service.
| +| metadata`object` |A set of custom key/value pairs that are attached to the customer. It stores all custom attributes assigned to the customer.
| +| object`string` |The type of the object represented by JSON.
Available values: `customer` | + +## Voucher +This is an object representing a voucher with categories and validation rules assignments.
+ +All of: + +1. [Voucher Base](#voucher-base) +2.Attributes | Description |
---|---|
categoriesarray | Contains details about the category. Array of Category |
validation_rules_assignments | See: Validation Rules Assignments List |
Unique promotion tier ID.
**Example:**promo_63fYCt81Aw0h7lzyRkrGZh9p
| +| created_at`string` |Timestamp representing the date and time when the promotion tier was created. The value is shown in the ISO 8601 format.
**Example:**2021-12-15T11:34:01.333Z
| +| updated_at`string` |Timestamp representing the date and time when the promotion tier was updated. The value is shown in the ISO 8601 format.
**Example:**2022-02-09T09:20:05.603Z
| +| name`string` |Name of the promotion tier.
| +| banner`string` |Text to be displayed to your customers on your website.
| +| action`object` |Contains details about the discount applied by the promotion tier.
Attributes | Description |
---|---|
discount | See: Discount |
The metadata object stores all custom attributes assigned to the promotion tier. A set of key/value pairs that you can attach to a promotion tier object. It can be useful for storing additional information about the promotion tier in a structured format.
| +| hierarchy`integer` |The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy.
| +| promotion_id`string` |Promotion unique ID.
| +| campaign`object` |Contains details about promotion tier's parent campaign.
Attributes | Description |
---|---|
idstring | Unique campaign ID. |
start_datestring | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is inactive before this date. Example:2022-09-22T00:00:00.000Z |
expiration_datestring | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is inactive after this date. Example:2022-09-30T00:00:00.000Z |
validity_timeframe | See: Validity Timeframe |
validity_day_of_week | See: Validity Day Of Week |
validity_hours | See: Validity Hours |
activeboolean | A flag indicating whether the campaign is active or not active. A campaign can be disabled even though it's within the active period defined by the
|
category_idstring | Unique category ID that this campaign belongs to. Example:cat_0b688929a2476386a6 |
objectstring | The type of the object represented by the campaign object. This object stores information about the campaign. |
Promotion tier's parent campaign's unique ID.
| +| active`boolean` |A flag to toggle the promotion tier on or off. You can disable a promotion tier even though it's within the active period defined by the start_date
and expiration_date
.
true
indicates an active promotion tierfalse
indicates an inactive promotion tierActivation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Promotion tier is inactive before this date.
**Example:**2022-09-23T00:00:00.000Z
| +| expiration_date`string` |Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is inactive after this date.
**Example:**2022-09-26T00:00:00.000Z
| +| validity_timeframe | See: [Validity Timeframe](#validity-timeframe) | +| validity_day_of_week | See: [Validity Day Of Week](#validity-day-of-week) | +| validity_hours | See: [Validity Hours](#validity-hours) | +| summary`object` |Contains statistics about promotion tier redemptions and orders.
Attributes | Description | ||||||
---|---|---|---|---|---|---|---|
redemptionsobject | Contains statistics about promotion tier redemptions.
| ||||||
ordersobject | Contains statistics about orders related to the promotion tier.
|
The type of the object represented by JSON. This object stores information about the promotion tier.
| +| validation_rule_assignments | See: [Validation Rule Assignments List](#validation-rule-assignments-list) | +| category_id`string` |Promotion tier category ID.
**Example:**cat_0c9da30e7116ba6bba
| +| categories`array` | Array of [Category](#category) | + +## Redemption Reward Result +| Attributes | Description | +|:-----|:--------| +| customer | [Simple Customer](#simple-customer) | +| assignment_id`string`, `null` |Unique reward assignment ID assigned by Voucherify.
| +| voucher | [Voucher](#voucher) | +| product | [Product](#product) | +| sku | [SKU Object](#sku-object) | +| loyalty_tier_id`string`, `null` |Unique loyalty tier ID assigned by Voucherify.
| +| id`string` |Unique reward ID.
**Example:**rew_0bc92f81a6801f9bca
| +| name`string` |Name of the reward.
**Example:**Reward Name
| +| object`string` |The type of the object represented by the JSON
Available values: `reward` | +| created_at`string` |Timestamp representing the date and time when the redemption was created. The value is shown in the ISO 8601 format.
**Example:**2021-12-22T10:13:06.487Z
| +| updated_at`string` |Timestamp in ISO 8601 format indicating when the reward was updated.
**Example:**2022-10-03T12:24:58.008Z
| +| parameters`object` |These are parameters representing a material reward.
Attributes | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
campaignobject | Defines the product redeemed as a reward.
| ||||||||
productobject | Defines the product redeemed as a reward.
| ||||||||
coinobject | Defines the ratio by mapping the number of loyalty points in
|
A set of custom key/value pairs that you can attach to a reward. The metadata object stores all custom attributes assigned to the reward.
| +| type`string` |Reward type.
Available values: `CAMPAIGN`, `COIN`, `MATERIAL` | + +## Customer Id +| Attributes | Description | +|:-----|:--------| +| id`string` |A unique identifier of an existing customer.
| +| object`string` |The type of the object represented by JSON.
Available values: `customer` | + +## Referrer Id +[Customer Id](#customer-id) + +## Order Redemptions +| Attributes | Description | +|:-----|:--------| +| date`string` |Timestamp representing the date and time when the redemption was created. The value is shown in the ISO 8601 format.
**Example:**2022-09-02T17:06:56.649Z
| +| rollback_id`string` |Unique ID of the redemption rollback.
**Example:**rr_0c63c84eb78ee0a6c0
| +| rollback_date`string` |Timestamp representing the date and time when the redemption rollback was created. The value is shown in the ISO 8601 format.
**Example:**2023-01-31T14:18:37.150Z
| +| related_object_type`string` |The source of the incentive.
| +| related_object_id`string` |Unique ID of the parent redemption.
**Example:**r_0ba186c4824e4881e1
| +| related_object_parent_id`string` |Represent's the campaign ID of the voucher if the redemption was based on a voucher that was part of bulk codes generated within a campaign. In case of a promotion tier, this represents the campaign ID of the promotion tier's parent campaign.
| +| stacked`array` |Contains a list of unique IDs of child redemptions, which belong to the stacked incentives.
| +| rollback_stacked`array` |Lists the rollback redemption IDs of the particular child redemptions.
| + +## Voucher Base +| Attributes | Description | +|:-----|:--------| +| id`string` |Assigned by the Voucherify API, identifies the voucher.
**Example:**v_mkZN9v7vjYUadXnHrMza8W5c34fE5KiV
| +| code`string` |A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters.
**Example:**WVPblOYX
| +| campaign`string` |A unique campaign name, identifies the voucher's parent campaign.
**Example:**Gift Card Campaign
| +| campaign_id`string` |Assigned by the Voucherify API, identifies the voucher's parent campaign.
**Example:**camp_FNYR4jhqZBM9xTptxDGgeNBV
| +| category`string` |Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint.
| +| category_id`string` |Unique category ID assigned by Voucherify.
**Example:**cat_0bb343dee3cdb5ec0c
| +| type`string` |Defines the type of the voucher.
Available values: `GIFT_VOUCHER`, `DISCOUNT_VOUCHER`, `LOYALTY_CARD` | +| discount | See: [Discount](#discount) | +| gift`object` |Object representing gift parameters. Child attributes are present only if type
is GIFT_VOUCHER
. Defaults to null
.
Attributes | Description |
---|---|
amountinteger | Total gift card income over the lifetime of the card. The value is multiplied by 100 to represent 2 decimal places. For example 10000 |
subtracted_amountinteger | Total amount of subtracted credits over the gift card lifetime. The value is multiplied by 100 to represent 2 decimal places. For example |
balanceinteger | Available funds. The value is multiplied by 100 to represent 2 decimal places. For example 500 |
effectstring | Defines how the credits are applied to the customer's order. Available values:APPLY_TO_ORDER , APPLY_TO_ITEMS |
Object representing loyalty card parameters. Child attributes are present only if type
is LOYALTY_CARD
. Defaults to null
.
Attributes | Description |
---|---|
pointsinteger | Total number of points added to the loyalty card over its lifespan. Example:7000 |
balanceinteger | Points available for reward redemption. This is calculated as follows: 6970 |
next_expiration_datestring | The next closest date when the next set of points are due to expire. Example:2023-05-30 |
next_expiration_pointsinteger | The amount of points that are set to expire next. |
pending_pointsinteger | Shows the number of pending points that will be added to the loyalty card when they are activated automatically or manually. |
expired_pointsinteger | Shows the total number of expired points over the lifetime of the loyalty card. |
subtracted_pointsinteger | Shows the total number of subtracted points over the lifetime of the loyalty card. |
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_date`string` |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-timeframe) | +| validity_day_of_week | See: [Validity Day Of Week](#validity-day-of-week) | +| validity_hours | See: [Validity Hours](#validity-hours) | +| active`boolean`, `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 start_date
and expiration_date
.
true
indicates an active voucherfalse
indicates an inactive voucherAn optional field to keep any extra textual information about the code such as a code description and details.
| +| metadata`object` |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](#voucher-assets) | +| is_referral_code`boolean`, `null` |Flag indicating whether this voucher is a referral code; true
for campaign type REFERRAL_PROGRAM
.
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_at`string` |Timestamp representing the date and time when the voucher was last updated in ISO 8601 format.
**Example:**2021-12-22T10:14:45.316Z
| +| holder_id`string` |Unique customer identifier of the redeemable holder. It equals to the customer ID assigned by Voucherify.
**Example:**cust_eWgXlBBiY6THFRJwX45Iakv4
| +| referrer_id`string` |Unique identifier of the referring person.
**Example:**cust_Vzck5i8U3OhcEUFY6MKhN9Rv
| +| object`string` |The type of the object represented by JSON. Default is voucher
.
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.
Attributes | Description |
---|---|
objectstring | The type of the object represented is by default |
countinteger | Publication events counter. Example:0 |
urlstring | The endpoint where this list of publications can be accessed using a GET method. /v1/vouchers/WVPblOYX/publications?page=1&limit=10 |
Stores a summary of redemptions that have been applied to the voucher.
Attributes | Description |
---|---|
quantityinteger | How many times a voucher can be redeemed. A |
redeemed_quantityinteger | How many times a voucher has already been redeemed. Example:1 |
redeemed_pointsinteger | Total loyalty points redeemed. Example:100000 |
objectstring | The type of the object represented is by default |
urlstring | The endpoint where this list of redemptions can be accessed using a GET method. /v1/vouchers/WVPblOYX/redemptions?page=1&limit=10 |
Unique category ID assigned by Voucherify.
| +| name`string` |Category name.
| +| hierarchy`integer` |Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value.
| +| object`string` |The type of the object represented by the JSON. This object stores information about the category.
Available values: `category` | +| created_at`string` |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_at`string` |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 | +|:-----|:--------| +| object`string` |The type of the object represented by JSON. This object stores information about validation rules assignments.
Available values: `list` | +| data_ref`string` |Identifies the name of the attribute that contains the array of validation rules assignments.
Available values: `data` | +| data`array` |Contains array of validation rules assignments.
Array of [Business Validation Rule Assignment](#business-validation-rule-assignment) | +| total`integer` |Total number of validation rules assignments.
| + +## Discount +Contains information about discount.
+ +One of: + +[Amount](#amount), [Unit](#unit), [Unit Multiple](#unit-multiple), [Percent](#percent), [Fixed](#fixed) + +## Validity Timeframe +| Attributes | Description | +|:-----|:--------| +| duration`string` |Defines the amount of time an earning rule will be active in ISO 8601 format. For example, an earning rule with a duration
of PT1H
will be valid for a duration of one hour.
PT1H
| +| interval`string` |Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, an earning rule with an interval
of P2D
will be valid every other day.
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
SaturdayDefines the reccuring period(s) when the resource is active. The periods should not overlap.
Array of:Attributes | Description |
---|---|
start_timestring | Defines the starting hour of validity in the HH:mm format. The resource is inactive before this time. Example:12:00 |
days_of_weekarray | Integer array corresponding to the particular days of the week in which the resource is valid.
|
expiration_timestring | Defines the ending hour of validity in the HH:mm format. The resource is inactive after this time. Example:14:00 |
The type of the object represented by JSON. This object stores information about validation rule assignments.
| +| data_ref`string` |Identifies the name of the JSON property that contains the array of validation rule assignments.
| +| data`array` |A dictionary that contains an array of validation rule assignments.
Array of [Validation Rule Assignment](#validation-rule-assignment) | +| total`integer` |Total number of validation rule assignments.
| + +## Product +This is an object representing a product.
This entity should be used to map product items from your inventory management system. The aim of products is to build which reflect product-specific campaigns.
+ +All of: + +1. [Product without Skus Object](#product-without-skus-object) +2.Attributes | Description |
---|---|
skus | See: Skus List For Product |
A unique identifier that represents the SKU and is assigned by Voucherify.
**Example:**sku_0b1621b319d248b79f
| +| source_id`string`, `null` |A unique SKU identifier from your inventory system.
**Example:**sku_source_id_4
| +| product_id`string` |The parent product's unique ID.
**Example:**prod_0b15f6b9f650c16990
| +| sku`string`, `null` |Unique user-defined SKU name.
**Example:**Large Pink Shirt
| +| price`integer`, `null` |Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as $100.00
being expressed as 10000
.
SKU price currency.
**Example:**USD
| +| attributes`object` |The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family.
| +| image_url`string`, `null` |The HTTPS URL pointing to the .png or .jpg file that will be used to render the SKU image.
| +| metadata`object` |The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections.
| +| created_at`string` |Timestamp representing the date and time when the SKU was created. The value is shown in the ISO 8601 format.
**Example:**2022-05-17T10:36:30.187Z
| +| updated_at`string`, `null` |Timestamp representing the date and time when the SKU was updated. The value is shown in the ISO 8601 format.
**Example:**2022-05-17T10:55:09.137Z
| +| object`string` |The type of the object represented by JSON. This object stores information about the SKU
.
Stores Quick Response (QR) representation of encrypted code.
Attributes | Description |
---|---|
idstring | Encrypted voucher code ID. Example:U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK+t4pp7U7oFzjGJzj9q/bmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg+BaZk5QwXMf8k/OzSlOEVybpwSq+AiqPoNtjeuqtIgkDyvT6Q== |
urlstring | URL to QR code Optional: Attach query parameters to base URL to customize the image of the encrypted voucher code.
https://dev.dl.voucherify.io/api/v1/assets/qr/U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK%2Bt4pp7U7oFzjGJzj9q%2FbmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg%2BBaZk5QwXMf8k%2FOzSlOEVybpwSq%2BAiqPoNtjeuqtIgkDyvT6Q%3D%3D |
Stores barcode representation of encrypted code.
Attributes | Description |
---|---|
idstring | Encrypted voucher code ID. Example:U2FsdGVkX19eJhGfWwUrH9+tulBkON+AnMktic+N6CVWzZ9+fHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ+kJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6/pFs61apEn9SJx32ttCF6d3oxKISQQ== |
urlstring | URL to barcode Optional: Attach query parameters to base URL to customize the image of the encrypted voucher code.
https://dev.dl.voucherify.io/api/v1/assets/barcode/U2FsdGVkX19eJhGfWwUrH9%2BtulBkON%2BAnMktic%2BN6CVWzZ9%2BfHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ%2BkJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6%2FpFs61apEn9SJx32ttCF6d3oxKISQQ%3D%3D |
The unique identifier for a assignment
| +| rule_id`string` |The unique identifier for a rule
| +| related_object_id`string` |The unique identifier for a related object
| +| related_object_type`string` |The type of related object
| +| created_at`string` |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_at`string` |Timestamp representing the date and time when the object was last updated in ISO 8601 format.
**Example:**2022-03-09T11:19:04.819Z
| +| object`string` |The type of the object represented by JSON.
Available values: `validation_rules_assignment` | +| validation_status`string` |The validation status of the assignment
Available values: `VALID`, `PARTIALLY_VALID`, `INVALID` | +| validation_omitted_rules`array` |The list of omitted rules
| + +## Amount +| Attributes | Description | +|:-----|:--------| +| type`string` |Defines the type of the voucher.
Available values: `AMOUNT` | +| amount_off`number` |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_formula`string` | | +| aggregated_amount_limit`integer` |Maximum discount amount per order.
| +| effect |Defines how the discount is applied to the customer's order.
[Discount Amount Vouchers Effect Types](#discount-amount-vouchers-effect-types) | +| is_dynamic`boolean` |Flag indicating whether the discount was calculated using a formula.
| + +## Unit +| Attributes | Description | +|:-----|:--------| +| type`string` |Discount type.
Available values: `UNIT` | +| unit_off`integer` |Number of units to be granted a full value discount.
| +| unit_off_formula`string` |Formula used to calculate the number of units.
| +| effect |Defines how the unit is added to the customer's order.
[Discount Unit Vouchers Effect Types](#discount-unit-vouchers-effect-types) | +| unit_type`string` |The product deemed as free, chosen from product inventory (e.g. time, items).
| +| product |Contains information about the product.
[Simple Product Discount Unit](#simple-product-discount-unit) | +| sku | See: [Simple Sku Discount Unit](#simple-sku-discount-unit) | +| is_dynamic`boolean` |Flag indicating whether the discount was calculated using a formula.
| + +## Unit Multiple +| Attributes | Description | +|:-----|:--------| +| type`string` |Discount type.
Available values: `UNIT` | +| effect`string` |Defines how the discount is applied to the customer's order.
Available values: `ADD_MANY_ITEMS` | +| units`array` | Array of [One Unit](#one-unit) | + +## Percent +| Attributes | Description | +|:-----|:--------| +| type`string` |Defines the type of the voucher.
Available values: `PERCENT` | +| percent_off`number` |The percent discount that the customer will receive.
| +| percent_off_formula`string` | | +| amount_limit`number` |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_limit`integer` |Maximum discount amount per order.
| +| effect |Defines how the discount is applied to the customer's order.
[Discount Percent Vouchers Effect Types](#discount-percent-vouchers-effect-types) | +| is_dynamic`boolean` |Flag indicating whether the discount was calculated using a formula.
| + +## Fixed +| Attributes | Description | +|:-----|:--------| +| type`string` |Defines the type of the voucher.
Available values: `FIXED` | +| fixed_amount`number` |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_formula
parameter is present in the fixed amount definition, this value becomes the fallback value. As a result, if the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed value.
Defines how the discount is applied to the customer's order.
[Discount Fixed Vouchers Effect Types](#discount-fixed-vouchers-effect-types) | +| is_dynamic`boolean` |Flag indicating whether the discount was calculated using a formula.
| + +## Validation Rule Assignment +| Attributes | Description | +|:-----|:--------| +| id`string` |Validation rule assignment ID.
**Example:**asgm_74F7QZoYbUoljwQO
| +| rule_id`string` |Validation rule ID.
**Example:**val_4j7DCRm2IS59
| +| related_object_id`string` |The resource ID to which the validation rule was assigned.
**Example:**v_JtWunK6jUo7X2qOFj0SyRHq4p9tgENlT
| +| related_object_type`string` |The type of resource to which the validation rule was assigned.
Available values: `voucher`, `campaign`, `earning_rule`, `reward_assignment`, `promotion_tier`, `distribution` | +| created_at`string` |Timestamp representing the date and time when the validation rule assignment was created. The value is shown in the ISO 8601 format.
**Example:**2022-02-17T08:18:15.085Z
| +| object`string` |The type of the object represented by the ID.
Available values: `validation_rules_assignment` | + +## Product without Skus Object +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique product ID assigned by Voucherify.
**Example:**prod_0b1da8105693710357
| +| source_id`string`, `null` |Unique product source ID.
**Example:**productSourceID16
| +| name`string`, `null` |Unique user-defined product name.
**Example:**T-shirt
| +| price`integer`, `null` |Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as $100.00
being expressed as 10000
.
A list of product attributes whose values you can customize for given SKUs: ["color","size","ranking"]
. Each child SKU can have a unique value for a given attribute.
The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections.
| +| image_url`string`, `null` |The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image.
**Example:**https://images.com/original.jpg
| +| created_at`string` |Timestamp representing the date and time when the product was created. The value is shown in the ISO 8601 format.
**Example:**2022-05-23T06:52:55.008Z
| +| updated_at`string`, `null` |Timestamp representing the date and time when the product was updated. The value is shown in the ISO 8601 format.
**Example:**2022-05-23T09:24:07.405Z
| +| object`string` |The type of the object represented by JSON. This object stores information about the product.
Available values: `product` | + +## Skus List For Product +| Attributes | Description | +|:-----|:--------| +| object`string` |The type of the object represented by JSON. This object stores information about SKUs.
| +| data_ref`string` |Identifies the name of the JSON property that contains the array of SKUs.
| +| data`array` |A dictionary that contains an array of SKUs.
Array of [SKU Object](#sku-object) | +| total`integer` |Total number of SKUs in the product.
| + +## 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 | +|:-----|:--------| +| id`string` |Unique product ID, assigned by Voucherify.
| +| source_id`string` |Product's source ID.
| +| name`string` |Product name.
| + +## Simple Sku Discount Unit +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique SKU ID, assigned by Voucherify.
| +| source_id`string` |Product variant's source ID.
| +| name`string` |Sku name
| + +## One Unit +| Attributes | Description | +|:-----|:--------| +| unit_off`number` |Number of units to be granted a full value discount.
| +| unit_off_formula`string` |Formula used to calculate the number of units.
| +| effect`string` |Defines how the unit is added to the customer's order.
Available values: `ADD_NEW_ITEMS`, `ADD_MISSING_ITEMS` | +| unit_type`string` |The product deemed as free, chosen from product inventory (e.g. time, items).
| +| product |Contains information about the product.
[Simple Product Discount Unit](#simple-product-discount-unit) | +| sku |Contains information about the sku.
[Simple Sku Discount Unit](#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` + +[block:html] +{ +"html": "" +} +[/block] diff --git a/reference-docs/REDEMPTIONS-Rollback-Redemption.md b/reference-docs/REDEMPTIONS-Rollback-Redemption.md new file mode 100644 index 00000000..28ad8852 --- /dev/null +++ b/reference-docs/REDEMPTIONS-Rollback-Redemption.md @@ -0,0 +1,14 @@ +--- +title: Rollback Redemption +type: endpoint +categorySlug: voucherify-api +slug: rollback-redemption +parentDocSlug: redemptions +hidden: false +order: 8 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/REDEMPTIONS-Rollback-Stackable-Redemptions.md b/reference-docs/REDEMPTIONS-Rollback-Stackable-Redemptions.md new file mode 100644 index 00000000..4ca72a9b --- /dev/null +++ b/reference-docs/REDEMPTIONS-Rollback-Stackable-Redemptions.md @@ -0,0 +1,14 @@ +--- +title: Rollback Stackable Redemptions +type: endpoint +categorySlug: voucherify-api +slug: rollback-stacked-redemptions +parentDocSlug: redemptions +hidden: false +order: 11 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/REDEMPTIONS-Stackable-Redemptions-Object.md b/reference-docs/REDEMPTIONS-Stackable-Redemptions-Object.md new file mode 100644 index 00000000..997aea59 --- /dev/null +++ b/reference-docs/REDEMPTIONS-Stackable-Redemptions-Object.md @@ -0,0 +1,498 @@ +--- +title: Stackable Redemptions Object +type: basic +categorySlug: voucherify-api +parentDocSlug: redemptions +slug: stackable-redemptions-object +hidden: false +order: 3 +--- + +## Redemptions Redeem Response Body +| Attributes | Description | +|:-----|:--------| +| redemptions`array` | Array of [Redemption](#redemption) | +| parent_redemption | See: [Redemption](#redemption) | +| order |Contains the order details associated with the redemption.
[Order Calculated](#order-calculated) | +| inapplicable_redeemables`array` |Lists validation results of each inapplicable redeemable.
Array of [Inapplicable Redeemable](#inapplicable-redeemable) | +| skipped_redeemables`array` |Lists validation results of each redeemable. If a redeemable can be applied, the API returns "status": "APPLICABLE"
.
Unique redemption ID.
**Example:**r_0bc92f81a6801f9bca
| +| object`string` |The type of object represented by the JSON
Available values: `redemption` | +| date`string` |Timestamp representing the date and time when the object was created in ISO 8601 format.
**Example:**2021-12-22T10:13:06.487Z
| +| customer_id`string`, `null` |Unique customer ID of the redeeming customer.
**Example:**cust_i8t5Tt6eiKG5K79KQlJ0Vs64
| +| tracking_id`string`, `null` |Hashed customer source ID.
| +| metadata`object`, `null` |The metadata object stores all custom attributes assigned to the redemption.
| +| amount`integer` |A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.
**Example:**10000
| +| redemption`string`, `null` |Unique redemption ID of the parent redemption.
**Example:**r_0c656311b5878a2031
| +| result`string` |Redemption result.
Available values: `SUCCESS`, `FAILURE` | +| status`string` |Redemption status.
Available values: `SUCCEEDED`, `FAILED`, `ROLLED_BACK` | +| related_redemptions`object` |Attributes | Description | ||||||
---|---|---|---|---|---|---|---|
rollbacksarray | Array of: Redemption Related Redemptions Rollbacks Item
| ||||||
redemptionsarray | Array of: Redemption Related Redemptions Item
|
If the result is FAILURE
, this parameter will provide a generic reason as to why the redemption failed.
customer_rules_violated
| +| failure_message`string` |If the result is FAILURE
, this parameter will provide a more expanded reason as to why the redemption failed.
Defines the details of the channel through which the redemption was issued.
Attributes | Description |
---|---|
channel_idstring | Unique channel ID of the user performing the redemption. This is either a user ID from a user using the Voucherify Dashboard or an X-APP-Id of a user using the API. Example:user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH |
channel_typestring | The source of the channel for the redemption. A USER , API |
Defines the related object.
Available values: `voucher`, `promotion_tier`, `redemption` | +| related_object_id`string` |Unique related object ID assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher.
| +| voucher |Defines the details of the voucher being redeemed.
[Voucher](#voucher) | +| promotion_tier |Contains details of the promotion tier and the parent campaign.
[Promotion Tier](#promotion-tier) | +| reward | See: [Redemption Reward Result](#redemption-reward-result) | +| gift`object` |Contains the amount being subtracted from the gift card for the redemption.
Attributes | Description |
---|---|
amountinteger | The amount subtracted from the gift card expressed as the smallest currency unit (e.g. 100 cents for $1.00). |
Stores the number of points being added back to the loyalty card for the reward redemption rollback.
Attributes | Description |
---|---|
pointsinteger | Number of points being added back to the loyalty card for the reward redemption rollback. |
Attributes | Description |
---|---|
customer | One of: Customer With Summary Loyalty Referrals, Customer Id |
referrer | One of: Referrer With Summary Loyalty Referrals, Referrer Id |
Indicates whether the redeemable can be applied or not applied based on the validation rules.
Available values: `INAPPLICABLE` | +| id`string` |Redeemable ID, i.e. the voucher code.
| +| object`string` |Redeemable's object type.
Available values: `voucher`, `promotion_tier` | +| result`object` |Attributes | Description |
---|---|
error | See: Error Object |
Indicates whether the redeemable can be applied or not applied based on the validation rules.
Available values: `SKIPPED` | +| id`string` |Redeemable ID, i.e. the voucher code.
| +| object`string` |Redeemable's object type.
Available values: `voucher`, `promotion_tier` | +| result`object` |Attributes | Description |
---|
Attributes | Description |
---|---|
customer | If only |
referrer | If only |
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.
| +| name`string` |Customer's first and last name.
| +| email`string` |Customer's email address.
| +| metadata`object` |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.
| +| object`string` |The type of object represented by JSON.
Available values: `customer` | + +## Voucher +| Attributes | Description | +|:-----|:--------| +| id`string` |Assigned by the Voucherify API, identifies the voucher.
**Example:**v_mkZN9v7vjYUadXnHrMza8W5c34fE5KiV
| +| code`string` |A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters.
**Example:**WVPblOYX
| +| campaign`string` |A unique campaign name, identifies the voucher's parent campaign.
**Example:**Gift Card Campaign
| +| campaign_id`string` |Assigned by the Voucherify API, identifies the voucher's parent campaign.
**Example:**camp_FNYR4jhqZBM9xTptxDGgeNBV
| +| category`string` |Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint.
| +| category_id`string` |Unique category ID assigned by Voucherify.
**Example:**cat_0bb343dee3cdb5ec0c
| +| categories`array` |Contains details about the category.
Array of [Category](#category) | +| type`string` |Defines the type of the voucher.
Available values: `GIFT_VOUCHER`, `DISCOUNT_VOUCHER`, `LOYALTY_CARD` | +| discount | See: [Discount](#discount) | +| gift`object` |Object representing gift parameters. Child attributes are present only if type
is GIFT_VOUCHER
. Defaults to null
.
Attributes | Description |
---|---|
amountinteger | Total gift card income over the lifetime of the card. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. Example:10000 |
balanceinteger | Available funds. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. Example:500 |
effectstring | Defines how the credits are applied to the customer's order. Available values:APPLY_TO_ORDER , APPLY_TO_ITEMS |
Object representing loyalty card parameters. Child attributes are present only if type
is LOYALTY_CARD
. Defaults to null
.
Attributes | Description |
---|---|
pointsinteger | Total points incurred over lifespan of loyalty card. Example:7000 |
balanceinteger | Points available for reward redemption. Example:6970 |
next_expiration_datestring | The next closest date when the next set of points are due to expire. Example:2023-05-30 |
next_expiration_pointsinteger | The amount of points that are set to expire next. |
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_date`string` |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`object` |Set recurrent time periods when the voucher is valid. For example, valid for 1 hour every other day.start_date
required when including the validity_timeframe
.
Attributes | Description |
---|---|
durationstring | Defines the amount of time the voucher will be active in ISO 8601 format. For example, a voucher with a PT1H |
intervalstring | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a voucher with an P2D |
Integer array corresponding to the particular days of the week in which the voucher is valid.
0
Sunday1
Monday2
Tuesday3
Wednesday4
Thursday5
Friday6
SaturdayA flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the start_date
and expiration_date
.
true
indicates an active voucherfalse
indicates an inactive voucherAn optional field to keep any extra textual information about the code such as a code description and details.
| +| metadata`object` |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](#voucher-assets) | +| is_referral_code`boolean`, `null` |Flag indicating whether this voucher is a referral code; true
for campaign type REFERRAL_PROGRAM
.
Timestamp representing the date and time when the voucher was created in ISO 8601 format.
**Example:**2021-12-22T10:13:06.487Z
| +| updated_at`string` |Timestamp representing the date and time when the voucher was last updated in ISO 8601 format.
**Example:**2021-12-22T10:14:45.316Z
| +| holder_id`string` |Unique customer ID of voucher owner.
**Example:**cust_eWgXlBBiY6THFRJwX45Iakv4
| +| holder | See: [Simple Customer](#simple-customer) | +| object`string` |The type of object represented by JSON. Default is voucher
.
Flag indicating whether this voucher is deleted.
| +| validation_rules_assignments | See: [Validation Rules Assignments List](#validation-rules-assignments-list) | +| publish`object` |This object stores a summary of publish events: an events counter and an endpoint which can be called to return details of each event. A publication is required for loyalty cards and referral codes. This object gets updated whenever a voucher has been published. Publication means assigning a code to a particular customer. Typically, a publication is made by distributing your codes to your customers, e.g. through Export to MailChimp or publish voucher API method.
Required | Optional |
---|---|
type :LOYALTY_CARD | type :DISCOUNT_VOUCHER |
is_referral_code :true | type :GIFT_VOUCHER |
Attributes | Description |
---|---|
objectstring | The type of object represented is by default |
countinteger | Publication events counter. Example:0 |
urlstring | The endpoint where this list of publications can be accessed using a GET method. /v1/vouchers/WVPblOYX/publications?page=1&limit=10 |
Stores a summary of redemptions that have been applied to the voucher.
Attributes | Description |
---|---|
quantityinteger | How many times a voucher can be redeemed. A |
redeemed_quantityinteger | How many times a voucher has already been redeemed. Example:1 |
redeemed_amountinteger | Total amount redeemed. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 balance is written as 10000. Example:100000 |
redeemed_pointsinteger | Total loyalty points redeemed. Example:100000 |
objectstring | The type of object represented is by default |
urlstring | The endpoint where this list of redemptions can be accessed using a GET method. /v1/vouchers/WVPblOYX/redemptions?page=1&limit=10 |
Unique promotion tier ID.
**Example:**promo_63fYCt81Aw0h7lzyRkrGZh9p
| +| created_at`string` |Timestamp representing the date and time when the promotion tier was created in ISO 8601 format.
**Example:**2021-12-15T11:34:01.333Z
| +| updated_at`string` |Timestamp representing the date and time when the promotion tier was updated in ISO 8601 format.
**Example:**2022-02-09T09:20:05.603Z
| +| name`string` |Name of the promotion tier.
| +| banner`string` |Text to be displayed to your customers on your website.
| +| action`object` |Contains details about the discount applied by the promotion tier.
Attributes | Description |
---|---|
discount | See: Discount |
The metadata object stores all custom attributes assigned to the promotion tier. A set of key/value pairs that you can attach to a promotion tier object. It can be useful for storing additional information about the promotion tier in a structured format.
| +| hierarchy`integer` |The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy.
| +| promotion_id`string` |Promotion unique ID.
| +| campaign`object` |Contains details about promotion tier's parent campaign.
Attributes | Description | ||||||
---|---|---|---|---|---|---|---|
idstring | Unique campaign ID. | ||||||
start_datestring | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is inactive before this date. Example:2022-09-22T00:00:00.000Z | ||||||
expiration_datestring | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is inactive after this date. Example:2022-09-30T00:00:00.000Z | ||||||
validity_timeframeobject | Recurrent time periods when the campaign is valid. For example, valid for 1 hour every other day.
| ||||||
validity_day_of_weekarray | Integer array corresponding to the particular days of the week in which the campaign is valid.
| ||||||
activeboolean | A flag indicating whether the campaign is active or not active. A campaign can be disabled even though it's within the active period defined by the
| ||||||
category_idstring | Unique category ID that this campaign belongs to. Example:cat_0b688929a2476386a6 | ||||||
objectstring | The type of object represented by the campaign object. This object stores information about the campaign. |
Promotion tier's parent campaign's unique ID.
| +| active`boolean` |A flag to toggle the promotion tier on or off. You can disable a promotion tier even though it's within the active period defined by the start_date
and expiration_date
.
true
indicates an active promotion tierfalse
indicates an inactive promotion tierActivation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Promotion tier is inactive before this date.
**Example:**2022-09-23T00:00:00.000Z
| +| expiration_date`string` |Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is inactive after this date.
**Example:**2022-09-26T00:00:00.000Z
| +| validity_timeframe`object` |Set recurrent time periods when the promotion tier is valid. For example, valid for 1 hour every other day.start_date
required when including the validity_timeframe
.
Attributes | Description |
---|---|
intervalstring | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a promotion tier with an |
durationstring | Defines the amount of time the promotion tier will be active in ISO 8601 format. For example, a promotion tier with a |
Integer array corresponding to the particular days of the week in which the promotion tier is valid.
0
Sunday1
Monday2
Tuesday3
Wednesday4
Thursday5
Friday6
SaturdayContains statistics about promotion tier redemptions and orders.
Attributes | Description | ||||||
---|---|---|---|---|---|---|---|
redemptionsobject | Contains statistics about promotion tier redemptions.
| ||||||
ordersobject | Contains statistics about orders related to the promotion tier.
|
The type of object represented by JSON. This object stores information about the promotion tier.
| +| validation_rule_assignments | See: [Validation Rule Assignments List](#validation-rule-assignments-list) | +| category_id`string` |Promotion tier category ID.
**Example:**cat_0c9da30e7116ba6bba
| +| categories`array` | Array of [Category](#category) | + +## Redemption Reward Result +| Attributes | Description | +|:-----|:--------| +| customer | [Simple Customer](#simple-customer) | +| assignment_id`string`, `null` |Unique reward assignment ID assigned by Voucherify.
| +| voucher |Defines of the voucher.
[Voucher](#voucher) | +| product |Defines of the product.
[Product](#product) | +| sku |Defines of the sku.
[SKU Object](#sku-object) | +| loyalty_tier_id`string`, `null` |Unique loyalty tier ID assigned by Voucherify.
| +| id`string` |Unique reward ID.
**Example:**rew_0bc92f81a6801f9bca
| +| name`string` |Name of the reward.
**Example:**Reward Name
| +| object`string` |The type of object represented by the JSON
Available values: `reward` | +| created_at`string` |Timestamp representing the date and time when the redemption was created in ISO 8601 format.
**Example:**2021-12-22T10:13:06.487Z
| +| updated_at`string` |Timestamp in ISO 8601 format indicating when the reward was updated.
**Example:**2022-10-03T12:24:58.008Z
| +| parameters`object` |These are parameters representing a material reward.
Attributes | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
campaignobject | Defines the product redeemed as a reward.
| ||||||||
productobject | Defines the product redeemed as a reward.
| ||||||||
coinobject | Defines the ratio by mapping the number of loyalty points in
|
Reward type.
Available values: `CAMPAIGN`, `COIN`, `MATERIAL` | + +## Order Response Base +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.
| +| source_id`string`, `null` |Unique source ID of an existing order that will be linked to the redemption of this request.
| +| created_at`string` |Timestamp representing the date and time when the order was created in ISO 8601 format.
**Example:**2021-12-22T10:13:06.487Z
| +| updated_at`string`, `null` |Timestamp representing the date and time when the order was last updated in ISO 8601 format.
**Example:**2021-12-22T10:14:45.316Z
| +| status`string` |The order status.
Available values: `CREATED`, `PAID`, `CANCELED`, `FULFILLED` | +| amount`integer` |A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.
| +| initial_amount`integer` |A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.
| +| discount_amount`integer` |Sum of all order-level discounts applied to the order.
| +| items_discount_amount`integer` |Sum of all product-specific discounts applied to the order.
| +| total_discount_amount`integer` |Sum of all order-level AND all product-specific discounts applied to the order.
| +| total_amount`integer` |Order amount after undoing all the discounts through the rollback redemption.
| +| applied_discount_amount`integer` |This field shows the order-level discount applied.
| +| items_applied_discount_amount`integer` |Sum of all product-specific discounts applied in a particular request.sum(items, i => i.applied_discount_amount)
Sum of all order-level AND all product-specific discounts applied in a particular request.total_applied_discount_amount
= applied_discount_amount
+ items_applied_discount_amount
Array of items applied to the order.
Array of [Order Item Calculated](#order-item-calculated) | +| metadata`object` |A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format.
| +| customer_id`string`, `null` |Unique customer ID of the customer making the purchase.
**Example:**cust_7iUa6ICKyU6gH40dBU25kQU1
| +| referrer_id`string`, `null` |Unique referrer ID.
**Example:**cust_nM4jqPiaXUvQdVSA6vTRUnix
| +| object`string` |The type of object represented by JSON.
Available values: `order` | +| redemptions`object` |Attributes | Description |
---|---|
[propertyName] | See: Order Redemptions |
Attributes | Description | ||||
---|---|---|---|---|---|
idstring | The ID of an existing customer that will be linked to redemption in this request. | ||||
source_idstring | 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_metadataobject | Object used to store system metadata information. | ||||
created_atstring | Timestamp representing the date and time when the customer was created in ISO 8601 format. Example:2022-08-30T06:32:07.380Z | ||||
updated_atstring | Timestamp representing the date and time when the customer was updated in ISO 8601 format. Example:2022-08-31T06:32:07.380Z | ||||
assetsobject | Contains information about the customer's cockpit.
| ||||
objectstring | The type of object represented by JSON. Available values:customer |
A unique identifier of an existing customer.
| +| object`string` |The type of object represented by JSON.
Available values: `customer` | + +## Referrer With Summary Loyalty Referrals +[Customer With Summary Loyalty Referrals](#customer-with-summary-loyalty-referrals) + +## Referrer Id +[Customer Id](#customer-id) + +## Error Object +| Attributes | Description | +|:-----|:--------| +| code`integer` |Error's HTTP status code.
| +| key`string` |Short string describing the kind of error which occurred.
| +| message`string` |A human-readable message providing a short description about the error.
| +| details`string` |A human-readable message providing more details about the error.
| +| request_id`string` |This ID is useful when troubleshooting and/or finding the root cause of an error response by our support team.
**Example:**v-0a885062c80375740f
| +| resource_id`string` |Unique resource ID that can be used in another endpoint to get more details.
**Example:**rf_0c5d710a87c8a31f86
| +| resource_type`string` |The resource type.
**Example:**voucher
| + +## Category +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique category ID assigned by Voucherify.
| +| name`string` |Category name.
| +| hierarchy`integer` |Category hierarchy.
| +| object`string` |The type of object represented by the JSON. This object stores information about the category.
Available values: `category` | +| created_at`string` |Timestamp representing the date and time when the category was created in ISO 8601 format.
**Example:**2022-07-14T10:45:13.156Z
| +| updated_at`string` |Timestamp representing the date and time when the category was updated in ISO 8601 format.
**Example:**2022-08-16T10:52:08.094Z
| +| stacking_rules_type`string` |The type of the stacking rule eligibility.
Available values: `JOINT`, `EXCLUSIVE` | + +## Discount +Contains information about discount.
+ +One of: + +[Amount](#amount), [Unit](#unit), [Unit Multiple](#unit-multiple), [Percent](#percent), [Fixed](#fixed) + +## Voucher Assets +| Attributes | Description | +|:-----|:--------| +| qr`object` |Stores Quick Response (QR) representation of encrypted code.
Attributes | Description |
---|---|
idstring | Encrypted voucher code ID. Example:U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK+t4pp7U7oFzjGJzj9q/bmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg+BaZk5QwXMf8k/OzSlOEVybpwSq+AiqPoNtjeuqtIgkDyvT6Q== |
urlstring | URL to QR code Optional: Attach query parameters to base URL to customize the image of the encrypted voucher code.
https://dev.dl.voucherify.io/api/v1/assets/qr/U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK%2Bt4pp7U7oFzjGJzj9q%2FbmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg%2BBaZk5QwXMf8k%2FOzSlOEVybpwSq%2BAiqPoNtjeuqtIgkDyvT6Q%3D%3D |
Stores barcode representation of encrypted code.
Attributes | Description |
---|---|
idstring | Encrypted voucher code ID. Example:U2FsdGVkX19eJhGfWwUrH9+tulBkON+AnMktic+N6CVWzZ9+fHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ+kJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6/pFs61apEn9SJx32ttCF6d3oxKISQQ== |
urlstring | URL to barcode Optional: Attach query parameters to base URL to customize the image of the encrypted voucher code.
https://dev.dl.voucherify.io/api/v1/assets/barcode/U2FsdGVkX19eJhGfWwUrH9%2BtulBkON%2BAnMktic%2BN6CVWzZ9%2BfHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ%2BkJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6%2FpFs61apEn9SJx32ttCF6d3oxKISQQ%3D%3D |
The type of object represented by JSON. This object stores information about validation rules assignments.
Available values: `list` | +| data_ref`string` |Identifies the name of the attribute that contains the array of validation rules assignments.
Available values: `data` | +| data`array` |Contains array of validation rules assignments.
Array of [Business Validation Rule Assignment](#business-validation-rule-assignment) | +| total`integer` |Total number of validation rules assignments.
| + +## Validation Rule Assignments List +| Attributes | Description | +|:-----|:--------| +| object`string` |The type of object represented by JSON. This object stores information about validation rule assignments.
| +| data_ref`string` |Identifies the name of the JSON property that contains the array of validation rule assignments.
| +| data`array` |A dictionary that contains an array of validation rule assignments.
Array of [Validation Rule Assignment](#validation-rule-assignment) | +| total`integer` |Total number of validation rule assignments.
| + +## Product +This is an object representing a product.
This entity should be used to map product items from your inventory management system. The aim of products is to build which reflect product-specific campaigns.
+ +All of: + +1. [Product without Skus Object](#product-without-skus-object) +2.Attributes | Description |
---|---|
skus | See: Skus List For Product |
A unique identifier that represents the SKU and is assigned by Voucherify.
**Example:**sku_0b1621b319d248b79f
| +| source_id`string`, `null` |A unique SKU identifier from your inventory system.
**Example:**sku_source_id_4
| +| product_id`string` |The parent product's unique ID.
**Example:**prod_0b15f6b9f650c16990
| +| sku`string`, `null` |Unique user-defined SKU name.
**Example:**Large Pink Shirt
| +| price`integer`, `null` |Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as $100.00
being expressed as 10000
.
SKU price currency.
**Example:**USD
| +| attributes`object` |The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family.
| +| image_url`string`, `null` |The HTTPS URL pointing to the .png or .jpg file that will be used to render the SKU image.
| +| metadata`object` |The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format.
| +| created_at`string` |Timestamp representing the date and time when the SKU was created in ISO 8601 format.
**Example:**2022-05-17T10:36:30.187Z
| +| updated_at`string`, `null` |Timestamp representing the date and time when the SKU was updated in ISO 8601 format.
**Example:**2022-05-17T10:55:09.137Z
| +| object`string` |The type of object represented by JSON. This object stores information about the SKU
.
A unique SKU ID assigned by Voucherify.
| +| product_id`string` |A unique product ID assigned by Voucherify.
| +| related_object`string` |Used along with the source_id property, can be set to either sku or product.
Available values: `product`, `sku` | +| source_id`string` |The merchant’s product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service.
| +| quantity`integer` |The quantity of the particular item in the cart.
| +| discount_quantity`integer` |Number of dicounted items.
| +| initial_quantity`integer` |A positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items' quantity.
| +| amount`integer` |The total amount of the order item (price * quantity).
| +| discount_amount`integer` |Sum of all order-item-level discounts applied to the order.
| +| applied_discount_amount`integer` |This field shows the order-level discount applied.
| +| initial_amount`integer` |A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.
| +| total_applied_discount_amount`integer` |Sum of all order-level AND all product-specific discounts applied in a particular request.total_applied_discount_amount
= applied_discount_amount
+ items_applied_discount_amount
Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents
for $100.00
.
Final order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the amount
.subtotal_amount
=amount
-applied_discount_amount
An object containing details of the related product.
Attributes | Description |
---|---|
idstring | A unique identifier that represents the product and is assigned by Voucherify. |
source_idstring | The merchant’s product ID (if it is different than Voucherify's product ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service. |
overrideboolean | The override set to |
namestring | Product name. |
metadataobject | A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format. |
pricenumber | Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00). |
An object containing details of the related SKU.
Attributes | Description |
---|---|
idstring | A unique identifier that represents the SKU and is assigned by Voucherify. |
source_idstring | The merchant’s SKU ID (if it is different than Voucherify's SKU ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service. |
overrideboolean | The override set to |
skustring | The SKU name. |
pricenumber | SKU price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00). |
The type of object represented by JSON.
Available values: `order_item` | +| metadata`object` |A set of custom key/value pairs that you can attach to an SKU. It can be useful for storing additional information about the SKU in a structured format.
| + +## Order Redemptions +| Attributes | Description | +|:-----|:--------| +| date`string` |Timestamp representing the date and time when the redemption was created in ISO 8601 format.
**Example:**2022-09-02T17:06:56.649Z
| +| rollback_id`string` |Unique ID of the redemption rollback.
**Example:**rr_0c63c84eb78ee0a6c0
| +| rollback_date`string` |Timestamp representing the date and tiem when the redemption rollback was created in ISO 8601 format.
**Example:**2023-01-31T14:18:37.150Z
| +| related_object_type`string` |The source of the incentive.
| +| related_object_id`string` |Unique ID of the parent redemption.
**Example:**r_0ba186c4824e4881e1
| +| related_object_parent_id`string` |Represent's the campaign ID of the voucher if the redemption was based on a voucher that was part of bulk codes generated within a campaign. In case of a promotion tier, this represents the campaign ID of the promotion tier's parent campaign.
| +| stacked`array` |Contains a list of unique IDs of child redemptions, which belong to the stacked incentives.
| +| rollback_stacked`array` |Lists the rollback redemption IDs of the particular child redemptions.
| + +## Customer Summary +| Attributes | Description | +|:-----|:--------| +| redemptions | See: [Customer Summary Redemptions](#customer-summary-redemptions) | +| orders | See: [Customer Summary Orders](#customer-summary-orders) | + +## Customer Loyalty +| Attributes | Description | +|:-----|:--------| +| points`integer` |Customer's loyalty points.
| +| referred_customers`integer` |Total number of customers referred by the customer.
| +| campaigns`object` |Contains campaigns with details about point balances and how many customers were referred by the customer.
Attributes | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
[propertyName]object | Contains details about the point balances left on loyalty cards and the number of referred customers in each campaign.
|
Total number of times this customer received a referral, i.e. was referred by another customer.
| +| campaigns`array` |Contains an array of campaigns that served as the source of a referral for the customer.
Array of:Attributes | Description |
---|---|
campaign_idstring | Unique campaign ID, assigned by Voucherify. Example:camp_rRsfatlwN7unSeUIJDCYedal |
referrer_idstring | Unique referrer ID, assigned by Voucherify. This is the customer ID of a customer that is referring this customer. Example:cust_sehkNIi8Uq2qQuRqSr7xn4Zi |
related_object_idstring | Related object id Example:r_0b9d4cc4aa164dd073 |
related_object_typestring | Related object type, i.e. |
datestring | Timestamp representing the date and time when the customer was referred in ISO 8601 format. Example:2022-08-30T10:19:39.196Z |
Customer's first and last name.
| +| description`string` |An arbitrary string that you can attach to a customer object.
| +| email`string` |Customer's email address.
| +| phone`string` |Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel.
| +| birthday`string` |Deprecated Customer's birthdate; format YYYY-MM-DD.
| +| birthdate`string` |Customer's birthdate; format YYYY-MM-DD.
| +| address`object`, `null` |Customer's address.
Attributes | Description |
---|---|
citystring | City |
statestring | State |
line_1string | First line of address. |
line_2string | Second line of address. |
countrystring | Country. |
postal_codestring | Postal code. |
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.
| + +## Amount +| Attributes | Description | +|:-----|:--------| +| type`string` |Defines the type of the voucher.
Available values: `AMOUNT` | +| amount_off`number` |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_formula`string` | | +| aggregated_amount_limit`integer` |Maximum discount amount per order.
| +| effect |Defines how the discount is applied to the customer's order.
[Discount Amount Vouchers Effect Types](#discount-amount-vouchers-effect-types) | +| is_dynamic`boolean` |Flag indicating whether the discount was calculated using a formula.
| + +## Unit +| Attributes | Description | +|:-----|:--------| +| type`string` |Discount type.
Available values: `UNIT` | +| unit_off`integer` |Number of units to be granted a full value discount.
| +| unit_off_formula`string` | | +| effect |Defines how the unit is added to the customer's order.
[Discount Unit Vouchers Effect Types](#discount-unit-vouchers-effect-types) | +| unit_type`string` |The product deemed as free, chosen from product inventory (e.g. time, items).
| +| product |Contains information about the product.
[Simple Product Discount Unit](#simple-product-discount-unit) | +| sku | See: [Simple Sku Discount Unit](#simple-sku-discount-unit) | +| is_dynamic`boolean` |Flag indicating whether the discount was calculated using a formula.
| + +## Unit Multiple +| Attributes | Description | +|:-----|:--------| +| type`string` |Discount type.
Available values: `UNIT` | +| effect`string` |Defines how the discount is applied to the customer's order.
Available values: `ADD_MANY_ITEMS` | +| units`array` | Array of [One Unit](#one-unit) | + +## Percent +| Attributes | Description | +|:-----|:--------| +| type`string` |Defines the type of the voucher.
Available values: `PERCENT` | +| percent_off`number` |The percent discount that the customer will receive.
| +| percent_off_formula`string` | | +| amount_limit`number` |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_limit`integer` |Maximum discount amount per order.
| +| effect |Defines how the discount is applied to the customer's order.
[Discount Percent Vouchers Effect Types](#discount-percent-vouchers-effect-types) | +| is_dynamic`boolean` |Flag indicating whether the discount was calculated using a formula.
| + +## Fixed +| Attributes | Description | +|:-----|:--------| +| type`string` |Defines the type of the voucher.
Available values: `FIXED` | +| fixed_amount`number` |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_formula
parameter is present in the fixed amount definition, this value becomes the fallback value. As a result, if the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed value.
Defines how the discount is applied to the customer's order.
[Discount Fixed Vouchers Effect Types](#discount-fixed-vouchers-effect-types) | +| is_dynamic`boolean` |Flag indicating whether the discount was calculated using a formula.
| + +## Business Validation Rule Assignment +| Attributes | Description | +|:-----|:--------| +| id`string` |The unique identifier for a assignment
| +| rule_id`string` |The unique identifier for a rule
| +| related_object_id`string` |The unique identifier for a related object
| +| related_object_type`string` |The type of related object
| +| created_at`string` |Timestamp representing the date and time when the object was created in ISO 8601 format.
**Example:**2022-03-09T11:19:04.819Z
| +| updated_at`string` |Timestamp representing the date and time when the object was last updated in ISO 8601 format.
**Example:**2022-03-09T11:19:04.819Z
| +| object`string` |The type of object represented by JSON.
Available values: `validation_rules_assignment` | +| validation_status`string` |The validation status of the assignment
Available values: `VALID`, `PARTIALLY_VALID`, `INVALID` | +| validation_omitted_rules`array` |The list of omitted rules
| + +## Validation Rule Assignment +| Attributes | Description | +|:-----|:--------| +| id`string` |Validation rule assignment ID.
**Example:**asgm_74F7QZoYbUoljwQO
| +| rule_id`string` |Validation rule ID.
**Example:**val_4j7DCRm2IS59
| +| related_object_id`string` |The resource ID to which the validation rule was assigned.
**Example:**v_JtWunK6jUo7X2qOFj0SyRHq4p9tgENlT
| +| related_object_type`string` |The type of resource to which the validation rule was assigned.
Available values: `voucher`, `campaign`, `earning_rule`, `reward_assignment`, `promotion_tier`, `distribution` | +| created_at`string` |Timestamp representing the date and time when the validation rule assignment was created in ISO 8601 format.
**Example:**2022-02-17T08:18:15.085Z
| +| object`string` |The type of object represented by the ID.
Available values: `validation_rules_assignment` | + +## Product without Skus Object +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique product ID assigned by Voucherify.
**Example:**prod_0b1da8105693710357
| +| source_id`string`, `null` |Unique product source ID.
**Example:**productSourceID16
| +| name`string`, `null` |Unique user-defined product name.
**Example:**T-shirt
| +| price`integer`, `null` |Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as $100.00
being expressed as 10000
.
A list of product attributes whose values you can customize for given SKUs: ["color","size","ranking"]
. Each child SKU can have a unique value for a given attribute.
The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format.
| +| image_url`string`, `null` |The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image.
**Example:**https://images.com/original.jpg
| +| created_at`string` |Timestamp representing the date and time when the product was created in ISO 8601 format.
**Example:**2022-05-23T06:52:55.008Z
| +| updated_at`string`, `null` |Timestamp representing the date and time when the product was updated in ISO 8601 format.
**Example:**2022-05-23T09:24:07.405Z
| +| object`string` |The type of object represented by JSON. This object stores information about the product.
Available values: `product` | + +## Skus List For Product +| Attributes | Description | +|:-----|:--------| +| object`string` |The type of object represented by JSON. This object stores information about SKUs.
| +| data_ref`string` |Identifies the name of the JSON property that contains the array of SKUs.
| +| data`array` |A dictionary that contains an array of SKUs.
Array of [SKU Object](#sku-object) | +| total`integer` |Total number of SKUs in the product.
| + +## Customer Summary Redemptions +| Attributes | Description | +|:-----|:--------| +| total_redeemed`integer` |Total number of redemptions made by the customer.
| +| total_failed`integer` |Total number of redemptions that failed.
| +| total_succeeded`integer` |Total number of redemptions that succeeded.
| +| total_rolled_back`integer` |Total number of redemptions that were rolled back for the customer.
| +| total_rollback_failed`integer` |Total number of redemption rollbacks that failed.
| +| total_rollback_succeeded`integer` |Total number of redemption rollbacks that succeeded.
| +| gift`object` |Summary of gift card credits.
Attributes | Description |
---|---|
redeemed_amountinteger | Total amount of gift card credits redeemed by customer. Value is multiplied by 100 to precisely represent 2 decimal places. For example |
amount_to_gointeger | Remaining gift card balance across all gift cards. Value is multiplied by 100 to precisely represent 2 decimal places. For example |
Summary of loyalty points.
Attributes | Description |
---|---|
redeemed_pointsinteger | Total number of loyalty points redeemed by the customer. |
points_to_gointeger | Sum of remaining available point balance across all loyalty cards. |
The total amount spent by the customer. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents
for $100.00
.
Total number of orders made by the customer.
| +| average_amount`integer` |Average amount spent on orders. total_amount
÷ total_count
. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents
for $100.00
.
Amount spent on last order. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents
for $100.00
.
Timestamp representing the date and time of the customer's last order in ISO 8601 format.
**Example:**2022-08-30T11:51:08.029Z
| + +## 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 | +|:-----|:--------| +| id`string` |Unique product ID, assigned by Voucherify.
| +| source_id`string` |Product's source ID.
| +| name`string` |Product name.
| + +## Simple Sku Discount Unit +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique SKU ID, assigned by Voucherify.
| +| source_id`string` |Product variant's source ID.
| +| name`string` |Sku name
| + +## One Unit +| Attributes | Description | +|:-----|:--------| +| unit_off`number` |Number of units to be granted a full value discount.
| +| unit_off_formula`string` | | +| effect`string` |Defines how the unit is added to the customer's order.
Available values: `ADD_NEW_ITEMS`, `ADD_MISSING_ITEMS` | +| unit_type`string` |The product deemed as free, chosen from product inventory (e.g. time, items).
| +| product |Contains information about the product.
[Simple Product Discount Unit](#simple-product-discount-unit) | +| sku |Contains information about the sku.
[Simple Sku Discount Unit](#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` + +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/REFERRALS-Add-Referral-Code-Holders-1.md b/reference-docs/REFERRALS-Add-Referral-Code-Holders-1.md new file mode 100644 index 00000000..d25ee70f --- /dev/null +++ b/reference-docs/REFERRALS-Add-Referral-Code-Holders-1.md @@ -0,0 +1,14 @@ +--- +title: Add Referral Code Holders +type: endpoint +categorySlug: voucherify-api +slug: referrals-add-holders-1 +parentDocSlug: referrals +hidden: false +order: 30 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/REFERRALS-Add-Referral-Code-Holders.md b/reference-docs/REFERRALS-Add-Referral-Code-Holders.md new file mode 100644 index 00000000..c9b085c4 --- /dev/null +++ b/reference-docs/REFERRALS-Add-Referral-Code-Holders.md @@ -0,0 +1,14 @@ +--- +title: Add Referral Code Holders +type: endpoint +categorySlug: voucherify-api +slug: referrals-add-holders +parentDocSlug: referrals +hidden: false +order: 40 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/REFERRALS-List-Referrals-Code-Holders-1.md b/reference-docs/REFERRALS-List-Referrals-Code-Holders-1.md new file mode 100644 index 00000000..ab71b8ad --- /dev/null +++ b/reference-docs/REFERRALS-List-Referrals-Code-Holders-1.md @@ -0,0 +1,14 @@ +--- +title: List Referral Code Holders +type: endpoint +categorySlug: voucherify-api +slug: referrals-code-holders-1 +parentDocSlug: referrals +hidden: false +order: 20 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/REFERRALS-List-Referrals-Code-Holders.md b/reference-docs/REFERRALS-List-Referrals-Code-Holders.md new file mode 100644 index 00000000..4a1f326c --- /dev/null +++ b/reference-docs/REFERRALS-List-Referrals-Code-Holders.md @@ -0,0 +1,14 @@ +--- +title: List Referral Code Holders +type: endpoint +categorySlug: voucherify-api +slug: referrals-code-holders +parentDocSlug: referrals +hidden: false +order: 10 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/REFERRALS-Remove-Referral-Code-Holder-1.md b/reference-docs/REFERRALS-Remove-Referral-Code-Holder-1.md new file mode 100644 index 00000000..d6c3136a --- /dev/null +++ b/reference-docs/REFERRALS-Remove-Referral-Code-Holder-1.md @@ -0,0 +1,14 @@ +--- +title: Remove Referral Code Holder +type: endpoint +categorySlug: voucherify-api +slug: referrals-remove-holder-1 +parentDocSlug: referrals +hidden: false +order: 50 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/REFERRALS-Remove-Referral-Code-Holder.md b/reference-docs/REFERRALS-Remove-Referral-Code-Holder.md new file mode 100644 index 00000000..d8ba27c9 --- /dev/null +++ b/reference-docs/REFERRALS-Remove-Referral-Code-Holder.md @@ -0,0 +1,14 @@ +--- +title: Remove Referral Code Holder +type: endpoint +categorySlug: voucherify-api +slug: referrals-remove-holder +parentDocSlug: referrals +hidden: false +order: 60 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/REWARDS-Create-Reward-Assignment.md b/reference-docs/REWARDS-Create-Reward-Assignment.md new file mode 100644 index 00000000..846e04f5 --- /dev/null +++ b/reference-docs/REWARDS-Create-Reward-Assignment.md @@ -0,0 +1,14 @@ +--- +title: Create Reward Assignment +type: endpoint +categorySlug: voucherify-api +slug: create-reward-assignment +parentDocSlug: rewards +hidden: false +order: 10 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/REWARDS-Create-Reward.md b/reference-docs/REWARDS-Create-Reward.md new file mode 100644 index 00000000..4f9df607 --- /dev/null +++ b/reference-docs/REWARDS-Create-Reward.md @@ -0,0 +1,14 @@ +--- +title: Create Reward +type: endpoint +categorySlug: voucherify-api +slug: create-reward +parentDocSlug: rewards +hidden: false +order: 5 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/REWARDS-Delete-Reward-Assignment.md b/reference-docs/REWARDS-Delete-Reward-Assignment.md new file mode 100644 index 00000000..512895cf --- /dev/null +++ b/reference-docs/REWARDS-Delete-Reward-Assignment.md @@ -0,0 +1,14 @@ +--- +title: Delete Reward Assignment +type: endpoint +categorySlug: voucherify-api +slug: delete-reward-assignment +parentDocSlug: rewards +hidden: false +order: 12 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/REWARDS-Delete-Reward.md b/reference-docs/REWARDS-Delete-Reward.md new file mode 100644 index 00000000..5b9dbcdc --- /dev/null +++ b/reference-docs/REWARDS-Delete-Reward.md @@ -0,0 +1,14 @@ +--- +title: Delete Reward +type: endpoint +categorySlug: voucherify-api +slug: delete-reward +parentDocSlug: rewards +hidden: false +order: 7 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/REWARDS-Get-Reward-Assignment.md b/reference-docs/REWARDS-Get-Reward-Assignment.md new file mode 100644 index 00000000..532838fb --- /dev/null +++ b/reference-docs/REWARDS-Get-Reward-Assignment.md @@ -0,0 +1,14 @@ +--- +title: Get Reward Assignment +type: endpoint +categorySlug: voucherify-api +slug: get-reward-assignment +parentDocSlug: rewards +hidden: false +order: 9 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/REWARDS-Get-Reward.md b/reference-docs/REWARDS-Get-Reward.md new file mode 100644 index 00000000..1ba248ce --- /dev/null +++ b/reference-docs/REWARDS-Get-Reward.md @@ -0,0 +1,14 @@ +--- +title: Get Reward +type: endpoint +categorySlug: voucherify-api +slug: get-reward +parentDocSlug: rewards +hidden: false +order: 4 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/REWARDS-List-Reward-Assignments.md b/reference-docs/REWARDS-List-Reward-Assignments.md new file mode 100644 index 00000000..18625a7b --- /dev/null +++ b/reference-docs/REWARDS-List-Reward-Assignments.md @@ -0,0 +1,14 @@ +--- +title: List Reward Assignments +type: endpoint +categorySlug: voucherify-api +slug: list-reward-assignments +parentDocSlug: rewards +hidden: false +order: 8 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/REWARDS-List-Rewards.md b/reference-docs/REWARDS-List-Rewards.md new file mode 100644 index 00000000..6a7a2840 --- /dev/null +++ b/reference-docs/REWARDS-List-Rewards.md @@ -0,0 +1,14 @@ +--- +title: List Rewards +type: endpoint +categorySlug: voucherify-api +slug: list-rewards +parentDocSlug: rewards +hidden: false +order: 3 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/REWARDS-Reward-Assignment-Object.md b/reference-docs/REWARDS-Reward-Assignment-Object.md new file mode 100644 index 00000000..8cc23cb9 --- /dev/null +++ b/reference-docs/REWARDS-Reward-Assignment-Object.md @@ -0,0 +1,37 @@ +--- +title: Reward Assignment Object +type: basic +categorySlug: voucherify-api +parentDocSlug: rewards +slug: reward-assignment-object +hidden: false +order: 2 +--- + +## Reward Assignment +All of: + +1. [Reward Assignment Base](#reward-assignment-base) +2. [Digital or Material Reward - Parameters](#digital-or-material-reward---parameters) + +## Reward Assignment Base +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique reward assignment ID, assigned by Voucherify.
**Example:**rewa_PbIRoMXpwe5QhobW4JKu0VjH
| +| reward_id`string` |Associated reward ID.
**Example:**rew_C7wS9eHFDN4CIbXI5PpLSkGY
| +| created_at`string` |Timestamp representing the date and time when the reward assignment was created. The value is shown in the ISO 8601 format.
**Example:**2022-08-11T14:49:22.586Z
| +| updated_at`string`, `null` |Timestamp representing the date and time when the reward assignment was updated. The value is shown in the ISO 8601 format.
**Example:**2022-08-11T16:01:34.885Z
| +| object`string` |The type of the object represented by the JSON. This object stores information about the reward assignment.
Available values: `reward_assignment` | +| related_object_id`string` |Related object ID to which the reward was assigned.
**Example:**camp_wciTvaOfYmAa3EmIIW3QpXXZ
| +| related_object_type`string` |Related object type to which the reward was assigned.
Available values: `campaign` | + +## Digital or Material Reward - Parameters +| Attributes | Description | +|:-----|:--------| +| parameters`object` |Defines the cost of the reward.
Attributes | Description | ||||||
---|---|---|---|---|---|---|---|
loyaltyobject | Defines the equivalent points value of the reward.
|
Unique reward ID, assigned by Voucherify.
**Example:**rew_nIy4gHpQHle2c3pNMwuj7G6j
| +| name`string` |Reward name.
| +| stock`integer`, `null` |Configurable for material rewards. The number of units of the product that you want to share as reward.
| +| redeemed`integer`, `null` |Defines the number of already invoked (successful) reward redemptions.
| +| attributes`object` |These properties are configurable for material rewards.
Attributes | Description |
---|---|
image_urlstring | The HTTPS URL pointing to the .png or .jpg file. |
descriptionstring | An arbitrary string that you can attach to a material reward. |
The metadata object stores all custom attributes assigned to the reward. A set of key/value pairs that you can attach to a reward object. It can be useful for storing additional information about the reward in a structured format.
| +| type`string` |Reward type.
Available values: `CAMPAIGN`, `COIN`, `MATERIAL` | +| parameters |Defines how the reward is generated.
[Reward type](#reward-type) | +| created_at`string` |Timestamp representing the date and time when the reward was created. The value is shown in the ISO 8601 format.
**Example:**2022-08-11T14:49:22.586Z
| +| updated_at`string`, `null` |Timestamp representing the date and time when the reward was updated. The value is shown in the ISO 8601 format.
**Example:**2022-08-11T16:01:34.885Z
| +| object |The type of the object represented by the JSON. This object stores information about the reward.
Available values: `reward` | + +## Reward type +One of: + +[Digital](#digital), [Pay with Points](#pay-with-points), [Material](#material) + +## Digital +| Attributes | Description | +|:-----|:--------| +| campaign`object` |Objects stores information about the campaign related to the reward.
Attributes | Description |
---|---|
idstring | Unique campaign ID, assigned by Voucherify. |
balanceinteger | The number of points to be added to a loyalty card or the amount to be added to the current balance on the gift card. For gift cards, the value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. |
typestring | Campaign type. Available values:DISCOUNT_COUPONS , GIFT_VOUCHERS , LOYALTY_PROGRAM |
Defines the ratio by mapping the number of loyalty points in points_ratio to a predefined cash amount in exchange_ratio.
Attributes | Description |
---|---|
exchange_rationumber | The cash equivalent of the points defined in the points_ratio property. |
points_ratiointeger | The number of loyalty points that will map to the predefined cash amount defined by the exchange_ratio property. |
Contains information about the product given as a reward.
Attributes | Description |
---|---|
idstring | Unique product ID, assigned by Voucherify. Example:prod_0b7d7dfb05cbe5c616 |
sku_idstring , null | Unique SKU ID, assigned by Voucherify, of the SKU given as a reward. Example:sku_0b7d7dfb090be5c619 |
Unique segment ID.
**Example:**seg_1wc52c5z6r1kQ81brO8j9Hk2
| +| name`string` |Segment name.
| +| created_at`string` |Timestamp representing the date and time when the segment was created. The value is shown in the ISO 8601 format.
**Example:**2022-05-12T13:01:56.896Z
| +| type`string` |Describes whether the segment is dynamic (customers come in and leave based on set criteria) or static (manually selected customers).
Available values: `auto-update`, `static` | +| filter`object`, `null` |Defines a set of criteria for an auto-update
segment type.
The type of the object represented by JSON. This object stores information about the customer segment.
Available values: `segment` | + +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/SEGMENTS-Delete-Segment.md b/reference-docs/SEGMENTS-Delete-Segment.md new file mode 100644 index 00000000..60c27df2 --- /dev/null +++ b/reference-docs/SEGMENTS-Delete-Segment.md @@ -0,0 +1,14 @@ +--- +title: Delete Segment +type: endpoint +categorySlug: voucherify-api +slug: delete-segment +parentDocSlug: segments +hidden: false +order: 4 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/SEGMENTS-Get-Segment.md b/reference-docs/SEGMENTS-Get-Segment.md new file mode 100644 index 00000000..545c5fdb --- /dev/null +++ b/reference-docs/SEGMENTS-Get-Segment.md @@ -0,0 +1,14 @@ +--- +title: Get Segment +type: endpoint +categorySlug: voucherify-api +slug: get-segment +parentDocSlug: segments +hidden: false +order: 2 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/Stacking-Overview.md b/reference-docs/Stacking-Overview.md new file mode 100644 index 00000000..0f87f3bc --- /dev/null +++ b/reference-docs/Stacking-Overview.md @@ -0,0 +1,10 @@ +--- +title: Stacking API Overview +categorySlug: voucherify-api +parentDocSlug: redemptions +slug: stacking-api-overview +type: link +hidden: true +order: 22 +link_url: https://docs.voucherify.io/docs/manage-stackable-discounts +--- diff --git a/reference-docs/TEMPLATES-Add-Promotion-Tier-From-Template.md b/reference-docs/TEMPLATES-Add-Promotion-Tier-From-Template.md new file mode 100644 index 00000000..94ae41f3 --- /dev/null +++ b/reference-docs/TEMPLATES-Add-Promotion-Tier-From-Template.md @@ -0,0 +1,14 @@ +--- +title: Add Promotion Tier From Template +type: endpoint +categorySlug: voucherify-api +slug: add-tier-from-template +parentDocSlug: templates +hidden: false +order: 70 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/TEMPLATES-Create-Campaign-From-Template.md b/reference-docs/TEMPLATES-Create-Campaign-From-Template.md new file mode 100644 index 00000000..0452b68f --- /dev/null +++ b/reference-docs/TEMPLATES-Create-Campaign-From-Template.md @@ -0,0 +1,14 @@ +--- +title: Create Campaign From Template +type: endpoint +categorySlug: voucherify-api +slug: create-campaign-from-template +parentDocSlug: templates +hidden: false +order: 60 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/TEMPLATES-Create-Campaign-Template.md b/reference-docs/TEMPLATES-Create-Campaign-Template.md new file mode 100644 index 00000000..db77a46e --- /dev/null +++ b/reference-docs/TEMPLATES-Create-Campaign-Template.md @@ -0,0 +1,14 @@ +--- +title: Create Campaign Template +type: endpoint +categorySlug: voucherify-api +slug: create-campaign-template +parentDocSlug: templates +hidden: false +order: 30 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/TEMPLATES-Delete-Campaign-Template.md b/reference-docs/TEMPLATES-Delete-Campaign-Template.md new file mode 100644 index 00000000..e0eb0c08 --- /dev/null +++ b/reference-docs/TEMPLATES-Delete-Campaign-Template.md @@ -0,0 +1,14 @@ +--- +title: Delete Campaign Template +type: endpoint +categorySlug: voucherify-api +slug: delete-campaign-template +parentDocSlug: templates +hidden: false +order: 50 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/TEMPLATES-Get-Campaign-Template.md b/reference-docs/TEMPLATES-Get-Campaign-Template.md new file mode 100644 index 00000000..8cfc2df3 --- /dev/null +++ b/reference-docs/TEMPLATES-Get-Campaign-Template.md @@ -0,0 +1,14 @@ +--- +title: Get Campaign Template +type: endpoint +categorySlug: voucherify-api +slug: get-campaign-template +parentDocSlug: templates +hidden: false +order: 20 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/TEMPLATES-List-Campaign-Templates.md b/reference-docs/TEMPLATES-List-Campaign-Templates.md new file mode 100644 index 00000000..44e7446c --- /dev/null +++ b/reference-docs/TEMPLATES-List-Campaign-Templates.md @@ -0,0 +1,14 @@ +--- +title: List Campaign Templates +type: endpoint +categorySlug: voucherify-api +slug: list-campaign-templates +parentDocSlug: templates +hidden: false +order: 10 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/TEMPLATES-Update-Campaign-Template.md b/reference-docs/TEMPLATES-Update-Campaign-Template.md new file mode 100644 index 00000000..5fe32ecd --- /dev/null +++ b/reference-docs/TEMPLATES-Update-Campaign-Template.md @@ -0,0 +1,14 @@ +--- +title: Update Campaign Template +type: endpoint +categorySlug: voucherify-api +slug: update-campaign-template +parentDocSlug: templates +hidden: false +order: 40 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/TRASH-BIN-Delete-Bin.md b/reference-docs/TRASH-BIN-Delete-Bin.md new file mode 100644 index 00000000..97cc07fd --- /dev/null +++ b/reference-docs/TRASH-BIN-Delete-Bin.md @@ -0,0 +1,14 @@ +--- +title: Delete Bin Entry +type: endpoint +categorySlug: voucherify-api +slug: delete-bin-entry +parentDocSlug: bin +hidden: false +order: 20 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/TRASH-BIN-Get-Bin.md b/reference-docs/TRASH-BIN-Get-Bin.md new file mode 100644 index 00000000..04ed6892 --- /dev/null +++ b/reference-docs/TRASH-BIN-Get-Bin.md @@ -0,0 +1,14 @@ +--- +title: List Bin Entries +type: endpoint +categorySlug: voucherify-api +slug: list-bin-entries +parentDocSlug: bin +hidden: false +order: 10 +--- +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/VALIDATION-RULES-Create-Validation-Rule.md b/reference-docs/VALIDATION-RULES-Create-Validation-Rule.md new file mode 100644 index 00000000..9ff16108 --- /dev/null +++ b/reference-docs/VALIDATION-RULES-Create-Validation-Rule.md @@ -0,0 +1,14 @@ +--- +title: Create Validation Rules +type: endpoint +categorySlug: voucherify-api +slug: create-validation-rules +parentDocSlug: validation-rules +hidden: false +order: 5 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/VALIDATION-RULES-Create-Validation-Rules-Assignments.md b/reference-docs/VALIDATION-RULES-Create-Validation-Rules-Assignments.md new file mode 100644 index 00000000..d380e3a8 --- /dev/null +++ b/reference-docs/VALIDATION-RULES-Create-Validation-Rules-Assignments.md @@ -0,0 +1,14 @@ +--- +title: Create Validation Rules Assignments +type: endpoint +categorySlug: voucherify-api +slug: create-validation-rule-assignment +parentDocSlug: validation-rules +hidden: false +order: 9 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/VALIDATION-RULES-Delete-Validation-Rule-Assignment.md b/reference-docs/VALIDATION-RULES-Delete-Validation-Rule-Assignment.md new file mode 100644 index 00000000..ad3b74db --- /dev/null +++ b/reference-docs/VALIDATION-RULES-Delete-Validation-Rule-Assignment.md @@ -0,0 +1,14 @@ +--- +title: Delete Validation Rule Assignment +type: endpoint +categorySlug: voucherify-api +slug: delete-validation-rule-assignment +parentDocSlug: validation-rules +hidden: false +order: 10 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/VALIDATION-RULES-Delete-Validation-Rule.md b/reference-docs/VALIDATION-RULES-Delete-Validation-Rule.md new file mode 100644 index 00000000..650ff32b --- /dev/null +++ b/reference-docs/VALIDATION-RULES-Delete-Validation-Rule.md @@ -0,0 +1,14 @@ +--- +title: Delete Validation Rule +type: endpoint +categorySlug: voucherify-api +slug: delete-validation-rules +parentDocSlug: validation-rules +hidden: false +order: 7 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/VALIDATION-RULES-Get-Validation-Rule.md b/reference-docs/VALIDATION-RULES-Get-Validation-Rule.md new file mode 100644 index 00000000..9ff926d2 --- /dev/null +++ b/reference-docs/VALIDATION-RULES-Get-Validation-Rule.md @@ -0,0 +1,14 @@ +--- +title: Get Validation Rule +type: endpoint +categorySlug: voucherify-api +slug: get-validation-rule +parentDocSlug: validation-rules +hidden: false +order: 4 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/VALIDATION-RULES-List-Validation-Rule-Assignments.md b/reference-docs/VALIDATION-RULES-List-Validation-Rule-Assignments.md new file mode 100644 index 00000000..ca716d95 --- /dev/null +++ b/reference-docs/VALIDATION-RULES-List-Validation-Rule-Assignments.md @@ -0,0 +1,14 @@ +--- +title: List Validation Rule Assignments +type: endpoint +categorySlug: voucherify-api +slug: list-validation-rule-assignments +parentDocSlug: validation-rules +hidden: false +order: 9 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/VALIDATION-RULES-List-Validation-Rules-Assignments.md b/reference-docs/VALIDATION-RULES-List-Validation-Rules-Assignments.md new file mode 100644 index 00000000..7daadf47 --- /dev/null +++ b/reference-docs/VALIDATION-RULES-List-Validation-Rules-Assignments.md @@ -0,0 +1,14 @@ +--- +title: List Validation Rules' Assignment(s) +type: endpoint +categorySlug: voucherify-api +slug: list-validation-rules-assignments +parentDocSlug: validation-rules +hidden: false +order: 8 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/VALIDATION-RULES-List-Validation-Rules.md b/reference-docs/VALIDATION-RULES-List-Validation-Rules.md new file mode 100644 index 00000000..f0f3ec19 --- /dev/null +++ b/reference-docs/VALIDATION-RULES-List-Validation-Rules.md @@ -0,0 +1,14 @@ +--- +title: List Validation Rules +type: endpoint +categorySlug: voucherify-api +slug: list-validation-rules +parentDocSlug: validation-rules +hidden: false +order: 3 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/VALIDATION-RULES-Update-Validation-Rule.md b/reference-docs/VALIDATION-RULES-Update-Validation-Rule.md new file mode 100644 index 00000000..023d3d6a --- /dev/null +++ b/reference-docs/VALIDATION-RULES-Update-Validation-Rule.md @@ -0,0 +1,14 @@ +--- +title: Update Validation Rule +type: endpoint +categorySlug: voucherify-api +slug: update-validation-rule +parentDocSlug: validation-rules +hidden: false +order: 6 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/VALIDATION-RULES-Validation-Rule-Assignment-Object.md b/reference-docs/VALIDATION-RULES-Validation-Rule-Assignment-Object.md new file mode 100644 index 00000000..edf2e65c --- /dev/null +++ b/reference-docs/VALIDATION-RULES-Validation-Rule-Assignment-Object.md @@ -0,0 +1,25 @@ +--- +title: Validation Rule Assignment Object +type: basic +categorySlug: voucherify-api +parentDocSlug: validation-rules +slug: validation-rule-assignment-object +hidden: false +order: 2 +--- + +## Validation Rule Assignment +| Attributes | Description | +|:-----|:--------| +| id`string` |Validation rule assignment ID.
**Example:**asgm_74F7QZoYbUoljwQO
| +| rule_id`string` |Validation rule ID.
**Example:**val_4j7DCRm2IS59
| +| related_object_id`string` |The resource ID to which the validation rule was assigned.
**Example:**v_JtWunK6jUo7X2qOFj0SyRHq4p9tgENlT
| +| related_object_type`string` |The type of resource to which the validation rule was assigned.
Available values: `voucher`, `campaign`, `earning_rule`, `reward_assignment`, `promotion_tier`, `distribution` | +| created_at`string` |Timestamp representing the date and time when the validation rule assignment was created. The value is shown in the ISO 8601 format.
**Example:**2022-02-17T08:18:15.085Z
| +| object`string` |The type of the object represented by the ID.
Available values: `validation_rules_assignment` | + +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/VALIDATION-RULES-Validation-Rule-Object.md b/reference-docs/VALIDATION-RULES-Validation-Rule-Object.md new file mode 100644 index 00000000..682d3dac --- /dev/null +++ b/reference-docs/VALIDATION-RULES-Validation-Rule-Object.md @@ -0,0 +1,134 @@ +--- +title: Validation Rule Object +type: basic +categorySlug: voucherify-api +parentDocSlug: validation-rules +slug: validation-rule-object +hidden: false +order: 1 +--- + +## Validation Rule +All of: + +1. [Validation Rule Base](#validation-rule-base) +2.Attributes | Description |
---|---|
idstring | Unique validation rule ID. Example:val_eR1c41hu0vUU |
created_atstring | Timestamp representing the date and time when the validation rule was created. The value is shown in the ISO 8601 format. Example:2022-03-23T07:44:00.444Z |
updated_atstring | Timestamp representing the date and time when the validation rule was updated. The value is shown in the ISO 8601 format. Example:2022-04-26T08:35:54.960Z |
assignments_countinteger | The number of instances the validation rule has been assigned to different types of redeemables. |
objectstring | The type of the object represented by JSON. This object stores information about the validation rule. |
Custom, unique name for set of validation rules.
**Example:**Business Validation Rule
| +| rules | See: [Validation Rule Rules](#validation-rule-rules) | +| bundle_rules | See: [Validation Rule Bundle Rules](#validation-rule-bundle-rules) | +| error`object` |Contains the error message returned from API when validation / redemption fails to meet requirements of defined rules.
Attributes | Description |
---|---|
messagestring | The error message returned from API when validation / redemption fails to meet requirements of defined rules. |
Attributes | Description |
---|---|
excludedarray | Defines which items are excluded from a discount. Array of Applicable To |
includedarray | Defines which items are included in a discount. Array of Applicable To |
included_allboolean | Indicates whether all items are included in the discount. |
Type of validation rule.
Available values: `expression`, `basic`, `advanced`, `complex` | +| context_type`string` |Validation rule context type.
Context Type | Definition |
---|---|
earning_rule.order.paid | |
earning_rule.custom_event | |
earning_rule.customer.segment.entered | |
campaign.discount_coupons | |
campaign.discount_coupons.discount.apply_to_order | |
campaign.discount_coupons.discount.apply_to_items | |
campaign.discount_coupons.discount.apply_to_items_proportionally | |
campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | |
campaign.discount_coupons.discount.fixed.apply_to_items | |
campaign.gift_vouchers | |
campaign.gift_vouchers.gift.apply_to_order | |
campaign.gift_vouchers.gift.apply_to_items | |
campaign.referral_program | |
campaign.referral_program.discount.apply_to_order | |
campaign.referral_program.discount.apply_to_items | |
campaign.referral_program.discount.apply_to_items_proportionally | |
campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | |
campaign.referral_program.discount.fixed.apply_to_items | |
campaign.promotion | |
campaign.promotion.discount.apply_to_order | |
campaign.promotion.discount.apply_to_items | |
campaign.promotion.discount.apply_to_items_proportionally | |
campaign.promotion.discount.apply_to_items_proportionally_by_quantity | |
campaign.promotion.discount.fixed.apply_to_items | |
campaign.loyalty_program | |
voucher.discount_voucher | |
voucher.discount_voucher.discount.apply_to_order | |
voucher.discount_voucher.discount.apply_to_items | |
voucher.discount_voucher.discount.apply_to_items_proportionally | |
voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | |
voucher.discount_voucher.discount.fixed.apply_to_items | |
voucher.gift_voucher | |
voucher.gift_voucher.gift.apply_to_order | |
voucher.gift_voucher.gift.apply_to_items | |
voucher.loyalty_card | |
distribution.custom_event | |
reward_assignment.pay_with_points | |
global |
Defines the logic between the rules.
**Example:**(1 and 2) and (3)
| +| [propertyName]`object` |Contains the name of the validation rule.
Attributes | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
namestring | Voucherify's specific rule name. The list of available names is provided below.
*Requires the | ||||||||||||||||||||
propertystring , null | Custom name for a metadata property associated with the condition to be satisfied. Required if the property | ||||||||||||||||||||
conditions | See: Validation Rule Conditions | ||||||||||||||||||||
rules | See: Validation Rule Rules | ||||||||||||||||||||
errorobject | Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.
|
Defines how many bundles can be identified in the order and the maximum multiplier of the discount per identified bundle. For example, if the order meets 3 bundles, but limit: 2
, the discount will be multiplied by 2.
Contains the name of the bundle rule.
Attributes | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
namestring | Voucherify's specific bundle rule name. Currently, it is only order.items.any | ||||||||||||
conditionsobject | Defines the conditions of the bundle rule. The order items in the customer's cart must meet the conditions. Because the rule concerns order items, the only permissible condition is
| ||||||||||||
rules | |||||||||||||
errorobject | CURRENTLY UNSUPPORTED. Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.
|
This object stores information about the resource to which the discount is applicable.
Available values: `product`, `sku`, `products_collection` | +| id`string` |Unique product collection, product, or SKU identifier assigned by Voucherify.
| +| source_id`string` |The source identifier from your inventory system.
| +| product_id`string` |Parent product's unique ID assigned by Voucherify.
| +| product_source_id`string` |Parent product's source ID from your inventory system.
| +| price`number` |New fixed price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 price is written as 1000. In case of the fixed price being calculated by the formula, i.e. the price_formula parameter is present in the fixed price definition, this value becomes the fallback value. Such that in a case where the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed price.
| +| price_formula`number` |Formula used to calculate the discounted price of an item.
| +| effect |Defines how the discount is applied to the customer's order.
[Applicable To Effect](#applicable-to-effect) | +| quantity_limit`integer` |The maximum number of units allowed to be discounted per order line item.
| +| aggregated_quantity_limit`integer` |The maximum number of units allowed to be discounted combined across all matched order line items.
| +| amount_limit`integer` |Upper limit allowed to be applied as a discount per order line item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount is written as 600.
| +| aggregated_amount_limit`integer` |Maximum discount amount per order. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount on the entire order is written as 600. This value is definable for the following discount effects:
APPLY_TO_ITEMS
(each item subtotal is discounted equally)APPLY_TO_ITEMS_BY_QUANTITY
(each unit of matched products has the same discount value)Lists which order lines are (not) covered by the discount. The order in the array is determined by the sequence of applied discounts, while the numbers correspond to the order lines sent in the order
object in the request. The first order line is assigned 0
, the second order line is assigned 1
, and so on.
Lists which units within order lines are covered by the discount. The order line items are listed according to sequence of applied discounts while the index
corresponds to the order line sent in the order
object in the request.
Attributes | Description |
---|---|
indexinteger | Number assigned to the order line item in accordance with the order sent in the request. |
unitsarray | Numbers of units in the order line covered by the discount; e.g. |
units_limit_exceededboolean | Returned as |
Determines the recurrence of the discount, e.g. "repeat": 3
means that the discount is applied to every third item.
Determines how many items are skipped before the discount is applied.
| +| target`string` |Determines to which kinds of objects the discount is applicable. ITEM
includes products and SKUs. UNIT
means particular units within an order line.
Defines the logic between the rules.
**Example:**(1 and 2) and (3)
| +| [propertyName]`object` |Contains the name of the validation rule.
Attributes | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
namestring | Voucherify's specific rule name. The list of available names is provided below.
*Requires the | ||||||||||||||||||||
propertystring , null | Custom name for a metadata property associated with the condition to be satisfied. Required if the property | ||||||||||||||||||||
conditions | See: Validation Rule Conditions | ||||||||||||||||||||
rules | See: Validation Rule Rules | ||||||||||||||||||||
errorobject | Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.
|
Defines the logic between the rules.
**Example:**(1 and 2) and (3)
| +| [propertyName]`object` |Contains the name of the validation rule.
Attributes | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
namestring | Voucherify's specific rule name. The list of available names is provided below.
*Requires the | ||||||||||||||||||||
propertystring , null | Custom name for a metadata property associated with the condition to be satisfied. Required if the property | ||||||||||||||||||||
conditions | See: Validation Rule Conditions | ||||||||||||||||||||
rules | See: Validation Rule Rules | ||||||||||||||||||||
errorobject | Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.
|
Defines the logic between the rules.
**Example:**(1 and 2) and (3)
| +| [propertyName]`object` |Contains the name of the validation rule.
Attributes | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
namestring | Voucherify's specific rule name. The list of available names is provided below.
*Requires the | ||||||||||||||||||||
propertystring , null | Custom name for a metadata property associated with the condition to be satisfied. Required if the property | ||||||||||||||||||||
conditions | See: Validation Rule Conditions | ||||||||||||||||||||
rulesobject | Another set of validation rules. If you need to create complex rules with more nested rules, use the validation rule builder in the dashboard. | ||||||||||||||||||||
errorobject | Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.
|
Response body schema for POST v1/vouchers/{code}/validate
.
Indicates whether the voucher is valid within the context of the parameters provided in the request body.
| +| code`string` |Voucher code.
| +| applicable_to |Contains list of items that qualify in the scope of the discount. These are definitions of included products, SKUs, and product collections. These can be discounted.
[Applicable To Result List](#applicable-to-result-list) | +| inapplicable_to |Contains list of items that do not qualify in the scope of the discount. These are definitions of excluded products, SKUs, and product collections. These CANNOT be discounted.
[Inapplicable To Result List](#inapplicable-to-result-list) | +| campaign`string` |Voucher's parent campaign name.
| +| campaign_id`string` |Voucher's parent campaign's unique ID.
| +| metadata`object` |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.
| +| discount | See: [Discount](#discount) | +| gift |Gift object response
[Gift](#gift) | +| loyalty`object` |Contains the cost of reward in points.
Attributes | Description |
---|---|
points_costnumber | Number of points that wlil be deducted from loyaty card for the associated reward. |
Contains information about the reward that is being validated.
Attributes | Description |
---|---|
idstring | Unique reward ID assigned by Voucherify. |
assignment_idstring | Unique reward assignment ID assigned by Voucherify. |
pointsnumber | Number of points applied to the reward. |
Attributes | Description |
---|---|
itemsarray | Array of items applied to the order. It can include up to 500 items. Array of Order Item Calculated |
Schema model for session lock object. The session object contains information about the session key that was used to establish a session between multiple parallel validation and redemption requests.
[Session](#session) | +| start_date`string` |Activation timestamp defines when the voucher starts to be active in ISO 8601 format. Voucher is inactive before this date.
| +| expiration_date`string` |Expiration timestamp defines when the voucher expires in ISO 8601 format. Voucher is inactive after this date.
| +| tracking_id`string` |Hashed order source ID.
| + +## Vouchers Validate Invalid Response Body +| Attributes | Description | +|:-----|:--------| +| valid`boolean` |Indicates whether the voucher is valid within the context of the parameters provided in the request body.
| +| code`string` |Voucher code.
| +| error`object` |Detailed failure cause for the invalid voucher if the reason has a translation defined in the Dashboard → Project Settings → Error Messages.
Attributes | Description |
---|---|
codenumber | Voucher code. |
keystring | |
messagestring | Customized error message. |
detailsstring | |
request_idstring | |
resource_idstring | |
resource_typestring |
Hashed customer source ID.
| +| customer_id`string` |Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify.
| +| metadata`object` |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.
| +| reason`string` | | + +## Applicable To Result List +| Attributes | Description | +|:-----|:--------| +| data`array` |Contains array of items to which the discount can apply.
Array of [Applicable To](#applicable-to) | +| total`integer` |Total number of objects defining included products, SKUs, or product collections.
| +| object`string` |The type of the object represented by JSON.
Available values: `list` | +| data_ref`string` |The type of the object represented by JSON.
Available values: `data` | + +## Inapplicable To Result List +| Attributes | Description | +|:-----|:--------| +| data`array` |Contains array of items to which the discount cannot apply.
Array of [Inapplicable To](#inapplicable-to) | +| total`integer` |Total number of objects defining included products, SKUs, or product collections.
| +| object`string` |The type of the object represented by JSON.
Available values: `list` | +| data_ref`string` |The type of the object represented by JSON.
Available values: `data` | + +## Discount +Contains information about discount.
+ +One of: + +[Amount](#amount), [Unit](#unit), [Unit Multiple](#unit-multiple), [Percent](#percent), [Fixed](#fixed) + +## Gift +| Attributes | Description | +|:-----|:--------| +| amount`number` |Total gift card income over the lifetime of the card. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents
for $100.00
.
Total amount of subtracted credits over the gift card lifetime.
| +| balance`number` |Available funds. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents
for $100.00
. balance
= amount
- subtracted_amount
- redemption.redeemed_amount
.
Defines how the credits are applied to the customer's order.
Available values: `APPLY_TO_ORDER`, `APPLY_TO_ITEMS` | + +## Order Calculated No Customer Data +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.
| +| source_id`string`, `null` |Unique source ID of an existing order that will be linked to the redemption of this request.
| +| status`string` |The order status.
Available values: `CREATED`, `PAID`, `CANCELED`, `FULFILLED` | +| amount`integer` |This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| initial_amount`integer` |This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| discount_amount`integer` |Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| items_discount_amount`integer` |Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| total_discount_amount`integer` |Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| total_amount`integer` |Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| applied_discount_amount`integer` |This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
| +| items_applied_discount_amount`integer` |Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).sum(items, i => i.applied_discount_amount)
Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).total_applied_discount_amount
= applied_discount_amount
+ items_applied_discount_amount
A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.
| +| object`string` |The type of the object represented by JSON.
Available values: `order` | +| created_at`string` |Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.
**Example:**2021-12-22T10:13:06.487Z
| +| updated_at`string`, `null` |Timestamp representing the date and time when the order was last updated in ISO 8601 format.
**Example:**2021-12-22T10:14:45.316Z
| +| customer_id`string`, `null` |Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify.
**Example:**cust_7iUa6ICKyU6gH40dBU25kQU1
| +| referrer_id`string`, `null` |Unique referrer ID.
**Example:**cust_nM4jqPiaXUvQdVSA6vTRUnix
| +| customer | [Customer Id](#customer-id) | +| referrer | [Referrer Id](#referrer-id) | +| redemptions`object` |Attributes | Description |
---|---|
[propertyName] | See: Order Redemptions |
Unique identifier of the order line item.
| +| sku_id`string` |Unique identifier of the SKU. It is assigned by Voucherify.
| +| product_id`string` |Unique identifier of the product. It is assigned by Voucherify.
| +| related_object`string` |Used along with the source_id property, can be set to either sku or product.
Available values: `product`, `sku` | +| source_id`string` |The merchant's product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service.
| +| quantity`integer` |The quantity of the particular item in the cart.
| +| discount_quantity`integer` |Number of dicounted items.
| +| initial_quantity`integer` |A positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items' quantity.
| +| amount`integer` |The total amount of the order item (price * quantity).
| +| discount_amount`integer` |Sum of all order-item-level discounts applied to the order.
| +| applied_discount_amount`integer` |This field shows the order-level discount applied.
| +| applied_discount_quantity`integer` |Number of the discounted items applied in the transaction.
| +| applied_quantity`integer` |Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.
| +| applied_quantity_amount`integer` |Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.
| +| initial_amount`integer` |A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.
| +| price`integer` |Unit price of an item. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents
for $100.00
.
Final order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the amount
.subtotal_amount
=amount
-applied_discount_amount
An object containing details of the related product.
Attributes | Description |
---|---|
idstring | A unique identifier that represents the product and is assigned by Voucherify. |
source_idstring | The merchant's product ID (if it is different than Voucherify's product ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service. |
overrideboolean | The override set to |
namestring | Product name. |
metadataobject | A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections. |
pricenumber | Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00). |
An object containing details of the related SKU.
Attributes | Description |
---|---|
idstring | A unique identifier that represents the SKU and is assigned by Voucherify. |
source_idstring | The merchant's SKU ID (if it is different than Voucherify's SKU ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service. |
overrideboolean | The override set to |
skustring | The SKU name. |
pricenumber | SKU price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00). |
metadataobject | A set of custom key/value pairs that you can attach to an SKU. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections. |
The type of the object represented by JSON.
Available values: `order_item` | +| metadata`object` |A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas.
| + +## Session +| Attributes | Description | +|:-----|:--------| +| key`string` |The session unique ID assigned by Voucherify or your own unique session ID. Sending an existing ID will result in overwriting an existing session. If no session key is provided, then a new ID will be generated.
| +| type`string` |This parameter is required to establish a new session.
Available values: `LOCK` | +| ttl`number` |Value for the period of time that the session is active. Units for this parameter are defined by the session.ttl_unit parameter.
| +| ttl_unit`string` |Defines the type of unit in which the session time is counted.
Available values: `DAYS`, `HOURS`, `MICROSECONDS`, `MILLISECONDS`, `MINUTES`, `NANOSECONDS`, `SECONDS` | + +## Applicable To +| Attributes | Description | +|:-----|:--------| +| object`string` |This object stores information about the resource to which the discount is applicable.
Available values: `product`, `sku`, `products_collection` | +| id`string` |Unique product collection, product, or SKU identifier assigned by Voucherify.
| +| source_id`string` |The source identifier from your inventory system.
| +| product_id`string` |Parent product's unique ID assigned by Voucherify.
| +| product_source_id`string` |Parent product's source ID from your inventory system.
| +| price`number` |New fixed price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 price is written as 1000. In case of the fixed price being calculated by the formula, i.e. the price_formula parameter is present in the fixed price definition, this value becomes the fallback value. Such that in a case where the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed price.
| +| price_formula`number` |Formula used to calculate the discounted price of an item.
| +| effect |Defines how the discount is applied to the customer's order.
[Applicable To Effect](#applicable-to-effect) | +| quantity_limit`integer` |The maximum number of units allowed to be discounted per order line item.
| +| aggregated_quantity_limit`integer` |The maximum number of units allowed to be discounted combined across all matched order line items.
| +| amount_limit`integer` |Upper limit allowed to be applied as a discount per order line item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount is written as 600.
| +| aggregated_amount_limit`integer` |Maximum discount amount per order. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount on the entire order is written as 600. This value is definable for the following discount effects:
APPLY_TO_ITEMS
(each item subtotal is discounted equally)APPLY_TO_ITEMS_BY_QUANTITY
(each unit of matched products has the same discount value)Lists which order lines are (not) covered by the discount. The order in the array is determined by the sequence of applied discounts, while the numbers correspond to the order lines sent in the order
object in the request. The first order line is assigned 0
, the second order line is assigned 1
, and so on.
Lists which units within order lines are covered by the discount. The order line items are listed according to sequence of applied discounts while the index
corresponds to the order line sent in the order
object in the request.
Attributes | Description |
---|---|
indexinteger | Number assigned to the order line item in accordance with the order sent in the request. |
unitsarray | Numbers of units in the order line covered by the discount; e.g. |
units_limit_exceededboolean | Returned as |
Determines the recurrence of the discount, e.g. "repeat": 3
means that the discount is applied to every third item.
Determines how many items are skipped before the discount is applied.
| +| target`string` |Determines to which kinds of objects the discount is applicable. ITEM
includes products and SKUs. UNIT
means particular units within an order line.
Defines the type of the voucher.
Available values: `AMOUNT` | +| amount_off`number` |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_formula`string` | | +| aggregated_amount_limit`integer` |Maximum discount amount per order.
| +| effect |Defines how the discount is applied to the customer's order.
[Discount Amount Vouchers Effect Types](#discount-amount-vouchers-effect-types) | +| is_dynamic`boolean` |Flag indicating whether the discount was calculated using a formula.
| + +## Unit +| Attributes | Description | +|:-----|:--------| +| type`string` |Discount type.
Available values: `UNIT` | +| unit_off`integer` |Number of units to be granted a full value discount.
| +| unit_off_formula`string` |Formula used to calculate the number of units.
| +| effect |Defines how the unit is added to the customer's order.
[Discount Unit Vouchers Effect Types](#discount-unit-vouchers-effect-types) | +| unit_type`string` |The product deemed as free, chosen from product inventory (e.g. time, items).
| +| product |Contains information about the product.
[Simple Product Discount Unit](#simple-product-discount-unit) | +| sku | See: [Simple Sku Discount Unit](#simple-sku-discount-unit) | +| is_dynamic`boolean` |Flag indicating whether the discount was calculated using a formula.
| + +## Unit Multiple +| Attributes | Description | +|:-----|:--------| +| type`string` |Discount type.
Available values: `UNIT` | +| effect`string` |Defines how the discount is applied to the customer's order.
Available values: `ADD_MANY_ITEMS` | +| units`array` | Array of [One Unit](#one-unit) | + +## Percent +| Attributes | Description | +|:-----|:--------| +| type`string` |Defines the type of the voucher.
Available values: `PERCENT` | +| percent_off`number` |The percent discount that the customer will receive.
| +| percent_off_formula`string` | | +| amount_limit`number` |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_limit`integer` |Maximum discount amount per order.
| +| effect |Defines how the discount is applied to the customer's order.
[Discount Percent Vouchers Effect Types](#discount-percent-vouchers-effect-types) | +| is_dynamic`boolean` |Flag indicating whether the discount was calculated using a formula.
| + +## Fixed +| Attributes | Description | +|:-----|:--------| +| type`string` |Defines the type of the voucher.
Available values: `FIXED` | +| fixed_amount`number` |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_formula
parameter is present in the fixed amount definition, this value becomes the fallback value. As a result, if the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed value.
Defines how the discount is applied to the customer's order.
[Discount Fixed Vouchers Effect Types](#discount-fixed-vouchers-effect-types) | +| is_dynamic`boolean` |Flag indicating whether the discount was calculated using a formula.
| + +## Customer Id +| Attributes | Description | +|:-----|:--------| +| id`string` |A unique identifier of an existing customer.
| +| object`string` |The type of the object represented by JSON.
Available values: `customer` | + +## Referrer Id +[Customer Id](#customer-id) + +## Order Redemptions +| Attributes | Description | +|:-----|:--------| +| date`string` |Timestamp representing the date and time when the redemption was created. The value is shown in the ISO 8601 format.
**Example:**2022-09-02T17:06:56.649Z
| +| rollback_id`string` |Unique ID of the redemption rollback.
**Example:**rr_0c63c84eb78ee0a6c0
| +| rollback_date`string` |Timestamp representing the date and time when the redemption rollback was created. The value is shown in the ISO 8601 format.
**Example:**2023-01-31T14:18:37.150Z
| +| related_object_type`string` |The source of the incentive.
| +| related_object_id`string` |Unique ID of the parent redemption.
**Example:**r_0ba186c4824e4881e1
| +| related_object_parent_id`string` |Represent's the campaign ID of the voucher if the redemption was based on a voucher that was part of bulk codes generated within a campaign. In case of a promotion tier, this represents the campaign ID of the promotion tier's parent campaign.
| +| stacked`array` |Contains a list of unique IDs of child redemptions, which belong to the stacked incentives.
| +| rollback_stacked`array` |Lists the rollback redemption IDs of the particular child redemptions.
| + +## Applicable To Effect +Available values: `APPLY_TO_EVERY`, `APPLY_TO_CHEAPEST`, `APPLY_FROM_CHEAPEST`, `APPLY_TO_MOST_EXPENSIVE`, `APPLY_FROM_MOST_EXPENSIVE` + +## 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 | +|:-----|:--------| +| id`string` |Unique product ID, assigned by Voucherify.
| +| source_id`string` |Product's source ID.
| +| name`string` |Product name.
| + +## Simple Sku Discount Unit +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique SKU ID, assigned by Voucherify.
| +| source_id`string` |Product variant's source ID.
| +| name`string` |Sku name
| + +## One Unit +| Attributes | Description | +|:-----|:--------| +| unit_off`number` |Number of units to be granted a full value discount.
| +| unit_off_formula`string` |Formula used to calculate the number of units.
| +| effect`string` |Defines how the unit is added to the customer's order.
Available values: `ADD_NEW_ITEMS`, `ADD_MISSING_ITEMS` | +| unit_type`string` |The product deemed as free, chosen from product inventory (e.g. time, items).
| +| product |Contains information about the product.
[Simple Product Discount Unit](#simple-product-discount-unit) | +| sku |Contains information about the sku.
[Simple Sku Discount Unit](#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` + +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/VOUCHERS-Adjust-Voucher-Balance.md b/reference-docs/VOUCHERS-Adjust-Voucher-Balance.md new file mode 100644 index 00000000..89197491 --- /dev/null +++ b/reference-docs/VOUCHERS-Adjust-Voucher-Balance.md @@ -0,0 +1,14 @@ +--- +title: Adjust Voucher Balance +type: endpoint +categorySlug: voucherify-api +slug: update-voucher-balance +parentDocSlug: vouchers +hidden: false +order: 10 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/VOUCHERS-Create-Voucher.md b/reference-docs/VOUCHERS-Create-Voucher.md new file mode 100644 index 00000000..8130c40b --- /dev/null +++ b/reference-docs/VOUCHERS-Create-Voucher.md @@ -0,0 +1,14 @@ +--- +title: Create Voucher +type: endpoint +categorySlug: voucherify-api +slug: create-voucher +parentDocSlug: vouchers +hidden: false +order: 4 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/VOUCHERS-Delete-Voucher.md b/reference-docs/VOUCHERS-Delete-Voucher.md new file mode 100644 index 00000000..e40d374b --- /dev/null +++ b/reference-docs/VOUCHERS-Delete-Voucher.md @@ -0,0 +1,14 @@ +--- +title: Delete Voucher +type: endpoint +categorySlug: voucherify-api +slug: delete-voucher +parentDocSlug: vouchers +hidden: false +order: 7 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/VOUCHERS-Disable-Voucher.md b/reference-docs/VOUCHERS-Disable-Voucher.md new file mode 100644 index 00000000..a8c281a4 --- /dev/null +++ b/reference-docs/VOUCHERS-Disable-Voucher.md @@ -0,0 +1,14 @@ +--- +title: Disable Voucher +type: endpoint +categorySlug: voucherify-api +slug: disable-voucher +parentDocSlug: vouchers +hidden: false +order: 9 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/VOUCHERS-Enable-Voucher.md b/reference-docs/VOUCHERS-Enable-Voucher.md new file mode 100644 index 00000000..a25d2bfd --- /dev/null +++ b/reference-docs/VOUCHERS-Enable-Voucher.md @@ -0,0 +1,14 @@ +--- +title: Enable Voucher +type: endpoint +categorySlug: voucherify-api +slug: enable-voucher +parentDocSlug: vouchers +hidden: false +order: 8 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/VOUCHERS-Examine-Qualification.md b/reference-docs/VOUCHERS-Examine-Qualification.md new file mode 100644 index 00000000..96979622 --- /dev/null +++ b/reference-docs/VOUCHERS-Examine-Qualification.md @@ -0,0 +1,14 @@ +--- +title: Examine Qualification [Deprecated] +type: endpoint +categorySlug: voucherify-api +slug: examine-vouchers-qualification +parentDocSlug: vouchers +hidden: false +order: 100 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/VOUCHERS-Export-Voucher-Transactions.md b/reference-docs/VOUCHERS-Export-Voucher-Transactions.md new file mode 100644 index 00000000..696e782b --- /dev/null +++ b/reference-docs/VOUCHERS-Export-Voucher-Transactions.md @@ -0,0 +1,14 @@ +--- +title: Export Voucher Transactions +type: endpoint +categorySlug: voucherify-api +slug: export-voucher-transactions +parentDocSlug: vouchers +hidden: false +order: 12 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/VOUCHERS-Generate-Random-Code.md b/reference-docs/VOUCHERS-Generate-Random-Code.md new file mode 100644 index 00000000..1df9acc9 --- /dev/null +++ b/reference-docs/VOUCHERS-Generate-Random-Code.md @@ -0,0 +1,14 @@ +--- +title: Generate Random Code +type: endpoint +categorySlug: voucherify-api +slug: generate-random-code +parentDocSlug: vouchers +hidden: false +order: 5 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/VOUCHERS-Get-Voucher.md b/reference-docs/VOUCHERS-Get-Voucher.md new file mode 100644 index 00000000..7c5b6485 --- /dev/null +++ b/reference-docs/VOUCHERS-Get-Voucher.md @@ -0,0 +1,14 @@ +--- +title: Get Voucher +type: endpoint +categorySlug: voucherify-api +slug: get-voucher +parentDocSlug: vouchers +hidden: false +order: 3 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/VOUCHERS-Import-Vouchers-Using-CSV.md b/reference-docs/VOUCHERS-Import-Vouchers-Using-CSV.md new file mode 100644 index 00000000..6726d415 --- /dev/null +++ b/reference-docs/VOUCHERS-Import-Vouchers-Using-CSV.md @@ -0,0 +1,14 @@ +--- +title: Import Vouchers using CSV +type: endpoint +categorySlug: voucherify-api +slug: import-vouchers-using-csv +parentDocSlug: vouchers +hidden: false +order: 14 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/VOUCHERS-Import-Vouchers.md b/reference-docs/VOUCHERS-Import-Vouchers.md new file mode 100644 index 00000000..47ee978e --- /dev/null +++ b/reference-docs/VOUCHERS-Import-Vouchers.md @@ -0,0 +1,14 @@ +--- +title: Import Vouchers +type: endpoint +categorySlug: voucherify-api +slug: import-vouchers +parentDocSlug: vouchers +hidden: false +order: 13 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/VOUCHERS-List-Voucher-Transactions.md b/reference-docs/VOUCHERS-List-Voucher-Transactions.md new file mode 100644 index 00000000..b76c9f12 --- /dev/null +++ b/reference-docs/VOUCHERS-List-Voucher-Transactions.md @@ -0,0 +1,14 @@ +--- +title: List Voucher Transactions +type: endpoint +categorySlug: voucherify-api +slug: list-voucher-transactions +parentDocSlug: vouchers +hidden: false +order: 11 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/VOUCHERS-List-Vouchers.md b/reference-docs/VOUCHERS-List-Vouchers.md new file mode 100644 index 00000000..7b1c02df --- /dev/null +++ b/reference-docs/VOUCHERS-List-Vouchers.md @@ -0,0 +1,14 @@ +--- +title: List Vouchers +type: endpoint +categorySlug: voucherify-api +slug: list-vouchers +parentDocSlug: vouchers +hidden: false +order: 2 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/VOUCHERS-Release-Validation-Session.md b/reference-docs/VOUCHERS-Release-Validation-Session.md new file mode 100644 index 00000000..6a728898 --- /dev/null +++ b/reference-docs/VOUCHERS-Release-Validation-Session.md @@ -0,0 +1,14 @@ +--- +title: Release Validation Session +type: endpoint +categorySlug: voucherify-api +slug: release-validation-session +parentDocSlug: vouchers +hidden: false +order: 18 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/VOUCHERS-Update-Voucher.md b/reference-docs/VOUCHERS-Update-Voucher.md new file mode 100644 index 00000000..9c1ab16b --- /dev/null +++ b/reference-docs/VOUCHERS-Update-Voucher.md @@ -0,0 +1,14 @@ +--- +title: Update Voucher +type: endpoint +categorySlug: voucherify-api +slug: update-voucher +parentDocSlug: vouchers +hidden: false +order: 6 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/VOUCHERS-Update-Vouchers-In-Bulk.md b/reference-docs/VOUCHERS-Update-Vouchers-In-Bulk.md new file mode 100644 index 00000000..c7e1be41 --- /dev/null +++ b/reference-docs/VOUCHERS-Update-Vouchers-In-Bulk.md @@ -0,0 +1,14 @@ +--- +title: Update Vouchers in bulk +type: endpoint +categorySlug: voucherify-api +slug: update-vouchers-in-bulk +parentDocSlug: vouchers +hidden: false +order: 16 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/VOUCHERS-Update-Vouchers-Metadata-In-Bulk.md b/reference-docs/VOUCHERS-Update-Vouchers-Metadata-In-Bulk.md new file mode 100644 index 00000000..e71b097e --- /dev/null +++ b/reference-docs/VOUCHERS-Update-Vouchers-Metadata-In-Bulk.md @@ -0,0 +1,14 @@ +--- +title: Update Vouchers' metadata in bulk +type: endpoint +categorySlug: voucherify-api +slug: update-vouchers-metadata-in-bulk +parentDocSlug: vouchers +hidden: false +order: 17 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/VOUCHERS-Voucher-Object.md b/reference-docs/VOUCHERS-Voucher-Object.md new file mode 100644 index 00000000..2128d790 --- /dev/null +++ b/reference-docs/VOUCHERS-Voucher-Object.md @@ -0,0 +1,197 @@ +--- +title: Voucher Object +type: basic +categorySlug: voucherify-api +parentDocSlug: vouchers +slug: voucher-object +hidden: false +order: 1 +--- + +## Voucher +This is an object representing a voucher with categories and validation rules assignments.
+ +All of: + +1. [Voucher Base](#voucher-base) +2.Attributes | Description |
---|---|
categoriesarray | Contains details about the category. Array of Category |
validation_rules_assignments | See: Validation Rules Assignments List |
Assigned by the Voucherify API, identifies the voucher.
**Example:**v_mkZN9v7vjYUadXnHrMza8W5c34fE5KiV
| +| code`string` |A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters.
**Example:**WVPblOYX
| +| campaign`string` |A unique campaign name, identifies the voucher's parent campaign.
**Example:**Gift Card Campaign
| +| campaign_id`string` |Assigned by the Voucherify API, identifies the voucher's parent campaign.
**Example:**camp_FNYR4jhqZBM9xTptxDGgeNBV
| +| category`string` |Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint.
| +| category_id`string` |Unique category ID assigned by Voucherify.
**Example:**cat_0bb343dee3cdb5ec0c
| +| type`string` |Defines the type of the voucher.
Available values: `GIFT_VOUCHER`, `DISCOUNT_VOUCHER`, `LOYALTY_CARD` | +| discount | See: [Discount](#discount) | +| gift`object` |Object representing gift parameters. Child attributes are present only if type
is GIFT_VOUCHER
. Defaults to null
.
Attributes | Description |
---|---|
amountinteger | Total gift card income over the lifetime of the card. The value is multiplied by 100 to represent 2 decimal places. For example 10000 |
subtracted_amountinteger | Total amount of subtracted credits over the gift card lifetime. The value is multiplied by 100 to represent 2 decimal places. For example |
balanceinteger | Available funds. The value is multiplied by 100 to represent 2 decimal places. For example 500 |
effectstring | Defines how the credits are applied to the customer's order. Available values:APPLY_TO_ORDER , APPLY_TO_ITEMS |
Object representing loyalty card parameters. Child attributes are present only if type
is LOYALTY_CARD
. Defaults to null
.
Attributes | Description |
---|---|
pointsinteger | Total number of points added to the loyalty card over its lifespan. Example:7000 |
balanceinteger | Points available for reward redemption. This is calculated as follows: 6970 |
next_expiration_datestring | The next closest date when the next set of points are due to expire. Example:2023-05-30 |
next_expiration_pointsinteger | The amount of points that are set to expire next. |
pending_pointsinteger | Shows the number of pending points that will be added to the loyalty card when they are activated automatically or manually. |
expired_pointsinteger | Shows the total number of expired points over the lifetime of the loyalty card. |
subtracted_pointsinteger | Shows the total number of subtracted points over the lifetime of the loyalty card. |
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_date`string` |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-timeframe) | +| validity_day_of_week | See: [Validity Day Of Week](#validity-day-of-week) | +| validity_hours | See: [Validity Hours](#validity-hours) | +| active`boolean`, `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 start_date
and expiration_date
.
true
indicates an active voucherfalse
indicates an inactive voucherAn optional field to keep any extra textual information about the code such as a code description and details.
| +| metadata`object` |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](#voucher-assets) | +| is_referral_code`boolean`, `null` |Flag indicating whether this voucher is a referral code; true
for campaign type REFERRAL_PROGRAM
.
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_at`string` |Timestamp representing the date and time when the voucher was last updated in ISO 8601 format.
**Example:**2021-12-22T10:14:45.316Z
| +| holder_id`string` |Unique customer identifier of the redeemable holder. It equals to the customer ID assigned by Voucherify.
**Example:**cust_eWgXlBBiY6THFRJwX45Iakv4
| +| referrer_id`string` |Unique identifier of the referring person.
**Example:**cust_Vzck5i8U3OhcEUFY6MKhN9Rv
| +| object`string` |The type of the object represented by JSON. Default is voucher
.
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.
Attributes | Description |
---|---|
objectstring | The type of the object represented is by default |
countinteger | Publication events counter. Example:0 |
urlstring | The endpoint where this list of publications can be accessed using a GET method. /v1/vouchers/WVPblOYX/publications?page=1&limit=10 |
Stores a summary of redemptions that have been applied to the voucher.
Attributes | Description |
---|---|
quantityinteger | How many times a voucher can be redeemed. A |
redeemed_quantityinteger | How many times a voucher has already been redeemed. Example:1 |
redeemed_pointsinteger | Total loyalty points redeemed. Example:100000 |
objectstring | The type of the object represented is by default |
urlstring | The endpoint where this list of redemptions can be accessed using a GET method. /v1/vouchers/WVPblOYX/redemptions?page=1&limit=10 |
Unique category ID assigned by Voucherify.
| +| name`string` |Category name.
| +| hierarchy`integer` |Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value.
| +| object`string` |The type of the object represented by the JSON. This object stores information about the category.
Available values: `category` | +| created_at`string` |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_at`string` |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 | +|:-----|:--------| +| object`string` |The type of the object represented by JSON. This object stores information about validation rules assignments.
Available values: `list` | +| data_ref`string` |Identifies the name of the attribute that contains the array of validation rules assignments.
Available values: `data` | +| data`array` |Contains array of validation rules assignments.
Array of [Business Validation Rule Assignment](#business-validation-rule-assignment) | +| total`integer` |Total number of validation rules assignments.
| + +## Discount +Contains information about discount.
+ +One of: + +[Amount](#amount), [Unit](#unit), [Unit Multiple](#unit-multiple), [Percent](#percent), [Fixed](#fixed) + +## Validity Timeframe +| Attributes | Description | +|:-----|:--------| +| duration`string` |Defines the amount of time an earning rule will be active in ISO 8601 format. For example, an earning rule with a duration
of PT1H
will be valid for a duration of one hour.
PT1H
| +| interval`string` |Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, an earning rule with an interval
of P2D
will be valid every other day.
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
SaturdayDefines the reccuring period(s) when the resource is active. The periods should not overlap.
Array of:Attributes | Description |
---|---|
start_timestring | Defines the starting hour of validity in the HH:mm format. The resource is inactive before this time. Example:12:00 |
days_of_weekarray | Integer array corresponding to the particular days of the week in which the resource is valid.
|
expiration_timestring | Defines the ending hour of validity in the HH:mm format. The resource is inactive after this time. Example:14:00 |
Stores Quick Response (QR) representation of encrypted code.
Attributes | Description |
---|---|
idstring | Encrypted voucher code ID. Example:U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK+t4pp7U7oFzjGJzj9q/bmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg+BaZk5QwXMf8k/OzSlOEVybpwSq+AiqPoNtjeuqtIgkDyvT6Q== |
urlstring | URL to QR code Optional: Attach query parameters to base URL to customize the image of the encrypted voucher code.
https://dev.dl.voucherify.io/api/v1/assets/qr/U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK%2Bt4pp7U7oFzjGJzj9q%2FbmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg%2BBaZk5QwXMf8k%2FOzSlOEVybpwSq%2BAiqPoNtjeuqtIgkDyvT6Q%3D%3D |
Stores barcode representation of encrypted code.
Attributes | Description |
---|---|
idstring | Encrypted voucher code ID. Example:U2FsdGVkX19eJhGfWwUrH9+tulBkON+AnMktic+N6CVWzZ9+fHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ+kJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6/pFs61apEn9SJx32ttCF6d3oxKISQQ== |
urlstring | URL to barcode Optional: Attach query parameters to base URL to customize the image of the encrypted voucher code.
https://dev.dl.voucherify.io/api/v1/assets/barcode/U2FsdGVkX19eJhGfWwUrH9%2BtulBkON%2BAnMktic%2BN6CVWzZ9%2BfHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ%2BkJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6%2FpFs61apEn9SJx32ttCF6d3oxKISQQ%3D%3D |
The unique identifier for a assignment
| +| rule_id`string` |The unique identifier for a rule
| +| related_object_id`string` |The unique identifier for a related object
| +| related_object_type`string` |The type of related object
| +| created_at`string` |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_at`string` |Timestamp representing the date and time when the object was last updated in ISO 8601 format.
**Example:**2022-03-09T11:19:04.819Z
| +| object`string` |The type of the object represented by JSON.
Available values: `validation_rules_assignment` | +| validation_status`string` |The validation status of the assignment
Available values: `VALID`, `PARTIALLY_VALID`, `INVALID` | +| validation_omitted_rules`array` |The list of omitted rules
| + +## Amount +| Attributes | Description | +|:-----|:--------| +| type`string` |Defines the type of the voucher.
Available values: `AMOUNT` | +| amount_off`number` |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_formula`string` | | +| aggregated_amount_limit`integer` |Maximum discount amount per order.
| +| effect |Defines how the discount is applied to the customer's order.
[Discount Amount Vouchers Effect Types](#discount-amount-vouchers-effect-types) | +| is_dynamic`boolean` |Flag indicating whether the discount was calculated using a formula.
| + +## Unit +| Attributes | Description | +|:-----|:--------| +| type`string` |Discount type.
Available values: `UNIT` | +| unit_off`integer` |Number of units to be granted a full value discount.
| +| unit_off_formula`string` |Formula used to calculate the number of units.
| +| effect |Defines how the unit is added to the customer's order.
[Discount Unit Vouchers Effect Types](#discount-unit-vouchers-effect-types) | +| unit_type`string` |The product deemed as free, chosen from product inventory (e.g. time, items).
| +| product |Contains information about the product.
[Simple Product Discount Unit](#simple-product-discount-unit) | +| sku | See: [Simple Sku Discount Unit](#simple-sku-discount-unit) | +| is_dynamic`boolean` |Flag indicating whether the discount was calculated using a formula.
| + +## Unit Multiple +| Attributes | Description | +|:-----|:--------| +| type`string` |Discount type.
Available values: `UNIT` | +| effect`string` |Defines how the discount is applied to the customer's order.
Available values: `ADD_MANY_ITEMS` | +| units`array` | Array of [One Unit](#one-unit) | + +## Percent +| Attributes | Description | +|:-----|:--------| +| type`string` |Defines the type of the voucher.
Available values: `PERCENT` | +| percent_off`number` |The percent discount that the customer will receive.
| +| percent_off_formula`string` | | +| amount_limit`number` |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_limit`integer` |Maximum discount amount per order.
| +| effect |Defines how the discount is applied to the customer's order.
[Discount Percent Vouchers Effect Types](#discount-percent-vouchers-effect-types) | +| is_dynamic`boolean` |Flag indicating whether the discount was calculated using a formula.
| + +## Fixed +| Attributes | Description | +|:-----|:--------| +| type`string` |Defines the type of the voucher.
Available values: `FIXED` | +| fixed_amount`number` |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_formula
parameter is present in the fixed amount definition, this value becomes the fallback value. As a result, if the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed value.
Defines how the discount is applied to the customer's order.
[Discount Fixed Vouchers Effect Types](#discount-fixed-vouchers-effect-types) | +| is_dynamic`boolean` |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 | +|:-----|:--------| +| id`string` |Unique product ID, assigned by Voucherify.
| +| source_id`string` |Product's source ID.
| +| name`string` |Product name.
| + +## Simple Sku Discount Unit +| Attributes | Description | +|:-----|:--------| +| id`string` |Unique SKU ID, assigned by Voucherify.
| +| source_id`string` |Product variant's source ID.
| +| name`string` |Sku name
| + +## One Unit +| Attributes | Description | +|:-----|:--------| +| unit_off`number` |Number of units to be granted a full value discount.
| +| unit_off_formula`string` |Formula used to calculate the number of units.
| +| effect`string` |Defines how the unit is added to the customer's order.
Available values: `ADD_NEW_ITEMS`, `ADD_MISSING_ITEMS` | +| unit_type`string` |The product deemed as free, chosen from product inventory (e.g. time, items).
| +| product |Contains information about the product.
[Simple Product Discount Unit](#simple-product-discount-unit) | +| sku |Contains information about the sku.
[Simple Sku Discount Unit](#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` + +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/Validation-Session.md b/reference-docs/Validation-Session.md new file mode 100644 index 00000000..ca0f6096 --- /dev/null +++ b/reference-docs/Validation-Session.md @@ -0,0 +1,10 @@ +--- +title: Establish Validation Session +categorySlug: voucherify-api +parentDocSlug: validations +slug: validation-session +type: link +hidden: false +order: 2 +link_url: https://docs.voucherify.io/docs/locking-validation-session +--- diff --git a/reference-docs/Versioning.md b/reference-docs/Versioning.md new file mode 100644 index 00000000..e4e4fefe --- /dev/null +++ b/reference-docs/Versioning.md @@ -0,0 +1,28 @@ +--- +title: Versioning +excerpt: What is the latest version? +categorySlug: introduction +slug: versioning +type: basic +hidden: false +order: 3 +--- + +When we make **backwards-incompatible** changes to the API, we release new, dated versions. The current version is `v2018-08-01`. Read our API [changelog](doc:api-version-upgrades) to learn more about Voucherify API versions. The changelog lists every available version. + +All requests will use the API version listed in your account **Project settings** unless you override the API version. + +To set the API version for a specific request, send a `X-Voucherify-API-Version` header. + +```cURL Example Request +curl -X GET \ + -H "X-App-Id: c70a6f00-cf91-4756-9df5-47628850002b" \ + -H "X-App-Token: 3266b9f8-e246-4f79-bdf0-833929b1380c" \ + -H "Content-Type: application/json" \ + -H "X-Voucherify-API-Version: v2017-04-20" \ + https://api.voucherify.io/v1/vouchers/VoucherCode +``` + +## API Upgrades + +Keep track of changes and [upgrades to the Voucherify API](doc:api-version-upgrades). If you need help, talk to [support](https://www.voucherify.io/contact-support) or write to us on our [Slack channel](https://www.voucherify.io/community). diff --git a/reference-docs/test.mdx b/reference-docs/test.mdx new file mode 100644 index 00000000..f46f8291 --- /dev/null +++ b/reference-docs/test.mdx @@ -0,0 +1,6 @@ +--- +title: "Test API reference page" +description: "Intro do endpoint series" +--- + +object Object \ No newline at end of file