From 8f322acc68f0cd9d7afff274e7edcc9e91cfbe20 Mon Sep 17 00:00:00 2001 From: p-woznikowski Date: Wed, 20 Aug 2025 12:58:10 +0200 Subject: [PATCH 1/7] Update docs.json --- docs.json | 39 ++++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/docs.json b/docs.json index 2f5ef084..3df9b165 100644 --- a/docs.json +++ b/docs.json @@ -72,20 +72,37 @@ }, { "tab": "API reference", - "groups": [ + "versions": [ { - "group": "Endpoints", - "openapi": { - "source": "/api-reference/openapi.json", - "directory": "api-reference" - } + "version": "1.0", + "groups": [ + { + "group": "Endpoints", + "openapi": { + "source": "/api-reference/openapi.json", + "directory": "api-reference" + } + }, + { + "group": "Events", + "openapi": { + "source": "/api-reference/OpenAPIWebhooks.json", + "directory": "api-reference" + } + } + ] }, { - "group": "Events", - "openapi": { - "source": "/api-reference/OpenAPIWebhooks.json", - "directory": "api-reference" - } + "version": "2.0", + "groups": [ + { + "group": "Endpoints", + "openapi": { + "source": "/api-reference/openapi.json", + "directory": "api-reference" + } + } + ] } ] }, From 7106640975abd57d94343d5b12ff577d8dc4ece5 Mon Sep 17 00:00:00 2001 From: p-woznikowski Date: Wed, 20 Aug 2025 13:44:44 +0200 Subject: [PATCH 2/7] Testing paths --- docs.json | 16 +- .../ASYNC-ACTIONS-Async-Action-Object.md | 190 ++ .../ASYNC-ACTIONS-Get-Async-Action.md | 14 + .../ASYNC-ACTIONS-List-Async-Actions.md | 14 + ...-Voucher-With-Specific-Code-To-Campaign.md | 14 + .../CAMPAIGNS-Add-Vouchers-To-Campaign.md | 14 + reference-docs/CAMPAIGNS-Campaign-Object.md | 319 ++++ reference-docs/CAMPAIGNS-Create-Campaign.md | 14 + reference-docs/CAMPAIGNS-Delete-Campaign.md | 14 + reference-docs/CAMPAIGNS-Disable-Campaign.md | 14 + reference-docs/CAMPAIGNS-Enable-Campaign.md | 14 + .../CAMPAIGNS-Examine-Qualification.md | 14 + .../CAMPAIGNS-Export-Campaign-Transactions.md | 14 + .../CAMPAIGNS-Get-Campaign-Summary.md | 14 + reference-docs/CAMPAIGNS-Get-Campaign.md | 14 + ...S-Import-Vouchers-To-Campaign-Using-CSV.md | 14 + .../CAMPAIGNS-Import-Vouchers-To-Campaign.md | 14 + .../CAMPAIGNS-List-Campaign-Transactions.md | 14 + reference-docs/CAMPAIGNS-List-Campaigns.md | 14 + reference-docs/CAMPAIGNS-Update-Campaign.md | 14 + reference-docs/CATEGORIES-Category-Object.md | 25 + reference-docs/CATEGORIES-Create-Category.md | 14 + reference-docs/CATEGORIES-Delete-Category.md | 14 + reference-docs/CATEGORIES-Get-Category.md | 14 + reference-docs/CATEGORIES-List-Categories.md | 14 + reference-docs/CATEGORIES-Update-Category.md | 14 + ...IENT-SIDE-Check-Eligibility-Client-Side.md | 15 + .../CLIENT-SIDE-Create-Publication.md | 15 + ...T-SIDE-List-Promotion-Tiers-Client-Side.md | 14 + ...-Redeem-Stackable-Discounts-Client-Side.md | 14 + .../CLIENT-SIDE-Redeem-Voucher-Client-Side.md | 14 + ...ENT-SIDE-Track-Custom-Event-Client-Side.md | 14 + ...alidate-Stackable-Discounts-Client-Side.md | 14 + ...LIENT-SIDE-Validate-Voucher-Client-Side.md | 14 + reference-docs/CUSTOMERS-Create-Customer.md | 14 + .../CUSTOMERS-Customer-Activity-Object.md | 1650 +++++++++++++++++ reference-docs/CUSTOMERS-Customer-Object.md | 73 + .../CUSTOMERS-Delete-Customer-Permanently.md | 14 + reference-docs/CUSTOMERS-Get-Customer.md | 14 + .../CUSTOMERS-Import-Customers-Using-CSV.md | 14 + .../CUSTOMERS-List-Customer-Activities.md | 14 + .../CUSTOMERS-List-Customer-Activity.md | 14 + .../CUSTOMERS-List-Customer-Redeemables.md | 14 + .../CUSTOMERS-List-Customer-Segments.md | 14 + reference-docs/CUSTOMERS-List-Customers.md | 14 + reference-docs/CUSTOMERS-Update-Customer.md | 14 + .../CUSTOMERS-Update-Customers-In-Bulk.md | 14 + ...OMERS-Update-Customers-Metadata-In-Bulk.md | 14 + reference-docs/CUSTOMES-Delete-Customer.md | 14 + reference-docs/EVENTS-Custom-Event-Object.md | 42 + reference-docs/EVENTS-Track-Custom-Event.md | 14 + reference-docs/EXPORTS-Create-Export.md | 14 + reference-docs/EXPORTS-Delete-Export.md | 14 + reference-docs/EXPORTS-Download-Export.md | 14 + reference-docs/EXPORTS-Export-Object.md | 308 +++ reference-docs/EXPORTS-Get-Export.md | 14 + reference-docs/EXPORTS-List-Exports.md | 14 + reference-docs/Errors.md | 206 ++ .../Establish-Validation-Session.md | 10 + reference-docs/Fetching-Data.md | 268 +++ reference-docs/Introduction.mdx | 22 + reference-docs/LOCATIONS-Get-Location.md | 15 + reference-docs/LOCATIONS-List-Locations.md | 15 + reference-docs/LOCATIONS-Location-Object.md | 54 + ...OYALTIES-Activate-Member-Pending-Points.md | 14 + reference-docs/LOYALTIES-Add-Member.md | 14 + ...LOYALTIES-Adjust-Loyalty-Card-Balance-1.md | 14 + .../LOYALTIES-Adjust-Loyalty-Card-Balance.md | 14 + .../LOYALTIES-Adjust-Member-Pending-Points.md | 14 + .../LOYALTIES-Cancel-Member-Pending-Points.md | 14 + .../LOYALTIES-Create-Earning-Rule.md | 14 + .../LOYALTIES-Create-Loyalty-Campaign.md | 14 + .../LOYALTIES-Create-Loyalty-Tiers.md | 14 + .../LOYALTIES-Create-Reward-Assignment.md | 14 + .../LOYALTIES-Delete-Earning-Rule.md | 14 + .../LOYALTIES-Delete-Loyalty-Campaign.md | 14 + .../LOYALTIES-Delete-Reward-Assignment.md | 14 + .../LOYALTIES-Disable-Earning-Rule.md | 14 + .../LOYALTIES-Earning-Rule-Object.md | 147 ++ .../LOYALTIES-Enable-Earning-Rule.md | 14 + ...xport-Loyalty-Campaign-Point-Expiration.md | 14 + ...ES-Export-Loyalty-Campaign-Transactions.md | 14 + ...TIES-Export-Loyalty-Card-Transactions-1.md | 14 + ...ALTIES-Export-Loyalty-Card-Transactions.md | 14 + .../LOYALTIES-GET-Reward-Assignment-2.md | 14 + reference-docs/LOYALTIES-Get-Earning-Rule.md | 14 + .../LOYALTIES-Get-Loyalty-Campaign.md | 14 + reference-docs/LOYALTIES-Get-Loyalty-Tier.md | 14 + reference-docs/LOYALTIES-Get-Member-1.md | 14 + reference-docs/LOYALTIES-Get-Member.md | 14 + .../LOYALTIES-Get-Reward-Assignment-1.md | 14 + .../LOYALTIES-Get-Reward-Details.md | 14 + .../LOYALTIES-List-Campaign-Pending-Points.md | 14 + .../LOYALTIES-List-Earning-Rules.md | 14 + ...TIES-List-Loyalty-Campaign-Transactions.md | 14 + .../LOYALTIES-List-Loyalty-Campaigns.md | 14 + ...TIES-List-Loyalty-Card-Point-Expiration.md | 14 + ...ALTIES-List-Loyalty-Card-Transactions-1.md | 14 + ...OYALTIES-List-Loyalty-Card-Transactions.md | 14 + ...YALTIES-List-Loyalty-Tier-Earning-Rules.md | 14 + .../LOYALTIES-List-Loyalty-Tier-Rewards.md | 14 + .../LOYALTIES-List-Loyalty-Tiers.md | 14 + .../LOYALTIES-List-Member-Activity-1.md | 14 + .../LOYALTIES-List-Member-Activity.md | 14 + .../LOYALTIES-List-Member-Pending-Points-1.md | 14 + .../LOYALTIES-List-Member-Pending-Points.md | 14 + .../LOYALTIES-List-Member-Rewards.md | 14 + .../LOYALTIES-List-Members-Loyalty-Tier.md | 14 + reference-docs/LOYALTIES-List-Members.md | 14 + .../LOYALTIES-List-Reward-Assignments-1.md | 14 + .../LOYALTIES-List-Reward-Assignments-2.md | 14 + .../LOYALTIES-Loyalty-Campaign-Object.md | 139 ++ .../LOYALTIES-Loyalty-Card-Object.md | 70 + .../LOYALTIES-Loyalty-Tier-Object.md | 57 + reference-docs/LOYALTIES-Redeem-Reward.md | 14 + reference-docs/LOYALTIES-Reedem-Reward-1.md | 14 + .../LOYALTIES-Transfer-Loyalty-Points.md | 14 + .../LOYALTIES-Update-Earning-Rule.md | 14 + .../LOYALTIES-Update-Loyalty-Campaign.md | 14 + .../LOYALTIES-Update-Reward-Assignment-1.md | 14 + reference-docs/MANAGEMENT-Assign-User.md | 14 + .../MANAGEMENT-Copy-Campaign-Template.md | 14 + reference-docs/MANAGEMENT-Create-Brand.md | 14 + .../MANAGEMENT-Create-Custom-Event-Schema.md | 14 + .../MANAGEMENT-Create-Metadata-Schema.md | 14 + reference-docs/MANAGEMENT-Create-Project.md | 14 + .../MANAGEMENT-Create-Stacking-Rules.md | 14 + reference-docs/MANAGEMENT-Create-Webhook.md | 14 + reference-docs/MANAGEMENT-Delete-Brand.md | 14 + .../MANAGEMENT-Delete-Custom-Event-Schema.md | 14 + .../MANAGEMENT-Delete-Metadata-Schema.md | 14 + reference-docs/MANAGEMENT-Delete-Project.md | 14 + .../MANAGEMENT-Delete-Stacking-Rules.md | 14 + reference-docs/MANAGEMENT-Delete-Webhook.md | 14 + reference-docs/MANAGEMENT-Get-Brand.md | 14 + .../MANAGEMENT-Get-Custom-Event-Schema.md | 14 + .../MANAGEMENT-Get-Metadata-Schema.md | 14 + reference-docs/MANAGEMENT-Get-Project.md | 14 + .../MANAGEMENT-Get-Stacking-Rules.md | 14 + reference-docs/MANAGEMENT-Get-User.md | 14 + reference-docs/MANAGEMENT-Get-Webhook.md | 14 + reference-docs/MANAGEMENT-Invite-User.md | 14 + reference-docs/MANAGEMENT-List-Brands.md | 14 + .../MANAGEMENT-List-Campaign-Templates.md | 14 + .../MANAGEMENT-List-Custom-Event-Schemas.md | 14 + .../MANAGEMENT-List-Metadata-Schemas-1.md | 14 + reference-docs/MANAGEMENT-List-Projects.md | 14 + .../MANAGEMENT-List-Stacking-Rules.md | 14 + reference-docs/MANAGEMENT-List-Users.md | 14 + reference-docs/MANAGEMENT-List-Webhooks.md | 14 + reference-docs/MANAGEMENT-Unassigned-User.md | 14 + reference-docs/MANAGEMENT-Update-Brand.md | 14 + .../MANAGEMENT-Update-Custom-Event-Schema.md | 14 + .../MANAGEMENT-Update-Metadata-Schema.md | 14 + reference-docs/MANAGEMENT-Update-Project.md | 14 + .../MANAGEMENT-Update-Stacking-Rules.md | 14 + reference-docs/MANAGEMENT-Update-User.md | 14 + reference-docs/MANAGEMENT-Update-Webhook.md | 14 + .../METADATA-SCHEMAS-Get-Metadata-Schema.md | 14 + .../METADATA-SCHEMAS-List-Metadata-Schemas.md | 14 + ...METADATA-SCHEMAS-Metadata-Schema-Object.md | 26 + reference-docs/OAUTH-Generate-OAuth-Token.md | 14 + .../OAUTH-Introspect-OAuth-Token.md | 14 + reference-docs/OAUTH-Revoke-OAuth-Token.md | 14 + reference-docs/ORDERS-Create-Order.md | 14 + reference-docs/ORDERS-Create-Orders-Export.md | 14 + reference-docs/ORDERS-Get-Order.md | 14 + reference-docs/ORDERS-Import-Orders.md | 14 + reference-docs/ORDERS-List-Orders.md | 14 + reference-docs/ORDERS-Order-Object.md | 61 + reference-docs/ORDERS-Update-Order.md | 14 + reference-docs/Object-Schemas.md | 35 + ...T-COLLECTIONS-Delete-Product-Collection.md | 14 + ...DUCT-COLLECTIONS-Get-Product-Collection.md | 14 + ...CT-COLLECTIONS-List-Product-Collections.md | 14 + ...COLLECTIONS-List-Products-In-Collection.md | 14 + ...T-COLLECTIONS-Product-Collection-Object.md | 68 + reference-docs/PRODUCTS-Delete-Product.md | 14 + reference-docs/PRODUCTS-Delete-SKU.md | 14 + reference-docs/PRODUCTS-Get-Product.md | 14 + reference-docs/PRODUCTS-Get-SKU.md | 14 + .../PRODUCTS-Import-Products-Using-CSV.md | 14 + .../PRODUCTS-Import-SKUS-Using-CSV.md | 14 + reference-docs/PRODUCTS-List-Products.md | 14 + .../PRODUCTS-List-SKUS-In-Product.md | 14 + reference-docs/PRODUCTS-Product-Object.md | 61 + reference-docs/PRODUCTS-SKU-Object.md | 31 + reference-docs/PRODUCTS-Update-Product.md | 14 + .../PRODUCTS-Update-Products-In-Bulk.md | 14 + ...ODUCTS-Update-Products-Metadata-In-Bulk.md | 14 + reference-docs/PRODUCTS-Update-SKU.md | 14 + reference-docs/PRODUCTS-Upsert-Product.md | 14 + reference-docs/PRODUCTS-Upsert-SKU.md | 14 + ..._COLLECTIONS__Create_Product_Collection.md | 14 + ...OMOTIONS-Add-Promotion-Tier-To-Campaign.md | 14 + .../PROMOTIONS-Create-Promotion-Stack.md | 14 + .../PROMOTIONS-Delete-Promotion-Stack.md | 14 + .../PROMOTIONS-Delete-Promotion-Tier.md | 14 + .../PROMOTIONS-Disable-Promotion-Tier.md | 14 + .../PROMOTIONS-Enable-Promotion-Tier.md | 14 + .../PROMOTIONS-Get-Promotion-Stack.md | 14 + .../PROMOTIONS-Get-Promotion-Tier.md | 14 + ...TIONS-List-Promotion-Stacks-In-Campaign.md | 14 + .../PROMOTIONS-List-Promotion-Stacks.md | 14 + ...IONS-List-Promotion-Tiers-From-Campaign.md | 14 + .../PROMOTIONS-List-Promotion-Tiers.md | 14 + .../PROMOTIONS-Promotion-Tier-Object.md | 175 ++ .../PROMOTIONS-Update-Promotion-Stack.md | 14 + .../PROMOTIONS-Update-Promotion-Tier.md | 14 + .../PUBLICATIONS-Create-Publication-1.md | 14 + .../PUBLICATIONS-Create-Publication.md | 14 + .../PUBLICATIONS-List-Publications.md | 14 + .../PUBLICATIONS-Publication-Object.md | 287 +++ .../QUALIFICATIONS-Check-Eligibility.md | 15 + .../QUALIFICATIONS-Qualification-Object.md | 355 ++++ reference-docs/REDEMPTIONS-Get-Redemption.md | 14 + .../REDEMPTIONS-Get-Vouchers-Redemptions.md | 14 + .../REDEMPTIONS-List-Redemptions.md | 14 + .../REDEMPTIONS-Redeem-Promotion.md | 14 + .../REDEMPTIONS-Redeem-Stackable-Discounts.md | 14 + reference-docs/REDEMPTIONS-Redeem-Voucher.md | 14 + .../REDEMPTIONS-Redemption-Object.md | 510 +++++ .../REDEMPTIONS-Rollback-Redemption-Object.md | 414 +++++ .../REDEMPTIONS-Rollback-Redemption.md | 14 + ...EMPTIONS-Rollback-Stackable-Redemptions.md | 14 + ...EDEMPTIONS-Stackable-Redemptions-Object.md | 498 +++++ .../REFERRALS-Add-Referral-Code-Holders-1.md | 14 + .../REFERRALS-Add-Referral-Code-Holders.md | 14 + ...REFERRALS-List-Referrals-Code-Holders-1.md | 14 + .../REFERRALS-List-Referrals-Code-Holders.md | 14 + ...REFERRALS-Remove-Referral-Code-Holder-1.md | 14 + .../REFERRALS-Remove-Referral-Code-Holder.md | 14 + .../REWARDS-Create-Reward-Assignment.md | 14 + reference-docs/REWARDS-Create-Reward.md | 14 + .../REWARDS-Delete-Reward-Assignment.md | 14 + reference-docs/REWARDS-Delete-Reward.md | 14 + .../REWARDS-Get-Reward-Assignment.md | 14 + reference-docs/REWARDS-Get-Reward.md | 14 + .../REWARDS-List-Reward-Assignments.md | 14 + reference-docs/REWARDS-List-Rewards.md | 14 + .../REWARDS-Reward-Assignment-Object.md | 37 + reference-docs/REWARDS-Reward-Object.md | 50 + .../REWARDS-Update-Reward-Assignment.md | 14 + reference-docs/REWARDS-Update-Reward.md | 14 + reference-docs/SEGMENTS-Create-Segment.md | 14 + .../SEGMENTS-Customer-Segment-Object.md | 26 + reference-docs/SEGMENTS-Delete-Segment.md | 14 + reference-docs/SEGMENTS-Get-Segment.md | 14 + reference-docs/Stacking-Overview.md | 10 + ...PLATES-Add-Promotion-Tier-From-Template.md | 14 + ...TEMPLATES-Create-Campaign-From-Template.md | 14 + .../TEMPLATES-Create-Campaign-Template.md | 14 + .../TEMPLATES-Delete-Campaign-Template.md | 14 + .../TEMPLATES-Get-Campaign-Template.md | 14 + .../TEMPLATES-List-Campaign-Templates.md | 14 + .../TEMPLATES-Update-Campaign-Template.md | 14 + reference-docs/TRASH-BIN-Delete-Bin.md | 14 + reference-docs/TRASH-BIN-Get-Bin.md | 14 + ...VALIDATION-RULES-Create-Validation-Rule.md | 14 + ...LES-Create-Validation-Rules-Assignments.md | 14 + ...RULES-Delete-Validation-Rule-Assignment.md | 14 + ...VALIDATION-RULES-Delete-Validation-Rule.md | 14 + .../VALIDATION-RULES-Get-Validation-Rule.md | 14 + ...-RULES-List-Validation-Rule-Assignments.md | 14 + ...RULES-List-Validation-Rules-Assignments.md | 14 + .../VALIDATION-RULES-List-Validation-Rules.md | 14 + ...VALIDATION-RULES-Update-Validation-Rule.md | 14 + ...RULES-Validation-Rule-Assignment-Object.md | 25 + ...VALIDATION-RULES-Validation-Rule-Object.md | 134 ++ .../VALIDATIONS-Validate-Promotion-Tier.md | 14 + .../VALIDATIONS-Validate-Promotions.md | 14 + ...ALIDATIONS-Validate-Stackable-Discounts.md | 14 + .../VALIDATIONS-Validate-Voucher.md | 14 + .../VALIDATIONS-Validation-Object.md | 276 +++ .../VOUCHERS-Adjust-Voucher-Balance.md | 14 + reference-docs/VOUCHERS-Create-Voucher.md | 14 + reference-docs/VOUCHERS-Delete-Voucher.md | 14 + reference-docs/VOUCHERS-Disable-Voucher.md | 14 + reference-docs/VOUCHERS-Enable-Voucher.md | 14 + .../VOUCHERS-Examine-Qualification.md | 14 + .../VOUCHERS-Export-Voucher-Transactions.md | 14 + .../VOUCHERS-Generate-Random-Code.md | 14 + reference-docs/VOUCHERS-Get-Voucher.md | 14 + .../VOUCHERS-Import-Vouchers-Using-CSV.md | 14 + reference-docs/VOUCHERS-Import-Vouchers.md | 14 + .../VOUCHERS-List-Voucher-Transactions.md | 14 + reference-docs/VOUCHERS-List-Vouchers.md | 14 + .../VOUCHERS-Release-Validation-Session.md | 14 + reference-docs/VOUCHERS-Update-Voucher.md | 14 + .../VOUCHERS-Update-Vouchers-In-Bulk.md | 14 + ...UCHERS-Update-Vouchers-Metadata-In-Bulk.md | 14 + reference-docs/VOUCHERS-Voucher-Object.md | 197 ++ reference-docs/Validation-Session.md | 10 + reference-docs/Versioning.md | 28 + reference-docs/test.mdx | 6 + 295 files changed, 10487 insertions(+), 4 deletions(-) create mode 100644 reference-docs/ASYNC-ACTIONS-Async-Action-Object.md create mode 100644 reference-docs/ASYNC-ACTIONS-Get-Async-Action.md create mode 100644 reference-docs/ASYNC-ACTIONS-List-Async-Actions.md create mode 100644 reference-docs/CAMPAIGNS-Add-Voucher-With-Specific-Code-To-Campaign.md create mode 100644 reference-docs/CAMPAIGNS-Add-Vouchers-To-Campaign.md create mode 100644 reference-docs/CAMPAIGNS-Campaign-Object.md create mode 100644 reference-docs/CAMPAIGNS-Create-Campaign.md create mode 100644 reference-docs/CAMPAIGNS-Delete-Campaign.md create mode 100644 reference-docs/CAMPAIGNS-Disable-Campaign.md create mode 100644 reference-docs/CAMPAIGNS-Enable-Campaign.md create mode 100644 reference-docs/CAMPAIGNS-Examine-Qualification.md create mode 100644 reference-docs/CAMPAIGNS-Export-Campaign-Transactions.md create mode 100644 reference-docs/CAMPAIGNS-Get-Campaign-Summary.md create mode 100644 reference-docs/CAMPAIGNS-Get-Campaign.md create mode 100644 reference-docs/CAMPAIGNS-Import-Vouchers-To-Campaign-Using-CSV.md create mode 100644 reference-docs/CAMPAIGNS-Import-Vouchers-To-Campaign.md create mode 100644 reference-docs/CAMPAIGNS-List-Campaign-Transactions.md create mode 100644 reference-docs/CAMPAIGNS-List-Campaigns.md create mode 100644 reference-docs/CAMPAIGNS-Update-Campaign.md create mode 100644 reference-docs/CATEGORIES-Category-Object.md create mode 100644 reference-docs/CATEGORIES-Create-Category.md create mode 100644 reference-docs/CATEGORIES-Delete-Category.md create mode 100644 reference-docs/CATEGORIES-Get-Category.md create mode 100644 reference-docs/CATEGORIES-List-Categories.md create mode 100644 reference-docs/CATEGORIES-Update-Category.md create mode 100644 reference-docs/CLIENT-SIDE-Check-Eligibility-Client-Side.md create mode 100644 reference-docs/CLIENT-SIDE-Create-Publication.md create mode 100644 reference-docs/CLIENT-SIDE-List-Promotion-Tiers-Client-Side.md create mode 100644 reference-docs/CLIENT-SIDE-Redeem-Stackable-Discounts-Client-Side.md create mode 100644 reference-docs/CLIENT-SIDE-Redeem-Voucher-Client-Side.md create mode 100644 reference-docs/CLIENT-SIDE-Track-Custom-Event-Client-Side.md create mode 100644 reference-docs/CLIENT-SIDE-Validate-Stackable-Discounts-Client-Side.md create mode 100644 reference-docs/CLIENT-SIDE-Validate-Voucher-Client-Side.md create mode 100644 reference-docs/CUSTOMERS-Create-Customer.md create mode 100644 reference-docs/CUSTOMERS-Customer-Activity-Object.md create mode 100644 reference-docs/CUSTOMERS-Customer-Object.md create mode 100644 reference-docs/CUSTOMERS-Delete-Customer-Permanently.md create mode 100644 reference-docs/CUSTOMERS-Get-Customer.md create mode 100644 reference-docs/CUSTOMERS-Import-Customers-Using-CSV.md create mode 100644 reference-docs/CUSTOMERS-List-Customer-Activities.md create mode 100644 reference-docs/CUSTOMERS-List-Customer-Activity.md create mode 100644 reference-docs/CUSTOMERS-List-Customer-Redeemables.md create mode 100644 reference-docs/CUSTOMERS-List-Customer-Segments.md create mode 100644 reference-docs/CUSTOMERS-List-Customers.md create mode 100644 reference-docs/CUSTOMERS-Update-Customer.md create mode 100644 reference-docs/CUSTOMERS-Update-Customers-In-Bulk.md create mode 100644 reference-docs/CUSTOMERS-Update-Customers-Metadata-In-Bulk.md create mode 100644 reference-docs/CUSTOMES-Delete-Customer.md create mode 100644 reference-docs/EVENTS-Custom-Event-Object.md create mode 100644 reference-docs/EVENTS-Track-Custom-Event.md create mode 100644 reference-docs/EXPORTS-Create-Export.md create mode 100644 reference-docs/EXPORTS-Delete-Export.md create mode 100644 reference-docs/EXPORTS-Download-Export.md create mode 100644 reference-docs/EXPORTS-Export-Object.md create mode 100644 reference-docs/EXPORTS-Get-Export.md create mode 100644 reference-docs/EXPORTS-List-Exports.md create mode 100644 reference-docs/Errors.md create mode 100644 reference-docs/Establish-Validation-Session.md create mode 100644 reference-docs/Fetching-Data.md create mode 100644 reference-docs/Introduction.mdx create mode 100644 reference-docs/LOCATIONS-Get-Location.md create mode 100644 reference-docs/LOCATIONS-List-Locations.md create mode 100644 reference-docs/LOCATIONS-Location-Object.md create mode 100644 reference-docs/LOYALTIES-Activate-Member-Pending-Points.md create mode 100644 reference-docs/LOYALTIES-Add-Member.md create mode 100644 reference-docs/LOYALTIES-Adjust-Loyalty-Card-Balance-1.md create mode 100644 reference-docs/LOYALTIES-Adjust-Loyalty-Card-Balance.md create mode 100644 reference-docs/LOYALTIES-Adjust-Member-Pending-Points.md create mode 100644 reference-docs/LOYALTIES-Cancel-Member-Pending-Points.md create mode 100644 reference-docs/LOYALTIES-Create-Earning-Rule.md create mode 100644 reference-docs/LOYALTIES-Create-Loyalty-Campaign.md create mode 100644 reference-docs/LOYALTIES-Create-Loyalty-Tiers.md create mode 100644 reference-docs/LOYALTIES-Create-Reward-Assignment.md create mode 100644 reference-docs/LOYALTIES-Delete-Earning-Rule.md create mode 100644 reference-docs/LOYALTIES-Delete-Loyalty-Campaign.md create mode 100644 reference-docs/LOYALTIES-Delete-Reward-Assignment.md create mode 100644 reference-docs/LOYALTIES-Disable-Earning-Rule.md create mode 100644 reference-docs/LOYALTIES-Earning-Rule-Object.md create mode 100644 reference-docs/LOYALTIES-Enable-Earning-Rule.md create mode 100644 reference-docs/LOYALTIES-Export-Loyalty-Campaign-Point-Expiration.md create mode 100644 reference-docs/LOYALTIES-Export-Loyalty-Campaign-Transactions.md create mode 100644 reference-docs/LOYALTIES-Export-Loyalty-Card-Transactions-1.md create mode 100644 reference-docs/LOYALTIES-Export-Loyalty-Card-Transactions.md create mode 100644 reference-docs/LOYALTIES-GET-Reward-Assignment-2.md create mode 100644 reference-docs/LOYALTIES-Get-Earning-Rule.md create mode 100644 reference-docs/LOYALTIES-Get-Loyalty-Campaign.md create mode 100644 reference-docs/LOYALTIES-Get-Loyalty-Tier.md create mode 100644 reference-docs/LOYALTIES-Get-Member-1.md create mode 100644 reference-docs/LOYALTIES-Get-Member.md create mode 100644 reference-docs/LOYALTIES-Get-Reward-Assignment-1.md create mode 100644 reference-docs/LOYALTIES-Get-Reward-Details.md create mode 100644 reference-docs/LOYALTIES-List-Campaign-Pending-Points.md create mode 100644 reference-docs/LOYALTIES-List-Earning-Rules.md create mode 100644 reference-docs/LOYALTIES-List-Loyalty-Campaign-Transactions.md create mode 100644 reference-docs/LOYALTIES-List-Loyalty-Campaigns.md create mode 100644 reference-docs/LOYALTIES-List-Loyalty-Card-Point-Expiration.md create mode 100644 reference-docs/LOYALTIES-List-Loyalty-Card-Transactions-1.md create mode 100644 reference-docs/LOYALTIES-List-Loyalty-Card-Transactions.md create mode 100644 reference-docs/LOYALTIES-List-Loyalty-Tier-Earning-Rules.md create mode 100644 reference-docs/LOYALTIES-List-Loyalty-Tier-Rewards.md create mode 100644 reference-docs/LOYALTIES-List-Loyalty-Tiers.md create mode 100644 reference-docs/LOYALTIES-List-Member-Activity-1.md create mode 100644 reference-docs/LOYALTIES-List-Member-Activity.md create mode 100644 reference-docs/LOYALTIES-List-Member-Pending-Points-1.md create mode 100644 reference-docs/LOYALTIES-List-Member-Pending-Points.md create mode 100644 reference-docs/LOYALTIES-List-Member-Rewards.md create mode 100644 reference-docs/LOYALTIES-List-Members-Loyalty-Tier.md create mode 100644 reference-docs/LOYALTIES-List-Members.md create mode 100644 reference-docs/LOYALTIES-List-Reward-Assignments-1.md create mode 100644 reference-docs/LOYALTIES-List-Reward-Assignments-2.md create mode 100644 reference-docs/LOYALTIES-Loyalty-Campaign-Object.md create mode 100644 reference-docs/LOYALTIES-Loyalty-Card-Object.md create mode 100644 reference-docs/LOYALTIES-Loyalty-Tier-Object.md create mode 100644 reference-docs/LOYALTIES-Redeem-Reward.md create mode 100644 reference-docs/LOYALTIES-Reedem-Reward-1.md create mode 100644 reference-docs/LOYALTIES-Transfer-Loyalty-Points.md create mode 100644 reference-docs/LOYALTIES-Update-Earning-Rule.md create mode 100644 reference-docs/LOYALTIES-Update-Loyalty-Campaign.md create mode 100644 reference-docs/LOYALTIES-Update-Reward-Assignment-1.md create mode 100644 reference-docs/MANAGEMENT-Assign-User.md create mode 100644 reference-docs/MANAGEMENT-Copy-Campaign-Template.md create mode 100644 reference-docs/MANAGEMENT-Create-Brand.md create mode 100644 reference-docs/MANAGEMENT-Create-Custom-Event-Schema.md create mode 100644 reference-docs/MANAGEMENT-Create-Metadata-Schema.md create mode 100644 reference-docs/MANAGEMENT-Create-Project.md create mode 100644 reference-docs/MANAGEMENT-Create-Stacking-Rules.md create mode 100644 reference-docs/MANAGEMENT-Create-Webhook.md create mode 100644 reference-docs/MANAGEMENT-Delete-Brand.md create mode 100644 reference-docs/MANAGEMENT-Delete-Custom-Event-Schema.md create mode 100644 reference-docs/MANAGEMENT-Delete-Metadata-Schema.md create mode 100644 reference-docs/MANAGEMENT-Delete-Project.md create mode 100644 reference-docs/MANAGEMENT-Delete-Stacking-Rules.md create mode 100644 reference-docs/MANAGEMENT-Delete-Webhook.md create mode 100644 reference-docs/MANAGEMENT-Get-Brand.md create mode 100644 reference-docs/MANAGEMENT-Get-Custom-Event-Schema.md create mode 100644 reference-docs/MANAGEMENT-Get-Metadata-Schema.md create mode 100644 reference-docs/MANAGEMENT-Get-Project.md create mode 100644 reference-docs/MANAGEMENT-Get-Stacking-Rules.md create mode 100644 reference-docs/MANAGEMENT-Get-User.md create mode 100644 reference-docs/MANAGEMENT-Get-Webhook.md create mode 100644 reference-docs/MANAGEMENT-Invite-User.md create mode 100644 reference-docs/MANAGEMENT-List-Brands.md create mode 100644 reference-docs/MANAGEMENT-List-Campaign-Templates.md create mode 100644 reference-docs/MANAGEMENT-List-Custom-Event-Schemas.md create mode 100644 reference-docs/MANAGEMENT-List-Metadata-Schemas-1.md create mode 100644 reference-docs/MANAGEMENT-List-Projects.md create mode 100644 reference-docs/MANAGEMENT-List-Stacking-Rules.md create mode 100644 reference-docs/MANAGEMENT-List-Users.md create mode 100644 reference-docs/MANAGEMENT-List-Webhooks.md create mode 100644 reference-docs/MANAGEMENT-Unassigned-User.md create mode 100644 reference-docs/MANAGEMENT-Update-Brand.md create mode 100644 reference-docs/MANAGEMENT-Update-Custom-Event-Schema.md create mode 100644 reference-docs/MANAGEMENT-Update-Metadata-Schema.md create mode 100644 reference-docs/MANAGEMENT-Update-Project.md create mode 100644 reference-docs/MANAGEMENT-Update-Stacking-Rules.md create mode 100644 reference-docs/MANAGEMENT-Update-User.md create mode 100644 reference-docs/MANAGEMENT-Update-Webhook.md create mode 100644 reference-docs/METADATA-SCHEMAS-Get-Metadata-Schema.md create mode 100644 reference-docs/METADATA-SCHEMAS-List-Metadata-Schemas.md create mode 100644 reference-docs/METADATA-SCHEMAS-Metadata-Schema-Object.md create mode 100644 reference-docs/OAUTH-Generate-OAuth-Token.md create mode 100644 reference-docs/OAUTH-Introspect-OAuth-Token.md create mode 100644 reference-docs/OAUTH-Revoke-OAuth-Token.md create mode 100644 reference-docs/ORDERS-Create-Order.md create mode 100644 reference-docs/ORDERS-Create-Orders-Export.md create mode 100644 reference-docs/ORDERS-Get-Order.md create mode 100644 reference-docs/ORDERS-Import-Orders.md create mode 100644 reference-docs/ORDERS-List-Orders.md create mode 100644 reference-docs/ORDERS-Order-Object.md create mode 100644 reference-docs/ORDERS-Update-Order.md create mode 100644 reference-docs/Object-Schemas.md create mode 100644 reference-docs/PRODUCT-COLLECTIONS-Delete-Product-Collection.md create mode 100644 reference-docs/PRODUCT-COLLECTIONS-Get-Product-Collection.md create mode 100644 reference-docs/PRODUCT-COLLECTIONS-List-Product-Collections.md create mode 100644 reference-docs/PRODUCT-COLLECTIONS-List-Products-In-Collection.md create mode 100644 reference-docs/PRODUCT-COLLECTIONS-Product-Collection-Object.md create mode 100644 reference-docs/PRODUCTS-Delete-Product.md create mode 100644 reference-docs/PRODUCTS-Delete-SKU.md create mode 100644 reference-docs/PRODUCTS-Get-Product.md create mode 100644 reference-docs/PRODUCTS-Get-SKU.md create mode 100644 reference-docs/PRODUCTS-Import-Products-Using-CSV.md create mode 100644 reference-docs/PRODUCTS-Import-SKUS-Using-CSV.md create mode 100644 reference-docs/PRODUCTS-List-Products.md create mode 100644 reference-docs/PRODUCTS-List-SKUS-In-Product.md create mode 100644 reference-docs/PRODUCTS-Product-Object.md create mode 100644 reference-docs/PRODUCTS-SKU-Object.md create mode 100644 reference-docs/PRODUCTS-Update-Product.md create mode 100644 reference-docs/PRODUCTS-Update-Products-In-Bulk.md create mode 100644 reference-docs/PRODUCTS-Update-Products-Metadata-In-Bulk.md create mode 100644 reference-docs/PRODUCTS-Update-SKU.md create mode 100644 reference-docs/PRODUCTS-Upsert-Product.md create mode 100644 reference-docs/PRODUCTS-Upsert-SKU.md create mode 100644 reference-docs/PRODUCT_COLLECTIONS__Create_Product_Collection.md create mode 100644 reference-docs/PROMOTIONS-Add-Promotion-Tier-To-Campaign.md create mode 100644 reference-docs/PROMOTIONS-Create-Promotion-Stack.md create mode 100644 reference-docs/PROMOTIONS-Delete-Promotion-Stack.md create mode 100644 reference-docs/PROMOTIONS-Delete-Promotion-Tier.md create mode 100644 reference-docs/PROMOTIONS-Disable-Promotion-Tier.md create mode 100644 reference-docs/PROMOTIONS-Enable-Promotion-Tier.md create mode 100644 reference-docs/PROMOTIONS-Get-Promotion-Stack.md create mode 100644 reference-docs/PROMOTIONS-Get-Promotion-Tier.md create mode 100644 reference-docs/PROMOTIONS-List-Promotion-Stacks-In-Campaign.md create mode 100644 reference-docs/PROMOTIONS-List-Promotion-Stacks.md create mode 100644 reference-docs/PROMOTIONS-List-Promotion-Tiers-From-Campaign.md create mode 100644 reference-docs/PROMOTIONS-List-Promotion-Tiers.md create mode 100644 reference-docs/PROMOTIONS-Promotion-Tier-Object.md create mode 100644 reference-docs/PROMOTIONS-Update-Promotion-Stack.md create mode 100644 reference-docs/PROMOTIONS-Update-Promotion-Tier.md create mode 100644 reference-docs/PUBLICATIONS-Create-Publication-1.md create mode 100644 reference-docs/PUBLICATIONS-Create-Publication.md create mode 100644 reference-docs/PUBLICATIONS-List-Publications.md create mode 100644 reference-docs/PUBLICATIONS-Publication-Object.md create mode 100644 reference-docs/QUALIFICATIONS-Check-Eligibility.md create mode 100644 reference-docs/QUALIFICATIONS-Qualification-Object.md create mode 100644 reference-docs/REDEMPTIONS-Get-Redemption.md create mode 100644 reference-docs/REDEMPTIONS-Get-Vouchers-Redemptions.md create mode 100644 reference-docs/REDEMPTIONS-List-Redemptions.md create mode 100644 reference-docs/REDEMPTIONS-Redeem-Promotion.md create mode 100644 reference-docs/REDEMPTIONS-Redeem-Stackable-Discounts.md create mode 100644 reference-docs/REDEMPTIONS-Redeem-Voucher.md create mode 100644 reference-docs/REDEMPTIONS-Redemption-Object.md create mode 100644 reference-docs/REDEMPTIONS-Rollback-Redemption-Object.md create mode 100644 reference-docs/REDEMPTIONS-Rollback-Redemption.md create mode 100644 reference-docs/REDEMPTIONS-Rollback-Stackable-Redemptions.md create mode 100644 reference-docs/REDEMPTIONS-Stackable-Redemptions-Object.md create mode 100644 reference-docs/REFERRALS-Add-Referral-Code-Holders-1.md create mode 100644 reference-docs/REFERRALS-Add-Referral-Code-Holders.md create mode 100644 reference-docs/REFERRALS-List-Referrals-Code-Holders-1.md create mode 100644 reference-docs/REFERRALS-List-Referrals-Code-Holders.md create mode 100644 reference-docs/REFERRALS-Remove-Referral-Code-Holder-1.md create mode 100644 reference-docs/REFERRALS-Remove-Referral-Code-Holder.md create mode 100644 reference-docs/REWARDS-Create-Reward-Assignment.md create mode 100644 reference-docs/REWARDS-Create-Reward.md create mode 100644 reference-docs/REWARDS-Delete-Reward-Assignment.md create mode 100644 reference-docs/REWARDS-Delete-Reward.md create mode 100644 reference-docs/REWARDS-Get-Reward-Assignment.md create mode 100644 reference-docs/REWARDS-Get-Reward.md create mode 100644 reference-docs/REWARDS-List-Reward-Assignments.md create mode 100644 reference-docs/REWARDS-List-Rewards.md create mode 100644 reference-docs/REWARDS-Reward-Assignment-Object.md create mode 100644 reference-docs/REWARDS-Reward-Object.md create mode 100644 reference-docs/REWARDS-Update-Reward-Assignment.md create mode 100644 reference-docs/REWARDS-Update-Reward.md create mode 100644 reference-docs/SEGMENTS-Create-Segment.md create mode 100644 reference-docs/SEGMENTS-Customer-Segment-Object.md create mode 100644 reference-docs/SEGMENTS-Delete-Segment.md create mode 100644 reference-docs/SEGMENTS-Get-Segment.md create mode 100644 reference-docs/Stacking-Overview.md create mode 100644 reference-docs/TEMPLATES-Add-Promotion-Tier-From-Template.md create mode 100644 reference-docs/TEMPLATES-Create-Campaign-From-Template.md create mode 100644 reference-docs/TEMPLATES-Create-Campaign-Template.md create mode 100644 reference-docs/TEMPLATES-Delete-Campaign-Template.md create mode 100644 reference-docs/TEMPLATES-Get-Campaign-Template.md create mode 100644 reference-docs/TEMPLATES-List-Campaign-Templates.md create mode 100644 reference-docs/TEMPLATES-Update-Campaign-Template.md create mode 100644 reference-docs/TRASH-BIN-Delete-Bin.md create mode 100644 reference-docs/TRASH-BIN-Get-Bin.md create mode 100644 reference-docs/VALIDATION-RULES-Create-Validation-Rule.md create mode 100644 reference-docs/VALIDATION-RULES-Create-Validation-Rules-Assignments.md create mode 100644 reference-docs/VALIDATION-RULES-Delete-Validation-Rule-Assignment.md create mode 100644 reference-docs/VALIDATION-RULES-Delete-Validation-Rule.md create mode 100644 reference-docs/VALIDATION-RULES-Get-Validation-Rule.md create mode 100644 reference-docs/VALIDATION-RULES-List-Validation-Rule-Assignments.md create mode 100644 reference-docs/VALIDATION-RULES-List-Validation-Rules-Assignments.md create mode 100644 reference-docs/VALIDATION-RULES-List-Validation-Rules.md create mode 100644 reference-docs/VALIDATION-RULES-Update-Validation-Rule.md create mode 100644 reference-docs/VALIDATION-RULES-Validation-Rule-Assignment-Object.md create mode 100644 reference-docs/VALIDATION-RULES-Validation-Rule-Object.md create mode 100644 reference-docs/VALIDATIONS-Validate-Promotion-Tier.md create mode 100644 reference-docs/VALIDATIONS-Validate-Promotions.md create mode 100644 reference-docs/VALIDATIONS-Validate-Stackable-Discounts.md create mode 100644 reference-docs/VALIDATIONS-Validate-Voucher.md create mode 100644 reference-docs/VALIDATIONS-Validation-Object.md create mode 100644 reference-docs/VOUCHERS-Adjust-Voucher-Balance.md create mode 100644 reference-docs/VOUCHERS-Create-Voucher.md create mode 100644 reference-docs/VOUCHERS-Delete-Voucher.md create mode 100644 reference-docs/VOUCHERS-Disable-Voucher.md create mode 100644 reference-docs/VOUCHERS-Enable-Voucher.md create mode 100644 reference-docs/VOUCHERS-Examine-Qualification.md create mode 100644 reference-docs/VOUCHERS-Export-Voucher-Transactions.md create mode 100644 reference-docs/VOUCHERS-Generate-Random-Code.md create mode 100644 reference-docs/VOUCHERS-Get-Voucher.md create mode 100644 reference-docs/VOUCHERS-Import-Vouchers-Using-CSV.md create mode 100644 reference-docs/VOUCHERS-Import-Vouchers.md create mode 100644 reference-docs/VOUCHERS-List-Voucher-Transactions.md create mode 100644 reference-docs/VOUCHERS-List-Vouchers.md create mode 100644 reference-docs/VOUCHERS-Release-Validation-Session.md create mode 100644 reference-docs/VOUCHERS-Update-Voucher.md create mode 100644 reference-docs/VOUCHERS-Update-Vouchers-In-Bulk.md create mode 100644 reference-docs/VOUCHERS-Update-Vouchers-Metadata-In-Bulk.md create mode 100644 reference-docs/VOUCHERS-Voucher-Object.md create mode 100644 reference-docs/Validation-Session.md create mode 100644 reference-docs/Versioning.md create mode 100644 reference-docs/test.mdx diff --git a/docs.json b/docs.json index 3df9b165..79052e04 100644 --- a/docs.json +++ b/docs.json @@ -97,10 +97,18 @@ "groups": [ { "group": "Endpoints", - "openapi": { - "source": "/api-reference/openapi.json", - "directory": "api-reference" - } + "openapi": "/api-reference/openapi.json", + "pages": [ + "reference-docs/Introduction", + { + "group": "Publications", + "pages": [ + "reference-docs/test", + "GET /publications", + "POST /publications" + ] + } + ] } ] } diff --git a/reference-docs/ASYNC-ACTIONS-Async-Action-Object.md b/reference-docs/ASYNC-ACTIONS-Async-Action-Object.md new file mode 100644 index 00000000..2a6fdc15 --- /dev/null +++ b/reference-docs/ASYNC-ACTIONS-Async-Action-Object.md @@ -0,0 +1,190 @@ +--- +title: Async Action Object +type: basic +categorySlug: voucherify-api +parentDocSlug: async-actions +slug: async-action-object +hidden: false +order: 1 +--- + +## Async Action +

This is an object representing an asynchronous action.

+ +All of: + +1. [Async Action Base](#async-action-base) +2.
AttributesDescription
resultOne of: 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.IMPORT_CSV, SKUS.IMPORT_CSV, PRODUCTS.METADATA_KEY_PURGE, VOUCHERS.IMPORT, VOUCHERS.IMPORT_CSV, VOUCHERS.BULK_UPDATE, VOUCHERS.METADATA_UPDATE, VOUCHERS.METADATA_KEY_PURGE, ORDERS.IMPORT, ORDERS.METADATA_KEY_PURGE
+ +## Async Action Base +| Attributes | Description | +|:-----|:--------| +| id
`string` |

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.

Available values: `async_action` | + +## CAMPAIGN.VOUCHERS_IMPORT +| 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:
AttributesDescription
code
string

Unique voucher code.

reason
string

Detailed failure cause for the voucher code import.

| +| done_count
`integer` |

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:
AttributesDescription
code
string

Unique voucher code.

row
integer

The CSV file row number where the code definition is recorded. The row counter excludes the file headers row.

reason
string

Detailed failure cause for the voucher code import.

| +| done_count
`integer` |

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:
AttributesDescription
source_id
string

Unique customer ID from your inventory system as indicated in the CSV file.

row
integer

The CSV file row number where the customer is recorded. The row counter excludes the file headers row.

reason
string

Detailed failure cause for the customer import.

| +| done_count
`integer` |

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.
AttributesDescription
errors
array

List of errors encountered during processing.

Array of:
AttributesDescription
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.

key
string

Short string describing the kind of error which occurred.

source_id
string

Source identifier of the customer for which the error occurred.

+ +## CUSTOMERS.METADATA_UPDATE +| Attributes | Description | +|:-----|:--------| +| errors
`array` |

List of errors encountered during processing.

Array of:
AttributesDescription
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.

key
string

Short string describing the kind of error which occurred.

| + +## CUSTOMERS.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.

| + +## PRODUCTS.BULK_UPDATE +All of: + +1. [Async Action Voucher Customer Product Bulk Update Result](#async-action-voucher-customer-product-bulk-update-result) +2.
AttributesDescription
errors
array

List of errors encountered during processing.

Array of:
AttributesDescription
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.

key
string

Short string describing the kind of error which occurred.

source_id
string

Source identifier of the product for which the error occurred.

+ +## PRODUCTS.METADATA_UPDATE +| Attributes | Description | +|:-----|:--------| +| errors
`array` |

List of errors encountered during processing.

Array of:
AttributesDescription
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.

key
string

Short string describing the kind of error which occurred.

| + +## PRODUCTS.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:
AttributesDescription
row
integer

The CSV file row number where the product definition is recorded. The row counter excludes the file headers row.

source_id
string

The source identifier of the product that caused the error.

reason
string

Detailed failure cause for the product import.

| +| done_count
`integer` |

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:
AttributesDescription
row
integer

The CSV file row number where the SKU definition is recorded. The row counter excludes the file headers row.

Example:

2

reason
string

Detailed failure cause for the SKU import.

Example:

Resource sku with id size-small is in use by products with ids [prod_0b0e3441c2462eff2c]

| +| done_count
`integer` |

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.

AttributesDescription
code
string

Unique voucher code.

reason
string

Detailed failure cause for the voucher code import.

| +| done_count
`integer` |

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:
AttributesDescription
code
string

Unique voucher code.

row
integer

The CSV file row number where the code definition is recorded. The row counter excludes the file headers row.

reason
string

Detailed failure cause for the voucher code import.

| +| done_count
`integer` |

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.
AttributesDescription
errors
array

List of errors encountered during processing.

Array of:
AttributesDescription
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.

key
string

Short string describing the kind of error which occurred.

code
string

Code of the voucher for which the error occurred.

+ +## VOUCHERS.METADATA_UPDATE +| Attributes | Description | +|:-----|:--------| +| errors
`array` |

List of errors encountered during processing.

Array of:
AttributesDescription
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.

key
string

Short string describing the kind of error which occurred.

| + +## VOUCHERS.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.

| + +## 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.

AttributesDescription
source_id
string

Unique order source ID.

reason
string

Detailed failure cause for the voucher code import.

| +| done_count
`integer` |

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.

Campaign Additional Data

AttributesDescription
promotionSee: Promotion Tiers
validation_rules_assignmentsSee: Validation Rules Assignments List
+ +## Campaign Base +| Attributes | Description | +|:-----|:--------| +| id
`string` |

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.

Available values: `AUTO_UPDATE`, `STATIC`, `STANDALONE` | +| voucher | See: [Campaign Voucher](#campaign-voucher) | +| auto_join
`boolean` |

Indicates 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.

| +| use_voucher_metadata_schema
`boolean` |

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.

| +| metadata
`object` |

The 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.

Array of [Category](#category) | +| object
`string` |

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.

| + +## 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.

| + +## 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.

AttributesDescription
quantity
integer, null

How many times a voucher can be redeemed. A null value means unlimited.

| +| code_config | [Code Config](#code-config) | +| is_referral_code
`boolean` |

Flag indicating whether this voucher is a referral code; true for campaign type REFERRAL_PROGRAM.

| +| 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) | + +## 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.

**Example:**

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.

**Example:**

P2D

| + +## Validity Day Of Week +

Integer array corresponding to the particular days of the week in which the voucher is valid.

+ +## Validity Hours +| Attributes | Description | +|:-----|:--------| +| daily
`array` |

Defines the reccuring period(s) when the resource is active. The periods should not overlap.

Array of:
AttributesDescription
start_time
string

Defines the starting hour of validity in the HH:mm format. The resource is inactive before this time.

Example:

12:00

days_of_week
array

Integer array corresponding to the particular days of the week in which the resource is valid.

  • 0 Sunday
  • 1 Monday
  • 2 Tuesday
  • 3 Wednesday
  • 4 Thursday
  • 5 Friday
  • 6 Saturday
expiration_time
string

Defines the ending hour of validity in the HH:mm format. The resource is inactive after this time.

Example:

14:00

| + +## 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

| + +## 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.

AttributesDescription
id
string

Unique custom event ID.

Example:

ms_Ll9enAm2BCN0M1s4VxWobLFM

name
string

Custom event name.

| +| referee_reward
`object` |

Defines the referee reward.

AttributesDescription
related_object_parent
object

Details of the resource from which the reward originates.

AttributesDescription
id
string

Unique ID of the reward source.

Example:

camp_kdxp3vf1clQ9CFs1jpqv3tZe

name
string

Name of the reward source.

object
string

Type of resource represented by the source of the reward.

Available values: CAMPAIGN
type
string

Type of reward.

Available values: LOYALTY_CARD, GIFT_VOUCHER
amount
string

Define the number of points to add to a loyalty card or credits to the balance on a gift card. In case of the gift card, the value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000.

| + +## Loyalty Tiers Expiration +| 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.
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.

Available values: `BALANCE`, `POINTS_IN_PERIOD` | +| qualification_period
`string` |

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.

PeriodDefinition
Calendar MonthPoints collected in one calendar month
January, February, March, etc.
Calendar QuarterPoints collected in the quarter
- January - March
- April - June
- July - September
- October - December
Calendar Half-yearPoints collected in the half-year
- January - June
- July - December
Calendar YearPoints collected in one calendar year
January - December
Available values: `MONTH`, `QUARTER`, `HALF_YEAR`, `YEAR` | +| start_date
`object` |

Defines the conditions for the start date of the tier.

AttributesDescription
type
string

What triggers the tier to be valid for a customer.
IMMEDIATE: After reaching the minimum required points.
NEXT_PERIOD: When the next qualification period starts.

Available values: IMMEDIATE, NEXT_PERIOD
| +| expiration_date
`object` |

Defines the conditions for the expiration date of a tier.

AttributesDescription
type
string

What triggers the tier to expire for a customer.
END_OF_PERIOD: Expire tier at the end of the period.
END_OF_NEXT_PERIOD: Expire tier at the end of the next period.
BALANCE_DROP: Tier expires when the points balance drops below the required range of the tier.
CUSTOM: Tier expires after a certain time period passes following the instance the points balance drops below the required range of the tier.

Available values: END_OF_PERIOD, END_OF_NEXT_PERIOD, BALANCE_DROP, CUSTOM
extend
string

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 P3M will be valid for an additional duration of 3 months and a tier with a duration of P1D will be valid for an additional duration of 1 day.

rounding

Defines the rounding mechanism for tier expiration.

| + +## Access Settings Campaign Assignments List +| Attributes | Description | +|:-----|:--------| +| object
`string` |

The type of the object represented by JSON. Default is list. This object stores information about campaign assignments to areas and stores

Available values: `list` | +| data_ref
`string` |

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.

AttributesDescription
discountSee: Discount
| +| metadata
`object` |

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.

AttributesDescription
id
string

Unique campaign ID.

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-22T00: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_timeframeSee: Validity Timeframe
validity_day_of_weekSee: Validity Day Of Week
validity_hoursSee: Validity Hours
active
boolean

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 start_date and expiration_date using the Disable Campaign endpoint.

  • true indicates an active campaign
  • false indicates an inactive campaign
category_id
string

Unique category ID that this campaign belongs to.

Example:

cat_0b688929a2476386a6

object
string

The type of the object represented by the campaign object. This object stores information about the campaign.

| +| campaign_id
`string` |

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.

| +| start_date
`string` |

Activation 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.

AttributesDescription
redemptions
object

Contains statistics about promotion tier redemptions.

AttributesDescription
total_redeemed
integer

Number of times the promotion tier was redeemed.

orders
object

Contains statistics about orders related to the promotion tier.

AttributesDescription
total_amount
integer

Sum of order totals.

total_discount_amount
integer

Sum of total discount applied using the promotion tier.

| +| object
`string` |

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.

| +| subtracted_amount
`integer` |

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.

| +| effect
`string` |

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.

AttributesDescription
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.

Available values: FIXED_DAY_OF_YEAR, MONTH
period_value
integer

Value of the period. Required for the period_type: MONTH.

rounding_type
string

Type of rounding of the expiration period. Optional for the period_type: MONTH.

Available values: END_OF_MONTH, END_OF_QUARTER, END_OF_HALF_YEAR, END_OF_YEAR, PARTICULAR_MONTH
rounding_value
integer

Value of rounding of the expiration period. Required for the rounding_type.

fixed_month
integer

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.

fixed_day
integer

Determines the day of the month when the points expire. Required for the period_type: FIXED_DAY_OF_YEAR.

| + +## Code Config +| Attributes | Description | +|:-----|:--------| +| length
`number` |

Number of characters in a generated code (excluding prefix and postfix).

| +| charset
`string` |

Characters that can appear in the code.

Examples:

| +| prefix
`string` |

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.

| +| initial_count
`integer` |

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.

| +| area_store_id
`string` |

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.

| +| fixed_amount_formula
`string` | | +| effect |

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.

AttributesDescription
dataSee: Customer Activity Data
event_sourceSee: Event Source
| +| created_at
`string` |

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.

AttributesDescription
id
string

Unique identifier of the user.

Example:

user_xyzfghSTprSTUVWXYlk6tuvXYst7FGH7

| +| api_key
`object` |

Determines the API key used to initiate the event.

AttributesDescription
name
string

Channel name in the application keys.

app_id
string

Contains the application ID from the Voucherify API key pair.

Example:

1XXXX5XX-0XXX-XXXb-X7XX-XX2XXaXXX6XX

| + +## Event Customer Confirmed +| Attributes | Description | +|:-----|:--------| +| customer | See: [Customer With Summary Loyalty Referrals](#customer-with-summary-loyalty-referrals) | +| unconfirmed_customer
`object` |
AttributesDescription
id
string
Example:

ucust_1qa70mVfYkl11Ab0ZxDPdWNa

| + +## Event Customer Created +| Attributes | Description | +|:-----|:--------| +| customer | See: [Customer With Summary Loyalty Referrals](#customer-with-summary-loyalty-referrals) | + +## Event Customer Updated +| Attributes | Description | +|:-----|:--------| +| customer | See: [Customer With Summary Loyalty Referrals](#customer-with-summary-loyalty-referrals) | + +## Event Customer Deleted +| Attributes | Description | +|:-----|:--------| +| customer | See: [Customer With Summary Loyalty Referrals](#customer-with-summary-loyalty-referrals) | + +## Event Customer Referred +| Attributes | Description | +|:-----|:--------| +| customer | See: [Simple Customer](#simple-customer) | +| referrer | See: [Simple Customer](#simple-customer) | +| campaign | See: [Simple Campaign](#simple-campaign) | +| voucher | See: [Simple Voucher](#simple-voucher) | +| custom_event | See: [Custom Event](#custom-event) | +| redemption | See: [Redemption Internal](#redemption-internal) | + +## Event Customer Custom Event +| Attributes | Description | +|:-----|:--------| +| event | See: [Custom Event](#custom-event) | +| event_schema | See: [Simple Custom Event](#simple-custom-event) | +| customer | See: [Simple Customer](#simple-customer) | +| referral
`object`, `null` |

Details about the referral.

AttributesDescription
referrer

Details about the referrer.

Simple Customer
voucher

Details about the referral code.

Simple Voucher
campaign

Details about the referral campaign.

Simple Campaign
| +| loyalty
`object`, `null` |

Details about the loyalty activity.

AttributesDescription
voucher

Details about the loyalty code.

Simple Voucher
campaign

Details about the loyalty campaign.

Simple Campaign
| + +## Event Customer Segment Entered +| Attributes | Description | +|:-----|:--------| +| customer | See: [Customer With Summary Loyalty Referrals](#customer-with-summary-loyalty-referrals) | +| segment | See: [Simple Segment](#simple-segment) | + +## Event Customer Segment Left +| Attributes | Description | +|:-----|:--------| +| customer | See: [Customer With Summary Loyalty Referrals](#customer-with-summary-loyalty-referrals) | +| segment | See: [Simple Segment](#simple-segment) | + +## Event Customer SMS Sent +

Event data object schema for customer.sms.sent.

+ +[Event Customer Sent](#event-customer-sent) + +## Event Customer SMS Recovered +

Event data object schema for customer.sms.recovered.

+ +[Event Customer Recovered](#event-customer-recovered) + +## Event Customer SMS Failed +

Event data object schema for customer.sms.failed.

+ +[Event Customer Failed](#event-customer-failed) + +## Event Customer Email Sent +

Event data object schema for customer.email.sent.

+ +[Event Customer Sent](#event-customer-sent) + +## Event Customer Email Recovered +

Event data object schema for customer.email.recovered.

+ +[Event Customer Recovered](#event-customer-recovered) + +## Event Customer Email Failed +

Event data object schema for customer.email.failed.

+ +[Event Customer Failed](#event-customer-failed) + +## Event Customer ActiveCampaign Sent +

Event data object schema for customer.activecampaign.sent.

+ +[Event Customer Sent](#event-customer-sent) + +## Event Customer ActiveCampaign Recovered +

Event data object schema for customer.activecampaign.recovered.

+ +[Event Customer Recovered](#event-customer-recovered) + +## Event Customer ActiveCampaign Failed +

Event data object schema for customer.activecampaign.failed.

+ +[Event Customer Failed](#event-customer-failed) + +## Event Customer Braze Sent +

Event data object schema for customer.braze.sent.

+ +[Event Customer Sent](#event-customer-sent) + +## Event Customer Braze Recovered +

Event data object schema for customer.braze.recovered.

+ +[Event Customer Recovered](#event-customer-recovered) + +## Event Customer Braze Failed +

Event data object schema for customer.braze.failed.

+ +[Event Customer Failed](#event-customer-failed) + +## Event Customer Mailchimp Sent +

Event data object schema for customer.mailchimp.sent.

+ +[Event Customer Sent](#event-customer-sent) + +## Event Customer Mailchimp Recovered +

Event data object schema for customer.mailchimp.recovered.

+ +[Event Customer Recovered](#event-customer-recovered) + +## Event Customer Mailchimp Failed +

Event data object schema for customer.mailchimp.failed.

+ +[Event Customer Failed](#event-customer-failed) + +## Event Customer Intercom Sent +

Event data object schema for customer.intercom.sent.

+ +[Event Customer Sent](#event-customer-sent) + +## Event Customer Intercom Recovered +

Event data object schema for customer.intercom.recovered.

+ +[Event Customer Recovered](#event-customer-recovered) + +## Event Customer Intercom Failed +

Event data object schema for customer.intercom.failed.

+ +[Event Customer Failed](#event-customer-failed) + +## Event Customer Shopify Sent +

Event data object schema for customer.shopify.sent.

+ +[Event Customer Sent](#event-customer-sent) + +## Event Customer Shopify Recovered +

Event data object schema for customer.shopify.recovered.

+ +[Event Customer Recovered](#event-customer-recovered) + +## Event Customer Shopify Failed +

Event data object schema for customer.shopify.failed.

+ +[Event Customer Failed](#event-customer-failed) + +## Event Customer Klaviyo Sent +

Event data object schema for customer.klaviyo.sent.

+ +[Event Customer Sent](#event-customer-sent) + +## Event Customer Klaviyo Recovered +

Event data object schema for customer.klaviyo.recovered.

+ +[Event Customer Recovered](#event-customer-recovered) + +## Event Customer Klaviyo Failed +

Event data object schema for customer.klaviyo.failed.

+ +[Event Customer Failed](#event-customer-failed) + +## Event Customer Batch Sent +

Event data object schema for customer.batch.sent.

+ +[Event Customer Sent](#event-customer-sent) + +## Event Customer Batch Recovered +

Event data object schema for customer.batch.recovered.

+ +[Event Customer Recovered](#event-customer-recovered) + +## Event Customer Batch Failed +

Event data object schema for customer.batch.failed.

+ +[Event Customer Failed](#event-customer-failed) + +## Event Customer Rewarded +| Attributes | Description | +|:-----|:--------| +| customer | See: [Simple Customer](#simple-customer) | +| holder | See: [Simple Customer](#simple-customer) | +| voucher | See: [Simple Voucher](#simple-voucher) | +| campaign | See: [Simple Campaign](#simple-campaign) | +| redemption | See: [Redemption Internal](#redemption-internal) | +| reward | See: [Simple Redemption Reward Result](#simple-redemption-reward-result) | +| referral_tier | See: [Simple Referral Tier](#simple-referral-tier) | +| balance
`object`, `null` |

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.

AttributesDescription
amount
integer
points
integer
| +| custom_event | See: [Custom Event](#custom-event) | +| customer_event
`object`, `null` |
AttributesDescription
segmentSee: Simple Segment
event_type
string

Type of activity that triggered the event.

| + +## Event Customer Rewarded Loyalty Points +| Attributes | Description | +|:-----|:--------| +| customer | See: [Simple Customer](#simple-customer) | +| holder | See: [Simple Customer](#simple-customer) | +| voucher | See: [Simple Voucher](#simple-voucher) | +| campaign | See: [Simple Campaign](#simple-campaign) | +| loyalty_tier | See: [Loyalty Tier](#loyalty-tier) | +| earning_rule | See: [Earning Rule](#earning-rule) | +| balance | See: [Voucher Balance](#voucher-balance) | +| order | All of: 1. [Order Calculated No Customer Data](#order-calculated-no-customer-data) +2.
AttributesDescription
items
array

Array of items applied to the order. It can include up to 500 items.

Array of Order Item Calculated
| +| event | See: [Simple Event](#simple-event) | + +## Event Customer Gift Voucher Balance Added +| Attributes | Description | +|:-----|:--------| +| customer | See: [Simple Customer](#simple-customer) | +| campaign | See: [Simple Campaign](#simple-campaign) | +| voucher | See: [Simple Voucher](#simple-voucher) | +| balance | See: [Voucher Balance](#voucher-balance) | +| transaction | All of: 1. [Voucher Transaction Base](#voucher-transaction-base) +2.
AttributesDescription
details
object

Contains the detailed information about the transaction.

AttributesDescription
balanceSee: Voucher Balance
order
object

Contains information about the original order.

AttributesDescription
id
string

Unique order ID.

source_id
string

The merchant's order ID if it is different from the Voucherify order ID. It is really useful in case of integration between multiple systems. It can be an order ID from CRM, database or 3rd party service.

event
object

Contains information about the event that triggers the point accrual.

AttributesDescription
id
string

Unique event ID.

type
string

Type of event.

earning_rule
object

Contains information about the earning rule.

AttributesDescription
id
string

Unique identifier of an earning rule, assigned by Voucherify.

source
object

Contains the custom earning rule name.

AttributesDescription
banner
string

Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard.

segment
object

Contains information about the segment.

AttributesDescription
id
string
name
string
loyalty_tier
object

Contains information about the loyalty tier.

AttributesDescription
id
string

Unique identifier of the loyalty tier, assigned by Voucherify.

name
string

User-defined name of the loyalty tier.

redemption
object

Contains information about the original redemption.

AttributesDescription
id
string

Unique redemption ID.

rollback
object

Contains information about the redemption rollback.

AttributesDescription
id
string

Unique redemption rollback ID.

custom_event
object

Contains information about the custom event that triggers the point accrual.

AttributesDescription
id
string

Unique event ID.

type
string

Type of custom event.

event_schema
object

Contains information about the custom event metadata schema.

AttributesDescription
id
string

Unique metadata schema ID.

name
string

Type of custom event.

reward
object

Contains information about the pay with points reward.

AttributesDescription
id
string

Unique reward ID.

name
string

Reward name.

source_voucher

Contains information on how the balance on the donor loyalty card was affected by the transaction.

Simple Voucher
destination_voucher

Contains information on how the balance on the receiving loyalty card was affected by the transaction.

Simple Voucher
type
string

Transaction type concerning gift card credits.

Available values: CREDITS_ADDITION
| + +## Event Customer Loyalty Card Pending Points Activated +| Attributes | Description | +|:-----|:--------| +| customer | See: [Simple Customer](#simple-customer) | +| campaign | See: [Simple Campaign](#simple-campaign) | +| voucher | See: [Simple Voucher](#simple-voucher) | +| balance | See: [Voucher Balance](#voucher-balance) | +| order | See: [Simple Order](#simple-order) | +| transaction | See: [Voucher Transaction](#voucher-transaction) | +| pending_points | See: [Loyalty Pending Point Entry](#loyalty-pending-point-entry) | + +## Event Customer Loyalty Card Pending Points Added +| Attributes | Description | +|:-----|:--------| +| customer | See: [Simple Customer](#simple-customer) | +| campaign | See: [Simple Campaign](#simple-campaign) | +| voucher | See: [Simple Voucher](#simple-voucher) | +| voucher_pending_points_balance | See: [Voucher Balance](#voucher-balance) | +| order | See: [Simple Order](#simple-order) | +| pending_points | See: [Loyalty Pending Point Entry](#loyalty-pending-point-entry) | + +## Event Customer Loyalty Card Pending Points Canceled +| Attributes | Description | +|:-----|:--------| +| customer | See: [Simple Customer](#simple-customer) | +| campaign | See: [Simple Campaign](#simple-campaign) | +| voucher | See: [Simple Voucher](#simple-voucher) | +| voucher_pending_points_balance | See: [Voucher Balance](#voucher-balance) | +| order | See: [Simple Order](#simple-order) | +| pending_points | See: [Loyalty Pending Point Entry](#loyalty-pending-point-entry) | + +## Event Customer Loyalty Card Pending Points Updated +| Attributes | Description | +|:-----|:--------| +| customer | See: [Simple Customer](#simple-customer) | +| campaign | See: [Simple Campaign](#simple-campaign) | +| voucher | See: [Simple Voucher](#simple-voucher) | +| voucher_pending_points_balance | See: [Voucher Balance](#voucher-balance) | +| order | See: [Simple Order](#simple-order) | +| pending_points | See: [Loyalty Pending Point Entry](#loyalty-pending-point-entry) | + +## Event Customer Loyalty Card Points Added +| Attributes | Description | +|:-----|:--------| +| customer | See: [Simple Customer](#simple-customer) | +| campaign | See: [Simple Campaign](#simple-campaign) | +| voucher | See: [Simple Voucher](#simple-voucher) | +| balance | See: [Voucher Balance](#voucher-balance) | +| transaction | All of: 1. [Voucher Transaction Base](#voucher-transaction-base) +2.
AttributesDescription
details
object

Contains the detailed information about the transaction.

AttributesDescription
balanceSee: Voucher Balance
order
object

Contains information about the original order.

AttributesDescription
id
string

Unique order ID.

source_id
string

The merchant's order ID if it is different from the Voucherify order ID. It is really useful in case of integration between multiple systems. It can be an order ID from CRM, database or 3rd party service.

event
object

Contains information about the event that triggers the point accrual.

AttributesDescription
id
string

Unique event ID.

type
string

Type of event.

earning_rule
object

Contains information about the earning rule.

AttributesDescription
id
string

Unique identifier of an earning rule, assigned by Voucherify.

source
object

Contains the custom earning rule name.

AttributesDescription
banner
string

Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard.

segment
object

Contains information about the segment.

AttributesDescription
id
string
name
string
loyalty_tier
object

Contains information about the loyalty tier.

AttributesDescription
id
string

Unique identifier of the loyalty tier, assigned by Voucherify.

name
string

User-defined name of the loyalty tier.

redemption
object

Contains information about the original redemption.

AttributesDescription
id
string

Unique redemption ID.

rollback
object

Contains information about the redemption rollback.

AttributesDescription
id
string

Unique redemption rollback ID.

custom_event
object

Contains information about the custom event that triggers the point accrual.

AttributesDescription
id
string

Unique event ID.

type
string

Type of custom event.

holder_loyalty_tier
object

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 before the loyalty point balance changed.

AttributesDescription
id
string

Unique identifier of the loyalty tier, assigned by Voucherify.

name
string

User-defined name of the loyalty tier.

event_schema
object

Contains information about the custom event metadata schema.

AttributesDescription
id
string

Unique metadata schema ID.

name
string

Type of custom event.

reward
object

Contains information about the pay with points reward.

AttributesDescription
id
string

Unique reward ID.

name
string

Reward name.

source_voucher

Contains information on how the balance on the donor loyalty card was affected by the transaction.

Simple Voucher
destination_voucher

Contains information on how the balance on the receiving loyalty card was affected by the transaction.

Simple Voucher
type
string

Transaction type concerning loyalty card points.

Available values: POINTS_ACCRUAL
| + +## Event Customer Loyalty Card Points Transferred +| Attributes | Description | +|:-----|:--------| +| customer | See: [Simple Customer](#simple-customer) | +| campaign | See: [Simple Campaign](#simple-campaign) | +| voucher | See: [Simple Voucher](#simple-voucher) | +| source_voucher | See: [Simple Voucher](#simple-voucher) | +| destination_voucher | See: [Simple Voucher](#simple-voucher) | +| balance | See: [Voucher Balance](#voucher-balance) | +| transaction | All of: 1. [Voucher Transaction Base](#voucher-transaction-base) +2.
AttributesDescription
details
object

Contains the detailed information about the transaction.

AttributesDescription
balanceSee: Voucher Balance
order
object

Contains information about the original order.

AttributesDescription
id
string

Unique order ID.

source_id
string

The merchant's order ID if it is different from the Voucherify order ID. It is really useful in case of integration between multiple systems. It can be an order ID from CRM, database or 3rd party service.

event
object

Contains information about the event that triggers the point accrual.

AttributesDescription
id
string

Unique event ID.

type
string

Type of event.

earning_rule
object

Contains information about the earning rule.

AttributesDescription
id
string

Unique identifier of an earning rule, assigned by Voucherify.

source
object

Contains the custom earning rule name.

AttributesDescription
banner
string

Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard.

segment
object

Contains information about the segment.

AttributesDescription
id
string
name
string
loyalty_tier
object

Contains information about the loyalty tier.

AttributesDescription
id
string

Unique identifier of the loyalty tier, assigned by Voucherify.

name
string

User-defined name of the loyalty tier.

redemption
object

Contains information about the original redemption.

AttributesDescription
id
string

Unique redemption ID.

rollback
object

Contains information about the redemption rollback.

AttributesDescription
id
string

Unique redemption rollback ID.

custom_event
object

Contains information about the custom event that triggers the point accrual.

AttributesDescription
id
string

Unique event ID.

type
string

Type of custom event.

event_schema
object

Contains information about the custom event metadata schema.

AttributesDescription
id
string

Unique metadata schema ID.

name
string

Type of custom event.

holder_loyalty_tier
object

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 before the loyalty point balance changed.

AttributesDescription
id
string

Unique identifier of the loyalty tier, assigned by Voucherify.

name
string

User-defined name of the loyalty tier.

reward
object

Contains information about the pay with points reward.

AttributesDescription
id
string

Unique reward ID.

name
string

Reward name.

source_voucher

Contains information on how the balance on the donor loyalty card was affected by the transaction.

Simple Voucher
destination_voucher

Contains information on how the balance on the receiving loyalty card was affected by the transaction.

Simple Voucher
type
string

Transaction type concerning loyalty card points.

Available values: POINTS_TRANSFER_IN, POINTS_TRANSFER_OUT
| + +## Event Customer Loyalty Card Points Expired +| Attributes | Description | +|:-----|:--------| +| customer | See: [Simple Customer](#simple-customer) | +| campaign | See: [Simple Campaign](#simple-campaign) | +| voucher | See: [Simple Voucher](#simple-voucher) | +| points
`integer` |

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.
AttributesDescription
details
object

Contains the detailed information about the transaction.

AttributesDescription
balanceSee: Voucher Balance
order
object

Contains information about the original order.

AttributesDescription
id
string

Unique order ID.

source_id
string

The merchant's order ID if it is different from the Voucherify order ID. It is really useful in case of integration between multiple systems. It can be an order ID from CRM, database or 3rd party service.

event
object

Contains information about the event that triggers the point accrual.

AttributesDescription
id
string

Unique event ID.

type
string

Type of event.

earning_rule
object

Contains information about the earning rule.

AttributesDescription
id
string

Unique identifier of an earning rule, assigned by Voucherify.

source
object

Contains the custom earning rule name.

AttributesDescription
banner
string

Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard.

segment
object

Contains information about the segment.

AttributesDescription
id
string
name
string
loyalty_tier
object

Contains information about the loyalty tier.

AttributesDescription
id
string

Unique identifier of the loyalty tier, assigned by Voucherify.

name
string

User-defined name of the loyalty tier.

redemption
object

Contains information about the original redemption.

AttributesDescription
id
string

Unique redemption ID.

rollback
object

Contains information about the redemption rollback.

AttributesDescription
id
string

Unique redemption rollback ID.

custom_event
object

Contains information about the custom event that triggers the point accrual.

AttributesDescription
id
string

Unique event ID.

type
string

Type of custom event.

event_schema
object

Contains information about the custom event metadata schema.

AttributesDescription
id
string

Unique metadata schema ID.

name
string

Type of custom event.

holder_loyalty_tier
object

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 before the loyalty point balance changed.

AttributesDescription
id
string

Unique identifier of the loyalty tier, assigned by Voucherify.

name
string

User-defined name of the loyalty tier.

reward
object

Contains information about the pay with points reward.

AttributesDescription
id
string

Unique reward ID.

name
string

Reward name.

source_voucher

Contains information on how the balance on the donor loyalty card was affected by the transaction.

Simple Voucher
destination_voucher

Contains information on how the balance on the receiving loyalty card was affected by the transaction.

Simple Voucher
type
string

Transaction type concerning loyalty card points.

Available values: POINTS_EXPIRATION
| + +## Event Customer Voucher Deleted +| Attributes | Description | +|:-----|:--------| +| customer | See: [Simple Customer](#simple-customer) | +| campaign | See: [Simple Campaign](#simple-campaign) | +| voucher | See: [Simple Voucher](#simple-voucher) | + +## Event Customer Publication Succeeded +| Attributes | Description | +|:-----|:--------| +| customer | See: [Simple Customer](#simple-customer) | +| campaign | See: [Simple Campaign](#simple-campaign) | +| publication | See: [Valid Single Voucher](#valid-single-voucher) | + +## Event Customer Publication Failed +| Attributes | Description | +|:-----|:--------| +| customer | See: [Simple Customer](#simple-customer) | +| campaign | See: [Simple Campaign](#simple-campaign) | +| publication | See: [Valid Single Voucher](#valid-single-voucher) | + +## Event Customer Validation Succeeded +| Attributes | Description | +|:-----|:--------| +| customer | See: [Simple Customer](#simple-customer) | +| validation | See: [Validation Entity](#validation-entity) | + +## Event Customer Validation Failed +| Attributes | Description | +|:-----|:--------| +| customer | See: [Simple Customer](#simple-customer) | +| validation | See: [Validation Entity](#validation-entity) | + +## Event Customer Redemption Succeeded +

Event data object schema for customer.redemption.succeeded.

+ +[Event Customer Redemption](#event-customer-redemption) + +## Event Customer Redemption Failed +

Event data object schema for customer.redemption.failed.

+ +[Event Customer Redemption](#event-customer-redemption) + +## Event Customer Redemption Rollback Succeeded +

Event data object schema for customer.redemption.rollback.succeeded.

+ +All of: + +1. [Event Customer Redemption](#event-customer-redemption) +2.
AttributesDescription
redemption_rollbackSee: Simple Redemption
+ +## Event Customer Redemption Rollback Failed +

Event data object schema for customer.redemption.rollback.failed.

+ +All of: + +1. [Event Customer Redemption](#event-customer-redemption) +2.
AttributesDescription
redemption_rollbackSee: Simple Redemption
+ +## Event Customer Order Canceled +

Event data object schema for customer.order.canceled.

+ +[Event Customer Order](#event-customer-order) + +## Event Customer Order Created +

Event data object schema for customer.order.created.

+ +[Event Customer Order](#event-customer-order) + +## Event Customer Order Fulfilled +

Event data object schema for customer.order.fulfilled.

+ +[Event Customer Order](#event-customer-order) + +## Event Customer Order Paid +

Event data object schema for customer.order.paid.

+ +[Event Customer Order](#event-customer-order) + +## Event Customer Order Processing +

Event data object schema for customer.order.processing.

+ +[Event Customer Order](#event-customer-order) + +## Event Customer Order Updated +

Event data object schema for customer.order.updated.

+ +[Event Customer Order](#event-customer-order) + +## Event Customer Reward Redemptions Created +

Event data object schema for customer.reward_redemptions.created.

+ +[Event Customer Reward Redemptions](#event-customer-reward-redemptions) + +## Event Customer Reward Redemptions Pending +

Event data object schema for customer.reward_redemptions.pending.

+ +[Event Customer Reward Redemptions](#event-customer-reward-redemptions) + +## Event Customer Reward Redemptions Completed +

Event data object schema for customer.reward_redemptions.completed.

+ +[Event Customer Reward Redemptions](#event-customer-reward-redemptions) + +## Event Customer Reward Redemptions Rolled Back +

Event data object schema for customer.reward_redemptions.rolledback.

+ +[Event Customer Reward Redemptions](#event-customer-reward-redemptions) + +## Event Customer Loyalty Updated +| Attributes | Description | +|:-----|:--------| +| customer | See: [Simple Customer](#simple-customer) | +| campaign | See: [Simple Campaign](#simple-campaign) | +| loyalty
`object` | | +| created_at
`string` | **Example:**

2022-02-25T13:32:08.734Z

| + +## Event Customer Loyalty Tier Upgraded +

Event data object schema for customer.loyalty.tier.upgraded.

+ +All of: + +1. [Event Customer Loyalty Tier Base](#event-customer-loyalty-tier-base) +2.

Loyalty Tier Upgraded

AttributesDescription
loyalty_tier_fromSee: Loyalty Tier
loyalty_tier_toSee: Loyalty Tier
created_at
string
Example:

2022-02-25T13:32:08.734Z

+ +## Event Customer Loyalty Tier Downgraded +

Event data object schema for customer.loyalty.tier.downgraded.

+ +All of: + +1. [Event Customer Loyalty Tier Base](#event-customer-loyalty-tier-base) +2.

Loyalty Tier Downgraded

AttributesDescription
loyalty_tier_fromSee: Loyalty Tier
loyalty_tier_toSee: Loyalty Tier
created_at
string
Example:

2022-02-25T13:32:08.734Z

+ +## Event Customer Loyalty Tier Prolonged +

Event data object schema for customer.loyalty.tier.prolonged.

+ +All of: + +1. [Event Customer Loyalty Tier Base](#event-customer-loyalty-tier-base) +2.

Loyalty Tier Prolonged

AttributesDescription
loyalty_tierSee: Loyalty Tier
created_at
string
Example:

2022-02-25T13:32:08.734Z

+ +## Event Customer Loyalty Tier Expiration Changed +

Event data object schema for customer.loyalty.tier.expiration.changed.

+ +All of: + +1. [Event Customer Loyalty Tier Base](#event-customer-loyalty-tier-base) +2.

Loyalty Tier Expiration Changed

AttributesDescription
loyalty_tierSee: Loyalty Tier
created_at
string
Example:

2022-02-25T13:32:08.734Z

expiration_date
string
Example:

2022-02-25T13:32:08.734Z

+ +## Event Customer Loyalty Tier Joined +

Event data object schema for customer.loyalty.tier.joined.

+ +All of: + +1. [Event Customer Loyalty Tier Base](#event-customer-loyalty-tier-base) +2.

Loyalty Tier Joined

AttributesDescription
loyalty_tierSee: Loyalty Tier
created_at
string
Example:

2022-02-25T13:32:08.734Z

+ +## Event Customer Loyalty Tier Left +

Event data object schema for customer.loyalty.tier.left.

+ +All of: + +1. [Event Customer Loyalty Tier Base](#event-customer-loyalty-tier-base) +2.

Loyalty Tier Left

AttributesDescription
loyalty_tierSee: Loyalty Tier
created_at
string
Example:

2022-02-25T13:32:08.734Z

+ +## Event Customer Holder Assignment Created +| Attributes | Description | +|:-----|:--------| +| holder | See: [Redeemable Holder](#redeemable-holder) | +| voucher | See: [Simple Voucher](#simple-voucher) | +| campaign | See: [Simple Campaign](#simple-campaign) | +| customer | See: [Simple Customer](#simple-customer) | + +## Event Customer Holder Assignment Deleted +| Attributes | Description | +|:-----|:--------| +| holder | See: [Redeemable Holder](#redeemable-holder) | +| voucher | See: [Simple Voucher](#simple-voucher) | +| campaign | See: [Simple Campaign](#simple-campaign) | +| customer | See: [Simple Customer](#simple-customer) | + +## Customer With Summary Loyalty Referrals +All of: + +1.

Customer Response Data

AttributesDescription
id
string

The ID of an existing customer that will be linked to redemption in this request.

source_id
string

A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored.

summaryCustomer Summary
loyaltyCustomer Loyalty
referralsCustomer Referrals
system_metadata
object

Object used to store system metadata information.

created_at
string

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

Example:

2022-08-30T06:32:07.380Z

updated_at
string

Timestamp representing the date and time when the customer was updated. The value is shown in the ISO 8601 format.

Example:

2022-08-31T06:32:07.380Z

assets
object

Contains information about the customer's cockpit.

AttributesDescription
cockpit_url
string

Customer's cockpit URL address.

object
string

The type of the object represented by JSON.

Available values: customer
+2. [Customer Base](#customer-base) + +## 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` | + +## 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.

Available values: `AUTO_UPDATE`, `STATIC`, `STANDALONE` | +| is_referral_code
`boolean` |

Flag indicating whether this voucher is a referral code; true for campaign type REFERRAL_PROGRAM.

| +| voucher | See: [Simple Campaign Voucher](#simple-campaign-voucher) | +| referral_program | See: [Referral Program](#referral-program) | +| auto_join
`boolean` |

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.

| +| active
`boolean` |

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.

| +| 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 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.

| +| created_at
`string` |

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.

AttributesDescription
quantity
integer, null

How many times a voucher can be redeemed. A null value means unlimited.

redeemed_quantity
integer

How many times a voucher has already been redeemed.

Example:

1

redeemed_points
integer

Total loyalty points redeemed.

| +| start_date
`string` |

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.

Available values: `event` | +| type
`string` |

The event name.

| +| customer |

A simple customer object

[Customer Object Required Object Type](#customer-object-required-object-type) | +| referral
`object` |

Referral object.

AttributesDescription
referrer_id
string

Unique referrer ID.

Example:

cust_nM4jqPiaXUvQdVSA6vTRUnix

code
string

Voucher code.

id
string

Unique voucher ID.

| +| loyalty
`object` |

Loyalty object.

AttributesDescription
code
string

Loyalty card code.

| +| 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 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.

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

| +| 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.

Available values: `USER`, `API` | +| channel_id
`string` |

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.

**Example:**

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.

| +| order | All of: 1. [Order Calculated No Customer Data](#order-calculated-no-customer-data) +2.
AttributesDescription
items
array

Array of items applied to the order. It can include up to 500 items.

Array of Order Item Calculated
| +| previous_order | All of: 1. [Order Calculated No Customer Data](#order-calculated-no-customer-data) +2.
AttributesDescription
items
array

Array of items applied to the order. It can include up to 500 items.

Array of Order Item Calculated
| +| reward | See: [Redemption Reward Result](#redemption-reward-result) | +| 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.

**Example:**

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` |
AttributesDescription
rollbacks
array
Array of:

Redemption Internal Related Redemptions Rollbacks Item

AttributesDescription
id
string

Unique rollback redemption ID.

Example:

rr_0bc92f81a6801f9bca

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

redemptions
array
Array of:

Redemption Internal Related Redemptions Item

AttributesDescription
id
string

Unique redemption ID.

Example:

r_0bc92f81a6801f9bca

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

| +| parent_redemption_id
`string` |

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.
AttributesDescription
id
string

Unique loyalty tier ID.

campaign_id
string

Unique parent campaign ID.

metadata
object, 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_at
string

Timestamp representing the date and time when the loyalty tier was created. The value is shown in the ISO 8601 format.

updated_at
string, null

Timestamp representing the date and time when the loyalty tier was updated. The value is shown in the ISO 8601 format.

config
object

Defines loyalty tier range in points.

AttributesDescription
points
object

Defines range of loyalty tier in points.

AttributesDescription
from
integer

Bottom points threshold value.

to
integer

Top points threshold value.

expirationSee: Loyalty Tier Expiration
object
string

The type of the object represented by JSON. This object stores information about the loyalty.

Available values: loyalty_tier
+ +## Earning Rule +All of: + +1. [EarningRuleBase](#earningrulebase) +2.
AttributesDescription
validation_rule_id
string, null

A unique validation rule identifier assigned by the Voucherify API. The validation rule is verified before points are added to the balance.

updated_at
string, null

Timestamp representing the date and time when the earning rule was last updated in ISO 8601 format.

active
boolean

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.

  • true indicates an active earning rule
  • false indicates an inactive earning rule
+ +## Voucher Balance +| Attributes | Description | +|:-----|:--------| +| type
`string` |

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.

Available values: `MANUAL`, `AUTOMATIC` | +| related_object
`object` |

Defines the resource that is being modified with the values that are returned in the balance object.

AttributesDescription
id
string

Identifies the voucher that is being modified. The ID is assigned by the Voucherify API.

type
string

The object being modified, i.e. voucher.

Available values: voucher
| + +## 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)

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

| +| 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` | +| 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` |
AttributesDescription
[propertyName]See: Order Redemptions
| + +## Order Item Calculated +| Attributes | Description | +|:-----|:--------| +| id
`string` |

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.

| +| subtotal_amount
`integer` |

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

| +| product
`object` |

An object containing details of the related product.

AttributesDescription
id
string

A unique identifier that represents the product and is assigned by Voucherify.

source_id
string

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.

override
boolean

The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system.

name
string

Product name.

metadata
object

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.

price
number

Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| sku
`object` |

An object containing details of the related SKU.

AttributesDescription
id
string

A unique identifier that represents the SKU and is assigned by Voucherify.

source_id
string

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.

override
boolean

The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system.

sku
string

The SKU name.

price
number

SKU price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00).

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. It can be used to create product collections.

| +| object
`string` |

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)

| +| 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_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

| +| 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).

| +| 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.
AttributesDescription
details
object

Contains the detailed information about the transaction.

AttributesDescription
balanceSee: Voucher Balance
order
object

Contains information about the original order.

AttributesDescription
id
string

Unique order ID.

source_id
string

The merchant's order ID if it is different from the Voucherify order ID. It is really useful in case of integration between multiple systems. It can be an order ID from CRM, database or 3rd party service.

event
object

Contains information about the event that triggers the point accrual.

AttributesDescription
id
string

Unique event ID.

type
string

Type of event.

earning_rule
object

Contains information about the earning rule.

AttributesDescription
id
string

Unique identifier of an earning rule, assigned by Voucherify.

source
object

Contains the custom earning rule name.

AttributesDescription
banner
string

Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard.

segment
object

Contains information about the segment.

AttributesDescription
id
string

Unique identifier of the segment.

name
string

Name of the segment.

loyalty_tier
object

Contains information about the loyalty tier that is mapped for the earning rule and used in the transaction.

AttributesDescription
id
string

Unique identifier of the loyalty tier, assigned by Voucherify.

name
string

User-defined name of the loyalty tier.

redemption
object

Contains information about the original redemption.

AttributesDescription
id
string

Unique redemption ID.

rollback
object

Contains information about the redemption rollback.

AttributesDescription
id
string

Unique identifier of the redemption rollback.

custom_event
object

Contains information about the custom event that triggers the point accrual.

AttributesDescription
id
string

Unique identifier of the event.

type
string

Type of the custom event.

event_schema
object

Contains information about the custom event metadata schema.

AttributesDescription
id
string

Unique identifier of the metadata schema.

name
string

Type of the custom event.

holder_loyalty_tier
object

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 before the loyalty point balance changed.

AttributesDescription
id
string

Unique identifier of the loyalty tier, assigned by Voucherify.

name
string

User-defined name of the loyalty tier.

pending_pointsSee: Loyalty Pending Point Entry
reward
object

Contains information about the pay with points reward.

AttributesDescription
id
string

Unique reward ID.

name
string

Reward name.

source_voucher

Contains information on how the balance on the donor loyalty card was affected by the transaction.

Simple Voucher
destination_voucher

Contains information on how the balance on the receiving loyalty card was affected by the transaction.

Simple Voucher
typeOne of: Gift Card Transactions Type, Loyalty Card Transactions Type
+ +## Loyalty Pending Point Entry +| Attributes | Description | +|:-----|:--------| +| id
`string` |

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.

AttributesDescription
total_points
integer

Total number of points in the loyalty point bucket.

| +| status
`string` |

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.
AttributesDescription
result
string

Status of the publication attempt.

Available values: SUCCESS
voucherSee: List Publications Item Voucher
+ +## Validation Entity +| Attributes | Description | +|:-----|:--------| +| id
`string` |

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:
AttributesDescription
id
string

Unique identifier of the redeemable, assigned by Voucherify.

type
string

Type of the redeemable.

Available values: voucher, promotion_tier
| +| skipped_redeemables
`array` |

Lists validation results of each redeemable.

Array of:
AttributesDescription
id
string

Unique identifier of the redeemable, assigned by Voucherify.

type
string

Type of the redeemable.

Available values: voucher, promotion_tier
| +| inapplicable_redeemables
`array` |

Lists validation results of each redeemable.

Array of:
AttributesDescription
id
string

Unique identifier of the redeemable, assigned by Voucherify.

type
string

Type of the redeemable.

Available values: voucher, promotion_tier
| + +## Event Customer Redemption +| Attributes | Description | +|:-----|:--------| +| customer | See: [Simple Customer](#simple-customer) | +| order | See: [Simple Order](#simple-order) | +| campaign | See: [Simple Campaign](#simple-campaign) | +| voucher | See: [Simple Voucher](#simple-voucher) | +| holder | See: [Simple Customer](#simple-customer) | +| promotion_tier | See: [Simple Promotion Tier](#simple-promotion-tier) | +| promotion_stack | See: [Simple Promotion Stack](#simple-promotion-stack) | +| redemption | See: [Simple Redemption](#simple-redemption) | + +## Simple Redemption +| Attributes | Description | +|:-----|:--------| +| id
`string` |

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.

**Example:**

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.

**Example:**

customer_rules_violated

| +| failure_message
`string` |

If the result is FAILURE, this parameter will provide an expanded reason as to why the redemption failed.

| +| reason
`string` |

The reason for the redemption rollback.

| +| channel
`object` |

Defines the details of the channel through which the redemption was issued.

AttributesDescription
channel_id
string

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_type
string

The source of the channel for the redemption:
USER - the redemption was made in the Voucherify Dashboard by a user,
API - redemption was made through the API,
AUTO_REDEEM - the redemption was made automatically for a reward.

Available values: API, AUTO_REDEEM, USER
| +| object
`string` |

The type of the object represented by the JSON. This object stores information about the redemption.

| + +## Event Customer Order +| Attributes | Description | +|:-----|:--------| +| customer | See: [Simple Customer](#simple-customer) | +| referrer | See: [Simple Customer](#simple-customer) | +| order | All of: 1. [Order Calculated No Customer Data](#order-calculated-no-customer-data) +2.
AttributesDescription
items
array

Array of items applied to the order. It can include up to 500 items.

Array of Order Item Calculated
| +| redemption | See: [Redemption Internal](#redemption-internal) | + +## Event Customer Reward Redemptions +| Attributes | Description | +|:-----|:--------| +| customer | See: [Simple Customer](#simple-customer) | +| holder | See: [Simple Customer](#simple-customer) | +| voucher | See: [Simple Voucher](#simple-voucher) | +| campaign | See: [Simple Campaign](#simple-campaign) | +| reward_redemption
`object` | | +| reward | See: [Simple Redemption Reward Result](#simple-redemption-reward-result) | +| reward_assignment | See: [Reward Assignment](#reward-assignment) | +| source
`string` | | +| balance
`integer` | | + +## Event Customer Loyalty Tier Base +| Attributes | Description | +|:-----|:--------| +| customer | See: [Simple Customer](#simple-customer) | +| campaign | See: [Simple Campaign](#simple-campaign) | + +## Redeemable Holder +| Attributes | Description | +|:-----|:--------| +| id
`string` |

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.

AttributesDescription
[propertyName]
object

Contains details about the point balances left on loyalty cards and the number of referred customers in each campaign.

AttributesDescription
points
integer

Remaining point balance in campaign.

loyalty_tier
string

Customer's loyalty tier within the campaign.

Example:

ltr_UJ5Q54Q0OvEhua87Qfv2Ki5x

referred_customers
integer

Number of customers referred by the customer in campaign.

| + +## Customer Referrals +| Attributes | Description | +|:-----|:--------| +| total
`integer` |

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:

Customer Referrals Campaigns Item

AttributesDescription
campaign_id
string

Unique campaign ID, assigned by Voucherify.

Example:

camp_rRsfatlwN7unSeUIJDCYedal

referrer_id
string

Unique referrer ID, assigned by Voucherify. This is the customer ID of a customer that is referring this customer.

Example:

cust_sehkNIi8Uq2qQuRqSr7xn4Zi

related_object_id
string

Related object id

Example:

r_0b9d4cc4aa164dd073

related_object_type
string

Related object type, i.e. redemption.

date
string

Timestamp representing the date and time when the customer was referred in ISO 8601 format.

Example:

2022-08-30T10:19:39.196Z

| + +## Customer Base +| Attributes | Description | +|:-----|:--------| +| name
`string` |

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.

AttributesDescription
city
string

City

state
string

State

line_1
string

First line of address.

line_2
string

Second line of address.

country
string

Country.

postal_code
string

Postal code.

| +| 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.

| + +## 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.

AttributesDescription
quantity
integer, null

How many times a voucher can be redeemed. A null value means unlimited.

redeemed_quantity
integer

How many times a voucher has already been redeemed.

Example:

1

| +| code_config | [Code Config](#code-config) | + +## 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.

AttributesDescription
id
string

Unique custom event ID.

Example:

ms_Ll9enAm2BCN0M1s4VxWobLFM

name
string

Custom event name.

| +| referee_reward
`object` |

Defines the referee reward.

AttributesDescription
related_object_parent
object

Details of the resource from which the reward originates.

AttributesDescription
id
string

Unique ID of the reward source.

Example:

camp_kdxp3vf1clQ9CFs1jpqv3tZe

name
string

Name of the reward source.

object
string

Type of resource represented by the source of the reward.

Available values: CAMPAIGN
type
string

Type of reward.

Available values: LOYALTY_CARD, GIFT_VOUCHER
amount
string

Define the number of points to add to a loyalty card or credits to the balance on a gift card. In case of the gift card, the value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000.

| + +## 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

| + +## 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.

| +| subtracted_amount
`integer` |

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.

| +| effect
`string` |

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.

| +| next_expiration_date
`string` |

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.

AttributesDescription
campaign
object

Defines the product redeemed as a reward.

AttributesDescription
id
string

Campaign unique ID.

Example:

camp_13BbZ0kQsNinhqsX3wUts2UP

balance
integer

Points available for reward redemption. This is calculated as follows: balance = points - expired_points - subtracted_points - redemption.redeemed_points.

type
string

Defines the type of the campaign.

product
object

Defines the product redeemed as a reward.

AttributesDescription
id
string

Unique product ID, assigned by Voucherify.

Example:

prod_0b7d7dfb05cbe5c616

sku_id
string

Unique identifier of the SKU. It is assigned by Voucherify.

Example:

sku_0a41e31c7b41c28358

coin
object

Defines the ratio by mapping the number of loyalty points in points_ratio to a predefined cash amount in exchange_ratio.

AttributesDescription
exchange_ratio
integer

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.

| +| 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` | + +## Voucher +

This is an object representing a voucher with categories and validation rules assignments.

+ +All of: + +1. [Voucher Base](#voucher-base) +2.
AttributesDescription
categories
array

Contains details about the category.

Array of Category
validation_rules_assignmentsSee: Validation Rules Assignments List
+ +## Voucher Holder +| Attributes | Description | +|:-----|:--------| +| holder | See: [Simple Customer](#simple-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.

AttributesDescription
discountSee: Discount
| +| metadata
`object` |

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.

AttributesDescription
id
string

Unique campaign ID.

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-22T00: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_timeframeSee: Validity Timeframe
validity_day_of_weekSee: Validity Day Of Week
validity_hoursSee: Validity Hours
active
boolean

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 start_date and expiration_date using the Disable Campaign endpoint.

  • true indicates an active campaign
  • false indicates an inactive campaign
category_id
string

Unique category ID that this campaign belongs to.

Example:

cat_0b688929a2476386a6

object
string

The type of the object represented by the campaign object. This object stores information about the campaign.

| +| campaign_id
`string` |

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.

| +| start_date
`string` |

Activation 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.

AttributesDescription
redemptions
object

Contains statistics about promotion tier redemptions.

AttributesDescription
total_redeemed
integer

Number of times the promotion tier was redeemed.

orders
object

Contains statistics about orders related to the promotion tier.

AttributesDescription
total_amount
integer

Sum of order totals.

total_discount_amount
integer

Sum of total discount applied using the promotion tier.

| +| object
`string` |

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.

AttributesDescription
[propertyName]See: MappingPoints
| +| rewards
`object` |

Contains a list of reward IDs and their points mapping for the given reward.

AttributesDescription
[propertyName]See: MappingPoints
| +| points
`object` |

Defines range of loyalty tier in points.

AttributesDescription
from
integer

Bottom points threshold value.

to
integer

Top points threshold value.

| + +## Loyalty Tier Expiration +| Attributes | Description | +|:-----|:--------| +| customer_id
`string` |

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.

AttributesDescription
schema_id
string

Unique identifier of the custom event schema

| +| segment
`object` |

Contains the ID of a customer segment. Required for the customer.segment.entered option in the event.

AttributesDescription
id
string

Contains a unique identifier of a customer segment. Assigned by the Voucherify API.

| +| loyalty_tier
`object` |

Defines the tier associated with the earning rule definition.

AttributesDescription
id
string

Unique loyalty tier ID associated with the earning rule.

  • ANY: any loyalty tier within the campaign
Example:

ltr_pudTGWasuIqxdiDM0go31OV1

| +| pending_points
`object` |

Defines the configuration for pending points. Pending points can be used only with the order.paid event.

AttributesDescription
period_type
string

Defines the type of the period during which the points are in the pending state. Currently, only DAY value is accepted.

Available values: DAY
period_value
integer

Defines for how long the points are in the pending state. The minimum value is 1, maximum is 90.

| +| source
`object` |

Contains the custom earning rule name and parent campaign.

AttributesDescription
banner
string

Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard.

object_id
string

A unique campaign identifier assigned by the Voucherify API.

object_type
string

Defines the object associated with the earning rule. Defaults to campaign.

Available values: campaign
| +| object
`string` |

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.

Available values: `order_item` | +| 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.

| +| related_object
`string` |

Used along with the source_id property, can be set to either SKU or product.

Available values: `product`, `sku` | +| product_id
`string` |

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.

| +| subtotal_amount
`integer` |

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

| + +## Gift Card Transactions Type +

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.

AttributesDescription
id
string

Unique identifier of the loyalty tier, assigned by Voucherify.

name
string

User-defined name of the loyalty tier.

| +| holder_loyalty_tier
`object` |

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.

AttributesDescription
id
string

Unique identifier of the loyalty tier, assigned by Voucherify.

name
string

User-defined name of the loyalty tier.

| +| event
`object` |

Details about the event that created pending points.

AttributesDescription
id
string

Unique event identifier, assigned by Voucherify.

type
string

Type of the event that triggered the creation of pending points.

Available values: customer.order.paid
group_id
string

Unique identifier of the request that triggered the event, assigned by Voucherify.

entity_id
string

Unique identifier of the entity that triggered the event, assigned by Voucherify. For pending points, it is the customer_id of the customer who paid for the order.

created_at
string

Timestamp representing the date and time when the event occurred. The value is shown in the ISO 8601 format.

category
string

Type of the event.

Available values: ACTION, EFFECT
event_sourceSee: Event Source
| +| earning_rule
`object` |

Contains information about the earning rule.

AttributesDescription
id
string

Unique identifier of an earning rule, assigned by Voucherify.

source
object

Contains the custom earning rule name.

AttributesDescription
banner
string

Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard.

| +| order
`object` |

Details about the order that caused adding pending points.

AttributesDescription
id
string

Unique order identifier, assigned by Voucherify.

source_id
string, null

User-defined order identifier.

| + +## List Publications Item Base +| Attributes | Description | +|:-----|:--------| +| id
`string` |

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.

Available values: `publication` | +| created_at
`string` |

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.

| +| metadata
`object` |

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.

AttributesDescription
source_type
string

Defines the type of the distribution source.

source_id
string

Unique identifier of the distribution source.

distribution_id
string

Unique identifier of the distribution.

| +| channel
`string` |

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.

| + +## Simple Promotion Tier +| Attributes | Description | +|:-----|:--------| +| id
`string` |

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.

AttributesDescription
id
string

Unique campaign ID.

| +| metadata
`object` |

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.

AttributesDescription
id
string

Unique identifier of the campaign.

| +| tiers
`object` |

Contains the tier configuration. A promotion stack can include up to 30 tiers.

AttributesDescription
ids
array

Contains the list of tiers in a pre-defined sequence.

hierarchy_mode
string
Available values: MANUAL
| + +## Reward Assignment +All of: + +1. [Reward Assignment Base](#reward-assignment-base) +2. [Digital or Material Reward - Parameters](#digital-or-material-reward---parameters) + +## 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.

AttributesDescription
redeemed_amount
integer

Total amount of gift card credits redeemed by customer. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents for $100.00.

amount_to_go
integer

Remaining gift card balance across all gift cards. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents for $100.00.

| +| loyalty_card
`object` |

Summary of loyalty points.

AttributesDescription
redeemed_points
integer

Total number of loyalty points redeemed by the customer.

points_to_go
integer

Sum of remaining available point balance across all loyalty cards.

| + +## Customer Summary Orders +| Attributes | Description | +|:-----|:--------| +| total_amount
`integer` |

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_count
`integer` |

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.

| +| last_order_amount
`integer` |

Amount spent on last order. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents for $100.00.

| +| last_order_date
`string` |

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.

AttributesDescription
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.

Available values: FIXED_DAY_OF_YEAR, MONTH
period_value
integer

Value of the period. Required for the period_type: MONTH.

rounding_type
string

Type of rounding of the expiration period. Optional for the period_type: MONTH.

Available values: END_OF_MONTH, END_OF_QUARTER, END_OF_HALF_YEAR, END_OF_YEAR, PARTICULAR_MONTH
rounding_value
integer

Value of rounding of the expiration period. Required for the rounding_type.

fixed_month
integer

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.

fixed_day
integer

Determines the day of the month when the points expire. Required for the period_type: FIXED_DAY_OF_YEAR.

| + +## Code Config +| Attributes | Description | +|:-----|:--------| +| length
`number` |

Number of characters in a generated code (excluding prefix and postfix).

| +| charset
`string` |

Characters that can appear in the code.

Examples:

| +| prefix
`string` |

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.

| +| initial_count
`integer` |

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.

| +| fixed_amount_formula
`string` | | +| effect |

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.
AttributesDescription
skusSee: Skus List For 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.

| +| currency
`string`, `null` |

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.

Available values: `sku` | + +## 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.

AttributesDescription
amount
integer

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.

Example:

10000

subtracted_amount
integer

Total amount of subtracted credits over the gift card lifetime. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents for $100.00.

balance
integer

Available funds. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents for $100.00.

Example:

500

effect
string

Defines how the credits are applied to the customer's order.

Available values: APPLY_TO_ORDER, APPLY_TO_ITEMS
| +| loyalty_card
`object` |

Object representing loyalty card parameters. Child attributes are present only if type is LOYALTY_CARD. Defaults to null.

AttributesDescription
points
integer

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.

Example:

6970

next_expiration_date
string

The next closest date when the next set of points are due to expire.

Example:

2023-05-30

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.

| +| start_date
`string` |

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.

| +| additional_info
`string` |

An 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.

| +| created_at
`string` |

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.

| +| publish
`object` |

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.

AttributesDescription
object
string

The type of the object represented is by default list. To get this list, you need to make a call to the endpoint returned in the url attribute.

count
integer

Publication events counter.

Example:

0

url
string

The endpoint where this list of publications can be accessed using a GET method. /v1/vouchers/{voucher_code}/publications

Example:

/v1/vouchers/WVPblOYX/publications?page=1&limit=10

| +| redemption
`object` |

Stores a summary of redemptions that have been applied to the voucher.

AttributesDescription
quantity
integer

How many times a voucher can be redeemed. A null value means unlimited.

redeemed_quantity
integer

How many times a voucher has already been redeemed.

Example:

1

redeemed_points
integer

Total loyalty points redeemed.

Example:

100000

object
string

The type of the object represented is by default list. To get this list, you need to make a call to the endpoint returned in the url attribute.

url
string

The endpoint where this list of redemptions can be accessed using a GET method. /v1/vouchers/{voucher_code}/redemptions

Example:

/v1/vouchers/WVPblOYX/redemptions?page=1&limit=10

| + +## 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.

| + +## 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.

**Example:**

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.

**Example:**

P2D

| + +## Validity Day Of Week +

Integer array corresponding to the particular days of the week in which the voucher is valid.

+ +## Validity Hours +| Attributes | Description | +|:-----|:--------| +| daily
`array` |

Defines the reccuring period(s) when the resource is active. The periods should not overlap.

Array of:
AttributesDescription
start_time
string

Defines the starting hour of validity in the HH:mm format. The resource is inactive before this time.

Example:

12:00

days_of_week
array

Integer array corresponding to the particular days of the week in which the resource is valid.

  • 0 Sunday
  • 1 Monday
  • 2 Tuesday
  • 3 Wednesday
  • 4 Thursday
  • 5 Friday
  • 6 Saturday
expiration_time
string

Defines the ending hour of validity in the HH:mm format. The resource is inactive after this time.

Example:

14:00

| + +## 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.

| + +## Digital +| Attributes | Description | +|:-----|:--------| +| campaign
`object` |

Objects stores information about the campaign related to the reward.

AttributesDescription
id
string

Unique campaign ID, assigned by Voucherify.

balance
integer

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.

type
string

Campaign type.

Available values: DISCOUNT_COUPONS, GIFT_VOUCHERS, LOYALTY_PROGRAM
| + +## Pay with Points +| Attributes | Description | +|:-----|:--------| +| coin
`object` |

Defines the ratio by mapping the number of loyalty points in points_ratio to a predefined cash amount in exchange_ratio.

AttributesDescription
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.

| + +## Material +| Attributes | Description | +|:-----|:--------| +| product
`object` |

Contains information about the product given as a reward.

AttributesDescription
id
string

Unique product ID, assigned by Voucherify.

Example:

prod_0b7d7dfb05cbe5c616

sku_id
string, null

Unique SKU ID, assigned by Voucherify, of the SKU given as a reward.

Example:

sku_0b7d7dfb090be5c619

| + +## MappingPoints +One of: + +[MappingMultiply](#mappingmultiply), [MappingFixed](#mappingfixed) + +## 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 + + +## 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.

Available values: `FIXED_DAY_OF_YEAR`, `MONTH` | +| period_value
`integer` |

Value of the period. Required for the period_type: MONTH.

| +| rounding_type
`string` |

Type of rounding of the expiration period. Optional for the period_type: MONTH.

Available values: `END_OF_MONTH`, `END_OF_QUARTER`, `END_OF_HALF_YEAR`, `END_OF_YEAR`, `PARTICULAR_MONTH` | +| rounding_value
`integer` |

Value of rounding of the expiration period. Required for the rounding_type.

| +| fixed_month
`integer` |

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.

| +| fixed_day
`integer` |

Determines the day of the month when the points expire. Required for the period_type: FIXED_DAY_OF_YEAR.

| + +## 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.

AttributesDescription
loyalty
object

Defines the equivalent points value of the reward.

AttributesDescription
points
integer

The number of points required to redeem the reward.

auto_redeem
boolean, null

Determines if the reward is redeemed automatically when the customer reaches the sufficient number of points to redeem it. Value true means that the automatic reward redemption is active. Only one reward can be set to be redeemed automatically in a loyalty campaign, i.e. only one can have the value true.

| + +## 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` + +## 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.

| +| attributes
`array` |

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.

| +| 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. 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.

AttributesDescription
id
string

Encrypted voucher code ID.

Example:

U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK+t4pp7U7oFzjGJzj9q/bmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg+BaZk5QwXMf8k/OzSlOEVybpwSq+AiqPoNtjeuqtIgkDyvT6Q==

url
string

URL to QR code

Optional: Attach query parameters to base URL to customize the image of the encrypted voucher code.

  • size: integer value from 1 to 100
  • format: string, either png (default) or svg
Example:

https://dev.dl.voucherify.io/api/v1/assets/qr/U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK%2Bt4pp7U7oFzjGJzj9q%2FbmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg%2BBaZk5QwXMf8k%2FOzSlOEVybpwSq%2BAiqPoNtjeuqtIgkDyvT6Q%3D%3D

| +| barcode
`object` |

Stores barcode representation of encrypted code.

AttributesDescription
id
string

Encrypted voucher code ID.

Example:

U2FsdGVkX19eJhGfWwUrH9+tulBkON+AnMktic+N6CVWzZ9+fHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ+kJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6/pFs61apEn9SJx32ttCF6d3oxKISQQ==

url
string

URL to barcode

Optional: Attach query parameters to base URL to customize the image of the encrypted voucher code.

  • size: integer value from 1 to 100
  • format: string, either png (default) or svg
Example:

https://dev.dl.voucherify.io/api/v1/assets/barcode/U2FsdGVkX19eJhGfWwUrH9%2BtulBkON%2BAnMktic%2BN6CVWzZ9%2BfHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ%2BkJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6%2FpFs61apEn9SJx32ttCF6d3oxKISQQ%3D%3D

| + +## 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

| + +## 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` |
AttributesDescription
metadata
object

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.

AttributesDescription
every
integer

For how many increments of the customer metadata property to grant points for.

points
integer

Number of points to be awarded, i.e. how many points to be added to the loyalty card.

property
string

Customer metadata property.

| + +## Earning Rule Proportional Custom Event +| 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` |

CUSTOM_EVENT_METADATA: Custom event metadata (X points for every Y in metadata attribute).

Available values: `CUSTOM_EVENT_METADATA` | +| custom_event
`object` |
AttributesDescription
metadata
object

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.

AttributesDescription
every
integer

For how many increments of the customer metadata property to grant points for.

points
integer

Number of points to be awarded, i.e. how many points to be added to the loyalty card.

property
string

Custom event metadata property.

| + +## Order Amount +| 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` |

ORDER_AMOUNT: Pre-discount order amount (X points for every Y spent excluding discounts)

Available values: `ORDER_AMOUNT` | +| order
`object` |
AttributesDescription
amount
object

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.

AttributesDescription
every
integer

Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 order amount is written as 1000.

points
integer

Number of points to be awarded, i.e. how many points to be added to the loyalty card.

| + +## Order Total Amount +| 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` |

ORDER_TOTAL_AMOUNT: Total order amount (X points for every Y spent including discount)

Available values: `ORDER_TOTAL_AMOUNT` | +| order
`object` |
AttributesDescription
total_amount
object

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.

AttributesDescription
every
integer

Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 order amount is written as 1000.

points
integer

Number of points to be awarded, i.e. how many points to be added to the loyalty card.

| + +## Order 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` |

ORDER_METADATA: Order Metadata (X points for every Y in metadata attribute, defined in the property key under the order.metadata object)

Available values: `ORDER_METADATA` | +| order
`object` |

Defines the formula for calculating points proportionally.

AttributesDescription
metadata
object

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.

AttributesDescription
every
integer

For how many increments of the order metadata property to grant points for.

points
integer

Number of points to be awarded, i.e. how many points to be added to the loyalty card.

property
string

Order metadata property.

| + +## Order Items Quantity +| 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` |

ORDER_ITEMS_QUANTITY: Quantity of items defined in order_items.quantity.object & .id (X points for every Y items excluding free items)

Available values: `ORDER_ITEMS_QUANTITY` | +| order_items
`object` |
AttributesDescription
quantity
object

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.

AttributesDescription
every
integer

Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 order amount is written as 1000.

points
integer

Number of points to be awarded, i.e. how many points to be added to the loyalty card.

object
string

Type of object taken under consideration.

Available values: products_collection, product, sku
id
string

Unique ID of the resource, i.e. pc_75U0dHlr7u75BJodrW1AE3t6, prod_0bae32322150fd0546, or sku_0b7d7dfb090be5c619.

| + +## Order Items Amount +| 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` |

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` |
AttributesDescription
amount
object

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.

AttributesDescription
every
integer

Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 order amount is written as 1000.

points
integer

Number of points to be awarded, i.e. how many points to be added to the loyalty card.

object
string

Type of object taken under consideration.

Available values: products_collection, product, sku
id
string

Unique ID of the resource, i.e. pc_75U0dHlr7u75BJodrW1AE3t6, prod_0bae32322150fd0546, or sku_0b7d7dfb090be5c619.

| + +## Order Items Subtotal Amount +| 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` |

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` |
AttributesDescription
subtotal_amount
object

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.

AttributesDescription
every
integer

Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 order amount is written as 1000.

points
integer

Number of points to be awarded, i.e. how many points to be added to the loyalty card.

object
string

Type of object taken under consideration.

Available values: products_collection, product, sku
id
string

Unique ID of the resource, i.e. pc_75U0dHlr7u75BJodrW1AE3t6, prod_0bae32322150fd0546, or sku_0b7d7dfb090be5c619.

| + +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/CUSTOMERS-Customer-Object.md b/reference-docs/CUSTOMERS-Customer-Object.md new file mode 100644 index 00000000..f88e2075 --- /dev/null +++ b/reference-docs/CUSTOMERS-Customer-Object.md @@ -0,0 +1,73 @@ +--- +title: Customer Object +type: basic +categorySlug: voucherify-api +parentDocSlug: customers +slug: customer-object +hidden: false +order: 10 +--- + +## Customer With Summary Loyalty Referrals +All of: + +1.

Customer Response Data

AttributesDescription
id
string

The ID of an existing customer that will be linked to redemption in this request.

source_id
string

A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored.

summaryCustomer Summary
loyaltyCustomer Loyalty
referralsCustomer Referrals
system_metadata
object

Object used to store system metadata information.

created_at
string

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

Example:

2022-08-30T06:32:07.380Z

updated_at
string

Timestamp representing the date and time when the customer was updated. The value is shown in the ISO 8601 format.

Example:

2022-08-31T06:32:07.380Z

assets
object

Contains information about the customer's cockpit.

AttributesDescription
cockpit_url
string

Customer's cockpit URL address.

object
string

The type of the object represented by JSON.

Available values: customer
+2. [Customer Base](#customer-base) + +## 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.

AttributesDescription
[propertyName]
object

Contains details about the point balances left on loyalty cards and the number of referred customers in each campaign.

AttributesDescription
points
integer

Remaining point balance in campaign.

loyalty_tier
string

Customer's loyalty tier within the campaign.

Example:

ltr_UJ5Q54Q0OvEhua87Qfv2Ki5x

referred_customers
integer

Number of customers referred by the customer in campaign.

| + +## Customer Referrals +| Attributes | Description | +|:-----|:--------| +| total
`integer` |

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:

Customer Referrals Campaigns Item

AttributesDescription
campaign_id
string

Unique campaign ID, assigned by Voucherify.

Example:

camp_rRsfatlwN7unSeUIJDCYedal

referrer_id
string

Unique referrer ID, assigned by Voucherify. This is the customer ID of a customer that is referring this customer.

Example:

cust_sehkNIi8Uq2qQuRqSr7xn4Zi

related_object_id
string

Related object id

Example:

r_0b9d4cc4aa164dd073

related_object_type
string

Related object type, i.e. redemption.

date
string

Timestamp representing the date and time when the customer was referred in ISO 8601 format.

Example:

2022-08-30T10:19:39.196Z

| + +## Customer Base +| Attributes | Description | +|:-----|:--------| +| name
`string` |

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.

AttributesDescription
city
string

City

state
string

State

line_1
string

First line of address.

line_2
string

Second line of address.

country
string

Country.

postal_code
string

Postal code.

| +| 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.

| + +## 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.

AttributesDescription
redeemed_amount
integer

Total amount of gift card credits redeemed by customer. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents for $100.00.

amount_to_go
integer

Remaining gift card balance across all gift cards. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents for $100.00.

| +| loyalty_card
`object` |

Summary of loyalty points.

AttributesDescription
redeemed_points
integer

Total number of loyalty points redeemed by the customer.

points_to_go
integer

Sum of remaining available point balance across all loyalty cards.

| + +## Customer Summary Orders +| Attributes | Description | +|:-----|:--------| +| total_amount
`integer` |

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_count
`integer` |

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.

| +| last_order_amount
`integer` |

Amount spent on last order. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents for $100.00.

| +| last_order_date
`string` |

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.

AttributesDescription
code
string

A code through which a new visitor has been referred to a service.

referrer_id
string

Unique ID of the referring person - it is optional and not required if the referral code is provided.

Example:

cust_Vzck5i8U3OhcEUFY6MKhN9Rv

| +| loyalty
`object` |

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.

AttributesDescription
code
string

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 event parameter of the request payload gets sent along with this loyalty card code.

Example:

L-CARD-BUHuH6g

| +| metadata
`object` |

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.

Customer Id And Source Id

AttributesDescription
id
string

The ID of an existing customer.

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.

+2. [Customer Base](#customer-base) + +## Customer Base +| Attributes | Description | +|:-----|:--------| +| name
`string` |

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.

AttributesDescription
city
string

City

state
string

State

line_1
string

First line of address.

line_2
string

Second line of address.

country
string

Country.

postal_code
string

Postal code.

| +| 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.

| + +[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.

AttributesDescription
url
string

URL of the CSV file location. It contains the token used for authorization in the Download export method.

| +| user_id
`string`, `null` |

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` |
AttributesDescription
order

How the export is filtered, where the dash - preceding a sorting option means sorting in a descending order.

Export Voucher Order
fields
array

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
| + +## Export Redemptions +| Attributes | Description | +|:-----|:--------| +| exported_object
`string` |

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.

AttributesDescription
order

How the export is filtered, where the dash - preceding a sorting option means sorting in a descending order.

Export Redemption Order
fields
array

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
| + +## Export Customers +| Attributes | Description | +|:-----|:--------| +| exported_object
`string` |

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.

AttributesDescription
order

How the export is filtered, where the dash - preceding a sorting option means sorting in a descending order.

Export Customer Order
fields
array

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
| + +## Export Publications +| Attributes | Description | +|:-----|:--------| +| exported_object
`string` |

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.

AttributesDescription
order

How the export is filtered, where the dash - preceding a sorting option means sorting in a descending order.

Export Publication Order
fields
array

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
| + +## Export Orders +| Attributes | Description | +|:-----|:--------| +| exported_object
`string` |

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.

AttributesDescription
order

How the export is filtered, where the dash - preceding a sorting option means sorting in a descending order.

Export Order Order
fields
array

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
| + +## Export Points Expirations +| Attributes | Description | +|:-----|:--------| +| exported_object
`string` |

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.

AttributesDescription
order

How the export is filtered, where the dash - preceding a sorting option means sorting in a descending order.

Export Points Expiration Order
fields
array

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
| + +## Export Vouchers Transactions +| Attributes | Description | +|:-----|:--------| +| exported_object
`string` |

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.

AttributesDescription
order

How the export is filtered, where the dash - preceding a sorting option means sorting in a descending order.

Export Voucher Transactions Order
fields
array

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
| + +## Export Voucher Order +Available values: `-created_at`, `created_at`, `-updated_at`, `updated_at`, `-code`, `code` + +## Export Voucher Fields +Available values: `code`, `voucher_type`, `value`, `formula`, `discount_type`, `campaign`, `category`, `start_date`, `expiration_date`, `gift_balance`, `loyalty_balance`, `redemption_quantity`, `redemption_count`, `active`, `qr_code`, `bar_code`, `metadata`, `id`, `is_referral_code`, `created_at`, `updated_at`, `validity_timeframe_interval`, `validity_timeframe_duration`, `validity_day_of_week`, `discount_amount_limit`, `campaign_id`, `additional_info`, `customer_id`, `discount_effect`, `discount_unit_type`, `discount_unit_effect`, `validation_rules_id`, `customer_source_id` + +## Export Voucher Filters +| Attributes | Description | +|:-----|:--------| +| junction |

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` |
AttributesDescription
conditions
object

Filters Condition

AttributesDescription
$afterSee: Any
$beforeSee: Any
| +| campaign
`object` |
AttributesDescription
conditions
object

Filters Condition

AttributesDescription
$isSee: Any
| +| customer
`object` |
AttributesDescription
conditions
object

Filters Condition

AttributesDescription
$isSee: Any
| +| voucher
`object` |
AttributesDescription
conditions
object

Filters Condition

AttributesDescription
$isSee: Any
| +| related_object
`object` |
AttributesDescription
conditions
object

Filters Condition

AttributesDescription
$inSee: Any
| +| voucher_code | See: [Field Conditions](#field-conditions) | +| related_object_id | See: [Field Conditions](#field-conditions) | +| related_object_parent_id | See: [Field Conditions](#field-conditions) | +| parent_redemption_id | See: [Field Conditions](#field-conditions) | +| failure_code | See: [Field Conditions](#field-conditions) | +| result | See: [Field Conditions](#field-conditions) | +| object | See: [Field Conditions](#field-conditions) | +| customer_id | See: [Field Conditions](#field-conditions) | +| campaign_name | See: [Field Conditions](#field-conditions) | +| user_login | See: [Field Conditions](#field-conditions) | +| status | See: [Field Conditions](#field-conditions) | +| [propertyName] | See: [Field Conditions](#field-conditions) | + +## Export Customer Order +Available values: `-name`, `name`, `-id`, `id`, `-email`, `email`, `-source_id`, `source_id`, `-created_at`, `created_at`, `-updated_at`, `updated_at` + +## Export Customer Fields +Available values: `name`, `id`, `description`, `email`, `source_id`, `created_at`, `address_city`, `address_state`, `address_line_1`, `address_line_2`, `address_country`, `address_postal_code`, `redemptions_total_redeemed`, `redemptions_total_failed`, `redemptions_total_succeeded`, `redemptions_total_rolled_back`, `redemptions_total_rollback_failed`, `redemptions_total_rollback_succeeded`, `orders_total_amount`, `orders_total_count`, `orders_average_amount`, `orders_last_order_amount`, `orders_last_order_date`, `loyalty_points`, `loyalty_referred_customers`, `updated_at`, `phone`, `birthday`, `metadata`, `birthdate` + +## Export Customer Filters +| Attributes | Description | +|:-----|:--------| +| junction | See: [Junction](#junction) | +| created_at
`object` |
AttributesDescription
conditions
object

Filters Condition

AttributesDescription
$afterSee: Any
$beforeSee: Any
| +| updated_at
`object` |
AttributesDescription
conditions
object

Filters Condition

AttributesDescription
$after
array
$before
array
$is
array
| +| email | See: [Field Conditions](#field-conditions) | +| name | See: [Field Conditions](#field-conditions) | +| city
`object` |
AttributesDescription
conditions
object

Filters Condition

AttributesDescription
$isSee: Any
| +| phone | See: [Field Conditions](#field-conditions) | +| birthday | See: [Field Conditions](#field-conditions) | +| source_id | See: [Field Conditions](#field-conditions) | +| publications.created_at | See: [Field Conditions](#field-conditions) | +| publications.related_object_id | See: [Field Conditions](#field-conditions) | +| [propertyName] | See: [Field Conditions](#field-conditions) | + +## Export Publication Order +Available values: `-id`, `id`, `-voucher_code`, `voucher_code`, `-tracking_id`, `tracking_id`, `-customer_id`, `customer_id`, `-created_at`, `created_at`, `-channel`, `channel` + +## Export Publication Fields +Available values: `voucher_code`, `customer_id`, `customer_source_id`, `date`, `channel`, `campaign`, `is_winner`, `metadata` + +## Export Publication Filters +| Attributes | Description | +|:-----|:--------| +| junction | See: [Junction](#junction) | +| created_at
`object` |
AttributesDescription
conditions
object

Filters Condition

AttributesDescription
$afterSee: Any
$beforeSee: Any
| +| campaign
`object` |
AttributesDescription
conditions
object

Filters Condition

AttributesDescription
$isSee: Any
| +| customer
`object` |
AttributesDescription
conditions
object

Filters Condition

AttributesDescription
$isSee: Any
| +| voucher
`object` |
AttributesDescription
conditions
object

Filters Condition

AttributesDescription
$isSee: Any
| +| failure_code | See: [Field Conditions](#field-conditions) | +| result | See: [Field Conditions](#field-conditions) | +| customer_id | See: [Field Conditions](#field-conditions) | +| campaign_name | See: [Field Conditions](#field-conditions) | +| voucher_type | See: [Field Conditions](#field-conditions) | +| is_referral_code | See: [Field Conditions](#field-conditions) | +| parent_object_id | See: [Field Conditions](#field-conditions) | +| related_object_id | See: [Field Conditions](#field-conditions) | +| source_id | See: [Field Conditions](#field-conditions) | +| [propertyName] | See: [Field Conditions](#field-conditions) | + +## Export Order Order +Available values: `-created_at`, `created_at`, `-updated_at`, `updated_at`, `-status`, `status` + +## Export Order Fields +Available values: `id`, `source_id`, `created_at`, `updated_at`, `status`, `amount`, `discount_amount`, `items_discount_amount`, `total_discount_amount`, `total_amount`, `customer_id`, `referrer_id`, `metadata` + +## Export Order Filters +| Attributes | Description | +|:-----|:--------| +| junction | See: [Junction](#junction) | +| created_at
`object` |
AttributesDescription
conditions
object

Filters Condition

AttributesDescription
$afterSee: Any
$beforeSee: Any
| +| updated_at
`object` |
AttributesDescription
conditions
object

Filters Condition

AttributesDescription
$afterSee: Any
$beforeSee: Any
| +| status | See: [Field Conditions](#field-conditions) | +| source_id | See: [Field Conditions](#field-conditions) | +| amount | See: [Field Conditions](#field-conditions) | +| total_amount | See: [Field Conditions](#field-conditions) | +| discount_amount | See: [Field Conditions](#field-conditions) | +| total_discount_amount | See: [Field Conditions](#field-conditions) | +| items_discount_amount | See: [Field Conditions](#field-conditions) | +| [propertyName] | See: [Field Conditions](#field-conditions) | + +## Export Points Expiration Order +Available values: `-expires_at`, `expires_at` + +## Export Points Expiration Fields +Available values: `id`, `campaign_id`, `voucher_id`, `points`, `status`, `expires_at` + +## Export Points Expiration Filters +| Attributes | Description | +|:-----|:--------| +| junction | See: [Junction](#junction) | +| campaign_id | See: [Field Conditions](#field-conditions) | +| voucher_id | See: [Field Conditions](#field-conditions) | + +## Export Voucher Transactions Order +Available values: `-created_at`, `created_at` + +## Export Voucher Transactions Fields +Available values: `id`, `campaign_id`, `voucher_id`, `type`, `source_id`, `reason`, `source`, `balance`, `amount`, `related_transaction_id`, `created_at`, `details` + +## Export Voucher Transactions Filters +| Attributes | Description | +|:-----|:--------| +| junction | See: [Junction](#junction) | +| created_at | See: [Field Conditions](#field-conditions) | +| voucher_id | See: [Field Conditions](#field-conditions) | +| campaign_id | See: [Field Conditions](#field-conditions) | + +## 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.

+ +Available values: `and`, `or` + +## Field Conditions +| Attributes | Description | +|:-----|:--------| +| conditions |

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.

The value is a dictionary with the following options: `before`, `after`. A date value must be presented in ISO 8601 format (`2016-11-16T14:14:31Z` or `2016-11-16`).

_Examples:_

- `[created_at][before]=2017-09-08T13:52:18.227Z`
- `[created_at][after]=2017-09-08` | + +## Paging the results + +Some of the list API methods use the `page` query parameter to display another page of results. + +However, the following list API methods use the `starting_after_id` query parameter: +- [List customer activity](ref:list-customer-activity) +- [List member activity](ref:list-member-activity) +- [List member activity (with campaign ID)](ref:list-member-activity-1) +- [List campaign transactions](ref:list-campaign-transactions) +- [List voucher transactions](ref:list-voucher-transactions) +- [List loyalty campaign transactions](ref:list-loyalty-campaign-transactions) +- [List loyalty card transactions](ref:list-loyalty-card-transactions) +- [List loyalty card transactions (with campaign ID)](ref:list-loyalty-card-transactions-1) +- [List customer redeemables](ref:list-customer-redeemables) +- [List referral code holders](ref:referrals-code-holders-1) +- [List referral code holders (with campaign ID)](ref:referrals-code-holders-1) +- [List bin entries](ref:list-bin-entries) +- [List campaign templates](ref:list-campaign-templates) +- [Management – List campaign templates](ref:management-list-campaign-templates) + +The response to these methods may include a `more_starting_after` key that takes a string value with an ID. Use this ID with the `starting_after_id` query parameter to display another page of results. + +## Response format + +The listing method returns a dictionary with a data property that contains an array of resources. The maximum number of resources returned is determined by the `limit` query parameter. If no more resources are available, the resulting array on a given page will be empty. The result can be narrowed down according to the specified (or default) filters. + +| **Property name** | **Description** | +| :-------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `object` | A string describing the object type returned. | +| `data_ref` | The value for this property indicates the property name containing the results array. | +| `data` | An array that contains objects for a given list endpoint. In older methods, this is replaced by the name of the respective resource, e.g. `publications`. | +| `total` | Total number of records for given filtering query. In some methods, this field is absent. | +| `has_more` | It indicates that there are more results to be returned for given filter parameters. | +| `more_starting_after` | Present in some of the newer endpoints; it provides an ID that can be used with a `starting_after_id` query parameter to return another page of results. | + + +```json Old Method Example Response +{ + "object": "list", + "total": 1, + "data_ref": "vouchers", + "vouchers": [ + { + "id": "v_yY3smFaWii1iy3EvtaiJJpZqQxoS9rJn", + "code": "2018-Heq-mK-2w1", + "campaign": "Benefit", + "campaign_id": "camp_FzQCVyac6jAAEephT0i2L14F", + "type": "DISCOUNT_VOUCHER", + "discount": { + "type": "AMOUNT", + "amount_off": 1000 + }, + "start_date": "2018-09-03T22:00:00.000Z", + "validity_timeframe": { + "interval": "P1D", + "duration": "PT1H" + }, + "validity_day_of_week": [ + 2, + 3 + ], + "publish": { + "object": "list", + "count": 1, + "url": "/v1/vouchers/2018-Heq-mK-2w1/publications?page=1&limit=10" + }, + "redemption": { + "object": "list", + "quantity": 5, + "redeemed_quantity": 0, + "url": "/v1/vouchers/2018-Heq-mK-2w1/redemptions?page=1&limit=10" + }, + "active": false, + "assets": { + "qr": { + "id": "U2FsdGVkX1+oNqKQ08m2y1IWJemXXWI7RpgBrrNvmBiQbxe/4XBlAudagPJWbdtDI3S5biYSdslhXIwPyRCx0eUhUqnQmngmBadWq8xX3HeGSjUxMu2/yF9PAc3izKU0MUJ2oXJpjZ/oieEHtIElEA==", + "url": "{{voucherify_internal_URL}}" + }, + "barcode": { + "id": "U2FsdGVkX1+anixbnFov/mzPXUmqQp6YDR++HLW2m0WxQBc4t1wbBSKHqP8cAa63CUQE8IdyZEIZIku0RwAQiYflEAq6upaJ5CHiB3LUOh0EsdtnzUCB21EBkaNCs3PKNvFdDwG5UQzqIjN0u5MOGA==", + "url": "{{voucherify_internal_URL}}" + } + }, + "is_referral_code": false, + "created_at": "2018-09-04T14:58:25.000Z", + "updated_at": "2018-09-20T08:03:55Z", + "object": "voucher" + } + ] +} +``` +```json New Method Example Response +{ + "object": "list", + "data_ref": "data", + "data": [ + { + "id": "rh_0f35d7ba9300a8e8e4", + "created_at": "2024-08-14T10:29:19.542Z", + "redeemable_id": "v_YdDGS5yBnLCp79vfPbHhkoRrqPwkgyiy", + "redeemable_object": "voucher", + "campaign_id": "camp_vVk4unz3k4gA023fk9XoSiTh", + "campaign_type": "REFERRAL_PROGRAM", + "voucher_type": "DISCOUNT_VOUCHER", + "customer_id": "cust_K11DXLfeJIZz7LZpxgiLhZpX", + "holder_role": "REFEREE", + "object": "redeemable_holder", + "metadata": { + "influencer_code": true + } + }, + { + "id": "rh_0f35d7ba9300a8e8e3", + "created_at": "2024-08-14T10:29:19.542Z", + "redeemable_id": "v_YdDGS5yBnLCp79vfPbHhkoRrqPwkgyiy", + "redeemable_object": "voucher", + "campaign_id": "camp_vVk4unz3k4gA023fk9XoSiTh", + "campaign_type": "REFERRAL_PROGRAM", + "voucher_type": "DISCOUNT_VOUCHER", + "customer_id": "cust_6P4K6p7PxEuK37sDtiLOii0A", + "holder_role": "REFEREE", + "object": "redeemable_holder", + "metadata": { + "influencer_code": false + } + } + ], + "total": 2, + "has_more": true, + "more_starting_after": "rh_0f35d7ba9300a8e8e3" +} +``` + +## Shortcuts + +List API methods offer a list of query parameters. These parameters allow you to filter the results. Each API resource enables a specific set of options which can be used for simplifying a query. If you need advanced options, read the [next section](#advanced-filters-for-fetching-resources). + +| Resource | **Shortcuts** | **Example** | +| :------------------------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | +| **Vouchers** | `customer`
`campaign`
`category` | `{api-url}/vouchers?customer=source_id` | +| **Redemptions** | `campaign_name`
`customer`
`voucher_code`
`related_object_id`
`related_object_parent_id` | `{api-url}/redemptions?customer=customer_id`

`{api-url}/redemptions?customer=source_id` | +| **Customers** | `email`
`name` | `{api-url}/customers?email=test@voucherify.io` | +| **Publications** | `campaign_name`
`customer_id`
`voucher_code`
`result`
`voucher_type`
`is_referral_code`
`parent_object_id`
`related_object_id` | `{api-url}/publications?campaign_name=TEST` | +| **Validation Rule Assignments** | `related_object_id`
`rule` | `{api-url}/validation-rules-assignments?related_object_id=promo_id` | + +## Advanced filters for fetching resources + +Moreover, API methods for fetching resources offer extended capabilities for filtering data. A user​ can build advanced queries by passing parameters that define search criteria. + +| **Resource** | **Examples** | +| :---------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **Vouchers** | `[filters][active][conditions][$active]=true`
`[filters][active][conditions][$expired]=true`
`[filters][active][conditions][$enabled]=true`
`[filters][active][conditions][$disabled]=true`
`[filters][redemption.redeemed_quantity][conditions][$is]=0`
`[filters][is_referral_code][conditions][$is]=true`
`[filters][expiration_date][conditions][$before]=2024-04-29T00:00:00.000Z`
`[filters][metadata.seq_number][conditions][$is]=1` | +| **Campaigns** | `[filters][metadata.seq_number][conditions][$is]=1`
`[filters][metadata.test][conditions][$is]=true` | +| **Products and Skus** | `[filters][updated_at][conditions][$after][0]=2020-08-20T14:17:09Z`
`[filters][updated_at][conditions][$before][0]=2020-08-20T14:17:09Z`
`[filters][created_at][conditions][$after][0]=2020-08-20T14:17:09Z`
`[filters][created_at][conditions][$before][0]=2020-08-20T14:17:09Z` | +| **List all promotion stacks** | `[created_at][before]=2021-12-30T13:52:18.227Z`
`[created_at][after]=2021-12-30T13:52:18.227Z`
`[filters][created_at][conditions][$before][0]=2021-12-30T13:52:18.227Z`
`[filters][created_at][conditions][$after][0]=2021-12-30T13:52:18.227Z`
`[updated_at][before]=2021-12-30T13:52:18.227Z`
`[updated_at][after]=2021-12-30T13:52:18.227Z`
`[filters][updated_at][conditions][$before][0]=2021-12-30T13:52:18.227Z`
`[filters][updated_at][conditions][$after][0]=2021-12-30T13:52:18.227Z` | + + \ No newline at end of file diff --git a/reference-docs/Introduction.mdx b/reference-docs/Introduction.mdx new file mode 100644 index 00000000..934675bc --- /dev/null +++ b/reference-docs/Introduction.mdx @@ -0,0 +1,22 @@ +--- +title: "Introduction" +description: "What is Voucherify API?" +--- + +The Voucherify API is organized around REST. Our API has predictable, resource-oriented URLs, and uses HTTP response codes to indicate API errors. We use built-in HTTP features, such as HTTP authentication and HTTP verbs, which are understood by off-the-shelf HTTP clients. + +We support cross-origin resource sharing, allowing you to interact securely with our API from a client-side web application (though you should never expose your secret API key in any public website's client-side code). + +JSON is returned by all API responses, including errors, although our API libraries convert responses to appropriate language-specific objects. + +To make the API as explorable as possible, this documentation has a test mode. You can test all methods at no cost. + +In general the API consists of 3 sets: + +* **Application API** - full capability, designed to be accessed from your server application +* **Client API** - limited capability, designed to be accessed from your website or mobile application +* **Management API** - endpoints designed to manage Voucherify projects within organization. Enterprise feature only – contact [Voucherify sales team](https://www.voucherify.io/contact-sales "Contact Voucherify Sales") for more details. + +> 📘 Your API keys +> +> Find out more about how to [authenticate your application](doc:authentication) to access the API. \ No newline at end of file diff --git a/reference-docs/LOCATIONS-Get-Location.md b/reference-docs/LOCATIONS-Get-Location.md new file mode 100644 index 00000000..513078be --- /dev/null +++ b/reference-docs/LOCATIONS-Get-Location.md @@ -0,0 +1,15 @@ +--- +title: Get Location +type: endpoint +categorySlug: voucherify-api +parentDocSlug: locations +slug: get-location +hidden: false +order: 3 +--- + +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOCATIONS-List-Locations.md b/reference-docs/LOCATIONS-List-Locations.md new file mode 100644 index 00000000..7bfaa162 --- /dev/null +++ b/reference-docs/LOCATIONS-List-Locations.md @@ -0,0 +1,15 @@ +--- +title: List Locations +type: endpoint +categorySlug: voucherify-api +parentDocSlug: locations +slug: list-locations +hidden: false +order: 2 +--- + +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOCATIONS-Location-Object.md b/reference-docs/LOCATIONS-Location-Object.md new file mode 100644 index 00000000..fdfd74d1 --- /dev/null +++ b/reference-docs/LOCATIONS-Location-Object.md @@ -0,0 +1,54 @@ +--- +title: Location Object +type: basic +categorySlug: voucherify-api +parentDocSlug: locations +slug: location-object +hidden: false +order: 1 +--- + +## Location object +| Attributes | Description | +|:-----|:--------| +| id
`string` |

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.

Available values: `location` | +| name
`string` |

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.

Available values: `circle` | +| format
`string` |

The location is defined in terms of a distance object.

Available values: `distance` | +| distance
`object` |

Defines the parameters for the circle.

Distance

AttributesDescription
center
string

Center of the circle identified by GPS coordinates in decimal degrees.

Example:

geo:40.79372699823857,-74.15092132694554

radius
string

Defines the radius of the circle.

| + +## Polygon +| Attributes | Description | +|:-----|:--------| +| type
`string` |

The type of shape being defined is a polygon.

Available values: `polygon` | +| format
`string` |

The location is defined in terms of a geojson object.

Available values: `geojson` | +| geojson | One of: [Geojson Polygon](#geojson-polygon), [Geojson Multi Polygon](#geojson-multi-polygon) | + +## Geojson Polygon +| Attributes | Description | +|:-----|:--------| +| type
`string` |

Type of geojson coordinates, i.e. Polygon.

Available values: `Polygon` | +| coordinates | See: [PolygonCoordinates](#polygoncoordinates) | + +## Geojson Multi Polygon +| Attributes | Description | +|:-----|:--------| +| type
`string` |

Type of geojson coordinates, i.e. MultiPolygon.

Available values: `MultiPolygon` | +| coordinates
`array` | Array of [PolygonCoordinates](#polygoncoordinates) | + +## PolygonCoordinates + + +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-Activate-Member-Pending-Points.md b/reference-docs/LOYALTIES-Activate-Member-Pending-Points.md new file mode 100644 index 00000000..6ba71a45 --- /dev/null +++ b/reference-docs/LOYALTIES-Activate-Member-Pending-Points.md @@ -0,0 +1,14 @@ +--- +title: Activate Member Pending Points +type: endpoint +categorySlug: voucherify-api +slug: activate-member-pending-points +parentDocSlug: loyalties +hidden: false +order: 184 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-Add-Member.md b/reference-docs/LOYALTIES-Add-Member.md new file mode 100644 index 00000000..410283c0 --- /dev/null +++ b/reference-docs/LOYALTIES-Add-Member.md @@ -0,0 +1,14 @@ +--- +title: Add Member +type: endpoint +categorySlug: voucherify-api +slug: add-member +parentDocSlug: loyalties +hidden: false +order: 130 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-Adjust-Loyalty-Card-Balance-1.md b/reference-docs/LOYALTIES-Adjust-Loyalty-Card-Balance-1.md new file mode 100644 index 00000000..4d4b1fa5 --- /dev/null +++ b/reference-docs/LOYALTIES-Adjust-Loyalty-Card-Balance-1.md @@ -0,0 +1,14 @@ +--- +title: Adjust Loyalty Card Balance +type: endpoint +categorySlug: voucherify-api +slug: update-loyalty-card-balance-1 +parentDocSlug: loyalties +hidden: false +order: 170 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-Adjust-Loyalty-Card-Balance.md b/reference-docs/LOYALTIES-Adjust-Loyalty-Card-Balance.md new file mode 100644 index 00000000..62f90a49 --- /dev/null +++ b/reference-docs/LOYALTIES-Adjust-Loyalty-Card-Balance.md @@ -0,0 +1,14 @@ +--- +title: Adjust Loyalty Card Balance +type: endpoint +categorySlug: voucherify-api +slug: update-loyalty-card-balance +parentDocSlug: loyalties +hidden: false +order: 160 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-Adjust-Member-Pending-Points.md b/reference-docs/LOYALTIES-Adjust-Member-Pending-Points.md new file mode 100644 index 00000000..8d4a2ba4 --- /dev/null +++ b/reference-docs/LOYALTIES-Adjust-Member-Pending-Points.md @@ -0,0 +1,14 @@ +--- +title: Adjust Member Pending Points +type: endpoint +categorySlug: voucherify-api +slug: adjust-member-pending-points +parentDocSlug: loyalties +hidden: false +order: 184 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-Cancel-Member-Pending-Points.md b/reference-docs/LOYALTIES-Cancel-Member-Pending-Points.md new file mode 100644 index 00000000..46ad0225 --- /dev/null +++ b/reference-docs/LOYALTIES-Cancel-Member-Pending-Points.md @@ -0,0 +1,14 @@ +--- +title: Cancel Member Pending Points +type: endpoint +categorySlug: voucherify-api +slug: cancel-member-pending-points +parentDocSlug: loyalties +hidden: false +order: 185 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-Create-Earning-Rule.md b/reference-docs/LOYALTIES-Create-Earning-Rule.md new file mode 100644 index 00000000..2369ee58 --- /dev/null +++ b/reference-docs/LOYALTIES-Create-Earning-Rule.md @@ -0,0 +1,14 @@ +--- +title: Create Earning Rule +type: endpoint +categorySlug: voucherify-api +slug: create-earning-rule +parentDocSlug: loyalties +hidden: false +order: 270 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-Create-Loyalty-Campaign.md b/reference-docs/LOYALTIES-Create-Loyalty-Campaign.md new file mode 100644 index 00000000..9d53bd86 --- /dev/null +++ b/reference-docs/LOYALTIES-Create-Loyalty-Campaign.md @@ -0,0 +1,14 @@ +--- +title: Create Loyalty Campaign +type: endpoint +categorySlug: voucherify-api +slug: create-loyalty-program +parentDocSlug: loyalties +hidden: false +order: 70 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-Create-Loyalty-Tiers.md b/reference-docs/LOYALTIES-Create-Loyalty-Tiers.md new file mode 100644 index 00000000..2fd2a82c --- /dev/null +++ b/reference-docs/LOYALTIES-Create-Loyalty-Tiers.md @@ -0,0 +1,14 @@ +--- +title: Create Loyalty Tiers +type: endpoint +categorySlug: voucherify-api +slug: create-in-bulk-loyalty-tiers +parentDocSlug: loyalties +hidden: false +order: 440 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-Create-Reward-Assignment.md b/reference-docs/LOYALTIES-Create-Reward-Assignment.md new file mode 100644 index 00000000..41ef135b --- /dev/null +++ b/reference-docs/LOYALTIES-Create-Reward-Assignment.md @@ -0,0 +1,14 @@ +--- +title: Create Reward Assignment +type: endpoint +categorySlug: voucherify-api +slug: create-reward-assignment-1 +parentDocSlug: loyalties +hidden: false +order: 400 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-Delete-Earning-Rule.md b/reference-docs/LOYALTIES-Delete-Earning-Rule.md new file mode 100644 index 00000000..81c5656e --- /dev/null +++ b/reference-docs/LOYALTIES-Delete-Earning-Rule.md @@ -0,0 +1,14 @@ +--- +title: Delete Earning Rule +type: endpoint +categorySlug: voucherify-api +slug: delete-earning-rule +parentDocSlug: loyalties +hidden: false +order: 290 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-Delete-Loyalty-Campaign.md b/reference-docs/LOYALTIES-Delete-Loyalty-Campaign.md new file mode 100644 index 00000000..44eea623 --- /dev/null +++ b/reference-docs/LOYALTIES-Delete-Loyalty-Campaign.md @@ -0,0 +1,14 @@ +--- +title: Delete Loyalty Campaign +type: endpoint +categorySlug: voucherify-api +slug: delete-loyalty-program +parentDocSlug: loyalties +hidden: false +order: 90 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-Delete-Reward-Assignment.md b/reference-docs/LOYALTIES-Delete-Reward-Assignment.md new file mode 100644 index 00000000..ce22167a --- /dev/null +++ b/reference-docs/LOYALTIES-Delete-Reward-Assignment.md @@ -0,0 +1,14 @@ +--- +title: Delete Reward Assignment +type: endpoint +categorySlug: voucherify-api +slug: delete-reward-assignment-1 +parentDocSlug: loyalties +hidden: false +order: 420 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-Disable-Earning-Rule.md b/reference-docs/LOYALTIES-Disable-Earning-Rule.md new file mode 100644 index 00000000..becedf04 --- /dev/null +++ b/reference-docs/LOYALTIES-Disable-Earning-Rule.md @@ -0,0 +1,14 @@ +--- +title: Disable Earning Rule +type: endpoint +categorySlug: voucherify-api +slug: disable-earning-rule +parentDocSlug: loyalties +hidden: false +order: 310 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-Earning-Rule-Object.md b/reference-docs/LOYALTIES-Earning-Rule-Object.md new file mode 100644 index 00000000..b4285be1 --- /dev/null +++ b/reference-docs/LOYALTIES-Earning-Rule-Object.md @@ -0,0 +1,147 @@ +--- +title: Earning Rule Object +type: basic +categorySlug: voucherify-api +parentDocSlug: loyalties +slug: earning-rule-object +hidden: false +order: 40 +--- + +## Earning Rule +All of: + +1. [EarningRuleBase](#earningrulebase) +2.
AttributesDescription
validation_rule_id
string, null

A unique validation rule identifier assigned by the Voucherify API. The validation rule is verified before points are added to the balance.

updated_at
string, null

Timestamp representing the date and time when the earning rule was last updated in ISO 8601 format.

active
boolean

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.

  • true indicates an active earning rule
  • false indicates an inactive earning rule
+ +## 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.

AttributesDescription
schema_id
string

Unique identifier of the custom event schema

| +| segment
`object` |

Contains the ID of a customer segment. Required for the customer.segment.entered option in the event.

AttributesDescription
id
string

Contains a unique identifier of a customer segment. Assigned by the Voucherify API.

| +| loyalty_tier
`object` |

Defines the tier associated with the earning rule definition.

AttributesDescription
id
string

Unique loyalty tier ID associated with the earning rule.

  • ANY: any loyalty tier within the campaign
Example:

ltr_pudTGWasuIqxdiDM0go31OV1

| +| pending_points
`object` |

Defines the configuration for pending points. Pending points can be used only with the order.paid event.

AttributesDescription
period_type
string

Defines the type of the period during which the points are in the pending state. Currently, only DAY value is accepted.

Available values: DAY
period_value
integer

Defines for how long the points are in the pending state. The minimum value is 1, maximum is 90.

| +| source
`object` |

Contains the custom earning rule name and parent campaign.

AttributesDescription
banner
string

Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard.

object_id
string

A unique campaign identifier assigned by the Voucherify API.

object_type
string

Defines the object associated with the earning rule. Defaults to campaign.

Available values: campaign
| +| object
`string` |

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.

**Example:**

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.

**Example:**

P2D

| + +## Validity Day Of Week +

Integer array corresponding to the particular days of the week in which the voucher is valid.

+ +## Validity Hours +| Attributes | Description | +|:-----|:--------| +| daily
`array` |

Defines the reccuring period(s) when the resource is active. The periods should not overlap.

Array of:
AttributesDescription
start_time
string

Defines the starting hour of validity in the HH:mm format. The resource is inactive before this time.

Example:

12:00

days_of_week
array

Integer array corresponding to the particular days of the week in which the resource is valid.

  • 0 Sunday
  • 1 Monday
  • 2 Tuesday
  • 3 Wednesday
  • 4 Thursday
  • 5 Friday
  • 6 Saturday
expiration_time
string

Defines the ending hour of validity in the HH:mm format. The resource is inactive after this time.

Example:

14:00

| + +## 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.

Available values: `FIXED_DAY_OF_YEAR`, `MONTH` | +| period_value
`integer` |

Value of the period. Required for the period_type: MONTH.

| +| rounding_type
`string` |

Type of rounding of the expiration period. Optional for the period_type: MONTH.

Available values: `END_OF_MONTH`, `END_OF_QUARTER`, `END_OF_HALF_YEAR`, `END_OF_YEAR`, `PARTICULAR_MONTH` | +| rounding_value
`integer` |

Value of rounding of the expiration period. Required for the rounding_type.

| +| fixed_month
`integer` |

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.

| +| fixed_day
`integer` |

Determines the day of the month when the points expire. Required for the period_type: FIXED_DAY_OF_YEAR.

| + +## 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` |
AttributesDescription
metadata
object

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.

AttributesDescription
every
integer

For how many increments of the customer metadata property to grant points for.

points
integer

Number of points to be awarded, i.e. how many points to be added to the loyalty card.

property
string

Customer metadata property.

| + +## Earning Rule Proportional Custom Event +| 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` |

CUSTOM_EVENT_METADATA: Custom event metadata (X points for every Y in metadata attribute).

Available values: `CUSTOM_EVENT_METADATA` | +| custom_event
`object` |
AttributesDescription
metadata
object

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.

AttributesDescription
every
integer

For how many increments of the customer metadata property to grant points for.

points
integer

Number of points to be awarded, i.e. how many points to be added to the loyalty card.

property
string

Custom event metadata property.

| + +## Order Amount +| 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` |

ORDER_AMOUNT: Pre-discount order amount (X points for every Y spent excluding discounts)

Available values: `ORDER_AMOUNT` | +| order
`object` |
AttributesDescription
amount
object

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.

AttributesDescription
every
integer

Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 order amount is written as 1000.

points
integer

Number of points to be awarded, i.e. how many points to be added to the loyalty card.

| + +## Order Total Amount +| 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` |

ORDER_TOTAL_AMOUNT: Total order amount (X points for every Y spent including discount)

Available values: `ORDER_TOTAL_AMOUNT` | +| order
`object` |
AttributesDescription
total_amount
object

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.

AttributesDescription
every
integer

Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 order amount is written as 1000.

points
integer

Number of points to be awarded, i.e. how many points to be added to the loyalty card.

| + +## Order 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` |

ORDER_METADATA: Order Metadata (X points for every Y in metadata attribute, defined in the property key under the order.metadata object)

Available values: `ORDER_METADATA` | +| order
`object` |

Defines the formula for calculating points proportionally.

AttributesDescription
metadata
object

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.

AttributesDescription
every
integer

For how many increments of the order metadata property to grant points for.

points
integer

Number of points to be awarded, i.e. how many points to be added to the loyalty card.

property
string

Order metadata property.

| + +## Order Items Quantity +| 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` |

ORDER_ITEMS_QUANTITY: Quantity of items defined in order_items.quantity.object & .id (X points for every Y items excluding free items)

Available values: `ORDER_ITEMS_QUANTITY` | +| order_items
`object` |
AttributesDescription
quantity
object

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.

AttributesDescription
every
integer

Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 order amount is written as 1000.

points
integer

Number of points to be awarded, i.e. how many points to be added to the loyalty card.

object
string

Type of object taken under consideration.

Available values: products_collection, product, sku
id
string

Unique ID of the resource, i.e. pc_75U0dHlr7u75BJodrW1AE3t6, prod_0bae32322150fd0546, or sku_0b7d7dfb090be5c619.

| + +## Order Items Amount +| 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` |

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` |
AttributesDescription
amount
object

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.

AttributesDescription
every
integer

Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 order amount is written as 1000.

points
integer

Number of points to be awarded, i.e. how many points to be added to the loyalty card.

object
string

Type of object taken under consideration.

Available values: products_collection, product, sku
id
string

Unique ID of the resource, i.e. pc_75U0dHlr7u75BJodrW1AE3t6, prod_0bae32322150fd0546, or sku_0b7d7dfb090be5c619.

| + +## Order Items Subtotal Amount +| 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` |

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` |
AttributesDescription
subtotal_amount
object

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.

AttributesDescription
every
integer

Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 order amount is written as 1000.

points
integer

Number of points to be awarded, i.e. how many points to be added to the loyalty card.

object
string

Type of object taken under consideration.

Available values: products_collection, product, sku
id
string

Unique ID of the resource, i.e. pc_75U0dHlr7u75BJodrW1AE3t6, prod_0bae32322150fd0546, or sku_0b7d7dfb090be5c619.

| + +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/LOYALTIES-Enable-Earning-Rule.md b/reference-docs/LOYALTIES-Enable-Earning-Rule.md new file mode 100644 index 00000000..b8c380a2 --- /dev/null +++ b/reference-docs/LOYALTIES-Enable-Earning-Rule.md @@ -0,0 +1,14 @@ +--- +title: Enable Earning Rule +type: endpoint +categorySlug: voucherify-api +slug: enable-earning-rule +parentDocSlug: loyalties +hidden: false +order: 300 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-Export-Loyalty-Campaign-Point-Expiration.md b/reference-docs/LOYALTIES-Export-Loyalty-Campaign-Point-Expiration.md new file mode 100644 index 00000000..aa301f08 --- /dev/null +++ b/reference-docs/LOYALTIES-Export-Loyalty-Campaign-Point-Expiration.md @@ -0,0 +1,14 @@ +--- +title: Export Loyalty Campaign Point Expiration +type: endpoint +categorySlug: voucherify-api +slug: create-points-expiration-export +parentDocSlug: loyalties +hidden: false +order: 240 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-Export-Loyalty-Campaign-Transactions.md b/reference-docs/LOYALTIES-Export-Loyalty-Campaign-Transactions.md new file mode 100644 index 00000000..ac878af3 --- /dev/null +++ b/reference-docs/LOYALTIES-Export-Loyalty-Campaign-Transactions.md @@ -0,0 +1,14 @@ +--- +title: Export Loyalty Campaign Transactions +type: endpoint +categorySlug: voucherify-api +slug: export-loyalty-campaign-transactions +parentDocSlug: loyalties +hidden: false +order: 187 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-Export-Loyalty-Card-Transactions-1.md b/reference-docs/LOYALTIES-Export-Loyalty-Card-Transactions-1.md new file mode 100644 index 00000000..bd457ae7 --- /dev/null +++ b/reference-docs/LOYALTIES-Export-Loyalty-Card-Transactions-1.md @@ -0,0 +1,14 @@ +--- +title: Export Loyalty Card Transactions +type: endpoint +categorySlug: voucherify-api +slug: export-loyalty-card-transactions-1 +parentDocSlug: loyalties +hidden: false +order: 220 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-Export-Loyalty-Card-Transactions.md b/reference-docs/LOYALTIES-Export-Loyalty-Card-Transactions.md new file mode 100644 index 00000000..f6810518 --- /dev/null +++ b/reference-docs/LOYALTIES-Export-Loyalty-Card-Transactions.md @@ -0,0 +1,14 @@ +--- +title: Export Loyalty Card Transactions +type: endpoint +categorySlug: voucherify-api +slug: export-loyalty-card-transactions +parentDocSlug: loyalties +hidden: false +order: 210 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-GET-Reward-Assignment-2.md b/reference-docs/LOYALTIES-GET-Reward-Assignment-2.md new file mode 100644 index 00000000..ecd30a1b --- /dev/null +++ b/reference-docs/LOYALTIES-GET-Reward-Assignment-2.md @@ -0,0 +1,14 @@ +--- +title: Get Reward Assignment +type: endpoint +categorySlug: voucherify-api +slug: get-reward-assignment-2 +parentDocSlug: loyalties +hidden: false +order: 390 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-Get-Earning-Rule.md b/reference-docs/LOYALTIES-Get-Earning-Rule.md new file mode 100644 index 00000000..f9a537e5 --- /dev/null +++ b/reference-docs/LOYALTIES-Get-Earning-Rule.md @@ -0,0 +1,14 @@ +--- +title: Get Earning Rule +type: endpoint +categorySlug: voucherify-api +slug: get-earning-rule +parentDocSlug: loyalties +hidden: false +order: 260 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-Get-Loyalty-Campaign.md b/reference-docs/LOYALTIES-Get-Loyalty-Campaign.md new file mode 100644 index 00000000..c9098909 --- /dev/null +++ b/reference-docs/LOYALTIES-Get-Loyalty-Campaign.md @@ -0,0 +1,14 @@ +--- +title: Get Loyalty Campaign +type: endpoint +categorySlug: voucherify-api +slug: get-loyalty-program +parentDocSlug: loyalties +hidden: false +order: 60 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-Get-Loyalty-Tier.md b/reference-docs/LOYALTIES-Get-Loyalty-Tier.md new file mode 100644 index 00000000..1ef45e45 --- /dev/null +++ b/reference-docs/LOYALTIES-Get-Loyalty-Tier.md @@ -0,0 +1,14 @@ +--- +title: Get Loyalty Tier +type: endpoint +categorySlug: voucherify-api +slug: get-loyalty-tier +parentDocSlug: loyalties +hidden: false +order: 440 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-Get-Member-1.md b/reference-docs/LOYALTIES-Get-Member-1.md new file mode 100644 index 00000000..47086179 --- /dev/null +++ b/reference-docs/LOYALTIES-Get-Member-1.md @@ -0,0 +1,14 @@ +--- +title: Get Member +type: endpoint +categorySlug: voucherify-api +slug: get-member-1 +parentDocSlug: loyalties +hidden: false +order: 121 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-Get-Member.md b/reference-docs/LOYALTIES-Get-Member.md new file mode 100644 index 00000000..48eb8376 --- /dev/null +++ b/reference-docs/LOYALTIES-Get-Member.md @@ -0,0 +1,14 @@ +--- +title: Get Member +type: endpoint +categorySlug: voucherify-api +slug: get-member +parentDocSlug: loyalties +hidden: false +order: 122 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-Get-Reward-Assignment-1.md b/reference-docs/LOYALTIES-Get-Reward-Assignment-1.md new file mode 100644 index 00000000..31b311c6 --- /dev/null +++ b/reference-docs/LOYALTIES-Get-Reward-Assignment-1.md @@ -0,0 +1,14 @@ +--- +title: Get Reward Assignment +type: endpoint +categorySlug: voucherify-api +slug: get-reward-assignment-1 +parentDocSlug: loyalties +hidden: false +order: 380 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-Get-Reward-Details.md b/reference-docs/LOYALTIES-Get-Reward-Details.md new file mode 100644 index 00000000..b1406c28 --- /dev/null +++ b/reference-docs/LOYALTIES-Get-Reward-Details.md @@ -0,0 +1,14 @@ +--- +title: Get Reward Details +type: endpoint +categorySlug: voucherify-api +slug: get-reward-details +parentDocSlug: loyalties +hidden: false +order: 330 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-List-Campaign-Pending-Points.md b/reference-docs/LOYALTIES-List-Campaign-Pending-Points.md new file mode 100644 index 00000000..306eec4e --- /dev/null +++ b/reference-docs/LOYALTIES-List-Campaign-Pending-Points.md @@ -0,0 +1,14 @@ +--- +title: List Campaign Pending Points +type: endpoint +categorySlug: voucherify-api +slug: list-campaign-pending-points +parentDocSlug: loyalties +hidden: false +order: 181 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-List-Earning-Rules.md b/reference-docs/LOYALTIES-List-Earning-Rules.md new file mode 100644 index 00000000..02f1a034 --- /dev/null +++ b/reference-docs/LOYALTIES-List-Earning-Rules.md @@ -0,0 +1,14 @@ +--- +title: List Earning Rules +type: endpoint +categorySlug: voucherify-api +slug: list-earning-rules +parentDocSlug: loyalties +hidden: false +order: 250 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-List-Loyalty-Campaign-Transactions.md b/reference-docs/LOYALTIES-List-Loyalty-Campaign-Transactions.md new file mode 100644 index 00000000..4e541891 --- /dev/null +++ b/reference-docs/LOYALTIES-List-Loyalty-Campaign-Transactions.md @@ -0,0 +1,14 @@ +--- +title: List Loyalty Campaign Transactions +type: endpoint +categorySlug: voucherify-api +slug: list-loyalty-campaign-transactions +parentDocSlug: loyalties +hidden: false +order: 186 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-List-Loyalty-Campaigns.md b/reference-docs/LOYALTIES-List-Loyalty-Campaigns.md new file mode 100644 index 00000000..9c1d434a --- /dev/null +++ b/reference-docs/LOYALTIES-List-Loyalty-Campaigns.md @@ -0,0 +1,14 @@ +--- +title: List Loyalty Campaigns +type: endpoint +categorySlug: voucherify-api +slug: list-loyalty-programs +parentDocSlug: loyalties +hidden: false +order: 50 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-List-Loyalty-Card-Point-Expiration.md b/reference-docs/LOYALTIES-List-Loyalty-Card-Point-Expiration.md new file mode 100644 index 00000000..87ce11c2 --- /dev/null +++ b/reference-docs/LOYALTIES-List-Loyalty-Card-Point-Expiration.md @@ -0,0 +1,14 @@ +--- +title: List Loyalty Card Point Expiration +type: endpoint +categorySlug: voucherify-api +slug: list-points-expiration +parentDocSlug: loyalties +hidden: false +order: 230 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-List-Loyalty-Card-Transactions-1.md b/reference-docs/LOYALTIES-List-Loyalty-Card-Transactions-1.md new file mode 100644 index 00000000..ac8823c1 --- /dev/null +++ b/reference-docs/LOYALTIES-List-Loyalty-Card-Transactions-1.md @@ -0,0 +1,14 @@ +--- +title: List Loyalty Card Transactions +type: endpoint +categorySlug: voucherify-api +slug: list-loyalty-card-transactions-1 +parentDocSlug: loyalties +hidden: false +order: 200 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-List-Loyalty-Card-Transactions.md b/reference-docs/LOYALTIES-List-Loyalty-Card-Transactions.md new file mode 100644 index 00000000..6adf51a6 --- /dev/null +++ b/reference-docs/LOYALTIES-List-Loyalty-Card-Transactions.md @@ -0,0 +1,14 @@ +--- +title: List Loyalty Card Transactions +type: endpoint +categorySlug: voucherify-api +slug: list-loyalty-card-transactions +parentDocSlug: loyalties +hidden: false +order: 190 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-List-Loyalty-Tier-Earning-Rules.md b/reference-docs/LOYALTIES-List-Loyalty-Tier-Earning-Rules.md new file mode 100644 index 00000000..ffad9d63 --- /dev/null +++ b/reference-docs/LOYALTIES-List-Loyalty-Tier-Earning-Rules.md @@ -0,0 +1,14 @@ +--- +title: List Loyalty Tier Earning Rules +type: endpoint +categorySlug: voucherify-api +slug: list-loyalty-tier-earning-rules +parentDocSlug: loyalties +hidden: false +order: 460 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-List-Loyalty-Tier-Rewards.md b/reference-docs/LOYALTIES-List-Loyalty-Tier-Rewards.md new file mode 100644 index 00000000..9a1ff995 --- /dev/null +++ b/reference-docs/LOYALTIES-List-Loyalty-Tier-Rewards.md @@ -0,0 +1,14 @@ +--- +title: List Loyalty Tier Rewards +type: endpoint +categorySlug: voucherify-api +slug: list-loyalty-tier-rewards +parentDocSlug: loyalties +hidden: false +order: 470 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-List-Loyalty-Tiers.md b/reference-docs/LOYALTIES-List-Loyalty-Tiers.md new file mode 100644 index 00000000..80681522 --- /dev/null +++ b/reference-docs/LOYALTIES-List-Loyalty-Tiers.md @@ -0,0 +1,14 @@ +--- +title: List Loyalty Tiers +type: endpoint +categorySlug: voucherify-api +slug: list-loyalty-tiers +parentDocSlug: loyalties +hidden: false +order: 430 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-List-Member-Activity-1.md b/reference-docs/LOYALTIES-List-Member-Activity-1.md new file mode 100644 index 00000000..64d3bd10 --- /dev/null +++ b/reference-docs/LOYALTIES-List-Member-Activity-1.md @@ -0,0 +1,14 @@ +--- +title: List Member Activity +type: endpoint +categorySlug: voucherify-api +slug: list-member-activity-1 +parentDocSlug: loyalties +hidden: false +order: 110 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-List-Member-Activity.md b/reference-docs/LOYALTIES-List-Member-Activity.md new file mode 100644 index 00000000..685468a3 --- /dev/null +++ b/reference-docs/LOYALTIES-List-Member-Activity.md @@ -0,0 +1,14 @@ +--- +title: List Member Activity +type: endpoint +categorySlug: voucherify-api +slug: list-member-activity +parentDocSlug: loyalties +hidden: false +order: 120 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-List-Member-Pending-Points-1.md b/reference-docs/LOYALTIES-List-Member-Pending-Points-1.md new file mode 100644 index 00000000..819c7841 --- /dev/null +++ b/reference-docs/LOYALTIES-List-Member-Pending-Points-1.md @@ -0,0 +1,14 @@ +--- +title: List Member Pending Points +type: endpoint +categorySlug: voucherify-api +slug: list-member-pending-points-1 +parentDocSlug: loyalties +hidden: false +order: 182 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-List-Member-Pending-Points.md b/reference-docs/LOYALTIES-List-Member-Pending-Points.md new file mode 100644 index 00000000..3ee3d26b --- /dev/null +++ b/reference-docs/LOYALTIES-List-Member-Pending-Points.md @@ -0,0 +1,14 @@ +--- +title: List Member Pending Points +type: endpoint +categorySlug: voucherify-api +slug: list-member-pending-points +parentDocSlug: loyalties +hidden: false +order: 183 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-List-Member-Rewards.md b/reference-docs/LOYALTIES-List-Member-Rewards.md new file mode 100644 index 00000000..67def71e --- /dev/null +++ b/reference-docs/LOYALTIES-List-Member-Rewards.md @@ -0,0 +1,14 @@ +--- +title: List Member Rewards +type: endpoint +categorySlug: voucherify-api +slug: list-member-rewards +parentDocSlug: loyalties +hidden: false +order: 320 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-List-Members-Loyalty-Tier.md b/reference-docs/LOYALTIES-List-Members-Loyalty-Tier.md new file mode 100644 index 00000000..03eaaade --- /dev/null +++ b/reference-docs/LOYALTIES-List-Members-Loyalty-Tier.md @@ -0,0 +1,14 @@ +--- +title: List Member's Loyalty Tiers +type: endpoint +categorySlug: voucherify-api +slug: list-member-loyalty-tier +parentDocSlug: loyalties +hidden: false +order: 450 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-List-Members.md b/reference-docs/LOYALTIES-List-Members.md new file mode 100644 index 00000000..b5a4f153 --- /dev/null +++ b/reference-docs/LOYALTIES-List-Members.md @@ -0,0 +1,14 @@ +--- +title: List Members +type: endpoint +categorySlug: voucherify-api +slug: list-members +parentDocSlug: loyalties +hidden: false +order: 100 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-List-Reward-Assignments-1.md b/reference-docs/LOYALTIES-List-Reward-Assignments-1.md new file mode 100644 index 00000000..b3eaa8a3 --- /dev/null +++ b/reference-docs/LOYALTIES-List-Reward-Assignments-1.md @@ -0,0 +1,14 @@ +--- +title: List Reward Assignments +type: endpoint +categorySlug: voucherify-api +slug: list-reward-assignments-1 +parentDocSlug: loyalties +hidden: false +order: 360 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-List-Reward-Assignments-2.md b/reference-docs/LOYALTIES-List-Reward-Assignments-2.md new file mode 100644 index 00000000..ce313c6f --- /dev/null +++ b/reference-docs/LOYALTIES-List-Reward-Assignments-2.md @@ -0,0 +1,14 @@ +--- +title: List Reward Assignments +type: endpoint +categorySlug: voucherify-api +slug: list-reward-assignments-2 +parentDocSlug: loyalties +hidden: false +order: 370 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-Loyalty-Campaign-Object.md b/reference-docs/LOYALTIES-Loyalty-Campaign-Object.md new file mode 100644 index 00000000..2ea783be --- /dev/null +++ b/reference-docs/LOYALTIES-Loyalty-Campaign-Object.md @@ -0,0 +1,139 @@ +--- +title: Loyalty Campaign Object +type: basic +categorySlug: voucherify-api +parentDocSlug: loyalties +slug: loyalty-campaign-object +hidden: false +order: 10 +--- + +## Loyalty Campaign Object +| Attributes | Description | +|:-----|:--------| +| id
`string` |

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.

Available values: `AUTO_UPDATE`, `STATIC` | +| voucher | See: [Loyalty Card](#loyalty-card) | +| auto_join
`boolean` |

Indicates 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.

| +| use_voucher_metadata_schema
`boolean` |

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.

| +| metadata
`object` |

The 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.

AttributesDescription
points
integer

Initial loyalty card income in points to be applied to the loyalty card at voucher generation.

expiration_rules
object

Defines point expiration rules.

AttributesDescription
period_type
string

The expiration period.

Available values: MONTH
period_value
integer

How many periods should pass before the expiration occurs.

rounding_type
string

Round up expiration till the end of the given period type.

Available values: END_OF_MONTH, END_OF_QUARTER, END_OF_HALF_YEAR, END_OF_YEAR, PARTICULAR_MONTH
| +| redemption
`object` |

Defines the redemption limits on vouchers.

AttributesDescription
quantity
integer

How many times a voucher can be redeemed. A null value means unlimited.

| +| code_config
`object` |

Defines code's pattern (prefix, suffix, length, charset, etc).

AttributesDescription
length
string

Number of characters in a generated code (excluding prefix and postfix).

charset
string

Characters that can appear in the code.

Examples:

  • Alphanumeric: 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
  • Alphabetic: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
  • Alphabetic Lowercase: abcdefghijklmnopqrstuvwxyz
  • Alphabetic Uppercase: ABCDEFGHIJKLMNOPQRSTUVWXYZ
  • Numbers: 0123456789
  • Custom: a custom character set
prefix
string

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.

| +| is_referral_code
`boolean` |

Flag indicating whether this voucher is a referral code; true for campaign type REFERRAL_PROGRAM.

| + +## 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.

**Example:**

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.

**Example:**

P2D

| + +## Validity Day Of Week +

Integer array corresponding to the particular days of the week in which the voucher is valid.

+ +## Validity Hours +| Attributes | Description | +|:-----|:--------| +| daily
`array` |

Defines the reccuring period(s) when the resource is active. The periods should not overlap.

Array of:
AttributesDescription
start_time
string

Defines the starting hour of validity in the HH:mm format. The resource is inactive before this time.

Example:

12:00

days_of_week
array

Integer array corresponding to the particular days of the week in which the resource is valid.

  • 0 Sunday
  • 1 Monday
  • 2 Tuesday
  • 3 Wednesday
  • 4 Thursday
  • 5 Friday
  • 6 Saturday
expiration_time
string

Defines the ending hour of validity in the HH:mm format. The resource is inactive after this time.

Example:

14:00

| + +## Access Settings Campaign Assignments List +| Attributes | Description | +|:-----|:--------| +| object
`string` |

The type of the object represented by JSON. Default is list. This object stores information about campaign assignments to areas and stores

Available values: `list` | +| data_ref
`string` |

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.

Available values: `BALANCE` | +| start_date
`object` |

Defines the conditions for the start date of the tier.

AttributesDescription
type
string

What triggers the tier to be valid for a customer.
IMMEDIATE: After reaching the minimum required points.

Available values: IMMEDIATE
| +| expiration_date |

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.

Available values: `POINTS_IN_PERIOD` | +| qualification_period
`string` |

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.

PeriodDefinition
Calendar MonthPoints collected in one calendar month
January, February, March, etc.
Calendar QuarterPoints collected in the quarter
- January - March
- April - June
- July - September
- October - December
Calendar Half-yearPoints collected in the half-year
- January - June
- July - December
Calendar YearPoints collected in one calendar year
January - December
Available values: `MONTH`, `QUARTER`, `HALF_YEAR`, `YEAR` | +| start_date
`object` |

Defines the conditions for the start date of the tier.

AttributesDescription
type
string

What triggers the tier to be valid for a customer.
IMMEDIATE: After reaching the minimum required points.
NEXT_PERIOD: When the next qualification period starts.

Available values: IMMEDIATE, NEXT_PERIOD
| +| expiration_date
`object` |

Defines the conditions for the expiration date of a tier.

AttributesDescription
type
string

What triggers the tier to expire for a customer.
END_OF_PERIOD: Expire tier at the end of the period.
END_OF_NEXT_PERIOD: Expire tier at the end of the next period.

Available values: END_OF_PERIOD, END_OF_NEXT_PERIOD
extend
string

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 P3M will be valid for an additional duration of 3 months and a tier with a duration of P1D will be valid for an additional duration of 1 day.

| + +## 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.

| +| area_store_id
`string` |

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.

Available values: `BALANCE_DROP` | + +## Custom +| Attributes | Description | +|:-----|:--------| +| type
`string` |

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.

Available values: `CUSTOM` | +| extend
`string` |

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.

Available values: `MONTH`, `QUARTER`, `HALF_YEAR`, `YEAR` | +| strategy
`string` |

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.

| + +[block:html] +{ + "html": "" +} +[/block] \ No newline at end of file diff --git a/reference-docs/LOYALTIES-Loyalty-Card-Object.md b/reference-docs/LOYALTIES-Loyalty-Card-Object.md new file mode 100644 index 00000000..d1b9797c --- /dev/null +++ b/reference-docs/LOYALTIES-Loyalty-Card-Object.md @@ -0,0 +1,70 @@ +--- +title: Loyalty Card Object +type: basic +categorySlug: voucherify-api +parentDocSlug: loyalties +slug: loyalty-card-object +hidden: false +order: 20 +--- + +## Loyalty Card Object +| 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:**

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.

| +| gift
`object`, `null` |

Object representing gift parameters. Child attributes are present only if type is GIFT_VOUCHER. Defaults to null.

| +| loyalty_card
`object` |

Object representing loyalty card parameters. Child attributes are present only if type is LOYALTY_CARD.

AttributesDescription
points
integer

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.

Example:

6970

next_expiration_date
string

The next closest date when the next set of points are due to expire.

Example:

2023-05-30

next_expiration_points
integer

The amount of points that are set to expire next.

| +| start_date
`string` |

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.

| +| additional_info
`string` |

An 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.

AttributesDescription
qr
object

Stores Quick Response (QR) representation of encrypted code.

AttributesDescription
id
string

Encrypted voucher code ID.

Example:

U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK+t4pp7U7oFzjGJzj9q/bmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg+BaZk5QwXMf8k/OzSlOEVybpwSq+AiqPoNtjeuqtIgkDyvT6Q==

url
string

URL to QR code

Optional: Attach query parameters to base URL to customize the image of the encrypted voucher code.

  • size: integer value from 1 to 100
  • format: string, either png (default) or svg
Example:

https://dev.dl.voucherify.io/api/v1/assets/qr/U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK%2Bt4pp7U7oFzjGJzj9q%2FbmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg%2BBaZk5QwXMf8k%2FOzSlOEVybpwSq%2BAiqPoNtjeuqtIgkDyvT6Q%3D%3D

barcode
object

Stores barcode representation of encrypted code.

AttributesDescription
id
string

Encrypted voucher code ID.

Example:

U2FsdGVkX19eJhGfWwUrH9+tulBkON+AnMktic+N6CVWzZ9+fHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ+kJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6/pFs61apEn9SJx32ttCF6d3oxKISQQ==

url
string

URL to barcode

Optional: Attach query parameters to base URL to customize the image of the encrypted voucher code.

  • size: integer value from 1 to 100
  • format: string, either png (default) or svg
Example:

https://dev.dl.voucherify.io/api/v1/assets/barcode/U2FsdGVkX19eJhGfWwUrH9%2BtulBkON%2BAnMktic%2BN6CVWzZ9%2BfHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ%2BkJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6%2FpFs61apEn9SJx32ttCF6d3oxKISQQ%3D%3D

| +| is_referral_code
`boolean` |

Flag indicating whether this voucher is a referral code; true for campaign type REFERRAL_PROGRAM.

| +| created_at
`string` |

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.

AttributesDescription
quantity
integer

How many times a voucher can be redeemed. A null value means unlimited.

redeemed_quantity
integer

How many times a voucher has already been redeemed.

Example:

1

redeemed_points
integer

Total loyalty points redeemed.

Example:

100000

object
string

The type of the object represented is by default list. To get this list, you need to make a call to the endpoint returned in the url attribute.

url
string

The endpoint where this list of redemptions can be accessed using a GET method. /v1/vouchers/{voucher_code}/redemptions

Example:

/v1/vouchers/WVPblOYX/redemptions?page=1&limit=10

| +| 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.

RequiredOptional
type:LOYALTY_CARDtype:DISCOUNT_VOUCHER
is_referral_code:truetype:GIFT_VOUCHER
AttributesDescription
object
string

The type of the object represented is by default list. To get this list, you need to make a call to the endpoint returned in the url attribute.

count
integer

Publication events counter.

Example:

0

url
string

The endpoint where this list of publications can be accessed using a GET method. /v1/vouchers/{voucher_code}/publications

Example:

/v1/vouchers/WVPblOYX/publications?page=1&limit=10

| +| object
`string` |

The type of the object represented by JSON. Default is voucher.

| + +## 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

| + +## 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.

**Example:**

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.

**Example:**

P2D

| + +## Validity Day Of Week +

Integer array corresponding to the particular days of the week in which the voucher is valid.

+ +## Validity Hours +| Attributes | Description | +|:-----|:--------| +| daily
`array` |

Defines the reccuring period(s) when the resource is active. The periods should not overlap.

Array of:
AttributesDescription
start_time
string

Defines the starting hour of validity in the HH:mm format. The resource is inactive before this time.

Example:

12:00

days_of_week
array

Integer array corresponding to the particular days of the week in which the resource is valid.

  • 0 Sunday
  • 1 Monday
  • 2 Tuesday
  • 3 Wednesday
  • 4 Thursday
  • 5 Friday
  • 6 Saturday
expiration_time
string

Defines the ending hour of validity in the HH:mm format. The resource is inactive after this time.

Example:

14:00

| + +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/LOYALTIES-Loyalty-Tier-Object.md b/reference-docs/LOYALTIES-Loyalty-Tier-Object.md new file mode 100644 index 00000000..2ad9d7a0 --- /dev/null +++ b/reference-docs/LOYALTIES-Loyalty-Tier-Object.md @@ -0,0 +1,57 @@ +--- +title: Loyalty Tier Object +type: basic +categorySlug: voucherify-api +parentDocSlug: loyalties +slug: loyalty-tier-object +hidden: false +order: 30 +--- + +## Loyalty Tier +All of: + +1. [Loyalty Tier Base](#loyalty-tier-base) +2.
AttributesDescription
id
string

Unique loyalty tier ID.

campaign_id
string

Unique parent campaign ID.

metadata
object, 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_at
string

Timestamp representing the date and time when the loyalty tier was created. The value is shown in the ISO 8601 format.

updated_at
string, null

Timestamp representing the date and time when the loyalty tier was updated. The value is shown in the ISO 8601 format.

config
object

Defines loyalty tier range in points.

AttributesDescription
points
object

Defines range of loyalty tier in points.

AttributesDescription
from
integer

Bottom points threshold value.

to
integer

Top points threshold value.

expirationSee: Loyalty Tier Expiration
object
string

The type of the object represented by JSON. This object stores information about the loyalty.

Available values: loyalty_tier
+ +## 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.

AttributesDescription
[propertyName]See: MappingPoints
| +| rewards
`object` |

Contains a list of reward IDs and their points mapping for the given reward.

AttributesDescription
[propertyName]See: MappingPoints
| +| points
`object` |

Defines range of loyalty tier in points.

AttributesDescription
from
integer

Bottom points threshold value.

to
integer

Top points threshold value.

| + +## Loyalty Tier Expiration +| Attributes | Description | +|:-----|:--------| +| customer_id
`string` |

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.

AttributesDescription
custom_property_name
object

Custom property name. This is defined in Project Settings > Metadata Schema in the Dashboard.

AttributesDescription
type
string
Available values: string, number, object, date, datetime, geopoint, boolean, image_url
array
boolean

Indicates whether the definition is an array.

optional
boolean

Indicates whether this definition is optional or not optional for the resource.

objectType
string, null

Returns the name of the custom resource if the resource was previously defined in the Dashboard as a custom (non-standard) Nested object.

eq
array

Array of possible values when the setting for is equal to any of in the Dashboard is defined explicitly.

ne
array

Array of values that are not allowed when the setting for is not equal to any of in the Dashboard is defined explicitly.

lt
integer

A property of number type must have less than this value.

lte
integer

A property of number type must be less than or equal to this value.

gt
integer

A property of number type must be greater than this value.

gte
integer

A property of number type must be greater than or equal to this value.

deleted
boolean

Indicates whether the definition was deleted from the schema.

maxLength
integer

Value for maximum length when the setting for has maximum length of in the Dashboard is defined explicitly.

minLength
integer

Value indicating minimum length when the setting for has minimum length of in the Dashboard is defined explicitly.

exactLength
integer

Value indicating exact length when the setting for has exact length of in the Dashboard is defined explicitly.

| +| allow_defined_only
`boolean` |

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.

| +| created_at
`string` |

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)

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

| +| 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` | +| 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` |
AttributesDescription
[propertyName]See: Order Redemptions
| + +## 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.

| + +[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)
[Reward assignment object](ref:reward-assignment-object) | +| Publications | [Publication object](ref:publication-object) | +| Validations | [Validation object](ref:validation-object) | +| Redemptions | [Redemption object](ref:redemption-object)
[Redemption rollback object](ref:rollback-redemption-object) | +| Stackable Discounts | [Stackable Redemptions object](ref:stackable-redemptions-object) | +| Loyalties | [Loyalty campaign object](ref:loyalty-campaign-object)
[Loyalty card object](ref:loyalty-card-object)
[Earning rule object](ref:earning-rule-object)
[Loyalty tier object](ref:loyalty-tier-object) | +| Customers | [Customer object](ref:customer-object)
[Customer activity object](ref:customer-activity-object) | +| Orders | [Order object](ref:order-object) | +| Products | [Product object](ref:product-object)
[SKU object](ref:sku-object) | +| Product Collections | [Product collection object](ref:product-collection-object) | +| Validation Rules | [Validation rule object](ref:validation-rule-object)
[Validation rule assignment object](ref:validation-rule-assignment-object) | +| Segments | [Segment object](ref:customer-segment-object) | +| Events | [Event object](ref:custom-event-object) | +| Consents | [Consent object](ref:consents-object) | +| Async Actions | [Async action object](ref:async-action-object) | +| Exports | [Export object](ref:export-object) | +| Categories | [Category object](ref:category-object) | +| Metadata Schemas | [Metadata schema object](ref:metadata-schema-object) | diff --git a/reference-docs/PRODUCT-COLLECTIONS-Delete-Product-Collection.md b/reference-docs/PRODUCT-COLLECTIONS-Delete-Product-Collection.md new file mode 100644 index 00000000..5f937b93 --- /dev/null +++ b/reference-docs/PRODUCT-COLLECTIONS-Delete-Product-Collection.md @@ -0,0 +1,14 @@ +--- +title: Delete Product Collection +type: endpoint +categorySlug: voucherify-api +slug: delete-product-collection +parentDocSlug: product-collections +hidden: false +order: 6 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/PRODUCT-COLLECTIONS-Get-Product-Collection.md b/reference-docs/PRODUCT-COLLECTIONS-Get-Product-Collection.md new file mode 100644 index 00000000..2cce61e4 --- /dev/null +++ b/reference-docs/PRODUCT-COLLECTIONS-Get-Product-Collection.md @@ -0,0 +1,14 @@ +--- +title: Get Product Collection +type: endpoint +categorySlug: voucherify-api +slug: get-product-collection +parentDocSlug: product-collections +hidden: false +order: 4 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/PRODUCT-COLLECTIONS-List-Product-Collections.md b/reference-docs/PRODUCT-COLLECTIONS-List-Product-Collections.md new file mode 100644 index 00000000..47fd9b10 --- /dev/null +++ b/reference-docs/PRODUCT-COLLECTIONS-List-Product-Collections.md @@ -0,0 +1,14 @@ +--- +title: List Product Collections +type: endpoint +categorySlug: voucherify-api +slug: list-product-collections +parentDocSlug: product-collections +hidden: false +order: 2 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/PRODUCT-COLLECTIONS-List-Products-In-Collection.md b/reference-docs/PRODUCT-COLLECTIONS-List-Products-In-Collection.md new file mode 100644 index 00000000..5320b522 --- /dev/null +++ b/reference-docs/PRODUCT-COLLECTIONS-List-Products-In-Collection.md @@ -0,0 +1,14 @@ +--- +title: List Products in Collection +type: endpoint +categorySlug: voucherify-api +slug: list-products-in-collection +parentDocSlug: product-collections +hidden: false +order: 5 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/PRODUCT-COLLECTIONS-Product-Collection-Object.md b/reference-docs/PRODUCT-COLLECTIONS-Product-Collection-Object.md new file mode 100644 index 00000000..c7b306b2 --- /dev/null +++ b/reference-docs/PRODUCT-COLLECTIONS-Product-Collection-Object.md @@ -0,0 +1,68 @@ +--- +title: Product Collection Object +type: basic +categorySlug: voucherify-api +parentDocSlug: product-collections +slug: product-collection-object +hidden: false +order: 1 +--- + +## Product Collection Base +| Attributes | Description | +|:-----|:--------| +| id
`string` |

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.

AttributesDescription
junctionSee: Junction
[propertyName]

Valid keys: id, product_id, source_id, name, price, object, attributes, image_url, skus, created_at, updated_at and metadata.*

Field Conditions
| +| products
`array` |

Defines a set of products for a STATIC product collection type.

Array of:

Product Collections Item Products Item

AttributesDescription
id
string

The product ID.

Example:

prod_0a41bcf807c5fcaaf6

product_id
string

Product ID for SKUs.

object
string

Denotes the type of the object represented by the ID.

Available values: sku, product
| +| created_at
`string` |

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.

+ +Available values: `and`, `or` + +## Field Conditions +| Attributes | Description | +|:-----|:--------| +| conditions |

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.
AttributesDescription
skusSee: Skus List For Product
+ +## 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.

| +| attributes
`array` |

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.

| +| 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. 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.

| +| currency
`string`, `null` |

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.

Available values: `sku` | + +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/PRODUCTS-SKU-Object.md b/reference-docs/PRODUCTS-SKU-Object.md new file mode 100644 index 00000000..109da55f --- /dev/null +++ b/reference-docs/PRODUCTS-SKU-Object.md @@ -0,0 +1,31 @@ +--- +title: SKU Object +type: basic +categorySlug: voucherify-api +parentDocSlug: products +slug: sku-object +hidden: false +order: 2 +--- + +## 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.

| +| currency
`string`, `null` |

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.

Available values: `sku` | + +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/PRODUCTS-Update-Product.md b/reference-docs/PRODUCTS-Update-Product.md new file mode 100644 index 00000000..af3026fb --- /dev/null +++ b/reference-docs/PRODUCTS-Update-Product.md @@ -0,0 +1,14 @@ +--- +title: Update Product +type: endpoint +categorySlug: voucherify-api +slug: update-product +parentDocSlug: products +hidden: false +order: 7 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/PRODUCTS-Update-Products-In-Bulk.md b/reference-docs/PRODUCTS-Update-Products-In-Bulk.md new file mode 100644 index 00000000..097bc4cb --- /dev/null +++ b/reference-docs/PRODUCTS-Update-Products-In-Bulk.md @@ -0,0 +1,14 @@ +--- +title: Update Products in bulk +type: endpoint +categorySlug: voucherify-api +slug: update-products-in-bulk +parentDocSlug: products +hidden: false +order: 8 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/PRODUCTS-Update-Products-Metadata-In-Bulk.md b/reference-docs/PRODUCTS-Update-Products-Metadata-In-Bulk.md new file mode 100644 index 00000000..7d615b9e --- /dev/null +++ b/reference-docs/PRODUCTS-Update-Products-Metadata-In-Bulk.md @@ -0,0 +1,14 @@ +--- +title: Update Products' Metadata in bulk +type: endpoint +categorySlug: voucherify-api +slug: update-products-metadata-in-bulk +parentDocSlug: products +hidden: false +order: 9 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/PRODUCTS-Update-SKU.md b/reference-docs/PRODUCTS-Update-SKU.md new file mode 100644 index 00000000..0c8bc6db --- /dev/null +++ b/reference-docs/PRODUCTS-Update-SKU.md @@ -0,0 +1,14 @@ +--- +title: Update SKU +type: endpoint +categorySlug: voucherify-api +slug: update-sku +parentDocSlug: products +hidden: false +order: 15 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/PRODUCTS-Upsert-Product.md b/reference-docs/PRODUCTS-Upsert-Product.md new file mode 100644 index 00000000..df2c6a18 --- /dev/null +++ b/reference-docs/PRODUCTS-Upsert-Product.md @@ -0,0 +1,14 @@ +--- +title: Create Product +type: endpoint +categorySlug: voucherify-api +slug: create-product +parentDocSlug: products +hidden: false +order: 5 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/PRODUCTS-Upsert-SKU.md b/reference-docs/PRODUCTS-Upsert-SKU.md new file mode 100644 index 00000000..ba782070 --- /dev/null +++ b/reference-docs/PRODUCTS-Upsert-SKU.md @@ -0,0 +1,14 @@ +--- +title: Create SKU +type: endpoint +categorySlug: voucherify-api +slug: create-sku +parentDocSlug: products +hidden: false +order: 13 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/PRODUCT_COLLECTIONS__Create_Product_Collection.md b/reference-docs/PRODUCT_COLLECTIONS__Create_Product_Collection.md new file mode 100644 index 00000000..6b654330 --- /dev/null +++ b/reference-docs/PRODUCT_COLLECTIONS__Create_Product_Collection.md @@ -0,0 +1,14 @@ +--- +title: Create Product Collection +type: endpoint +categorySlug: voucherify-api +slug: create-product-collection +parentDocSlug: product-collections +hidden: false +order: 3 +--- +[block:html] +{ +"html": "" +} +[/block] diff --git a/reference-docs/PROMOTIONS-Add-Promotion-Tier-To-Campaign.md b/reference-docs/PROMOTIONS-Add-Promotion-Tier-To-Campaign.md new file mode 100644 index 00000000..7620f126 --- /dev/null +++ b/reference-docs/PROMOTIONS-Add-Promotion-Tier-To-Campaign.md @@ -0,0 +1,14 @@ +--- +title: Add Promotion Tier to Campaign +type: endpoint +categorySlug: voucherify-api +slug: add-promotion-tier-to-campaign +parentDocSlug: promotions +hidden: false +order: 5 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/PROMOTIONS-Create-Promotion-Stack.md b/reference-docs/PROMOTIONS-Create-Promotion-Stack.md new file mode 100644 index 00000000..226e33d7 --- /dev/null +++ b/reference-docs/PROMOTIONS-Create-Promotion-Stack.md @@ -0,0 +1,14 @@ +--- +title: Create Promotion Stack +type: endpoint +categorySlug: voucherify-api +slug: create-promotion-stack +parentDocSlug: promotions +hidden: false +order: 14 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/PROMOTIONS-Delete-Promotion-Stack.md b/reference-docs/PROMOTIONS-Delete-Promotion-Stack.md new file mode 100644 index 00000000..7e4c1228 --- /dev/null +++ b/reference-docs/PROMOTIONS-Delete-Promotion-Stack.md @@ -0,0 +1,14 @@ +--- +title: Delete Promotion Stack +type: endpoint +categorySlug: voucherify-api +slug: delete-promotion-stack +parentDocSlug: promotions +hidden: false +order: 16 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/PROMOTIONS-Delete-Promotion-Tier.md b/reference-docs/PROMOTIONS-Delete-Promotion-Tier.md new file mode 100644 index 00000000..2409012b --- /dev/null +++ b/reference-docs/PROMOTIONS-Delete-Promotion-Tier.md @@ -0,0 +1,14 @@ +--- +title: Delete Promotion Tier +type: endpoint +categorySlug: voucherify-api +slug: delete-promotion-tier +parentDocSlug: promotions +hidden: false +order: 8 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/PROMOTIONS-Disable-Promotion-Tier.md b/reference-docs/PROMOTIONS-Disable-Promotion-Tier.md new file mode 100644 index 00000000..569eb804 --- /dev/null +++ b/reference-docs/PROMOTIONS-Disable-Promotion-Tier.md @@ -0,0 +1,14 @@ +--- +title: Disable Promotion Tier +type: endpoint +categorySlug: voucherify-api +slug: disable-promotion-tier +parentDocSlug: promotions +hidden: false +order: 10 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/PROMOTIONS-Enable-Promotion-Tier.md b/reference-docs/PROMOTIONS-Enable-Promotion-Tier.md new file mode 100644 index 00000000..39e31d29 --- /dev/null +++ b/reference-docs/PROMOTIONS-Enable-Promotion-Tier.md @@ -0,0 +1,14 @@ +--- +title: Enable Promotion Tier +type: endpoint +categorySlug: voucherify-api +slug: enable-promotion-tier +parentDocSlug: promotions +hidden: false +order: 9 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/PROMOTIONS-Get-Promotion-Stack.md b/reference-docs/PROMOTIONS-Get-Promotion-Stack.md new file mode 100644 index 00000000..87fb64f1 --- /dev/null +++ b/reference-docs/PROMOTIONS-Get-Promotion-Stack.md @@ -0,0 +1,14 @@ +--- +title: Get Promotion Stack +type: endpoint +categorySlug: voucherify-api +slug: get-promotion-stack +parentDocSlug: promotions +hidden: false +order: 13 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/PROMOTIONS-Get-Promotion-Tier.md b/reference-docs/PROMOTIONS-Get-Promotion-Tier.md new file mode 100644 index 00000000..27e78fdc --- /dev/null +++ b/reference-docs/PROMOTIONS-Get-Promotion-Tier.md @@ -0,0 +1,14 @@ +--- +title: Get Promotion Tier +type: endpoint +categorySlug: voucherify-api +slug: get-promotion-tier +parentDocSlug: promotions +hidden: false +order: 6 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/PROMOTIONS-List-Promotion-Stacks-In-Campaign.md b/reference-docs/PROMOTIONS-List-Promotion-Stacks-In-Campaign.md new file mode 100644 index 00000000..17e31a8c --- /dev/null +++ b/reference-docs/PROMOTIONS-List-Promotion-Stacks-In-Campaign.md @@ -0,0 +1,14 @@ +--- +title: List Promotion Stacks in Campaign +type: endpoint +categorySlug: voucherify-api +slug: list-promotion-stacks-in-campaign +parentDocSlug: promotions +hidden: false +order: 12 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/PROMOTIONS-List-Promotion-Stacks.md b/reference-docs/PROMOTIONS-List-Promotion-Stacks.md new file mode 100644 index 00000000..43f49455 --- /dev/null +++ b/reference-docs/PROMOTIONS-List-Promotion-Stacks.md @@ -0,0 +1,14 @@ +--- +title: List Promotion Stacks +type: endpoint +categorySlug: voucherify-api +slug: list-all-promotion-stacks +parentDocSlug: promotions +hidden: false +order: 11 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/PROMOTIONS-List-Promotion-Tiers-From-Campaign.md b/reference-docs/PROMOTIONS-List-Promotion-Tiers-From-Campaign.md new file mode 100644 index 00000000..63a8ab78 --- /dev/null +++ b/reference-docs/PROMOTIONS-List-Promotion-Tiers-From-Campaign.md @@ -0,0 +1,14 @@ +--- +title: List Promotion Tiers from Campaign +type: endpoint +categorySlug: voucherify-api +slug: list-promotion-tiers-from-campaign +parentDocSlug: promotions +hidden: false +order: 4 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/PROMOTIONS-List-Promotion-Tiers.md b/reference-docs/PROMOTIONS-List-Promotion-Tiers.md new file mode 100644 index 00000000..1165400a --- /dev/null +++ b/reference-docs/PROMOTIONS-List-Promotion-Tiers.md @@ -0,0 +1,14 @@ +--- +title: List Promotion Tiers +type: endpoint +categorySlug: voucherify-api +slug: list-promotion-tiers +parentDocSlug: promotions +hidden: false +order: 2 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/PROMOTIONS-Promotion-Tier-Object.md b/reference-docs/PROMOTIONS-Promotion-Tier-Object.md new file mode 100644 index 00000000..b1f55311 --- /dev/null +++ b/reference-docs/PROMOTIONS-Promotion-Tier-Object.md @@ -0,0 +1,175 @@ +--- +title: Promotion Tier Object +type: basic +categorySlug: voucherify-api +parentDocSlug: promotions +slug: promotion-tier-object +hidden: false +order: 1 +--- + +## 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.

AttributesDescription
discountSee: Discount
| +| metadata
`object` |

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.

AttributesDescription
id
string

Unique campaign ID.

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-22T00: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_timeframeSee: Validity Timeframe
validity_day_of_weekSee: Validity Day Of Week
validity_hoursSee: Validity Hours
active
boolean

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 start_date and expiration_date using the Disable Campaign endpoint.

  • true indicates an active campaign
  • false indicates an inactive campaign
category_id
string

Unique category ID that this campaign belongs to.

Example:

cat_0b688929a2476386a6

object
string

The type of the object represented by the campaign object. This object stores information about the campaign.

| +| campaign_id
`string` |

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.

| +| start_date
`string` |

Activation 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.

AttributesDescription
redemptions
object

Contains statistics about promotion tier redemptions.

AttributesDescription
total_redeemed
integer

Number of times the promotion tier was redeemed.

orders
object

Contains statistics about orders related to the promotion tier.

AttributesDescription
total_amount
integer

Sum of order totals.

total_discount_amount
integer

Sum of total discount applied using the promotion tier.

| +| object
`string` |

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.

**Example:**

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.

**Example:**

P2D

| + +## Validity Day Of Week +

Integer array corresponding to the particular days of the week in which the voucher is valid.

+ +## Validity Hours +| Attributes | Description | +|:-----|:--------| +| daily
`array` |

Defines the reccuring period(s) when the resource is active. The periods should not overlap.

Array of:
AttributesDescription
start_time
string

Defines the starting hour of validity in the HH:mm format. The resource is inactive before this time.

Example:

12:00

days_of_week
array

Integer array corresponding to the particular days of the week in which the resource is valid.

  • 0 Sunday
  • 1 Monday
  • 2 Tuesday
  • 3 Wednesday
  • 4 Thursday
  • 5 Friday
  • 6 Saturday
expiration_time
string

Defines the ending hour of validity in the HH:mm format. The resource is inactive after this time.

Example:

14:00

| + +## 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.

| + +## 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.

| +| fixed_amount_formula
`string` | | +| effect |

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.

+ +One of: + +[Publications Create Voucher Response Body](#publications-create-voucher-response-body), [Publications Create Vouchers Response Body](#publications-create-vouchers-response-body) + +## Publications Create Voucher Response Body +

Response body schema for POST v1/publication and GET v1/publications/create.

+ +All of: + +1. [Publications Create Base Response Body](#publications-create-base-response-body) +2.
AttributesDescription
voucherSee: Voucher
+ +## Publications Create Vouchers Response Body +

Response body schema for POST v1/publication and GET v1/publications/create.

+ +All of: + +1. [Publications Create Base Response Body](#publications-create-base-response-body) +2.
AttributesDescription
vouchersarray

Contains the unique voucher codes that was assigned by Voucherify.

+ +## Publications Create Base Response Body +| Attributes | Description | +|:-----|:--------| +| id
`string` |

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.

Available values: `publication` | +| created_at
`string` |

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.

| +| metadata
`object` |

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.
AttributesDescription
categories
array

Contains details about the category.

Array of Category
validation_rules_assignmentsSee: Validation Rules Assignments List
+ +## Customer With Summary Loyalty Referrals +All of: + +1.

Customer Response Data

AttributesDescription
id
string

The ID of an existing customer that will be linked to redemption in this request.

source_id
string

A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored.

summaryCustomer Summary
loyaltyCustomer Loyalty
referralsCustomer Referrals
system_metadata
object

Object used to store system metadata information.

created_at
string

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

Example:

2022-08-30T06:32:07.380Z

updated_at
string

Timestamp representing the date and time when the customer was updated. The value is shown in the ISO 8601 format.

Example:

2022-08-31T06:32:07.380Z

assets
object

Contains information about the customer's cockpit.

AttributesDescription
cockpit_url
string

Customer's cockpit URL address.

object
string

The type of the object represented by JSON.

Available values: customer
+2. [Customer Base](#customer-base) + +## 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.

AttributesDescription
amount
integer

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.

Example:

10000

subtracted_amount
integer

Total amount of subtracted credits over the gift card lifetime. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents for $100.00.

balance
integer

Available funds. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents for $100.00.

Example:

500

effect
string

Defines how the credits are applied to the customer's order.

Available values: APPLY_TO_ORDER, APPLY_TO_ITEMS
| +| loyalty_card
`object` |

Object representing loyalty card parameters. Child attributes are present only if type is LOYALTY_CARD. Defaults to null.

AttributesDescription
points
integer

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.

Example:

6970

next_expiration_date
string

The next closest date when the next set of points are due to expire.

Example:

2023-05-30

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.

| +| start_date
`string` |

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.

| +| additional_info
`string` |

An 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.

| +| created_at
`string` |

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.

| +| publish
`object` |

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.

AttributesDescription
object
string

The type of the object represented is by default list. To get this list, you need to make a call to the endpoint returned in the url attribute.

count
integer

Publication events counter.

Example:

0

url
string

The endpoint where this list of publications can be accessed using a GET method. /v1/vouchers/{voucher_code}/publications

Example:

/v1/vouchers/WVPblOYX/publications?page=1&limit=10

| +| redemption
`object` |

Stores a summary of redemptions that have been applied to the voucher.

AttributesDescription
quantity
integer

How many times a voucher can be redeemed. A null value means unlimited.

redeemed_quantity
integer

How many times a voucher has already been redeemed.

Example:

1

redeemed_points
integer

Total loyalty points redeemed.

Example:

100000

object
string

The type of the object represented is by default list. To get this list, you need to make a call to the endpoint returned in the url attribute.

url
string

The endpoint where this list of redemptions can be accessed using a GET method. /v1/vouchers/{voucher_code}/redemptions

Example:

/v1/vouchers/WVPblOYX/redemptions?page=1&limit=10

| + +## 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

| + +## 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.

AttributesDescription
[propertyName]
object

Contains details about the point balances left on loyalty cards and the number of referred customers in each campaign.

AttributesDescription
points
integer

Remaining point balance in campaign.

loyalty_tier
string

Customer's loyalty tier within the campaign.

Example:

ltr_UJ5Q54Q0OvEhua87Qfv2Ki5x

referred_customers
integer

Number of customers referred by the customer in campaign.

| + +## Customer Referrals +| Attributes | Description | +|:-----|:--------| +| total
`integer` |

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:

Customer Referrals Campaigns Item

AttributesDescription
campaign_id
string

Unique campaign ID, assigned by Voucherify.

Example:

camp_rRsfatlwN7unSeUIJDCYedal

referrer_id
string

Unique referrer ID, assigned by Voucherify. This is the customer ID of a customer that is referring this customer.

Example:

cust_sehkNIi8Uq2qQuRqSr7xn4Zi

related_object_id
string

Related object id

Example:

r_0b9d4cc4aa164dd073

related_object_type
string

Related object type, i.e. redemption.

date
string

Timestamp representing the date and time when the customer was referred in ISO 8601 format.

Example:

2022-08-30T10:19:39.196Z

| + +## Customer Base +| Attributes | Description | +|:-----|:--------| +| name
`string` |

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.

AttributesDescription
city
string

City

state
string

State

line_1
string

First line of address.

line_2
string

Second line of address.

country
string

Country.

postal_code
string

Postal code.

| +| 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.

| + +## 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.

**Example:**

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.

**Example:**

P2D

| + +## Validity Day Of Week +

Integer array corresponding to the particular days of the week in which the voucher is valid.

+ +## Validity Hours +| Attributes | Description | +|:-----|:--------| +| daily
`array` |

Defines the reccuring period(s) when the resource is active. The periods should not overlap.

Array of:
AttributesDescription
start_time
string

Defines the starting hour of validity in the HH:mm format. The resource is inactive before this time.

Example:

12:00

days_of_week
array

Integer array corresponding to the particular days of the week in which the resource is valid.

  • 0 Sunday
  • 1 Monday
  • 2 Tuesday
  • 3 Wednesday
  • 4 Thursday
  • 5 Friday
  • 6 Saturday
expiration_time
string

Defines the ending hour of validity in the HH:mm format. The resource is inactive after this time.

Example:

14:00

| + +## Voucher Assets +| Attributes | Description | +|:-----|:--------| +| qr
`object` |

Stores Quick Response (QR) representation of encrypted code.

AttributesDescription
id
string

Encrypted voucher code ID.

Example:

U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK+t4pp7U7oFzjGJzj9q/bmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg+BaZk5QwXMf8k/OzSlOEVybpwSq+AiqPoNtjeuqtIgkDyvT6Q==

url
string

URL to QR code

Optional: Attach query parameters to base URL to customize the image of the encrypted voucher code.

  • size: integer value from 1 to 100
  • format: string, either png (default) or svg
Example:

https://dev.dl.voucherify.io/api/v1/assets/qr/U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK%2Bt4pp7U7oFzjGJzj9q%2FbmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg%2BBaZk5QwXMf8k%2FOzSlOEVybpwSq%2BAiqPoNtjeuqtIgkDyvT6Q%3D%3D

| +| barcode
`object` |

Stores barcode representation of encrypted code.

AttributesDescription
id
string

Encrypted voucher code ID.

Example:

U2FsdGVkX19eJhGfWwUrH9+tulBkON+AnMktic+N6CVWzZ9+fHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ+kJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6/pFs61apEn9SJx32ttCF6d3oxKISQQ==

url
string

URL to barcode

Optional: Attach query parameters to base URL to customize the image of the encrypted voucher code.

  • size: integer value from 1 to 100
  • format: string, either png (default) or svg
Example:

https://dev.dl.voucherify.io/api/v1/assets/barcode/U2FsdGVkX19eJhGfWwUrH9%2BtulBkON%2BAnMktic%2BN6CVWzZ9%2BfHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ%2BkJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6%2FpFs61apEn9SJx32ttCF6d3oxKISQQ%3D%3D

| + +## 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

| + +## 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.

AttributesDescription
redeemed_amount
integer

Total amount of gift card credits redeemed by customer. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents for $100.00.

amount_to_go
integer

Remaining gift card balance across all gift cards. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents for $100.00.

| +| loyalty_card
`object` |

Summary of loyalty points.

AttributesDescription
redeemed_points
integer

Total number of loyalty points redeemed by the customer.

points_to_go
integer

Sum of remaining available point balance across all loyalty cards.

| + +## Customer Summary Orders +| Attributes | Description | +|:-----|:--------| +| total_amount
`integer` |

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_count
`integer` |

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.

| +| last_order_amount
`integer` |

Amount spent on last order. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents for $100.00.

| +| last_order_date
`string` |

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.

| +| fixed_amount_formula
`string` | | +| effect |

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.
AttributesDescription
items
array

Array of items applied to the order. It can include up to 500 items.

| +| stacking_rules | See: [Stacking Rules](#stacking-rules) | + +## Redeemables +| Attributes | Description | +|:-----|:--------| +| object
`string` |

The type of the object represented by JSON. Default is list.

Available values: `list` | +| data_ref
`string` |

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.

| +| more_starting_after
`string` |

Timestamp representing the date and time to use in starting_after cursor to get more redeemables.

**Example:**

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)

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

| +| 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` | +| 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` |
AttributesDescription
[propertyName]See: Order Redemptions
| + +## Stacking Rules +| Attributes | Description | +|:-----|:--------| +| redeemables_limit
`integer` |

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.

| +| applicable_redeemables_per_category_limit
`integer` |

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.

| +| applicable_exclusive_redeemables_limit
`integer` |

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.

| +| applicable_exclusive_redeemables_per_category_limit
`integer` |

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.

| +| exclusive_categories
`array` |

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.

Available values: `ALL`, `PARTIAL` | +| redeemables_sorting_rule
`string` |

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.

Available values: `CATEGORY_HIERARCHY`, `REQUESTED_ORDER` | +| redeemables_products_application_mode
`string` |

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.

Available values: `STACK`, `ONCE` | +| redeemables_no_effect_rule
`string` |

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.

Available values: `REDEEM_ANYWAY`, `SKIP` | +| no_effect_skip_categories
`array` |

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.

| +| no_effect_redeem_anyway_categories
`array` |

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.

| +| redeemables_rollback_order_mode
`string` |

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.

Available values: `WITH_ORDER`, `WITHOUT_ORDER` | + +## Combined response of redeemable object and multiple redeemables within +All of: + +1. [Single redeemable](#single-redeemable) +2.
AttributesDescription
redeemables
array
Array of Single redeemable
+ +## 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.

| + +## 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.
AttributesDescription
items
array

Array of items applied to the order. It can include up to 500 items.

| +| validation_rule_id
`string` |

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

**Example:**

PromotionCampaign

| +| campaign_id
`string` |

Id of the campaign associated to the redeemable. This field is available only if object is not campaign

**Example:**

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

+ +All of: + +1. [Category](#category) +2.
AttributesDescription
stacking_rules_type
string

The type of the stacking rule eligibility.

Available values: JOINT, EXCLUSIVE
+ +## 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) + +## 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.

| +| limit
`integer` |

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:
AttributesDescription
id
string

Unique identifier of the product or SKU that meets the bundle condition. This is an ID assigned by Voucherify.

object
string

Determines the type of the object that meets the bundle condition.

Available values: product, sku
item_index
integer

Number assigned to the order line item in accordance with the order sent in the request. It starts with 0 for the first order line item in the request.

item_quantity
integer

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 5 coffees, but the order includes 10 coffees, item_quantity returns 5.

| +| missing
`array` |

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:
AttributesDescription
id
string

Unique identifier of the collection, product, or SKU that is missing in the customer's order items. This is an ID assigned by Voucherify.

object
string

Determines the type of the object that is missing in the customer's order items.

Available values: product, products_collection, sku
item_quantity
integer

Quantity of items that are missing in the order items to meet the bundle conditions.

| + +## Redeemable Gift +| Attributes | Description | +|:-----|:--------| +| balance
`number` |

Available funds. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents for $100.00.

| +| credits
`number` |

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.

| +| locked_credits
`number` |

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.

| + +## Redeemable Loyalty Card +| Attributes | Description | +|:-----|:--------| +| points
`integer` |

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.

**Example:**

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.

AttributesDescription
message
string

The message configured by the user in a validation rule.

| + +## 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:

| +| order_item_indices
`array` |

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.

| +| order_item_units
`array` |

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.

Array of:
AttributesDescription
index
integer

Number assigned to the order line item in accordance with the order sent in the request.

units
array

Numbers of units in the order line covered by the discount; e.g. 2, 5, 8 for 10 units with the setting "skip_initially": 1, "repeat": 3. The counting of units starts from 1. The maximum quantity of all handled units is 1000. If the quantity of all order items exceeds 1000, this array is not returned, but units_limit_exceeded: true. However, the discount is calculated properly for all relevant units.

units_limit_exceeded
boolean

Returned as true only when the sum total of quantity of all order items exceeds 1000.

| +| repeat
`integer` |

Determines the recurrence of the discount, e.g. "repeat": 3 means that the discount is applied to every third item.

| +| skip_initially
`integer` |

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.

Available values: `ITEM`, `UNIT` | + +## Inapplicable To +[Applicable To](#applicable-to) + +## 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

| + +## 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.

| +| fixed_amount_formula
`string` | | +| effect |

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.
AttributesDescription
items
array

Array of items applied to the order. It can include up to 500 items.

| +| 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".

Array of [Skipped Redeemable](#skipped-redeemable) | + +## Redemption +

This is an object representing a redemption for POST v1/redemptions and POST /client/v1/redemptions.

+ +All of: + +1. [Redemption Base](#redemption-base) +2.
AttributesDescription
voucher

Defines the details of the voucher being redeemed.

All of: 1. Voucher with categories and validation rules assignments
  1. Voucher Holder |
+ +## 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)

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

| +| 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` | +| 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` |
AttributesDescription
[propertyName]See: Order Redemptions
| + +## Inapplicable Redeemable +| Attributes | Description | +|:-----|:--------| +| status
`string` |

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

AttributesDescription
errorSee: Error Object
details
object

Provides details about the reason why the redeemable is inapplicable.

AttributesDescription
message
string

Generic message from the message string shown in the error object or the message configured in a validation rule.

key
string

Generic message from the key string shown in the error object.

bundleSee: Bundle Details
| +| metadata
`object` |

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.

| +| campaign_id
`string` |

Unique campaign ID assigned by Voucherify. Displayed only if the options.expand is passed with a redeemable value in the validation request body.

**Example:**

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.

| + +## Skipped Redeemable +| Attributes | Description | +|:-----|:--------| +| status
`string` |

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.

AttributesDescription
detailsOne of: Validations Redeemable Skipped Result Limit Exceeded, Validations Redeemable Skipped Result Category Limit Exceeded, Validations Redeemable Skipped Result Redeemables Limit Exceeded, Validations Redeemable Skipped Result Redeemables Category Limit Exceeded, Validations Redeemable Skipped Result Exclusion Rules Not Met, Validations Redeemable Skipped Result Preceding Validation Failed
| +| metadata
`object` |

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.

| +| campaign_id
`string` |

Unique campaign ID assigned by Voucherify. Displayed only if the options.expand is passed with a redeemable value in the validation request body.

**Example:**

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.

| + +## Redemption Base +| Attributes | Description | +|:-----|:--------| +| id
`string` |

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.

**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` | +| session
`object` |

Contains details about the redemption session lock. Sessions can be established only for discount vouchers, promotions, and gift cards.

AttributesDescription
key
string

The session unique ID assigned by Voucherify or your own unique session ID sent in the request.

| +| related_redemptions
`object` |
AttributesDescription
rollbacks
array
Array of:

Redemption Related Redemptions Rollbacks Item

AttributesDescription
id
string

Unique rollback redemption ID.

Example:

rr_0bc92f81a6801f9bca

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

rollback_order_mode
string

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. This is returned only in GET v1/redemptions/ and GET v1/redemptions/{redemptionId} endpoints.

Available values: WITH_ORDER, WITHOUT_ORDER
redemptions
array
Array of:

Redemption Related Redemptions Item

AttributesDescription
id
string

Unique redemption ID.

Example:

r_0bc92f81a6801f9bca

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

| +| failure_code
`string` |

If the result is FAILURE, this parameter will provide a generic reason as to why the redemption failed.

**Example:**

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.

| +| order | All of: 1. [Order Calculated No Customer Data](#order-calculated-no-customer-data) +2.
AttributesDescription
items
array

Array of items applied to the order. It can include up to 500 items.

| +| channel
`object` |

Defines the details of the channel through which the redemption was issued.

AttributesDescription
channel_id
string

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 AUTO_REDEEM, it is the reward assignment ID.

Example:

user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH

channel_type
string

The source of the channel for the redemption. A USER corresponds to the Voucherify Dashboard, API corresponds to the API, and AUTO_REDEEM corresponds to a loyalty campaign reward that has been redeemed automatically.

Available values: USER, API, AUTO_REDEEM
| +| customer | [Simple Customer](#simple-customer) | +| related_object_type
`string` |

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.

AttributesDescription
amount
integer

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).

| +| loyalty_card
`object` |

Contains the number of points subtracted from the loyalty card for the redemption.

AttributesDescription
points
integer

Number of points subtracted from the loyalty card as a result of the redemption.

| + +## Voucher with categories and validation rules assignments +

This is an object representing a voucher with categories and validation rules assignments for POST v1/qualifications, POST v1/redemptions, and POST v1/validations.

+ +All of: + +1. [Voucher Base](#voucher-base) +2.
AttributesDescription
categories
array

Contains details about the category.

Array of Category with Stacking Rules Type
validation_rules_assignmentsSee: Validation Rules Assignments List
+ +## Voucher Holder +| Attributes | Description | +|:-----|:--------| +| holder | See: [Simple Customer](#simple-customer) | + +## 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.

| + +## 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.

AttributesDescription
message
string

The message configured by the user in a validation rule.

| + +## 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.

| +| limit
`integer` |

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:
AttributesDescription
id
string

Unique identifier of the product or SKU that meets the bundle condition. This is an ID assigned by Voucherify.

object
string

Determines the type of the object that meets the bundle condition.

Available values: product, sku
item_index
integer

Number assigned to the order line item in accordance with the order sent in the request. It starts with 0 for the first order line item in the request.

item_quantity
integer

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 5 coffees, but the order includes 10 coffees, item_quantity returns 5.

| +| missing
`array` |

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:
AttributesDescription
id
string

Unique identifier of the collection, product, or SKU that is missing in the customer's order items. This is an ID assigned by Voucherify.

object
string

Determines the type of the object that is missing in the customer's order items.

Available values: product, products_collection, sku
item_quantity
integer

Quantity of items that are missing in the order items to meet the bundle conditions.

| + +## Category with Stacking Rules Type +

Category object with stacking_rules_type

+ +All of: + +1. [Category](#category) +2.
AttributesDescription
stacking_rules_type
string

The type of the stacking rule eligibility.

Available values: JOINT, EXCLUSIVE
+ +## Validations Redeemable Skipped Result Limit Exceeded +| Attributes | Description | +|:-----|:--------| +| key
`string` | Available values: `applicable_redeemables_limit_exceeded` | +| message
`string` | **Example:**

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.

AttributesDescription
discountSee: Discount
| +| metadata
`object` |

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.

AttributesDescription
id
string

Unique campaign ID.

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-22T00: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_timeframeSee: Validity Timeframe
validity_day_of_weekSee: Validity Day Of Week
validity_hoursSee: Validity Hours
active
boolean

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 start_date and expiration_date using the Disable Campaign endpoint.

  • true indicates an active campaign
  • false indicates an inactive campaign
category_id
string

Unique category ID that this campaign belongs to.

Example:

cat_0b688929a2476386a6

object
string

The type of the object represented by the campaign object. This object stores information about the campaign.

| +| campaign_id
`string` |

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.

| +| start_date
`string` |

Activation 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.

AttributesDescription
redemptions
object

Contains statistics about promotion tier redemptions.

AttributesDescription
total_redeemed
integer

Number of times the promotion tier was redeemed.

orders
object

Contains statistics about orders related to the promotion tier.

AttributesDescription
total_amount
integer

Sum of order totals.

total_discount_amount
integer

Sum of total discount applied using the promotion tier.

| +| object
`string` |

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.

AttributesDescription
campaign
object

Defines the product redeemed as a reward.

AttributesDescription
id
string

Campaign unique ID.

Example:

camp_13BbZ0kQsNinhqsX3wUts2UP

balance
integer

Points available for reward redemption. This is calculated as follows: balance = points - expired_points - subtracted_points - redemption.redeemed_points.

type
string

Defines the type of the campaign.

product
object

Defines the product redeemed as a reward.

AttributesDescription
id
string

Unique product ID, assigned by Voucherify.

Example:

prod_0b7d7dfb05cbe5c616

sku_id
string

Unique identifier of the SKU. It is assigned by Voucherify.

Example:

sku_0a41e31c7b41c28358

coin
object

Defines the ratio by mapping the number of loyalty points in points_ratio to a predefined cash amount in exchange_ratio.

AttributesDescription
exchange_ratio
integer

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.

| +| 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` | + +## 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.

AttributesDescription
amount
integer

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.

Example:

10000

subtracted_amount
integer

Total amount of subtracted credits over the gift card lifetime. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents for $100.00.

balance
integer

Available funds. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents for $100.00.

Example:

500

effect
string

Defines how the credits are applied to the customer's order.

Available values: APPLY_TO_ORDER, APPLY_TO_ITEMS
| +| loyalty_card
`object` |

Object representing loyalty card parameters. Child attributes are present only if type is LOYALTY_CARD. Defaults to null.

AttributesDescription
points
integer

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.

Example:

6970

next_expiration_date
string

The next closest date when the next set of points are due to expire.

Example:

2023-05-30

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.

| +| start_date
`string` |

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.

| +| additional_info
`string` |

An 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.

| +| created_at
`string` |

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.

| +| publish
`object` |

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.

AttributesDescription
object
string

The type of the object represented is by default list. To get this list, you need to make a call to the endpoint returned in the url attribute.

count
integer

Publication events counter.

Example:

0

url
string

The endpoint where this list of publications can be accessed using a GET method. /v1/vouchers/{voucher_code}/publications

Example:

/v1/vouchers/WVPblOYX/publications?page=1&limit=10

| +| redemption
`object` |

Stores a summary of redemptions that have been applied to the voucher.

AttributesDescription
quantity
integer

How many times a voucher can be redeemed. A null value means unlimited.

redeemed_quantity
integer

How many times a voucher has already been redeemed.

Example:

1

redeemed_points
integer

Total loyalty points redeemed.

Example:

100000

object
string

The type of the object represented is by default list. To get this list, you need to make a call to the endpoint returned in the url attribute.

url
string

The endpoint where this list of redemptions can be accessed using a GET method. /v1/vouchers/{voucher_code}/redemptions

Example:

/v1/vouchers/WVPblOYX/redemptions?page=1&limit=10

| + +## 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.

| + +## 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.

**Example:**

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.

**Example:**

P2D

| + +## Validity Day Of Week +

Integer array corresponding to the particular days of the week in which the voucher is valid.

+ +## Validity Hours +| Attributes | Description | +|:-----|:--------| +| daily
`array` |

Defines the reccuring period(s) when the resource is active. The periods should not overlap.

Array of:
AttributesDescription
start_time
string

Defines the starting hour of validity in the HH:mm format. The resource is inactive before this time.

Example:

12:00

days_of_week
array

Integer array corresponding to the particular days of the week in which the resource is valid.

  • 0 Sunday
  • 1 Monday
  • 2 Tuesday
  • 3 Wednesday
  • 4 Thursday
  • 5 Friday
  • 6 Saturday
expiration_time
string

Defines the ending hour of validity in the HH:mm format. The resource is inactive after this time.

Example:

14:00

| + +## 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.

| + +## Voucher +

This is an object representing a voucher with categories and validation rules assignments.

+ +All of: + +1. [Voucher Base](#voucher-base) +2.
AttributesDescription
categories
array

Contains details about the category.

Array of Category
validation_rules_assignmentsSee: Validation Rules Assignments List
+ +## 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.
AttributesDescription
skusSee: Skus List For 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.

| +| currency
`string`, `null` |

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.

Available values: `sku` | + +## Voucher Assets +| Attributes | Description | +|:-----|:--------| +| qr
`object` |

Stores Quick Response (QR) representation of encrypted code.

AttributesDescription
id
string

Encrypted voucher code ID.

Example:

U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK+t4pp7U7oFzjGJzj9q/bmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg+BaZk5QwXMf8k/OzSlOEVybpwSq+AiqPoNtjeuqtIgkDyvT6Q==

url
string

URL to QR code

Optional: Attach query parameters to base URL to customize the image of the encrypted voucher code.

  • size: integer value from 1 to 100
  • format: string, either png (default) or svg
Example:

https://dev.dl.voucherify.io/api/v1/assets/qr/U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK%2Bt4pp7U7oFzjGJzj9q%2FbmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg%2BBaZk5QwXMf8k%2FOzSlOEVybpwSq%2BAiqPoNtjeuqtIgkDyvT6Q%3D%3D

| +| barcode
`object` |

Stores barcode representation of encrypted code.

AttributesDescription
id
string

Encrypted voucher code ID.

Example:

U2FsdGVkX19eJhGfWwUrH9+tulBkON+AnMktic+N6CVWzZ9+fHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ+kJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6/pFs61apEn9SJx32ttCF6d3oxKISQQ==

url
string

URL to barcode

Optional: Attach query parameters to base URL to customize the image of the encrypted voucher code.

  • size: integer value from 1 to 100
  • format: string, either png (default) or svg
Example:

https://dev.dl.voucherify.io/api/v1/assets/barcode/U2FsdGVkX19eJhGfWwUrH9%2BtulBkON%2BAnMktic%2BN6CVWzZ9%2BfHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ%2BkJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6%2FpFs61apEn9SJx32ttCF6d3oxKISQQ%3D%3D

| + +## 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.

| +| fixed_amount_formula
`string` | | +| effect |

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.

| +| attributes
`array` |

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.

| +| 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. 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.

**Example:**

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

**Example:**

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.

| +| order | All of: 1. [Order Calculated No Customer Data](#order-calculated-no-customer-data) +2.
AttributesDescription
items
array

Array of items applied to the order. It can include up to 500 items.

Array of Order Item Calculated
| +| channel
`object` |

Defines the details of the channel through which the redemption was issued.

AttributesDescription
channel_id
string

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_type
string

The source of the channel for the redemption. A USER corresponds to the Voucherify Dashboard and an API corresponds to the API.

Available values: USER, API
| +| customer | [Simple Customer](#simple-customer) | +| related_object_type
`string` |

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.

| +| 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.

AttributesDescription
amount
integer

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).

| +| loyalty_card
`object` |

Contains the number of points returned to the loyalty card in the reward redemption rollback. It is expressed as a negative integer.

AttributesDescription
points
integer

Number of points being returned to the loyalty card for the reward redemption rollback. It is expressed as a negative integer.

| + +## 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)

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

| +| 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` | +| 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` |
AttributesDescription
[propertyName]See: Order Redemptions
| + +## Order Item Calculated +| Attributes | Description | +|:-----|:--------| +| id
`string` |

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.

| +| subtotal_amount
`integer` |

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

| +| product
`object` |

An object containing details of the related product.

AttributesDescription
id
string

A unique identifier that represents the product and is assigned by Voucherify.

source_id
string

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.

override
boolean

The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system.

name
string

Product name.

metadata
object

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.

price
number

Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| sku
`object` |

An object containing details of the related SKU.

AttributesDescription
id
string

A unique identifier that represents the SKU and is assigned by Voucherify.

source_id
string

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.

override
boolean

The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system.

sku
string

The SKU name.

price
number

SKU price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00).

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. It can be used to create product collections.

| +| object
`string` |

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.
AttributesDescription
categories
array

Contains details about the category.

Array of Category
validation_rules_assignmentsSee: Validation Rules Assignments List
+ +## 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.

AttributesDescription
discountSee: Discount
| +| metadata
`object` |

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.

AttributesDescription
id
string

Unique campaign ID.

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-22T00: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_timeframeSee: Validity Timeframe
validity_day_of_weekSee: Validity Day Of Week
validity_hoursSee: Validity Hours
active
boolean

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 start_date and expiration_date using the Disable Campaign endpoint.

  • true indicates an active campaign
  • false indicates an inactive campaign
category_id
string

Unique category ID that this campaign belongs to.

Example:

cat_0b688929a2476386a6

object
string

The type of the object represented by the campaign object. This object stores information about the campaign.

| +| campaign_id
`string` |

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.

| +| start_date
`string` |

Activation 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.

AttributesDescription
redemptions
object

Contains statistics about promotion tier redemptions.

AttributesDescription
total_redeemed
integer

Number of times the promotion tier was redeemed.

orders
object

Contains statistics about orders related to the promotion tier.

AttributesDescription
total_amount
integer

Sum of order totals.

total_discount_amount
integer

Sum of total discount applied using the promotion tier.

| +| object
`string` |

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.

AttributesDescription
campaign
object

Defines the product redeemed as a reward.

AttributesDescription
id
string

Campaign unique ID.

Example:

camp_13BbZ0kQsNinhqsX3wUts2UP

balance
integer

Points available for reward redemption. This is calculated as follows: balance = points - expired_points - subtracted_points - redemption.redeemed_points.

type
string

Defines the type of the campaign.

product
object

Defines the product redeemed as a reward.

AttributesDescription
id
string

Unique product ID, assigned by Voucherify.

Example:

prod_0b7d7dfb05cbe5c616

sku_id
string

Unique identifier of the SKU. It is assigned by Voucherify.

Example:

sku_0a41e31c7b41c28358

coin
object

Defines the ratio by mapping the number of loyalty points in points_ratio to a predefined cash amount in exchange_ratio.

AttributesDescription
exchange_ratio
integer

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.

| +| 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` | + +## 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.

AttributesDescription
amount
integer

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.

Example:

10000

subtracted_amount
integer

Total amount of subtracted credits over the gift card lifetime. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents for $100.00.

balance
integer

Available funds. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents for $100.00.

Example:

500

effect
string

Defines how the credits are applied to the customer's order.

Available values: APPLY_TO_ORDER, APPLY_TO_ITEMS
| +| loyalty_card
`object` |

Object representing loyalty card parameters. Child attributes are present only if type is LOYALTY_CARD. Defaults to null.

AttributesDescription
points
integer

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.

Example:

6970

next_expiration_date
string

The next closest date when the next set of points are due to expire.

Example:

2023-05-30

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.

| +| start_date
`string` |

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.

| +| additional_info
`string` |

An 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.

| +| created_at
`string` |

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.

| +| publish
`object` |

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.

AttributesDescription
object
string

The type of the object represented is by default list. To get this list, you need to make a call to the endpoint returned in the url attribute.

count
integer

Publication events counter.

Example:

0

url
string

The endpoint where this list of publications can be accessed using a GET method. /v1/vouchers/{voucher_code}/publications

Example:

/v1/vouchers/WVPblOYX/publications?page=1&limit=10

| +| redemption
`object` |

Stores a summary of redemptions that have been applied to the voucher.

AttributesDescription
quantity
integer

How many times a voucher can be redeemed. A null value means unlimited.

redeemed_quantity
integer

How many times a voucher has already been redeemed.

Example:

1

redeemed_points
integer

Total loyalty points redeemed.

Example:

100000

object
string

The type of the object represented is by default list. To get this list, you need to make a call to the endpoint returned in the url attribute.

url
string

The endpoint where this list of redemptions can be accessed using a GET method. /v1/vouchers/{voucher_code}/redemptions

Example:

/v1/vouchers/WVPblOYX/redemptions?page=1&limit=10

| + +## 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

| + +## 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.

**Example:**

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.

**Example:**

P2D

| + +## Validity Day Of Week +

Integer array corresponding to the particular days of the week in which the voucher is valid.

+ +## Validity Hours +| Attributes | Description | +|:-----|:--------| +| daily
`array` |

Defines the reccuring period(s) when the resource is active. The periods should not overlap.

Array of:
AttributesDescription
start_time
string

Defines the starting hour of validity in the HH:mm format. The resource is inactive before this time.

Example:

12:00

days_of_week
array

Integer array corresponding to the particular days of the week in which the resource is valid.

  • 0 Sunday
  • 1 Monday
  • 2 Tuesday
  • 3 Wednesday
  • 4 Thursday
  • 5 Friday
  • 6 Saturday
expiration_time
string

Defines the ending hour of validity in the HH:mm format. The resource is inactive after this time.

Example:

14:00

| + +## 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.

| + +## 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.
AttributesDescription
skusSee: Skus List For 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.

| +| currency
`string`, `null` |

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.

Available values: `sku` | + +## Voucher Assets +| Attributes | Description | +|:-----|:--------| +| qr
`object` |

Stores Quick Response (QR) representation of encrypted code.

AttributesDescription
id
string

Encrypted voucher code ID.

Example:

U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK+t4pp7U7oFzjGJzj9q/bmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg+BaZk5QwXMf8k/OzSlOEVybpwSq+AiqPoNtjeuqtIgkDyvT6Q==

url
string

URL to QR code

Optional: Attach query parameters to base URL to customize the image of the encrypted voucher code.

  • size: integer value from 1 to 100
  • format: string, either png (default) or svg
Example:

https://dev.dl.voucherify.io/api/v1/assets/qr/U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK%2Bt4pp7U7oFzjGJzj9q%2FbmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg%2BBaZk5QwXMf8k%2FOzSlOEVybpwSq%2BAiqPoNtjeuqtIgkDyvT6Q%3D%3D

| +| barcode
`object` |

Stores barcode representation of encrypted code.

AttributesDescription
id
string

Encrypted voucher code ID.

Example:

U2FsdGVkX19eJhGfWwUrH9+tulBkON+AnMktic+N6CVWzZ9+fHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ+kJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6/pFs61apEn9SJx32ttCF6d3oxKISQQ==

url
string

URL to barcode

Optional: Attach query parameters to base URL to customize the image of the encrypted voucher code.

  • size: integer value from 1 to 100
  • format: string, either png (default) or svg
Example:

https://dev.dl.voucherify.io/api/v1/assets/barcode/U2FsdGVkX19eJhGfWwUrH9%2BtulBkON%2BAnMktic%2BN6CVWzZ9%2BfHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ%2BkJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6%2FpFs61apEn9SJx32ttCF6d3oxKISQQ%3D%3D

| + +## 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.

| +| fixed_amount_formula
`string` | | +| effect |

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.

| +| attributes
`array` |

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.

| +| 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. 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".

Array of [Skipped Redeemable](#skipped-redeemable) | + +## Redemption +| Attributes | Description | +|:-----|:--------| +| id
`string` |

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` |
AttributesDescription
rollbacks
array
Array of:

Redemption Related Redemptions Rollbacks Item

AttributesDescription
id
string

Unique rollback redemption ID.

Example:

rr_0bc92f81a6801f9bca

date
string

Timestamp representing the date and time when the object was created in ISO 8601 format.

Example:

2021-12-22T10:13:06.487Z

redemptions
array
Array of:

Redemption Related Redemptions Item

AttributesDescription
id
string

Unique redemption ID.

Example:

r_0bc92f81a6801f9bca

date
string

Timestamp representing the date and time when the object was created in ISO 8601 format.

Example:

2021-12-22T10:13:06.487Z

| +| failure_code
`string` |

If the result is FAILURE, this parameter will provide a generic reason as to why the redemption failed.

**Example:**

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.

| +| order | [Order Calculated No Customer Data](#order-calculated-no-customer-data) | +| channel
`object` |

Defines the details of the channel through which the redemption was issued.

AttributesDescription
channel_id
string

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_type
string

The source of the channel for the redemption. A USER corresponds to the Voucherify Dashboard and an API corresponds to the API.

Available values: USER, API
| +| customer | [Simple Customer](#simple-customer) | +| related_object_type
`string` |

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.

AttributesDescription
amount
integer

The amount subtracted from the gift card expressed as the smallest currency unit (e.g. 100 cents for $1.00).

| +| loyalty_card
`object` |

Stores the number of points being added back to the loyalty card for the reward redemption rollback.

AttributesDescription
points
integer

Number of points being added back to the loyalty card for the reward redemption rollback.

| + +## Order Calculated +All of: + +1. [Order Response Base](#order-response-base) +2.

Order Calculated

AttributesDescription
customerOne of: Customer With Summary Loyalty Referrals, Customer Id
referrerOne of: Referrer With Summary Loyalty Referrals, Referrer Id
+ +## Inapplicable Redeemable +| Attributes | Description | +|:-----|:--------| +| status
`string` |

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` |
AttributesDescription
errorSee: Error Object
| + +## Skipped Redeemable +| Attributes | Description | +|:-----|:--------| +| status
`string` |

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` |
AttributesDescription
| + +## Order Calculated No Customer Data +All of: + +1. [Order Response Base](#order-response-base) +2.

Order Customer And Referrer Ids Objects

AttributesDescription
customer

If only customer_id was provided, customer return data will be limited.

Customer Id
referrer

If only referrer_id was provided, referrer return data will be limited.

Referrer Id
+ +## Simple Customer +| Attributes | Description | +|:-----|:--------| +| id
`string` |

The ID of an existing customer that will be linked to redemption in this request.

| +| source_id
`string` |

A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored.

| +| 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.

AttributesDescription
amount
integer

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

balance
integer

Available funds. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000.

Example:

500

effect
string

Defines how the credits are applied to the customer's order.

Available values: APPLY_TO_ORDER, APPLY_TO_ITEMS
| +| loyalty_card
`object` |

Object representing loyalty card parameters. Child attributes are present only if type is LOYALTY_CARD. Defaults to null.

AttributesDescription
points
integer

Total points incurred over lifespan of loyalty card.

Example:

7000

balance
integer

Points available for reward redemption.

Example:

6970

next_expiration_date
string

The next closest date when the next set of points are due to expire.

Example:

2023-05-30

next_expiration_points
integer

The amount of points that are set to expire next.

| +| start_date
`string` |

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.

AttributesDescription
duration
string

Defines the amount of time the voucher will be active in ISO 8601 format. For example, a voucher with a duration of PT1H will be valid for a duration of one hour.

Example:

PT1H

interval
string

Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a voucher with an interval of P2D will be active every other day.

Example:

P2D

| +| validity_day_of_week
`array` |

Integer array corresponding to the particular days of the week in which the voucher is valid.

| +| 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.

| +| additional_info
`string` |

An 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.

| +| created_at
`string` |

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.

| +| distributions
`array` | Array of: | +| deleted
`boolean` |

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.

RequiredOptional
type:LOYALTY_CARDtype:DISCOUNT_VOUCHER
is_referral_code:truetype:GIFT_VOUCHER
AttributesDescription
object
string

The type of object represented is by default list. To get this list, you need to make a call to the endpoint returned in the url attribute.

count
integer

Publication events counter.

Example:

0

url
string

The endpoint where this list of publications can be accessed using a GET method. /v1/vouchers/{voucher_code}/publications

Example:

/v1/vouchers/WVPblOYX/publications?page=1&limit=10

| +| redemption
`object` |

Stores a summary of redemptions that have been applied to the voucher.

AttributesDescription
quantity
integer

How many times a voucher can be redeemed. A null value means unlimited.

redeemed_quantity
integer

How many times a voucher has already been redeemed.

Example:

1

redeemed_amount
integer

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_points
integer

Total loyalty points redeemed.

Example:

100000

object
string

The type of object represented is by default list. To get this list, you need to make a call to the endpoint returned in the url attribute.

url
string

The endpoint where this list of redemptions can be accessed using a GET method. /v1/vouchers/{voucher_code}/redemptions

Example:

/v1/vouchers/WVPblOYX/redemptions?page=1&limit=10

| + +## 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 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.

AttributesDescription
discountSee: Discount
| +| metadata
`object` |

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.

AttributesDescription
id
string

Unique campaign ID.

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-22T00: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
object

Recurrent time periods when the campaign is valid. For example, valid for 1 hour every other day.

AttributesDescription
interval
string

Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a campaign with an interval of P2D will be active every other day.

duration
string

Defines the amount of time the campaign will be active in ISO 8601 format. For example, a campaign with a duration of P1D will be valid for a duration of one day.

validity_day_of_week
array

Integer array corresponding to the particular days of the week in which the campaign is valid.

  • 0 Sunday
  • 1 Monday
  • 2 Tuesday
  • 3 Wednesday
  • 4 Thursday
  • 5 Friday
  • 6 Saturday
active
boolean

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 start_date and expiration_date using the Disable Campaign endpoint.

  • true indicates an active campaign
  • false indicates an inactive campaign
category_id
string

Unique category ID that this campaign belongs to.

Example:

cat_0b688929a2476386a6

object
string

The type of object represented by the campaign object. This object stores information about the campaign.

| +| campaign_id
`string` |

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.

| +| start_date
`string` |

Activation 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.

AttributesDescription
interval
string

Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a promotion tier with an interval of P2D will be active every other day.

duration
string

Defines the amount of time the promotion tier will be active in ISO 8601 format. For example, a promotion tier with a duration of P1D will be valid for a duration of one day.

| +| validity_day_of_week
`array` |

Integer array corresponding to the particular days of the week in which the promotion tier is valid.

| +| summary
`object` |

Contains statistics about promotion tier redemptions and orders.

AttributesDescription
redemptions
object

Contains statistics about promotion tier redemptions.

AttributesDescription
total_redeemed
integer

Number of times the promotion tier was redeemed.

orders
object

Contains statistics about orders related to the promotion tier.

AttributesDescription
total_amount
integer

Sum of order totals.

total_discount_amount
integer

Sum of total discount applied using the promotion tier.

| +| object
`string` |

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.

AttributesDescription
campaign
object

Defines the product redeemed as a reward.

AttributesDescription
id
string

Campaign unique ID.

Example:

camp_13BbZ0kQsNinhqsX3wUts2UP

balance
integer

Points available for reward redemption.

type
string

Defines the type of the campaign.

product
object

Defines the product redeemed as a reward.

AttributesDescription
id
string

Unique product ID, assigned by Voucherify.

Example:

prod_0b7d7dfb05cbe5c616

sku_id
string

A unique SKU ID assigned by Voucherify.

Example:

sku_0a41e31c7b41c28358

coin
object

Defines the ratio by mapping the number of loyalty points in points_ratio to a predefined cash amount in exchange_ratio.

AttributesDescription
exchange_ratio
integer

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.

| +| type
`string` |

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)

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

| +| items
`array` |

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` |
AttributesDescription
[propertyName]See: Order Redemptions
| + +## Customer With Summary Loyalty Referrals +All of: + +1.

Customer Response Data

AttributesDescription
id
string

The ID of an existing customer that will be linked to redemption in this request.

source_id
string

A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored.

summaryCustomer Summary
loyaltyCustomer Loyalty
referralsCustomer Referrals
system_metadata
object

Object used to store system metadata information.

created_at
string

Timestamp representing the date and time when the customer was created in ISO 8601 format.

Example:

2022-08-30T06:32:07.380Z

updated_at
string

Timestamp representing the date and time when the customer was updated in ISO 8601 format.

Example:

2022-08-31T06:32:07.380Z

assets
object

Contains information about the customer's cockpit.

AttributesDescription
cockpit_url
string

Customer's cockpit URL address.

object
string

The type of object represented by JSON.

Available values: customer
+2. [Customer Base](#customer-base) + +## Customer Id +| Attributes | Description | +|:-----|:--------| +| id
`string` |

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.

AttributesDescription
id
string

Encrypted voucher code ID.

Example:

U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK+t4pp7U7oFzjGJzj9q/bmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg+BaZk5QwXMf8k/OzSlOEVybpwSq+AiqPoNtjeuqtIgkDyvT6Q==

url
string

URL to QR code

Optional: Attach query parameters to base URL to customize the image of the encrypted voucher code.

  • size: integer value from 1 to 100
  • format: string, either png (default) or svg
Example:

https://dev.dl.voucherify.io/api/v1/assets/qr/U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK%2Bt4pp7U7oFzjGJzj9q%2FbmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg%2BBaZk5QwXMf8k%2FOzSlOEVybpwSq%2BAiqPoNtjeuqtIgkDyvT6Q%3D%3D

| +| barcode
`object` |

Stores barcode representation of encrypted code.

AttributesDescription
id
string

Encrypted voucher code ID.

Example:

U2FsdGVkX19eJhGfWwUrH9+tulBkON+AnMktic+N6CVWzZ9+fHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ+kJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6/pFs61apEn9SJx32ttCF6d3oxKISQQ==

url
string

URL to barcode

Optional: Attach query parameters to base URL to customize the image of the encrypted voucher code.

  • size: integer value from 1 to 100
  • format: string, either png (default) or svg
Example:

https://dev.dl.voucherify.io/api/v1/assets/barcode/U2FsdGVkX19eJhGfWwUrH9%2BtulBkON%2BAnMktic%2BN6CVWzZ9%2BfHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ%2BkJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6%2FpFs61apEn9SJx32ttCF6d3oxKISQQ%3D%3D

| + +## Validation Rules Assignments List +| Attributes | Description | +|:-----|:--------| +| object
`string` |

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.
AttributesDescription
skusSee: Skus List For 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.

| +| currency
`string`, `null` |

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.

Available values: `sku` | + +## Order Item Calculated +| Attributes | Description | +|:-----|:--------| +| sku_id
`string` |

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

| +| price
`integer` |

Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents for $100.00.

| +| subtotal_amount
`integer` |

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

| +| product
`object` |

An object containing details of the related product.

AttributesDescription
id
string

A unique identifier that represents the product and is assigned by Voucherify.

source_id
string

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.

override
boolean

The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system.

name
string

Product name.

metadata
object

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.

price
number

Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| sku
`object` |

An object containing details of the related SKU.

AttributesDescription
id
string

A unique identifier that represents the SKU and is assigned by Voucherify.

source_id
string

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.

override
boolean

The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system.

sku
string

The SKU name.

price
number

SKU price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| object
`string` |

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.

AttributesDescription
[propertyName]
object

Contains details about the point balances left on loyalty cards and the number of referred customers in each campaign.

AttributesDescription
points
integer

Remaining point balance in campaign.

loyalty_tier
string

Customer's loyalty tier within the campaign.

Example:

ltr_UJ5Q54Q0OvEhua87Qfv2Ki5x

referred_customers
integer

Number of customers referred by the customer in campaign.

| + +## Customer Referrals +| Attributes | Description | +|:-----|:--------| +| total
`integer` |

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:

Customer Referrals Campaigns Item

AttributesDescription
campaign_id
string

Unique campaign ID, assigned by Voucherify.

Example:

camp_rRsfatlwN7unSeUIJDCYedal

referrer_id
string

Unique referrer ID, assigned by Voucherify. This is the customer ID of a customer that is referring this customer.

Example:

cust_sehkNIi8Uq2qQuRqSr7xn4Zi

related_object_id
string

Related object id

Example:

r_0b9d4cc4aa164dd073

related_object_type
string

Related object type, i.e. redemption.

date
string

Timestamp representing the date and time when the customer was referred in ISO 8601 format.

Example:

2022-08-30T10:19:39.196Z

| + +## Customer Base +| Attributes | Description | +|:-----|:--------| +| name
`string` |

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.

AttributesDescription
city
string

City

state
string

State

line_1
string

First line of address.

line_2
string

Second line of address.

country
string

Country.

postal_code
string

Postal code.

| +| 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.

| + +## 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.

| +| fixed_amount_formula
`string` | | +| effect |

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.

| +| attributes
`array` |

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.

| +| 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.

| +| 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.

AttributesDescription
redeemed_amount
integer

Total amount of gift card credits redeemed by customer. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents for $100.00.

amount_to_go
integer

Remaining gift card balance across all gift cards. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents for $100.00.

| +| loyalty_card
`object` |

Summary of loyalty points.

AttributesDescription
redeemed_points
integer

Total number of loyalty points redeemed by the customer.

points_to_go
integer

Sum of remaining available point balance across all loyalty cards.

| + +## Customer Summary Orders +| Attributes | Description | +|:-----|:--------| +| total_amount
`integer` |

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_count
`integer` |

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.

| +| last_order_amount
`integer` |

Amount spent on last order. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents for $100.00.

| +| last_order_date
`string` |

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.

AttributesDescription
loyalty
object

Defines the equivalent points value of the reward.

AttributesDescription
points
integer

The number of points required to redeem the reward.

auto_redeem
boolean, null

Determines if the reward is redeemed automatically when the customer reaches the sufficient number of points to redeem it. Value true means that the automatic reward redemption is active. Only one reward can be set to be redeemed automatically in a loyalty campaign, i.e. only one can have the value true.

| + +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/REWARDS-Reward-Object.md b/reference-docs/REWARDS-Reward-Object.md new file mode 100644 index 00000000..0fb6d625 --- /dev/null +++ b/reference-docs/REWARDS-Reward-Object.md @@ -0,0 +1,50 @@ +--- +title: Reward Object +type: basic +categorySlug: voucherify-api +parentDocSlug: rewards +slug: reward-object +hidden: false +order: 1 +--- + +## Reward +| Attributes | Description | +|:-----|:--------| +| id
`string` |

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.

AttributesDescription
image_url
string

The HTTPS URL pointing to the .png or .jpg file.

description
string

An arbitrary string that you can attach to a material reward.

| +| metadata
`object` |

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.

AttributesDescription
id
string

Unique campaign ID, assigned by Voucherify.

balance
integer

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.

type
string

Campaign type.

Available values: DISCOUNT_COUPONS, GIFT_VOUCHERS, LOYALTY_PROGRAM
| + +## Pay with Points +| Attributes | Description | +|:-----|:--------| +| coin
`object` |

Defines the ratio by mapping the number of loyalty points in points_ratio to a predefined cash amount in exchange_ratio.

AttributesDescription
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.

| + +## Material +| Attributes | Description | +|:-----|:--------| +| product
`object` |

Contains information about the product given as a reward.

AttributesDescription
id
string

Unique product ID, assigned by Voucherify.

Example:

prod_0b7d7dfb05cbe5c616

sku_id
string, null

Unique SKU ID, assigned by Voucherify, of the SKU given as a reward.

Example:

sku_0b7d7dfb090be5c619

| + +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/REWARDS-Update-Reward-Assignment.md b/reference-docs/REWARDS-Update-Reward-Assignment.md new file mode 100644 index 00000000..aef3a42b --- /dev/null +++ b/reference-docs/REWARDS-Update-Reward-Assignment.md @@ -0,0 +1,14 @@ +--- +title: Update Reward Assignment +type: endpoint +categorySlug: voucherify-api +slug: update-reward-assignment +parentDocSlug: rewards +hidden: false +order: 11 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/REWARDS-Update-Reward.md b/reference-docs/REWARDS-Update-Reward.md new file mode 100644 index 00000000..38bf8f59 --- /dev/null +++ b/reference-docs/REWARDS-Update-Reward.md @@ -0,0 +1,14 @@ +--- +title: Update Reward +type: endpoint +categorySlug: voucherify-api +slug: update-reward +parentDocSlug: rewards +hidden: false +order: 6 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/SEGMENTS-Create-Segment.md b/reference-docs/SEGMENTS-Create-Segment.md new file mode 100644 index 00000000..17402e92 --- /dev/null +++ b/reference-docs/SEGMENTS-Create-Segment.md @@ -0,0 +1,14 @@ +--- +title: Create Segment +type: endpoint +categorySlug: voucherify-api +slug: create-segment +parentDocSlug: segments +hidden: false +order: 3 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/SEGMENTS-Customer-Segment-Object.md b/reference-docs/SEGMENTS-Customer-Segment-Object.md new file mode 100644 index 00000000..8830559b --- /dev/null +++ b/reference-docs/SEGMENTS-Customer-Segment-Object.md @@ -0,0 +1,26 @@ +--- +title: Customer Segment Object +type: basic +categorySlug: voucherify-api +parentDocSlug: segments +slug: customer-segment-object +hidden: false +order: 1 +--- + +## Segment +| Attributes | Description | +|:-----|:--------| +| id
`string` |

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.

| +| initial_sync_status
`string` | Available values: `IN_PROGRESS`, `DONE` | +| object
`string` |

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.

Validation Rule

AttributesDescription
id
string

Unique validation rule ID.

Example:

val_eR1c41hu0vUU

created_at
string

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_at
string

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_count
integer

The number of instances the validation rule has been assigned to different types of redeemables.

object
string

The type of the object represented by JSON. This object stores information about the validation rule.

+ +## Validation Rule Base +| Attributes | Description | +|:-----|:--------| +| name
`string` |

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.

AttributesDescription
message
string

The error message returned from API when validation / redemption fails to meet requirements of defined rules.

| +| applicable_to
`object` |
AttributesDescription
excluded
array

Defines which items are excluded from a discount.

Array of Applicable To
included
array

Defines which items are included in a discount.

Array of Applicable To
included_all
boolean

Indicates whether all items are included in the discount.

| +| type
`string` |

Type of validation rule.

Available values: `expression`, `basic`, `advanced`, `complex` | +| context_type
`string` |

Validation rule context type.

Context TypeDefinition
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
Available values: `earning_rule.order.paid`, `earning_rule.custom_event`, `earning_rule.customer.segment.entered`, `earning_rule.customer.tier.joined`, `earning_rule.customer.tier.left`, `earning_rule.customer.tier.upgraded`, `earning_rule.customer.tier.downgraded`, `earning_rule.customer.tier.prolonged`, `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.apply_to_items_by_quantity`, `campaign.discount_coupons.discount.fixed.apply_to_items`, `campaign.discount_coupons.discount.percent.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.apply_to_items_by_quantity`, `campaign.referral_program.discount.fixed.apply_to_items`, `campaign.referral_program.discount.percent.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.apply_to_items_by_quantity`, `campaign.promotion.discount.fixed.apply_to_items`, `campaign.promotion.discount.percent.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.apply_to_items_by_quantity`, `voucher.discount_voucher.discount.fixed.apply_to_items`, `voucher.discount_voucher.discount.percent.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`, `distribution.order.paid`, `distribution.order.created`, `distribution.order.canceled`, `distribution.order.updated`, `reward_assignment.pay_with_points`, `global` | + +## Validation Rule Rules +| Attributes | Description | +|:-----|:--------| +| logic
`string` |

Defines the logic between the rules.

**Example:**

(1 and 2) and (3)

| +| [propertyName]
`object` |

Contains the name of the validation rule.

AttributesDescription
name
string

Voucherify's specific rule name. The list of available names is provided below.

TypeName
Customercustomer.segment
customer.metadata*
Orderorder.amount
order.initial_amount
order.items.count
order.items.price_any
order.items.price_each
order.items.metadata_any
order.items.metadata_each
order.metadata*
Campaigncampaign.orders.amount_discounted
campaign.orders.amount
campaign.redemptions.count
campaign.redemptions.count.daily
campaign.redemptions.count.monthly
campaign.redemptions.customers_count
campaign.redemptions.customers_count.daily
campaign.redemptions.customers_count.monthly
Redemptionredemption.gift.amount
redemption.count.daily
redemption.count.monthly
redemption.count.per_customer
redemption.count.per_customer.daily
redemption.count.per_customer.monthly
redemption.api_key
redemption.count.per_api_key
redemption.user.login
redemption.count.per_user
redemption.metadata
redemption.reward.pay_with_points.points_used
Productproduct.id
product.price
product.quantity
product.discount_applicable
product.metadata*
product.metadata.aggregated_quantity
product.metadata.aggregated_amount
product.metadata.discount_applicable
product.metadata.match_all
SKUsku.id
sku.price
sku.quantity
sku.discount_applicable
Publicationpublication.redeemable_by_linked_customer
Custom Eventcustom_event.metadata*
Order itemsorder.items.every
order.items.any
order.items.none
order.items.cheapest
order.items.most_expensive

*Requires the property field to be defined.

property
string, null

Custom name for a metadata property associated with the condition to be satisfied. Required if the property name is any of the following:
customer_metadata
custom_event_metadata
order_items_metadata
order_metadata
product_metadata
redemption_metadata

conditionsSee: Validation Rule Conditions
rulesSee: Validation Rule Rules
error
object

Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.

AttributesDescription
message
string

The error message returned from API when validation / redemption fails to meet requirements of defined rule.

| + +## Validation Rule Bundle Rules +| Attributes | Description | +|:-----|:--------| +| limit
`integer`, `null` |

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.

| +| [propertyName]
`object` |

Contains the name of the bundle rule.

AttributesDescription
name
string

Voucherify's specific bundle rule name. Currently, it is only order.items.any.

Available values: order.items.any
conditions
object

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 $is.

AttributesDescription
$is
array
Array of:
AttributesDescription
id
string

Unique identifier of the product, SKU, or collection assigned by Voucherify.

type
string

Type of the order item. It can be a product_or_sku or products_collection

Available values: product_or_sku, products_collection
object
string

Object used in the bundle rule. It can be a products_collection, product, or sku.

Available values: products_collection, product, sku
rules
error
object

CURRENTLY UNSUPPORTED. Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.

AttributesDescription
message
string

The error message returned from API when validation / redemption fails to meet requirements of defined rule.

| + +## 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:

| +| order_item_indices
`array` |

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.

| +| order_item_units
`array` |

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.

Array of:
AttributesDescription
index
integer

Number assigned to the order line item in accordance with the order sent in the request.

units
array

Numbers of units in the order line covered by the discount; e.g. 2, 5, 8 for 10 units with the setting "skip_initially": 1, "repeat": 3. The counting of units starts from 1. The maximum quantity of all handled units is 1000. If the quantity of all order items exceeds 1000, this array is not returned, but units_limit_exceeded: true. However, the discount is calculated properly for all relevant units.

units_limit_exceeded
boolean

Returned as true only when the sum total of quantity of all order items exceeds 1000.

| +| repeat
`integer` |

Determines the recurrence of the discount, e.g. "repeat": 3 means that the discount is applied to every third item.

| +| skip_initially
`integer` |

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.

Available values: `ITEM`, `UNIT` | + +## Validation Rule Conditions +| Attributes | Description | +|:-----|:--------| +| $is | See: [Any](#any) | +| $is_not | See: [Any](#any) | +| $in | See: [Any](#any) | +| $not_in | See: [Any](#any) | +| $less_than | See: [Any](#any) | +| $less_than_or_equal | See: [Any](#any) | +| $more_than | See: [Any](#any) | +| $more_than_or_equal | See: [Any](#any) | +| $starts_with | See: [Any String](#any-string) | +| $ends_with | See: [Any String](#any-string) | +| $contains | See: [Any String](#any-string) | +| $timeframe | See: [Any String](#any-string) | +| $timeframe_absolute | See: [Any String](#any-string) | +| $timeframe_daily_hours | See: [Any String](#any-string) | +| $dow
`array` | | +| $count | See: [Any Number](#any-number) | +| $count_more | See: [Any Number](#any-number) | +| $count_less | See: [Any Number](#any-number) | +| $not_differ | See: [Any](#any) | +| $not_intersect | See: [Any](#any) | +| $from | See: [Any](#any) | +| $after | See: [Any Date and Date-Time](#any-date-and-date-time) | +| $before | See: [Any Date and Date-Time](#any-date-and-date-time) | +| $more_than_ago | See: [Any Number](#any-number) | +| $less_than_ago | See: [Any Number](#any-number) | +| $is_days_ago | See: [Any Number](#any-number) | +| $more_than_future | See: [Any Number](#any-number) | +| $less_than_future | See: [Any Number](#any-number) | +| $is_days_in_future | See: [Any Number](#any-number) | + +## Validation Rule Rules +| Attributes | Description | +|:-----|:--------| +| logic
`string` |

Defines the logic between the rules.

**Example:**

(1 and 2) and (3)

| +| [propertyName]
`object` |

Contains the name of the validation rule.

AttributesDescription
name
string

Voucherify's specific rule name. The list of available names is provided below.

TypeName
Customercustomer.segment
customer.metadata*
Orderorder.amount
order.initial_amount
order.items.count
order.items.price_any
order.items.price_each
order.items.metadata_any
order.items.metadata_each
order.metadata*
Campaigncampaign.orders.amount_discounted
campaign.orders.amount
campaign.redemptions.count
campaign.redemptions.count.daily
campaign.redemptions.count.monthly
campaign.redemptions.customers_count
campaign.redemptions.customers_count.daily
campaign.redemptions.customers_count.monthly
Redemptionredemption.gift.amount
redemption.count.daily
redemption.count.monthly
redemption.count.per_customer
redemption.count.per_customer.daily
redemption.count.per_customer.monthly
redemption.api_key
redemption.count.per_api_key
redemption.user.login
redemption.count.per_user
redemption.metadata
redemption.reward.pay_with_points.points_used
Productproduct.id
product.price
product.quantity
product.discount_applicable
product.metadata*
product.metadata.aggregated_quantity
product.metadata.aggregated_amount
product.metadata.discount_applicable
product.metadata.match_all
SKUsku.id
sku.price
sku.quantity
sku.discount_applicable
Publicationpublication.redeemable_by_linked_customer
Custom Eventcustom_event.metadata*
Order itemsorder.items.every
order.items.any
order.items.none
order.items.cheapest
order.items.most_expensive

*Requires the property field to be defined.

property
string, null

Custom name for a metadata property associated with the condition to be satisfied. Required if the property name is any of the following:
customer_metadata
custom_event_metadata
order_items_metadata
order_metadata
product_metadata
redemption_metadata

conditionsSee: Validation Rule Conditions
rulesSee: Validation Rule Rules
error
object

Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.

AttributesDescription
message
string

The error message returned from API when validation / redemption fails to meet requirements of defined rule.

| + +## Applicable To Effect +Available values: `APPLY_TO_EVERY`, `APPLY_TO_CHEAPEST`, `APPLY_FROM_CHEAPEST`, `APPLY_TO_MOST_EXPENSIVE`, `APPLY_FROM_MOST_EXPENSIVE` + +## Any +Array any of: string, string, string, number, object + +## Any +Array any of: string, string, string, number, object + +## Any String + + +## Any Number + + +## Any Date and Date-Time +Array any of: string, string + +## Validation Rule Rules +| Attributes | Description | +|:-----|:--------| +| logic
`string` |

Defines the logic between the rules.

**Example:**

(1 and 2) and (3)

| +| [propertyName]
`object` |

Contains the name of the validation rule.

AttributesDescription
name
string

Voucherify's specific rule name. The list of available names is provided below.

TypeName
Customercustomer.segment
customer.metadata*
Orderorder.amount
order.initial_amount
order.items.count
order.items.price_any
order.items.price_each
order.items.metadata_any
order.items.metadata_each
order.metadata*
Campaigncampaign.orders.amount_discounted
campaign.orders.amount
campaign.redemptions.count
campaign.redemptions.count.daily
campaign.redemptions.count.monthly
campaign.redemptions.customers_count
campaign.redemptions.customers_count.daily
campaign.redemptions.customers_count.monthly
Redemptionredemption.gift.amount
redemption.count.daily
redemption.count.monthly
redemption.count.per_customer
redemption.count.per_customer.daily
redemption.count.per_customer.monthly
redemption.api_key
redemption.count.per_api_key
redemption.user.login
redemption.count.per_user
redemption.metadata
redemption.reward.pay_with_points.points_used
Productproduct.id
product.price
product.quantity
product.discount_applicable
product.metadata*
product.metadata.aggregated_quantity
product.metadata.aggregated_amount
product.metadata.discount_applicable
product.metadata.match_all
SKUsku.id
sku.price
sku.quantity
sku.discount_applicable
Publicationpublication.redeemable_by_linked_customer
Custom Eventcustom_event.metadata*
Order itemsorder.items.every
order.items.any
order.items.none
order.items.cheapest
order.items.most_expensive

*Requires the property field to be defined.

property
string, null

Custom name for a metadata property associated with the condition to be satisfied. Required if the property name is any of the following:
customer_metadata
custom_event_metadata
order_items_metadata
order_metadata
product_metadata
redemption_metadata

conditionsSee: Validation Rule Conditions
rulesSee: Validation Rule Rules
error
object

Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.

AttributesDescription
message
string

The error message returned from API when validation / redemption fails to meet requirements of defined rule.

| + +## Validation Rule Rules +| Attributes | Description | +|:-----|:--------| +| logic
`string` |

Defines the logic between the rules.

**Example:**

(1 and 2) and (3)

| +| [propertyName]
`object` |

Contains the name of the validation rule.

AttributesDescription
name
string

Voucherify's specific rule name. The list of available names is provided below.

TypeName
Customercustomer.segment
customer.metadata*
Orderorder.amount
order.initial_amount
order.items.count
order.items.price_any
order.items.price_each
order.items.metadata_any
order.items.metadata_each
order.metadata*
Campaigncampaign.orders.amount_discounted
campaign.orders.amount
campaign.redemptions.count
campaign.redemptions.count.daily
campaign.redemptions.count.monthly
campaign.redemptions.customers_count
campaign.redemptions.customers_count.daily
campaign.redemptions.customers_count.monthly
Redemptionredemption.gift.amount
redemption.count.daily
redemption.count.monthly
redemption.count.per_customer
redemption.count.per_customer.daily
redemption.count.per_customer.monthly
redemption.api_key
redemption.count.per_api_key
redemption.user.login
redemption.count.per_user
redemption.metadata
redemption.reward.pay_with_points.points_used
Productproduct.id
product.price
product.quantity
product.discount_applicable
product.metadata*
product.metadata.aggregated_quantity
product.metadata.aggregated_amount
product.metadata.discount_applicable
product.metadata.match_all
SKUsku.id
sku.price
sku.quantity
sku.discount_applicable
Publicationpublication.redeemable_by_linked_customer
Custom Eventcustom_event.metadata*
Order itemsorder.items.every
order.items.any
order.items.none
order.items.cheapest
order.items.most_expensive

*Requires the property field to be defined.

property
string, null

Custom name for a metadata property associated with the condition to be satisfied. Required if the property name is any of the following:
customer_metadata
custom_event_metadata
order_items_metadata
order_metadata
product_metadata
redemption_metadata

conditionsSee: Validation Rule Conditions
rules
object

Another set of validation rules. If you need to create complex rules with more nested rules, use the validation rule builder in the dashboard.

error
object

Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.

AttributesDescription
message
string

The error message returned from API when validation / redemption fails to meet requirements of defined rule.

| + +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/VALIDATIONS-Validate-Promotion-Tier.md b/reference-docs/VALIDATIONS-Validate-Promotion-Tier.md new file mode 100644 index 00000000..fa633902 --- /dev/null +++ b/reference-docs/VALIDATIONS-Validate-Promotion-Tier.md @@ -0,0 +1,14 @@ +--- +title: Validate Promotion Tier [Deprecated] +type: endpoint +categorySlug: voucherify-api +slug: validate-promotion-tier +parentDocSlug: validations +hidden: false +order: 7 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/VALIDATIONS-Validate-Promotions.md b/reference-docs/VALIDATIONS-Validate-Promotions.md new file mode 100644 index 00000000..45cb7984 --- /dev/null +++ b/reference-docs/VALIDATIONS-Validate-Promotions.md @@ -0,0 +1,14 @@ +--- +title: Validate Promotions [Deprecated] +type: endpoint +categorySlug: voucherify-api +slug: validate-promotions +parentDocSlug: validations +hidden: false +order: 6 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/VALIDATIONS-Validate-Stackable-Discounts.md b/reference-docs/VALIDATIONS-Validate-Stackable-Discounts.md new file mode 100644 index 00000000..81ed2c93 --- /dev/null +++ b/reference-docs/VALIDATIONS-Validate-Stackable-Discounts.md @@ -0,0 +1,14 @@ +--- +title: Validate Stackable Discounts +type: endpoint +categorySlug: voucherify-api +slug: validate-stacked-discounts +parentDocSlug: validations +hidden: false +order: 3 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/VALIDATIONS-Validate-Voucher.md b/reference-docs/VALIDATIONS-Validate-Voucher.md new file mode 100644 index 00000000..83152ec6 --- /dev/null +++ b/reference-docs/VALIDATIONS-Validate-Voucher.md @@ -0,0 +1,14 @@ +--- +title: Validate Voucher [Deprecated] +type: endpoint +categorySlug: voucherify-api +slug: validate-voucher +parentDocSlug: validations +hidden: false +order: 4 +--- +[block:html] +{ + "html": "" +} +[/block] diff --git a/reference-docs/VALIDATIONS-Validation-Object.md b/reference-docs/VALIDATIONS-Validation-Object.md new file mode 100644 index 00000000..9672905f --- /dev/null +++ b/reference-docs/VALIDATIONS-Validation-Object.md @@ -0,0 +1,276 @@ +--- +title: Validation Object +type: basic +categorySlug: voucherify-api +parentDocSlug: validations +slug: validation-object +hidden: false +order: 1 +--- + +## Vouchers Validate Response Body +

Response body schema for POST v1/vouchers/{code}/validate.

+ +One of: + +[Vouchers Validate Valid Response Body](#vouchers-validate-valid-response-body), [Vouchers Validate Invalid Response Body](#vouchers-validate-invalid-response-body) + +## Vouchers Validate Valid 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.

| +| 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.

AttributesDescription
points_cost
number

Number of points that wlil be deducted from loyaty card for the associated reward.

| +| reward
`object` |

Contains information about the reward that is being validated.

AttributesDescription
id
string

Unique reward ID assigned by Voucherify.

assignment_id
string

Unique reward assignment ID assigned by Voucherify.

points
number

Number of points applied to the reward.

| +| order | All of: 1. [Order Calculated No Customer Data](#order-calculated-no-customer-data) +2.
AttributesDescription
items
array

Array of items applied to the order. It can include up to 500 items.

Array of Order Item Calculated
| +| session |

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.

AttributesDescription
code
number

Voucher code.

key
string
message
string

Customized error message.

details
string
request_id
string
resource_id
string
resource_type
string
| +| tracking_id
`string` |

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.

| +| subtracted_amount
`integer` |

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.

| +| effect
`string` |

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)

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

| +| 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` | +| 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` |
AttributesDescription
[propertyName]See: Order Redemptions
| + +## Order Item Calculated +| Attributes | Description | +|:-----|:--------| +| id
`string` |

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.

| +| subtotal_amount
`integer` |

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

| +| product
`object` |

An object containing details of the related product.

AttributesDescription
id
string

A unique identifier that represents the product and is assigned by Voucherify.

source_id
string

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.

override
boolean

The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system.

name
string

Product name.

metadata
object

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.

price
number

Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00).

| +| sku
`object` |

An object containing details of the related SKU.

AttributesDescription
id
string

A unique identifier that represents the SKU and is assigned by Voucherify.

source_id
string

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.

override
boolean

The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system.

sku
string

The SKU name.

price
number

SKU price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00).

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. It can be used to create product collections.

| +| object
`string` |

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:

| +| order_item_indices
`array` |

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.

| +| order_item_units
`array` |

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.

Array of:
AttributesDescription
index
integer

Number assigned to the order line item in accordance with the order sent in the request.

units
array

Numbers of units in the order line covered by the discount; e.g. 2, 5, 8 for 10 units with the setting "skip_initially": 1, "repeat": 3. The counting of units starts from 1. The maximum quantity of all handled units is 1000. If the quantity of all order items exceeds 1000, this array is not returned, but units_limit_exceeded: true. However, the discount is calculated properly for all relevant units.

units_limit_exceeded
boolean

Returned as true only when the sum total of quantity of all order items exceeds 1000.

| +| repeat
`integer` |

Determines the recurrence of the discount, e.g. "repeat": 3 means that the discount is applied to every third item.

| +| skip_initially
`integer` |

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.

Available values: `ITEM`, `UNIT` | + +## Inapplicable To +[Applicable To](#applicable-to) + +## 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.

| +| fixed_amount_formula
`string` | | +| effect |

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.
AttributesDescription
categories
array

Contains details about the category.

Array of Category
validation_rules_assignmentsSee: Validation Rules Assignments List
+ +## 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.

AttributesDescription
amount
integer

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.

Example:

10000

subtracted_amount
integer

Total amount of subtracted credits over the gift card lifetime. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents for $100.00.

balance
integer

Available funds. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents for $100.00.

Example:

500

effect
string

Defines how the credits are applied to the customer's order.

Available values: APPLY_TO_ORDER, APPLY_TO_ITEMS
| +| loyalty_card
`object` |

Object representing loyalty card parameters. Child attributes are present only if type is LOYALTY_CARD. Defaults to null.

AttributesDescription
points
integer

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.

Example:

6970

next_expiration_date
string

The next closest date when the next set of points are due to expire.

Example:

2023-05-30

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.

| +| start_date
`string` |

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.

| +| additional_info
`string` |

An 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.

| +| created_at
`string` |

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.

| +| publish
`object` |

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.

AttributesDescription
object
string

The type of the object represented is by default list. To get this list, you need to make a call to the endpoint returned in the url attribute.

count
integer

Publication events counter.

Example:

0

url
string

The endpoint where this list of publications can be accessed using a GET method. /v1/vouchers/{voucher_code}/publications

Example:

/v1/vouchers/WVPblOYX/publications?page=1&limit=10

| +| redemption
`object` |

Stores a summary of redemptions that have been applied to the voucher.

AttributesDescription
quantity
integer

How many times a voucher can be redeemed. A null value means unlimited.

redeemed_quantity
integer

How many times a voucher has already been redeemed.

Example:

1

redeemed_points
integer

Total loyalty points redeemed.

Example:

100000

object
string

The type of the object represented is by default list. To get this list, you need to make a call to the endpoint returned in the url attribute.

url
string

The endpoint where this list of redemptions can be accessed using a GET method. /v1/vouchers/{voucher_code}/redemptions

Example:

/v1/vouchers/WVPblOYX/redemptions?page=1&limit=10

| + +## 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

| + +## 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.

**Example:**

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.

**Example:**

P2D

| + +## Validity Day Of Week +

Integer array corresponding to the particular days of the week in which the voucher is valid.

+ +## Validity Hours +| Attributes | Description | +|:-----|:--------| +| daily
`array` |

Defines the reccuring period(s) when the resource is active. The periods should not overlap.

Array of:
AttributesDescription
start_time
string

Defines the starting hour of validity in the HH:mm format. The resource is inactive before this time.

Example:

12:00

days_of_week
array

Integer array corresponding to the particular days of the week in which the resource is valid.

  • 0 Sunday
  • 1 Monday
  • 2 Tuesday
  • 3 Wednesday
  • 4 Thursday
  • 5 Friday
  • 6 Saturday
expiration_time
string

Defines the ending hour of validity in the HH:mm format. The resource is inactive after this time.

Example:

14:00

| + +## Voucher Assets +| Attributes | Description | +|:-----|:--------| +| qr
`object` |

Stores Quick Response (QR) representation of encrypted code.

AttributesDescription
id
string

Encrypted voucher code ID.

Example:

U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK+t4pp7U7oFzjGJzj9q/bmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg+BaZk5QwXMf8k/OzSlOEVybpwSq+AiqPoNtjeuqtIgkDyvT6Q==

url
string

URL to QR code

Optional: Attach query parameters to base URL to customize the image of the encrypted voucher code.

  • size: integer value from 1 to 100
  • format: string, either png (default) or svg
Example:

https://dev.dl.voucherify.io/api/v1/assets/qr/U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK%2Bt4pp7U7oFzjGJzj9q%2FbmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg%2BBaZk5QwXMf8k%2FOzSlOEVybpwSq%2BAiqPoNtjeuqtIgkDyvT6Q%3D%3D

| +| barcode
`object` |

Stores barcode representation of encrypted code.

AttributesDescription
id
string

Encrypted voucher code ID.

Example:

U2FsdGVkX19eJhGfWwUrH9+tulBkON+AnMktic+N6CVWzZ9+fHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ+kJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6/pFs61apEn9SJx32ttCF6d3oxKISQQ==

url
string

URL to barcode

Optional: Attach query parameters to base URL to customize the image of the encrypted voucher code.

  • size: integer value from 1 to 100
  • format: string, either png (default) or svg
Example:

https://dev.dl.voucherify.io/api/v1/assets/barcode/U2FsdGVkX19eJhGfWwUrH9%2BtulBkON%2BAnMktic%2BN6CVWzZ9%2BfHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ%2BkJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6%2FpFs61apEn9SJx32ttCF6d3oxKISQQ%3D%3D

| + +## 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.

| +| fixed_amount_formula
`string` | | +| effect |

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 From ea3c9c480d54699107561cabf605adb227820eae Mon Sep 17 00:00:00 2001 From: p-woznikowski Date: Wed, 20 Aug 2025 13:48:21 +0200 Subject: [PATCH 3/7] Update docs.json --- docs.json | 1 + 1 file changed, 1 insertion(+) diff --git a/docs.json b/docs.json index 79052e04..210e31c5 100644 --- a/docs.json +++ b/docs.json @@ -102,6 +102,7 @@ "reference-docs/Introduction", { "group": "Publications", + "openapi": "/api-reference/openapi.json", "pages": [ "reference-docs/test", "GET /publications", From 5e46fb32a6a6d0f2b7a9f1660d5d620dd2d0e172 Mon Sep 17 00:00:00 2001 From: p-woznikowski Date: Wed, 20 Aug 2025 13:54:15 +0200 Subject: [PATCH 4/7] Update docs.json --- docs.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs.json b/docs.json index 210e31c5..3b19cc15 100644 --- a/docs.json +++ b/docs.json @@ -105,8 +105,8 @@ "openapi": "/api-reference/openapi.json", "pages": [ "reference-docs/test", - "GET /publications", - "POST /publications" + "GET /v1/publications", + "POST /v1/publications" ] } ] From 84f2baa8b3ced12e1f8a605c69a6b2f17ee7a9cb Mon Sep 17 00:00:00 2001 From: p-woznikowski Date: Wed, 20 Aug 2025 14:06:16 +0200 Subject: [PATCH 5/7] Update docs.json --- docs.json | 1 - 1 file changed, 1 deletion(-) diff --git a/docs.json b/docs.json index 3b19cc15..8a1f747f 100644 --- a/docs.json +++ b/docs.json @@ -97,7 +97,6 @@ "groups": [ { "group": "Endpoints", - "openapi": "/api-reference/openapi.json", "pages": [ "reference-docs/Introduction", { From 6037360a366673c2b276fe5f52f6275a3fd933c8 Mon Sep 17 00:00:00 2001 From: p-woznikowski Date: Wed, 3 Sep 2025 18:36:10 +0200 Subject: [PATCH 6/7] Update openapi.json --- api-reference/openapi.json | 1080 ++++++++++++++++++++++++++++-------- 1 file changed, 848 insertions(+), 232 deletions(-) diff --git a/api-reference/openapi.json b/api-reference/openapi.json index cc97f1a2..ada2227b 100644 --- a/api-reference/openapi.json +++ b/api-reference/openapi.json @@ -408,6 +408,27 @@ } }, "schemas": { + "EventRedemptionSucceededData": { + "title": "Event Redemption Succeeded", + "description": "Event data object schema for `redemption.succeeded`.", + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/EventCustomerRedemption" + }, + { + "type": "object", + "properties": { + "created_at": { + "type": "string", + "example": "2024-01-01T11:11:11.111Z", + "description": "Timestamp representing the date and time when the redemption succeeded in the ISO 8601 format.", + "format": "date-time" + } + } + } + ] + }, "ParameterCode": { "type": "string", "example": "2CpRCE2c" @@ -4443,7 +4464,7 @@ }, "unit_off_formula": { "type": "string", - "description": "Formula used to calculate the number of units." + "description": "Formula used to dynamically calculate the number of units." }, "effect": { "description": "Defines how the unit is added to the customer's order.", @@ -4520,7 +4541,7 @@ }, "unit_off_formula": { "type": "string", - "description": "Formula used to calculate the number of units." + "description": "Formula used to dynamically calculate the number of units." }, "effect": { "type": "string", @@ -4573,7 +4594,8 @@ "description": "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": { - "type": "string" + "type": "string", + "description": "Formula used to dynamically calculate the discount." }, "aggregated_amount_limit": { "type": "integer", @@ -4614,7 +4636,8 @@ "description": "The percent discount that the customer will receive." }, "percent_off_formula": { - "type": "string" + "type": "string", + "description": "Formula used to dynamically calculate the discount." }, "amount_limit": { "type": "number", @@ -4659,7 +4682,8 @@ "description": "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." }, "fixed_amount_formula": { - "type": "string" + "type": "string", + "description": "Formula used to dynamically calculate the discount." }, "effect": { "description": "Defines how the discount is applied to the customer's order.", @@ -5266,7 +5290,7 @@ }, "publish": { "type": "object", - "description": "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 \n\n| Required | Optional |\n| -------- | :------: |\n| `type`:`LOYALTY_CARD` | `type`:`DISCOUNT_VOUCHER` | \n| `is_referral_code`:`true` | `type`:`GIFT_VOUCHER` |\n", + "description": "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](ref:create-publication) API method. \n\n\n\n| Required | Optional |\n| -------- | :------: |\n| `type`:`LOYALTY_CARD` | `type`:`DISCOUNT_VOUCHER` | \n| `is_referral_code`:`true` | `type`:`GIFT_VOUCHER` |\n", "properties": { "object": { "type": "string", @@ -5508,7 +5532,7 @@ }, "publish": { "type": "object", - "description": "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 \n\n| Required | Optional |\n| -------- | :------: |\n| `type`:`LOYALTY_CARD` | `type`:`DISCOUNT_VOUCHER` | \n| `is_referral_code`:`true` | `type`:`GIFT_VOUCHER` |\n", + "description": "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](ref:create-publication) API method. \n\n\n\n| Required | Optional |\n| -------- | :------: |\n| `type`:`LOYALTY_CARD` | `type`:`DISCOUNT_VOUCHER` | \n| `is_referral_code`:`true` | `type`:`GIFT_VOUCHER` |\n", "properties": { "object": { "type": "string", @@ -5863,7 +5887,7 @@ }, "publish": { "type": "object", - "description": "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 \n\n| Required | Optional |\n| -------- | :------: |\n| `type`:`LOYALTY_CARD` | `type`:`DISCOUNT_VOUCHER` | \n| `is_referral_code`:`true` | `type`:`GIFT_VOUCHER` |\n", + "description": "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](ref:create-publication) API method. \n\n\n\n| Required | Optional |\n| -------- | :------: |\n| `type`:`LOYALTY_CARD` | `type`:`DISCOUNT_VOUCHER` | \n| `is_referral_code`:`true` | `type`:`GIFT_VOUCHER` |\n", "properties": { "object": { "type": "string", @@ -6568,7 +6592,7 @@ }, "amount_off_formula": { "type": "string", - "description": "Formula used to calculate the discount." + "description": "Formula used to dynamically calculate the discount." }, "aggregated_amount_limit": { "type": "integer", @@ -6613,7 +6637,7 @@ }, "percent_off_formula": { "type": "string", - "description": "Formula used to calculate the discount." + "description": "Formula used to dynamically calculate the discount." }, "effect": { "type": "string", @@ -6642,7 +6666,7 @@ }, "fixed_amount_formula": { "type": "string", - "description": "Formula used to calculate the discounted price of an item or a new order total." + "description": "Formula used to dynamically calculate the discounted price of an item or a new order total." }, "effect": { "type": "string", @@ -6672,7 +6696,7 @@ }, "unit_off_formula": { "type": "string", - "description": "Formula used to calculate the number of units." + "description": "Formula used to dynamically calculate the number of units." }, "unit_type": { "type": "string", @@ -6719,7 +6743,7 @@ }, "unit_off_formula": { "type": "string", - "description": "Formula used to calculate the number of units." + "description": "Formula used to dynamically calculate the number of units." }, "unit_type": { "type": "string", @@ -6784,7 +6808,7 @@ }, "amount_off_formula": { "type": "string", - "description": "Formula used to calculate the discount." + "description": "Formula used to dynamically calculate the discount." }, "aggregated_amount_limit": { "type": "integer", @@ -6822,7 +6846,7 @@ }, "percent_off_formula": { "type": "string", - "description": "Formula used to calculate the discount." + "description": "Formula used to dynamically calculate the discount." }, "amount_limit": { "type": "integer", @@ -6859,7 +6883,7 @@ }, "fixed_amount_formula": { "type": "string", - "description": "Formula used to calculate the discounted price of an item or a new order total." + "description": "Formula used to dynamically calculate the discounted price of an item or a new order total." }, "effect": { "type": "string", @@ -6894,7 +6918,7 @@ }, "unit_off_formula": { "type": "string", - "description": "Formula used to calculate the discount." + "description": "Formula used to dynamically calculate the discount." }, "effect": { "type": "string", @@ -6936,7 +6960,7 @@ }, "unit_off_formula": { "type": "string", - "description": "Formula used to calculate the discount." + "description": "Formula used to dynamically calculate the discount." }, "unit_type": { "type": "string", @@ -7004,7 +7028,7 @@ }, "amount_off_formula": { "type": "string", - "description": "Formula used to calculate the discount." + "description": "Formula used to dynamically calculate the discount." }, "aggregated_amount_limit": { "type": "integer", @@ -7042,7 +7066,7 @@ }, "percent_off_formula": { "type": "string", - "description": "Formula used to calculate the discount." + "description": "Formula used to dynamically calculate the discount." }, "aggregated_amount_limit": { "type": "integer", @@ -7079,7 +7103,7 @@ }, "fixed_amount_formula": { "type": "string", - "description": "Formula used to calculate the discounted price of an item or a new order total." + "description": "Formula used to dynamically calculate the discounted price of an item or a new order total." }, "effect": { "type": "string", @@ -7109,7 +7133,7 @@ }, "unit_off_formula": { "type": "string", - "description": "Formula used to calculate the discount." + "description": "Formula used to dynamically calculate the discount." }, "unit_type": { "type": "string", @@ -7156,7 +7180,7 @@ }, "unit_off_formula": { "type": "string", - "description": "Formula used to calculate the discount." + "description": "Formula used to dynamically calculate the discount." }, "unit_type": { "type": "string", @@ -7193,7 +7217,7 @@ }, "amount_off_formula": { "type": "string", - "description": "Formula used to calculate the discount." + "description": "Formula used to dynamically calculate the discount." }, "effect": { "type": "string", @@ -7232,7 +7256,7 @@ }, "percent_off_formula": { "type": "string", - "description": "Formula used to calculate the discount." + "description": "Formula used to dynamically calculate the discount." }, "amount_limit": { "type": "integer", @@ -7270,7 +7294,7 @@ }, "fixed_amount_formula": { "type": "string", - "description": "Formula used to calculate the discounted price of an item or a new order total." + "description": "Formula used to dynamically calculate the discounted price of an item or a new order total." }, "effect": { "type": "string", @@ -7305,7 +7329,7 @@ }, "unit_off_formula": { "type": "string", - "description": "Formula used to calculate the discount." + "description": "Formula used to dynamically calculate the discount." }, "unit_type": { "type": "string", @@ -7358,7 +7382,7 @@ }, "unit_off_formula": { "type": "string", - "description": "Formula used to calculate the discount." + "description": "Formula used to dynamically calculate the discount." }, "unit_type": { "type": "string", @@ -7598,7 +7622,7 @@ "properties": { "url": { "type": "string", - "description": "URL of the CSV file location. It contains the `token` used for authorization in the [Download export](ref:download-export) method." + "description": "URL of the CSV file location. It contains the `token` used for authorization in the [Download export](ref:download-export) method." } } }, @@ -8206,7 +8230,7 @@ }, "order": { "type": "object", - "description": "Tracks purchase transactions. You can send the order in the request body to check against vouchers requiring specific order validation rules to be satisfied. The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Order structure/Order volume_ or _Basic Builder_ → _Order_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule).", + "description": "Tracks purchase transactions. You can send the order in the request body to check against vouchers requiring specific order validation rules to be satisfied. The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Order structure/Order volume_ or _Basic Builder_ → _Order_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule).", "properties": { "id": { "type": "string", @@ -8220,7 +8244,7 @@ "amount": { "type": "integer", "minimum": 0, - "description": "Pre-discount order amount represents the total amount of order items' amounts (sum of each item's `amount` property). You can send the total order amount or the amount of each item individually in the request body to check against vouchers requiring specific total order amount validation rules to be satisfied. The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Order volume_ → _Total amount_ \n\nThe value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`.", + "description": "Pre-discount order amount represents the total amount of order items' amounts (sum of each item's `amount` property). You can send the total order amount or the amount of each item individually in the request body to check against vouchers requiring specific total order amount validation rules to be satisfied. The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Order volume_ → _Total amount_ \n\nThe value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`.", "example": 10000 }, "items": { @@ -8252,7 +8276,7 @@ }, "metadata": { "type": "object", - "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **order** metadata validation rules to be satisfied. The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Order structure_ → _Order metadata satisfy_ or _Basic Builder_ → _Attributes match_ → _ORDER METADATA_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)." + "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **order** metadata validation rules to be satisfied. The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Order structure_ → _Order metadata satisfy_ or _Basic Builder_ → _Attributes match_ → _ORDER METADATA_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)." } } }, @@ -8272,7 +8296,7 @@ }, "metadata": { "type": "object", - "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **redemption** metadata validation rules to be satisfied. The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Advanced_ → _Redemption metadata satisfy_ or _Basic Builder_ → _Attributes match_ → _REDEMPTION METADATA_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)." + "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **redemption** metadata validation rules to be satisfied. The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Advanced_ → _Redemption metadata satisfy_ or _Basic Builder_ → _Attributes match_ → _REDEMPTION METADATA_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)." } } }, @@ -8336,7 +8360,7 @@ }, "metadata": { "type": "object", - "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **customer** metadata validation rules to be satisfied. The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Audience_ → _Customer metadata satisfy_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)." + "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **customer** metadata validation rules to be satisfied. The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Audience_ → _Customer metadata satisfy_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)." }, "birthdate": { "type": "string", @@ -8349,7 +8373,7 @@ "1_req_obj_vouchers_qualification_product": { "title": "Product Item", "type": "object", - "description": "Schema model for a product item. You can send this object in the request body to check against vouchers requiring specific product validation rules to be satisfied. The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Order structure/Order volume_ or _Basic Builder_ → _Order_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule).", + "description": "Schema model for a product item. You can send this object in the request body to check against vouchers requiring specific product validation rules to be satisfied. The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Order structure/Order volume_ or _Basic Builder_ → _Order_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule).", "properties": { "source_id": { "type": "string", @@ -8363,12 +8387,12 @@ }, "amount": { "type": "integer", - "description": "Represents a total pre-discount amount of order item (`price` * `quantity`). You can send the total item amount to check against vouchers requiring specific order amount validation rules to be satisfied.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Order volume_ → _Total amount_. The qualification adds the individual amounts of the items and checks whether the sum meets the limits set by the _Total amount_. Additionally, another rule checked is one that is defined in _Advanced Rule Builder_ → _Order structure_ → _Every order item/Any order item_ → _Subtotal of matched items_. \n\nThe value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`.", + "description": "Represents a total pre-discount amount of order item (`price` * `quantity`). You can send the total item amount to check against vouchers requiring specific order amount validation rules to be satisfied.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Order volume_ → _Total amount_. The qualification adds the individual amounts of the items and checks whether the sum meets the limits set by the _Total amount_. Additionally, another rule checked is one that is defined in _Advanced Rule Builder_ → _Order structure_ → _Every order item/Any order item_ → _Subtotal of matched items_. \n\nThe value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`.", "example": 10000 }, "quantity": { "type": "integer", - "description": "Quantity of the item in the cart. \n\nThe qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Order Volume_ → _Items quantity_. The qualification adds the individual quantities of the items and checks whether the sum meets the limits set by _Items quantity_ validation rule. Another validation rule against which the qualification does the checks is defined in the _Advanced Rule Builder_ → _Order Structure_ → _Every order item/Any order item_ → _Quantity of matched items_. [Read more](https://support.voucherify.io/article/529-validation-rules-campaign-limits).", + "description": "Quantity of the item in the cart. \n\nThe qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Order Volume_ → _Items quantity_. The qualification adds the individual quantities of the items and checks whether the sum meets the limits set by _Items quantity_ validation rule. Another validation rule against which the qualification does the checks is defined in the _Advanced Rule Builder_ → _Order Structure_ → _Every order item/Any order item_ → _Quantity of matched items_. [Read more](https://support.voucherify.io/article/529-validation-rules-campaign-limits).", "example": 1 }, "price": { @@ -8378,7 +8402,7 @@ }, "metadata": { "type": "object", - "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **order line item** metadata validation rules to be satisfied.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Order structure_ → _Every order item/Any order item_ → _Metadata of matched items_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)." + "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **order line item** metadata validation rules to be satisfied.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Order structure_ → _Every order item/Any order item_ → _Metadata of matched items_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)." }, "related_object": { "type": "string", @@ -8399,7 +8423,7 @@ }, "name": { "type": "string", - "description": "Product name.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Order structure_ → _Every order item/Any order item/None of the order items_ → _Select a product collection or create a new product collection based on name filters_.", + "description": "Product name.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Order structure_ → _Every order item/Any order item/None of the order items_ → _Select a product collection or create a new product collection based on name filters_.", "example": "Phone" }, "price": { @@ -8409,7 +8433,7 @@ }, "metadata": { "type": "object", - "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **product** metadata validation rules to be satisfied.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Order structure_ → _Every order item/Any order item/None of the order items_ → _Select a product collection or create a new product collection based on metadata filters_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)." + "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **product** metadata validation rules to be satisfied.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Order structure_ → _Every order item/Any order item/None of the order items_ → _Select a product collection or create a new product collection based on metadata filters_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)." } } } @@ -8418,7 +8442,7 @@ "1_req_obj_vouchers_qualification_product_using_product_id": { "title": "Product Item using product_id", "type": "object", - "description": "Schema model for a product item sent using the `product_id`. \n\nYou can send this object in the request body to check against vouchers requiring specific product validation rules to be satisfied. \nThe qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Order structure/Order volume_ or _Basic Builder_ → _Order_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule).", + "description": "Schema model for a product item sent using the `product_id`. \n\nYou can send this object in the request body to check against vouchers requiring specific product validation rules to be satisfied. \nThe qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Order structure/Order volume_ or _Basic Builder_ → _Order_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule).", "properties": { "product_id": { "type": "string", @@ -8427,12 +8451,12 @@ }, "amount": { "type": "integer", - "description": "Represents a total pre-discount amount of order item (`price` * `quantity`). You can send the total item amount to check against vouchers requiring specific order amount validation rules to be satisfied.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Order volume_ → _Total amount_. The qualification adds the individual amounts of the items and checks whether the sum meets the limits set by the _Total amount_. Additionally, another rule checked is one that is defined in _Advanced Rule Builder_ → _Order structure_ → _Every order item/Any order item_ → _Subtotal of matched items_. \n\nThe value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`.", + "description": "Represents a total pre-discount amount of order item (`price` * `quantity`). You can send the total item amount to check against vouchers requiring specific order amount validation rules to be satisfied.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Order volume_ → _Total amount_. The qualification adds the individual amounts of the items and checks whether the sum meets the limits set by the _Total amount_. Additionally, another rule checked is one that is defined in _Advanced Rule Builder_ → _Order structure_ → _Every order item/Any order item_ → _Subtotal of matched items_. \n\nThe value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`.", "example": 10000 }, "quantity": { "type": "integer", - "description": "Quantity of the item in the cart. \n\nThe qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Order Volume_ → _Items quantity_. The qualification adds the individual quantities of the items and checks whether the sum meets the limits set by _Items quantity_ validation rule. Another validation rule against which the qualification does the checks is defined in the _Advanced Rule Builder_ → _Order Structure_ → _Every order item/Any order item_ → _Quantity of matched items_. [Read more](https://support.voucherify.io/article/529-validation-rules-campaign-limits).", + "description": "Quantity of the item in the cart. \n\nThe qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Order Volume_ → _Items quantity_. The qualification adds the individual quantities of the items and checks whether the sum meets the limits set by _Items quantity_ validation rule. Another validation rule against which the qualification does the checks is defined in the _Advanced Rule Builder_ → _Order Structure_ → _Every order item/Any order item_ → _Quantity of matched items_. [Read more](https://support.voucherify.io/article/529-validation-rules-campaign-limits).", "example": 1 }, "price": { @@ -8442,7 +8466,7 @@ }, "metadata": { "type": "object", - "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **order line item** metadata validation rules to be satisfied.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Order structure_ → _Every order item/Any order item_ → _Metadata of matched items_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)." + "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **order line item** metadata validation rules to be satisfied.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Order structure_ → _Every order item/Any order item_ → _Metadata of matched items_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)." }, "product": { "type": "object", @@ -8450,7 +8474,7 @@ "properties": { "name": { "type": "string", - "description": "Product name.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Order structure_ → _Every order item/Any order item/None of the order items_ → _Select a product collection or create a new product collection based on name filters_.", + "description": "Product name.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Order structure_ → _Every order item/Any order item/None of the order items_ → _Select a product collection or create a new product collection based on name filters_.", "example": "Phone" }, "price": { @@ -8460,7 +8484,7 @@ }, "metadata": { "type": "object", - "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **product** metadata validation rules to be satisfied.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Order structure_ → _Every order item/Any order item/None of the order items_ → _Select a product collection or create a new product collection based on metadata filters_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)." + "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **product** metadata validation rules to be satisfied.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Order structure_ → _Every order item/Any order item/None of the order items_ → _Select a product collection or create a new product collection based on metadata filters_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)." } } } @@ -8469,7 +8493,7 @@ "1_req_obj_vouchers_qualification_product_using_source_id": { "title": "Product Item using source_id", "type": "object", - "description": "Schema model for a product item. You can send this object in the request body to check against vouchers requiring specific product validation rules to be satisfied. The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Order structure/Order volume_ or _Basic Builder_ → _Order_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule).", + "description": "Schema model for a product item. You can send this object in the request body to check against vouchers requiring specific product validation rules to be satisfied. The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Order structure/Order volume_ or _Basic Builder_ → _Order_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule).", "properties": { "source_id": { "type": "string", @@ -8478,12 +8502,12 @@ }, "amount": { "type": "integer", - "description": "Represents a total pre-discount amount of order item (`price` * `quantity`). You can send the total item amount to check against vouchers requiring specific order amount validation rules to be satisfied.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Order volume_ → _Total amount_. The qualification adds the individual amounts of the items and checks whether the sum meets the limits set by the _Total amount_. Additionally, another rule checked is one that is defined in _Advanced Rule Builder_ → _Order structure_ → _Every order item/Any order item_ → _Subtotal of matched items_. \n\nThe value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`.", + "description": "Represents a total pre-discount amount of order item (`price` * `quantity`). You can send the total item amount to check against vouchers requiring specific order amount validation rules to be satisfied.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Order volume_ → _Total amount_. The qualification adds the individual amounts of the items and checks whether the sum meets the limits set by the _Total amount_. Additionally, another rule checked is one that is defined in _Advanced Rule Builder_ → _Order structure_ → _Every order item/Any order item_ → _Subtotal of matched items_. \n\nThe value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`.", "example": 10000 }, "quantity": { "type": "integer", - "description": "Quantity of the item in the cart. \n\nThe qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Order Volume_ → _Items quantity_. The qualification adds the individual quantities of the items and checks whether the sum meets the limits set by _Items quantity_ validation rule. Another validation rule against which the qualification does the checks is defined in the _Advanced Rule Builder_ → _Order Structure_ → _Every order item/Any order item_ → _Quantity of matched items_. [Read more](https://support.voucherify.io/article/529-validation-rules-campaign-limits).", + "description": "Quantity of the item in the cart. \n\nThe qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Order Volume_ → _Items quantity_. The qualification adds the individual quantities of the items and checks whether the sum meets the limits set by _Items quantity_ validation rule. Another validation rule against which the qualification does the checks is defined in the _Advanced Rule Builder_ → _Order Structure_ → _Every order item/Any order item_ → _Quantity of matched items_. [Read more](https://support.voucherify.io/article/529-validation-rules-campaign-limits).", "example": 1 }, "price": { @@ -8493,7 +8517,7 @@ }, "metadata": { "type": "object", - "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **order line item** metadata validation rules to be satisfied.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Order structure_ → _Every order item/Any order item_ → _Metadata of matched items_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)." + "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **order line item** metadata validation rules to be satisfied.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Order structure_ → _Every order item/Any order item_ → _Metadata of matched items_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)." }, "related_object": { "type": "string", @@ -8514,7 +8538,7 @@ }, "name": { "type": "string", - "description": "Product name.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Order structure_ → _Every order item/Any order item/None of the order items_ → _Select a product collection or create a new product collection based on name filters_.", + "description": "Product name.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Order structure_ → _Every order item/Any order item/None of the order items_ → _Select a product collection or create a new product collection based on name filters_.", "example": "Phone" }, "price": { @@ -8524,7 +8548,7 @@ }, "metadata": { "type": "object", - "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **product** metadata validation rules to be satisfied.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Order structure_ → _Every order item/Any order item/None of the order items_ → _Select a product collection or create a new product collection based on metadata filters_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)." + "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **product** metadata validation rules to be satisfied.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Order structure_ → _Every order item/Any order item/None of the order items_ → _Select a product collection or create a new product collection based on metadata filters_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)." } } } @@ -8588,7 +8612,7 @@ }, "metadata": { "type": "object", - "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **product** metadata validation rules to be satisfied.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Order structure_ → _Every order item/Any order item/None of the order items_ → _Select a product collection or create a new product collection based on metadata filters_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)." + "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **product** metadata validation rules to be satisfied.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Order structure_ → _Every order item/Any order item/None of the order items_ → _Select a product collection or create a new product collection based on metadata filters_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)." } } }, @@ -10225,7 +10249,7 @@ "$ref": "#/components/schemas/OrdersCreateRequestBody" } ], - "description": "Order information. This object enables you to pass purchase transaction data. Read what properties you can use in the [Order object](ref:get-order)." + "description": "Order information. This object enables you to pass purchase transaction data. Read what properties you can use in the [Order object](ref:get-order)." } } }, @@ -11202,7 +11226,7 @@ }, "active": { "type": "boolean", - "description": "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 `start_date` and `expiration_date` using the [Disable Campaign](ref:disable-campaign) endpoint. \n\n- `true` indicates an *active* campaign\n- `false` indicates an *inactive* campaign" + "description": "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 `start_date` and `expiration_date` using the [Disable Campaign](ref:disable-campaign) endpoint. \n\n- `true` indicates an *active* campaign\n- `false` indicates an *inactive* campaign" }, "category_id": { "type": "string", @@ -11624,7 +11648,7 @@ }, "stock": { "type": "integer", - "description": "Configurable for **material rewards**. The number of units of the product that you want to share as reward." + "description": "Configurable for **material rewards**. The number of units of the product that you want to share as a reward. Use this parameter to code a stock-taking logic." }, "redeemed": { "type": "integer", @@ -11887,7 +11911,7 @@ }, "stock": { "type": "integer", - "description": "The number of units of the product that you want to share as a reward." + "description": "The number of units of the product that you want to share as a reward. Use this parameter to code a stock-taking logic." }, "attributes": { "type": "object", @@ -11986,7 +12010,7 @@ }, "stock": { "type": "integer", - "description": "The number of units of the product that you want to share as a reward." + "description": "The number of units of the product that you want to share as a reward. Use this parameter to code a stock-taking logic." }, "attributes": { "type": "object", @@ -13165,7 +13189,7 @@ "6_req_session_lock_discount_code": { "title": "Discount Code Session Lock", "type": "object", - "description": "Schema model for `session` lock object. The session object is **required** to establish a session between multiple parallel validation and redemption requests. If you only send the `type` parameter in the request, then by default the session lock will be established for 7 days. Read more on establishing a [validation session](doc:locking-validation-session).", + "description": "Schema model for `session` lock object. The session object is **required** to establish a session between multiple parallel validation and redemption requests. If you only send the `type` parameter in the request, then by default the session lock will be established for 7 days. Read more on establishing a [validation session](doc:locking-validation-session).", "properties": { "type": { "type": "string", @@ -13202,7 +13226,7 @@ "6_req_session_lock_gift_card": { "title": "Gift Card Session Lock", "type": "object", - "description": "Schema model for `session` lock object. The session object is **required** to establish a session between multiple parallel validation and redemption requests. If you only send the `type` parameter in the request, then by default the session lock will be established for 7 days. Read more on establishing a [validation session](doc:locking-validation-session).", + "description": "Schema model for `session` lock object. The session object is **required** to establish a session between multiple parallel validation and redemption requests. If you only send the `type` parameter in the request, then by default the session lock will be established for 7 days. Read more on establishing a [validation session](doc:locking-validation-session).", "properties": { "type": { "type": "string", @@ -13239,7 +13263,7 @@ "6_req_session_lock_loyalty_card": { "title": "Loyalty Card Session Lock", "type": "object", - "description": "Schema model for `session` lock object. The session object is **required** to establish a session between multiple parallel validation and redemption requests. If you only send the `type` parameter in the request, then by default the session lock will be established for 7 days. Read more on establishing a [validation session](doc:locking-validation-session).", + "description": "Schema model for `session` lock object. The session object is **required** to establish a session between multiple parallel validation and redemption requests. If you only send the `type` parameter in the request, then by default the session lock will be established for 7 days. Read more on establishing a [validation session](doc:locking-validation-session).", "properties": { "type": { "type": "string", @@ -14235,7 +14259,7 @@ }, "price_formula": { "type": "string", - "description": "Formula used to calculate the discounted price of an item.", + "description": "Formula used to dynamically calculate the discounted price of an item.", "example": "\"IF(ORDER_AMOUNT > 300;ORDER_ITEM_PRICE * 0.8;ORDER_ITEM_PRICE)" }, "effect": { @@ -14391,7 +14415,7 @@ }, "price_formula": { "type": "string", - "description": "Formula used to calculate the discounted price of an item.", + "description": "Formula used to dynamically calculate the discounted price of an item.", "example": "IF(ORDER_AMOUNT > 200;ORDER_ITEM_PRICE * 0.2;6)" }, "effect": { @@ -14527,7 +14551,7 @@ }, "price_formula": { "type": "string", - "description": "Formula used to calculate the discounted price of an item.", + "description": "Formula used to dynamically calculate the discounted price of an item.", "example": "IF(ORDER_AMOUNT > 300;ORDER_ITEM_PRICE * 0.8;ORDER_ITEM_PRICE)" }, "effect": { @@ -15069,7 +15093,7 @@ }, "metadata": { "type": "object", - "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **redemption** metadata validation rules to be satisfied. The validation runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Advanced_ → _Redemption metadata satisfy_ or _Basic Builder_ → _Attributes match_ → _REDEMPTION METADATA_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)." + "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **redemption** metadata validation rules to be satisfied. The validation runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Advanced_ → _Redemption metadata satisfy_ or _Basic Builder_ → _Attributes match_ → _REDEMPTION METADATA_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)." }, "options": { "type": "object", @@ -15289,7 +15313,7 @@ }, "metadata": { "type": "object", - "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **redemption** metadata validation rules to be satisfied. The validation runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Advanced_ → _Redemption metadata satisfy_ or _Basic Builder_ → _Attributes match_ → _REDEMPTION METADATA_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)." + "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **redemption** metadata validation rules to be satisfied. The validation runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Advanced_ → _Redemption metadata satisfy_ or _Basic Builder_ → _Attributes match_ → _REDEMPTION METADATA_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)." } } }, @@ -18321,7 +18345,7 @@ "7_obj_redemption_object_discount_voucher_extended": { "type": "object", "title": "Discount Voucher", - "description": "This is an object representing a redemption. \n\nRedemption is the key operation in the voucher and promotion tier lifecycle. A customer can redeem a voucher or promotion tier once or multiple times depending on selected limit (`quantity`). Each redemption is recorded in voucher/promotion's history (`redemption_entries`). There is also an option to cancel a redemption. We call such operation a [redemption rollback](rollback-redemption).", + "description": "This is an object representing a redemption. \n\nRedemption is the key operation in the voucher and promotion tier lifecycle. A customer can redeem a voucher or promotion tier once or multiple times depending on selected limit (`quantity`). Each redemption is recorded in voucher/promotion's history (`redemption_entries`). There is also an option to cancel a redemption. We call such operation a [redemption rollback](rollback-redemption).", "properties": { "id": { "type": "string", @@ -19329,7 +19353,7 @@ "7_obj_redemption_object_loyalty_card_extended": { "type": "object", "title": "Loyalty Card Voucher", - "description": "This is an object representing a redemption. \n\nRedemption is the key operation in the voucher and promotion tier lifecycle. A customer can redeem a voucher or promotion tier once or multiple times depending on selected limit (`quantity`). Each redemption is recorded in voucher/promotion's history (`redemption_entries`). There is also an option to cancel a redemption. We call such operation a [redemption rollback](rollback-redemption).", + "description": "This is an object representing a redemption. \n\nRedemption is the key operation in the voucher and promotion tier lifecycle. A customer can redeem a voucher or promotion tier once or multiple times depending on selected limit (`quantity`). Each redemption is recorded in voucher/promotion's history (`redemption_entries`). There is also an option to cancel a redemption. We call such operation a [redemption rollback](rollback-redemption).", "properties": { "id": { "type": "string", @@ -19622,7 +19646,7 @@ "7_obj_redemption_object_discount_voucher": { "type": "object", "title": "Discount Voucher", - "description": "This is an object representing a redemption. \n\nRedemption is the key operation in the voucher and promotion tier lifecycle. A customer can redeem a voucher or promotion tier once or multiple times depending on selected limit (`quantity`). Each redemption is recorded in voucher/promotion's history (`redemption_entries`). There is also an option to cancel a redemption. We call such operation a [redemption rollback](rollback-redemption).", + "description": "This is an object representing a redemption. \n\nRedemption is the key operation in the voucher and promotion tier lifecycle. A customer can redeem a voucher or promotion tier once or multiple times depending on selected limit (`quantity`). Each redemption is recorded in voucher/promotion's history (`redemption_entries`). There is also an option to cancel a redemption. We call such operation a [redemption rollback](rollback-redemption).", "properties": { "id": { "type": "string", @@ -20089,7 +20113,7 @@ "7_obj_redemption_object_loyalty_card": { "type": "object", "title": "Loyalty Card Voucher", - "description": "This is an object representing a redemption. \n\nRedemption is the key operation in the voucher and promotion tier lifecycle. A customer can redeem a voucher or promotion tier once or multiple times depending on selected limit (`quantity`). Each redemption is recorded in voucher/promotion's history (`redemption_entries`). There is also an option to cancel a redemption. We call such operation a [redemption rollback](rollback-redemption).", + "description": "This is an object representing a redemption. \n\nRedemption is the key operation in the voucher and promotion tier lifecycle. A customer can redeem a voucher or promotion tier once or multiple times depending on selected limit (`quantity`). Each redemption is recorded in voucher/promotion's history (`redemption_entries`). There is also an option to cancel a redemption. We call such operation a [redemption rollback](rollback-redemption).", "properties": { "id": { "type": "string", @@ -22519,7 +22543,7 @@ }, "metadata": { "type": "object", - "description": "A set of key/value pairs that you can send in the request body to check against promotion tiers requiring **redemption** metadata validation rules to be satisfied. The validation runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Advanced_ → _Redemption metadata satisfy_ or _Basic Builder_ → _Attributes match_ → _REDEMPTION METADATA_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)." + "description": "A set of key/value pairs that you can send in the request body to check against promotion tiers requiring **redemption** metadata validation rules to be satisfied. The validation runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Advanced_ → _Redemption metadata satisfy_ or _Basic Builder_ → _Attributes match_ → _REDEMPTION METADATA_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)." } } }, @@ -22561,7 +22585,7 @@ }, "metadata": { "type": "object", - "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **redemption** metadata validation rules to be satisfied. The validation runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Advanced_ → _Redemption metadata satisfy_ or _Basic Builder_ → _Attributes match_ → _REDEMPTION METADATA_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)." + "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **redemption** metadata validation rules to be satisfied. The validation runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Advanced_ → _Redemption metadata satisfy_ or _Basic Builder_ → _Attributes match_ → _REDEMPTION METADATA_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)." }, "options": { "type": "object", @@ -22631,7 +22655,7 @@ }, "metadata": { "type": "object", - "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **redemption** metadata validation rules to be satisfied. The validation runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Advanced_ → _Redemption metadata satisfy_ or _Basic Builder_ → _Attributes match_ → _REDEMPTION METADATA_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)." + "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **redemption** metadata validation rules to be satisfied. The validation runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Advanced_ → _Redemption metadata satisfy_ or _Basic Builder_ → _Attributes match_ → _REDEMPTION METADATA_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)." }, "options": { "type": "object", @@ -22705,7 +22729,7 @@ }, "metadata": { "type": "object", - "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **redemption** metadata validation rules to be satisfied. The validation runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Advanced_ → _Redemption metadata satisfy_ or _Basic Builder_ → _Attributes match_ → _REDEMPTION METADATA_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)." + "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **redemption** metadata validation rules to be satisfied. The validation runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Advanced_ → _Redemption metadata satisfy_ or _Basic Builder_ → _Attributes match_ → _REDEMPTION METADATA_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)." }, "options": { "type": "object", @@ -23244,7 +23268,7 @@ }, "publish": { "type": "object", - "description": "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. \n\n\n\n| Required | Optional |\n| -------- | :------: |\n| `type`:`LOYALTY_CARD` | `type`:`DISCOUNT_VOUCHER` | \n| `is_referral_code`:`true` | `type`:`GIFT_VOUCHER` |\n", + "description": "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. \n\n\n\n| Required | Optional |\n| -------- | :------: |\n| `type`:`LOYALTY_CARD` | `type`:`DISCOUNT_VOUCHER` | \n| `is_referral_code`:`true` | `type`:`GIFT_VOUCHER` |\n", "properties": { "object": { "type": "string", @@ -23505,7 +23529,7 @@ }, "publish": { "type": "object", - "description": "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. \n\n\n\n| Required | Optional |\n| -------- | :------: |\n| `type`:`LOYALTY_CARD` | `type`:`DISCOUNT_VOUCHER` | \n| `is_referral_code`:`true` | `type`:`GIFT_VOUCHER` |\n", + "description": "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. \n\n\n\n| Required | Optional |\n| -------- | :------: |\n| `type`:`LOYALTY_CARD` | `type`:`DISCOUNT_VOUCHER` | \n| `is_referral_code`:`true` | `type`:`GIFT_VOUCHER` |\n", "properties": { "object": { "type": "string", @@ -24204,7 +24228,7 @@ "description": "A unique validation rule identifier assigned by the Voucherify API. The validation rule is verified before points are added to the balance." }, "loyalty": { - "description": "An object that defines the number of points that will be added to a loyalty card and how the points will be added.\n\n- `FIXED` adds a fixed number of `points`\n- `PROPORTIONAL` adds points proportionally based on a pre-defined ratio", + "description": "An object that defines the number of points that will be added to a loyalty card and how the points will be added.\n\n- `FIXED` adds a fixed number of `points`.", "oneOf": [ { "$ref": "#/components/schemas/EarningRuleFixed" @@ -24571,7 +24595,7 @@ }, "object": { "type": "string", - "description": "Type of object taken under consideration.", + "description": "Type of object which will be covered by the earning rule.", "enum": [ "products_collection", "product", @@ -24626,7 +24650,7 @@ }, "object": { "type": "string", - "description": "Type of object taken under consideration.", + "description": "Type of object which will be covered by the earning rule.", "enum": [ "products_collection", "product", @@ -24681,7 +24705,7 @@ }, "object": { "type": "string", - "description": "Type of object taken under consideration.", + "description": "Type of object which will be covered by the earning rule.", "enum": [ "products_collection", "product", @@ -25406,7 +25430,7 @@ "8_obj_redemption_object_loyalty_card_extended": { "type": "object", "title": "Loyalty Card Voucher", - "description": "This is an object representing a redemption. \n\nRedemption is the key operation in the voucher lifecycle. A customer can redeem a voucher once or multiple times depending on selected limit (`quantity`). Each redemption is recorded in voucher/promotion's history (`redemption_entries`). There is also an option to cancel a redemption. We call such operation a [redemption rollback](rollback-redemption).", + "description": "This is an object representing a redemption. \n\nRedemption is the key operation in the voucher lifecycle. A customer can redeem a voucher once or multiple times depending on selected limit (`quantity`). Each redemption is recorded in voucher/promotion's history (`redemption_entries`). There is also an option to cancel a redemption. We call such operation a [redemption rollback](rollback-redemption).", "properties": { "id": { "type": "string", @@ -26820,7 +26844,7 @@ "description": "Type of reward." }, "amount": { - "type": "string", + "type": "number", "description": "Define the number of `points` to add to a loyalty card or `credits` to the balance on a gift card. In case of the gift card, the value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000." } } @@ -31981,14 +32005,15 @@ "type": "string", "enum": [ "auto-update", + "passive", "static" ], - "description": "Describes whether the segment is dynamic (customers come in and leave based on set criteria) or static (manually selected customers)." + "description": "Defines whether the segment is:\n- Active (`auto-update`): customers enter and leave the segment based on the defined filters and the `customer.segment.entered` and `customer.segment.left` events are triggered,\n- Passive (`passive`): customers enter and leave the segment based on the defined filters, but the `customer.segment.entered` and `customer.segment.left` events are not triggered,\n- Static (`static`): manually selected customers." }, "filter": { "type": "object", "nullable": true, - "description": "Defines a set of criteria for an `auto-update` segment type. " + "description": "Defines a set of criteria for an `auto-update` or `passive` segment type." }, "initial_sync_status": { "type": "string", @@ -32049,7 +32074,7 @@ }, "type": { "type": "string", - "description": "Describes whether the segment is dynamic (customers come in and leave based on set criteria) or static (manually selected customers).", + "description": "Defines that the segment is static, meaning it includes only the manually selected customers.", "default": "static", "enum": [ "static" @@ -32065,9 +32090,9 @@ } }, "SegmentsCreateRequestBodyDynamic": { - "title": "Dynamic Customer Segment", + "title": "Active or Passive Customer Segment", "type": "object", - "description": "Request body schema for creating a dynamic customer segment in **POST** `v1/segments`.", + "description": "Request body schema for creating an active or passive customer segment in **POST** `v1/segments`.", "properties": { "name": { "type": "string", @@ -32075,15 +32100,15 @@ }, "type": { "type": "string", - "description": "Describes whether the segment is dynamic (customers come in and leave based on set criteria) or static (manually selected customers).", - "default": "auto-update", + "description": "Defines whether the segment is:\n- Active (`auto-update`): customers enter and leave the segment based on the defined filters and the `customer.segment.entered` and `customer.segment.left` events are triggered,\n- Passive (`passive`): customers enter and leave the segment based on the defined filters, but the `customer.segment.entered` and `customer.segment.left` events are not triggered.", "enum": [ - "auto-update" + "auto-update", + "passive" ] }, "filter": { "type": "object", - "description": "Defines a set of criteria for an `auto-update` segment type." + "description": "Defines a set of criteria for an `auto-update` or `passive` segment type." } } }, @@ -35540,6 +35565,16 @@ "maximum": 30, "minimum": 1 }, + "applicable_redeemables_category_limits": { + "type": "object", + "description": "Lists categories by category IDs (keys) and defines their limits (values) of applicable redeemables that belong to campaigns with that category.", + "additionalProperties": { + "type": "integer", + "description": "Limit of applicable redeemables per category.", + "minimum": 1, + "maximum": 10 + } + }, "applicable_exclusive_redeemables_limit": { "type": "integer", "description": "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`.", @@ -35629,6 +35664,7 @@ "applicable_redeemables_limit", "applicable_exclusive_redeemables_limit", "applicable_redeemables_per_category_limit", + "applicable_redeemables_category_limits", "exclusive_categories", "joint_categories", "redeemables_application_mode", @@ -35892,7 +35928,7 @@ }, "metadata": { "type": "object", - "description": "A set of key/value pairs that you can send in the request body to check against redeemables requiring **redemption** metadata validation rules to be satisfied. The validation runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Advanced_ → _Redemption metadata satisfy_ or _Basic Builder_ → _Attributes match_ → _REDEMPTION METADATA_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)." + "description": "A set of key/value pairs that you can send in the request body to check against redeemables requiring **redemption** metadata validation rules to be satisfied. The validation runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Advanced_ → _Redemption metadata satisfy_ or _Basic Builder_ → _Attributes match_ → _REDEMPTION METADATA_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)." } } }, @@ -36005,7 +36041,7 @@ "properties": { "id": { "type": "string", - "description": "Id of the redeemable." + "description": "ID of the redeemable. For a voucher, it's its `code` value." }, "object": { "type": "string", @@ -36648,6 +36684,10 @@ "points": { "type": "integer", "description": "Defines how the points will be added to the loyalty card. FIXED adds a fixed number of points." + }, + "points_formula": { + "type": "string", + "description": "Formula used to dynamically calculate the rewarded points." } }, "required": [ @@ -36710,6 +36750,10 @@ "points": { "type": "integer", "description": "Number of points to be awarded, i.e. how many points to be added to the loyalty card." + }, + "points_formula": { + "type": "string", + "description": "Formula used to dynamically calculate the rewarded points." } } } @@ -36763,6 +36807,10 @@ "points": { "type": "integer", "description": "Number of points to be awarded, i.e. how many points to be added to the loyalty card." + }, + "points_formula": { + "type": "string", + "description": "Formula used to dynamically calculate the rewarded points." } } } @@ -36819,6 +36867,10 @@ "type": "integer", "description": "Number of points to be awarded, i.e. how many points to be added to the loyalty card." }, + "points_formula": { + "type": "string", + "description": "Formula used to dynamically calculate the rewarded points." + }, "property": { "type": "string", "description": "Order metadata property." @@ -36852,7 +36904,7 @@ "enum": [ "ORDER_ITEMS_QUANTITY" ], - "description": "`ORDER_ITEMS_QUANTITY`: Quantity of items defined in order_items.quantity.object & .id (X points for every Y items excluding free items)" + "description": "`ORDER_ITEMS_QUANTITY`: Quantity of items defined in the `order_items.quantity.applicable_to` array or `order_items.quantity.object` & `.id` (X points for every Y items excluding free items)." }, "order_items": { "type": "object", @@ -36864,9 +36916,7 @@ "type": "object", "required": [ "every", - "points", - "object", - "id" + "points" ], "description": "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.", "properties": { @@ -36878,9 +36928,13 @@ "type": "integer", "description": "Number of points to be awarded, i.e. how many points to be added to the loyalty card." }, + "points_formula": { + "type": "string", + "description": "Formula used to dynamically calculate the rewarded points." + }, "object": { "type": "string", - "description": "Type of object taken under consideration.", + "description": "Type of object which will be covered by the earning rule. This is required together with `id`. Can be replaced by the `applicable_to` array. In response, the value of the first object is returned even if `applicable_to` array was used.", "enum": [ "products_collection", "product", @@ -36889,7 +36943,29 @@ }, "id": { "type": "string", - "description": "Unique ID of the resource, i.e. pc_75U0dHlr7u75BJodrW1AE3t6, prod_0bae32322150fd0546, or sku_0b7d7dfb090be5c619." + "description": "Unique ID of the resource assigned by Voucherify. This is required together with `object`. Can be replaced by the `applicable_to` array. In response, the value of the first object is returned even if `applicable_to` array was used. Values are, for example, `pc_75U0dHlr7u75BJodrW1AE3t6` for product collection, `prod_0bae32322150fd0546` for a product, or `sku_0b7d7dfb090be5c619` for a SKU." + }, + "applicable_to": { + "type": "array", + "description": "Defines products, SKUs, or product collections covered by the earning rule. Can be replaced by `object` and `id` to define only one object.", + "items": { + "type": "object", + "properties": { + "object": { + "type": "string", + "description": "Type of object which will be covered by the earning rule.", + "enum": [ + "products_collection", + "product", + "sku" + ] + }, + "id": { + "type": "string", + "description": "Unique ID of the resource assigned by Voucherify. Values are, for example, `pc_75U0dHlr7u75BJodrW1AE3t6` for product collection, `prod_0bae32322150fd0546` for a product, or `sku_0b7d7dfb090be5c619` for a SKU." + } + } + } } } } @@ -36920,7 +36996,7 @@ "enum": [ "ORDER_ITEMS_AMOUNT" ], - "description": "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)" + "description": "ORDER_ITEMS_AMOUNT; Pre-discount amount spent on items defined in the `order_items.quantity.applicable_to` array or `order_items.quantity.object` & `.id` (X points for every Y spent on items excluding discounts)" }, "order_items": { "type": "object", @@ -36932,9 +37008,7 @@ "type": "object", "required": [ "every", - "points", - "object", - "id" + "points" ], "description": "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.", "properties": { @@ -36946,9 +37020,13 @@ "type": "integer", "description": "Number of points to be awarded, i.e. how many points to be added to the loyalty card." }, + "points_formula": { + "type": "string", + "description": "Formula used to dynamically calculate the rewarded points." + }, "object": { "type": "string", - "description": "Type of object taken under consideration.", + "description": "Type of object which will be covered by the earning rule. This is required together with `id`. Can be replaced by the `applicable_to` array. In response, the value of the first object is returned even if `applicable_to` array was used.", "enum": [ "products_collection", "product", @@ -36957,7 +37035,29 @@ }, "id": { "type": "string", - "description": "Unique ID of the resource, i.e. pc_75U0dHlr7u75BJodrW1AE3t6, prod_0bae32322150fd0546, or sku_0b7d7dfb090be5c619." + "description": "Unique ID of the resource assigned by Voucherify. This is required together with `object`. Can be replaced by the `applicable_to` array. In response, the value of the first object is returned even if `applicable_to` array was used. Values are, for example, `pc_75U0dHlr7u75BJodrW1AE3t6` for product collection, `prod_0bae32322150fd0546` for a product, or `sku_0b7d7dfb090be5c619` for a SKU." + }, + "applicable_to": { + "type": "array", + "description": "Defines products, SKUs, or product collections covered by the earning rule. Can be replaced by `object` and `id` to define only one object.", + "items": { + "type": "object", + "properties": { + "object": { + "type": "string", + "description": "Type of object which will be covered by the earning rule.", + "enum": [ + "products_collection", + "product", + "sku" + ] + }, + "id": { + "type": "string", + "description": "Unique ID of the resource assigned by Voucherify. Values are, for example, `pc_75U0dHlr7u75BJodrW1AE3t6` for product collection, `prod_0bae32322150fd0546` for a product, or `sku_0b7d7dfb090be5c619` for a SKU." + } + } + } } } } @@ -37000,9 +37100,7 @@ "type": "object", "required": [ "every", - "points", - "object", - "id" + "points" ], "description": "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.", "properties": { @@ -37014,9 +37112,13 @@ "type": "integer", "description": "Number of points to be awarded, i.e. how many points to be added to the loyalty card." }, + "points_formula": { + "type": "string", + "description": "Formula used to dynamically calculate the rewarded points." + }, "object": { "type": "string", - "description": "Type of object taken under consideration.", + "description": "Type of object which will be covered by the earning rule. This is required together with `id`. Can be replaced by the `applicable_to` array. In response, the value of the first object is returned even if `applicable_to` array was used.", "enum": [ "products_collection", "product", @@ -37025,7 +37127,29 @@ }, "id": { "type": "string", - "description": "Unique ID of the resource, i.e. pc_75U0dHlr7u75BJodrW1AE3t6, prod_0bae32322150fd0546, or sku_0b7d7dfb090be5c619." + "description": "Unique ID of the resource assigned by Voucherify. This is required together with `object`. Can be replaced by the `applicable_to` array. In response, the value of the first object is returned even if `applicable_to` array was used. Values are, for example, `pc_75U0dHlr7u75BJodrW1AE3t6` for product collection, `prod_0bae32322150fd0546` for a product, or `sku_0b7d7dfb090be5c619` for a SKU." + }, + "applicable_to": { + "type": "array", + "description": "Defines products, SKUs, or product collections covered by the earning rule. Can be replaced by `object` and `id` to define only one object.", + "items": { + "type": "object", + "properties": { + "object": { + "type": "string", + "description": "Type of object which will be covered by the earning rule.", + "enum": [ + "products_collection", + "product", + "sku" + ] + }, + "id": { + "type": "string", + "description": "Unique ID of the resource assigned by Voucherify. Values are, for example, `pc_75U0dHlr7u75BJodrW1AE3t6` for product collection, `prod_0bae32322150fd0546` for a product, or `sku_0b7d7dfb090be5c619` for a SKU." + } + } + } } } } @@ -37081,6 +37205,10 @@ "type": "integer", "description": "Number of points to be awarded, i.e. how many points to be added to the loyalty card." }, + "points_formula": { + "type": "string", + "description": "Formula used to dynamically calculate the rewarded points." + }, "property": { "type": "string", "description": "Customer metadata property." @@ -37139,6 +37267,10 @@ "type": "integer", "description": "Number of points to be awarded, i.e. how many points to be added to the loyalty card." }, + "points_formula": { + "type": "string", + "description": "Formula used to dynamically calculate the rewarded points." + }, "property": { "type": "string", "description": "\nCustom event metadata property." @@ -38183,7 +38315,7 @@ "stock": { "type": "integer", "nullable": true, - "description": "Configurable for **material rewards**. The number of units of the product that you want to share as reward." + "description": "Configurable for **material rewards**. The number of units of the product that you want to share as a reward. Use this parameter to code a stock-taking logic." }, "redeemed": { "type": "integer", @@ -41723,7 +41855,7 @@ }, "price_formula": { "type": "number", - "description": "Formula used to calculate the discounted price of an item." + "description": "Formula used to dynamically calculate the discounted price of an item." }, "effect": { "description": "Defines how the discount is applied to the customer's order.", @@ -44847,7 +44979,7 @@ }, "metadata": { "type": "object", - "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **redemption** metadata validation rules to be satisfied. The validation runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Advanced_ → _Redemption metadata satisfy_ or _Basic Builder_ → _Attributes match_ → _REDEMPTION METADATA_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)." + "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **redemption** metadata validation rules to be satisfied. The validation runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Advanced_ → _Redemption metadata satisfy_ or _Basic Builder_ → _Attributes match_ → _REDEMPTION METADATA_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)." } } }, @@ -45333,7 +45465,7 @@ }, "metadata": { "type": "object", - "description": "A set of key/value pairs that you can send in the request body to check against redeemables requiring **redemption** metadata validation rules to be satisfied. The validation runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Advanced_ → _Redemption metadata satisfy_ or _Basic Builder_ → _Attributes match_ → _REDEMPTION METADATA_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)." + "description": "A set of key/value pairs that you can send in the request body to check against redeemables requiring **redemption** metadata validation rules to be satisfied. The validation runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Advanced_ → _Redemption metadata satisfy_ or _Basic Builder_ → _Attributes match_ → _REDEMPTION METADATA_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)." } } }, @@ -46427,6 +46559,7 @@ "redeemables_limit", "applicable_redeemables_limit", "applicable_redeemables_per_category_limit", + "applicable_redeemables_category_limits", "applicable_exclusive_redeemables_limit", "applicable_exclusive_redeemables_per_category_limit", "discount_calculation_mode", @@ -47168,6 +47301,16 @@ "minimum": 1, "maximum": 30 }, + "applicable_redeemables_category_limits": { + "type": "object", + "description": "Lists categories by category IDs (keys) and defines their limits (values) of applicable redeemables that belong to campaigns with that category.", + "additionalProperties": { + "type": "integer", + "description": "Limit of applicable redeemables per category.", + "minimum": 1, + "maximum": 10 + } + }, "applicable_exclusive_redeemables_limit": { "type": "integer", "description": "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`.", @@ -48849,6 +48992,426 @@ } } }, + "webhooks": { + "EVENTS.REDEMPTION.SUCCEEDED": { + "post": { + "requestBody": { + "description": "Indicates that a redemption has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventRedemptionSucceededData" + }, + "examples": { + "redemption.succeeded": { + "value": { + "customer": { + "id": "cust_1g637SqVZnkdPNdAIZ7Ra879", + "name": "Jane Doe", + "email": "jane@jane.io", + "source_id": "test_customer_id_2", + "metadata": { + "lang": "en", + "test": true, + "region": "EMEA" + }, + "object": "customer" + }, + "order": { + "id": "ord_3VYCHwdV0YOOch2nm1RsTKNI", + "source_id": null, + "status": "PAID", + "customer_id": "cust_1g637SqVZnkdPNdAIZ7Ra879", + "referrer_id": null, + "amount": 7000, + "items_discount_amount": 1000, + "items_applied_discount_amount": 1000, + "total_discount_amount": 1000, + "total_applied_discount_amount": 1000, + "total_amount": 6000, + "items": [ + { + "object": "order_item", + "source_id": "adv-mug", + "related_object": "product", + "quantity": 2, + "discount_quantity": 1, + "amount": 2000, + "discount_amount": 1000, + "applied_discount_amount": 1000, + "price": 1000, + "subtotal_amount": 1000 + }, + { + "object": "order_item", + "source_id": "star-th-bottle", + "related_object": "product", + "quantity": 2, + "amount": 5000, + "price": 2500, + "subtotal_amount": 5000 + } + ], + "metadata": {}, + "created_at": "2024-01-15T12:20:38.596843Z", + "object": "order" + }, + "campaign": { + "id": "camp_kwMyXFKquedx8FzXNpVPN7QU", + "name": "Always add missing products", + "campaign_type": "DISCOUNT_COUPONS", + "type": "AUTO_UPDATE", + "is_referral_code": false, + "voucher": { + "type": "DISCOUNT_VOUCHER", + "discount": { + "type": "UNIT", + "units": null, + "effect": "ADD_NEW_ITEMS", + "unit_off": 1, + "unit_type": "prod_0df14b3a6ad8f282a8" + }, + "redemption": { + "quantity": null, + "redeemed_quantity": 0 + }, + "code_config": { + "length": 1, + "prefix": "Always-add-prods-", + "charset": "0123456789", + "pattern": "#", + "postfix": "" + } + }, + "auto_join": false, + "join_once": false, + "active": true, + "category_id": null, + "created_at": "2023-12-08T13:54:29.003375Z", + "updated_at": "2023-12-15T11:07:05.173502Z", + "object": "campaign" + }, + "voucher": { + "id": "v_VZgTRbJvauZR7Ub7exOtAg0MqxXljPpA", + "code": "Always-add-prods-5", + "discount": { + "type": "UNIT", + "unit_off": 1, + "unit_type": "prod_0df14b3a6ad8f282a8", + "effect": "ADD_NEW_ITEMS" + }, + "type": "DISCOUNT_VOUCHER", + "campaign": "Always add missing products", + "campaign_id": "camp_kwMyXFKquedx8FzXNpVPN7QU", + "is_referral_code": false, + "category_id": null, + "active": true, + "created_at": "2023-12-08T14:01:18.213000Z", + "updated_at": "2024-01-15T12:20:38.624905Z", + "object": "voucher" + }, + "holder": null, + "promotion_tier": null, + "redemption": { + "id": "r_0e2500291ae016adea", + "customer_id": "cust_1g637SqVZnkdPNdAIZ7Ra879", + "tracking_id": "track_Pw6r3ejnml43kIwNS4Zj09KZ67xOfLUy", + "date": "2024-01-15T12:20:38.635000Z", + "order": { + "id": "ord_3VYCHwdV0YOOch2nm1RsTKNI", + "source_id": null, + "status": "PAID", + "customer_id": "cust_1g637SqVZnkdPNdAIZ7Ra879", + "referrer_id": null, + "amount": 7000, + "items_discount_amount": 1000, + "items_applied_discount_amount": 1000, + "total_discount_amount": 1000, + "total_applied_discount_amount": 1000, + "total_amount": 6000, + "items": [ + { + "object": "order_item", + "source_id": "adv-mug", + "related_object": "product", + "quantity": 2, + "discount_quantity": 1, + "amount": 2000, + "discount_amount": 1000, + "applied_discount_amount": 1000, + "price": 1000, + "subtotal_amount": 1000 + }, + { + "object": "order_item", + "source_id": "star-th-bottle", + "related_object": "product", + "quantity": 2, + "amount": 5000, + "price": 2500, + "subtotal_amount": 5000 + } + ], + "metadata": {}, + "created_at": "2024-01-15T12:20:38.596843Z", + "object": "order" + }, + "customer": { + "id": "cust_1g637SqVZnkdPNdAIZ7Ra879", + "name": "Jane Doe", + "email": "jane@jane.io", + "source_id": "test_customer_id_2", + "metadata": { + "lang": "en", + "test": true, + "region": "EMEA" + }, + "object": "customer" + }, + "result": "SUCCESS", + "status": "SUCCEEDED", + "voucher": { + "id": "v_VZgTRbJvauZR7Ub7exOtAg0MqxXljPpA", + "code": "Always-add-prods-5", + "discount": { + "type": "UNIT", + "unit_off": 1, + "unit_type": "prod_0df14b3a6ad8f282a8", + "effect": "ADD_NEW_ITEMS" + }, + "type": "DISCOUNT_VOUCHER", + "campaign": "Always add missing products", + "campaign_id": "camp_kwMyXFKquedx8FzXNpVPN7QU", + "is_referral_code": false, + "category_id": null, + "active": true, + "created_at": "2023-12-08T14:01:18.213000Z", + "updated_at": "2024-01-15T12:20:38.624905Z", + "object": "voucher" + }, + "metadata": {}, + "object": "redemption" + }, + "created_at": "2024-01-15T12:20:38.636Z" + } + } + } + } + } + }, + "tags": [ + "Events redemption" + ], + "responses": { + "200": { + "description": "Indicates that a redemption has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventRedemptionSucceededData" + }, + "examples": { + "redemption.succeeded": { + "value": { + "customer": { + "id": "cust_1g637SqVZnkdPNdAIZ7Ra879", + "name": "Jane Doe", + "email": "jane@jane.io", + "source_id": "test_customer_id_2", + "metadata": { + "lang": "en", + "test": true, + "region": "EMEA" + }, + "object": "customer" + }, + "order": { + "id": "ord_3VYCHwdV0YOOch2nm1RsTKNI", + "source_id": null, + "status": "PAID", + "customer_id": "cust_1g637SqVZnkdPNdAIZ7Ra879", + "referrer_id": null, + "amount": 7000, + "items_discount_amount": 1000, + "items_applied_discount_amount": 1000, + "total_discount_amount": 1000, + "total_applied_discount_amount": 1000, + "total_amount": 6000, + "items": [ + { + "object": "order_item", + "source_id": "adv-mug", + "related_object": "product", + "quantity": 2, + "discount_quantity": 1, + "amount": 2000, + "discount_amount": 1000, + "applied_discount_amount": 1000, + "price": 1000, + "subtotal_amount": 1000 + }, + { + "object": "order_item", + "source_id": "star-th-bottle", + "related_object": "product", + "quantity": 2, + "amount": 5000, + "price": 2500, + "subtotal_amount": 5000 + } + ], + "metadata": {}, + "created_at": "2024-01-15T12:20:38.596843Z", + "object": "order" + }, + "campaign": { + "id": "camp_kwMyXFKquedx8FzXNpVPN7QU", + "name": "Always add missing products", + "campaign_type": "DISCOUNT_COUPONS", + "type": "AUTO_UPDATE", + "is_referral_code": false, + "voucher": { + "type": "DISCOUNT_VOUCHER", + "discount": { + "type": "UNIT", + "units": null, + "effect": "ADD_NEW_ITEMS", + "unit_off": 1, + "unit_type": "prod_0df14b3a6ad8f282a8" + }, + "redemption": { + "quantity": null, + "redeemed_quantity": 0 + }, + "code_config": { + "length": 1, + "prefix": "Always-add-prods-", + "charset": "0123456789", + "pattern": "#", + "postfix": "" + } + }, + "auto_join": false, + "join_once": false, + "active": true, + "category_id": null, + "created_at": "2023-12-08T13:54:29.003375Z", + "updated_at": "2023-12-15T11:07:05.173502Z", + "object": "campaign" + }, + "voucher": { + "id": "v_VZgTRbJvauZR7Ub7exOtAg0MqxXljPpA", + "code": "Always-add-prods-5", + "discount": { + "type": "UNIT", + "unit_off": 1, + "unit_type": "prod_0df14b3a6ad8f282a8", + "effect": "ADD_NEW_ITEMS" + }, + "type": "DISCOUNT_VOUCHER", + "campaign": "Always add missing products", + "campaign_id": "camp_kwMyXFKquedx8FzXNpVPN7QU", + "is_referral_code": false, + "category_id": null, + "active": true, + "created_at": "2023-12-08T14:01:18.213000Z", + "updated_at": "2024-01-15T12:20:38.624905Z", + "object": "voucher" + }, + "holder": null, + "promotion_tier": null, + "redemption": { + "id": "r_0e2500291ae016adea", + "customer_id": "cust_1g637SqVZnkdPNdAIZ7Ra879", + "tracking_id": "track_Pw6r3ejnml43kIwNS4Zj09KZ67xOfLUy", + "date": "2024-01-15T12:20:38.635000Z", + "order": { + "id": "ord_3VYCHwdV0YOOch2nm1RsTKNI", + "source_id": null, + "status": "PAID", + "customer_id": "cust_1g637SqVZnkdPNdAIZ7Ra879", + "referrer_id": null, + "amount": 7000, + "items_discount_amount": 1000, + "items_applied_discount_amount": 1000, + "total_discount_amount": 1000, + "total_applied_discount_amount": 1000, + "total_amount": 6000, + "items": [ + { + "object": "order_item", + "source_id": "adv-mug", + "related_object": "product", + "quantity": 2, + "discount_quantity": 1, + "amount": 2000, + "discount_amount": 1000, + "applied_discount_amount": 1000, + "price": 1000, + "subtotal_amount": 1000 + }, + { + "object": "order_item", + "source_id": "star-th-bottle", + "related_object": "product", + "quantity": 2, + "amount": 5000, + "price": 2500, + "subtotal_amount": 5000 + } + ], + "metadata": {}, + "created_at": "2024-01-15T12:20:38.596843Z", + "object": "order" + }, + "customer": { + "id": "cust_1g637SqVZnkdPNdAIZ7Ra879", + "name": "Jane Doe", + "email": "jane@jane.io", + "source_id": "test_customer_id_2", + "metadata": { + "lang": "en", + "test": true, + "region": "EMEA" + }, + "object": "customer" + }, + "result": "SUCCESS", + "status": "SUCCEEDED", + "voucher": { + "id": "v_VZgTRbJvauZR7Ub7exOtAg0MqxXljPpA", + "code": "Always-add-prods-5", + "discount": { + "type": "UNIT", + "unit_off": 1, + "unit_type": "prod_0df14b3a6ad8f282a8", + "effect": "ADD_NEW_ITEMS" + }, + "type": "DISCOUNT_VOUCHER", + "campaign": "Always add missing products", + "campaign_id": "camp_kwMyXFKquedx8FzXNpVPN7QU", + "is_referral_code": false, + "category_id": null, + "active": true, + "created_at": "2023-12-08T14:01:18.213000Z", + "updated_at": "2024-01-15T12:20:38.624905Z", + "object": "voucher" + }, + "metadata": {}, + "object": "redemption" + }, + "created_at": "2024-01-15T12:20:38.636Z" + } + } + } + } + } + } + }, + "operationId": "events-redemption-succeeded" + } + } + }, "paths": { "/v1/publications/create": { "get": { @@ -48857,7 +49420,7 @@ "Publications" ], "summary": "Create Publication", - "description": "This method selects vouchers that are suitable for publication, adds a publish entry and returns the publication.\n\nA voucher is suitable for publication when it's active and hasn't been published yet.\n> ❗️ Limited access\n>\n> Access to this endpoint is limited. This endpoint is designed for specific integrations and the API keys need to be configured to access this endpoint. Navigate to the **Dashboard** → **Project Settings** → **General** → **Integration Keys** to set up a pair of API keys and use them to send the request. \n\n\n> ❗️ Required \n>\n> Query param `voucher` OR `campaign` MUST be filled out. If you provide both, `campaign` param will be skipped.", + "description": "This method selects vouchers that are suitable for publication, adds a publish entry and returns the publication.\n\nA voucher is suitable for publication when it's active and hasn't been published yet.\n> ❗️ Limited access\n>\n> Access to this endpoint is limited. This endpoint is designed for specific integrations and the API keys need to be configured to access this endpoint. Navigate to the **Dashboard** → **Project Settings** → **General** → **Integration Keys** to set up a pair of API keys and use them to send the request. \n\n\n> 🚧 Clearly define the source of the voucher\n>\n> You must clearly define which source you want to publish the voucher code from. It can either be a code from a campaign or a specific voucher identified by a code. \n\n> 🚧 Publish multiple vouchers\n> This endpoint does not support the publishing of multiple vouchers from a single campaign. In case you want to publish multiple vouchers within a single publication, you need to use a [dedicated endpoint](ref:create-publication). \n\n\n\n> 📘 Auto-update campaign\n>\n> In case you want to ensure the number of publishable codes increases automatically with the number of customers, you should use an **auto-update** campaign. \n\n## Example Request \n```markdown Publication Query \n/publications/create?campaign[name]=BlackFriday&customer[source_id]=Customer_Source_ID \n``` \n\n\n> ❗️ Required \n>\n> Query param `voucher` OR `campaign` MUST be filled out. If you provide both, `campaign` param will be skipped.", "parameters": [ { "schema": { @@ -49141,8 +49704,8 @@ "tags": [ "Qualifications" ], - "summary": "Check Eligibility", - "description": "\n> 🚧 The Qualifications endpoint ignores the rules checking:\n> \n> - Limit of total redeemed discount amount per campaign\n> - Limit of total redemptions count per campaign\n> - Redemptions per customer\n> - Redemptions per customer in a campaign \n\nGenerate a list of redeemables that are applicable in the context of the customer and order.\n\nThe new qualifications method is an improved version of [Campaign Qualifications](ref:examine-campaigns-qualification), [Voucher Qualifications](ref:examine-vouchers-qualification), and [Promotions Validation](ref:validate-promotions) API requests. The new qualification method introduces the following improvements:\n\n- Qualification results are returned faster\n- No limit on the number of returned redeemables\n- Introduces new qualification scenarios, not available in the previous version\n\n> 👍 Scenario Guide\n>\n> Read [the dedicated guide](doc:checking-eligibility) to learn about some use cases this endpoint can cover.\n\n## Paging \n\nThe Voucherify Qualifications API request will return to you all of the redeemables available for the customer in batches of up to 50 redeemables. To get the next batch of redeemables, you need to use the `starting_after` cursor.\n\nTo process of paging the redeemables works in the following manner:\n\n- You send the first API request for Qualifications without the `starting_after` parameter.\n- The response will contain a parameter named `has_more`. If the parameter's value is set to `true`, then more redeemables are available.\n- Get the value of the `created_at` parameter of the last returned redeemable. The value of this parameter will be used as a cursor to retrieve the next page of redeemables.\n- Send another API request for Qualification with the `starting_after` parameter set to the value taken from the `created_at` parameter from the last returned redeemable.\n- Voucherify will return the next page of redeemables.\n- If the `has_more` parameter is set to `true`, apply steps 3-5 to get the next page of redeemables.", + "summary": "Check qualification", + "description": "🚧 The Qualifications endpoint ignores the rules checking:\n> \n> - Limit of total redeemed discount amount per campaign\n> - Limit of total redemptions count per campaign\n> - Redemptions per customer\n> - Redemptions per customer in a campaign \n\nGenerate a list of redeemables that are applicable in the context of the customer and order.\n\nThe new qualifications method is an improved version of [Campaign Qualifications](ref:examine-campaigns-qualification), [Voucher Qualifications](ref:examine-vouchers-qualification), and [Promotions Validation](ref:validate-promotions) API requests. The new qualification method introduces the following improvements:\n\n- Qualification results are returned faster\n- No limit on the number of returned redeemables\n- Introduces new qualification scenarios, not available in the previous version\n\n> 👍 Scenario Guide\n>\n> Read [the dedicated guide](doc:checking-eligibility) to learn about some use cases this endpoint can cover.\n\n## Paging \n\nThe Voucherify Qualifications API request will return to you all of the redeemables available for the customer in batches of up to 500 redeemables. To get the next batch of redeemables, you need to use the `starting_after` cursor.\n\nTo process of paging the redeemables works in the following manner:\n\n- You send the first API request for Qualifications without the `starting_after` parameter.\n- The response will contain a parameter named `has_more`. If the parameter's value is set to `true`, then more redeemables are available.\n- Get the value of the `created_at` parameter of the last returned redeemable. The value of this parameter will be used as a cursor to retrieve the next page of redeemables.\n- Send another API request for Qualification with the `starting_after` parameter set to the value taken from the `created_at` parameter from the last returned redeemable.\n- Voucherify will return the next page of redeemables.\n- If the `has_more` parameter is set to `true`, apply steps 3-5 to get the next page of redeemables.\nBesides that, qualification is a great promotion tool to impact ROI to the sky.", "parameters": [], "security": [ { @@ -49416,7 +49979,7 @@ "Validations" ], "summary": "Validate Stackable Discounts", - "description": "Verify redeemables provided in the request. This method is designed for server side integration which means that it is accessible only through private keys.", + "description": "Verify redeemables provided in the request. This method is designed for server side integration which means that it is accessible only through private keys.\n\nAPI keys with a Merchant role can't use this endpoint.", "parameters": [], "security": [ { @@ -50678,7 +51241,7 @@ "Redemptions" ], "summary": "Redeem Stackable Discounts", - "description": "## How API returns calculated discounts and order amounts in the response\n\nIn the table below, you can see the logic the API follows to calculate discounts and amounts:\n\n| **Field** | **Calculation** | **Description** |\n|:---|:---|:---|\n| amount | N/A | This field shows the order amount before applying any discount |\n| total_amount | `total_amount` = `amount` - `total_discount_amount` | This field shows the order amount after applying all the discounts |\n| discount_amount | `discount_amount` = `previous_discount_amount` + `applied_discount_amount` | This field sums up all order-level discounts up to and including the specific discount being calculated for the stacked redemption. |\n| items_discount_amount | sum(items, i => i.discount_amount) | This field sums up all product-specific discounts |\n| total_discount_amount | `total_discount_amount` = `discount_amount` + `items_discount_amount` | This field sums up all order-level and all product-specific discounts |\n| applied_discount_amount | N/A | This field shows the order-level discount applied in a particular request |\n| items_applied_discount_amount | sum(items, i => i.applied_discount_amount) | This field sums up all product-specific discounts applied in a particular request |\n| total_applied_discount_amount | `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | This field sums up all order-level and all product-specific discounts applied in a particular request |\n\n\n> 📘 Also available on client-side\n>\n> This method is also accessible through public keys which you can use in client-side​ apps: mobile and web browser apps. Go to the dedicated [endpoint](ref:redeem-stacked-discounts-client-side) to learn more.\n> - Use `X-Client-Application-Id` as the application ID header.\n> - Use `X-Client-Token` as the appliction secret key header.\n> - Use client-side base URL.\n> - Use an `origin` header for your custom domain.", + "description": "## How API returns calculated discounts and order amounts in the response\n\nIn the table below, you can see the logic the API follows to calculate discounts and amounts:\n\n| **Field** | **Calculation** | **Description** |\n|:---|:---|:---|\n| amount | N/A | This field shows the order amount before applying any discount |\n| total_amount | `total_amount` = `amount` - `total_discount_amount` | This field shows the order amount after applying all the discounts |\n| discount_amount | `discount_amount` = `previous_discount_amount` + `applied_discount_amount` | This field sums up all order-level discounts up to and including the specific discount being calculated for the stacked redemption. |\n| items_discount_amount | sum(items, i => i.discount_amount) | This field sums up all product-specific discounts |\n| total_discount_amount | `total_discount_amount` = `discount_amount` + `items_discount_amount` | This field sums up all order-level and all product-specific discounts |\n| applied_discount_amount | N/A | This field shows the order-level discount applied in a particular request |\n| items_applied_discount_amount | sum(items, i => i.applied_discount_amount) | This field sums up all product-specific discounts applied in a particular request |\n| total_applied_discount_amount | `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | This field sums up all order-level and all product-specific discounts applied in a particular request |\n\n\n\nAPI keys with a Merchant role can't use this endpoint.\n\n\n> 📘 Rollbacks\n>\n> You can't roll back a child redemption. When you call rollback on a stacked redemption, all child redemptions will be rolled back. You need to refer to a parent redemption ID in your [rollback request](ref:rollback-stacked-redemptions). \n\n\n> 📘 Also available on client-side\n>\n> This method is also accessible through public keys which you can use in client-side​ apps: mobile and web browser apps. Go to the dedicated [endpoint](ref:redeem-stacked-discounts-client-side) to learn more.\n> - Use `X-Client-Application-Id` as the application ID header.\n> - Use `X-Client-Token` as the appliction secret key header.\n> - Use client-side base URL.\n> - Use an `origin` header for your custom domain.", "parameters": [], "security": [ { @@ -54110,7 +54673,7 @@ "Vouchers" ], "summary": "Import Vouchers", - "description": "Import generic (standalone) voucherss and gift cards into the repository.\n\n\n\n> 📘 Important notes\n>\n> - **Start and expiration dates** need to be provided in compliance with the ISO 8601 norms. For example, 2020-03-11T09:00:00.000Z.\n> - Custom code attributes (not supported by-default) need to be added as code **metadata**.\n> - You **cannot import the same codes** to a single Voucherify Project.\n\nAny parameters not provided in the payload will be left blank or null.\n\nFor both **standalone discount vouchers and gift cards**, you can import the following fields: \n\n- code\n- category\n- active\n- type\n- start_date\n- expiration_date\n- redemption.quantity\n- additional_info\n- metadata\n\nFor **gift cards**, you can also import the following field:\n\n- gift.amount\n\nFor **discount vouchers**, you can import the `discount` object. The object will slightly vary depending on the type of discount. Each discount type **requires** the `type` to be defined in the import.\n\n| **Discount Type** | **Required fields** |\n|:---|:---|\n| Amount | amount_off, effect |\n| Percent | percent_off, effect |\n| Fixed | fixed_amount, effect |\n| Unit - One item | unit_off, unit_type, effect |\n| Unit - Multiple items | unit_off, unit_type, effect |\n| Shipping | unit_off, unit_type, effect |\n\nFields other than the ones listed above won't be imported. Even if provided, they will be silently skipped.\n\nThis API request starts a process that affects Voucherify data in bulk. \n\nIn case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the `IN_PROGRESS` status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. \n\nThe result will return the async ID. You can verify the status of your request via this [API request](ref:get-async-action).\n\n>🚧 Standalone Vouchers and Campaigns\n>\n>In version [v20241004](https://support.voucherify.io/article/23-whats-new-in-voucherify#v20241004), generic (standalone) voucherss created through the Voucherify dashboard create a campaign for that voucher. However, vouchers imported through the dashboard in the Vouchers section or through the API do not have a campaign attached, so the values for `campaign` and `campaign_id` are `null`.", + "description": "Import generic (standalone) voucherss and gift cards into the repository.\n\n\n\n> 📘 Important notes\n>\n> - **Start and expiration dates** need to be provided in compliance with the ISO 8601 norms. For example, 2020-03-11T09:00:00.000Z.\n> - Custom code attributes (not supported by-default) need to be added as code **metadata**.\n> - You **cannot import the same codes** to a single Voucherify Project.\n\nAny parameters not provided in the payload will be left blank or null.\n\nFor both **standalone discount vouchers and gift cards**, you can import the following fields: \n\n- code\n- category\n- active\n- type\n- start_date\n- expiration_date\n- redemption.quantity\n- additional_info\n- metadata\n\nFor **gift cards**, you can also import the following field:\n\n- gift.amount\n\nFor **discount vouchers**, you can import the `discount` object. The object will slightly vary depending on the type of discount. Each discount type **requires** the `type` to be defined in the import.\n\n| **Discount Type** | **Required fields** |\n|:---|:---|\n| Amount | amount_off, effect |\n| Percent | percent_off, effect |\n| Fixed | fixed_amount, effect |\n| Unit - One item | unit_off, unit_type, effect |\n| Unit - Multiple items | unit_off, unit_type, effect |\n| Shipping | unit_off, unit_type, effect |\n\nFields other than the ones listed above won't be imported. Even if provided, they will be silently skipped.\n\nThis API request starts a process that affects Voucherify data in bulk. \n\nIn case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the `IN_PROGRESS` status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. \n\nThe result will return the async ID. You can verify the status of your request via this [API request](ref:get-async-action).\n\n>🚧 Standalone Vouchers and Campaigns\n>\n>In version [v20241004](https://support.voucherify.io/article/23-whats-new-in-voucherify#v20241004), generic (standalone) voucherss created through the Voucherify dashboard create a campaign for that voucher. However, vouchers imported through the dashboard in the Vouchers section or through the API do not have a campaign attached, so the values for `campaign` and `campaign_id` are `null`.", "parameters": [], "security": [ { @@ -54361,7 +54924,7 @@ }, "responses": { "202": { - "description": "Returns ID of the scheduled async action. The response informs you that your request has been accepted and vouchers will be added to the repository asynchronously. To check the import status and result, copy the `async_action_id` from the response and pass it using the [Get Async Action](ref:get-async-action) endpoint.", + "description": "Returns ID of the scheduled async action. The response informs you that your request has been accepted and vouchers will be added to the repository asynchronously. To check the import status and result, copy the `async_action_id` from the response and pass it using the [Get Async Action](ref:get-async-action) endpoint.", "content": { "application/json": { "schema": { @@ -54387,7 +54950,7 @@ "Vouchers" ], "summary": "Import Vouchers using CSV", - "description": "Import generic (standalone) voucherss into the repository using a CSV file.\n\nThe CSV file has to include headers in the first line. All properties listed in the file headers that cannot be mapped to standard voucher fields will be added to the metadata object. \n\nYou can find an example CSV file [here](https://support.voucherify.io/article/45-import-codes-and-share-them-digitally#coupons).\n___\n\n\n> 📘 Categories\n>\n> In the structure representing your data, you can define a category that the voucher belongs to. You can later use the category of a voucher to group and search by specific criteria in the Dashboard and using the [List Vouchers](ref:list-vouchers) endpoint.\n\nThis API request starts a process that affects Voucherify data in bulk. \n\nIn case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the `IN_PROGRESS` status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. \n\nThe result will return the async ID. You can verify the status of your request via this [API request](ref:get-async-action).\n\nYou can pass the `webhooks_enable=true` parameter to trigger a webhook sendout for created or updated vouchers. Configure the [respective webhooks](ref:introduction-to-webhooks) in Project settings. For updated webhooks, a webhook is sent even if the voucher hasn't been changed in the CSV file.\n\n>🚧 Generic (standalone) vouchers and campaigns\n>\n>In version [v20241004](https://support.voucherify.io/article/23-whats-new-in-voucherify#v20241004), generic (standalone) voucherss created through the Voucherify dashboard create a campaign for that voucher. However, vouchers imported through the dashboard in the Vouchers section or through the API do not have a campaign attached, so the values for `campaign` and `campaign_id` are `null`.", + "description": "Import generic (standalone) voucherss into the repository using a CSV file.\n\nThe CSV file has to include headers in the first line. All properties listed in the file headers that cannot be mapped to standard voucher fields will be added to the metadata object. \n\nYou can find an example CSV file [here](https://support.voucherify.io/article/45-import-codes-and-share-them-digitally#coupons).\n___\n\n```cURL cURL example\ncurl -X **POST** \\\n https://api.voucherify.io/v1/vouchers/importCSV \\\n -F file=@/path/to/vouchers.csv \\\n -F webhooks_enable=true\\\n -H \"X-App-Id: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\" \\\n -H \"X-App-Token: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\"\n```\n\n\n\n> 📘 Standard voucher fields mapping\n>\n> - Go to the [import vouchers](ref:import-vouchers) endpoint to see all standard CSV fields description (body params section).\n> - Supported CSV file headers: Code,Voucher Type,Value,Discount Type,Category,Start Date,Expiration Date,Redemption Limit,Redeemed Quantity, Redeemed Amount,Active,Additional Info,Custom Metadata Property Name\n>- **Start and expiration dates** need to be provided in compliance with the ISO 8601 standard. For example, 2020-03-11T09:00:00.000Z. \n> - `YYYY-MM-DD`\n> - `YYYY-MM-DDTHH`\n> - `YYYY-MM-DDTHH:mm`\n> - `YYYY-MM-DDTHH:mm:ss`\n> - `YYYY-MM-DDTHH:mm:ssZ`\n> - `YYYY-MM-DDTHH:mm:ssZ`\n> - `YYYY-MM-DDTHH:mm:ss.SSSZ`\n> - Custom code attributes (not supported by-default) need to be added as code **metadata**.\n> - You **cannot import the same codes** to a single Voucherify project.\n> - You can, however, upload the same codes to update them.\n\n\n\n> 📘 Categories\n>\n> In the structure representing your data, you can define a category that the voucher belongs to. You can later use the category of a voucher to group and search by specific criteria in the Dashboard and using the [List Vouchers](ref:list-vouchers) endpoint.\n\nThis API request starts a process that affects Voucherify data in bulk. \n\nIn case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the `IN_PROGRESS` status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. \n\nThe result will return the async ID. You can verify the status of your request via this [API request](ref:get-async-action).\n\nYou can pass the `webhooks_enable=true` parameter to trigger a webhook sendout for created or updated vouchers. Configure the [respective webhooks](ref:introduction-to-webhooks) in Project settings. For updated webhooks, a webhook is sent even if the voucher hasn't been changed in the CSV file.\n\n>🚧 Generic (standalone) vouchers and campaigns\n>\n>In version [v20241004](https://support.voucherify.io/article/23-whats-new-in-voucherify#v20241004), generic (standalone) voucherss created through the Voucherify dashboard create a campaign for that voucher. However, vouchers imported through the dashboard in the Vouchers section or through the API do not have a campaign attached, so the values for `campaign` and `campaign_id` are `null`.", "parameters": [], "security": [ { @@ -54411,7 +54974,7 @@ }, "responses": { "202": { - "description": "Returns ID of the scheduled async action. The response informs you that your request has been accepted and vouchers will be added to the repository asynchronously. To check the import status and result, copy the `async_action_id` from the **response** and pass it using the [Get Async Action](ref:get-async-action) endpoint.", + "description": "Returns ID of the scheduled async action. The response informs you that your request has been accepted and vouchers will be added to the repository asynchronously. To check the import status and result, copy the `async_action_id` from the **response** and pass it using the [Get Async Action](ref:get-async-action) endpoint.", "content": { "application/json": { "schema": { @@ -54714,7 +55277,7 @@ "Campaigns" ], "summary": "Create Campaign", - "description": "Method to create a batch of vouchers aggregated in one campaign. You can choose a variety of voucher types and define a unique pattern for generating codes. \n[campaign object](ref:get-campaign) description.\n\n>🚧 Standalone Vouchers and Campaigns\n>\n>In version [v20241004](https://support.voucherify.io/article/23-whats-new-in-voucherify#v20241004), generic (standalone) voucherss created through the Voucherify dashboard create a campaign for that voucher. However, you cannot create a standalone discount or gift voucher campaign with the `\"type\": \"STANDALONE\"` through the API. Voucherify developers work on adding that feature.\n>\n>Follow the [Voucherify Release Notes](https://support.voucherify.io/article/23-whats-new-in-voucherify#v20241004) for more details about released features.", + "description": "Method to create a batch of vouchers aggregated in one campaign. You can choose a variety of voucher types and define a unique pattern for generating codes. \n\n\n> 📘 Global uniqueness\n>\n> All campaign codes are unique across the whole project. Voucherify will not allow you to generate 2 campaigns with the same coupon code. \n\n> 🚧 Code generation status\n>\n> This is an asynchronous action; you can't read or modify a newly created campaign until the code generation is completed. See the `creation_status` field in the [campaign object](ref:get-campaign) description.\n\n>🚧 Standalone Vouchers and Campaigns\n>\n>In version [v20241004](https://support.voucherify.io/article/23-whats-new-in-voucherify#v20241004), generic (standalone) voucherss created through the Voucherify dashboard create a campaign for that voucher. However, you cannot create a standalone discount or gift voucher campaign with the `\"type\": \"STANDALONE\"` through the API. Voucherify developers work on adding that feature.\n>\n>Follow the [Voucherify Release Notes](https://support.voucherify.io/article/23-whats-new-in-voucherify#v20241004) for more details about released features.", "parameters": [], "security": [ { @@ -56060,7 +56623,7 @@ "Campaigns" ], "summary": "Update Campaign", - "description": "Updates the specified campaign by setting the values of the parameters passed in the request body. Any parameters not provided in the payload will be left unchanged. \n\nFields other than the ones listed in the request body won't be modified. Even if provided, they will be silently skipped. \n\n> #### Vouchers will be affected\n>\n> This method will update vouchers aggregated in the campaign. It will affect all vouchers that are not published or redeemed yet.", + "description": "Updates the specified campaign by setting the values of the parameters passed in the request body. Any parameters not provided in the payload will be left unchanged. \n\nFields other than the ones listed in the request body won't be modified. Even if provided, they will be silently skipped. \n\n> #### Vouchers will be affected\n>\n> This method will update vouchers aggregated in the campaign. It will affect all vouchers that are not published or redeemed yet.", "parameters": [], "security": [ { @@ -56257,7 +56820,7 @@ ], "responses": { "202": { - "description": "Returns the ID of the scheduled asynchronous action, informing you that your request has been accepted and the campaign will be deleted from the repository asynchronously. To check the deletion status and result, copy the `async_action_id` from the response and pass it using [Get Async Action](ref:get-async-action) endpoint.", + "description": "Returns the ID of the scheduled asynchronous action, informing you that your request has been accepted and the campaign will be deleted from the repository asynchronously. To check the deletion status and result, copy the `async_action_id` from the response and pass it using [Get Async Action](ref:get-async-action) endpoint.", "content": { "application/json": { "schema": { @@ -56589,7 +57152,7 @@ } ], "requestBody": { - "description": "Discount type, expiration date and the remaining attributes will be taken from the [Campaign](ref:get-campaign) settings.", + "description": "Discount type, expiration date and the remaining attributes will be taken from the [Campaign](ref:get-campaign) settings.", "content": { "application/json": { "schema": { @@ -56731,7 +57294,7 @@ }, "responses": { "202": { - "description": "Returns the ID of the scheduled asynchronous action, informing you that your request has been accepted and the vouchers will be imported to the repository asynchronously. To check the status and result, copy the `async_action_id` from the response and pass it using [Get Async Action](ref:get-async-action) endpoint.", + "description": "Returns the ID of the scheduled asynchronous action, informing you that your request has been accepted and the vouchers will be imported to the repository asynchronously. To check the status and result, copy the `async_action_id` from the response and pass it using [Get Async Action](ref:get-async-action) endpoint.", "content": { "application/json": { "schema": { @@ -56807,7 +57370,7 @@ "Campaigns" ], "summary": "Import Vouchers to Campaign by CSV", - "description": "Imports vouchers to an **existing** campaign. \n\n\nThe CSV file has to include headers in the first line. \n\nCurl Example\n\n\n> 📘 Active\n>\n> The CSV file is allowed in two versions; either with or without a column titled `Active`. It indicates whether the voucher is enabled after the import event. \n\nThis API request starts a process that affects Voucherify data in bulk. \n\nIn case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the `IN_PROGRESS` status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. \n\nThe result will return the async ID. You can verify the status of your request via this [API request](ref:get-async-action).", + "description": "Imports vouchers to an **existing** campaign. \n\n\nThe CSV file has to include headers in the first line. \n\nCurl Example\n\n```cURL\ncurl -X **POST** \\\n https://api.voucherify.io/v1/campaigns/TEST-CAMPAIGN/importCSV \\\n -F file=@/path/to/campaigns.csv \\\n -H \"X-App-Id: c70a6f00-cf91-4756-9df5-47628850002b\" \\\n -H \"X-App-Token: 3266b9f8-e246-4f79-bdf0-833929b1380c\"\n```\n\nYou can import values for the following fields: `Code` (**required**), `Category`, `Active`. In a gift cards import, you can also include the current card balance using the `Gift Amount` header and the amount that was redeemed using the `Redeemed Amount` header. In a loyalty cards import, you can also include the current loyalty card score in points using the `Loyalty Points` header. Remaining CSV columns will be mapped to metadata properties. \n\nDiscount type, time limits, and validation rules will be taken from the [campaign object](ref:get-campaign) settings. \n\n\n| **Active** | **Code** | **Loyalty Points** | **Gift Amount** | **Redeemed Amount** | **Redeemed Quantity** | **Category** | **Custom_metadata_property** |\n|---|---|---|---|---|---|---|---|\n| Use `true` or `false` to enable or disable the voucher; this flag can be used to turn off the ability to redeem a voucher even though it is within the campaign's start/end validity timeframe. | The unique voucher code. | The number of points to be added to the loyalty card. If you leave this undefined, then the initial number of points will be set according to the campaign settings.
Context: `LOYALTY_PROGRAM` | The initial gift card balance.
Context: `GIFT_VOUCHERS` | The amount that was redeemed from the available balance on a gift card. | The number of times the voucher has been redeemed. | A custom tag for the voucher to help you filter codes; you can either import the category name or a unique Voucherify-assigned category ID. | Any additional data that you would like to store for the given loyalty card as a Custom attribute. Remember to define the metadata schema in the Dashboard prior to importing codes. |\n|\n\n> 📘 Active\n>\n> The CSV file is allowed in two versions; either with or without a column titled `Active`. It indicates whether the voucher is enabled after the import event. \n\nThis API request starts a process that affects Voucherify data in bulk. \n\nIn case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the `IN_PROGRESS` status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. \n\nThe result will return the async ID. You can verify the status of your request via this [API request](ref:get-async-action).", "parameters": [], "security": [ { @@ -56831,7 +57394,7 @@ }, "responses": { "200": { - "description": "Returns the ID of the scheduled asynchronous action, informing you that your request has been accepted and the vouchers will be imported to the repository asynchronously. To check the status and result, copy the `async_action_id` from the response and pass it using [Get Async Action](ref:get-async-action) endpoint.", + "description": "Returns the ID of the scheduled asynchronous action, informing you that your request has been accepted and the vouchers will be imported to the repository asynchronously. To check the status and result, copy the `async_action_id` from the response and pass it using [Get Async Action](ref:get-async-action) endpoint.", "content": { "application/json": { "schema": { @@ -56879,7 +57442,7 @@ "Campaigns" ], "summary": "Examine Qualification [Deprecated]", - "description": "\n\n[Read](doc:checking-eligibility-for-coupons) about Qualification API limits before you start.", + "description": "\n> ❗️ Deprecated \n>\n> This endpoint represents the deprecated version of the API responsible for qualification, and we do not recommend using it. The new [Qualifications API](ref:examine-qualification) introduces additional features and improvements while maintaining backward compatibility. Developers are encouraged to migrate to the latest version to take advantage of the latest enhancements and bug fixes. No updates will be provided to the deprecated endpoint. \n\nThe method can be used for sending a request to display all campaigns qualified to the given customer and context (e.g., order). \n\nThe maximum number of **returned campaigns is 50**.\n\n## What campaign types are included in the response?\n\n- `DISCOUNT_COUPONS`\n- `GIFT_VOUCHERS`\n- `REFERRAL_PROGRAM`\n\n## What's excluded?\n\nA checking logic will be run only among campaigns and will ignore _generic (standalone) voucherss_. For generic (standalone) voucherss, you should run a [dedicated endpoint](ref:examine-vouchers-qualification) for searching and identifing vouchers. \n\n## Subsequent Steps\n\nAs a recommended subsequent step after selecting a qualified campaign is to publish a voucher code from that campaign. The [API method for publishing](ref:create-publication) will return a unique code which will belong to a given customer.\n\n## Sample use case\n\nAs a sample use case, you can imagine a requirement of displaying coupons (grouped in campaigns) that a customer is eligible to use. The customer should get assigned to the particular voucher from the campaign and then may redeem that particular code when he/she places an order.\n\n[Read](doc:checking-eligibility-for-coupons) about Qualification API limits before you start.", "parameters": [ { "schema": { @@ -56958,7 +57521,7 @@ }, "responses": { "200": { - "description": "This operation returns the list of valid and active campaigns based on the qualification of a given context (e.g., customer profile, redemptions metadata, order).\n\n[Read](doc:checking-eligibility-for-coupons) about Qualification API limits before you start.", + "description": "This operation returns the list of valid and active campaigns based on the qualification of a given context (e.g., customer profile, redemptions metadata, order).\n\n[Read](doc:checking-eligibility-for-coupons) about Qualification API limits before you start.", "content": { "application/json": { "schema": { @@ -60335,7 +60898,7 @@ "Publications" ], "summary": "List Publications", - "description": "Retrieve a list of publications. To return a **particular** publication, you can use the `source_id` query parameter and provide the `source_id` of the publication you are looking for specifically.\n\n## Pagination\n\n\n```url\nGET /v1/publications?filters[customer_id][conditions][$is][0]=cust_lUET6gRpO5Wxlg5p2j2gRCgL&filters[customer_id][conditions][$is][1]=cust_aR7NfHusxT7PdTMAKMfWDXnc&filters[junction]=OR\n```", + "description": "Retrieve a list of publications. To return a **particular** publication, you can use the `source_id` query parameter and provide the `source_id` of the publication you are looking for specifically.\n\n## Pagination\n\n\n> 🚧 Important!\n>\n> If you want to scroll through a huge set of records, it is recommended to use the [Exports API](ref:create-export). This API will return an error `page_over_limit` if you reach a page above 1000.\n\n## Filter Query\n\nThe `filters` query parameter allows for joining multiple parameters with logical operators. The syntax looks as follows:\n\n\n```url\nfilters[][conditions][][]=\n```\n\n### Operators:\n\n\n```\n \"$in\"\n \"$not_in\"\n \"$is\"\n \"$is_not\"\n \"$has_value\"\n \"$is_unknown\"\n \"$contains\"\n \"$starts_with\"\n \"$ends_with\"\n \"$more_than\"\n \"$less_than\"\n \"$more_than_equal\"\n \"$less_than_equal\"\n```\n\n### Examples\n\n\n```url\nGET /v1/publications?filters[customer_id][conditions][$is][0]=cust_lUET6gRpO5Wxlg5p2j2gRCgL\n```\n\n```url\nGET /v1/publications?filters[customer_id][conditions][$in][0]=cust_lUET6gRpO5Wxlg5p2j2gRCgL&filters[customer_id][conditions][$in][1]=cust_aR7NfHusxT7PdTMAKMfWDXnc\n```\n\n```url\nGET /v1/publications?filters[customer_id][conditions][$is][0]=cust_lUET6gRpO5Wxlg5p2j2gRCgL&filters[customer_id][conditions][$is][1]=cust_aR7NfHusxT7PdTMAKMfWDXnc&filters[junction]=OR\n```", "parameters": [ { "$ref": "#/components/parameters/limit" @@ -60430,7 +60993,7 @@ ], "responses": { "200": { - "description": "Returns a list of publications you've previously created with [create publication](ref:create-publication) or implicitly by the distribution manager. The publications are returned in sorted order, with the most recent ones appearing first.", + "description": "Returns a list of publications you've previously created with [create publication](ref:create-publication) or implicitly by the distribution manager. The publications are returned in sorted order, with the most recent ones appearing first.", "content": { "application/json": { "schema": { @@ -60587,7 +61150,7 @@ "Publications" ], "summary": "Create Publication", - "description": "This method selects vouchers that are suitable for publication, adds a publish entry and returns the publication.\n\nA voucher is suitable for publication when it's active and hasn't been published yet. \n\n\n\n> 📘 Auto-update campaign\n>\n> In case you want to ensure the number of publishable codes increases automatically with the number of customers, you should use an **auto-update** campaign.", + "description": "This method selects vouchers that are suitable for publication, adds a publish entry and returns the publication.\n\nA voucher is suitable for publication when it's active and hasn't been published yet. \n\n\n> 🚧 Clearly define the source of the voucher\n>\n> You must clearly define which source you want to publish the voucher code from. It can either be a code from a campaign or a specific voucher identified by a code. \n\n> 🚧 Publish multiple vouchers\n> In case you want to publish multiple vouchers within a single publication, you need to specify the campaign name and number of vouchers you want to publish. \n\n\n> 📘 Auto-update campaign\n>\n> In case you want to ensure the number of publishable codes increases automatically with the number of customers, you should use an **auto-update** campaign.", "parameters": [ { "schema": { @@ -60857,7 +61420,7 @@ "Validations" ], "summary": "Validate Voucher [Deprecated]", - "description": "[disabled voucher](ref:disable-voucher)\n* `customer does not match segment rules` - learn more [customer tracking](doc:customers#customer-tracking) \n* `order does not match validation rules` - learn more about [validation rules](doc:validation-rules)", + "description": "\n> ❗️ Deprecated \n>\n> This endpoint represents the deprecated version of the API responsible for voucher validation, and we do not recommend using it. The new [Stackable Discounts API](ref:validate-stacked-discounts) introduces additional features and improvements while maintaining backward compatibility, including applying a combination of coupon codes and promotion tiers. Developers are encouraged to migrate to the latest version to take advantage of the latest enhancements and bug fixes. No updates will be provided to the deprecated endpoint. \n\nTo verify a voucher code given by a customer, you can use this method. It is designed for a server side integration, which means that is accessible only through private keys. \n\n\n> ❗️ Important \n>\n> This endpoint supports the validation of a single promo code. If you need to validate more than one incentive, you can use the [Stackable discounts API](ref:validate-stacked-discounts). The stacking discounts API lets you validate up to 30 incentives per call. Before integrating Voucherify, choose which validation endpoint you prefer to use.\n\n#### Gift Vouchers - validate Gift Card and control amount to redeem\nVoucherify also gives the possibility to create a gift card, which allows using credits to fulfill the order. A user can specify how many credits he wants to use from the gift card. The available balance of credits is counted based on policy rules attached to the Gift Voucher definition. \n\nThis operation returns information about the validity of the code. Moreover, it returns a hashed source identifier which can be used as a tracking ID in future calls.\n\nIf a validation session is established, then the session details will be returned as well. Read more about sessions [here](doc:locking-validation-session).\n\nVoucher validation might fail because of one of these reasons:\n* `voucher not found` - voucher doesn't exist or was [deleted](ref:delete-voucher)\n* `voucher expired` - voucher is out of start date - expiration date time frame\n* `voucher is disabled` - learn more about a [disabled voucher](ref:disable-voucher)\n* `customer does not match segment rules` - learn more [customer tracking](doc:customers#customer-tracking) \n* `order does not match validation rules` - learn more about [validation rules](doc:validation-rules)", "parameters": [], "security": [ { @@ -62331,7 +62894,7 @@ "Validations" ], "summary": "Validate Promotions [Deprecated]", - "description": "\n```cURL\ncurl -X **GET** \\\n -H \"X-Client-Application-Id: 011240bf-d5fc-4ef1-9e82-11eb68c43bf5\" \\\n -H \"X-Client-Token: 9e2230c5-71fb-460a-91c6-fbee64707a20\" \\\n -H \"Content-Type: application/json\" \\\n -d `{\n \"customer\": {\n \"id\": \"cust_gN9KgORZECfdhG9qT6n82Zr7\"\n },\n \"order\": {\n \"items\": [\n {\n \"product_id\": \"prod_0a9f9ab4ab019a42d5\",\n \"quantity\": 1\n },\n {\n \"product_id\": \"prod_0a9f9aeddb019a42db\",\n \"quantity\": 1\n },\n {\n \"product_id\": \"prod_0a9f9ab4ab019a42d5\",\n \"quantity\": \"1\"\n },\n {\n \"sku_id\": \"sku_0b7d7dfb090be5c619\",\n \"quantity\": 1\n },\n {\n \"product_id\": \"prod_0b72b0bd64d198e3ae\",\n \"quantity\": 1\n },\n {\n \"product_id\": \"prod_0b7d7c4e814be5c502\",\n \"quantity\": 1\n }\n ],\n \"metadata\":{\n \"payment_mean\": [\"credit-card\"]\n }\n },\n \"options\": {\n \"expand\": [\n \"category\"\n ]\n }\n }`\\\n 'https://api.voucherify.io/v1/promotions/validation?[filters][metadata.has_budget][conditions][$is]=true'\n```", + "description": "\n> ❗️ Deprecated \n>\n> This endpoint represents the deprecated version of the API responsible for qualification, and we do not recommend using it. The new [Qualifications API](ref:check-eligibility) introduces additional features and improvements while maintaining backward compatibility. Developers are encouraged to migrate to the latest version to take advantage of the latest enhancements and bug fixes. No updates will be provided to the deprecated endpoint. \n\n \n> ❗️ Limitation \n>\n> Only the first 150 most recent promotion tiers are checked for eligibility. Older promotion tiers are ignored and not returned. \n\n Use this method to get valid promotions for a given customer and order.\n\n### Advanced validation filters\n\nYou can narrow down a validation to a specific promotion ID or tier metadata. Here are the examples of filtering queries you can use:\n\n| **Filter** | **Example** |\n|:---|:---|\n| promotion_id | [filters][promotion_id][conditions][$is]={{campaign_id}} |\n| tier metadata | [filters][metadata.{{promotion tier metadata key}}][conditions][$is]={{promotion tier metadata value}} |\n\n\n```cURL\ncurl -X **GET** \\\n -H \"X-Client-Application-Id: 011240bf-d5fc-4ef1-9e82-11eb68c43bf5\" \\\n -H \"X-Client-Token: 9e2230c5-71fb-460a-91c6-fbee64707a20\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"customer\": {\n \"id\": \"cust_gN9KgORZECfdhG9qT6n82Zr7\"\n },\n \"order\": {\n \"items\": [\n {\n \"product_id\": \"prod_0a9f9ab4ab019a42d5\",\n \"quantity\": 1\n },\n {\n \"product_id\": \"prod_0a9f9aeddb019a42db\",\n \"quantity\": 1\n },\n {\n \"product_id\": \"prod_0a9f9ab4ab019a42d5\",\n \"quantity\": \"1\"\n },\n {\n \"sku_id\": \"sku_0b7d7dfb090be5c619\",\n \"quantity\": 1\n },\n {\n \"product_id\": \"prod_0b72b0bd64d198e3ae\",\n \"quantity\": 1\n },\n {\n \"product_id\": \"prod_0b7d7c4e814be5c502\",\n \"quantity\": 1\n }\n ],\n \"metadata\":{\n \"payment_mean\": [\"credit-card\"]\n }\n },\n \"options\": {\n \"expand\": [\n \"category\"\n ]\n }\n }'/\n 'https://api.voucherify.io/v1/promotions/validation?audienceRulesOnly=true'\n```\n\n```cURL\ncurl -X **GET** \\\n -H \"X-Client-Application-Id: 011240bf-d5fc-4ef1-9e82-11eb68c43bf5\" \\\n -H \"X-Client-Token: 9e2230c5-71fb-460a-91c6-fbee64707a20\" \\\n -H \"Content-Type: application/json\" \\\n -d `{\n \"customer\": {\n \"id\": \"cust_gN9KgORZECfdhG9qT6n82Zr7\"\n },\n \"order\": {\n \"items\": [\n {\n \"product_id\": \"prod_0a9f9ab4ab019a42d5\",\n \"quantity\": 1\n },\n {\n \"product_id\": \"prod_0a9f9aeddb019a42db\",\n \"quantity\": 1\n },\n {\n \"product_id\": \"prod_0a9f9ab4ab019a42d5\",\n \"quantity\": \"1\"\n },\n {\n \"sku_id\": \"sku_0b7d7dfb090be5c619\",\n \"quantity\": 1\n },\n {\n \"product_id\": \"prod_0b72b0bd64d198e3ae\",\n \"quantity\": 1\n },\n {\n \"product_id\": \"prod_0b7d7c4e814be5c502\",\n \"quantity\": 1\n }\n ],\n \"metadata\":{\n \"payment_mean\": [\"credit-card\"]\n }\n },\n \"options\": {\n \"expand\": [\n \"category\"\n ]\n },\n \"metadata\": {\n \"store_names\": \"Store 1 - New York - Broadway\"\n }\n }`\\\n 'https://api.voucherify.io/v1/promotions/validation?[filters][promotion_id][conditions][$is]=camp_nYcAyjFXmEaBU0nB7EQ4hVTr'\n```\n\n```cURL\ncurl -X **GET** \\\n -H \"X-Client-Application-Id: 011240bf-d5fc-4ef1-9e82-11eb68c43bf5\" \\\n -H \"X-Client-Token: 9e2230c5-71fb-460a-91c6-fbee64707a20\" \\\n -H \"Content-Type: application/json\" \\\n -d `{\n \"customer\": {\n \"id\": \"cust_gN9KgORZECfdhG9qT6n82Zr7\"\n },\n \"order\": {\n \"items\": [\n {\n \"product_id\": \"prod_0a9f9ab4ab019a42d5\",\n \"quantity\": 1\n },\n {\n \"product_id\": \"prod_0a9f9aeddb019a42db\",\n \"quantity\": 1\n },\n {\n \"product_id\": \"prod_0a9f9ab4ab019a42d5\",\n \"quantity\": \"1\"\n },\n {\n \"sku_id\": \"sku_0b7d7dfb090be5c619\",\n \"quantity\": 1\n },\n {\n \"product_id\": \"prod_0b72b0bd64d198e3ae\",\n \"quantity\": 1\n },\n {\n \"product_id\": \"prod_0b7d7c4e814be5c502\",\n \"quantity\": 1\n }\n ],\n \"metadata\":{\n \"payment_mean\": [\"credit-card\"]\n }\n },\n \"options\": {\n \"expand\": [\n \"category\"\n ]\n }\n }`\\\n 'https://api.voucherify.io/v1/promotions/validation?[filters][metadata.has_budget][conditions][$is]=true'\n```", "parameters": [ { "schema": { @@ -64365,7 +64928,7 @@ "Validations" ], "summary": "Validate Promotion Tier [Deprecated]", - "description": "\n> ❗️ Deprecated \n>\n> This endpoint represents the deprecated version of the API responsible for promotion tier redemption, and we do not recommend using it. The new [Stackable Discounts API](ref:validate-stacked-discounts) introduces additional features and improvements while maintaining backward compatibility, including applying a combination of coupon codes and promotion tiers. Developers are encouraged to migrate to the latest version to take advantage of the latest enhancements and bug fixes. No updates will be provided to the deprecated endpoint. \n\nTo verify whether the promotion tier discount can be applied to an order. This method is designed for server side integration which means that it is accessible only through private keys.", + "description": "\n> ❗️ Deprecated \n>\n> This endpoint represents the deprecated version of the API responsible for promotion tier redemption, and we do not recommend using it. The new [Stackable Discounts API](ref:validate-stacked-discounts) introduces additional features and improvements while maintaining backward compatibility, including applying a combination of coupon codes and promotion tiers. Developers are encouraged to migrate to the latest version to take advantage of the latest enhancements and bug fixes. No updates will be provided to the deprecated endpoint. \n\nTo verify whether the promotion tier discount can be applied to an order. This method is designed for server side integration which means that it is accessible only through private keys.", "parameters": [], "security": [ { @@ -66635,7 +67198,7 @@ "Redemptions" ], "summary": "Redeem Voucher [Deprecated]", - "description": "\n```json title=Example Response\n{\n \"id\": \"r_se17sLon6YX5wMhYVzfQa2dc\",\n \"object\": \"redemption\",\n \"date\": \"2020-05-24T13:41:16Z\",\n \"customer_id\": \"cust_lXisxEaEHYKTEVf1YnNS8AUh\",\n \"amount\": 10,\n \"order\": {\n \"status\": \"PROCESSING\",\n \"items\": [\n {\n \"object\": \"order_item\",\n \"product_id\": \"test_source_1\",\n \"quantity\": 1,\n \"amount\": 15000,\n \"price\": 15000\n },\n {\n \"object\": \"order_item\",\n \"product_id\": \"test_source_2\",\n \"quantity\": 1,\n \"amount\": 10000,\n \"price\": 10000\n }\n ],\n \"customer\": {\n \"id\": \"cust_lXisxEaEHYKTEVf1YnNS8AUh\",\n \"object\": \"customer\",\n \"referrals\": {\n \"campaigns\": [],\n \"total\": 0\n }\n },\n \"amount\": 25000,\n \"object\": \"order\",\n \"id\": \"ord_EfMmve84JzQIg2MCM3cAvLgF\",\n \"created_at\": \"2020-05-24T13:41:16Z\",\n \"discount_amount\": 25000\n },\n \"customer\": {\n \"id\": \"cust_lXisxEaEHYKTEVf1YnNS8AUh\",\n \"source_id\": \"tom+Loyalty@email.com\",\n \"name\": \"Tom Loyalty\",\n \"email\": \"tom+Loyalty@email.com\",\n \"metadata\": {},\n \"object\": \"customer\"\n },\n \"reward\": {\n \"assignment_id\": \"rewa_g3QQwQfhJrjBYzEa1NJkub7N\",\n \"loyalty_tier_id\": null,\n \"id\": \"rew_noP2S5H8PEBFT97mennSA531\",\n \"name\": \"1 point 25$\",\n \"created_at\": \"2020-05-24T12:57:19Z\",\n \"parameters\": {\n \"automation_id\": null,\n \"coin\": {\n \"exchange_ratio\": 25.0\n }\n },\n \"type\": \"COIN\",\n \"object\": \"reward\"\n },\n \"metadata\": {\n \"category\": \"vip\",\n \"shop\": \"s1\",\n \"location\": \"l1\"\n },\n \"result\": \"SUCCESS\",\n \"tracking_id\": \"track_IWQYtuUE7phYpPzTHD5uwbyvlrO4nqyzipbQQtsHrRw=\",\n \"voucher\": {\n \"id\": \"v_wjgLC2lrQy1urPOdd35JX0RtkcOcQOmb\",\n \"code\": \"Dm1x8MuX\",\n \"campaign\": \"TestLoyalty-GivePoints\",\n \"campaign_id\": \"camp_qVVaC4vpVlof03eBi8qb5gE7\",\n \"category\": null,\n \"type\": \"LOYALTY_CARD\",\n \"discount\": null,\n \"gift\": null,\n \"loyalty_card\": {\n \"points\": 439,\n \"balance\": 223\n },\n \"start_date\": null,\n \"expiration_date\": null,\n \"validity_timeframe\": null,\n \"validity_day_of_week\": null,\n \"publish\": {\n \"object\": \"list\",\n \"count\": 1,\n \"url\": \"/v1/vouchers/Dm1x8MuX/publications?page=1&limit=10\"\n },\n \"redemption\": {\n \"object\": \"list\",\n \"quantity\": null,\n \"redeemed_quantity\": 7,\n \"url\": \"/v1/vouchers/Dm1x8MuX/redemptions?page=1&limit=10\",\n \"redeemed_points\": 216\n },\n \"active\": true,\n \"additional_info\": null,\n \"metadata\": {},\n \"assets\": {\n \"qr\": {\n \"id\": \"U2FsdGVkX1+9Eo0bLWMZmYK6nQxl3AyR3nqkloGURcpRJcxL3hl5xXSGRYjYdySc9twLaKnYGVXbLtjCGW8FBotl1rTAxLJQm4okoJ385Gd6pc1ty6AnhaHHJjCeLoYYSQCG1EyP9PRxnTihjmsE9g==\",\n \"url\": \"https://dev.dl.voucherify.io/api/v1/assets/qr/U2FsdGVkX1%2B9Eo0bLWMZmYK6nQxl3AyR3nqkloGURcpRJcxL3hl5xXSGRYjYdySc9twLaKnYGVXbLtjCGW8FBotl1rTAxLJQm4okoJ385Gd6pc1ty6AnhaHHJjCeLoYYSQCG1EyP9PRxnTihjmsE9g%3D%3D\"\n },\n \"barcode\": {\n \"id\": \"U2FsdGVkX19NfR0ANlhLM7Df9Ec+xqTh6aTbHakk/Gzeh9zTiuj8KUBLswVXkz0gdLVnn1ZtzjCv7oF/BSQTyJx0YSK+HIUG9RGD+9rVhiC7+4WkSKrgAZ+NeqQBIqcespt8WWygXjfkvbyXBSF7Lg==\",\n \"url\": \"https://dev.dl.voucherify.io/api/v1/assets/barcode/U2FsdGVkX19NfR0ANlhLM7Df9Ec%2BxqTh6aTbHakk%2FGzeh9zTiuj8KUBLswVXkz0gdLVnn1ZtzjCv7oF%2FBSQTyJx0YSK%2BHIUG9RGD%2B9rVhiC7%2B4WkSKrgAZ%2BNeqQBIqcespt8WWygXjfkvbyXBSF7Lg%3D%3D\"\n }\n },\n \"is_referral_code\": false,\n \"holder_id\": \"cust_lXisxEaEHYKTEVf1YnNS8AUh\",\n \"updated_at\": \"2020-05-24T13:41:16Z\",\n \"holder\": {\n \"id\": \"cust_lXisxEaEHYKTEVf1YnNS8AUh\",\n \"source_id\": \"tom+Loyalty@email.com\",\n \"name\": \"Tom Loyalty\",\n \"email\": \"tom+Loyalty@email.com\",\n \"metadata\": {},\n \"object\": \"customer\"\n },\n \"object\": \"voucher\",\n \"validation_rules_assignments\": {\n \"data\": [],\n \"object\": \"list\",\n \"total\": 0,\n \"data_ref\": \"data\"\n }\n }\n}\n```", + "description": "\n> ❗️ Deprecated \n>\n> This endpoint represents the deprecated version of the API responsible for voucher redemption, and we do not recommend using it. The new [Stackable Discounts API](ref:redeem-stacked-discounts) introduces additional features and improvements while maintaining backward compatibility, including applying a combination of coupon codes and promotion tiers. Developers are encouraged to migrate to the latest version to take advantage of the latest enhancements and bug fixes. No updates will be provided to the deprecated endpoint. \n\nTo redeem a voucher, you create a redemption object. It increments the redemption counter and updates the history of the voucher. \n\n## How discounts and order amounts are calculated in the API response?\n\nIn the table below, you can see the logic the API follows to calculate discounts and amounts:\n\n| **Field** | **Calculation** | **Description** |\n|:---|:---|:---|\n| amount | N/A | This field shows the order amount before applying any discount |\n| total_amount | total_amount = amount - total_discount_amount | This field shows the order amount after applying all the discounts |\n| discount_amount | discount_amount = previous_discount_amount + applied_discount_amount | This field sums up all order-level discounts applied to a patricular order |\n| items_discount_amount | sum(items, i => i.discount_amount) | This field sums up all product-specific discounts applied to this order |\n| total_discount_amount | total_discount_amount = discount_amount + items_discount_amount | This field sums up all order-level and all product-specific discounts applied to this order |\n| applied_discount_amount | N/A | This field shows order-level discount applied in a particular request |\n| items_applied_discount_amount | sum(items, i => i.applied_discount_amount) | This field sums up all product-specific discounts applied in a particular request |\n| total_applied_discount_amount | total_applied_discount_amount = applied_discount_amount + items_applied_discount_amount | This field sums up all order-level and all product-specific discounts applied in a particular request |\n\n## SDKs \n\nYou can invoke the redemption endpoint with one of the official libraries: \n\n\n[block:html]\n{\n \"html\": \"
\\n\\n
\\n \\n
\\n\\n
\\n\\n
\\n\\n\\n
\\n\\n\\n\\n\\n\\n
\\n\\n
\\n
\\n\\n\"\n}\n[/block]\n\n## Customer tracking\n\nThe redeem operation is a key part of [Customer tracking] (doc:customer-tracking) workflow. There're 3 ways you can identify your end customer in Voucherify within this request. You can either provide a tracking ID (e.g. your customer's login or a generated id), a customer ID (if the customer is already stored in Voucherify) or a full `customer` object in the payload. Note that you can pass and thus store any customer-related metadata. See examples on the right.\n\n\n```json\n\"customer\": {\n \"source_id\": \"alice.morgan\",\n \"name\": \"Alice Morgan\",\n \"email\": \"alice@morgan.com\",\n \"description\": \"\",\n \"metadata\": {\n \"locale\": \"en-GB\",\n \"shoeSize\": 5,\n \"favourite_brands\": [\"Armani\", \"L'Autre Chose\", \"Vicini\"]\n }\n}\n```\n\nIf you already created a customer profile in Voucherify's database, whether it was implicitly by providing it to the redeem function or explicitly by invoking the [Create Customer](ref:create-customer) method, you can identify your customer in redemptions by a generated ID (starting with `cust_`). \n\n\n```json title=Example Customer Identifier [object]\n\"customer\": {\n \"id\": \"cust_C9qJ3xKgZFqkpMw7b21MF2ow\"\n}\n```\n\n```json title=Example Customer Identifier\n{\n \"customer\": \"cust_C9qJ3xKgZFqkpMw7b21MF2ow\"\n}\n```\n\n```json title=Example Customer Identifier by Source ID\n{\n \"customer\": \"alice.morgan\"\n}\n```\n\n\n> 📘 Redemption rollback\n>\n> Do you need to undo a redemption? You can do it with [redemption rollback](ref:rollback-redemption).\n\n## Redemption failures\n\nThere are several reasons why a redemption may fail. You will get the reason in the error key:\n - `resource_not_found` - voucher with given code does not exist\n- `voucher_not_active` - voucher is not active yet (before start date)\n- `voucher_expired` - voucher has already expired (after expiration date)\n- `voucher_disabled` - voucher has been disabled (`active: false`)\n- `quantity_exceeded` - voucher's redemptions limit has been exceeded\n- `gift_amount_exceeded` - gift amount has been exceeded\n- `customer_rules_violated` - customer did not match the segment\n- `order_rules_violated` - order did not match validation rules\n- `invalid_order` - order was specified incorrectly\n- `invalid_amount` - order amount was specified incorrectly\n- `missing_amount` - order amount was not specified\n- `missing_order_items` - order items were not specified\n- `missing_customer` - customer was not specified\n\n## Order object\n\nThe purchase of previously defined products (products are stored in Voucherify) by end customers is handled through the order object. You are obligated to pass the order object in case you use validation rules. You can learn more about the [validation rules structure] (doc:validation-rules). \n\n| **Attributes** | **Description** |\n|:---|:---|\n| amount
`integer` | A positive integer representing the total amount for the order. |\n| items
`list` | List of items constituting the order. Order items can be defined either by `product_id` or `sku_id`. Along with every item you must define the `quantity`.

Child attributes:

- `product_id` (*string*) - The ID of the associated product object for this line item.

- `sku_id` (*string*) - The ID of the associated variant (sku) object for this line item.

- `quantity` (*integer*) - A positive integer representing the number of instances of the item that are included in this order line.

- `price` (*integer*) - A positive integer representing the cost of an item.

- `amount` (*integer*) - `quantity` * `price` (you should provide it to retrieve `discount_amount` for a particular order item if the discount is applied only to this item learn more |\n\n\n\n\n> 🚧 Order ID\n>\n> If you use the same order id in more than one redemption request, all valid discounts provided in the redemption payload will be applied to the given order. [Read more in this guide] (https://docs.voucherify.io/docs/manage-stackable-discounts).\n\n\n```json title=Example Order\n\"order\": {\n \"amount\": 10000,\n \"items\": [\n {\n \"product_id\": \"prod_Bi7sRr3kwvxH2I\",\n \"quantity\": 1\n }\n ]\n}\n```\n## Gift Vouchers - redeem Gift Card and control redeemed amount\n\nIn Voucherify,you can also create a gift card for customers. Customers then can use gift card credits to fulfill the order. A user can specify how many credits he wants to use from the gift card. The available balance of credits is counted based on policy rules attached to the Gift Voucher definition.\n\nWhen the user wants to define how many gift credits are to be used from the gift card to complete the order, the `credits` property can be assigned the equivalent value in the lowest currency in the request body. The value of credits being applied to the order cannot be higher than the current balance on the gift card.\n\n\n```cURL title=Example Request - control redeemed amount\ncurl -i -X **POST** \\\n -H \"Content-Type:application/json\" \\\n -H \"X-App-Id:c70a6f00-cf91-4756-9df5-47628850002b\" \\\n -H \"X-App-Token:3266b9f8-e246-4f79-bdf0-833929b1380c\" \\\n -d '{\n \"order\": {\n \"amount\": 2500\n },\n \"gift\": {\n \"credits\": 1500\n }\n }' \\ \n 'https://api.voucherify.io/v1/vouchers/aDm4CRR3/redemption'\n```\n## Loyalty Coins - redeem loyalty card and pay with points\n\nVoucherify offers the possibility to set up a reward type in the Loyalty Program, which allows using loyalty points as gift credits. The available balance of credits is counted based on policy rules attached to the reward definition.\n\nIf a user configures just one reward type of paying in points, in the redemption request, there is no additional information required. Voucherify will automatically select as a proper reward definition and will calculate the discount based on the attached policy. \n\n\n```json title=Example Request\n{\n \"order\": {\n \"amount\": 25000,\n \"items\": [\n {\n \"product_id\": \"test_source_1\",\n \"quantity\": \"1\",\n \"price\": 15000\n },\n {\n \"product_id\": \"test_source_2\",\n \"quantity\": \"1\",\n \"price\": 10000\n }\n ]\n },\n \"metadata\": {\n \"category\": \"vip\",\n \"shop\": \"s1\",\n \"location\": \"l1\"\n }\n}\n```\n\n```json title=Example Response\n{\n \"id\": \"r_zv5Qn7cF68RbVX4foKxgwUi1\",\n \"object\": \"redemption\",\n \"date\": \"2020-05-24T13:44:20Z\",\n \"customer_id\": \"cust_lXisxEaEHYKTEVf1YnNS8AUh\",\n \"amount\": 250,\n \"order\": {\n \"status\": \"PROCESSING\",\n \"items\": [\n {\n \"object\": \"order_item\",\n \"product_id\": \"test_source_1\",\n \"quantity\": 1,\n \"amount\": 15000,\n \"price\": 15000\n },\n {\n \"object\": \"order_item\",\n \"product_id\": \"test_source_2\",\n \"quantity\": 1,\n \"amount\": 10000,\n \"price\": 10000\n }\n ],\n \"customer\": {\n \"id\": \"cust_lXisxEaEHYKTEVf1YnNS8AUh\",\n \"object\": \"customer\",\n \"referrals\": {\n \"campaigns\": [],\n \"total\": 0\n }\n },\n \"amount\": 25000,\n \"object\": \"order\",\n \"id\": \"ord_Tgi2ApelDyl86sm5AYDKCBMZ\",\n \"created_at\": \"2020-05-24T13:44:20Z\",\n \"discount_amount\": 25000\n },\n \"customer\": {\n \"id\": \"cust_lXisxEaEHYKTEVf1YnNS8AUh\",\n \"source_id\": \"tom+Loyalty@email.com\",\n \"name\": \"Tom Loyalty\",\n \"email\": \"tom+Loyalty@email.com\",\n \"metadata\": {},\n \"object\": \"customer\"\n },\n \"reward\": {\n \"assignment_id\": \"rewa_pHilLjHWOD7oNjJZnog3VoEi\",\n \"loyalty_tier_id\": \"ltr_3q5dW6GaRC4QkA1oYmfGy1k1\",\n \"id\": \"rew_3qmzGPWJ7LfLXnPAjmbPacIl\",\n \"name\": \"1 point - 25 cents\",\n \"created_at\": \"2020-05-22T18:39:52Z\",\n \"updated_at\": \"2020-05-23T08:18:55Z\",\n \"parameters\": {\n \"automation_id\": null,\n \"coin\": {\n \"exchange_ratio\": 0.25\n }\n },\n \"type\": \"COIN\",\n \"object\": \"reward\"\n },\n \"metadata\": {\n \"category\": \"vip\",\n \"shop\": \"s1\",\n \"location\": \"l1\"\n },\n \"result\": \"SUCCESS\",\n \"tracking_id\": \"track_IWQYtuUE7phYpPzTHD5uwbyvlrO4nqyzipbQQtsHrRw=\",\n \"voucher\": {\n \"id\": \"v_wjgLC2lrQy1urPOdd35JX0RtkcOcQOmb\",\n \"code\": \"Dm1x8MuX\",\n \"campaign\": \"TestLoyalty-GivePoints\",\n \"campaign_id\": \"camp_qVVaC4vpVlof03eBi8qb5gE7\",\n \"category\": null,\n \"type\": \"LOYALTY_CARD\",\n \"discount\": null,\n \"gift\": null,\n \"loyalty_card\": {\n \"points\": 489,\n \"balance\": 23\n },\n \"start_date\": null,\n \"expiration_date\": null,\n \"validity_timeframe\": null,\n \"validity_day_of_week\": null,\n \"publish\": {\n \"object\": \"list\",\n \"count\": 1,\n \"url\": \"/v1/vouchers/Dm1x8MuX/publications?page=1&limit=10\"\n },\n \"redemption\": {\n \"object\": \"list\",\n \"quantity\": null,\n \"redeemed_quantity\": 8,\n \"url\": \"/v1/vouchers/Dm1x8MuX/redemptions?page=1&limit=10\",\n \"redeemed_points\": 466\n },\n \"active\": true,\n \"additional_info\": null,\n \"metadata\": {},\n \"assets\": {\n \"qr\": {\n \"id\": \"U2FsdGVkX1+9Eo0bLWMZmYK6nQxl3AyR3nqkloGURcpRJcxL3hl5xXSGRYjYdySc9twLaKnYGVXbLtjCGW8FBotl1rTAxLJQm4okoJ385Gd6pc1ty6AnhaHHJjCeLoYYSQCG1EyP9PRxnTihjmsE9g==\",\n \"url\": \"https://dev.dl.voucherify.io/api/v1/assets/qr/U2FsdGVkX1%2B9Eo0bLWMZmYK6nQxl3AyR3nqkloGURcpRJcxL3hl5xXSGRYjYdySc9twLaKnYGVXbLtjCGW8FBotl1rTAxLJQm4okoJ385Gd6pc1ty6AnhaHHJjCeLoYYSQCG1EyP9PRxnTihjmsE9g%3D%3D\"\n },\n \"barcode\": {\n \"id\": \"U2FsdGVkX19NfR0ANlhLM7Df9Ec+xqTh6aTbHakk/Gzeh9zTiuj8KUBLswVXkz0gdLVnn1ZtzjCv7oF/BSQTyJx0YSK+HIUG9RGD+9rVhiC7+4WkSKrgAZ+NeqQBIqcespt8WWygXjfkvbyXBSF7Lg==\",\n \"url\": \"https://dev.dl.voucherify.io/api/v1/assets/barcode/U2FsdGVkX19NfR0ANlhLM7Df9Ec%2BxqTh6aTbHakk%2FGzeh9zTiuj8KUBLswVXkz0gdLVnn1ZtzjCv7oF%2FBSQTyJx0YSK%2BHIUG9RGD%2B9rVhiC7%2B4WkSKrgAZ%2BNeqQBIqcespt8WWygXjfkvbyXBSF7Lg%3D%3D\"\n }\n },\n \"is_referral_code\": false,\n \"holder_id\": \"cust_lXisxEaEHYKTEVf1YnNS8AUh\",\n \"updated_at\": \"2020-05-24T13:44:20Z\",\n \"holder\": {\n \"id\": \"cust_lXisxEaEHYKTEVf1YnNS8AUh\",\n \"source_id\": \"tom+Loyalty@email.com\",\n \"name\": \"Tom Loyalty\",\n \"email\": \"tom+Loyalty@email.com\",\n \"metadata\": {},\n \"object\": \"customer\"\n },\n \"object\": \"voucher\",\n \"validation_rules_assignments\": {\n \"data\": [],\n \"object\": \"list\",\n \"total\": 0,\n \"data_ref\": \"data\"\n }\n }\n}\n```\n\nIn case the user wants to define how much he spends in points, it is configurable by property `points` in a request body.\n\n\n```json title=Example Request\n{\n \"reward\": {\n \"points\": 10\n },\n \"order\": {\n \"amount\": 25000,\n \"items\": [\n {\n \"product_id\": \"test_source_1\",\n \"quantity\": \"1\",\n \"price\": 15000\n },\n {\n \"product_id\": \"test_source_2\",\n \"quantity\": \"1\",\n \"price\": 10000\n }\n ]\n },\n \"metadata\": {\n \"category\": \"vip\",\n \"shop\": \"s1\",\n \"location\": \"l1\"\n }\n}\n```\n\n```json title=Example Response\n{\n \"id\": \"r_NJIfNYD8uc2lNm3YBAqXr3FF\",\n \"object\": \"redemption\",\n \"date\": \"2020-05-24T16:28:29Z\",\n \"customer_id\": \"cust_lXisxEaEHYKTEVf1YnNS8AUh\",\n \"amount\": 10,\n \"order\": {\n \"status\": \"PROCESSING\",\n \"items\": [\n {\n \"object\": \"order_item\",\n \"product_id\": \"test_source_1\",\n \"quantity\": 1,\n \"amount\": 15000,\n \"price\": 15000\n },\n {\n \"object\": \"order_item\",\n \"product_id\": \"test_source_2\",\n \"quantity\": 1,\n \"amount\": 10000,\n \"price\": 10000\n }\n ],\n \"customer\": {\n \"id\": \"cust_lXisxEaEHYKTEVf1YnNS8AUh\",\n \"object\": \"customer\",\n \"referrals\": {\n \"campaigns\": [],\n \"total\": 0\n }\n },\n \"amount\": 25000,\n \"object\": \"order\",\n \"id\": \"ord_70kKdXIKCSx5cfglKSpz9aHy\",\n \"created_at\": \"2020-05-24T16:28:29Z\",\n \"discount_amount\": 250\n },\n \"customer\": {\n \"id\": \"cust_lXisxEaEHYKTEVf1YnNS8AUh\",\n \"source_id\": \"tom+Loyalty@email.com\",\n \"name\": \"Tom Loyalty\",\n \"email\": \"tom+Loyalty@email.com\",\n \"metadata\": {},\n \"object\": \"customer\"\n },\n \"reward\": {\n \"assignment_id\": \"rewa_pHilLjHWOD7oNjJZnog3VoEi\",\n \"loyalty_tier_id\": null,\n \"id\": \"rew_3qmzGPWJ7LfLXnPAjmbPacIl\",\n \"name\": \"1 point - 25 cents\",\n \"created_at\": \"2020-05-22T18:39:52Z\",\n \"updated_at\": \"2020-05-24T13:44:26Z\",\n \"parameters\": {\n \"automation_id\": null,\n \"coin\": {\n \"exchange_ratio\": 0.25\n }\n },\n \"type\": \"COIN\",\n \"object\": \"reward\"\n },\n \"metadata\": {\n \"category\": \"vip\",\n \"shop\": \"s1\",\n \"location\": \"l1\"\n },\n \"result\": \"SUCCESS\",\n \"tracking_id\": \"track_IWQYtuUE7phYpPzTHD5uwbyvlrO4nqyzipbQQtsHrRw=\",\n \"voucher\": {\n \"id\": \"v_wjgLC2lrQy1urPOdd35JX0RtkcOcQOmb\",\n \"code\": \"Dm1x8MuX\",\n \"campaign\": \"TestLoyalty-GivePoints\",\n \"campaign_id\": \"camp_qVVaC4vpVlof03eBi8qb5gE7\",\n \"category\": null,\n \"type\": \"LOYALTY_CARD\",\n \"discount\": null,\n \"gift\": null,\n \"loyalty_card\": {\n \"points\": 539,\n \"balance\": 63\n },\n \"start_date\": null,\n \"expiration_date\": null,\n \"validity_timeframe\": null,\n \"validity_day_of_week\": null,\n \"publish\": {\n \"object\": \"list\",\n \"count\": 1,\n \"url\": \"/v1/vouchers/Dm1x8MuX/publications?page=1&limit=10\"\n },\n \"redemption\": {\n \"object\": \"list\",\n \"quantity\": null,\n \"redeemed_quantity\": 9,\n \"url\": \"/v1/vouchers/Dm1x8MuX/redemptions?page=1&limit=10\",\n \"redeemed_points\": 476\n },\n \"active\": true,\n \"additional_info\": null,\n \"metadata\": {},\n \"assets\": {\n \"qr\": {\n \"id\": \"U2FsdGVkX1+9Eo0bLWMZmYK6nQxl3AyR3nqkloGURcpRJcxL3hl5xXSGRYjYdySc9twLaKnYGVXbLtjCGW8FBotl1rTAxLJQm4okoJ385Gd6pc1ty6AnhaHHJjCeLoYYSQCG1EyP9PRxnTihjmsE9g==\",\n \"url\": \"https://dev.dl.voucherify.io/api/v1/assets/qr/U2FsdGVkX1%2B9Eo0bLWMZmYK6nQxl3AyR3nqkloGURcpRJcxL3hl5xXSGRYjYdySc9twLaKnYGVXbLtjCGW8FBotl1rTAxLJQm4okoJ385Gd6pc1ty6AnhaHHJjCeLoYYSQCG1EyP9PRxnTihjmsE9g%3D%3D\"\n },\n \"barcode\": {\n \"id\": \"U2FsdGVkX19NfR0ANlhLM7Df9Ec+xqTh6aTbHakk/Gzeh9zTiuj8KUBLswVXkz0gdLVnn1ZtzjCv7oF/BSQTyJx0YSK+HIUG9RGD+9rVhiC7+4WkSKrgAZ+NeqQBIqcespt8WWygXjfkvbyXBSF7Lg==\",\n \"url\": \"https://dev.dl.voucherify.io/api/v1/assets/barcode/U2FsdGVkX19NfR0ANlhLM7Df9Ec%2BxqTh6aTbHakk%2FGzeh9zTiuj8KUBLswVXkz0gdLVnn1ZtzjCv7oF%2FBSQTyJx0YSK%2BHIUG9RGD%2B9rVhiC7%2B4WkSKrgAZ%2BNeqQBIqcespt8WWygXjfkvbyXBSF7Lg%3D%3D\"\n }\n },\n \"is_referral_code\": false,\n \"holder_id\": \"cust_lXisxEaEHYKTEVf1YnNS8AUh\",\n \"updated_at\": \"2020-05-24T16:28:29Z\",\n \"holder\": {\n \"id\": \"cust_lXisxEaEHYKTEVf1YnNS8AUh\",\n \"source_id\": \"tom+Loyalty@email.com\",\n \"name\": \"Tom Loyalty\",\n \"email\": \"tom+Loyalty@email.com\",\n \"metadata\": {},\n \"object\": \"customer\"\n },\n \"object\": \"voucher\",\n \"validation_rules_assignments\": {\n \"data\": [],\n \"object\": \"list\",\n \"total\": 0,\n \"data_ref\": \"data\"\n }\n }\n}\n```\n\nMoreover, it is possible to define many levels of reward in which collected points can be used as gift credits. Per each tier, we can implement different conversion factors. Having many options in the rewards catalog, we will need to select a coins calculation policy (reward ID) that we want to use for calculating a final discount in the redemption request.\n\n\n\n```json title=Example Request\n{\n \"reward\": {\n \"points\": 30,\n \"id\": \"rew_noP2S5H8PEBFT97mennSA531\"\n },\n \"order\": {\n \"amount\": 25000,\n \"items\": [\n {\n \"product_id\": \"test_source_1\",\n \"quantity\": \"1\",\n \"price\": 15000\n },\n {\n \"product_id\": \"test_source_2\",\n \"quantity\": \"1\",\n \"price\": 10000\n }\n ]\n },\n \"metadata\": {\n \"category\": \"vip\",\n \"shop\": \"s1\",\n \"location\": \"l1\"\n }\n}\n```\n\n```json title=Example Response\n{\n \"id\": \"r_se17sLon6YX5wMhYVzfQa2dc\",\n \"object\": \"redemption\",\n \"date\": \"2020-05-24T13:41:16Z\",\n \"customer_id\": \"cust_lXisxEaEHYKTEVf1YnNS8AUh\",\n \"amount\": 10,\n \"order\": {\n \"status\": \"PROCESSING\",\n \"items\": [\n {\n \"object\": \"order_item\",\n \"product_id\": \"test_source_1\",\n \"quantity\": 1,\n \"amount\": 15000,\n \"price\": 15000\n },\n {\n \"object\": \"order_item\",\n \"product_id\": \"test_source_2\",\n \"quantity\": 1,\n \"amount\": 10000,\n \"price\": 10000\n }\n ],\n \"customer\": {\n \"id\": \"cust_lXisxEaEHYKTEVf1YnNS8AUh\",\n \"object\": \"customer\",\n \"referrals\": {\n \"campaigns\": [],\n \"total\": 0\n }\n },\n \"amount\": 25000,\n \"object\": \"order\",\n \"id\": \"ord_EfMmve84JzQIg2MCM3cAvLgF\",\n \"created_at\": \"2020-05-24T13:41:16Z\",\n \"discount_amount\": 25000\n },\n \"customer\": {\n \"id\": \"cust_lXisxEaEHYKTEVf1YnNS8AUh\",\n \"source_id\": \"tom+Loyalty@email.com\",\n \"name\": \"Tom Loyalty\",\n \"email\": \"tom+Loyalty@email.com\",\n \"metadata\": {},\n \"object\": \"customer\"\n },\n \"reward\": {\n \"assignment_id\": \"rewa_g3QQwQfhJrjBYzEa1NJkub7N\",\n \"loyalty_tier_id\": null,\n \"id\": \"rew_noP2S5H8PEBFT97mennSA531\",\n \"name\": \"1 point 25$\",\n \"created_at\": \"2020-05-24T12:57:19Z\",\n \"parameters\": {\n \"automation_id\": null,\n \"coin\": {\n \"exchange_ratio\": 25.0\n }\n },\n \"type\": \"COIN\",\n \"object\": \"reward\"\n },\n \"metadata\": {\n \"category\": \"vip\",\n \"shop\": \"s1\",\n \"location\": \"l1\"\n },\n \"result\": \"SUCCESS\",\n \"tracking_id\": \"track_IWQYtuUE7phYpPzTHD5uwbyvlrO4nqyzipbQQtsHrRw=\",\n \"voucher\": {\n \"id\": \"v_wjgLC2lrQy1urPOdd35JX0RtkcOcQOmb\",\n \"code\": \"Dm1x8MuX\",\n \"campaign\": \"TestLoyalty-GivePoints\",\n \"campaign_id\": \"camp_qVVaC4vpVlof03eBi8qb5gE7\",\n \"category\": null,\n \"type\": \"LOYALTY_CARD\",\n \"discount\": null,\n \"gift\": null,\n \"loyalty_card\": {\n \"points\": 439,\n \"balance\": 223\n },\n \"start_date\": null,\n \"expiration_date\": null,\n \"validity_timeframe\": null,\n \"validity_day_of_week\": null,\n \"publish\": {\n \"object\": \"list\",\n \"count\": 1,\n \"url\": \"/v1/vouchers/Dm1x8MuX/publications?page=1&limit=10\"\n },\n \"redemption\": {\n \"object\": \"list\",\n \"quantity\": null,\n \"redeemed_quantity\": 7,\n \"url\": \"/v1/vouchers/Dm1x8MuX/redemptions?page=1&limit=10\",\n \"redeemed_points\": 216\n },\n \"active\": true,\n \"additional_info\": null,\n \"metadata\": {},\n \"assets\": {\n \"qr\": {\n \"id\": \"U2FsdGVkX1+9Eo0bLWMZmYK6nQxl3AyR3nqkloGURcpRJcxL3hl5xXSGRYjYdySc9twLaKnYGVXbLtjCGW8FBotl1rTAxLJQm4okoJ385Gd6pc1ty6AnhaHHJjCeLoYYSQCG1EyP9PRxnTihjmsE9g==\",\n \"url\": \"https://dev.dl.voucherify.io/api/v1/assets/qr/U2FsdGVkX1%2B9Eo0bLWMZmYK6nQxl3AyR3nqkloGURcpRJcxL3hl5xXSGRYjYdySc9twLaKnYGVXbLtjCGW8FBotl1rTAxLJQm4okoJ385Gd6pc1ty6AnhaHHJjCeLoYYSQCG1EyP9PRxnTihjmsE9g%3D%3D\"\n },\n \"barcode\": {\n \"id\": \"U2FsdGVkX19NfR0ANlhLM7Df9Ec+xqTh6aTbHakk/Gzeh9zTiuj8KUBLswVXkz0gdLVnn1ZtzjCv7oF/BSQTyJx0YSK+HIUG9RGD+9rVhiC7+4WkSKrgAZ+NeqQBIqcespt8WWygXjfkvbyXBSF7Lg==\",\n \"url\": \"https://dev.dl.voucherify.io/api/v1/assets/barcode/U2FsdGVkX19NfR0ANlhLM7Df9Ec%2BxqTh6aTbHakk%2FGzeh9zTiuj8KUBLswVXkz0gdLVnn1ZtzjCv7oF%2FBSQTyJx0YSK%2BHIUG9RGD%2B9rVhiC7%2B4WkSKrgAZ%2BNeqQBIqcespt8WWygXjfkvbyXBSF7Lg%3D%3D\"\n }\n },\n \"is_referral_code\": false,\n \"holder_id\": \"cust_lXisxEaEHYKTEVf1YnNS8AUh\",\n \"updated_at\": \"2020-05-24T13:41:16Z\",\n \"holder\": {\n \"id\": \"cust_lXisxEaEHYKTEVf1YnNS8AUh\",\n \"source_id\": \"tom+Loyalty@email.com\",\n \"name\": \"Tom Loyalty\",\n \"email\": \"tom+Loyalty@email.com\",\n \"metadata\": {},\n \"object\": \"customer\"\n },\n \"object\": \"voucher\",\n \"validation_rules_assignments\": {\n \"data\": [],\n \"object\": \"list\",\n \"total\": 0,\n \"data_ref\": \"data\"\n }\n }\n}\n```", "parameters": [ { "schema": { @@ -68044,7 +68607,7 @@ "Redemptions" ], "summary": "Redeem Promotion [Deprecated]", - "description": "[redemption rollback](ref:rollback-redemption).", + "description": "\n> ❗️ Deprecated \n>\n> This endpoint represents the deprecated version of the API responsible for promotion tier redemption, and we do not recommend using it. The new [Stackable Discounts API](ref:redeem-stacked-discounts) introduces additional features and improvements while maintaining backward compatibility, including applying a combination of coupon codes and promotion tiers. Developers are encouraged to migrate to the latest version to take advantage of the latest enhancements and bug fixes. No updates will be provided to the deprecated endpoint. \n\nTo redeem a promotion, you create a redemption object passing a context.\n\nYou can retrieve a list of active promotions through the [Validate Promotions](ref:validate-promotions) endpoint. That validation method will return a list of active​ promotion tiers identified by thier IDs. \n\n> 📘 Redemption rollback\n>\n> Do you need to undo a redemption? You can do it with [redemption rollback](ref:rollback-redemption).", "parameters": [], "security": [ { @@ -68824,7 +69387,7 @@ "Loyalties" ], "summary": "Create Loyalty Campaign", - "description": "Creates a batch of [loyalty campaign object](ref:get-loyalty-program) description.", + "description": "Creates a batch of [loyalty cards](ref:get-member) aggregated in a single loyalty campaign. It also allows you to define a custom codes pattern. \n\n\n> 📘 Global uniqueness\n> All codes are unique across the whole project. Voucherify won't allow to generate the same codes in any of your campaigns.\n\n\n> 🚧 Asynchronous action!\n>\n> This is an asynchronous action, you can't read or modify a newly created campaign until the code generation is completed. See `creation_status` field in the [loyalty campaign object](ref:get-loyalty-program) description.", "parameters": [], "security": [ { @@ -69205,7 +69768,7 @@ "Loyalties" ], "summary": "Update Loyalty Campaign", - "description": "Updates a loyalty program. \n\nFields other than those specified in the allowed request body payload won't be modified (even if provided they are silently skipped). Any parameters not provided will be left unchanged. \n\nThis method will update the [loyalty cards](ref:get-member) which have not been published or redeemed yet.", + "description": "Updates a loyalty program. \n\nFields other than those specified in the allowed request body payload won't be modified (even if provided they are silently skipped). Any parameters not provided will be left unchanged. \n\nThis method will update the [loyalty cards](ref:get-member) which have not been published or redeemed yet.", "parameters": [], "security": [ { @@ -69468,7 +70031,7 @@ ], "responses": { "200": { - "description": "Returns the ID of the scheduled asynchronous action, informing you that your request has been accepted and the loyalty campaign will be deleted from the repository asynchronously. To check the deletion status and result, copy the `async_action_id` from the response and pass it using [Get Async Action](ref:get-async-action) endpoint.", + "description": "Returns the ID of the scheduled asynchronous action, informing you that your request has been accepted and the loyalty campaign will be deleted from the repository asynchronously. To check the deletion status and result, copy the `async_action_id` from the response and pass it using [Get Async Action](ref:get-async-action) endpoint.", "content": { "application/json": { "schema": { @@ -69707,7 +70270,7 @@ "Loyalties" ], "summary": "Add Member", - "description": "This method assigns a loyalty card to a customer. It selects a \n> 📘 Auto-update campaign\n>\n> In case you want to ensure the number of publishable codes increases automatically with the number of customers, you should use **auto-update** campaign.", + "description": "This method assigns a loyalty card to a customer. It selects a [loyalty card](ref:get-voucher) suitable for publication, adds a publish entry, and returns the published voucher. \n\nA voucher is suitable for publication when it's active and hasn't been published yet. \n\n\n> 📘 Auto-update campaign\n>\n> In case you want to ensure the number of publishable codes increases automatically with the number of customers, you should use **auto-update** campaign.", "parameters": [], "security": [ { @@ -69720,7 +70283,7 @@ } ], "requestBody": { - "description": "Provide details to whom the loyalty card should be assigned. \n\nYou can choose to either specify the exact loyalty card code that you want to publish from existin (non-assigned) codes, or choose not to specify a voucher code. If you choose not to specify a code in the request paylaod, then the system will choose the next available voucher code available to be assigned to a customer. \n\nYou can also include metadata in the request payload. This metadata will be assigned to the publication object, but will not be returned in the response to this endpoint. To see of publications (assignments of particular codes to customers) and publication metadata, use the [List Publications](ref:list-publications) endpoint.", + "description": "Provide details to whom the loyalty card should be assigned. \n\nYou can choose to either specify the exact loyalty card code that you want to publish from existin (non-assigned) codes, or choose not to specify a voucher code. If you choose not to specify a code in the request paylaod, then the system will choose the next available voucher code available to be assigned to a customer. \n\nYou can also include metadata in the request payload. This metadata will be assigned to the publication object, but will not be returned in the response to this endpoint. To see of publications (assignments of particular codes to customers) and publication metadata, use the [List Publications](ref:list-publications) endpoint.", "content": { "application/json": { "schema": { @@ -70033,7 +70596,7 @@ "Loyalties" ], "summary": "Get Member", - "description": "Retrieve loyalty card with the given member ID (i.e. voucher code). \n\n[endpoint](ref:get-member-1). The URL was re-designed to allow you to retrieve loyalty card details without having to provide the `campaignId` as a path parameter.", + "description": "Retrieve loyalty card with the given member ID (i.e. voucher code). \n\n\n> 📘 Alternative endpoint\n> This endpoint is an alternative to this [endpoint](ref:get-member-1). The URL was re-designed to allow you to retrieve loyalty card details without having to provide the `campaignId` as a path parameter.", "parameters": [], "security": [ { @@ -71547,7 +72110,7 @@ "Loyalties" ], "summary": "Adjust Loyalty Card Balance", - "description": "This method gives adds or removes balance to an existing loyalty card that is assigned to a holder. The removal of points will consume the points that expire the soonest. \n\n[endpoint](ref:update-loyalty-card-balance-1). The URL was re-designed to allow you to add or remove loyalty card balance without having to provide the `campaignId` as a path parameter.", + "description": "This method gives adds or removes balance to an existing loyalty card that is assigned to a holder. The removal of points will consume the points that expire the soonest. \n\n\n\n >🚧 Async Action\n> \n> This is an async action. If you want to perform several add or remove loyalty card balance actions in a short time and their order matters, set up sufficient time-out between the calls.\n\n\n> 📘 Alternative endpoint\n> This endpoint is an alternative to this [endpoint](ref:update-loyalty-card-balance-1). The URL was re-designed to allow you to add or remove loyalty card balance without having to provide the `campaignId` as a path parameter.", "parameters": [], "security": [ { @@ -71660,7 +72223,7 @@ "Loyalties" ], "summary": "Transfer Loyalty Points", - "description": "Transfer points between different loyalty cards which have holders. You need to provide the campaign ID and the loyalty card ID you want the points to be transferred to as path parameters in the URL. In the request body, you provide the loyalty cards you want the points to be transferred from and the number of points to transfer from each card.\n\nTransfer works only for loyalty cards that have holders, meaning they were published to customers.", + "description": "Transfer points between different loyalty cards which have holders.\n\nProvide the campaign ID and the loyalty card ID you want the points to be transferred to as path parameters. In the request body, provide the loyalty cards you want the points to be transferred from and the number of points to transfer from each card.\n\nTransfer works only for loyalty cards that have holders, meaning the cards were published to customers.\n\nThe transferred points expire according to the target program expiration rules.", "parameters": [], "security": [ { @@ -73392,7 +73955,7 @@ }, "responses": { "200": { - "description": "Returns an object with the export ID of the scheduled generation of CSV file with exported points expirations. You can use either the [Download Export](ref:download-export) endpoint to download the CSV file.", + "description": "Returns an object with the export ID of the scheduled generation of CSV file with exported points expirations. You can use either the [Get Export](ref:get-export) endpoint to view the status and obtain the URL of the CSV file or [Download Export](ref:download-export) endpoint to download the CSV file.", "content": { "application/json": { "schema": { @@ -76518,7 +77081,7 @@ "Loyalties" ], "summary": "List Reward Assignments", - "description": "Returns active rewards from a given loyalty campaign.", + "description": "Returns active rewards from a given loyalty campaign.", "parameters": [ { "$ref": "#/components/parameters/limit" @@ -76612,7 +77175,7 @@ "Loyalties" ], "summary": "Create Reward Assignment", - "description": "Add rewards to a loyalty campaign.", + "description": "Add rewards to a loyalty campaign.", "parameters": [], "security": [ { @@ -78513,7 +79076,7 @@ "Loyalties" ], "summary": "Redeem Reward", - "description": "[endpoint](ref:redeem-reward-1). The URL was re-designed to allow you to redeem a reward without having to provide the `campaignId` as a path parameter.", + "description": "\n> 📘 Alternative endpoint\n>\n> This endpoint is an alternative to this [endpoint](ref:redeem-reward-1). The URL was re-designed to allow you to redeem a reward without having to provide the `campaignId` as a path parameter.", "parameters": [], "security": [ { @@ -80131,7 +80694,7 @@ }, "in": "query", "name": "starting_after", - "description": "A cursor for pagination. This is a date-time value that defines your place in the list based on `created_at` property from the customer object. For instance, if you make a list request and receive 100 objects, ending with an object created at `2020-05-24T13:43:09.024Z`, your subsequent call can include `starting_after=2020-05-24T13:43:09.024Z` in order to fetch the next page of the list. \n\n| **Option** | **Format** | **Sorting** |\n|:---|:---|:---|\n| Return customers **before** a specific creation date | - set `starting_after` parameter to the breakpoint date | Sorting order is **descending**; the most recent dates first and least recent dates last. |\n| Return customers **after** a specific create or update date | - include the `order` parameter set to `created_at` or `updated_at`
- set `starting_after` to the breakpoint date | Sorting order is **ascending**; the least recent dates first and the most recent dates last. |\n" + "description": "A cursor for pagination. This is a date-time value that defines your place in the list based on `created_at` property from the customer object. For instance, if you make a list request and receive 100 objects, ending with an object created at `2020-05-24T13:43:09.024Z`, your subsequent call can include `starting_after=2020-05-24T13:43:09.024Z` in order to fetch the next page of the list. \n\n| **Option** | **Format** | **Sorting** |\n|:---|:---|:---|\n| Return customers **before** a specific creation date | - set `starting_after` parameter to the breakpoint date | Sorting order is **descending**; the most recent dates first and least recent dates last. |\n| Return customers **after** a specific create or update date | - include the `order` parameter set to `created_at` or `updated_at`
- set `starting_after` to the breakpoint date | Sorting order is **ascending**; the least recent dates first and the most recent dates last. |\n" } ], "security": [ @@ -80357,7 +80920,7 @@ "Customers" ], "summary": "Create Customer", - "description": "Creates a customer object.\n\n\n\n> 📘 Upsert Mode\n>\n> If you pass an `id` or a `source_id` that already exists in the customer database, Voucherify will return a related customer object with updated fields.", + "description": "Creates a customer object.\n\n\n\n> 📘 Upsert Mode\n>\n> If you pass an `id` or a `source_id` that already exists in the customer database, Voucherify will return a related customer object with updated fields.", "parameters": [], "security": [ { @@ -80913,7 +81476,7 @@ "Customers" ], "summary": "Import and Update Customers using CSV", - "description": "This API method lets you import or update customer data. To get a proper and valid response, please send a CSV file with data separated by commas. \n\n## Request Example\n\n> 📘 Standard customer fields mapping\n>\n> **No spaces allowed in field names** \n> Id, Name, Email, Phone, Birthdate, Source_id, Address_line_1, Address_line_2, Address_Postal_Code, Address_City, Address_State, Address_Country, Description, Metadata_name_1, Metadata_name_2\n\n## Update Customers using CSV\n\nIf you would like to update customer's data, you can do it using the CSV file with new data. However, remember to include a `source_id` in your CSV file to manage the update successfully.\n\nThis API request starts a process that affects Voucherify data in bulk. \n\nIn case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the `IN_PROGRESS` status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. \n\nThe result will return the async ID. You can verify the status of your request via this [API request](ref:get-async-action).", + "description": "This API method lets you import or update customer data. To get a proper and valid response, please send a CSV file with data separated by commas. \n\n## Request Example\n\n```cURL\ncurl -X **POST** \\\n https://api.voucherify.io/v1/customers/importCSV \\\n -F file=@/path/to/customers.csv \\\n -H \"X-App-Id: c70a6f00-cf91-4756-9df5-47628850002b\" \\\n -H \"X-App-Token: 3266b9f8-e246-4f79-bdf0-833929b1380c\"\n```\n## CSV File Format\n\nThe CSV file has to include headers in the first line. All properties which cannot be mapped to standard customer fields will be added to the metadata object.\n\n\n> 📘 Standard customer fields mapping\n>\n> **No spaces allowed in field names** \n> Id, Name, Email, Phone, Birthdate, Source_id, Address_line_1, Address_line_2, Address_Postal_Code, Address_City, Address_State, Address_Country, Description, Metadata_name_1, Metadata_name_2\n\n## Update Customers using CSV\n\nIf you would like to update customer's data, you can do it using the CSV file with new data. However, remember to include a `source_id` in your CSV file to manage the update successfully.\n\nThis API request starts a process that affects Voucherify data in bulk. \n\nIn case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the `IN_PROGRESS` status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. \n\nThe result will return the async ID. You can verify the status of your request via this [API request](ref:get-async-action).", "parameters": [], "security": [ { @@ -80938,7 +81501,7 @@ }, "responses": { "202": { - "description": "Returns ID of the scheduled async action. The response informs you that your request has been accepted and customers will be added to the repository asynchronously. To check the import status and result, copy the `async_action_id` from the response and pass it using the [Get Async Action](ref:get-async-action) endpoint.", + "description": "Returns ID of the scheduled async action. The response informs you that your request has been accepted and customers will be added to the repository asynchronously. To check the import status and result, copy the `async_action_id` from the response and pass it using the [Get Async Action](ref:get-async-action) endpoint.", "content": { "application/json": { "schema": { @@ -82456,7 +83019,7 @@ "Orders" ], "summary": "Create Order", - "description": "Creates an order object and triggers an order creation event.\n\n\n\n> 📘 Upsert Mode\n>\n> If you pass an `id` or a `source_id` that already exists in the order database, Voucherify will return a related order object with updated fields.", + "description": "Creates an order object and triggers an order creation event.\n\n\n\n> 📘 Upsert Mode\n>\n> If you pass an `id` or a `source_id` that already exists in the order database, Voucherify will return a related order object with updated fields.", "parameters": [], "security": [ { @@ -82923,7 +83486,7 @@ "Orders" ], "summary": "Import Orders", - "description": "[update order](ref:update-order) endpoints should be used. This is critical because this endpoint does not store events or launch distributions.\n\n## Limitations\n\n### Import volume\n\nThere can be only a single on-going order import per tenant per project at a given time. The user can schedule more imports but those extra imports will be scheduled to run in sequence one by one. \n\n### Maximum count of orders in single import\n\nThere is a `2000` limit but we might decide to change it to a lower / higher value at any given time depending if we find this value is too high or too low with time.\n\n## Notifications\n\nThere are no notifications on the Dashboard because this import is launched via the API.\n\n## Triggered actions\n \nIf you import orders with customers, then a logic will be scheduled responsible for placing these customers into segments and refreshing the segment's summary. Consequently, this update will trigger \n- **customers entering into segments** \n- **distributions** based on any rules tied to customer entering segment(s)\n- **earning rules** based on the customer entering segment(s)\n\n## What is not triggered\n\n1. No webhooks are triggered during the import of orders - for both orders and upserted products / skus. \n\n2. Distributions based on Order Update, Order Paid, Order Created and Order Cancelled. In other words if you have a distribution based on Order Paid and you import an order with a PAID status, the distribution is not going to be triggered. \n\n3. No events are created during the import of orders - for both orders and upserted products / skus. In other words you won't see any events in the Activity tab in the Dashboard such as Order created or Order paid. If you are additionally upserting products / skus, then you won't see the Product created events listed, etc. \n\n4. Earning rules based on Order Paid won't be triggered.\n\nThis API request starts a process that affects Voucherify data in bulk. \n\nIn case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. \n\nThe result will return the async ID. You can verify the status of your request via this [API request](ref:get-async-action).", + "description": "\n\n> 🚧 Historical orders\n>\n> This endpoint should only be used to import historical orders into Voucherify. For on-going synchronization, the [create order](ref:create-order) and [update order](ref:update-order) endpoints should be used. This is critical because this endpoint does not store events or launch distributions.\n\n## Limitations\n\n### Import volume\n\nThere can be only a single on-going order import per tenant per project at a given time. The user can schedule more imports but those extra imports will be scheduled to run in sequence one by one. \n\n### Maximum count of orders in single import\n\nThere is a `2000` limit but we might decide to change it to a lower / higher value at any given time depending if we find this value is too high or too low with time.\n\n## Notifications\n\nThere are no notifications on the Dashboard because this import is launched via the API.\n\n## Triggered actions\n \nIf you import orders with customers, then a logic will be scheduled responsible for placing these customers into segments and refreshing the segment's summary. Consequently, this update will trigger \n- **customers entering into segments** \n- **distributions** based on any rules tied to customer entering segment(s)\n- **earning rules** based on the customer entering segment(s)\n\n## What is not triggered\n\n1. No webhooks are triggered during the import of orders - for both orders and upserted products / skus. \n\n2. Distributions based on Order Update, Order Paid, Order Created and Order Cancelled. In other words if you have a distribution based on Order Paid and you import an order with a PAID status, the distribution is not going to be triggered. \n\n3. No events are created during the import of orders - for both orders and upserted products / skus. In other words you won't see any events in the Activity tab in the Dashboard such as Order created or Order paid. If you are additionally upserting products / skus, then you won't see the Product created events listed, etc. \n\n4. Earning rules based on Order Paid won't be triggered.\n\nThis API request starts a process that affects Voucherify data in bulk. \n\nIn case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. \n\nThe result will return the async ID. You can verify the status of your request via this [API request](ref:get-async-action).", "parameters": [], "security": [ { @@ -83197,7 +83760,7 @@ }, "responses": { "200": { - "description": "Returns the ID of the scheduled asynchronous action, informing you that your request has been accepted and the order(s) will be added to the repository asynchronously. To check the status and result, copy the `async_action_id` from the response and pass it using [Get Async Action](ref:get-async-action) endpoint.", + "description": "Returns the ID of the scheduled asynchronous action, informing you that your request has been accepted and the order(s) will be added to the repository asynchronously. To check the status and result, copy the `async_action_id` from the response and pass it using [Get Async Action](ref:get-async-action) endpoint.", "content": { "application/json": { "schema": { @@ -83244,7 +83807,7 @@ "Orders" ], "summary": "Create Orders Export", - "description": "Creates a downloadable CSV file containing a list of orders.\n\nThe parameters listed in the payload resembles headers in the CSV file. To include a parameter to the file, add it to the `parameters.fields` object in the request body.\n\nThe available filters are all [order object](ref:get-order) attributes. Additionally, any metadata defined in the metadata schema can be exported.\n\nPassing an empty JSON will generate a file containing three default fields: `id`, `source_id`, and `status`.\n\nThe fields array is an array of strings containing the data in the export. These fields define the headers in the CSV file. The array can be a combination of any of the following available fields:\n\n| **Field** | **Definition** | **Example Export** |\n|:---|:---|:---|\n| id | Unique order ID. | ord_A69RIxEdRsPuC6i8gFGVHUft |\n| source_id | Unique order source ID. | 8638 |\n| created_at | Timestamp in ISO 8601 format representing the date and time when the order was created. | 2022-03-09T09:16:32.521Z |\n| updated_at | Timestamp in ISO 8601 format representing the date and time when the order was last updated. | 2022-03-09T09:16:33.331Z |\n| status | Order status. | `PAID`, `CREATED`, `FULFILLED`, `CANCELED` |\n| amount | Total amount of order items. | 7700 |\n| discount_amount | Represents total amount of the discount applied to whole cart. | 500 |\n| items_discount_amount | Represents total amount of the discount applied to order line items. | 100 |\n| total_discount_amount | All discounts applied to the order including discounts applied to particular order line items and discounts applied to the whole cart. | 600 |\n| total_amount | Total order amount after applying all discounts. | 7100 |\n| customer_id | Customer unique ID. | cust_2G4fUQdCXUqp35nXNleav7bO |\n| referrer_id | Referrer unique ID. | cust_IkrTR674vvQvr9a4rDMiqglY |\n| metadata | Returns all order metadata. | Response will include all order metadata. |\n| metadata.X | Where X is the name of a particular order metadata property. | The returned value will depend on the type of data defined in the Dashboard > Project Settings > Metdata Schemas > Order. |", + "description": "Creates a downloadable CSV file containing a list of orders.\n\nThe parameters listed in the payload resembles headers in the CSV file. To include a parameter to the file, add it to the `parameters.fields` object in the request body.\n\nThe available filters are all [order object](ref:get-order) attributes. Additionally, any metadata defined in the metadata schema can be exported.\n\nPassing an empty JSON will generate a file containing three default fields: `id`, `source_id`, and `status`.\n\nThe fields array is an array of strings containing the data in the export. These fields define the headers in the CSV file. The array can be a combination of any of the following available fields:\n\n| **Field** | **Definition** | **Example Export** |\n|:---|:---|:---|\n| id | Unique order ID. | ord_A69RIxEdRsPuC6i8gFGVHUft |\n| source_id | Unique order source ID. | 8638 |\n| created_at | Timestamp in ISO 8601 format representing the date and time when the order was created. | 2022-03-09T09:16:32.521Z |\n| updated_at | Timestamp in ISO 8601 format representing the date and time when the order was last updated. | 2022-03-09T09:16:33.331Z |\n| status | Order status. | `PAID`, `CREATED`, `FULFILLED`, `CANCELED` |\n| amount | Total amount of order items. | 7700 |\n| discount_amount | Represents total amount of the discount applied to whole cart. | 500 |\n| items_discount_amount | Represents total amount of the discount applied to order line items. | 100 |\n| total_discount_amount | All discounts applied to the order including discounts applied to particular order line items and discounts applied to the whole cart. | 600 |\n| total_amount | Total order amount after applying all discounts. | 7100 |\n| customer_id | Customer unique ID. | cust_2G4fUQdCXUqp35nXNleav7bO |\n| referrer_id | Referrer unique ID. | cust_IkrTR674vvQvr9a4rDMiqglY |\n| metadata | Returns all order metadata. | Response will include all order metadata. |\n| metadata.X | Where X is the name of a particular order metadata property. | The returned value will depend on the type of data defined in the Dashboard > Project Settings > Metdata Schemas > Order. |", "parameters": [], "security": [ { @@ -83320,7 +83883,7 @@ }, "responses": { "200": { - "description": "Returns the `id` of the export object and `status` of the file generation process. The `id` is used in the [Download Export](ref:download-export) method to return the contents of the CSV file. The status indicates whether the file has been scheduled for creation.", + "description": "Returns the `id` of the export object and `status` of the file generation process. The `id` is used in the [Get Export](ref:get-export) method to generate the url for the downloadable CSV file or in the [Download Export](ref:download-export) method to return the contents of the CSV file. The status indicates whether the file has been scheduled for creation.", "content": { "application/json": { "schema": { @@ -83565,7 +84128,7 @@ "Products" ], "summary": "Create Product", - "description": "Creates a product object.\n\n\n\n> 📘 Upsert Mode\n>\n> If you pass an `id` or a `source_id` that already exists in the product database, Voucherify will return a related product object with updated fields.", + "description": "Creates a product object.\n\n\n\n> 📘 Upsert Mode\n>\n> If you pass an `id` or a `source_id` that already exists in the product database, Voucherify will return a related product object with updated fields.", "parameters": [], "security": [ { @@ -84188,7 +84751,7 @@ }, "name": "productId", "in": "path", - "description": "A Voucherify [product](ref:get-product) ID or product source ID.", + "description": "A Voucherify [product](ref:get-product) ID or product source ID.", "required": true } ], @@ -84351,7 +84914,7 @@ "Products" ], "summary": "Create SKU", - "description": "This method adds product variants to a \n\n> 📘 Upsert Mode\n>\n> If you pass an `id` or a `source_id` that already exists in the sku database, Voucherify will return a related sku object with updated fields.", + "description": "This method adds product variants to a [created product](ref:create-product). \n\n\n\n> 📘 Upsert Mode\n>\n> If you pass an `id` or a `source_id` that already exists in the sku database, Voucherify will return a related sku object with updated fields.", "parameters": [], "security": [ { @@ -84439,7 +85002,7 @@ "name": "productId", "in": "path", "required": true, - "description": "A unique Voucherify [product](ref:get-product) ID or product source ID." + "description": "A unique Voucherify [product](ref:get-product) ID or product source ID." }, { "schema": { @@ -84448,7 +85011,7 @@ "name": "skuId", "in": "path", "required": true, - "description": "A Voucherify [SKU ID](ref:get-sku) or SKU source ID." + "description": "A Voucherify [SKU ID](ref:get-sku) or SKU source ID." } ], "put": { @@ -84599,7 +85162,7 @@ "Products" ], "summary": "Import Products using CSV", - "description": "Import products into the repository using a CSV file. \n\nCurl Example\n\n\n> 📘 Standard product fields mapping\n>\n> - Create a **comma separated value (CSV) file** or download our CSV import template. You can find an example template [here](https://s3.amazonaws.com/helpscout.net/docs/assets/5902f1c12c7d3a057f88a36d/attachments/627b82ed68d51e779443f550/Import_products_template.csv).\n> - Supported CSV file headers: `name,source_id,price,attributes,image_url,Metadata_property_name`\n> - **Name** is a **required** field. The remaining fields in the CSV template are optional.\n> - Override/Update products' **names** in Voucherify using this method. Data will be updated for each product included in the CSV file whose **source_id** matches a source ID in Voucherify. No other data can be updated other than the product name.\n> - Note that dates and date-time attributes need to be provided in compliance with the **ISO 8601 norms**. For example, 2022-03-11T09:00:00.000Z or 2022-03-11\n> - `YYYY-MM-DD`\n> - `YYYY-MM-DDTHH`\n> - `YYYY-MM-DDTHH:mm`\n> - `YYYY-MM-DDTHH:mm:ss`\n> - `YYYY-MM-DDTHH:mm:ssZ`\n> - `YYYY-MM-DDTHH:mm:ssZ`\n> - `YYYY-MM-DDTHH:mm:ss.SSSZ`\n> - Columns that cannot be mapped to standard fields, will be mapped to **Custom attributes** and added as **products' metadata**. There is no limit on the number of custom attributes that you can import as metadata. \n> - To provide the proper data type, you need to add all custom attributes to the metadata schema **before importing the file**. Read more [here](https://support.voucherify.io/article/99-schema-validation-metadata#add-metadata).\n> - **Product attributes** (not custom attributes) need to be separated by a comma and enclosed in double quotes, i.e \"attribute1,attribute2\".\n> - Headers with metadata names **can't contain white-space characters**.\n> - If you import metadata defined in the schema as **arrays (multiple)**, you need to separate each value using a comma, for example: \n> - array of strings: \"subscribed,premium\" \n> - array of numbers: \"123,234\". \n> - array of dates: \"2000-01-01,2000-01-02\"\n\nThis API request starts a process that affects Voucherify data in bulk. \n\nIn case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the `IN_PROGRESS` status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. \n\nThe result will return the async ID. You can verify the status of your request via this [API request](ref:get-async-action).", + "description": "Import products into the repository using a CSV file. \n\nCurl Example\n\n```cURL\ncurl -X **POST** \\\n https://api.voucherify.io/v1/products/importCSV \\\n -F file=@/path/to/products.csv \\\n -H \"X-App-Id: c70a6f00-cf91-4756-9df5-47628850002b\" \\\n -H \"X-App-Token: 3266b9f8-e246-4f79-bdf0-833929b1380c\"\n```\n\nThe CSV file has to include headers in the first line.\n\n\n\n> 📘 Standard product fields mapping\n>\n> - Create a **comma separated value (CSV) file** or download our CSV import template. You can find an example template [here](https://s3.amazonaws.com/helpscout.net/docs/assets/5902f1c12c7d3a057f88a36d/attachments/627b82ed68d51e779443f550/Import_products_template.csv).\n> - Supported CSV file headers: `name,source_id,price,attributes,image_url,Metadata_property_name`\n> - **Name** is a **required** field. The remaining fields in the CSV template are optional.\n> - Override/Update products' **names** in Voucherify using this method. Data will be updated for each product included in the CSV file whose **source_id** matches a source ID in Voucherify. No other data can be updated other than the product name.\n> - Note that dates and date-time attributes need to be provided in compliance with the **ISO 8601 norms**. For example, 2022-03-11T09:00:00.000Z or 2022-03-11\n> - `YYYY-MM-DD`\n> - `YYYY-MM-DDTHH`\n> - `YYYY-MM-DDTHH:mm`\n> - `YYYY-MM-DDTHH:mm:ss`\n> - `YYYY-MM-DDTHH:mm:ssZ`\n> - `YYYY-MM-DDTHH:mm:ssZ`\n> - `YYYY-MM-DDTHH:mm:ss.SSSZ`\n> - Columns that cannot be mapped to standard fields, will be mapped to **Custom attributes** and added as **products' metadata**. There is no limit on the number of custom attributes that you can import as metadata. \n> - To provide the proper data type, you need to add all custom attributes to the metadata schema **before importing the file**. Read more [here](https://support.voucherify.io/article/99-schema-validation-metadata#add-metadata).\n> - **Product attributes** (not custom attributes) need to be separated by a comma and enclosed in double quotes, i.e \"attribute1,attribute2\".\n> - Headers with metadata names **can't contain white-space characters**.\n> - If you import metadata defined in the schema as **arrays (multiple)**, you need to separate each value using a comma, for example: \n> - array of strings: \"subscribed,premium\" \n> - array of numbers: \"123,234\". \n> - array of dates: \"2000-01-01,2000-01-02\"\n\nThis API request starts a process that affects Voucherify data in bulk. \n\nIn case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the `IN_PROGRESS` status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. \n\nThe result will return the async ID. You can verify the status of your request via this [API request](ref:get-async-action).", "parameters": [], "security": [ { @@ -84623,7 +85186,7 @@ }, "responses": { "200": { - "description": "Returns ID of the scheduled async action. The response informs you that your request has been accepted and products will be added to the repository asynchronously. To check the import status and result, copy the `async_action_id` from the response and pass it using the [Get Async Action](ref:get-async-action) endpoint.", + "description": "Returns ID of the scheduled async action. The response informs you that your request has been accepted and products will be added to the repository asynchronously. To check the import status and result, copy the `async_action_id` from the response and pass it using the [Get Async Action](ref:get-async-action) endpoint.", "content": { "application/json": { "schema": { @@ -84670,7 +85233,7 @@ "Products" ], "summary": "Import SKUs using CSV", - "description": "Import SKUs into the repository using a CSV file.\n\nThe CSV file has to include headers in the first line. All properties which cannot be mapped to standard SKU fields will be added to the metadata object. You can find an example template [here](https://s3.amazonaws.com/helpscout.net/docs/assets/5902f1c12c7d3a057f88a36d/attachments/627b98d08c9b585083488a4c/Import_SKUS_template.csv). \n\nCurl Example\n\n\n> 📘 Standard SKU fields mapping\n>\n> - **Required** fields are `source_id` and `product_id`.\n> - Supported CSV file headers: `product_id,sku,source_id,price,image_url,attributes`\n> - SKU **source_id** must be unique in the entire product catalog, no duplicates are allowed.\n> - SKU attributes need to be in the form of a stringy-fied json, i.e.`\"{'color':'blue'}\"`. These attributes must be defined in the **product** beforehand so you can import them to the SKU.\n> - You can use this method to update the following parameters in bulk: **sku** and the sku **price**.\n> - Columns that cannot be mapped to standard fields will be mapped to Custom attributes and added as product metadata. There is no limit on the number of custom attributes that you can import as metadata.\n\nThis API request starts a process that affects Voucherify data in bulk. \n\nIn case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the `IN_PROGRESS` status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. \n\nThe result will return the async ID. You can verify the status of your request via this [API request](ref:get-async-action).", + "description": "Import SKUs into the repository using a CSV file.\n\nThe CSV file has to include headers in the first line. All properties which cannot be mapped to standard SKU fields will be added to the metadata object. You can find an example template [here](https://s3.amazonaws.com/helpscout.net/docs/assets/5902f1c12c7d3a057f88a36d/attachments/627b98d08c9b585083488a4c/Import_SKUS_template.csv). \n\nCurl Example\n\n```cURL\ncurl -X **POST** \\\n https://api.voucherify.io/v1/skus/importCSV \\\n -F file=@/path/to/skus.csv \\\n -H \"X-App-Id: c70a6f00-cf91-4756-9df5-47628850002b\" \\\n -H \"X-App-Token: 3266b9f8-e246-4f79-bdf0-833929b1380c\"\n```\n> 🚧 Import sequence\n>\n> First import products using the [dedicated endpoint](ref:import-products-using-csv), then import SKUs using this endpoint to properly match SKUs to products.\n\n\n\n> 📘 Standard SKU fields mapping\n>\n> - **Required** fields are `source_id` and `product_id`.\n> - Supported CSV file headers: `product_id,sku,source_id,price,image_url,attributes`\n> - SKU **source_id** must be unique in the entire product catalog, no duplicates are allowed.\n> - SKU attributes need to be in the form of a stringy-fied json, i.e.`\"{'color':'blue'}\"`. These attributes must be defined in the **product** beforehand so you can import them to the SKU.\n> - You can use this method to update the following parameters in bulk: **sku** and the sku **price**.\n> - Columns that cannot be mapped to standard fields will be mapped to Custom attributes and added as product metadata. There is no limit on the number of custom attributes that you can import as metadata.\n\nThis API request starts a process that affects Voucherify data in bulk. \n\nIn case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the `IN_PROGRESS` status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. \n\nThe result will return the async ID. You can verify the status of your request via this [API request](ref:get-async-action).", "parameters": [], "security": [ { @@ -84694,7 +85257,7 @@ }, "responses": { "200": { - "description": "Returns ID of the scheduled async action. The response informs you that your request has been accepted and SKUs will be added to the repository asynchronously. To check the import status and result, copy the `async_action_id` from the response and pass it using the [Get Async Action](ref:get-async-action) endpoint.", + "description": "Returns ID of the scheduled async action. The response informs you that your request has been accepted and SKUs will be added to the repository asynchronously. To check the import status and result, copy the `async_action_id` from the response and pass it using the [Get Async Action](ref:get-async-action) endpoint.", "content": { "application/json": { "schema": { @@ -86151,7 +86714,7 @@ "Validation Rules" ], "summary": "List Validation Rules' Assignment(s)", - "description": "List all validation rules' assignments or filter the results using the related object ID or the validation rule ID query parameters. \n\n## How to retrieve specific validation rule assignments(s)\n\n### Related object ID\n\nTo find an assignment for a particular resource, you can use the ID of the object to which the validation rule was assigned. This could be, for example, an ID of a: voucher, campaign, distribution, reward assignment, earning rule, promotion tier. \n\n\n\n```json\n{\n \"object\": \"list\",\n \"data_ref\": \"data\",\n \"data\": [\n {\n \"id\": \"asgm_vef0G6d9Al0rABxq\",\n \"rule_id\": \"val_ZEZmA9oit8aU\",\n \"related_object_id\": \"camp_rRsfatlwN7unSeUIJDCYedal\",\n \"related_object_type\": \"campaign\",\n \"created_at\": \"2022-06-29T11:43:52.953Z\",\n \"object\": \"validation_rules_assignment\"\n },\n {\n \"id\": \"asgm_sFV4wEFvldwIvgfb\",\n \"rule_id\": \"val_ZEZmA9oit8aU\",\n \"related_object_id\": \"distr_9QKI02wqgjWyvZXeQkFEPmkkYe\",\n \"related_object_type\": \"distribution\",\n \"created_at\": \"2022-06-29T11:41:07.680Z\",\n \"object\": \"validation_rules_assignment\"\n },\n {\n \"id\": \"asgm_69Qifyv6UZynFIIQ\",\n \"rule_id\": \"val_ZEZmA9oit8aU\",\n \"related_object_id\": \"promo_g83qUzYZpfX0OMAFOVoQuOYG\",\n \"related_object_type\": \"promotion_tier\",\n \"created_at\": \"2022-06-29T11:29:41.906Z\",\n \"object\": \"validation_rules_assignment\"\n }\n ],\n \"total\": 3\n}\n```\n", + "description": "List all validation rules' assignments or filter the results using the related object ID or the validation rule ID query parameters. \n\n## How to retrieve specific validation rule assignments(s)\n\n### Related object ID\n\nTo find an assignment for a particular resource, you can use the ID of the object to which the validation rule was assigned. This could be, for example, an ID of a: voucher, campaign, distribution, reward assignment, earning rule, promotion tier. \n\n\n\n```curl\ncurl -X **GET** \\\n -H \"X-App-Id: c70a6f00-cf91-4756-9df5-47628850002b\" \\\n -H \"X-App-Token: 3266b9f8-e246-4f79-bdf0-833929b1380c\" \\\n -H \"Content-Type: application/json\" \\\n https://api.voucherify.io/v1/validation-rules-assignments?related_object_id=promo_kJliy076IuJYtuYWSHE9fSuT\n```\n\n```json\n{\n \"object\": \"list\",\n \"data_ref\": \"data\",\n \"data\": [\n {\n \"id\": \"asgm_tZaqxeO8gP4q91jG\",\n \"rule_id\": \"val_WB6ETAiFztw5\",\n \"related_object_id\": \"promo_kJliy076IuJYtuYWSHE9fSuT\",\n \"related_object_type\": \"promotion_tier\",\n \"created_at\": \"2022-08-10T10:30:39.986Z\",\n \"object\": \"validation_rules_assignment\"\n }\n ],\n \"total\": 1\n}\n```\n\n### Validation rule ID\n\nYou can use the validation rule ID to find assignment(s) for a specific validation rule.\n\n\n\n```curl\ncurl -X **GET** \\\n -H \"X-App-Id: c70a6f00-cf91-4756-9df5-47628850002b\" \\\n -H \"X-App-Token: 3266b9f8-e246-4f79-bdf0-833929b1380c\" \\\n -H \"Content-Type: application/json\" \\\n https://api.voucherify.io/v1/validation-rules-assignments?rule=val_ZEZmA9oit8aU\n```\n\n```json\n{\n \"object\": \"list\",\n \"data_ref\": \"data\",\n \"data\": [\n {\n \"id\": \"asgm_vef0G6d9Al0rABxq\",\n \"rule_id\": \"val_ZEZmA9oit8aU\",\n \"related_object_id\": \"camp_rRsfatlwN7unSeUIJDCYedal\",\n \"related_object_type\": \"campaign\",\n \"created_at\": \"2022-06-29T11:43:52.953Z\",\n \"object\": \"validation_rules_assignment\"\n },\n {\n \"id\": \"asgm_sFV4wEFvldwIvgfb\",\n \"rule_id\": \"val_ZEZmA9oit8aU\",\n \"related_object_id\": \"distr_9QKI02wqgjWyvZXeQkFEPmkkYe\",\n \"related_object_type\": \"distribution\",\n \"created_at\": \"2022-06-29T11:41:07.680Z\",\n \"object\": \"validation_rules_assignment\"\n },\n {\n \"id\": \"asgm_69Qifyv6UZynFIIQ\",\n \"rule_id\": \"val_ZEZmA9oit8aU\",\n \"related_object_id\": \"promo_g83qUzYZpfX0OMAFOVoQuOYG\",\n \"related_object_type\": \"promotion_tier\",\n \"created_at\": \"2022-06-29T11:29:41.906Z\",\n \"object\": \"validation_rules_assignment\"\n }\n ],\n \"total\": 3\n}\n```\n", "parameters": [ { "schema": { @@ -86702,7 +87265,7 @@ "Segments" ], "summary": "Create Segment", - "description": "Create a customer segment.\n\n> 🚧 Limit on Static Segments\n>\n> There is a cap on the number of customers that you can assign to a static segment: **20,000**. If you would like to create a bigger segment, then you can use the unlimited auto-update segment instead and use some customer metadata to build this segment.", + "description": "Create a customer segment.\n\n> 🚧 Limit on static segments\n>\n> There is a cap on the number of customers that you can assign to a static segment: **20,000**. If you would like to create a bigger segment, then you can use the unlimited `auto-update` or `passive` segment instead and use some customer metadata to build this segment.\n\n> 🚧 Limit on Active and Passive segments\n>\n> You can create a maximum of 100 passive and active segments.", "parameters": [], "security": [ { @@ -86970,7 +87533,7 @@ "Async Actions" ], "summary": "List Async Actions", - "description": "Track asynchronous operations scheduled in your project. \n\nThe table below lists the possible types of async actions. The types are different for each endpoint generating the async action. If you would like to learn more about importing data into Voucherify, read more [here](https://support.voucherify.io/article/574-data-import).\n\n| **Types by Context** | **Endpoint** |\n|:---|:---|\n| **CAMPAIGN** | |\n| CAMPAIGN.VOUCHERS_IMPORT | **POST** [/vouchers/metadata/async](ref:update-vouchers-metadata-in-bulk) | \n| **ORDERS** | |\n| ORDERS.IMPORT | **POST** [/orders/import](ref:import-orders) |\n| **METADATA KEY PURGE** | |\n| CAMPAIGNS.METADATA_KEY_PURGE
CUSTOMERS.METADATA_KEY_PURGE
PRODUCTS.METADATA_KEY_PURGE
VOUCHERS.METADATA_KEY_PURGE
ORDERS.METADATA_KEY_PURGE | No API endpoint equivalent. You can perform this action through the Dashboard. See Dashboard documentation: Dashboard > [Project Settings](https://support.voucherify.io/article/99-schema-validation-metadata#maintenance) |", + "description": "Track asynchronous operations scheduled in your project. \n\nThe table below lists the possible types of async actions. The types are different for each endpoint generating the async action. If you would like to learn more about importing data into Voucherify, read more [here](https://support.voucherify.io/article/574-data-import).\n\n| **Types by Context** | **Endpoint** |\n|:---|:---|\n| **CAMPAIGN** | |\n| CAMPAIGN.VOUCHERS_IMPORT | **POST** [/campaigns/{campaignId}/import](ref:import-vouchers-to-campaign) |\n| CAMPAIGN.VOUCHERS_IMPORT_CSV | **POST** [/campaigns/{campaignId}/importCSV](ref:import-vouchers-to-campaign-using-csv) |\n| CAMPAIGN.VOUCHERS_UPDATE | **PUT** [/campaigns/{campaignId}](ref:update-campaign) |\n| CAMPAIGN.VOUCHERS_DELETE | **DELETE** [/campaigns/{campaignId}](ref:delete-campaign) |\n| CAMPAIGN.VOUCHERS_GENERATE |
  • **POST** [/campaigns](ref:create-campaign): asynchronous for campaigns with more than 1 voucher, synchronous for campaign with 1 voucher
  • **POST** [/campaigns/{campaignId}/vouchers](ref:add-vouchers-to-campaign)
    • |\n| **CUSTOMERS** | |\n| CUSTOMERS.IMPORT_CSV | **POST** [/customers/importCSV](ref:import-customers-using-csv) |\n| CUSTOMERS.BULK_UPDATE | **POST** [/customers/bulk/async](ref:update-customers-in-bulk) |\n| CUSTOMERS.METADATA_UPDATE | **POST** [/customers/metadata/async](ref:update-customers-metadata-in-bulk) |\n| **PRODUCTS** | |\n| PRODUCTS.BULK_UPDATE | **POST** [/products/bulk/async](ref:update-products-in-bulk)
      |\n| PRODUCTS.METADATA_UPDATE | **POST** [/products/metadata/async](ref:update-products-metadata-in-bulk) |\n| PRODUCTS.IMPORT_CSV | **POST** [/products/importCSV](ref:import-products-using-csv) |\n| SKUS.IMPORT_CSV | **POST** [/skus/importCSV](ref:import-skus-using-csv) |\n| **VOUCHERS** | |\n| VOUCHERS.IMPORT | **POST** [/vouchers/import](ref:import-vouchers) |\n| VOUCHERS.IMPORT_CSV | **POST** [/vouchers/importCSV](ref:import-vouchers-using-csv) |\n| VOUCHERS.BULK_UPDATE | **POST** [/vouchers/bulk/async](ref:update-vouchers-in-bulk)
      |\n| VOUCHERS.METADATA_UPDATE | **POST** [/vouchers/metadata/async](ref:update-vouchers-metadata-in-bulk) | \n| **ORDERS** | |\n| ORDERS.IMPORT | **POST** [/orders/import](ref:import-orders) |\n| **METADATA KEY PURGE** | |\n| CAMPAIGNS.METADATA_KEY_PURGE
      CUSTOMERS.METADATA_KEY_PURGE
      PRODUCTS.METADATA_KEY_PURGE
      VOUCHERS.METADATA_KEY_PURGE
      ORDERS.METADATA_KEY_PURGE | No API endpoint equivalent. You can perform this action through the Dashboard. See Dashboard documentation: Dashboard > [Project Settings](https://support.voucherify.io/article/99-schema-validation-metadata#maintenance) |", "parameters": [ { "schema": { @@ -87001,7 +87564,7 @@ ], "responses": { "200": { - "description": "Returns a list of all scheduled asynchronous actions and detailed information for each scheduled action. Note that a status `DONE`doesn't include the result of the completed action. If you need more information about the result, use the ID of the respective async action to call the [Get Async Action](ref:get-async-action) endpoint.", + "description": "Returns a list of all scheduled asynchronous actions and detailed information for each scheduled action. Note that a status `DONE`doesn't include the result of the completed action. If you need more information about the result, use the ID of the respective async action to call the [Get Async Action](ref:get-async-action) endpoint.", "content": { "application/json": { "schema": { @@ -87082,7 +87645,7 @@ "Async Actions" ], "summary": "Get Async Action", - "description": "Check the result of a scheduled asynchronous operation. \n\nThe table below lists the possible types of async actions. The types are different for each endpoint generating the async action. If you would like to learn more about importing data into Voucherify, read more [here](https://support.voucherify.io/article/574-data-import).\n\n| **Types by Context** | **Endpoint** |\n|:---|:---|\n| **CAMPAIGN** | |\n| CAMPAIGN.VOUCHERS_IMPORT | **POST** [/vouchers/metadata/async](ref:update-vouchers-metadata-in-bulk) | \n| **ORDERS** | |\n| ORDERS.IMPORT | **POST** [/orders/import](ref:import-orders) |\n| **METADATA KEY PURGE** | |\n| CAMPAIGNS.METADATA_KEY_PURGE
      CUSTOMERS.METADATA_KEY_PURGE
      PRODUCTS.METADATA_KEY_PURGE
      VOUCHERS.METADATA_KEY_PURGE
      ORDERS.METADATA_KEY_PURGE | No API endpoint equivalent. You can perform this action through the Dashboard. See Dashboard documentation: Dashboard > [Project Settings](https://support.voucherify.io/article/99-schema-validation-metadata#maintenance) |", + "description": "Check the result of a scheduled asynchronous operation. \n\nThe table below lists the possible types of async actions. The types are different for each endpoint generating the async action. If you would like to learn more about importing data into Voucherify, read more [here](https://support.voucherify.io/article/574-data-import).\n\n| **Types by Context** | **Endpoint** |\n|:---|:---|\n| **CAMPAIGN** | |\n| CAMPAIGN.VOUCHERS_IMPORT | **POST** [/campaigns/{campaignId}/import](ref:import-vouchers-to-campaign) |\n| CAMPAIGN.VOUCHERS_IMPORT_CSV | **POST** [/campaigns/{campaignId}/importCSV](ref:import-vouchers-to-campaign-using-csv) |\n| CAMPAIGN.VOUCHERS_UPDATE | **PUT** [/campaigns/{campaignId}](ref:update-campaign) |\n| CAMPAIGN.VOUCHERS_DELETE | **DELETE** [/campaigns/{campaignId}](ref:delete-campaign) |\n| CAMPAIGN.VOUCHERS_GENERATE |
      • **POST** [/campaigns](ref:create-campaign): asynchronous for campaigns with more than 1 voucher, synchronous for campaign with 1 voucher
      • **POST** [/campaigns/{campaignId}/vouchers](ref:add-vouchers-to-campaign)
        • |\n| **CUSTOMERS** | |\n| CUSTOMERS.IMPORT_CSV | **POST** [/customers/importCSV](ref:import-customers-using-csv) |\n| CUSTOMERS.BULK_UPDATE | **POST** [/customers/bulk/async](ref:update-customers-in-bulk) |\n| CUSTOMERS.METADATA_UPDATE | **POST** [/customers/metadata/async](ref:update-customers-metadata-in-bulk) |\n| **PRODUCTS** | |\n| PRODUCTS.BULK_UPDATE | **POST** [/products/bulk/async](ref:update-products-in-bulk)
          |\n| PRODUCTS.METADATA_UPDATE | **POST** [/products/metadata/async](ref:update-products-metadata-in-bulk) |\n| PRODUCTS.IMPORT_CSV | **POST** [/products/importCSV](ref:import-products-using-csv) |\n| SKUS.IMPORT_CSV | **POST** [/skus/importCSV](ref:import-skus-using-csv) |\n| **VOUCHERS** | |\n| VOUCHERS.IMPORT | **POST** [/vouchers/import](ref:import-vouchers) |\n| VOUCHERS.IMPORT_CSV | **POST** [/vouchers/importCSV](ref:import-vouchers-using-csv) |\n| VOUCHERS.BULK_UPDATE | **POST** [/vouchers/bulk/async](ref:update-vouchers-in-bulk)
          |\n| VOUCHERS.METADATA_UPDATE | **POST** [/vouchers/metadata/async](ref:update-vouchers-metadata-in-bulk) | \n| **ORDERS** | |\n| ORDERS.IMPORT | **POST** [/orders/import](ref:import-orders) |\n| **METADATA KEY PURGE** | |\n| CAMPAIGNS.METADATA_KEY_PURGE
          CUSTOMERS.METADATA_KEY_PURGE
          PRODUCTS.METADATA_KEY_PURGE
          VOUCHERS.METADATA_KEY_PURGE
          ORDERS.METADATA_KEY_PURGE | No API endpoint equivalent. You can perform this action through the Dashboard. See Dashboard documentation: Dashboard > [Project Settings](https://support.voucherify.io/article/99-schema-validation-metadata#maintenance) |", "parameters": [], "security": [ { @@ -87856,7 +88419,7 @@ "Exports" ], "summary": "Get Export", - "description": "Retrieves the URL of the downloadable file, which was generated via the [Create Export](ref:create-export) method.", + "description": "Retrieves the URL of the downloadable file, which was generated via the [Create Export](ref:create-export) method.", "parameters": [], "security": [ { @@ -88010,7 +88573,7 @@ "Exports" ], "summary": "Download Export", - "description": "Download the contents of the exported CSV file. \n\n[Get Export](ref:get-export) method response.", + "description": "Download the contents of the exported CSV file. \n\n\n\n> 📘 Important notes\n>\n> **Base URL:** \n> - `https://download.voucherify.io` (Europe) \n> - `https://us1.download.voucherify.io` (US) \n> - `https://as1.download.voucherify.io` (Asia) \n>\n> **Token:** Can be found within the `result` parameter of the [Get Export](ref:get-export) method response.", "parameters": [], "security": [ { @@ -88935,7 +89498,7 @@ "Vouchers" ], "summary": "Examine Qualification [Deprecated]", - "description": "\n| **Case** | **Order-Level Parameter Included** | **Item-Level Parameter Included** | **Precedence** | **Calculation Result** | **Parameter included in payload accounts for checks against requirements in these validation rules** |\n|:---:|:---:|:---:|:---:|---|---|\n| **1** | `amount` | `amount` | Order-level | Uses order-level `amount` | - Total order amount |\n| **2** | | `amount` | Item-level | Sums each item-level `amount` | - Total order amount
          - subtotal of matched items |\n| **3** | | `price`
          `quantity` | Item-level | Multiplies each item's (`price` x `quantity`) to get item `amount` and then adds each item's `amount` to get total order `amount` | - Total order amount
          - Subtotal of matched items
          - Unit price of any matching order line
          - Price of each item/Price of any item |\n| **4** | | `amount`
          `price`
          `quantity` | Item-level `amount` | Uses item-level `amount` for total order `amount` calculation, ignores (`price` x `quantity`) calculation | - Total order amount (uses item `amount` if provided or `price` x `quantity` for items without `amount` property; `amount` takes precedence in case all 3 properties are provided for an item)
          - Subtotal of matched items (uses item `amount`, takes precedence if all 3 properties are provided)
          - Unit price of any matching order line
          - Price of each item/Price of any item |\n| **5** | `amount` | `amount`
          `price`
          `quantity` | Order-level | Uses order-level `amount` for total order `amount` | - Total order amount (uses order-level `amount`).
          - Subtotal of matched items (see case **4** for details).
          - Unit price of any matching order line
          - Price of each item/Price of any item |\n \n\n## Reward\n\n ## Gift Card", + "description": "\n> ❗️ Deprecated \n>\n> This endpoint represents the deprecated version of the API responsible for qualification, and we do not recommend using it. The new [Qualifications API](ref:examine-qualification) introduces additional features and improvements while maintaining backward compatibility. Developers are encouraged to migrate to the latest version to take advantage of the latest enhancements and bug fixes. No updates will be provided to the deprecated endpoint. \n\nDisplay vouchers qualified to the given customer and context (e.g., order, loyalty reward). Checks up to 50 **generic (standalone) voucherss**. \n\n> 👍 Prevailing assumption\n> You data is synced with Voucherify.\n\n ## How does this endpoint work? \n\n A property's value that does not meet a validation rule requirement will disqualify that particular voucher and it will not be listed in the results.\n\nAs a sample use case, you can imagine a requirement of displaying coupons available for the customer below the shopping cart. The customer can choose and apply the proposed voucher.\n\n ## What's excluded? \n\n The verification logic won't run against _coupons from bulk unique code campaigns_. For campaigns with multiple unique codes, you should run a [dedicated function](ref:examine-campaigns-qualification) for searching and identifying qualified campaigns.\n\n ## Customizing the response\n\n> 📘 Query parameters let you sort and filter the returned vouchers\n>\n> Customize your response:\n> - If you only care about verifying a customer, use `audienceRulesOnly` set to `true`. \n>- If you want to limit the number of vouchers to be returned from the entire pool of eligible vouchers, set a `limit`. This will return vouchers sorted by `-created_at`, by default beginning with the most recent vouchers listed at the top.\n> - If you have a preference on the sorting order of the returned vouchers, you can use `order` to customize your response.\n\n ## Sending the request body payload\n\n\n ## Customer\n\nYou have the option of sending customer data via the dedicated `customer` object in the request body or a nested `customer` object within the `order` object.\n ### Available options:\n\n - You can either pass a customer `id` (Voucherify system generated),\n\n - a `source_id` (your own unique internal customer identifier e.g., email, database ID, CRM id), \n\n - a combination of the remaining parameters in the customer object, \n\n - a combination of customer `id` and remaining parameters excluding `source_id`, or\n\n - a combination of `source_id` and remaining parameters excluding `id`\n\n #### Note:\n\n For the latter two options, if you pass the `source_id` or the `id` with the other parameters, the logic will run independently for parameters explicitly passed in the request body versus those not explicitly passed in the request body. For _parameters not explicitly listed in the payload_, the verification will be against the data stored for that customer in the system. On the other hand, for any _parameter values explicitly passed in the payload_, the logic will ignore those stored in the system and will use the new values provided in the qualification request body. \n\n The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule). \n\n## Order\n\n ### Available options:\n\n - You can either pass an order `id` (Voucherify system generated),\n\n - a `source_id` (your own unique internal order identifier), \n\n - a combination of the remaining parameters in the order object, \n\n - a combination of order `id` and remaining parameters excluding `source_id`, or\n\n - a combination of `source_id` and remaining parameters excluding `id`\n\n #### Note:\n\n For the latter two options, if you pass the `source_id` or the `id` with the other parameters, the logic will run independently for parameters explicitly passed in the request body versus those not explicitly passed in the request body. For _parameters not explicitly listed in the payload_, the verification will be against the data stored for that order in the system. On the other hand, for any _parameter values explicitly passed in the payload_, the logic will ignore those stored in the system and will use the new values provided in the qualification request body. \n\n The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule).\n\n## Guidelines:\n\nTo validate against vouchers with total order `amount` requirements, make sure to include the total order `amount` in the order object or alternatively the `amount` for _every_ order item (the application will then add each amount to get the total and perform the qualification checks). If the total order `amount` is provided along with the individual items' amounts, the total order `amount` will take precedence.\n\n\n| **Case** | **Order-Level Parameter Included** | **Item-Level Parameter Included** | **Precedence** | **Calculation Result** | **Parameter included in payload accounts for checks against requirements in these validation rules** |\n|:---:|:---:|:---:|:---:|---|---|\n| **1** | `amount` | `amount` | Order-level | Uses order-level `amount` | - Total order amount |\n| **2** | | `amount` | Item-level | Sums each item-level `amount` | - Total order amount
          - subtotal of matched items |\n| **3** | | `price`
          `quantity` | Item-level | Multiplies each item's (`price` x `quantity`) to get item `amount` and then adds each item's `amount` to get total order `amount` | - Total order amount
          - Subtotal of matched items
          - Unit price of any matching order line
          - Price of each item/Price of any item |\n| **4** | | `amount`
          `price`
          `quantity` | Item-level `amount` | Uses item-level `amount` for total order `amount` calculation, ignores (`price` x `quantity`) calculation | - Total order amount (uses item `amount` if provided or `price` x `quantity` for items without `amount` property; `amount` takes precedence in case all 3 properties are provided for an item)
          - Subtotal of matched items (uses item `amount`, takes precedence if all 3 properties are provided)
          - Unit price of any matching order line
          - Price of each item/Price of any item |\n| **5** | `amount` | `amount`
          `price`
          `quantity` | Order-level | Uses order-level `amount` for total order `amount` | - Total order amount (uses order-level `amount`).
          - Subtotal of matched items (see case **4** for details).
          - Unit price of any matching order line
          - Price of each item/Price of any item |\n \n\n## Reward\n\n ## Gift Card", "parameters": [ { "$ref": "#/components/parameters/audienceRulesOnly" @@ -94127,18 +94690,40 @@ "examples": { "Example": { "value": { - "id": "stk_0e9b71a0be48e967f3", - "exclusive_categories": [], - "joint_categories": [], - "redeemables_limit": 30, - "applicable_redeemables_limit": 15, - "applicable_exclusive_redeemables_limit": 1, + "id": "stk_0e9bdfd48108548fd3", + "exclusive_categories": [ + "cat_0f2ba1284b565c235c", + "cat_0d75bdfe4c9030a732" + ], + "joint_categories": [ + "cat_0d74559c3e9030da13", + "cat_0d507a4d6e8a1b7b97" + ], + "redeemables_limit": 25, + "applicable_redeemables_limit": 10, + "applicable_redeemables_per_category_limit": 2, + "applicable_redeemables_category_limits": { + "cat_0d75bdfe4c9030a732": 1, + "cat_0d7c4d183011d043cc": 2 + }, + "applicable_exclusive_redeemables_limit": 2, + "applicable_exclusive_redeemables_per_category_limit": 2, "discount_calculation_mode": "DISCOUNTED_AMOUNT", - "initial_amount_mode_categories": [], - "discounted_amount_mode_categories": [], - "redeemables_application_mode": "ALL", - "redeemables_sorting_rule": "REQUESTED_ORDER", - "created_at": "2024-04-16T12:17:09.368Z" + "initial_amount_mode_categories": [ + "cat_0d507a4d6e8a1b7b97" + ], + "discounted_amount_mode_categories": [ + "cat_0d7455f93c1030da4a" + ], + "redeemables_application_mode": "PARTIAL", + "redeemables_sorting_rule": "CATEGORY_HIERARCHY", + "redeemables_no_effect_rule": "REDEEM_ANYWAY", + "no_effect_skip_categories": [], + "no_effect_redeem_anyway_categories": [], + "redeemables_products_application_mode": "ONCE", + "redeemables_rollback_order_mode": "WITH_ORDER", + "grouped_redeemables_sorting_rule": "JOINT_ALWAYS_LAST", + "created_at": "2024-04-16T20:18:38.213Z" } } } @@ -94280,32 +94865,41 @@ "data_ref": "data", "data": [ { - "id": "stk_0d6264108617006147", + "id": "stk_0e9bdfd48108548fd3", "exclusive_categories": [ - "cat_0d75bdfe4c9030a732", - "cat_0d74559c3e9030da13", - "cat_0d7455f93c1030da4a" + "cat_0f2ba1284b565c235c", + "cat_0d75bdfe4c9030a732" ], "joint_categories": [ + "cat_0d74559c3e9030da13", "cat_0d507a4d6e8a1b7b97" ], - "redeemables_limit": 29, - "applicable_redeemables_limit": 28, - "applicable_redeemables_per_category_limit": 27, - "applicable_exclusive_redeemables_limit": 4, - "applicable_exclusive_redeemables_per_category_limit": 3, + "redeemables_limit": 25, + "applicable_redeemables_limit": 10, + "applicable_redeemables_per_category_limit": 2, + "applicable_redeemables_category_limits": { + "cat_0d75bdfe4c9030a732": 1, + "cat_0d7c4d183011d043cc": 2 + }, + "applicable_exclusive_redeemables_limit": 2, + "applicable_exclusive_redeemables_per_category_limit": 2, "discount_calculation_mode": "DISCOUNTED_AMOUNT", "initial_amount_mode_categories": [ - "cat_0d75bdfe4c9030a732", - "cat_0d74559c3e9030da13" + "cat_0d507a4d6e8a1b7b97" ], "discounted_amount_mode_categories": [ "cat_0d7455f93c1030da4a" ], "redeemables_application_mode": "PARTIAL", "redeemables_sorting_rule": "CATEGORY_HIERARCHY", - "created_at": "2023-08-17T08:33:19.399Z", - "updated_at": "2024-04-16T10:38:27.028Z" + "redeemables_no_effect_rule": "REDEEM_ANYWAY", + "no_effect_skip_categories": [], + "no_effect_redeem_anyway_categories": [], + "redeemables_products_application_mode": "ONCE", + "redeemables_rollback_order_mode": "WITH_ORDER", + "grouped_redeemables_sorting_rule": "JOINT_ALWAYS_LAST", + "created_at": "2024-04-16T20:18:38.213Z", + "updated_at": "2025-08-28T08:28:53.038Z" } ], "total": 1 @@ -94422,32 +95016,41 @@ "examples": { "Example": { "value": { - "id": "stk_0d6264108617006147", + "id": "stk_0e9bdfd48108548fd3", "exclusive_categories": [ - "cat_0d75bdfe4c9030a732", - "cat_0d74559c3e9030da13", - "cat_0d7455f93c1030da4a" + "cat_0f2ba1284b565c235c", + "cat_0d75bdfe4c9030a732" ], "joint_categories": [ + "cat_0d74559c3e9030da13", "cat_0d507a4d6e8a1b7b97" ], - "redeemables_limit": 29, - "applicable_redeemables_limit": 28, - "applicable_redeemables_per_category_limit": 27, - "applicable_exclusive_redeemables_limit": 4, - "applicable_exclusive_redeemables_per_category_limit": 3, + "redeemables_limit": 25, + "applicable_redeemables_limit": 10, + "applicable_redeemables_per_category_limit": 2, + "applicable_redeemables_category_limits": { + "cat_0d75bdfe4c9030a732": 1, + "cat_0d7c4d183011d043cc": 2 + }, + "applicable_exclusive_redeemables_limit": 2, + "applicable_exclusive_redeemables_per_category_limit": 2, "discount_calculation_mode": "DISCOUNTED_AMOUNT", "initial_amount_mode_categories": [ - "cat_0d75bdfe4c9030a732", - "cat_0d74559c3e9030da13" + "cat_0d507a4d6e8a1b7b97" ], "discounted_amount_mode_categories": [ "cat_0d7455f93c1030da4a" ], "redeemables_application_mode": "PARTIAL", "redeemables_sorting_rule": "CATEGORY_HIERARCHY", - "created_at": "2023-08-17T08:33:19.399Z", - "updated_at": "2024-04-16T10:38:27.028Z" + "redeemables_no_effect_rule": "REDEEM_ANYWAY", + "no_effect_skip_categories": [], + "no_effect_redeem_anyway_categories": [], + "redeemables_products_application_mode": "ONCE", + "redeemables_rollback_order_mode": "WITH_ORDER", + "grouped_redeemables_sorting_rule": "JOINT_ALWAYS_LAST", + "created_at": "2024-04-16T20:18:38.213Z", + "updated_at": "2025-08-28T08:28:53.038Z" } } } @@ -94553,28 +95156,41 @@ "examples": { "Example": { "value": { - "id": "stk_0d6264108617006147", - "exclusive_categories": [], + "id": "stk_0e9bdfd48108548fd3", + "exclusive_categories": [ + "cat_0f2ba1284b565c235c", + "cat_0d75bdfe4c9030a732" + ], "joint_categories": [ + "cat_0d74559c3e9030da13", "cat_0d507a4d6e8a1b7b97" ], - "redeemables_limit": 30, - "applicable_redeemables_limit": 28, - "applicable_redeemables_per_category_limit": 27, - "applicable_exclusive_redeemables_limit": 4, - "applicable_exclusive_redeemables_per_category_limit": 3, + "redeemables_limit": 25, + "applicable_redeemables_limit": 10, + "applicable_redeemables_per_category_limit": 2, + "applicable_redeemables_category_limits": { + "cat_0d75bdfe4c9030a732": 1, + "cat_0d7c4d183011d043cc": 2 + }, + "applicable_exclusive_redeemables_limit": 2, + "applicable_exclusive_redeemables_per_category_limit": 2, "discount_calculation_mode": "DISCOUNTED_AMOUNT", "initial_amount_mode_categories": [ - "cat_0d75bdfe4c9030a732", - "cat_0d74559c3e9030da13" + "cat_0d507a4d6e8a1b7b97" ], "discounted_amount_mode_categories": [ "cat_0d7455f93c1030da4a" ], "redeemables_application_mode": "PARTIAL", "redeemables_sorting_rule": "CATEGORY_HIERARCHY", - "created_at": "2023-08-17T08:33:19.399Z", - "updated_at": "2024-04-16T19:52:24.792Z" + "redeemables_no_effect_rule": "REDEEM_ANYWAY", + "no_effect_skip_categories": [], + "no_effect_redeem_anyway_categories": [], + "redeemables_products_application_mode": "ONCE", + "redeemables_rollback_order_mode": "WITH_ORDER", + "grouped_redeemables_sorting_rule": "JOINT_ALWAYS_LAST", + "created_at": "2024-04-16T20:18:38.213Z", + "updated_at": "2025-08-28T08:28:53.038Z" } } } @@ -97873,7 +98489,7 @@ "Client-side" ], "summary": "Check Eligibility (client-side)", - "description": "Generate a list of redeemables that are applicable in the context of the customer and order.\n\nThe new qualifications method is an improved version of [Campaign Qualifications](ref:examine-campaigns-qualification), [Voucher Qualifications](ref:examine-vouchers-qualification), and [Promotions Validation](ref:validate-promotions) API requests. The new qualification method introduces the following improvements:\n\n- Qualification results are returned faster\n- No limit on the number of returned redeemables\n- Introduces new qualification scenarios, not available in the previous version\n\n> 👍 Scenario Guide\n>\n> Read our dedicated guide to learn about some use cases this endpoint can cover [here](doc:checking-eligibility).\n\n## Paging \n\nThe Voucherify Qualifications API request will return to you all of the redeemables available for the customer in batches of up to 50 redeemables. To get the next batch of redeemables, you need to use the `starting_after` cursor.\n\nTo process of paging the redeemables works in the following manner:\n\n- You send the first API request for Qualifications without the `starting_after` parameter.\n- The response will contain a parameter named `has_more`. If the parameter's value is set to `true`, then more redeemables are available.\n- Get the value of the `created_at` parameter of the last returned redeemable. The value of this parameter will be used as a cursor to retrieve the next page of redeemables.\n- Send another API request for Qualification with the `starting_after` parameter set to the value taken from the `created_at` parameter from the last returned redeemable.\n- Voucherify will return the next page of redeemables.\n- If the `has_more` parameter is set to `true`, apply steps 3-5 to get the next page of redeemables.", + "description": "Generate a list of redeemables that are applicable in the context of the customer and order.\n\nThe new qualifications method is an improved version of [Campaign Qualifications](ref:examine-campaigns-qualification), [Voucher Qualifications](ref:examine-vouchers-qualification), and [Promotions Validation](ref:validate-promotions) API requests. The new qualification method introduces the following improvements:\n\n- Qualification results are returned faster\n- No limit on the number of returned redeemables\n- Introduces new qualification scenarios, not available in the previous version\n\n> 👍 Scenario Guide\n>\n> Read our dedicated guide to learn about some use cases this endpoint can cover [here](doc:checking-eligibility).\n\n## Paging \n\nThe Voucherify Qualifications API request will return to you all of the redeemables available for the customer in batches of up to 500 redeemables. To get the next batch of redeemables, you need to use the `starting_after` cursor.\n\nTo process of paging the redeemables works in the following manner:\n\n- You send the first API request for Qualifications without the `starting_after` parameter.\n- The response will contain a parameter named `has_more`. If the parameter's value is set to `true`, then more redeemables are available.\n- Get the value of the `created_at` parameter of the last returned redeemable. The value of this parameter will be used as a cursor to retrieve the next page of redeemables.\n- Send another API request for Qualification with the `starting_after` parameter set to the value taken from the `created_at` parameter from the last returned redeemable.\n- Voucherify will return the next page of redeemables.\n- If the `has_more` parameter is set to `true`, apply steps 3-5 to get the next page of redeemables.", "parameters": [], "security": [ { @@ -98160,7 +98776,7 @@ "Client-side" ], "summary": "Redeem Stackable Discounts (client-side)", - "description": "This method is accessible through public keys which you can use in client side requests coming from mobile and web browser applications.\n\n## How API returns calculated discounts and order amounts in the response\n\nIn the table below, you can see the logic the API follows to calculate discounts and amounts:\n\n| **Field** | **Calculation** | **Description** |\n|:---|:---|:---|\n| amount | N/A | This field shows the order amount before applying any discount |\n| total_amount | `total_amount` = `amount` - `total_discount_amount` | This field shows the order amount after applying all the discounts |\n| discount_amount | `discount_amount` = `previous_discount_amount` + `applied_discount_amount` | This field sums up all order-level discounts up to and including the specific discount being calculated for the stacked redemption. |\n| items_discount_amount | sum(items, i => i.discount_amount) | This field sums up all product-specific discounts |\n| total_discount_amount | `total_discount_amount` = `discount_amount` + `items_discount_amount` | This field sums up all order-level and all product-specific discounts |\n| applied_discount_amount | N/A | This field shows the order-level discount applied in a particular request |\n| items_applied_discount_amount | sum(items, i => i.applied_discount_amount) | This field sums up all product-specific discounts applied in a particular request |\n| total_applied_discount_amount | `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | This field sums up all order-level and all product-specific discounts applied in a particular request |\n\n[rollback request](ref:rollback-stacked-redemptions).", + "description": "This method is accessible through public keys which you can use in client side requests coming from mobile and web browser applications.\n\n## How API returns calculated discounts and order amounts in the response\n\nIn the table below, you can see the logic the API follows to calculate discounts and amounts:\n\n| **Field** | **Calculation** | **Description** |\n|:---|:---|:---|\n| amount | N/A | This field shows the order amount before applying any discount |\n| total_amount | `total_amount` = `amount` - `total_discount_amount` | This field shows the order amount after applying all the discounts |\n| discount_amount | `discount_amount` = `previous_discount_amount` + `applied_discount_amount` | This field sums up all order-level discounts up to and including the specific discount being calculated for the stacked redemption. |\n| items_discount_amount | sum(items, i => i.discount_amount) | This field sums up all product-specific discounts |\n| total_discount_amount | `total_discount_amount` = `discount_amount` + `items_discount_amount` | This field sums up all order-level and all product-specific discounts |\n| applied_discount_amount | N/A | This field shows the order-level discount applied in a particular request |\n| items_applied_discount_amount | sum(items, i => i.applied_discount_amount) | This field sums up all product-specific discounts applied in a particular request |\n| total_applied_discount_amount | `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | This field sums up all order-level and all product-specific discounts applied in a particular request |\n\n\n> 📘 Rollbacks\n>\n> You can't roll back a child redemption. When you call rollback on a stacked redemption, all child redemptions will be rolled back. You need to refer to a parent redemption ID in your [rollback request](ref:rollback-stacked-redemptions).", "parameters": [ { "$ref": "#/components/parameters/origin" @@ -98593,7 +99209,7 @@ "Client-side" ], "summary": "Validate Voucher (client-side) [Deprecated]", - "description": "[disabled vouchers](ref:disable-voucher)\n* `customer does not match segment rules` - learn more customer tracking LINK\n* `order does not match validation rules` - learn more about validation rules LINK", + "description": "\n> ❗️ Deprecated \n>\n> This endpoint represents the deprecated version of the API responsible for voucher validation, and we do not recommend using it. The new [Stackable Discounts API](ref:validate-stacked-discounts-client-side) introduces additional features and improvements while maintaining backward compatibility, including applying a combination of coupon codes and promotion tiers. Developers are encouraged to migrate to the latest version to take advantage of the latest enhancements and bug fixes. No updates will be provided to the deprecated endpoint. \n\nTo verify a voucher code given by customer, you can use this method. It is designed for client side integration which means that is accessible only through public keys. This method is designed to be run directly either in web browsers or mobile apps.\n\n> ❗️ Specifying gift credits and loyalty points\n>\n> This endpoint does not support specifying the specific amount of gift credits to apply to an order nor the specific amount of loyalty points to an order. It calculates the amount that is available on the card and applies as much credits or points as possible to cover the total amount. \n\n### Set customer identity (optional)\n\nVoucherify can help you track anonymous customers. Once you integrate Voucherify into your web app and call the validate method, Voucherify will return a tracking ID and the script will store it in a cookie. Each subsequent validate call will use the same tracking ID.\n\nVoucherify tracks a user using a tracking ID to see if the user who is validating vouchers is the same as the one who consuming them. Voucherify does this by setting up an identity for the user. A `tracking_id` will be generated on the server side, unless you specify your own `tracking_id`. In both cases, you will receive the `tracking_id` in the validation response.\n\nThe returned `tracking_id` field should be used as the customer `source_id` in subsequent redemption requests. Moreover, the `tracking_id` returned from Validation API is encoded. Voucherify will recognize both values for identifying customer - the one before encryption sent as a query parameter to the **GET** `v1/validate` request, and the version encrypted and returned as part of the validation request.\n\n### Sample workflow\n\nCustomer tracking workflow in a nutshell:\n\n**Client-side:**\n * A customer visits your website.\n * A customer validates a voucher code. That triggers a validate request to be sent to Voucherify. In the request, you pass the tracking_id or customer.source_id. As a result, the API call to this endpoint returns an **encoded** `tracking_id`.\n\n**Backend:**\n * Once the customer finishes the checkout process, your website passes the `tracking_id` to your backend during a redemption call. The `tracking_id` is sent as a value assigned to the property *source_id* in a customer object.\n * A customer object is created and within the redemption response, you get a customer `id`.\n * You can use the customer `id` or the customer `source_id` to fetch or modify the customer details.\n \nA customer is created (upserted) automatically with a redemption call. Alternatively, you can create a new profile by creating a customer via a dedicated API method. Take a look at the customer object to understand the [entity's structure](ref:get-customer). \n\n\n\n> 📘 Customer identifier\n>\n> The source id of the customer may either be an already hashed version of the `tracking_id`, which you received in a response from a validation request or a custom ID you predefined (i.e. an email address). Nevertheless, we recommend using identifiers delivered by Voucherify API.\n\n\n```cURL\ncurl -X **GET** \\\n -H \"X-Client-Application-Id: 011240bf-d5fc-4ef1-9e82-11eb68c43bf5\" \\\n -H \"X-Client-Token: 9e2230c5-71fb-460a-91c6-fbee64707a20\" \\\n -H \"Content-Type: application/json\" \\\n -H \"origin: yourdomain.com\" \\\n 'https://api.voucherify.io/client/v1/validate?code=PAYINEUROS&session_type=LOCK&session_key=A&session_ttl=1&session_ttl_unit=NANOSECONDS&customer=cust_4vMj8Twr5nBzvTrNCgipMb6M&[order][metadata][currency]=EUR&[metadata][location_id][0]=L1&[item][0][source_id]=webinar_BF_sweater_pink_sweater&[item][0][quantity]=2&[item][0][related_object]=product'\n```\n\n```cURL\ncurl -X **GET** \\\n -H \"X-Client-Application-Id: 011240bf-d5fc-4ef1-9e82-11eb68c43bf5\" \\\n -H \"X-Client-Token: 9e2230c5-71fb-460a-91c6-fbee64707a20\" \\\n -H \"Content-Type: application/json\" \\\n -H \"origin: yourdomain.com\" \\\n 'https://api.voucherify.io/client/v1/validate?code=LOYALTY-CARD-ng3Kb9tM&session_type=LOCK&session_key=A&session_ttl=1&session_ttl_unit=NANOSECONDS&customer[source_id]=286401dc-6f4c-4ebb-8ca2-9f78b3e84c7d&[order][metadata][currency]=EUR&[customer][metadata][age]=24&[customer][metadata][acquisition_channel]=Facebook&[metadata][location_id][0]=L1&[item][0][source_id]=webinar_BF_sweater_pink_sweater&[item][0][quantity]=2&[item][0][related_object]=product&[item][1][source_id]=webinar_BF_pants_gray_sweat_pants&[item][1][quantity]=2&[item][1][related_object]=product&[item][2][product_id]=prod_0bd76bb4aa003890cb&[item][2][quantity]=2&[item][3][source_id]=M0E20000000ELDH&[item][3][quantity]=3&[item][3][related_object]=sku'\n```\n\n```cURL\ncurl -X **GET** \\\n -H \"X-Client-Application-Id: 011240bf-d5fc-4ef1-9e82-11eb68c43bf5\" \\\n -H \"X-Client-Token: 9e2230c5-71fb-460a-91c6-fbee64707a20\" \\\n -H \"Content-Type: application/json\" \\\n -H \"origin: yourdomain.com\" \\\n 'https://api.voucherify.io/client/v1/validate?code=GIFT-CARD-kW4aEsfB&session_type=LOCK&session_key=A&session_ttl=1&session_ttl_unit=NANOSECONDS&customer[source_id]=286401dc-6f4c-4ebb-8ca2-9f78b3e84c7d&[order][metadata][currency]=EUR&[customer][metadata][age]=24&[customer][metadata][acquisition_channel]=Facebook&[metadata][location_id][0]=L1&[item][0][source_id]=webinar_BF_sweater_pink_sweater&[item][0][quantity]=2&[item][0][related_object]=product&[item][1][source_id]=webinar_BF_pants_gray_sweat_pants&[item][1][quantity]=2&[item][1][related_object]=product&[item][2][product_id]=prod_0bd76bb4aa003890cb&[item][2][quantity]=2&[item][3][source_id]=M0E20000000ELDH&[item][3][quantity]=3&[item][3][related_object]=sku&[item][4][sku_id]=sku_0b661e41fc0d35a8f1&[item][4][quantity]=4'\n```\n\n```cURL\ncurl -X **GET** \\\n -H \"X-Client-Application-Id: 011240bf-d5fc-4ef1-9e82-11eb68c43bf5\" \\\n -H \"X-Client-Token: 9e2230c5-71fb-460a-91c6-fbee64707a20\" \\\n -H \"Content-Type: application/json\" \\\n -H \"origin: yourdomain.com\" \\\n 'https://api.voucherify.io/client/v1/validate?code=REFERRAL-CODE-OxBakPYf&amount=10000'\n```\n\n### [JSFiddle Example](https://jsfiddle.net/voucherify/gfu2bgn5/)\n\n```javascript\n\n\n\n```\n\n### Examples with Query Parameters\n\n| **Query Parameters** | **Example URL** |\n|:---|:---|\n| Shortcut - `customer` query param instead of `customer[source_id]` | `https://api.voucherify.io/client/v1/validate?code=sKKFCKLZ&amount=10100&customer=customer_id` |\n| Pass `customer`'s and `redemption`'s context `metadata` in query parameters | `https://api.voucherify.io/client/v1/validate?code=sKKFCKLZ&amount=10100&customer=sure_he_is_new&metadata[shop]=1&customer[metadata][propsy]=2&metadata[test]=true` |\n| Use `tracking_id` instead of `source_id` | `https://api.voucherify.io/client/v1/validate?code=IKU-mvS-JOG&amount=10100&tracking_id=sure_he_is_new_5&metadata[shop]=1&metadata[test]=true` |\n\n### Reasons why a validation might fail\n\nVoucher validation might fail because of one of these reasons:\n\n* `voucher not found` - voucher doesn't exist or was [deleted](ref:delete-voucher)\n* `voucher expired` - voucher is out of [start date - expiration date] timeframe\n* `voucher is disabled` - learn more about [disabled vouchers](ref:disable-voucher)\n* `customer does not match segment rules` - learn more customer tracking LINK\n* `order does not match validation rules` - learn more about validation rules LINK", "parameters": [ { "$ref": "#/components/parameters/origin" @@ -98693,7 +99309,7 @@ ], "responses": { "200": { - "description": "Returns information whether the voucher is valid in the context of the parameter values provided in the query parameters. Moreover, it returns a hashed source identifier which can be used as tracking ID in future calls. If a validation session is established, then the session details will be returned as well. Read more on [validation sessions](doc:locking-validation-session).", + "description": "Returns information whether the voucher is valid in the context of the parameter values provided in the query parameters. Moreover, it returns a hashed source identifier which can be used as tracking ID in future calls. If a validation session is established, then the session details will be returned as well. Read more on [validation sessions](doc:locking-validation-session).", "content": { "application/json": { "schema": { @@ -99140,7 +99756,7 @@ "Client-side" ], "summary": "Redeem Voucher (client-side) [Deprecated]", - "description": "\n> ❗️ Security Threat \n>\n> Be careful if you want to include the voucher redemption functionality directly on your client side (website or mobile app). In this configuration, there is a chance that discounts can be modified before being sent to the server.\n\n### Expand Response\nYou may expand the response by adding the following object to your request body. The expanded response will include the category details of the voucher.\n\n```json\n{\n \"options\": {\n \"expand\": [\n \"category\"\n ]\n }\n}\n```", + "description": "\n> ❗️ Deprecated \n>\n> This endpoint represents the deprecated version of the API responsible for voucher redemption, and we do not recommend using it. The new [Stackable Discounts API](ref:redeem-stacked-discounts-client-side) introduces additional features and improvements while maintaining backward compatibility, including applying a combination of coupon codes and promotion tiers. Developers are encouraged to migrate to the latest version to take advantage of the latest enhancements and bug fixes. No updates will be provided to the deprecated endpoint. \n\nTo redeem a voucher, you need to create a redemption object. It increments the redemption counter and updates the history of the voucher. This method is accessible through public keys, which you can use in client-side apps (mobile and web browser apps). \n\nThe client-side redemption works similar to the server-side [voucher redemption](ref:redeem-voucher) endpoint. The difference lies in the authorization. For the client-side, you can use client-side keys.\n\n\n> 📘 Opt-in \n>\n> By default this feature is disabled. If you want to use it, you will need to enable the function explicitly in **Project Settings**.\n\n\n> ❗️ Security Threat \n>\n> Be careful if you want to include the voucher redemption functionality directly on your client side (website or mobile app). In this configuration, there is a chance that discounts can be modified before being sent to the server.\n\n### Expand Response\nYou may expand the response by adding the following object to your request body. The expanded response will include the category details of the voucher.\n\n```json\n{\n \"options\": {\n \"expand\": [\n \"category\"\n ]\n }\n}\n```", "parameters": [ { "$ref": "#/components/parameters/origin" @@ -99776,7 +100392,7 @@ "Client-side" ], "summary": "Create Publication (client-side)", - "description": "This method selects vouchers that are suitable for publication, adds a publish entry and returns the publication.\n\nA voucher is suitable for publication when it's active and hasn't been published yet. \n\n\n\n> 📘 Auto-update campaign\n>\n> In case you want to ensure the number of publishable codes increases automatically with the number of customers, you should use an **auto-update** campaign.", + "description": "This method selects vouchers that are suitable for publication, adds a publish entry and returns the publication.\n\nA voucher is suitable for publication when it's active and hasn't been published yet. \n\n\n> 🚧 Clearly define the source of the voucher\n>\n> You must clearly define which source you want to publish the voucher code from. It can either be a code from a campaign or a specific voucher identified by a code. \n\n> 🚧 Publish multiple vouchers\n> In case you want to publish multiple vouchers within a single publication, you need to specify the campaign name and number of vouchers you want to publish. \n\n\n> 📘 Auto-update campaign\n>\n> In case you want to ensure the number of publishable codes increases automatically with the number of customers, you should use an **auto-update** campaign.", "parameters": [ { "schema": { From 6b7fab42cee904b027ab663da7998a588a4149aa Mon Sep 17 00:00:00 2001 From: p-woznikowski Date: Wed, 3 Sep 2025 18:41:01 +0200 Subject: [PATCH 7/7] Update openapi.json --- api-reference/openapi.json | 400 +------------------------------------ 1 file changed, 1 insertion(+), 399 deletions(-) diff --git a/api-reference/openapi.json b/api-reference/openapi.json index ada2227b..21df5a1a 100644 --- a/api-reference/openapi.json +++ b/api-reference/openapi.json @@ -49001,411 +49001,13 @@ "application/json": { "schema": { "$ref": "#/components/schemas/EventRedemptionSucceededData" - }, - "examples": { - "redemption.succeeded": { - "value": { - "customer": { - "id": "cust_1g637SqVZnkdPNdAIZ7Ra879", - "name": "Jane Doe", - "email": "jane@jane.io", - "source_id": "test_customer_id_2", - "metadata": { - "lang": "en", - "test": true, - "region": "EMEA" - }, - "object": "customer" - }, - "order": { - "id": "ord_3VYCHwdV0YOOch2nm1RsTKNI", - "source_id": null, - "status": "PAID", - "customer_id": "cust_1g637SqVZnkdPNdAIZ7Ra879", - "referrer_id": null, - "amount": 7000, - "items_discount_amount": 1000, - "items_applied_discount_amount": 1000, - "total_discount_amount": 1000, - "total_applied_discount_amount": 1000, - "total_amount": 6000, - "items": [ - { - "object": "order_item", - "source_id": "adv-mug", - "related_object": "product", - "quantity": 2, - "discount_quantity": 1, - "amount": 2000, - "discount_amount": 1000, - "applied_discount_amount": 1000, - "price": 1000, - "subtotal_amount": 1000 - }, - { - "object": "order_item", - "source_id": "star-th-bottle", - "related_object": "product", - "quantity": 2, - "amount": 5000, - "price": 2500, - "subtotal_amount": 5000 - } - ], - "metadata": {}, - "created_at": "2024-01-15T12:20:38.596843Z", - "object": "order" - }, - "campaign": { - "id": "camp_kwMyXFKquedx8FzXNpVPN7QU", - "name": "Always add missing products", - "campaign_type": "DISCOUNT_COUPONS", - "type": "AUTO_UPDATE", - "is_referral_code": false, - "voucher": { - "type": "DISCOUNT_VOUCHER", - "discount": { - "type": "UNIT", - "units": null, - "effect": "ADD_NEW_ITEMS", - "unit_off": 1, - "unit_type": "prod_0df14b3a6ad8f282a8" - }, - "redemption": { - "quantity": null, - "redeemed_quantity": 0 - }, - "code_config": { - "length": 1, - "prefix": "Always-add-prods-", - "charset": "0123456789", - "pattern": "#", - "postfix": "" - } - }, - "auto_join": false, - "join_once": false, - "active": true, - "category_id": null, - "created_at": "2023-12-08T13:54:29.003375Z", - "updated_at": "2023-12-15T11:07:05.173502Z", - "object": "campaign" - }, - "voucher": { - "id": "v_VZgTRbJvauZR7Ub7exOtAg0MqxXljPpA", - "code": "Always-add-prods-5", - "discount": { - "type": "UNIT", - "unit_off": 1, - "unit_type": "prod_0df14b3a6ad8f282a8", - "effect": "ADD_NEW_ITEMS" - }, - "type": "DISCOUNT_VOUCHER", - "campaign": "Always add missing products", - "campaign_id": "camp_kwMyXFKquedx8FzXNpVPN7QU", - "is_referral_code": false, - "category_id": null, - "active": true, - "created_at": "2023-12-08T14:01:18.213000Z", - "updated_at": "2024-01-15T12:20:38.624905Z", - "object": "voucher" - }, - "holder": null, - "promotion_tier": null, - "redemption": { - "id": "r_0e2500291ae016adea", - "customer_id": "cust_1g637SqVZnkdPNdAIZ7Ra879", - "tracking_id": "track_Pw6r3ejnml43kIwNS4Zj09KZ67xOfLUy", - "date": "2024-01-15T12:20:38.635000Z", - "order": { - "id": "ord_3VYCHwdV0YOOch2nm1RsTKNI", - "source_id": null, - "status": "PAID", - "customer_id": "cust_1g637SqVZnkdPNdAIZ7Ra879", - "referrer_id": null, - "amount": 7000, - "items_discount_amount": 1000, - "items_applied_discount_amount": 1000, - "total_discount_amount": 1000, - "total_applied_discount_amount": 1000, - "total_amount": 6000, - "items": [ - { - "object": "order_item", - "source_id": "adv-mug", - "related_object": "product", - "quantity": 2, - "discount_quantity": 1, - "amount": 2000, - "discount_amount": 1000, - "applied_discount_amount": 1000, - "price": 1000, - "subtotal_amount": 1000 - }, - { - "object": "order_item", - "source_id": "star-th-bottle", - "related_object": "product", - "quantity": 2, - "amount": 5000, - "price": 2500, - "subtotal_amount": 5000 - } - ], - "metadata": {}, - "created_at": "2024-01-15T12:20:38.596843Z", - "object": "order" - }, - "customer": { - "id": "cust_1g637SqVZnkdPNdAIZ7Ra879", - "name": "Jane Doe", - "email": "jane@jane.io", - "source_id": "test_customer_id_2", - "metadata": { - "lang": "en", - "test": true, - "region": "EMEA" - }, - "object": "customer" - }, - "result": "SUCCESS", - "status": "SUCCEEDED", - "voucher": { - "id": "v_VZgTRbJvauZR7Ub7exOtAg0MqxXljPpA", - "code": "Always-add-prods-5", - "discount": { - "type": "UNIT", - "unit_off": 1, - "unit_type": "prod_0df14b3a6ad8f282a8", - "effect": "ADD_NEW_ITEMS" - }, - "type": "DISCOUNT_VOUCHER", - "campaign": "Always add missing products", - "campaign_id": "camp_kwMyXFKquedx8FzXNpVPN7QU", - "is_referral_code": false, - "category_id": null, - "active": true, - "created_at": "2023-12-08T14:01:18.213000Z", - "updated_at": "2024-01-15T12:20:38.624905Z", - "object": "voucher" - }, - "metadata": {}, - "object": "redemption" - }, - "created_at": "2024-01-15T12:20:38.636Z" - } - } } } } }, - "tags": [ - "Events redemption" - ], "responses": { "200": { - "description": "Indicates that a redemption has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EventRedemptionSucceededData" - }, - "examples": { - "redemption.succeeded": { - "value": { - "customer": { - "id": "cust_1g637SqVZnkdPNdAIZ7Ra879", - "name": "Jane Doe", - "email": "jane@jane.io", - "source_id": "test_customer_id_2", - "metadata": { - "lang": "en", - "test": true, - "region": "EMEA" - }, - "object": "customer" - }, - "order": { - "id": "ord_3VYCHwdV0YOOch2nm1RsTKNI", - "source_id": null, - "status": "PAID", - "customer_id": "cust_1g637SqVZnkdPNdAIZ7Ra879", - "referrer_id": null, - "amount": 7000, - "items_discount_amount": 1000, - "items_applied_discount_amount": 1000, - "total_discount_amount": 1000, - "total_applied_discount_amount": 1000, - "total_amount": 6000, - "items": [ - { - "object": "order_item", - "source_id": "adv-mug", - "related_object": "product", - "quantity": 2, - "discount_quantity": 1, - "amount": 2000, - "discount_amount": 1000, - "applied_discount_amount": 1000, - "price": 1000, - "subtotal_amount": 1000 - }, - { - "object": "order_item", - "source_id": "star-th-bottle", - "related_object": "product", - "quantity": 2, - "amount": 5000, - "price": 2500, - "subtotal_amount": 5000 - } - ], - "metadata": {}, - "created_at": "2024-01-15T12:20:38.596843Z", - "object": "order" - }, - "campaign": { - "id": "camp_kwMyXFKquedx8FzXNpVPN7QU", - "name": "Always add missing products", - "campaign_type": "DISCOUNT_COUPONS", - "type": "AUTO_UPDATE", - "is_referral_code": false, - "voucher": { - "type": "DISCOUNT_VOUCHER", - "discount": { - "type": "UNIT", - "units": null, - "effect": "ADD_NEW_ITEMS", - "unit_off": 1, - "unit_type": "prod_0df14b3a6ad8f282a8" - }, - "redemption": { - "quantity": null, - "redeemed_quantity": 0 - }, - "code_config": { - "length": 1, - "prefix": "Always-add-prods-", - "charset": "0123456789", - "pattern": "#", - "postfix": "" - } - }, - "auto_join": false, - "join_once": false, - "active": true, - "category_id": null, - "created_at": "2023-12-08T13:54:29.003375Z", - "updated_at": "2023-12-15T11:07:05.173502Z", - "object": "campaign" - }, - "voucher": { - "id": "v_VZgTRbJvauZR7Ub7exOtAg0MqxXljPpA", - "code": "Always-add-prods-5", - "discount": { - "type": "UNIT", - "unit_off": 1, - "unit_type": "prod_0df14b3a6ad8f282a8", - "effect": "ADD_NEW_ITEMS" - }, - "type": "DISCOUNT_VOUCHER", - "campaign": "Always add missing products", - "campaign_id": "camp_kwMyXFKquedx8FzXNpVPN7QU", - "is_referral_code": false, - "category_id": null, - "active": true, - "created_at": "2023-12-08T14:01:18.213000Z", - "updated_at": "2024-01-15T12:20:38.624905Z", - "object": "voucher" - }, - "holder": null, - "promotion_tier": null, - "redemption": { - "id": "r_0e2500291ae016adea", - "customer_id": "cust_1g637SqVZnkdPNdAIZ7Ra879", - "tracking_id": "track_Pw6r3ejnml43kIwNS4Zj09KZ67xOfLUy", - "date": "2024-01-15T12:20:38.635000Z", - "order": { - "id": "ord_3VYCHwdV0YOOch2nm1RsTKNI", - "source_id": null, - "status": "PAID", - "customer_id": "cust_1g637SqVZnkdPNdAIZ7Ra879", - "referrer_id": null, - "amount": 7000, - "items_discount_amount": 1000, - "items_applied_discount_amount": 1000, - "total_discount_amount": 1000, - "total_applied_discount_amount": 1000, - "total_amount": 6000, - "items": [ - { - "object": "order_item", - "source_id": "adv-mug", - "related_object": "product", - "quantity": 2, - "discount_quantity": 1, - "amount": 2000, - "discount_amount": 1000, - "applied_discount_amount": 1000, - "price": 1000, - "subtotal_amount": 1000 - }, - { - "object": "order_item", - "source_id": "star-th-bottle", - "related_object": "product", - "quantity": 2, - "amount": 5000, - "price": 2500, - "subtotal_amount": 5000 - } - ], - "metadata": {}, - "created_at": "2024-01-15T12:20:38.596843Z", - "object": "order" - }, - "customer": { - "id": "cust_1g637SqVZnkdPNdAIZ7Ra879", - "name": "Jane Doe", - "email": "jane@jane.io", - "source_id": "test_customer_id_2", - "metadata": { - "lang": "en", - "test": true, - "region": "EMEA" - }, - "object": "customer" - }, - "result": "SUCCESS", - "status": "SUCCEEDED", - "voucher": { - "id": "v_VZgTRbJvauZR7Ub7exOtAg0MqxXljPpA", - "code": "Always-add-prods-5", - "discount": { - "type": "UNIT", - "unit_off": 1, - "unit_type": "prod_0df14b3a6ad8f282a8", - "effect": "ADD_NEW_ITEMS" - }, - "type": "DISCOUNT_VOUCHER", - "campaign": "Always add missing products", - "campaign_id": "camp_kwMyXFKquedx8FzXNpVPN7QU", - "is_referral_code": false, - "category_id": null, - "active": true, - "created_at": "2023-12-08T14:01:18.213000Z", - "updated_at": "2024-01-15T12:20:38.624905Z", - "object": "voucher" - }, - "metadata": {}, - "object": "redemption" - }, - "created_at": "2024-01-15T12:20:38.636Z" - } - } - } - } - } + "description": "Indicates that a redemption has succeeded." } }, "operationId": "events-redemption-succeeded"