{"info":{"_postman_id":"27202002-aac9-47de-a834-a27a7cc4bbe1","name":"Voucherify API - Core API Endpoints","description":"Voucherify is an API-first promotion & loyalty engine. Here is an up-to-date list of API endpoints to cover simple promotion-related operations and more complex scenarios, including loyalty programs and referrals.","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json"},"item":[{"name":"Publications","item":[{"name":"List Publications","event":[{"listen":"test","script":{"id":"8cabdce6-b194-4393-82f4-f338f5171423","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);",""],"type":"text/javascript","packages":{}}}],"id":"a7be3f8a-6cc7-4453-9f2f-a9a2d47ebac4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/publications?page=1&limit=10&order=voucher_code","host":["{{url}}"],"path":["publications"],"query":[{"key":"page","value":"1","description":"Which page of results to return. The lowest value is 1."},{"key":"limit","value":"10","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100 items."},{"key":"order","value":"voucher_code","description":"Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.\n\n"},{"key":"campaign","value":"{{campaign_id or campaign_name}}","description":"Filters by a given campaign name.","disabled":true},{"key":"customer","value":"{{customer_id}}","description":"Filters by a unique customer ID.","disabled":true},{"key":"result","value":"SUCCESS","description":"Filters by a publication result.","type":"text","disabled":true},{"key":"voucher","value":"{{voucher_code}}","description":"Filters by a given voucher code.","disabled":true},{"key":"voucher_type","value":"discount","description":"Filters by a voucher type.","disabled":true},{"key":"is_referral_code","value":"TRUE","description":"This filter works only for the true option. If set to true, the query returns only publications of codes from referral campaigns.","type":"text","disabled":true},{"key":"filters[customer_id][conditions][$is]","value":"{{customer_id}}","description":"Filter publications by customer ids.","type":"text","disabled":true},{"key":"filters[campaign_name][conditions][$is]","value":"{{campaign_name}}","description":"Filter publications by campaign names.","type":"text","disabled":true},{"key":"filters[source_id][conditions][$is]","value":"{{source_id}}","description":"Filter publications by source id.","type":"text","disabled":true},{"key":"filters[junction]","value":"AND","description":"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.","type":"text","disabled":true}]}},"response":[],"_postman_id":"a7be3f8a-6cc7-4453-9f2f-a9a2d47ebac4"},{"name":"Create Publication","event":[{"listen":"test","script":{"id":"ccb60580-84c5-49cf-97f5-bc0da8efb8c1","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Publish count is 1\"] = _.get(jsonData, \"publish.count\") === 1;",""],"type":"text/javascript"}}],"id":"237925f5-f40a-4634-bb97-15d3b6384de0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"source_id\": \"{{source_id}}\", // 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. If source_id is provided only 1 voucher can be published per request.\n    \"customer\": {\n        \"source_id\": \"{{source_id}}\", // 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.\n        \"name\": \"{{customer_name}}\",\n        \"email\": \"{{customer_email}}\"\n    },\n    \"metadata\": {\n        \"key\": \"{{value}}\"\n    },\n    \"campaign\": { // You can either use campaign name or voucher code.\n        \"name\": \"{{campaign_name}}\",\n        \"count\": 1 // This is optional and allows you to decide how many vouchers you want to publish.\n    },\n    \"voucher\": \"{{voucher_code}}\"\n}"},"url":{"raw":"{{url}}/publications","host":["{{url}}"],"path":["publications"],"query":[{"key":"join_once","value":"{{true}}, {{false}}","description":"Through this flag, you can control if a particular person gets only one and always the same code even if the app sends multiple publication requests. It means that if you have a referral program, a referrer is assigned only to one code if an integration sends publication requests more than once for the same customer.","disabled":true}]}},"response":[],"_postman_id":"237925f5-f40a-4634-bb97-15d3b6384de0"},{"name":"Create Publication","id":"109139a6-76c7-4f76-aa8d-f835a79deaeb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/publications/create?campaign[name]={{campaing_id or campaign_name}}&campaign[count]=1&customer[source_id]={{customer_source_id}}&customer[name]={{customer_name}}","host":["{{url}}"],"path":["publications","create"],"query":[{"key":"voucher","value":"{{voucher_code}}","description":"Code of voucher being published.","disabled":true},{"key":"campaign[name]","value":"{{campaing_id or campaign_name}}","description":"Name of voucher's parent campaign or unique campaign ID that was assigned by Voucherify."},{"key":"campaign[count]","value":"1","description":"Number of vouchers to be published to customer."},{"key":"customer[source_id]","value":"{{customer_source_id}}","description":"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."},{"key":"customer[name]","value":"{{customer_name}}","description":"Customer's first and last name."}]},"description":"> The access to this endpoint is limited. This endpoint is designed for specific integrations with third-party platforms and the API keys need to be configured to access this endpoint. In the Voucherify dashboard, go to Project Settings, General tab, and scroll down to Integration keys to set up a pair of API keys and use them to send the request."},"response":[],"_postman_id":"109139a6-76c7-4f76-aa8d-f835a79deaeb"}],"id":"ec2fc86f-8c3d-4754-a856-e1babc8b20d9","description":"This section lets you [publish and retrieve](https://docs.voucherify.io/reference/publication-object#publications-create-base-response-body) incentives (unique promo codes, referral codes, loyalty card codes, gift vouchers) assigned to customers. Publication API allows you to protect campaigns from misuse and display all owned incentives in different views.","_postman_id":"ec2fc86f-8c3d-4754-a856-e1babc8b20d9"},{"name":"Qualifications","item":[{"name":"Qualifications - ALL Scenario","id":"e557883f-a552-44b3-8b83-a690b622038b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-ID","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"scenario\": \"ALL\", // Returns all redeemables available for the customer in one API request.\n    \"customer\": {\n        \"source_id\": \"{{external_customer_id}}\", // The ID you use to identify the customer.\n        \"name\": \"John Doe\",\n        \"email\": \"{{customer_email}}\",\n        \"metadata\": {\n            \"metadata_key\": \"{{value}}\",\n            \"customer_location\": \"geo:37.786971,-122.399677\",\n            \"subscribed\": true\n        }\n    },\n    \"order\": {\n        \"amount\": {{amount}}, // Amount to pay for the order in cents.\n        \"status\": \"CREATED\",\n        \"source_id\": \"{{external_order_id}}\",\n        \"metadata\": {\n            \"channel\": \"web\",\n            \"currency\": \"USD\",\n            \"restaurant\": \"Freddy's\",\n            \"any_key\": \"{{any_value}}\"\n        },\n        \"items\": [\n            {\n                \"quantity\": 1,\n                \"price\": 2500,\n                \"amount\": 2500,\n                \"source_id\": \"BBQ_meal\",\n                \"related_object\": \"product\",\n                \"product\": {\n                    \"metadata\": {\n                        \"cuisine\": \"American\",\n                        \"food_type\": \"meal\",\n                        \"meal_type\": \"dinner\",\n                        \"star_rating\": 4,\n                        \"vegetarian\": false,\n                        \"vegan\": false\n                    }\n                }\n            },\n            {\n                \"quantity\": 1,\n                \"price\": 700,\n                \"amount\": 700,\n                \"source_id\": \"Refreshing_Cola\",\n                \"related_object\": \"product\",\n                \"product\": {\n                    \"metadata\": {\n                        \"cuisine\": \"American\",\n                        \"food_type\": \"beverage\",\n                        \"star_rating\": 4,\n                        \"vegetarian\": true,\n                        \"vegan\": false\n                    }\n                }\n            }\n        ]\n    },\n    \"options\": {\n        \"limit\": 30,\n        \"expand\": [\n            \"redeemable\"\n        ],\n        \"starting_after\": null, // Cursor used for paging.\n        \"sorting_rule\": \"DEFAULT\",\n        \"filters\": { // Filters allow you to limit the returned results. Optional.\n            \"resource_type\": {\n                \"conditions\": {\n                    \"$in\": [\n                        \"voucher\",\n                        \"campaign\",\n                        \"promotion_tier\"\n                    ]\n                }\n            },\n            \"category_id\": {\n                \"conditions\": {\n                    \"$is\": [\n                        \"{{category_id}}\"\n                    ]\n                }\n            }\n        }\n    }\n}","options":{"raw":{"language":"json"}}},"url":"{{url}}/qualifications"},"response":[],"_postman_id":"e557883f-a552-44b3-8b83-a690b622038b"},{"name":"Qualifications - AUDIENCE_ONLY Scenario","id":"6d3c0695-d6c0-4b87-b418-cc3c758ab436","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-ID","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"scenario\": \"AUDIENCE_ONLY\", // Returns all vouchers, promotion tiers, and campaigns available to the customer. Voucherify validates the rules based on the customer profile only.\n    \"customer\": {\n        \"source_id\": \"{{external_customer_id}}\", // The ID you use to identify the customer\n        \"name\": \"John Doe\",\n        \"email\": \"{{customer_email}}\",\n        \"metadata\": {\n            \"metadata_key\": \"{{metadata_value}}\",\n            \"customer_location\": \"geo:37.786971,-122.399677\",\n            \"subscribed\": true\n        }\n    },\n    \"options\": {\n        \"limit\": 30,\n        \"expand\": [\n            \"redeemable\"\n        ],\n        \"starting_after\": null, // Cursor used for paging.\n        \"sorting_rule\": \"DEFAULT\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"{{url}}/qualifications"},"response":[],"_postman_id":"6d3c0695-d6c0-4b87-b418-cc3c758ab436"},{"name":"Qualifications - CUSTOMER_WALLET Scenario","id":"8edecc06-1c75-4890-b4cf-efa9daa13a48","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-ID","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"scenario\": \"CUSTOMER_WALLET\", // Returns vouchers applicable to the customer’s cart based on the vouchers assigned to the customer’s profile.\n    \"customer\": {\n        \"source_id\": \"{{external_customer_id}}\", // The ID you use to identify the customer\n        \"name\": \"John Doe\",\n        \"email\": \"{{customer_email}}\",\n        \"metadata\": {\n            \"metadata_key\": \"{{metadata_value}}\",\n            \"customer_location\": \"geo:37.786971,-122.399677\",\n            \"subscribed\": true\n        }\n    },\n    \"order\": {\n        \"amount\": {{amount}}, // Amount to pay for the order in cents\n        \"status\": \"CREATED\",\n        \"source_id\": \"{{external_order_id}}\",\n        \"metadata\": {\n            \"channel\": \"web\",\n            \"currency\": \"USD\",\n            \"restaurant\": \"Freddy's\",\n            \"any_key\": \"{{any_value}}\"\n        },\n        \"items\": [\n            {\n                \"quantity\": 1,\n                \"price\": 2500,\n                \"amount\": 2500,\n                \"source_id\": \"BBQ_meal\",\n                \"related_object\": \"product\",\n                \"product\": {\n                    \"metadata\": {\n                        \"cuisine\": \"American\",\n                        \"food_type\": \"meal\",\n                        \"meal_type\": \"dinner\",\n                        \"star_rating\": 4,\n                        \"vegetarian\": false,\n                        \"vegan\": false\n                    }\n                }\n            },\n            {\n                \"quantity\": 1,\n                \"price\": 700,\n                \"amount\": 700,\n                \"source_id\": \"Refreshing_Cola\",\n                \"related_object\": \"product\",\n                \"product\": {\n                    \"metadata\": {\n                        \"cuisine\": \"American\",\n                        \"food_type\": \"beverage\",\n                        \"star_rating\": 4,\n                        \"vegetarian\": true,\n                        \"vegan\": false\n                    }\n                }\n            }\n        ]\n    },\n    \"options\": {\n        \"limit\": 30,\n        \"expand\": [\n            \"redeemable\"\n        ],\n        \"starting_after\": null, // Cursor used for paging.\n        \"sorting_rule\": \"DEFAULT\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"{{url}}/qualifications"},"response":[],"_postman_id":"8edecc06-1c75-4890-b4cf-efa9daa13a48"}],"id":"26dd2b4b-b7b0-4aa8-897a-5c861ca5680d","description":"[Qualifications API](https://docs.voucherify.io/reference/check-eligibility) helps recommend applicable promotions and coupons in the context of the given customer and order with filtering options based on campaign category and hierarchy.\n\nThe Qualifications API can be applied (among others) for:\n\n- **Upselling** – show customers available discounts and encourage them to increase order size to claim the deal.\n    \n- **Customer** **wallet** – display a list of incentives the customer was assigned to (via Publication) that can be used for the current order.\n    \n- **Strikethrough** **price** – show new prices for a list of products after a promotion is applied.\n    \n- **Best** **deal** – sort the returned incentives to highlight only the most attractive ones.","_postman_id":"26dd2b4b-b7b0-4aa8-897a-5c861ca5680d"},{"name":"Validations","item":[{"name":"Validate Stackable Discounts","event":[{"listen":"test","script":{"id":"2f9fff67-9553-477d-8651-2da191d4ce5f","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Voucher is enabled\"] = jsonData.active;",""],"type":"text/javascript"}}],"id":"3020e62c-70c5-4468-b9ff-9b4f63ce48e2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"redeemables\": [\n        {\n            \"object\": \"voucher\",\n            \"id\": \"{{voucher_code}}\" // Discount Code, Gift Voucher, Referral  Code, Loyalty Card\n        },\n        {\n            \"object\": \"voucher\",\n            \"id\": \"{{gift_voucher}}\",\n            \"gift\": {\n                \"credits\": 100 // Optional\n            }\n        },\n        {\n            \"object\": \"voucher\",\n            \"id\": \"{{loyalty_card}}\",\n            \"reward\": {\n                \"points\": 10, // Optional - Number of points to redeem for the Pay With Points reward\n                \"id\": \"{{reward_id}}\" // Optional - The ID of the reward to exchange the points to\n            }\n        },\n        {\n            \"object\": \"promotion_tier\",\n            \"id\": \"{{promotion_tier_id}}\"\n        },\n        {\n            \"object\": \"promotion_stack\",\n            \"id\": \"{{promotion_stack_id}}\"\n        }\n    ],\n    \"customer\": {\n        \"source_id\": \"{{external_customer_id}}\", // The ID you use to identify the customer\n        \"name\": \"John Doe\",\n        \"email\": \"{{customer_email}}\",\n        \"metadata\": {\n            \"metadata_key\": \"{{metadata_value}}\",\n            \"customer_location\": \"geo:37.786971,-122.399677\",\n            \"subscribed\": true\n        }\n    },\n    \"order\": {\n        \"amount\": {{amount}}, // Amount to pay for the order in cents\n        \"status\": \"CREATED\",\n        \"source_id\": \"{{external_order_id}}\",\n        \"metadata\": {\n            \"channel\": \"web\",\n            \"currency\": \"USD\",\n            \"restaurant\": \"Freddy's\",\n            \"any_key\": \"{{any_value}}\"\n        },\n        \"items\": [\n            {\n                \"quantity\": 1,\n                \"price\": 2500,\n                \"amount\": 2500,\n                \"source_id\": \"BBQ_meal\",\n                \"related_object\": \"product\",\n                \"product\": {\n                    \"metadata\": {\n                        \"cuisine\": \"American\",\n                        \"food_type\": \"meal\",\n                        \"meal_type\": \"dinner\",\n                        \"star_rating\": 4,\n                        \"vegetarian\": false,\n                        \"vegan\": false\n                    }\n                }\n            },\n            {\n                \"quantity\": 1,\n                \"price\": 700,\n                \"amount\": 700,\n                \"source_id\": \"Refreshing_Cola\",\n                \"related_object\": \"product\",\n                \"product\": {\n                    \"metadata\": {\n                        \"cuisine\": \"American\",\n                        \"food_type\": \"beverage\",\n                        \"star_rating\": 4,\n                        \"vegetarian\": true,\n                        \"vegan\": false\n                    }\n                }\n            }\n        ]\n    },\n    \"options\": {\n        \"expand\": [\n            \"order\",\n            \"redeemable\"\n        ]\n    }\n}"},"url":{"raw":"{{url}}/validations","host":["{{url}}"],"path":["validations"],"query":[{"key":"tracking_id","value":"","disabled":true}]}},"response":[],"_postman_id":"3020e62c-70c5-4468-b9ff-9b4f63ce48e2"}],"id":"4eed4bee-00fb-4d09-a2ae-c45823e4d036","description":"This section allows you to check whether the incentive (promo code, referral code, loyalty card code, gift voucher, promotion tier) is [valid](https://docs.voucherify.io/reference/validation-object) within the context of the parameters provided in the request body. Validation is optional – it can, for instance, help you display discounted prices before redemption, building a better customer experience. You can validate up to 30 incentives.","_postman_id":"4eed4bee-00fb-4d09-a2ae-c45823e4d036"},{"name":"Redemptions","item":[{"name":"Redeem Stackable Discounts","event":[{"listen":"test","script":{"id":"032033f0-7ba6-4caf-9778-4ce8513b6d9f","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Voucher is enabled\"] = jsonData.active;",""],"type":"text/javascript"}}],"id":"38d1a1a1-46a3-4d6b-a014-7f0d2e15b833","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"redeemables\": [\n        {\n            \"object\": \"voucher\",\n            \"id\": \"{{voucher_code}}\" // Discount Code, Gift Voucher, Referral  Code, Loyalty Card\n        },\n        {\n            \"object\": \"voucher\",\n            \"id\": \"{{gift_voucher}}\",\n            \"gift\": {\n                \"credits\": 100 // Optional\n            }\n        },\n        {\n            \"object\": \"voucher\",\n            \"id\": \"{{loyalty_card}}\",\n            \"reward\": {\n                \"points\": 10, // Optional - Number of points to redeem for the Pay With Points reward\n                \"id\": \"{{reward_id}}\" // Optional - The ID of the reward to exchange the points to\n            }\n        },\n        {\n            \"object\": \"promotion_tier\",\n            \"id\": \"{{promotion_tier_id}}\"\n        },\n        {\n            \"object\": \"promotion_stack\",\n            \"id\": \"{{promotion_stack_id}}\"\n        }\n    ],\n    \"customer\": {\n        \"source_id\": \"{{external_customer_id}}\", // The ID you use to identify the customer\n        \"name\": \"John Doe\",\n        \"email\": \"{{customer_email}}\",\n        \"metadata\": {\n            \"metadata_key\": \"{{metadata_value}}\",\n            \"customer_location\": \"geo:37.786971,-122.399677\",\n            \"subscribed\": true\n        }\n    },\n    \"order\": {\n        \"amount\": {{amount}}, // Amount to pay for the order in cents\n        \"status\": \"PAID\",\n        \"source_id\": \"{{external_order_id}}\",\n        \"metadata\": {\n            \"channel\": \"web\",\n            \"currency\": \"USD\",\n            \"restaurant\": \"Freddy's\",\n            \"any_key\": \"{{any_value}}\"\n        },\n        \"items\": [\n            {\n                \"quantity\": 1,\n                \"price\": 2500,\n                \"amount\": 2500,\n                \"source_id\": \"BBQ_meal\",\n                \"related_object\": \"product\",\n                \"product\": {\n                    \"metadata\": {\n                        \"cuisine\": \"American\",\n                        \"food_type\": \"meal\",\n                        \"meal_type\": \"dinner\",\n                        \"star_rating\": 4,\n                        \"vegetarian\": false,\n                        \"vegan\": false\n                    }\n                }\n            },\n            {\n                \"quantity\": 1,\n                \"price\": 700,\n                \"amount\": 700,\n                \"source_id\": \"Refreshing_Cola\",\n                \"related_object\": \"product\",\n                \"product\": {\n                    \"metadata\": {\n                        \"cuisine\": \"American\",\n                        \"food_type\": \"beverage\",\n                        \"star_rating\": 4,\n                        \"vegetarian\": true,\n                        \"vegan\": false\n                    }\n                }\n            }\n        ]\n    },\n    \"options\": {\n        \"expand\": [\n            \"order\",\n            \"redeemable\"\n        ]\n    }\n}"},"url":{"raw":"{{url}}/redemptions","host":["{{url}}"],"path":["redemptions"],"query":[{"key":"tracking_id","value":"","disabled":true}]}},"response":[],"_postman_id":"38d1a1a1-46a3-4d6b-a014-7f0d2e15b833"},{"name":"Get Redemption","event":[{"listen":"test","script":{"id":"7eb5f261-e01c-4f42-a908-dc61d4948a5a","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript"}}],"id":"466606f1-ea22-4d02-b748-fe8b3d8c1750","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/redemptions/:redemption-id","host":["{{url}}"],"path":["redemptions",":redemption-id"],"variable":[{"id":"2106c571-e9d3-4a96-b650-7cca576cebf5","key":"redemption-id","value":"{{redemption_id}}","description":"Return a redemption or redemption rollback object. This object can either be a successfull or failed redemption or redemption rollback."}]}},"response":[],"_postman_id":"466606f1-ea22-4d02-b748-fe8b3d8c1750"},{"name":"Get Voucher's Redemptions","event":[{"listen":"test","script":{"id":"5385b8d1-5581-448f-a913-2088be954564","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript"}}],"id":"fdea5795-9e98-43fe-8844-5cebffe93628","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/vouchers/:voucher-code/redemption","host":["{{url}}"],"path":["vouchers",":voucher-code","redemption"],"variable":[{"id":"358bbdff-c66e-4e26-8a26-2d107dc80a12","key":"voucher-code","value":"{{voucher_code}}","description":"A code that identifies the voucher."}]}},"response":[],"_postman_id":"fdea5795-9e98-43fe-8844-5cebffe93628"},{"name":"List Redemptions","event":[{"listen":"test","script":{"id":"6b6d0f58-25b2-4aab-80cd-0819bbc7c9ae","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript","packages":{}}}],"id":"7bf90431-43e1-44aa-8a24-70169058dac6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/redemptions?limit=15","host":["{{url}}"],"path":["redemptions"],"query":[{"key":"limit","value":"15","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100 items."},{"key":"result","value":"SUCCESS","description":"A filter on the list based on the redemption result. Available options are: SUCCESS, FAILURE. You can provide multiple values by repeating the param.","disabled":true},{"key":"campaign","value":"{{campaign_name}}","description":"A filter by the campaign name that the redemption resources originate from.","disabled":true},{"key":"customer","value":"{{customer_id or customer_source_id}}","description":"Return redemptions performed by the customer with given id or source_id.","disabled":true},{"key":"order","value":"created_at","description":"Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.","disabled":true},{"key":"created_at[after]","value":"2024-02-07T10%3A13%3A06.487Z","description":"Timestamp representing the date and time after the voucher was created in ISO 8601 format. The value has to be passed in the UTF-8 encoding standard.","disabled":true},{"key":"page","value":"1","description":"Which page of results to return. The lowest value is 1.","type":"text","disabled":true},{"key":"filters[voucher_code][conditions][$in][0]","value":"{{voucher_code}}","description":"Unique voucher code.","type":"text","disabled":true},{"key":"filters[object][conditions][$in][0]","value":"redemption","description":"Specify which type of object to return, i.e. redemption or redemption_rollback.","type":"text","disabled":true},{"key":"filters[user_login][conditions][$in][0]","value":"{{user_login}}","description":"User login used to login to Voucherify, i.e. name.lastname@email.com","type":"text","disabled":true},{"key":"filters[junction]","value":"AND","description":"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.","type":"text","disabled":true}]}},"response":[],"_postman_id":"7bf90431-43e1-44aa-8a24-70169058dac6"},{"name":"Rollback Redemption","event":[{"listen":"test","script":{"id":"7c9647a9-6976-4703-aaab-b2bf88c8f0cf","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript"}}],"id":"a57230cb-4604-460b-97bc-b3024c0a814e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/redemptions/:redemption-id/rollback?reason=Product malfunction","host":["{{url}}"],"path":["redemptions",":redemption-id","rollback"],"query":[{"key":"reason","value":"Product malfunction","description":"Reason for the rollback."}],"variable":[{"id":"bba03f3d-b992-4b8f-91f6-755227b62f7b","key":"redemption-id","value":"{{redemption_id}}","description":"The original redemption ID to be rolled back (undone)."}]}},"response":[],"_postman_id":"a57230cb-4604-460b-97bc-b3024c0a814e"},{"name":"Rollback Stackable Redemptions","event":[{"listen":"test","script":{"id":"eae2ba34-c7bd-4193-9858-d180b819a182","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Voucher is enabled\"] = jsonData.active;",""],"type":"text/javascript"}}],"id":"69faf417-196e-459f-91e6-40a661fb0086","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/redemptions/:parent_redemption_id/rollbacks","host":["{{url}}"],"path":["redemptions",":parent_redemption_id","rollbacks"],"variable":[{"id":"7b05cea8-5c96-4e2d-9979-5341aaa92f2f","key":"parent_redemption_id","value":"{{parent_redemption_id}}","description":"Unique identifier of a parent redemption, e.g. r_JQfm73zWSJFQxs3bGxweYjgm."}]}},"response":[],"_postman_id":"69faf417-196e-459f-91e6-40a661fb0086"}],"id":"ff810b3c-48ea-46fa-a26a-90dfad2f843c","description":"This section allows you to [redeem](https://docs.voucherify.io/reference/redemption-object) incentives (promo code, referral code, loyalty card code, gift voucher, promotion tier), list, and roll back redemptions. Note that rollbacks cannot be applied to redemptions older than three months. Redemption API also validates incentives. You can redeem up to 30 incentives.","_postman_id":"ff810b3c-48ea-46fa-a26a-90dfad2f843c"},{"name":"Vouchers","item":[{"name":"Create Voucher","item":[{"name":"Create Voucher (discount voucher)","event":[{"listen":"test","script":{"id":"6850307c-c783-4f49-9ee0-e229ac9d02ae","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Type is DISCOUNT VOUCHER\"] = jsonData.type === \"DISCOUNT_VOUCHER\";","tests[\"Code is not empty\"] = _.isEmpty(jsonData.code) !== true;","","pm.environment.set(\"voucher-code\", jsonData.code);"],"type":"text/javascript"}}],"id":"5de29f27-8f72-4f89-9a17-b11f73dcd1df","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"type\": \"DISCOUNT_VOUCHER\", //Defines the type of the voucher: DISCOUNT_VOUCHER, GIFT_VOUCHER, LOYALTY_CARD.\n    \"discount\": {\n        \"amount_off\": 2000, // 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. In case of the amount being calculated by the formula, i.e. the amount_off_formula parameter is present in the amount 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 amount off.\n        \"type\": \"AMOUNT\" // Applies an amount discount.\n    },\n    \"redemption\": {\n        \"quantity\": null // How many times a voucher can be redeemed. A null value means unlimited.\n    },\n    \"metadata\": {}\n}"},"url":{"raw":"{{url}}/vouchers/:voucher-code","host":["{{url}}"],"path":["vouchers",":voucher-code"],"variable":[{"key":"voucher-code","value":"{{voucher_code}}","description":"A unique code that identifies the voucher."}]},"description":"Create discount voucher without code"},"response":[],"_postman_id":"5de29f27-8f72-4f89-9a17-b11f73dcd1df"},{"name":"Create Voucher (gift voucher)","event":[{"listen":"test","script":{"id":"6850307c-c783-4f49-9ee0-e229ac9d02ae","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Type is DISCOUNT VOUCHER\"] = jsonData.type === \"DISCOUNT_VOUCHER\";","tests[\"Code is not empty\"] = _.isEmpty(jsonData.code) !== true;","","pm.environment.set(\"voucher-code\", jsonData.code);"],"type":"text/javascript","packages":{}}}],"id":"388565fb-6f0a-42cc-a907-6bc2cf7b0156","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"type\": \"GIFT_VOUCHER\", //Defines the type of the voucher: DISCOUNT_VOUCHER, GIFT_VOUCHER, LOYALTY_CARD.\n    \"gift\": { // Defines gift card; required when type parameter is GIFT_VOUCHER.\n        \"amount\": 10000, // Define how many credits the gift card should have initially. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000.\n        \"effect\": \"APPLY_TO_ORDER\" // Defines how the credits are applied to the customer's order\n    },\n    \"redemption\": {\n        \"quantity\": null // How many times a voucher can be redeemed. A null value means unlimited.\n    },\n    \"metadata\": {}\n}"},"url":{"raw":"{{url}}/vouchers/:voucher-code","host":["{{url}}"],"path":["vouchers",":voucher-code"],"variable":[{"id":"76afe65e-efe6-426a-8e1f-cc6809618f31","key":"voucher-code","value":"{{voucher_code}}","description":"A unique code that identifies the voucher."}]},"description":"Create discount voucher without code"},"response":[],"_postman_id":"388565fb-6f0a-42cc-a907-6bc2cf7b0156"},{"name":"Create Voucher (loyalty card)","event":[{"listen":"test","script":{"id":"6850307c-c783-4f49-9ee0-e229ac9d02ae","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Type is DISCOUNT VOUCHER\"] = jsonData.type === \"DISCOUNT_VOUCHER\";","tests[\"Code is not empty\"] = _.isEmpty(jsonData.code) !== true;","","pm.environment.set(\"voucher-code\", jsonData.code);"],"type":"text/javascript","packages":{}}}],"id":"765ba630-41df-40b9-8055-85e97014f862","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"campaign\": \"{{campaign name}}\", // Identifies the voucher's parent campaign using a unique campaign name. Required for LOYALTY_CARD type.\n    \"type\": \"LOYALTY_CARD\", //Defines the type of the voucher: DISCOUNT_VOUCHER, GIFT_VOUCHER, LOYALTY_CARD.\n    \"loyalty_card\": {\n        \"points\": 10000 // Point balance of the loyalty card.\n    },\n    \"metadata\": {}\n}"},"url":{"raw":"{{url}}/vouchers/:voucher-code","host":["{{url}}"],"path":["vouchers",":voucher-code"],"variable":[{"id":"63542195-c5e2-4245-ad33-8fcd5355143f","key":"voucher-code","value":"{{voucher_code}}","description":"A unique code that identifies the voucher."}]},"description":"Create discount voucher without code"},"response":[],"_postman_id":"765ba630-41df-40b9-8055-85e97014f862"}],"id":"37c94d3b-356f-47ab-9d3c-48d454f4ed87","description":"With Voucherify, you can create different types of vouchers. Depending on the voucher type, some request parameters may vary. This is why we have prepared several calls presenting the differences.","_postman_id":"37c94d3b-356f-47ab-9d3c-48d454f4ed87"},{"name":"List Vouchers","event":[{"listen":"test","script":{"id":"488e413c-d697-4d43-9d2b-1a93aaab6d62","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","_.forEach(_.get(jsonData, \"vouchers\", []), function(voucher) { ","    tests[`Category is for voucher: ${voucher.code} is postman`] = voucher.category === pm.environment.get(\"test-category\");","});","tests[\"Number of vouchers is equal 2\"] = _.get(jsonData, \"total\") === 2; "],"type":"text/javascript","packages":{}}}],"id":"0ee80a6b-8fa8-4db1-a0f4-bbca39d9b90a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":""},"url":{"raw":"{{url}}/vouchers?limit=50&category={{category}}&campaign_id={{campaign_id}}","host":["{{url}}"],"path":["vouchers"],"query":[{"key":"limit","value":"50","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100 items."},{"key":"page","value":"{{page}}","description":"Which page of results to return.","disabled":true},{"key":"category","value":"{{category}}","description":"Limit search results to vouchers within the specified category."},{"key":"campaign_id","value":"{{campaign_id}}","description":"Limit search results to vouchers within the specified campaign."},{"key":"customer","value":"{{customer_id or customer_source_id}}","description":"A tracking identifier of a customer who is the holder of the vouchers. It can be an id generated by Voucherify or the source_id. Remember to use the proper URL escape codes if the source_id contains special characters.","disabled":true},{"key":"[created_at][after]","value":"2024-02-05T10%3A13%3A06.487Z","description":"Timestamp representing the date and time after the voucher was created in ISO 8601 format. The value has to be passed in the UTF-8 encoding standard.","disabled":true},{"key":"[created_at][before]","value":"2024-02-19T10%3A13%3A06.487Z","description":"Timestamp representing the date and time before the voucher was created in ISO 8601 format. The value has to be passed in the UTF-8 encoding standard.","disabled":true},{"key":"[updated_at][after]","value":"2024-02-07T10%3A13%3A06.487Z","description":"Timestamp representing the date and time after the voucher was updated in ISO 8601 format. The value has to be passed in the UTF-8 encoding standard.","disabled":true},{"key":"[updated_at][before]","value":"2024-02-08T10%3A13%3A06.487Z","description":"Timestamp representing the date and time before the voucher was updated in ISO 8601 format. The value has to be passed in the UTF-8 encoding standard.","disabled":true},{"key":"order","value":"created_at","description":"Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.","disabled":true},{"key":"filters[junction]","value":"AND","description":"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.","type":"text","disabled":true}]},"description":"The junction parameter can be used to define and organize time frames for returning results, for example:  \n  \n`JUNCTION=AND&[created_at][before]=2025-01-01T10:30:06.487Z&[created_at][after]=2024-12-10T10:30:06.487Z`"},"response":[],"_postman_id":"0ee80a6b-8fa8-4db1-a0f4-bbca39d9b90a"},{"name":"Get Voucher","event":[{"listen":"test","script":{"id":"e23b634c-103e-4fe3-9a08-2a9a5f292e9c","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;",""],"type":"text/javascript"}}],"id":"d6ad04cc-8880-45c8-9a08-36bb1f12b06e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/vouchers/:voucher-code","host":["{{url}}"],"path":["vouchers",":voucher-code"],"variable":[{"id":"393408db-d4c5-468a-97ef-5fcab0270221","key":"voucher-code","value":"{{voucher_code}}","description":"A unique code that identifies the voucher."}]}},"response":[],"_postman_id":"d6ad04cc-8880-45c8-9a08-36bb1f12b06e"},{"name":"Generate Random Code","event":[{"listen":"test","script":{"id":"0f0a9ea8-1939-462f-9e4d-124ee23eb420","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Type is DISCOUNT VOUCHER\"] = jsonData.type === \"DISCOUNT_VOUCHER\";","tests[\"Code is not empty\"] = _.isEmpty(jsonData.code) !== true;","","pm.environment.set(\"voucher-code\", jsonData.code);"],"type":"text/javascript"}}],"id":"40614e61-f425-4779-87d7-f69b6b254944","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"campaign\": \"{{campaign name}}\", // Identifies the voucher's parent campaign using a unique campaign name. Required for LOYALTY_CARD type.\n    \"type\": \"DISCOUNT_VOUCHER\", //Defines the type of the voucher: DISCOUNT_VOUCHER, GIFT_VOUCHER, LOYALTY_CARD.\n    \"discount\": {\n        \"amount_off\": \"2000\", // 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. In case of the amount being calculated by the formula, i.e. the amount_off_formula parameter is present in the amount 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 amount off.\n        \"type\": \"AMOUNT\" // Applies an amount discount.\n    },\n    \"redemption\": {\n        \"quantity\": \"1\" // How many times a voucher can be redeemed. A null value means unlimited.\n    },\n    \"metadata\": {}\n}"},"url":"{{url}}/vouchers","description":"Create discount voucher without code"},"response":[],"_postman_id":"40614e61-f425-4779-87d7-f69b6b254944"},{"name":"Update Voucher","event":[{"listen":"test","script":{"id":"eb740622-4a19-4901-89c3-77d9afaac5a4","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Metadata got updated\"] = jsonData.metadata.special_offer === JSON.parse(request.data).metadata.special_offer;","tests[\"Updated date is correct and done in less than 1 sec\"] = Math.abs(Date.create(jsonData.updated_at) - Date.create(pm.environment.get(\"start-date\"))) < 1000;"],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"8c43eef8-fc53-46df-8e42-00e7daec5ed3","exec":["pm.environment.set(\"start-date\", new Date().toISOString());",""],"type":"text/javascript"}}],"id":"5ea6c3f5-37a4-4e2d-9022-0fada1cbff1d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"metadata\": {\n        \"special_offer\": \"true\" // 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.\n    }\n}"},"url":{"raw":"{{url}}/vouchers/:voucher-code","host":["{{url}}"],"path":["vouchers",":voucher-code"],"variable":[{"id":"f8020b4c-088e-449f-aad9-f708a61cad74","key":"voucher-code","value":"{{voucher_code}}","description":"A unique code that identifies the voucher."}]},"description":"Update voucher metadata"},"response":[],"_postman_id":"5ea6c3f5-37a4-4e2d-9022-0fada1cbff1d"},{"name":"Delete Voucher","event":[{"listen":"test","script":{"id":"08ea33e0-0aa6-4962-99c1-e2819c4a5665","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;",""],"type":"text/javascript","packages":{}}}],"id":"e6d1335d-4087-4822-bfe1-dcc354220b9e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":""},"url":{"raw":"{{url}}/vouchers/:voucher-code?force=true","host":["{{url}}"],"path":["vouchers",":voucher-code"],"query":[{"key":"force","value":"true","description":"If this flag is set to true, the voucher will be removed permanently. Going forward, the user will be able to create another voucher with exactly the same code."}],"variable":[{"key":"voucher-code","value":"{{voucher_code}}","description":"A unique code that identifies the voucher."}]}},"response":[],"_postman_id":"e6d1335d-4087-4822-bfe1-dcc354220b9e"},{"name":"Enable Voucher","event":[{"listen":"test","script":{"id":"0622d97f-8e84-4504-826a-907a411b2e38","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Voucher is enabled\"] = jsonData.active;",""],"type":"text/javascript"}}],"id":"154d7425-85f0-4bbc-be9a-b0e592ce527e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/vouchers/:voucher-code/enable","host":["{{url}}"],"path":["vouchers",":voucher-code","enable"],"variable":[{"id":"b9f8ef67-e905-4d08-9112-9455988ff68d","key":"voucher-code","value":"{{voucher_code or voucher_id}}","description":"A code that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u."}]}},"response":[],"_postman_id":"154d7425-85f0-4bbc-be9a-b0e592ce527e"},{"name":"Disable Voucher","event":[{"listen":"test","script":{"id":"5e3af3f7-586d-4ba4-8cec-190f783b108c","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Voucher is disabled\"] = !jsonData.active;",""],"type":"text/javascript"}}],"id":"b7421761-d633-4402-b51c-47aaf24bb4e8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/vouchers/:voucher-code/disable","host":["{{url}}"],"path":["vouchers",":voucher-code","disable"],"variable":[{"id":"ddce6e3b-885a-4904-9aff-1c3f80e8d10d","key":"voucher-code","value":"{{voucher_code or voucher_id}}","description":"A code that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u."}]}},"response":[],"_postman_id":"b7421761-d633-4402-b51c-47aaf24bb4e8"},{"name":"Add or Remove Voucher Balance","event":[{"listen":"test","script":{"id":"1677a3c2-d143-45ae-9e1d-8cf3bed3ed86","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Resource is balance\"] = jsonData.object === \"balance\";","tests[\"Type is gift_voucher\"] = jsonData.type === \"gift_voucher\";","",""],"type":"text/javascript"}}],"id":"7a04acfa-56bd-4f48-a00f-2633b2b9e1c0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"amount\": -10 // The incremental amount to be added to or removed from the current balance on the gift card or loyalty card. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. To remove balance, simply add a minus sign before the value, i.e. to remove $20, use -2000.\n}"},"url":{"raw":"{{url}}/vouchers/:voucher-code/balance","host":["{{url}}"],"path":["vouchers",":voucher-code","balance"],"variable":[{"id":"ce0e0e94-45dd-4b1e-8744-f7d6604d0f4d","key":"voucher-code","value":"{{voucher_code or voucher_id}}","description":"A code that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u."}]},"description":"Create gift voucher with a given code"},"response":[],"_postman_id":"7a04acfa-56bd-4f48-a00f-2633b2b9e1c0"},{"name":"List Voucher Transactions","id":"7bf682bb-7a79-4bca-92ec-d79c575b65ca","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/vouchers/:voucher-code/transactions?limit=100&order={{id}}&starting_after_id={{id}}","host":["{{url}}"],"path":["vouchers",":voucher-code","transactions"],"query":[{"key":"limit","value":"100","description":"Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items."},{"key":"order","value":"{{id}}","description":"Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order."},{"key":"starting_after_id","value":"{{id}}","description":"A cursor for pagination. It retrieves the transactions starting after a transaction with the given ID."}],"variable":[{"key":"voucher-code","value":"{{voucher_code or voucher_id}}","description":"A code that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u."}]}},"response":[],"_postman_id":"7bf682bb-7a79-4bca-92ec-d79c575b65ca"},{"name":"Export Voucher Transactions","id":"b7494739-9895-4249-a2a5-5059ce70af56","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"parameters\": {\n        \"order\": \"-created_at\",\n        \"fields\": [\n            \"id\",\n            \"type\",\n            \"source_id\",\n            \"reason\",\n            \"balance\",\n            \"amount\",\n            \"created_at\",\n            \"voucher_id\",\n            \"campaign_id\",\n            \"details\",\n            \"source\"\n        ]\n    }\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"{{url}}/vouchers/:voucher-code//transactions/export","host":["{{url}}"],"path":["vouchers",":voucher-code","","transactions","export"],"variable":[{"id":"38076205-5ff5-4fae-a3e9-738f2b9aefc8","key":"voucher-code","value":"{{voucher_code or voucher_id}}","description":"A code that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u."}]}},"response":[],"_postman_id":"b7494739-9895-4249-a2a5-5059ce70af56"},{"name":"Import Vouchers","event":[{"listen":"test","script":{"id":"d17a740b-1edd-4fdd-babe-078b7fb46087","exec":["tests[\"Status code is 202\"] = responseCode.code === 202;","",""],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"ec83d709-2e86-404e-afb9-4c0044342a15","exec":["pm.environment.set(\"import-voucher-code\", \"import-voucher-\" + Number.random(1, 100000));",""],"type":"text/javascript"}}],"id":"db2c1133-a63b-46cd-866f-e760c979754f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"[\n    {\n        \"code\": \"{{voucher_code}}\",\n        \"category\": \"postman-import\", // Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint.\n        \"type\": \"DISCOUNT_VOUCHER\",\n        \"discount\": {\n            \"amount_off\": 3000,\n            \"type\": \"AMOUNT\"\n        },\n        \"start_date\": \"2023-12-01T23:00:00Z\",\n        \"expiration_date\": \"2024-12-19T23:00:00Z\",\n        \"redemption\": {\n            \"quantity\": 1\n        },\n        \"metadata\": {\n            \"unit\": \"EUR\"\n        },\n        \"additional_info\": \"secret-code1\"\n    },\n    {\n        \"code\": \"{{voucher_code}}\",\n        \"type\": \"DISCOUNT_VOUCHER\",\n        \"category\": \"postman-import\",\n        \"discount\": {\n            \"percent_off\": 30,\n            \"type\": \"PERCENT\"\n        },\n        \"start_date\": \"2023-12-10T23:00:00Z\",\n        \"expiration_date\": \"2024-12-31T23:00:00Z\",\n        \"redemption\": {\n            \"quantity\": 1\n        },\n        \"metadata\": {\n            \"unit\": \"EUR\"\n        },\n        \"additional_info\": \"secret-code2\"\n    }\n]"},"url":"{{url}}/vouchers/import"},"response":[],"_postman_id":"db2c1133-a63b-46cd-866f-e760c979754f"},{"name":"Import Vouchers Using CSV","event":[{"listen":"test","script":{"id":"540a05d6-e326-46f8-a8f9-27dc23d71a0e","exec":["tests[\"Status code is 400\"] = responseCode.code === 400;","",""],"type":"text/javascript","packages":{}}}],"id":"f931c1ae-f9a9-4861-b75d-15fb24e88ec8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"}],"body":{"mode":"formdata","formdata":[{"key":"file","type":"file","value":null},{"key":"webhooks_enable","value":"true","description":"Triggers a webhook sendout for new and updated vouchers if the voucher created and voucher updated webhooks are configured in Project settings.","type":"text","uuid":"c3ff1e00-e462-4756-8e7e-67b2ad007faf","disabled":true}]},"url":"{{url}}/vouchers/importCSV"},"response":[],"_postman_id":"f931c1ae-f9a9-4861-b75d-15fb24e88ec8"},{"name":"Update Vouchers in Bulk","event":[{"listen":"test","script":{"id":"2be0dd55-2bb6-41d5-be77-55282afa0cbf","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Voucher is enabled\"] = jsonData.active;",""],"type":"text/javascript","packages":{}}}],"id":"239a3f8f-7f45-4c3e-8d96-8508fd3f5ad5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"[\n    {\n        \"code\": \"{{voucher_code}}\",\n        \"metadata\": { // 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.\n            \"lang\": \"en\",\n            \"test\": true\n        }\n    },\n    {\n        \"code\": \"{{voucher_code}}\",\n        \"metadata\": {\n            \"key\": \"No change\"\n        }\n    },\n    {\n        \"code\": \"{{voucher_code}}\",\n        \"metadata\": {\n            \"key\": \"New Voucher\"\n        }\n    }\n]"},"url":"{{url}}/vouchers/bulk/async"},"response":[],"_postman_id":"239a3f8f-7f45-4c3e-8d96-8508fd3f5ad5"},{"name":"Update Vouchers' Metadata in Bulk","event":[{"listen":"test","script":{"id":"8b2b2c70-5328-4878-9605-dfc97adedfbb","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Voucher is enabled\"] = jsonData.active;",""],"type":"text/javascript","packages":{}}}],"id":"42cd57df-df1e-4086-8728-eb4113e4bcf0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"codes\": [\n        \"{{voucher_code}}\",\n        \"{{voucher_code}}\"\n    ],\n    \"metadata\": {\n        \"lang\": \"en\",\n        \"authorized_internally\": true\n    }\n}"},"url":"{{url}}/vouchers/metadata/async"},"response":[],"_postman_id":"42cd57df-df1e-4086-8728-eb4113e4bcf0"},{"name":"Release Validation Session","event":[{"listen":"test","script":{"id":"ed332f9a-67e9-4b9c-ad53-1c05914df430","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;",""],"type":"text/javascript"}}],"id":"01809cac-ea02-4d27-a5be-8e82baa95d75","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"customer\": {\n        \"source_id\": \"{{customer_source_id}}\"\n    },\n    \"order\": {\n        \"id\": \"{{order_id}}\"\n    }\n}"},"url":{"raw":"{{url}}/vouchers/:voucher-code/sessions/:session-key","host":["{{url}}"],"path":["vouchers",":voucher-code","sessions",":session-key"],"variable":[{"id":"3622c679-8f5d-4216-80a4-2c3ae9d80ab8","key":"voucher-code","value":"{{voucher_code or voucher_id}}","description":"A code that identifies the voucher or a unique voucher ID assigned by Voucherify."},{"id":"dc4bd8c6-d162-418e-b04f-aab23c46ccf7","key":"session-key","value":"{{validation_session_id}}","description":"A unique session identifier."}]}},"response":[],"_postman_id":"01809cac-ea02-4d27-a5be-8e82baa95d75"}],"id":"dee82730-459d-4ec3-afab-231f3ad578b4","description":"This section allows you to perform various operations on [ vouchers](https://docs.voucherify.io/reference/voucher-object) (promo code, referral code, loyalty card code, gift voucher), such as creation, deletion, import, export, and more.","_postman_id":"dee82730-459d-4ec3-afab-231f3ad578b4"},{"name":"Campaigns","item":[{"name":"Create Campaign","item":[{"name":"Create Campaign (unique discount coupons)","event":[{"listen":"test","script":{"id":"33fd83e3-e173-4cb7-962b-29c96450f733","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Type is DISCOUNT VOUCHER\"] = jsonData.voucher.type === \"DISCOUNT_VOUCHER\";"],"type":"text/javascript","packages":{}}},{"listen":"prerequest","script":{"id":"85522c03-0ed8-4650-b6e3-f46e92b5f4a8","exec":["pm.environment.set(\"campaign-name\", \"Postman Test Campaign - \" + Number.random(1, 100000));",""],"type":"text/javascript","packages":{}}}],"id":"c87865af-b2eb-4783-8e44-458f4f88bc33","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"{{campaign_name}}\", // Campaign name.\n    \"campaign_type\": \"DISCOUNT_COUPONS\", // Type of campaign.\n    \"join_once\": true, // If this value is set to true, customers will be able to join the campaign only once.\n    \"type\": \"AUTO_UPDATE\", // Defines whether the campaign can be updated with new vouchers after campaign creation. AUTO_UPDATE: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method).STATIC: vouchers need to be manually published.\n    \"vouchers_count\": 3, // Total number of unique vouchers in campaign (size of campaign).\n    \"voucher\": {\n        \"type\": \"DISCOUNT_VOUCHER\", // Type of voucher.\n        \"discount\": {\n            \"percent_off\": 10, // The percent discount that the customer will receive.\n            \"type\": \"PERCENT\" // Defines the type of the voucher.\n        },\n        \"redemption\": {\n            \"quantity\": 10 // How many times a voucher can be redeemed. A null value means unlimited.\n        },\n        \"code_config\": { //Schema containing information about config used for voucher. Defines code's pattern (prefix, suffix, length, charset, etc).\n            \"pattern\": \"{{code_pattern}}\" // A pattern for codes where hashes (#) will be replaced with random characters. Overrides length.\n        }\n    },\n    \"validity_timeframe\": { // Set recurrent time periods when the campaign is valid. For example, valid for 1 hour every other day.start_date required when including the validity_timeframe.\n        \"interval\": \"P2D\", // 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.\n        \"duration\": \"P1D\" // 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.\n    },\n    \"validity_day_of_week\": [ // Integer array corresponding to the particular days of the week in which the campaign is valid. Sunday - 0, Monday - 1, Tuesday - 2, Wednesday - 3, Thursday - 4, Friday - 5, Saturday - 6.\n        0,\n        1,\n        2\n    ],\n    \"activity_duration_after_publishing\": \"P24D\", // Defines the amount of time the campaign will be active in ISO 8601 format after publishing. For example, a campaign with a duration of P24D will be valid for a duration of 24 days.\n    \"use_voucher_metadata_schema\": false, // Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema.\n    \"metadata\": { // 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.\n        \"region\": \"EU\"\n    }\n}"},"url":"{{url}}/campaigns","description":"Create campaign with one voucher without redemption limit"},"response":[],"_postman_id":"c87865af-b2eb-4783-8e44-458f4f88bc33"},{"name":"Create Campaign (gift cards)","event":[{"listen":"test","script":{"id":"33fd83e3-e173-4cb7-962b-29c96450f733","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Type is DISCOUNT VOUCHER\"] = jsonData.voucher.type === \"DISCOUNT_VOUCHER\";"],"type":"text/javascript","packages":{}}},{"listen":"prerequest","script":{"id":"85522c03-0ed8-4650-b6e3-f46e92b5f4a8","exec":["pm.environment.set(\"campaign-name\", \"Postman Test Campaign - \" + Number.random(1, 100000));",""],"type":"text/javascript","packages":{}}}],"id":"1dfd1eb4-0524-4e0e-92be-867d88a8865b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"{{campaign_name}}\", // Campaign name.\n    \"campaign_type\": \"GIFT_VOUCHERS\", // Type of campaign.\n    \"join_once\": true, // If this value is set to true, customers will be able to join the campaign only once.\n    \"type\": \"AUTO_UPDATE\", // Defines whether the campaign can be updated with new vouchers after campaign creation. AUTO_UPDATE: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method).STATIC: vouchers need to be manually published.\n    \"vouchers_count\": 3, // Total number of unique vouchers in campaign (size of campaign).\n    \"voucher\": {\n        \"type\": \"GIFT_VOUCHER\", // Type of voucher.\n        \"gift\": {\n            \"amount\": 1000,\n            \"effect\": \"APPLY_TO_ORDER\"\n        },\n        \"redemption\": {\n            \"quantity\": null // How many times a voucher can be redeemed. A null value means unlimited.\n        },\n        \"code_config\": { //Schema containing information about config used for voucher. Defines code's pattern (prefix, suffix, length, charset, etc).\n            \"pattern\": \"{{code_pattern}}\" // A pattern for codes where hashes (#) will be replaced with random characters. Overrides length.\n        }\n    },\n    \"validity_timeframe\": { // Set recurrent time periods when the campaign is valid. For example, valid for 1 hour every other day.start_date required when including the validity_timeframe.\n        \"interval\": \"P2D\", // 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.\n        \"duration\": \"P1D\" // 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.\n    },\n    \"validity_day_of_week\": [ // Integer array corresponding to the particular days of the week in which the campaign is valid. Sunday - 0, Monday - 1, Tuesday - 2, Wednesday - 3, Thursday - 4, Friday - 5, Saturday - 6.\n        0,\n        1,\n        2\n    ],\n    \"activity_duration_after_publishing\": \"P24D\", // Defines the amount of time the campaign will be active in ISO 8601 format after publishing. For example, a campaign with a duration of P24D will be valid for a duration of 24 days.\n    \"use_voucher_metadata_schema\": false, // Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema.\n    \"metadata\": { // 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.\n        \"region\": \"AMER\"\n    }\n}"},"url":"{{url}}/campaigns","description":"Create campaign with one voucher without redemption limit"},"response":[],"_postman_id":"1dfd1eb4-0524-4e0e-92be-867d88a8865b"},{"name":"Create Campaign (loyalty)","event":[{"listen":"test","script":{"id":"33fd83e3-e173-4cb7-962b-29c96450f733","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Type is DISCOUNT VOUCHER\"] = jsonData.voucher.type === \"DISCOUNT_VOUCHER\";"],"type":"text/javascript","packages":{}}},{"listen":"prerequest","script":{"id":"85522c03-0ed8-4650-b6e3-f46e92b5f4a8","exec":["pm.environment.set(\"campaign-name\", \"Postman Test Campaign - \" + Number.random(1, 100000));",""],"type":"text/javascript","packages":{}}}],"id":"e56de0f3-cb6e-414c-bd3a-4fad45da1a45","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"{{campaign_name}}\", // Campaign name.\n    \"campaign_type\": \"LOYALTY_PROGRAM\", // Type of campaign.\n    \"join_once\": true, // If this value is set to true, customers will be able to join the campaign only once.\n    \"type\": \"AUTO_UPDATE\", // Defines whether the campaign can be updated with new vouchers after campaign creation. AUTO_UPDATE: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method).STATIC: vouchers need to be manually published.\n    \"vouchers_count\": 3, // Total number of unique vouchers in campaign (size of campaign).\n    \"voucher\": {\n        \"type\": \"LOYALTY_CARD\", // Type of voucher.\n        \"loyalty_card\": {\n            \"points\": 0,\n            \"expiration_rules\": {\n                \"period_type\": \"MONTH\",\n                \"period_value\": 3,\n                \"rounding_type\": \"END_OF_YEAR\"\n            },\n            \"redemption\": {\n                \"quantity\": null // How many times a voucher can be redeemed. A null value means unlimited.\n            }\n        },\n        \"use_voucher_metadata_schema\": false, // Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema.\n        \"metadata\": { // 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.\n            \"region\": \"APAC\"\n        }\n    }\n}"},"url":"{{url}}/campaigns","description":"Create campaign with one voucher without redemption limit"},"response":[],"_postman_id":"e56de0f3-cb6e-414c-bd3a-4fad45da1a45"},{"name":"Create Campaign (promotion)","event":[{"listen":"test","script":{"id":"33fd83e3-e173-4cb7-962b-29c96450f733","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Type is DISCOUNT VOUCHER\"] = jsonData.voucher.type === \"DISCOUNT_VOUCHER\";"],"type":"text/javascript","packages":{}}},{"listen":"prerequest","script":{"id":"85522c03-0ed8-4650-b6e3-f46e92b5f4a8","exec":["pm.environment.set(\"campaign-name\", \"Postman Test Campaign - \" + Number.random(1, 100000));",""],"type":"text/javascript","packages":{}}}],"id":"7c12d2a1-2458-4360-99d2-d317c8d8310c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"{{campaign_name}}\", // Campaign name.\n    \"campaign_type\": \"PROMOTION\", // Type of campaign.\n    \"join_once\": true, // If this value is set to true, customers will be able to join the campaign only once.\n    \"type\": \"AUTO_UPDATE\", // Defines whether the campaign can be updated with new vouchers after campaign creation. AUTO_UPDATE: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method).STATIC: vouchers need to be manually published.\n    \"promotion\": {\n        \"tiers\": [\n            {\n                \"name\": \"Percent Discount\",\n                \"banner\": \"Get 15% off\",\n                \"action\": {\n                    \"discount\": {\n                        \"type\": \"PERCENT\",\n                        \"percent_off\": 15,\n                        \"effect\": \"APPLY_TO_ORDER\"\n                    }\n                }\n            }\n        ]\n    }\n}"},"url":"{{url}}/campaigns","description":"Create campaign with one voucher without redemption limit"},"response":[],"_postman_id":"7c12d2a1-2458-4360-99d2-d317c8d8310c"},{"name":"Create Campaign (referral)","event":[{"listen":"test","script":{"id":"33fd83e3-e173-4cb7-962b-29c96450f733","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Type is DISCOUNT VOUCHER\"] = jsonData.voucher.type === \"DISCOUNT_VOUCHER\";"],"type":"text/javascript","packages":{}}},{"listen":"prerequest","script":{"id":"85522c03-0ed8-4650-b6e3-f46e92b5f4a8","exec":["pm.environment.set(\"campaign-name\", \"Postman Test Campaign - \" + Number.random(1, 100000));",""],"type":"text/javascript","packages":{}}}],"id":"943f841f-a177-4726-818d-f17cc9cf85aa","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"{{campaign_name}}\", // Campaign name.\n    \"campaign_type\": \"REFERRAL_PROGRAM\", // Type of campaign.\n    \"join_once\": true, // If this value is set to true, customers will be able to join the campaign only once.\n    \"type\": \"AUTO_UPDATE\", // Defines whether the campaign can be updated with new vouchers after campaign creation. AUTO_UPDATE: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method).STATIC: vouchers need to be manually published.\n    \"vouchers_count\": 3, // Total number of unique vouchers in campaign (size of campaign).\n    \"referral_program\": {\n        \"conversion_event_type\": \"redemption\" // Define how a referral is triggered.\n    },\n    \"voucher\": {\n        \"type\": \"DISCOUNT_VOUCHER\", // Type of voucher.\n        \"discount\": {\n            \"percent_off\": 20, // The percent discount that the customer will receive.\n            \"type\": \"PERCENT\", // Defines the type of the voucher.\n            \"effect\": \"APPLY_TO_ORDER\",\n            \"amount_limit\": 15\n        },\n        \"redemption\": {\n            \"quantity\": 1 // How many times a voucher can be redeemed. A null value means unlimited.\n        },\n        \"code_config\": { //Schema containing information about config used for voucher. Defines code's pattern (prefix, suffix, length, charset, etc).\n            \"pattern\": \"{{code_pattern}}\" // A pattern for codes where hashes (#) will be replaced with random characters. Overrides length.\n        },\n        \"is_referral_code\": true // Flag indicating whether this voucher is a referral code; true for campaign type REFERRAL_PROGRAM.\n    }\n}"},"url":"{{url}}/campaigns","description":"Create campaign with one voucher without redemption limit"},"response":[],"_postman_id":"943f841f-a177-4726-818d-f17cc9cf85aa"}],"id":"77d1f730-de8a-4006-9127-d65d3b29295e","description":"With Voucherify, you can create different types of campaigns. Depending on the campaign type, some request parameters may vary. This is why we have prepared several calls presenting the differences.","_postman_id":"77d1f730-de8a-4006-9127-d65d3b29295e"},{"name":"List Campaigns","event":[{"listen":"test","script":{"id":"b7b41a0d-2377-4050-a2fc-cecea3d85285","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;",""],"type":"text/javascript","packages":{}}}],"id":"c17b54a3-5037-4f4f-83da-0fb58aa883f3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/campaigns?limit=5&campaign_type=PROMOTION&expand=category","host":["{{url}}"],"path":["campaigns"],"query":[{"key":"limit","value":"5","description":"Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items."},{"key":"campaign_type","value":"PROMOTION","description":"This attribute allows filtering by campaign type. Accepted values: PROMOTION, GIFT_VOUCHERS, REFERRAL_PROGRAM, DISCOUNT_COUPONS, LOYALTY_PROGRAM."},{"key":"expand","value":"category","description":"Include an expanded categories object in the response."},{"key":"page","value":"1","description":"Which page of results to return. The lowest value is 1.","disabled":true},{"key":"filters[is_referral_code][conditions][$is]","value":"TRUE","description":"Filters the results by whether the campaign is a referral campaign.","type":"text","disabled":true},{"key":"filters[campaign_status][conditions][$in][0]","value":"DONE","description":"Filters the results by campaign status.","type":"text","disabled":true},{"key":"filters[voucher_type][conditions][$in][0]","value":"GIFT_VOUCHER","description":"Data filters used to narrow down the data records to be returned in the result.","type":"text","disabled":true},{"key":"filters[voucher_type][conditions][$in][1]","value":"DISCOUNT_VOUCHER","description":"Data filters used to narrow down the data records to be returned in the result.","type":"text","disabled":true},{"key":"filters[junction]","value":"AND","description":"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.","type":"text","disabled":true},{"key":"filters[type][conditions][$in][0]","value":"BULK","description":"The Campaign Type filter lets you choose between STANDALONE (generic codes campaigns) and BULK (unique codes campaigns), STATIC, and AUTO_UPDATE.","type":"text","disabled":true},{"key":"access_settings[filter][areas_ids][0]","value":"{{area_id}}","description":"Add area IDs to list all campaigns that are assigned to those areas. Areas and Stores is an enterprise feature.","type":"text","disabled":true},{"key":"access_settings[filter][area_all_stores_ids][0]","value":"{{area_id}}","description":"Add area IDs to list all campaigns that are assigned to all stores in those areas. Areas and Stores is an enterprise feature.","type":"text","disabled":true},{"key":"access_settings[filter][area_stores_ids][0]","value":"{{area_id}}","description":"Add store IDs to list all campaigns that are assigned to those stores. The response returns also those campaigns that are assigned to those stores with the assignment to all stores. Areas and Stores is an enterprise feature.","type":"text","disabled":true}]}},"response":[],"_postman_id":"c17b54a3-5037-4f4f-83da-0fb58aa883f3"},{"name":"Get Campaign","event":[{"listen":"test","script":{"id":"f049c650-19ba-45a3-8506-20b6158d2be4","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Type is GIFT VOUCHER\"] = jsonData.voucher.type === \"GIFT_VOUCHER\";","tests[\"Description is updated\"] = jsonData.description === \"update-test\";","tests[\"Redemption quqntity is 13 (10 initially created + 1 imported + 2 created later)\"] = jsonData.voucher.redemption.quantity === 1;"],"type":"text/javascript"}}],"id":"41727590-1172-4381-b10c-968087baf5a7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/campaigns/:campaign-name-or-id","host":["{{url}}"],"path":["campaigns",":campaign-name-or-id"],"variable":[{"id":"e67ec2ae-b995-4403-9427-5c9df3a9a713","key":"campaign-name-or-id","value":"{{campaign_name or campaign_id}}","description":"You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value."}]}},"response":[],"_postman_id":"41727590-1172-4381-b10c-968087baf5a7"},{"name":"Update Campaign","event":[{"listen":"test","script":{"id":"3c72b36d-34c6-4d3a-9e45-b266db6664b5","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Type is GIFT VOUCHER\"] = jsonData.voucher.type === \"GIFT_VOUCHER\";","tests[\"Redemption quqntity is 13 (10 initially created + 1 imported + 2 created later)\"] = jsonData.voucher.redemption.quantity === 1;"],"type":"text/javascript"}}],"id":"2f0bd39c-fe4f-42cf-a213-45856a19fdcb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"description\": \"update-test\", // An optional field to keep any extra textual information about the campaign such as a campaign description and details.\n    \"validity_day_of_week\": [ //Integer array corresponding to the particular days of the week in which the campaign is valid. Sunday - 0, Monday - 1, Tuesday - 2, Wednesday - 3, Thursday - 4, Friday - 5, Saturday - 6.\n        4\n    ]\n}"},"url":{"raw":"{{url}}/campaigns/:campaign-name-or-id","host":["{{url}}"],"path":["campaigns",":campaign-name-or-id"],"variable":[{"id":"71aa8d8a-13ff-4f19-bed5-ee0bef1405b9","key":"campaign-name-or-id","value":"{{campaign_name or campaign_id}}","description":"You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value."}]}},"response":[],"_postman_id":"2f0bd39c-fe4f-42cf-a213-45856a19fdcb"},{"name":"Delete Campaign","event":[{"listen":"test","script":{"id":"37dc62fe-ee00-439e-b542-c7229127d06c","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;",""],"type":"text/javascript"}}],"id":"e088ccc4-99fd-4077-bb8b-48b4f7a873ba","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":""},"url":{"raw":"{{url}}/campaigns/:campaign-name-or-id?force={{true or false}}","host":["{{url}}"],"path":["campaigns",":campaign-name-or-id"],"query":[{"key":"force","value":"{{true or false}}","description":"If this flag is set to true, the campaign and related vouchers will be removed permanently. Going forward, the user will be able to create the next campaign with exactly the same name."}],"variable":[{"id":"c404f6cb-7bc6-4931-aa29-90af7e79279f","key":"campaign-name-or-id","value":"{{campaign_name or campaign_id}}","description":"You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value."}]}},"response":[],"_postman_id":"e088ccc4-99fd-4077-bb8b-48b4f7a873ba"},{"name":"List Campaign Transactions","event":[{"listen":"test","script":{"id":"b7b41a0d-2377-4050-a2fc-cecea3d85285","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;",""],"type":"text/javascript","packages":{}}}],"id":"35dee38c-7a7f-43ab-865e-63b6f1e4a26d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/campaigns/:campaignId/transactions","host":["{{url}}"],"path":["campaigns",":campaignId","transactions"],"query":[{"key":"limit","value":"100","description":"Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.","disabled":true},{"key":"order","value":"","description":"Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.","disabled":true},{"key":"starting_after_id","value":"","description":"A cursor for pagination. It retrieves the transactions starting after a transaction with the given ID.","disabled":true},{"key":"filters[voucher_id][conditions][$is]","value":"XYZ","description":"Data filters used to narrow down the data records to be returned in the result.","disabled":true},{"key":"filters[junction]","value":"AND","description":"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.","disabled":true}],"variable":[{"key":"campaignId","value":"{{campaign_id}}","description":"You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value."}]}},"response":[],"_postman_id":"35dee38c-7a7f-43ab-865e-63b6f1e4a26d"},{"name":"Export Campaign Transactions","event":[{"listen":"test","script":{"id":"bd8f1869-0b8f-48b8-977c-6bc6f9d03b48","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Type is GIFT VOUCHER\"] = jsonData.type === \"GIFT_VOUCHER\";",""],"type":"text/javascript","packages":{}}},{"listen":"prerequest","script":{"id":"1b1839e5-a12b-473b-b36f-f3c795a6e59e","exec":["pm.environment.set(\"voucher-code\", \"voucher-\" + Number.random(1, 100000));",""],"type":"text/javascript","packages":{}}}],"id":"c0b72d7e-1b73-459e-83e1-92f65f6a31c1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"parameters\": { // List of available parameters containing fields and filters that can be exported for transactions in a gift card or loyalty card campaign, along with the sorting order of the returned data.\n        \"filters\": { // Data filters and their conditions to narrow down the returned data.\n            \"created_at\": { // Data filters used to narrow down the data records to be returned in the result.\n                \"conditions\": {\n                    \"$after\": [ // Value is after this date. The value for this parameter is shown in the ISO 8601 format.\n                        \"2024-10-01T00:00:00.000Z\"\n                    ]\n                }\n            }\n        },\n        \"fields\": [ // Data fields that will be exported for the transactions that are associated with balance movements on cards in a campaign.\n            \"id\", // Unique transaction ID.\t\n            \"type\", // Transaction type.\n            \"source_id\", // Unique transaction source ID.\n            \"reason\", // Contains the reason for the transaction if one was included originally.\n            \"balance\", // The gift card or loyalty card balance after the transaction.\n            \"amount\", // The amount of gift card or loyalty card credits being allocated during the transaction. This value can either be negative or positive depending on the nature of the transaction.\n            \"created_at\", // Timestamp in ISO 8601 format representing the date and time when the transaction was created.\n            \"voucher_id\", // Unique voucher ID.\n            \"source\", // Channel through which the transaction was initiated.\n            \"details\", // More detailed information stored in the form of JSON.\n            \"related_transaction_id\" // Unique transaction ID related to a receiver/donor card in the case of a points transfer from/to another card.\n        ]\n    },\n    \"order\": \"-created_at\" // How the export is ordered, where the dash - preceding a sorting option means sorting in a descending order.\n}"},"url":{"raw":"{{url}}/campaigns/:campaignId/transactions/export","host":["{{url}}"],"path":["campaigns",":campaignId","transactions","export"],"variable":[{"id":"b8cda120-fef5-4c24-b945-664b8957bcb5","key":"campaignId","value":"{{campaign_id}}","description":"You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value."}]}},"response":[],"_postman_id":"c0b72d7e-1b73-459e-83e1-92f65f6a31c1"},{"name":"Get Campaign Summary","event":[{"listen":"test","script":{"id":"b7b41a0d-2377-4050-a2fc-cecea3d85285","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;",""],"type":"text/javascript","packages":{}}}],"id":"d341f5c9-58e2-402c-87b9-324f8507779d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/campaigns/:campaignId/summary","host":["{{url}}"],"path":["campaigns",":campaignId","summary"],"query":[{"key":"start_date","value":"{{start_date}}","description":"Timestamp representing the date which results must begin on. Represented in ISO 8601 format.","type":"text","disabled":true},{"key":"end_date","value":"{{end_date}}","description":"Timestamp representing the date which results must end on. Represented in ISO 8601 format.","type":"text","disabled":true}],"variable":[{"key":"campaignId","value":"{{campaign_id}}","description":"You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value."}]}},"response":[],"_postman_id":"d341f5c9-58e2-402c-87b9-324f8507779d"},{"name":"Add Voucher to Campaign","event":[{"listen":"test","script":{"id":"bd8f1869-0b8f-48b8-977c-6bc6f9d03b48","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Type is GIFT VOUCHER\"] = jsonData.type === \"GIFT_VOUCHER\";",""],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"1b1839e5-a12b-473b-b36f-f3c795a6e59e","exec":["pm.environment.set(\"voucher-code\", \"voucher-\" + Number.random(1, 100000));",""],"type":"text/javascript"}}],"id":"d3eb9772-a50b-4a84-bb79-9fee0cdda8d8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"start_date\": \"2024-02-08T00:00:00Z\", // Activation timestamp defines when the voucher starts to be active in ISO 8601 format. Voucher is inactive before this date.\n    \"expiration_date\": \"2025-09-25T23:59:59Z\", // Expiration timestamp defines when the voucher expires in ISO 8601 format. Voucher is inactive after this date.\n    \"active\": false, // Flag value defining whether the voucher is active or not.\n    \"redemption\": {\n        \"quantity\": null // How many times a voucher can be redeemed. A null value means unlimited.\n    },\n    \"code_config\": {\n        \"charset\": \"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\", // 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.\n        \"length\": 8, // Number of characters in a generated code (excluding prefix and postfix).\n        \"prefix\": \"Add-\", // A text appended before the code.\n        \"pattern\": null, // A pattern for codes where hashes (#) will be replaced with random characters. Overrides length.\n        \"postfix\": \"-API\" // A text appended after the code.\n    },\n    \"additional_info\": \"Voucher added using API\",\n    \"metadata\": { // The metadata object stores all custom attributes assigned to the voucher. 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.\n        \"Season\": \"Fall\"\n    }\n}"},"url":{"raw":"{{url}}/campaigns/:campaign-name-or-id/vouchers?vouchers_count={{vouchers_count}}","host":["{{url}}"],"path":["campaigns",":campaign-name-or-id","vouchers"],"query":[{"key":"vouchers_count","value":"{{vouchers_count}}","description":"Number of vouchers that should be added."}],"variable":[{"id":"67ee2e5f-439d-4eb4-b481-6ccb7c35344b","key":"campaign-name-or-id","value":"{{campaign_name or campaign_id}}","description":"You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value."}]}},"response":[],"_postman_id":"d3eb9772-a50b-4a84-bb79-9fee0cdda8d8"},{"name":"Add Voucher with Specific Code to Campaign","event":[{"listen":"test","script":{"id":"75cb91a9-8c23-434f-8e45-25fc869e9341","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Type is GIFT VOUCHER\"] = jsonData.type === \"GIFT_VOUCHER\";","tests[\"Voucher code is correct\"] = jsonData.code === \"voucherify.io-\" + pm.environment.get(\"voucher-code\"); "],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"ce80718e-b766-4e29-a008-daf1ea9bf3fd","exec":["pm.environment.set(\"voucher-code\", \"voucher-\" + Number.random(1, 100000));",""],"type":"text/javascript"}}],"id":"6573ed45-9a8b-4136-bb42-dce6b234c563","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"category_id\": \"{{category_id}}\", // The category assigned to the campaign. Either pass this parameter OR the category_id.\n    \"start_date\": \"2024-02-14T00:00:00Z\", // Activation timestamp defines when the voucher starts to be active in ISO 8601 format. Voucher is inactive before this date.\n    \"expiration_date\": \"2024-02-15T23:59:59Z\", // Expiration timestamp defines when the voucher expires in ISO 8601 format. Voucher is inactive after this date.\n    \"active\": false, // Flag value defining whether the voucher is active or not.\n    \"redemption\": { // Stores the quantity of redemptions that can be applied to the voucher.\n        \"quantity\": null // How many times a voucher can be redeemed. A null value means unlimited.\n    },\n    \"additional_info\": \"Voucher added using API\", // An optional field to keep any extra textual information about the code such as a code description and details.\n    \"metadata\": { // The metadata object stores all custom attributes assigned to the voucher. 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.\n        \"Season\": \"Fall\"\n    }\n}"},"url":{"raw":"{{url}}/campaigns/:campaign-name-or-id/vouchers/:voucher-code","host":["{{url}}"],"path":["campaigns",":campaign-name-or-id","vouchers",":voucher-code"],"variable":[{"id":"d55c520c-766e-44cd-a159-81ab803b8a21","key":"campaign-name-or-id","value":"{{campaign_name or campaign_id}}","description":"The campaign ID or name of the campaign to which voucher will be added. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value."},{"id":"b979c0d6-dbb4-4ca1-8ee5-c1157834fb0d","key":"voucher-code","value":"{{voucher_code}}","description":"A custom code that identifies the voucher."}]}},"response":[],"_postman_id":"6573ed45-9a8b-4136-bb42-dce6b234c563"},{"name":"Import Vouchers to Campaign","event":[{"listen":"test","script":{"id":"7ccf12c3-215a-414c-8e38-cd80d1b2f68d","exec":["tests[\"Status code is 202\"] = responseCode.code === 202;","",""],"type":"text/javascript"}}],"id":"68c68285-d10e-47fb-a797-d3cb50350887","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"[\n    {\n        \"code\": \"{{voucher_code}}\"\n    },\n    {\n        \"code\": \"{{voucher_code}}\"\n    },\n    {\n        \"code\": \"{{voucher_code}}\"\n    }\n]"},"url":{"raw":"{{url}}/campaigns/:campaign-name-or-id/import","host":["{{url}}"],"path":["campaigns",":campaign-name-or-id","import"],"variable":[{"id":"8429f5be-4a79-43ab-8d61-773612d1fa44","key":"campaign-name-or-id","value":"{{campaign_name or campaign_id}}","description":"The campaign ID or name of the campaign to which voucher will be added. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value."}]}},"response":[],"_postman_id":"68c68285-d10e-47fb-a797-d3cb50350887"},{"name":"Import Vouchers to Campaign by CSV","event":[{"listen":"test","script":{"id":"a5cb9724-5e42-4952-afe8-f17532de914b","exec":["tests[\"Status code is 202\"] = responseCode.code === 202;","",""],"type":"text/javascript"}}],"id":"77971760-d21e-4b16-81c2-875d45eb79f8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"formdata","formdata":[{"key":"file","type":"file","value":null}]},"url":{"raw":"{{url}}/campaigns/:campaign-name-or-id/importCSV","host":["{{url}}"],"path":["campaigns",":campaign-name-or-id","importCSV"],"variable":[{"id":"29b1e55f-4f64-4e6d-843f-b63f60350bdd","key":"campaign-name-or-id","value":"{{campaign_name or campaign_id}}","description":"The campaign ID or name of the campaign being enabled. You can either pass the campaign ID, which was assigned by Voucherify or the name of the campaign as the path parameter value."}]}},"response":[],"_postman_id":"77971760-d21e-4b16-81c2-875d45eb79f8"},{"name":"Enable Campaign","event":[{"listen":"test","script":{"id":"3e0b825d-4573-4c50-b78f-1b2f33156b28","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Voucher is disabled\"] = !jsonData.active;",""],"type":"text/javascript"}}],"id":"f511435a-d959-48ec-ab75-ac266e5baa18","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/campaigns/:campaign-name-or-id/enable","host":["{{url}}"],"path":["campaigns",":campaign-name-or-id","enable"],"variable":[{"id":"be5d1095-d114-4dff-87f7-94a5671af695","key":"campaign-name-or-id","value":"{{campaign_name or campaign_id}}","description":"The campaign ID or name of the campaign being enabled. You can either pass the campaign ID, which was assigned by Voucherify or the name of the campaign as the path parameter value."}]}},"response":[],"_postman_id":"f511435a-d959-48ec-ab75-ac266e5baa18"},{"name":"Disable Campaign","event":[{"listen":"test","script":{"id":"8146d2a1-f656-4473-b95f-4bb03af1df90","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Voucher is disabled\"] = !jsonData.active;",""],"type":"text/javascript"}}],"id":"be9089f4-5644-4ff7-85d9-f1a260e38bd4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/campaigns/:campaign-name-or-id/disable","host":["{{url}}"],"path":["campaigns",":campaign-name-or-id","disable"],"variable":[{"id":"1052a769-1dee-429b-9870-6a5b85435edc","key":"campaign-name-or-id","value":"{{campaign_name or campaign_id}}","description":"The campaign ID or name of the campaign being enabled. You can either pass the campaign ID, which was assigned by Voucherify or the name of the campaign as the path parameter value."}]}},"response":[],"_postman_id":"be9089f4-5644-4ff7-85d9-f1a260e38bd4"}],"id":"d0384f17-8d8a-45c4-8a84-2d5ae0a90f99","description":"This section allows you to perform operations on your [campaigns](https://docs.voucherify.io/reference/campaign-object).","_postman_id":"d0384f17-8d8a-45c4-8a84-2d5ae0a90f99"},{"name":"Promotions","item":[{"name":"List Promotion Tiers","event":[{"listen":"test","script":{"id":"22b5347d-8100-4b41-baed-f50c879fe466","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;",""],"type":"text/javascript"}}],"id":"8e2b92a1-48f9-499e-b27d-f3ec1cb8d6c3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/promotions/tiers?is_available={{true or false}}&limit=10","host":["{{url}}"],"path":["promotions","tiers"],"query":[{"key":"page","value":"2","description":"Which page of results to return.","disabled":true},{"key":"is_available","value":"{{true or false}}","description":"This parameter allows filtering promotions that are only available at the moment. When set to true, it selects only non-expired and active promotions."},{"key":"limit","value":"10","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100 items."}]}},"response":[],"_postman_id":"8e2b92a1-48f9-499e-b27d-f3ec1cb8d6c3"},{"name":"List Promotion Tiers from Campaign","event":[{"listen":"test","script":{"id":"4b73518a-01de-46c1-b590-f9a43d3c64ac","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;",""],"type":"text/javascript"}}],"id":"c745fc23-bce7-455f-ac4e-67d0746242c1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/promotions/:campaign-id/tiers","host":["{{url}}"],"path":["promotions",":campaign-id","tiers"],"variable":[{"id":"4db6a163-960c-4d9c-972d-18afe3ad0d41","key":"campaign-id","value":"{{campaign_id}}","description":"Unique campaign ID assigned by Voucherify."}]}},"response":[],"_postman_id":"c745fc23-bce7-455f-ac4e-67d0746242c1"},{"name":"Add Promotion Tier to Campaign","event":[{"listen":"test","script":{"id":"deebb7ae-39e9-467a-8cd0-66066fdb7dcf","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;",""],"type":"text/javascript"}}],"id":"704b7c8e-b503-4dcb-a84e-521f861a67e1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"{{promotion_name}}\", // Name of the promotion tier.\n    \"banner\": \"Order more than $100\", // Text to be displayed to your customers on your website.\n    \"action\": { // Contains details about the discount applied by the promotion tier.\n        \"discount\": { // The type of discount that will be applied to a customer's order.\n            \"type\": \"AMOUNT\", // Applies an amount discount.\n            \"amount_off\": 3000, // 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. In case of the amount being calculated by the formula, i.e. the amount_off_formula parameter is present in the amount 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 amount off.\n            \"effect\": \"APPLY_TO_ORDER\" // Defines how the discount is applied to the customer's order. The discount effects are defined as follows: APPLY_TO_ORDER (discount applies to the total order amount), APPLY_TO_ITEMS (each item subtotal is discounted equally), APPLY_TO_ITEMS_PROPORTIONALLY (split discount proportionally to amount), APPLY_TO_ITEMS_PROPORTIONALLY_BY_QUANTITY (split discount proportionally to quantity), APPLY_TO_ITEMS_BY_QUANTITY (each unit of matched products has the same discount value)\n        }\n    },\n    \"active\": true, // A flag to toggle the promotion tier on or off. You can disable a promotion tier even though it's within the active period defined by the start_date and expiration_date - true indicates an active promotion tier and false indicates an inactive promotion tier.\n    \"start_date\": \"2022-09-21T00:00:00.000Z\", // Activation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Promotion tier is inactive before this date.\n    \"expiration_date\": null, // Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is inactive after this date.\n    \"validity_timeframe\": { // 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.\n        \"interval\": \"P2D\", // 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.\n        \"duration\": \"P1D\" // 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.\n    },\n    \"validity_day_of_week\": [ // Integer array corresponding to the particular days of the week in which the promotion tier is valid - 0 Sunday, 1 Monday, 2 Tuesday, 3 Wednesday, 4 Thursday, 5 Friday, 6 Saturday.\n        1,\n        2,\n        3,\n        4\n    ],\n    \"validation_rules\": [ // Array containing the ID of the validation rule associated with the promotion tier.\n        \"{{validation_rule_id}}\"\n    ]\n}"},"url":{"raw":"{{url}}/promotions/:campaign-id/tiers","host":["{{url}}"],"path":["promotions",":campaign-id","tiers"],"variable":[{"id":"d45eb133-d652-4922-9d17-cc544e99c9f7","key":"campaign-id","value":""}]}},"response":[],"_postman_id":"704b7c8e-b503-4dcb-a84e-521f861a67e1"},{"name":"Get Promotion Tier","id":"add099fb-db29-47c9-8587-2547ef511a63","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/promotions/tiers/:promotion-tier-id","host":["{{url}}"],"path":["promotions","tiers",":promotion-tier-id"],"variable":[{"id":"e6ee5b17-26c3-4dc9-ae4a-d852ace592b8","key":"promotion-tier-id","value":"{{promotion_tier_id}}"}]}},"response":[],"_postman_id":"add099fb-db29-47c9-8587-2547ef511a63"},{"name":"Update Promotion Tier","event":[{"listen":"test","script":{"id":"84cf15d5-3cc1-4183-bc6e-7fbafad540df","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;",""],"type":"text/javascript"}}],"id":"4bc4da35-352a-47fd-bc71-975c7e13229b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"action\": { // Contains details about the discount applied by the promotion tier.\n        \"discount\": { // The type of discount that will be applied to a customer's order.\n            \"type\": \"AMOUNT\", // Applies an amount discount.\n            \"amount_off\": 100 // Amount taken off the subtotal of a price. \n        }\n    }\n}"},"url":{"raw":"{{url}}/promotions/tiers/:promotion-tier-id","host":["{{url}}"],"path":["promotions","tiers",":promotion-tier-id"],"variable":[{"id":"ed4fc9bf-3d25-4337-8f22-35b63ce9e70f","key":"promotion-tier-id","value":""}]}},"response":[],"_postman_id":"4bc4da35-352a-47fd-bc71-975c7e13229b"},{"name":"Delete Promotion Tier","event":[{"listen":"test","script":{"id":"6b0fbe08-454c-4386-83cd-744b84f324ef","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;",""],"type":"text/javascript"}}],"id":"b5c37eb7-fa11-4ca9-9782-34f27386eccb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/promotions/tiers/:promotion-tier-id","host":["{{url}}"],"path":["promotions","tiers",":promotion-tier-id"],"variable":[{"id":"3cdb44cb-fd77-41ca-bdd8-edc2bbc9f6da","key":"promotion-tier-id","value":""}]}},"response":[],"_postman_id":"b5c37eb7-fa11-4ca9-9782-34f27386eccb"},{"name":"Enable Promotion Tier","event":[{"listen":"test","script":{"id":"d21fd7b2-5058-4500-82c3-665d8b654cff","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;",""],"type":"text/javascript"}}],"id":"b6ce71ac-eabb-443e-af13-d02131975029","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/promotions/tiers/:promotion-tier-id/enable","host":["{{url}}"],"path":["promotions","tiers",":promotion-tier-id","enable"],"variable":[{"id":"eded767f-aaba-4dbb-9399-8f6f1b6759f5","key":"promotion-tier-id","value":"{{promotion_tier_id}}","description":"Unique promotion tier ID."}]}},"response":[],"_postman_id":"b6ce71ac-eabb-443e-af13-d02131975029"},{"name":"Disable Promotion Tier","event":[{"listen":"test","script":{"id":"50ff5b44-5359-4c83-91e6-cdd8d02046cd","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;",""],"type":"text/javascript"}}],"id":"0d6beba9-3c2a-4da9-afda-48ea31640ab1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/promotions/tiers/:promotion-tier-id/disable","host":["{{url}}"],"path":["promotions","tiers",":promotion-tier-id","disable"],"variable":[{"id":"65a633e0-8691-480a-8dee-10095ec79800","key":"promotion-tier-id","value":"{{promotion_tier_id}}","description":"Unique promotion tier ID."}]}},"response":[],"_postman_id":"0d6beba9-3c2a-4da9-afda-48ea31640ab1"},{"name":"List Promotion Stacks","event":[{"listen":"test","script":{"id":"c6ebbb2a-fcf1-4f39-92ca-f29a7b12c1d4","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;",""],"type":"text/javascript","packages":{}}}],"id":"dd3f89a6-1137-4eb4-b134-90f6552e9348","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/promotions/stacks?limit=100&page=1&order=created_at&created_at[before]=2024-02-22T10%3A13%3A06.487Z","host":["{{url}}"],"path":["promotions","stacks"],"query":[{"key":"limit","value":"100","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100 items."},{"key":"page","value":"1","description":"Which page of results to return."},{"key":"order","value":"created_at","description":"Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order."},{"key":"created_at[before]","value":"2024-02-22T10%3A13%3A06.487Z","description":"Timestamp representing the date and time before the voucher was created in ISO 8601 format. The value has to be passed in the UTF-8 encoding standard."}]}},"response":[],"_postman_id":"dd3f89a6-1137-4eb4-b134-90f6552e9348"},{"name":"List Promotion Stacks in Campaign","id":"9000fe84-a15c-44b2-b337-934f5b691332","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/promotions/:campaign-id/stacks","host":["{{url}}"],"path":["promotions",":campaign-id","stacks"],"variable":[{"id":"114e583c-6921-47c9-8fcd-1364dec199f7","key":"campaign-id","value":"{{campaign_id}}","description":"Unique campaign ID assigned by Voucherify."}]}},"response":[],"_postman_id":"9000fe84-a15c-44b2-b337-934f5b691332"},{"name":"Get Promotion Stack","event":[{"listen":"test","script":{"id":"414dac46-46ec-47e3-8f74-13fa301681a8","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;",""],"type":"text/javascript"}}],"id":"fb37379d-ec9a-4d31-b905-ffb639ad309a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/promotions/:campaign-id/stacks/:stack-id","host":["{{url}}"],"path":["promotions",":campaign-id","stacks",":stack-id"],"variable":[{"id":"173bd8a5-ada7-4036-b6a1-edac852e12a2","key":"campaign-id","value":"{{campaign_id}}","description":"Unique campaign ID assigned by Voucherify."},{"id":"0f2fd9a3-8b96-41cf-8865-211dc8ac2b02","key":"stack-id","value":"{{promotion_stack_id}}","description":"Promotion stack ID."}]}},"response":[],"_postman_id":"fb37379d-ec9a-4d31-b905-ffb639ad309a"},{"name":"Create Promotion Stack","event":[{"listen":"test","script":{"id":"d01633e8-c2df-4742-8fd5-9f69b42f28ce","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;",""],"type":"text/javascript"}}],"id":"4cf7f26a-3f52-491b-9b05-3000681c1b6e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"{{promotion_stack_name}}\", // Promotion stack name.\n    \"tiers\": { // Contains the tier configuration.\n        \"ids\": [ // Contains the list of tiers in a pre-defined sequence.\n            \"{{promotion_tier_id}}\",\n            \"{{promotion_tier_id}}\",\n            \"{{promotion_tier_id}}\"\n        ],\n        \"hierarchy_mode\": \"MANUAL\" // Default: MANUAL\n    }\n}"},"url":{"raw":"{{url}}/promotions/:campaign-id/stacks","host":["{{url}}"],"path":["promotions",":campaign-id","stacks"],"variable":[{"id":"1a8b79af-d0d2-4613-b959-369c590e7bdd","key":"campaign-id","value":"{{campaign_id}}","description":"Unique campaign ID assigned by Voucherify."}]}},"response":[],"_postman_id":"4cf7f26a-3f52-491b-9b05-3000681c1b6e"},{"name":"Update Promotion Stack","event":[{"listen":"test","script":{"id":"9ab4de14-f579-430e-9a52-b0aa75b0b66b","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;",""],"type":"text/javascript"}}],"id":"d19b01ff-56a8-4e14-8de8-f549ae484c57","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"{{promotion_stack_name}}\", // Promotion stack name.\n    \"tiers\": { // Contains the tier configuration.\n        \"ids\": [ // Contains the list of tiers in a pre-defined sequence.\n            \"{{promotion_tier_id}}\",\n            \"{{promotion_tier_id}}\",\n            \"{{promotion_tier_id}}\"\n        ],\n        \"hierarchy_mode\": \"MANUAL\" // Default: MANUAL\n    }\n}"},"url":{"raw":"{{url}}/promotions/:campaign-id/stacks/:stack-id","host":["{{url}}"],"path":["promotions",":campaign-id","stacks",":stack-id"],"variable":[{"id":"731e1f32-8baf-4b55-8dfb-2082ae2242a6","key":"campaign-id","value":"{{campaign_id}}","description":"Unique campaign ID assigned by Voucherify."},{"id":"c8338339-e70b-4ef6-8f89-007349900dcb","key":"stack-id","value":"{{promotion_stack_id}}","description":"Promotion stack ID."}]}},"response":[],"_postman_id":"d19b01ff-56a8-4e14-8de8-f549ae484c57"},{"name":"Delete Promotion Stack","event":[{"listen":"test","script":{"id":"0d5b21c6-c77a-47ba-8f23-eacb4b9d7e35","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;",""],"type":"text/javascript"}}],"id":"e0a10479-d55a-4551-bc16-9d91ec439933","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/promotions/:campaign-id/stacks/:stack-id","host":["{{url}}"],"path":["promotions",":campaign-id","stacks",":stack-id"],"variable":[{"id":"ab476fba-afee-4728-8c43-03dfeec397e8","key":"campaign-id","value":"{{campaign_id}}","description":"Unique campaign ID assigned by Voucherify."},{"id":"3a54bfbf-ce67-43c7-a4fe-9f90d7206908","key":"stack-id","value":"{{promotion_stack_id}}","description":"Promotion stack ID."}]}},"response":[],"_postman_id":"e0a10479-d55a-4551-bc16-9d91ec439933"}],"id":"c05dbf2c-5fb4-46af-9615-b8f70d1a09cd","description":"This section allows you to control [promotion](https://docs.voucherify.io/reference/promotion-tier-object) tiers and stacks.","_postman_id":"c05dbf2c-5fb4-46af-9615-b8f70d1a09cd"},{"name":"Templates","item":[{"name":"List Campaign Templates","event":[{"listen":"test","script":{"id":"22b5347d-8100-4b41-baed-f50c879fe466","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;",""],"type":"text/javascript","packages":{}}}],"id":"73083912-8cf7-4d68-893e-ff1bfcb0ae20","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/templates/campaigns?limit=100","host":["{{url}}"],"path":["templates","campaigns"],"query":[{"key":"limit","value":"100","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100 items."},{"key":"starting_after_id","value":null,"description":"A cursor for pagination. It retrieves the campaign templates created after a template with the given ID.","type":"text","disabled":true},{"key":"order","value":null,"description":"Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.","disabled":true},{"key":"include_total","value":"true","description":"If set to true, the response returns the number of all campaign templates, regardless of the applied filters or limits. Set to false by default.","type":"text","disabled":true},{"key":"filters[name][conditions][$in][0]","value":null,"description":"Unique user-defined template name.","type":"text","disabled":true},{"key":"filters[campaign_type][conditions][$is]","value":"DISCOUNT_COUPONS","description":"Campaign template campaign type.","type":"text","disabled":true},{"key":"filters[junction]","value":"AND","description":"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.","type":"text","disabled":true}]}},"response":[],"_postman_id":"73083912-8cf7-4d68-893e-ff1bfcb0ae20"},{"name":"Get Campaign Template","id":"ae073aa4-77ac-4f29-9336-2105ece4a442","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/templates/campaigns/:campaignTemplateId","host":["{{url}}"],"path":["templates","campaigns",":campaignTemplateId"],"variable":[{"key":"campaignTemplateId","value":"{{campaign_template_id}}","description":"Pass the campaign template ID that was assigned by Voucherify."}]}},"response":[],"_postman_id":"ae073aa4-77ac-4f29-9336-2105ece4a442"},{"name":"Create Campaign Template","event":[{"listen":"test","script":{"id":"d01633e8-c2df-4742-8fd5-9f69b42f28ce","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;",""],"type":"text/javascript","packages":{}}}],"id":"26f3b299-6874-4845-9754-357aac71ff27","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"campaign_id\": \"string\", // Unique identifier of the campaign that will create a template. It must be an ID of an existing discount or gift card campaign. It cannot be passed when promotion_tier_id has value. Required when the promotion_tier_id is not passed or it is null.\n\t\"promotion_tier_id\": \"string\", // Unique identifier of the promotion tier that will create a template. It cannot be passed when campaign_id has value. Required when the campaign_id is not passed or it is null.\n\t\"name\": \"string\", // User-defined name of the campaign template. It must be unique.\n\t\"description\": \"string\" // User-defined description of the campaign template.\n}"},"url":"{{url}}/templates/campaigns"},"response":[],"_postman_id":"26f3b299-6874-4845-9754-357aac71ff27"},{"name":"Update Campaign Template","event":[{"listen":"test","script":{"id":"9ab4de14-f579-430e-9a52-b0aa75b0b66b","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;",""],"type":"text/javascript","packages":{}}}],"id":"9cdc3b6e-5700-424a-868f-901844ae3fad","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"string\", // User-defined name of the campaign template. It must be unique.\n    \"description\": \"string\" // User-defined description of the campaign template.\n}"},"url":{"raw":"{{url}}/templates/campaigns/:campaignTemplateId","host":["{{url}}"],"path":["templates","campaigns",":campaignTemplateId"],"variable":[{"key":"campaignTemplateId","value":"{{campaign_template_id}}","description":"Pass the campaign template ID that was assigned by Voucherify."}]}},"response":[],"_postman_id":"9cdc3b6e-5700-424a-868f-901844ae3fad"},{"name":"Delete Campaign Template","event":[{"listen":"test","script":{"id":"0d5b21c6-c77a-47ba-8f23-eacb4b9d7e35","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;",""],"type":"text/javascript","packages":{}}}],"id":"799de975-a7dd-4196-8cd0-abd81bb927f0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/templates/campaigns/:campaignTemplateId","host":["{{url}}"],"path":["templates","campaigns",":campaignTemplateId"],"variable":[{"key":"campaignTemplateId","value":"{{campaign_template_id}}","description":"Pass the campaign template ID that was assigned by Voucherify."}]}},"response":[],"_postman_id":"799de975-a7dd-4196-8cd0-abd81bb927f0"},{"name":"Create Campaign From Template","event":[{"listen":"test","script":{"id":"d01633e8-c2df-4742-8fd5-9f69b42f28ce","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;",""],"type":"text/javascript","packages":{}}}],"id":"6bf0f2b4-79d4-4d12-9f8a-50856ccde3e2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"string\", // Campaign name.\n    \"description\": \"Created out of the template\", // An optional field to keep any extra textual information about the campaign such as a campaign description and details.\n    \"type\": \"AUTO_UPDATE\", // Defines whether the campaign can be updated with new vouchers after campaign creation. AUTO_UPDATE: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method). STATIC: vouchers need to be manually published.\n    \"start_date\": \"2022-09-23T00:00:00.000Z\", // Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is inactive before this date.\n    \"expiration_date\": \"2022-09-26T00:00:00.000Z\", // Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is inactive after this date.\n    \"validity_timeframe\": { // Set recurrent time periods when the earning rule is valid. For example, valid for 1 hour every other day.start_date required when including the validity_timeframe.\n        \"duration\": \"PT1H\", // 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.\n        \"interval\": \"P2D\" // 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.\n    },\n    \"validity_day_of_week\": [ // Integer array corresponding to the particular days of the week in which the voucher is valid. 0 Sunday, 1 Monday, 2 Tuesday, 3 Wednesday, 4 Thursday, 5 Friday, 6 Saturday.\n        0\n    ],\n    \"validity_hours\": { // Determines the hours of validity, e.g. to create a happy hours scenario.\n        \"daily\": [ // Defines the reccuring period(s) when the resource is active. The periods should not overlap.\n            {\n                \"start_time\": \"12:00\", // Defines the starting hour of validity in the HH:mm format. The resource is inactive before this time.\n                \"days_of_week\": [ // Integer array corresponding to the particular days of the week in which the voucher is valid. 0 Sunday, 1 Monday, 2 Tuesday, 3 Wednesday, 4 Thursday, 5 Friday, 6 Saturday.\n                    0\n                ],\n                \"expiration_time\": \"14:00\" // Defines the ending hour of validity in the HH:mm format. The resource is inactive after this time.\n            }\n        ]\n    }\n}"},"url":{"raw":"{{url}}templates/campaigns/:campaignTemplateId/campaign-setup","host":["{{url}}templates"],"path":["campaigns",":campaignTemplateId","campaign-setup"],"variable":[{"key":"campaignTemplateId","value":"{{campaign_templated_id}}","description":"Pass the campaign template ID that was assigned by Voucherify."}]}},"response":[],"_postman_id":"6bf0f2b4-79d4-4d12-9f8a-50856ccde3e2"},{"name":"Add Promotion Tier From Template","event":[{"listen":"test","script":{"id":"d01633e8-c2df-4742-8fd5-9f69b42f28ce","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;",""],"type":"text/javascript","packages":{}}}],"id":"c47060a7-fa46-4eeb-bd5a-771735ab3d39","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"campaign_id\": \"string\", // Unique campaign identifier, assigned by Voucherify. Defines the promotion campaign to which the promotion tier will be added.\n    \"name\": \"string\", // Campaign name.\n    \"banner\": \"string\", // Text to be displayed to your customers on your website.\n    \"hierarchy\": 0, // 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.\n    \"start_date\": \"2022-09-23T00:00:00.000Z\", // Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is inactive before this date.\n    \"expiration_date\": \"2022-09-26T00:00:00.000Z\", // Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is inactive after this date.\n    \"validity_timeframe\": { // Set recurrent time periods when the earning rule is valid. For example, valid for 1 hour every other day.start_date required when including the validity_timeframe.\n        \"duration\": \"PT1H\", // 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.\n        \"interval\": \"P2D\" // 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.\n    },\n    \"validity_day_of_week\": [ // Integer array corresponding to the particular days of the week in which the voucher is valid. 0 Sunday, 1 Monday, 2 Tuesday, 3 Wednesday, 4 Thursday, 5 Friday, 6 Saturday.\n        0\n    ],\n    \"validity_hours\": { // Determines the hours of validity, e.g. to create a happy hours scenario.\n        \"daily\": [ // Defines the reccuring period(s) when the resource is active. The periods should not overlap.\n            {\n                \"start_time\": \"12:00\", // Defines the starting hour of validity in the HH:mm format. The resource is inactive before this time.\n                \"days_of_week\": [ // Integer array corresponding to the particular days of the week in which the voucher is valid. 0 Sunday, 1 Monday, 2 Tuesday, 3 Wednesday, 4 Thursday, 5 Friday, 6 Saturday.\n                    0\n                ],\n                \"expiration_time\": \"14:00\" // Defines the ending hour of validity in the HH:mm format. The resource is inactive after this time.\n            }\n        ]\n    }\n}"},"url":{"raw":"{{url}}/templates/campaigns/:campaignTemplateId/tier-setup","host":["{{url}}"],"path":["templates","campaigns",":campaignTemplateId","tier-setup"],"variable":[{"key":"campaignTemplateId","value":"{{campaing_template_id}}","description":"Pass the campaign template ID that was assigned by Voucherify."}]}},"response":[],"_postman_id":"c47060a7-fa46-4eeb-bd5a-771735ab3d39"}],"id":"1cc6571c-871e-4473-953e-59dd93f55075","description":"This section allows you to perform operations on your [campaign templates](https://support.voucherify.io/article/620-campaign-templates).","_postman_id":"1cc6571c-871e-4473-953e-59dd93f55075"},{"name":"Rewards","item":[{"name":"List Rewards","event":[{"listen":"test","script":{"id":"5ba591ea-a359-46fb-aa8c-23eb4f82d1fc","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript"}}],"id":"db99089c-23df-4a04-bf4a-34d487b1de43","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/rewards?limit=100&page=1&assignment_id={{reward_assignment_id}}","host":["{{url}}"],"path":["rewards"],"query":[{"key":"limit","value":"100","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100 items."},{"key":"page","value":"1","description":"Which page of results to return."},{"key":"assignment_id","value":"{{reward_assignment_id}}","description":"A unique reward assignment ID. Use this parameter to get the reward details in the context of an assignment ID."}]}},"response":[],"_postman_id":"db99089c-23df-4a04-bf4a-34d487b1de43"},{"name":"Get Reward","event":[{"listen":"test","script":{"id":"2a6e4c7e-050b-4403-9731-a4f268531855","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript"}}],"id":"9d34c600-d3e1-46cd-b02c-90699be88eb8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/rewards/:reward-id","host":["{{url}}"],"path":["rewards",":reward-id"],"variable":[{"id":"0b55885a-bcb3-40a9-b9a3-98285dc6acab","key":"reward-id","value":"{{reward_id}}","description":"A unique reward ID."}]}},"response":[],"_postman_id":"9d34c600-d3e1-46cd-b02c-90699be88eb8"},{"name":"Create Reward - Create a Gift Voucher Reward","event":[{"listen":"test","script":{"id":"b5af1e22-31a3-42a5-9592-d37447f4c9f4","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript"}}],"id":"ee3bedd0-981b-4dfc-baee-42e9b311f6bd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"{{reward_name}}\", // Reward name.\n    \"type\": \"CAMPAIGN\", // Reward type. Default: CAMPAIGN\n    \"metadata\": { // 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.\n        \"type\": \"gift\"\n    },\n    \"parameters\": { // Configure a reward that adds cash to a gift card. This type of reward is a subset of a Digital (CAMPAIGN) reward.\n        \"campaign\": {\n            \"id\": \"{{campaign_id}}\", // Assign the reward to the campaign that contains the gift cards that will be replenished by the reward. Provide the unique campaign ID, assigned by Voucherify.\n            \"balance\": 3000 // The incremental amout to be added to the current balance on the gift card. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000.\n        }\n    }\n}"},"url":"{{url}}/rewards"},"response":[],"_postman_id":"ee3bedd0-981b-4dfc-baee-42e9b311f6bd"},{"name":"Create Reward - Create a Discount Code Reward","event":[{"listen":"test","script":{"id":"b5af1e22-31a3-42a5-9592-d37447f4c9f4","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript","packages":{}}}],"id":"57d53a9e-a0e9-4e88-8a6f-4f98dec74826","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"{{reward_name}}\", // Reward name.\n    \"type\": \"CAMPAIGN\", // Reward type. Default: CAMPAIGN\n    \"metadata\": { // 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.\n        \"type\": \"Discount Code\"\n    },\n    \"parameters\": { // Provide the source of the rewards. In this case - the ID of the campaign.\n        \"campaign\": {\n            \"id\": \"{{campaign_id}}\" // Assign the reward to the discount campaign.\n        }\n    }\n}"},"url":"{{url}}/rewards"},"response":[],"_postman_id":"57d53a9e-a0e9-4e88-8a6f-4f98dec74826"},{"name":"Create Reward - Add points to a Loyalty Card","event":[{"listen":"test","script":{"id":"b5af1e22-31a3-42a5-9592-d37447f4c9f4","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript","packages":{}}}],"id":"bce44a24-6b0b-4343-93fe-9c637b6dd7ac","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"{{reward_name}}\", // Reward name.\n    \"type\": \"CAMPAIGN\", // Reward type. Default: CAMPAIGN\n    \"metadata\": { // 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.\n        \"type\": \"Loyalty Card reward\"\n    },\n    \"parameters\": { \n        \"campaign\": {\n            \"id\": \"{{campaign_id}}\", // Assign the reward to the discount campaign.\n            \"balance\": 100 // Number of points to add to a Loyalty Card from the campaign.\n        }\n    }\n}"},"url":"{{url}}/rewards"},"response":[],"_postman_id":"bce44a24-6b0b-4343-93fe-9c637b6dd7ac"},{"name":"Create Reward - Create a material reward","event":[{"listen":"test","script":{"id":"b5af1e22-31a3-42a5-9592-d37447f4c9f4","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript","packages":{}}}],"id":"5a818155-8221-4460-a6aa-0e237f6da315","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"{{reward_name}}\", // Reward name.\n    \"type\": \"MATERIAL\", // Reward type.\n    \"metadata\": { // 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.\n        \"type\": \"Material reward\"\n    },\n    \"parameters\": { // Provide the product or SKU that is used as a reward.\n        \"product\": {\n            \"id\": \"{{product-id}}\", // ID of the product.\n            \"sku_id\": null // SKU ID of the SKU.\n        }\n    },\n    \"stock\":10 // Number of times the reward can be given.\n}"},"url":"{{url}}/rewards"},"response":[],"_postman_id":"5a818155-8221-4460-a6aa-0e237f6da315"},{"name":"Create Reward - Create a Pay with Points Reward","event":[{"listen":"test","script":{"id":"b5af1e22-31a3-42a5-9592-d37447f4c9f4","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript","packages":{}}}],"id":"2ee5c000-206d-478a-8b48-3177a5c9361d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"{{reward_name}}\", // Reward name.\n    \"type\": \"COIN\", // Reward type.\n    \"metadata\": { // 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.\n        \"type\": \"Pay with Points reward\"\n    },\n    \"parameters\": { // The following configuration gives the customer a one cent discount for each point.\n        \"coint\": {\n            \"exchange_ratio\": 1, // The cash equivalent of the points defined in the points_ratio property.\n            \"points_ratio\": 1 // The number of loyalty points that will map to the predefined cash amount defined by the exchange_ratio property.\n        }\n    }\n}"},"url":"{{url}}/rewards"},"response":[],"_postman_id":"2ee5c000-206d-478a-8b48-3177a5c9361d"},{"name":"Update Reward","event":[{"listen":"test","script":{"id":"9a2fe85b-dd1f-4be8-93ee-fbb7a48f0241","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript"}}],"id":"0a776b6c-e7c9-4239-957e-75c4fbdad014","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"{{reward_name}}\", // Reward name.\n    \"type\": \"CAMPAIGN\", // Reward type. Default: CAMPAIGN\n    \"metadata\": { // 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.\n        \"type\": \"gift\"\n    },\n    \"parameters\": { // Configure a reward that adds cash to a gift card. This type of reward is a subset of a Digital (CAMPAIGN) reward.\n        \"campaign\": {\n            \"id\": \"{{campaign_id}}\", // Assign the reward to the campaign that contains the gift cards that will be replenished by the reward. Provide the unique campaign ID, assigned by Voucherify.\n            \"balance\": 4000 // The incremental amout to be added to the current balance on the gift card. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000.\n        }\n    }\n}"},"url":{"raw":"{{url}}/rewards/:reward-id","host":["{{url}}"],"path":["rewards",":reward-id"],"variable":[{"id":"35bfdadd-b852-4b40-b7a4-41289c4a4537","key":"reward-id","value":"{{reward_id}}","description":"A unique reward ID."}]}},"response":[],"_postman_id":"0a776b6c-e7c9-4239-957e-75c4fbdad014"},{"name":"Delete Reward","event":[{"listen":"test","script":{"id":"dad10307-e2ca-42e5-882d-88e8fb079c58","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript"}}],"id":"2f5c0458-0a17-42ec-bc96-485e6bfce262","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/rewards/:reward-id","host":["{{url}}"],"path":["rewards",":reward-id"],"variable":[{"id":"c7917925-54c1-44a4-820b-3a1d80b4d0d4","key":"reward-id","value":"{{reward_id}}","description":"A unique reward ID."}]}},"response":[],"_postman_id":"2f5c0458-0a17-42ec-bc96-485e6bfce262"},{"name":"List Reward Assignments","event":[{"listen":"test","script":{"id":"8ab78520-cf00-4e14-a4fa-bda309a61186","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript"}}],"id":"5004efa4-ad45-44d1-b20e-c2a795182904","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/rewards/:reward-id/assignments?limit=100&page=1","host":["{{url}}"],"path":["rewards",":reward-id","assignments"],"query":[{"key":"limit","value":"100","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100 items."},{"key":"page","value":"1","description":"Which page of results to return."}],"variable":[{"id":"a4ae148d-2c8c-45f6-a078-e4285609073c","key":"reward-id","value":"{{reward_id}}","description":"A unique reward ID."}]}},"response":[],"_postman_id":"5004efa4-ad45-44d1-b20e-c2a795182904"},{"name":"Get Reward Assignment","id":"2b3ffc6b-a4a4-41c8-9bc1-13e620cd6fb7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/rewards/:reward-id/assignments/:assignment-id","host":["{{url}}"],"path":["rewards",":reward-id","assignments",":assignment-id"],"variable":[{"key":"reward-id","value":"{{reward_id}}","description":"A unique reward ID."},{"key":"assignment-id","value":"{{assignment_id}}","description":"A unique reward assignment ID."}]}},"response":[],"_postman_id":"2b3ffc6b-a4a4-41c8-9bc1-13e620cd6fb7"},{"name":"Create Reward Assignment","event":[{"listen":"test","script":{"id":"e45d472c-cae5-4cd0-ba8a-c789f8cc6972","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript"}}],"id":"136170a1-ebd3-49d7-92b0-f5de31e5261d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"campaign\": \"{{campaign_id}}\", // The campaign ID of the campaign to which the reward is to be assigned.\n    \"parameters\": { // Defines the cost of the reward.\n        \"loyalty\": { // Defines the equivalent points value of the reward.\n            \"points\": 50 // Number of points that will be subtracted from the loyalty card points balance if the reward is redeemed.\n        }\n    }\n}"},"url":{"raw":"{{url}}/rewards/:reward-id/assignments","host":["{{url}}"],"path":["rewards",":reward-id","assignments"],"variable":[{"id":"09ace386-da9e-4a9d-a070-d491482105a9","key":"reward-id","value":"{{reward_id}}","description":"A unique reward ID."}]}},"response":[],"_postman_id":"136170a1-ebd3-49d7-92b0-f5de31e5261d"},{"name":"Update Reward Assignment","event":[{"listen":"test","script":{"id":"2025eadb-7097-446c-8a17-1a88f82a680c","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript"}}],"id":"e641ce36-c3ee-45f0-9d9a-13c48d0bf20a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"parameters\": { // An object that defines the price of the reward in loyalty points.\n        \"loyalty\": { // Stores the points parameter.\n            \"points\": 100 // Defines how many points are required to obtain the reward.\n        }\n    }\n}"},"url":{"raw":"{{url}}/rewards/:reward-id/assignments/:assignment-id","host":["{{url}}"],"path":["rewards",":reward-id","assignments",":assignment-id"],"variable":[{"id":"6050dfe8-7946-4798-88a7-cd8ea2d5251a","key":"reward-id","value":"{{reward_id}}","description":"A unique reward ID."},{"id":"ad3263f7-f95b-4edc-ab80-64f14af65565","key":"assignment-id","value":"{{reward_assignment_id}}","description":"A unique reward assignment ID."}]}},"response":[],"_postman_id":"e641ce36-c3ee-45f0-9d9a-13c48d0bf20a"},{"name":"Delete Reward Assignment","event":[{"listen":"test","script":{"id":"78e39a04-078d-4500-b19f-a34b3c7ea32a","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript"}}],"id":"6a5dbb3e-5353-43b5-8145-d8dd00596a30","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/rewards/:reward-id/assignments/:assignment-id","host":["{{url}}"],"path":["rewards",":reward-id","assignments",":assignment-id"],"variable":[{"id":"6c3b3d41-68c2-4f4a-aec4-0795eecbdac2","key":"reward-id","value":"{{reward_id}}","description":"A unique reward ID."},{"id":"086dcd93-8b15-4153-ada0-256a788cbab9","key":"assignment-id","value":"{{reward_assignment_id}}","description":"A unique reward assignment ID."}]}},"response":[],"_postman_id":"6a5dbb3e-5353-43b5-8145-d8dd00596a30"}],"id":"54270121-092b-493f-8364-de56d2dad87a","description":"This section allows you to control [rewards](https://docs.voucherify.io/reference/reward-object) and [rewards assignments](https://docs.voucherify.io/reference/reward-assignment-object).","_postman_id":"54270121-092b-493f-8364-de56d2dad87a"},{"name":"Loyalties - Campaign Management","item":[{"name":"List Loyalty Campaigns","event":[{"listen":"test","script":{"id":"9d636026-01e5-400b-b16c-e40bbe74d725","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript"}}],"id":"acd8f6ad-6f9e-4358-975e-1613b6a9d1a7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/loyalties?limit=20&page=1","host":["{{url}}"],"path":["loyalties"],"query":[{"key":"limit","value":"20","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100 items."},{"key":"page","value":"1","description":"Which page of results to return."},{"key":"order","value":"{{order}}","description":"Sorts the results using one of the filtering options.","disabled":true}]}},"response":[],"_postman_id":"acd8f6ad-6f9e-4358-975e-1613b6a9d1a7"},{"name":"Get Loyalty Campaign","event":[{"listen":"test","script":{"id":"202f46d3-82fa-4695-9a9a-131b32c6e3fa","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript"}}],"id":"76a826ce-c336-4a69-8768-fc8b36015369","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/loyalties/:campaign-id","host":["{{url}}"],"path":["loyalties",":campaign-id"],"variable":[{"id":"8215b42b-ef5d-4f6d-9341-2bd2d21815cc","key":"campaign-id","value":""}]}},"response":[],"_postman_id":"76a826ce-c336-4a69-8768-fc8b36015369"},{"name":"List Loyalty Campaign Transactions","event":[{"listen":"test","script":{"id":"9d636026-01e5-400b-b16c-e40bbe74d725","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript","packages":{}}}],"id":"fa350a96-40f1-4b96-9204-eb02cd146da4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/loyalties/:campaignId/transactions","host":["{{url}}"],"path":["loyalties",":campaignId","transactions"],"query":[{"key":"limit","value":"100","description":"Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.","disabled":true},{"key":"order","value":"","description":"Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.","disabled":true},{"key":"starting_after_id","value":"","description":"A cursor for pagination. It retrieves the transactions starting after a transaction with the given ID.","disabled":true},{"key":"filters[voucher_id][conditions][$is]","value":"XYZ","description":"Data filters used to narrow down the data records to be returned in the result.","disabled":true},{"key":"filters[junction]","value":"AND","description":"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.","disabled":true}],"variable":[{"key":"campaignId","value":"{{campaign_id}}","description":"You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value."}]}},"response":[],"_postman_id":"fa350a96-40f1-4b96-9204-eb02cd146da4"},{"name":"Export Loyalty Campaign Transactions","event":[{"listen":"test","script":{"id":"bd8f1869-0b8f-48b8-977c-6bc6f9d03b48","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Type is GIFT VOUCHER\"] = jsonData.type === \"GIFT_VOUCHER\";",""],"type":"text/javascript","packages":{}}},{"listen":"prerequest","script":{"id":"1b1839e5-a12b-473b-b36f-f3c795a6e59e","exec":["pm.environment.set(\"voucher-code\", \"voucher-\" + Number.random(1, 100000));",""],"type":"text/javascript","packages":{}}}],"id":"44886138-f27b-4461-896c-9875bcbc470e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"parameters\": { // List of available parameters containing fields and filters that can be exported for transactions in a gift card or loyalty card campaign, along with the sorting order of the returned data.\n        \"filters\": { // Data filters and their conditions to narrow down the returned data.\n            \"created_at\": { // Data filters used to narrow down the data records to be returned in the result.\n                \"conditions\": {\n                    \"$after\": [ // Value is after this date. The value for this parameter is shown in the ISO 8601 format.\n                        \"2024-10-01T00:00:00.000Z\"\n                    ]\n                }\n            }\n        },\n        \"fields\": [ // Data fields that will be exported for the transactions that are associated with balance movements on cards in a campaign.\n            \"id\", // Unique transaction ID.\t\n            \"type\", // Transaction type.\n            \"source_id\", // Unique transaction source ID.\n            \"reason\", // Contains the reason for the transaction if one was included originally.\n            \"balance\", // The gift card or loyalty card balance after the transaction.\n            \"amount\", // The amount of gift card or loyalty card credits being allocated during the transaction. This value can either be negative or positive depending on the nature of the transaction.\n            \"created_at\", // Timestamp in ISO 8601 format representing the date and time when the transaction was created.\n            \"voucher_id\", // Unique voucher ID.\n            \"source\", // Channel through which the transaction was initiated.\n            \"details\", // More detailed information stored in the form of JSON.\n            \"related_transaction_id\" // Unique transaction ID related to a receiver/donor card in the case of a points transfer from/to another card.\n        ]\n    },\n    \"order\": \"-created_at\" // How the export is ordered, where the dash - preceding a sorting option means sorting in a descending order.\n}"},"url":{"raw":"{{url}}/loyalties/:campaignId/transactions/export","host":["{{url}}"],"path":["loyalties",":campaignId","transactions","export"],"variable":[{"id":"80b8c7e7-d133-41d5-9304-6cb56fa3464d","key":"campaignId","value":"{{campaign_id}}","description":"You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value."}]}},"response":[],"_postman_id":"44886138-f27b-4461-896c-9875bcbc470e"},{"name":"Create Loyalty Campaign","event":[{"listen":"test","script":{"id":"32f20e80-731c-482e-8473-e742a2a4cf4a","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript"}}],"id":"9858c31e-13bf-453e-aa18-647184c3395a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"{{Loyalty_Campaign_Name}}\", // Campaign name.\n    \"description\": \"This is a campaign description.\", // An optional field to keep any extra textual information about the campaign such as a campaign description and details.\n    \"auto_join\": true, // Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled.\n    \"join_once\": true, // If this value is set to true, customers will be able to join the campaign only once.\n    \"use_voucher_metadata_schema\": true, // Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema.\n    \"start_date\": \"2024-02-12T00:00:00Z\", // Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is inactive before this date.\n    \"expiration_date\": null, // Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is inactive after this date.\n    \"activity_duration_after_publishing\": \"P24D\", // Defines the amount of time the campaign will be active in ISO 8601 format after publishing. For example, a campaign with a duration of P24D will be valid for a duration of 24 days.\n    \"vouchers_count\": 1, // Total number of unique vouchers in campaign during campaign creation (size of campaign).\n    \"voucher\": { // Schema model for a loyalty card.\n        \"type\": \"LOYALTY_CARD\", // Type of voucher.\n        \"loyalty_card\": { // Defines the loyalty card details.\n            \"points\": 0, // Initial loyalty card income in points to be applied to the loyalty card at voucher generation.\n            \"expiration_rules\": { // Defines point expiration rules.\n                \"period_type\": \"MONTH\", // The expiration period. Default: MONTH\n                \"period_value\": 3, // How many periods should pass before the expiration occurs.\n                \"rounding_type\": \"END_OF_QUARTER\" // Round up expiration till the end of the given period type.\n            }\n        },\n        \"redemption\": { // Defines the redemption limits on vouchers.\n            \"quantity\": null // How many times a voucher can be redeemed. A null value means unlimited.\n        },\n        \"code_config\": { // Defines code's pattern (prefix, suffix, length, charset, etc).\n            \"pattern\": \"L-CARD-#######\" // A pattern for codes where hashes (#) will be replaced with random characters. Overrides length.\n        }\n    },\n    \"metadata\": { // 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.\n        \"test\": true\n    },\n    \"type\": \"AUTO_UPDATE\", // Defines whether the campaign can be updated with new vouchers after campaign creation. AUTO_UPDATE: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method). STATIC: vouchers need to be manually published.\n    \"loyalty_tiers_expiration\": { // Defines the expiration mechanism for loyalty tiers.\n        \"qualification_type\": \"BALANCE\", // 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. Default: BALANCE.\n        \"start_date\": { // Defines the conditions for the start date of the tier.\n            \"type\": \"IMMEDIATE\" // What triggers the tier to be valid for a customer. IMMEDIATE: After reaching the minimum required points. Default: IMMEDIATE.\n        },\n        \"expiration_date\": { // Defines the conditions for the expiration date of a tier.\n            \"type\": \"CUSTOM\", // Defines the custom conditions for the expiration date of a tier.\n            \"extend\": \"P3M\", // 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.\n            \"rounding\": { // Defines the rounding mechanism for tier expiration.\n                \"type\": \"MONTH\", // Period to which the expiration will be rounded to. MONTH: The expiration date will be rounded to the end of the month. QUARTER: The expiration date will be rounded to the end of the quarter. HALF_YEAR: The expiration date will be rounded to the half year. YEAR: The expiration date will be rounded to the end of the year.\n                \"strategy\": \"END\" // Rounds up the expiration to the end of the above-chosen period. Only END is available.\n            }\n        }\n    }\n}"},"url":"{{url}}/loyalties"},"response":[],"_postman_id":"9858c31e-13bf-453e-aa18-647184c3395a"},{"name":"Update Loyalty Campaign","event":[{"listen":"test","script":{"id":"46299a3c-4f2c-476e-858d-c59243f1c984","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript"}}],"id":"5b0fca98-ab77-4341-a96a-7197afd25ebe","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{    // The update endpoint can use the same payload as the Create Loyalty Campaign endpoint. In this example we are changing only one parameter.\n\n    \"auto_join\": false // Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled.\n}"},"url":{"raw":"{{url}}/loyalties/:campaign-id","host":["{{url}}"],"path":["loyalties",":campaign-id"],"variable":[{"id":"4e332f31-73c4-411e-bc85-34941f349993","key":"campaign-id","value":"{{campaign_id or campaign_name}}","description":"The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign."}]}},"response":[],"_postman_id":"5b0fca98-ab77-4341-a96a-7197afd25ebe"},{"name":"Delete Loyalty Campaign","event":[{"listen":"test","script":{"id":"99d2c61b-70d1-4353-86dd-c2be8225cbfc","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript"}}],"id":"d6a623e4-ec5f-463b-9348-6788164381df","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/loyalties/:campaign-id?force=true","host":["{{url}}"],"path":["loyalties",":campaign-id"],"query":[{"key":"force","value":"true","description":"If this flag is set to true, the campaign and related vouchers will be removed permanently. Going forward, the user will be able to create the next campaign with the same name."}],"variable":[{"id":"9f49710b-b268-4c11-9185-2b4c6dec8600","key":"campaign-id","value":"{{campaign_id or campaign_name}}","description":"The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign."}]}},"response":[],"_postman_id":"d6a623e4-ec5f-463b-9348-6788164381df"},{"name":"List Members","event":[{"listen":"test","script":{"id":"535332d1-9e8c-46d2-8f6f-0beda407f098","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript"}}],"id":"531dd808-3743-479e-83eb-f2275c0673a4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/loyalties/:campaign-id/members?limit=100&page=1","host":["{{url}}"],"path":["loyalties",":campaign-id","members"],"query":[{"key":"limit","value":"100","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100 items."},{"key":"page","value":"1","description":"Which page of results to return."},{"key":"[created_at][after]","value":"{{date and time}}","description":"Timestamp representing the date and time after the voucher was created in ISO 8601 format. The value has to be passed in the UTF-8 encoding standard.","disabled":true},{"key":"[created_at][before]","value":"{{date and time}}","description":"Timestamp representing the date and time before the voucher was created in ISO 8601 format. The value has to be passed in the UTF-8 encoding standard.","disabled":true},{"key":"[updated_at][after]","value":"{{date and time}}","description":"Timestamp representing the date and time after the voucher was updated in ISO 8601 format. The value has to be passed in the UTF-8 encoding standard.","disabled":true},{"key":"[updated_at][before]","value":"{{date and time}}","description":"Timestamp representing the date and time before the voucher was updated in ISO 8601 format. The value has to be passed in the UTF-8 encoding standard.","disabled":true},{"key":"order","value":"{{order}}","description":"Sorts the results using one of the filtering options.","disabled":true}],"variable":[{"id":"649dd597-4053-4989-94f1-600aae477536","key":"campaign-id","value":"{{campaign_id}}","description":"Unique campaign ID of the loyalty program."}]}},"response":[],"_postman_id":"531dd808-3743-479e-83eb-f2275c0673a4"},{"name":"Create Points Expiration Export","id":"570b1dc1-7b59-424b-9c87-43740632f491","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"parameters\": { // List of fields and filters that were passed in the request body to create the export.\n        \"fields\": [\n            \"id\", // Loyalty points bucket ID.\n            \"campaign_id\", // Campaign ID of the parent loyalty campaign.\t\n            \"voucher_id\", // Voucher ID of the parent loyalty card.\t\n            \"status\", // Status of the loyalty points bucket.\t\n            \"expires_at\", // Timestamp in ISO 8601 format representing the date when the points expire.\t\n            \"points\" // Number of points.\t\n        ],\n        \"order\": \"-expires_at\", // How the export is filtered, where the dash - preceding a sorting option means sorting in a descending order.\n        \"filters\": { // Filter conditions set on the campaign ID.\n            \"junction\": \"and\", // 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.\n            \"campaign_id\": { // Data filters used to narrow the data records to be returned in the result.\n                \"conditions\": { // Data filters used to narrow the data records to be returned in the result.\n                    \"$is\": \"{{campaign_id}}\" // Specify the exact resource value.\n                }\n            }\n        }\n    }\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"{{url}}/loyalties/:campaign-id/points-expiration/export","host":["{{url}}"],"path":["loyalties",":campaign-id","points-expiration","export"],"variable":[{"id":"0f0bceda-630f-4958-b685-f9ef96539b63","key":"campaign-id","value":"{{Campaign ID or Name}}","description":"Unique campaign ID or name."}]}},"response":[],"_postman_id":"570b1dc1-7b59-424b-9c87-43740632f491"},{"name":"List Earning Rules","event":[{"listen":"test","script":{"id":"ef656dc9-2781-4b43-93b3-007156e2faeb","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript"}}],"id":"bc6f7603-e5bc-48a2-9a89-4c4e2f0e719e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/loyalties/:campaign-id/earning-rules?limit=100&page=1","host":["{{url}}"],"path":["loyalties",":campaign-id","earning-rules"],"query":[{"key":"limit","value":"100","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100 items."},{"key":"page","value":"1","description":"Which page of results to return."}],"variable":[{"id":"677651d4-f38e-4c1a-b210-3f1a4497d5f6","key":"campaign-id","value":"{{Campaign id or name}}","description":"The campaign ID or name of the loyalty campaign."}]}},"response":[],"_postman_id":"bc6f7603-e5bc-48a2-9a89-4c4e2f0e719e"},{"name":"Get Earning Rule","event":[{"listen":"test","script":{"id":"0a685a1a-c99e-4110-824f-b1f131d7ec27","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript"}}],"id":"d0c1e10d-ff8f-4e4b-b1e0-7fa93fb468a4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/loyalties/:campaign-id/earning-rules/:earning-rule-id","host":["{{url}}"],"path":["loyalties",":campaign-id","earning-rules",":earning-rule-id"],"query":[{"key":"limit","value":"","disabled":true},{"key":"page","value":"","disabled":true}],"variable":[{"id":"9f6a3da1-036a-4286-baf1-53b5bcf1b7dd","key":"campaign-id","value":"{{campaign_id or campaign_name}}","description":"The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign."},{"id":"ff6600d9-33e9-43fb-b715-4159dfa8e403","key":"earning-rule-id","value":"{{earning_rule_id}}","description":"A unique earning rule ID."}]}},"response":[],"_postman_id":"d0c1e10d-ff8f-4e4b-b1e0-7fa93fb468a4"},{"name":"Create Earning Rule","event":[{"listen":"test","script":{"id":"72718d18-177c-4842-b429-89031e218e2b","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript"}}],"id":"e52569c9-7b88-4638-a1f3-b8bebe8ee58a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"[\n    {\n        \"event\": \"order.paid\", // Defines the event which triggers the earning rule to add points to a loyalty card - order.paid an event defined by the Voucherify API corresponding to an order status PAID. Default: order.paid\n        \"validation_rule_id\": \"{{validation_rule_ID}}\", // A unique validation rule identifier assigned by the Voucherify API. The validation rule is verified before points are added to the balance.\n        \"source\": { // Contains the custom earning rule name and parent campaign.\n            \"banner\": \"5 points for 10 USD spent - subscribers only\" // Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard.\n        },\n        \"loyalty\": { // An object that defines the number of points that will be added to a loyalty card and how the points will be added. FIXED adds a fixed number of points. PROPORTIONAL adds points proportionally based on a pre-defined ratio.\n            \"type\": \"PROPORTIONAL\",\n            \"calculation_type\": \"ORDER_TOTAL_AMOUNT\",\n            \"order\": {\n                \"total_amount\": {\n                    \"every\": 1000,\n                    \"points\": 5\n                }\n            },\n            \"active\": true, // 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 and false indicates an inactive earning rule.\n            \"start_date\": null, // Start date defines when the earning rule starts to be active. Activation timestamp in ISO 8601 format. Earning rule is inactive before this date. If you don't define the start date for an earning rule, it'll inherit the campaign start date by default.\n            \"expiration_date\": null, // Expiration date defines when the earning rule expires. Expiration timestamp in ISO 8601 format. Earning rule is inactive after this date.If you don't define the expiration date for an earning rule, it'll inherit the campaign expiration date by default.\n            \"metadata\": { // 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.\n                \"terms_and_conditions\": \"For subscribers only\"\n            }\n        }\n    }\n]"},"url":{"raw":"{{url}}/loyalties/:campaign-id/earning-rules","host":["{{url}}"],"path":["loyalties",":campaign-id","earning-rules"],"variable":[{"id":"1f062570-89de-4af7-a43b-707b221c46c1","key":"campaign-id","value":"{{Campaign id or name}}","description":"The campaign ID or name of the loyalty campaign."}]}},"response":[],"_postman_id":"e52569c9-7b88-4638-a1f3-b8bebe8ee58a"},{"name":"Update Earning Rule","event":[{"listen":"test","script":{"id":"646807fd-500b-4155-b716-11631cf4f703","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript"}}],"id":"4147f60c-a211-425b-aa90-060b72f47a3e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{    // The update endpoint can use the same payload as the Create Earning Rule endpoint. In this example we are changing only one parameter.\n    \"loyalty\": {\n        \"type\": \"PROPORTIONAL\",\n        \"calculation_type\": \"ORDER_TOTAL_AMOUNT\",\n        \"order\": {\n            \"total_amount\": {\n                \"every\": 1000,\n                \"points\": 10 // Changed the number of points the customer will receive\n            }\n        }\n    }\n}"},"url":{"raw":"{{url}}/loyalties/:campaign-id/earning-rules/:earning-rule-id","host":["{{url}}"],"path":["loyalties",":campaign-id","earning-rules",":earning-rule-id"],"variable":[{"id":"e4c2bb90-eed5-42f4-822d-3a90216b62e6","key":"campaign-id","value":"{{campaign_id or campaign_name}}","description":"The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign."},{"id":"3a5cf754-9ae4-4d76-b7ac-cec7e57fa0c9","key":"earning-rule-id","value":"{{earning_rule_id}}","description":"A unique earning rule ID."}]}},"response":[],"_postman_id":"4147f60c-a211-425b-aa90-060b72f47a3e"},{"name":"Delete Earning Rule","event":[{"listen":"test","script":{"id":"fd247b6b-824c-452b-a128-03afbedfd32d","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript"}}],"id":"9d9b9bc3-eb7e-4fff-9735-d383a81a8a15","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/loyalties/:campaign-id/earning-rules/:earning-rule-id","host":["{{url}}"],"path":["loyalties",":campaign-id","earning-rules",":earning-rule-id"],"variable":[{"id":"7870b290-760f-4f92-ba33-a5bd87845fb7","key":"campaign-id","value":"{{campaign_id or campaign_name}}","description":"The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign."},{"id":"2b8c3237-010c-4117-94eb-0a5cec8a1a3d","key":"earning-rule-id","value":"{{earning_rule_id}}","description":"A unique earning rule ID."}]}},"response":[],"_postman_id":"9d9b9bc3-eb7e-4fff-9735-d383a81a8a15"},{"name":"Enable Earning Rule","event":[{"listen":"test","script":{"id":"bcc116a6-39c6-4b52-a9ad-bd4b4bf912ea","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript"}}],"id":"cf5479f5-7f8e-4bb0-9960-deaf7fb8287a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/loyalties/:campaign-id/earning-rules/:earning-rule-id/enable","host":["{{url}}"],"path":["loyalties",":campaign-id","earning-rules",":earning-rule-id","enable"],"variable":[{"id":"c7344151-ecc3-4dbe-bbfd-323b58a0ad4c","key":"campaign-id","value":"{{campaign_id or campaign_name}}","description":"Unique campaign ID or name."},{"id":"9021d3a5-911d-442f-9efe-cab2cc169e27","key":"earning-rule-id","value":"{{earning_rule_id}}","description":"A unique earning rule ID."}]}},"response":[],"_postman_id":"cf5479f5-7f8e-4bb0-9960-deaf7fb8287a"},{"name":"Disable Earning Rule","event":[{"listen":"test","script":{"id":"fa36b6b6-1f1e-4a14-89e0-ab9fc8d04bda","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript"}}],"id":"8d3e95ff-9524-4a11-b77e-61b7416b6c4e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/loyalties/:campaign-id/earning-rules/:earning-rule-id/disable","host":["{{url}}"],"path":["loyalties",":campaign-id","earning-rules",":earning-rule-id","disable"],"variable":[{"id":"2cfe99af-14ac-4845-8892-a85da90ebb47","key":"campaign-id","value":"{{campaign_id or campaign_name}}","description":"Unique campaign ID or name."},{"id":"9668a446-2e75-4557-a2d0-2fa4f4309bcf","key":"earning-rule-id","value":"{{earning_rule_id}}","description":"A unique earning rule ID."}]}},"response":[],"_postman_id":"8d3e95ff-9524-4a11-b77e-61b7416b6c4e"},{"name":"Get Reward Details","id":"843db655-2893-4b2c-abd8-9d8f17e0cdc6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/loyalties/:campaign-id/reward-assignments/:assignment-id/reward","host":["{{url}}"],"path":["loyalties",":campaign-id","reward-assignments",":assignment-id","reward"],"variable":[{"id":"63709397-67ec-4d81-b5bc-88de14a04711","key":"campaign-id","value":"{{campaign_id or campaign_name}}","description":"The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign."},{"id":"bbecd384-7d59-495c-99c3-45150529f818","key":"assignment-id","value":"{{reward_assignment_id}}","description":"Unique reward assignment ID."}]}},"response":[],"_postman_id":"843db655-2893-4b2c-abd8-9d8f17e0cdc6"},{"name":"List Reward Assignments - alternative","event":[{"listen":"test","script":{"id":"1e9c8b03-26df-4f4f-b757-31050023bc74","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript"}}],"id":"175d4ebd-28c7-4a77-ba87-6e759b327076","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/loyalties/:campaign-id/reward-assignments?limit=100&page=1","host":["{{url}}"],"path":["loyalties",":campaign-id","reward-assignments"],"query":[{"key":"limit","value":"100","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100 items."},{"key":"page","value":"1","description":"Which page of results to return."},{"key":"assignment-id","value":"{{reward_assignment_id}}","description":"A unique reward assignment ID.","disabled":true}],"variable":[{"id":"2e25b3fc-b4d8-4615-a475-3be5f9331f6f","key":"campaign-id","value":"{{campaign_id or campaign_name}}","description":"The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign."}]}},"response":[],"_postman_id":"175d4ebd-28c7-4a77-ba87-6e759b327076"},{"name":"List Reward Assignments","event":[{"listen":"test","script":{"id":"1e9c8b03-26df-4f4f-b757-31050023bc74","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript"}}],"id":"9129fd96-3f8b-4cea-9762-69cb1d739f74","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/loyalties/:campaign-id/rewards?limit=100&page=1","host":["{{url}}"],"path":["loyalties",":campaign-id","rewards"],"query":[{"key":"limit","value":"100","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100 items."},{"key":"page","value":"1","description":"Which page of results to return."},{"key":"assignment-id","value":"{{reward_assignment_id}}","description":"A unique reward assignment ID.","disabled":true}],"variable":[{"id":"1fd9901d-a88c-4d4e-a6b1-5e6b22b42bcb","key":"campaign-id","value":"{{campaign_id or campaign_name}}","description":"The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign."}]}},"response":[],"_postman_id":"9129fd96-3f8b-4cea-9762-69cb1d739f74"},{"name":"Get Reward Assignment - alternative","event":[{"listen":"test","script":{"id":"1e9c8b03-26df-4f4f-b757-31050023bc74","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript"}}],"id":"59682287-e374-464e-a071-7ad997c2ee07","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/loyalties/:campaign-id/reward-assignments/:assignment-id","host":["{{url}}"],"path":["loyalties",":campaign-id","reward-assignments",":assignment-id"],"variable":[{"id":"e7b4c8d7-5a5d-466c-9b2a-ffbca50a2a45","key":"campaign-id","value":"{{campaign_id or campaign_name}}","description":"The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign."},{"id":"9c1ef474-8468-4217-8e24-20ca18aa6ea6","key":"assignment-id","value":"{{reward_assignment_id}}","description":"Unique reward assignment ID."}]}},"response":[],"_postman_id":"59682287-e374-464e-a071-7ad997c2ee07"},{"name":"Get Reward Assignment","event":[{"listen":"test","script":{"id":"1e9c8b03-26df-4f4f-b757-31050023bc74","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript"}}],"id":"eeaa695b-ac94-48a8-a545-396655b551e4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/loyalties/:campaign-id/rewards/:assignment-id","host":["{{url}}"],"path":["loyalties",":campaign-id","rewards",":assignment-id"],"variable":[{"id":"3e119e99-6f43-4e3d-8cb6-f83890058ee4","key":"campaign-id","value":"{{campaign_id or campaign_name}}","description":"The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign."},{"id":"3b0bf281-f0c2-4d11-83f5-689c1b05fc21","key":"assignment-id","value":"{{reward_assignment_id}}","description":"Unique reward assignment ID."}]}},"response":[],"_postman_id":"eeaa695b-ac94-48a8-a545-396655b551e4"},{"name":"Create Reward Assignment","event":[{"listen":"test","script":{"id":"89a6214a-ceb6-4d6d-9d39-40c20e5c7f93","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript"}}],"id":"c3e60c24-99c8-4236-9f0e-11dd4a43bc98","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"[\n    {\n        \"reward\": \"{{reward_id}}\", // Unique reward ID.\n        \"parameters\": { // An object that defines the price of the reward in loyalty points.\n            \"loyalty\": { // Stores the points parameter.\n                \"points\": 5 // Defines how many points are required to obtain the reward.\n            }\n        }\n    },\n    {\n        \"reward\": \"{{reward_id}}\",\n        \"parameters\": {\n            \"loyalty\": {\n                \"points\": 10\n            }\n        }\n    }\n]"},"url":{"raw":"{{url}}/loyalties/:campaign-id/rewards","host":["{{url}}"],"path":["loyalties",":campaign-id","rewards"],"variable":[{"id":"d4cb32c4-33d0-4d44-b1d9-2368578da986","key":"campaign-id","value":"{{campaign_id or campaign_name}}","description":"Unique campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign."}]}},"response":[],"_postman_id":"c3e60c24-99c8-4236-9f0e-11dd4a43bc98"},{"name":"Update Reward Assignment","event":[{"listen":"test","script":{"id":"81e8361b-7a89-4498-9d89-45fd96a29712","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript"}}],"id":"a14ddd52-fa00-4403-89a3-e056d3ecbef2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"parameters\": { // An object that defines the price of the reward in loyalty points.\n        \"loyalty\": { // Stores the points parameter.\n            \"points\": 15 // Defines how many points are required to obtain the reward.\n        }\n    }\n}"},"url":{"raw":"{{url}}/loyalties/:campaign-id/rewards/:assignment-id","host":["{{url}}"],"path":["loyalties",":campaign-id","rewards",":assignment-id"],"variable":[{"id":"626648e7-2fa6-43d8-9b8d-57c732232fb3","key":"campaign-id","value":"{{campaign_id or campaign_name}}","description":"The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign."},{"id":"95318428-5b68-4b95-9509-0322001791eb","key":"assignment-id","value":"{{reward_assignment_id}}","description":"A unique reward assignment ID."}]}},"response":[],"_postman_id":"a14ddd52-fa00-4403-89a3-e056d3ecbef2"},{"name":"Delete Reward Assignment","event":[{"listen":"test","script":{"id":"5aba41e2-c355-44f8-8127-1b655fd02aa3","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript"}}],"id":"125be396-460d-4949-8c99-b3faf20a4c97","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/loyalties/:campaign-id/rewards/:assignment-id","host":["{{url}}"],"path":["loyalties",":campaign-id","rewards",":assignment-id"],"variable":[{"id":"012c3bbd-1018-4c24-b66c-5d5db9163f07","key":"campaign-id","value":"{{campaign_id or campaign_name}}","description":"The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign."},{"id":"017d4d86-c42e-4963-9187-b22cca25b5f9","key":"assignment-id","value":"{{reward_assignment_id}}","description":"A unique reward assignment ID."}]}},"response":[],"_postman_id":"125be396-460d-4949-8c99-b3faf20a4c97"},{"name":"List Loyalty Tiers","event":[{"listen":"test","script":{"id":"cb7b0957-5f15-4429-8027-671b77344d86","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript"}}],"id":"d744a047-ff33-4e0d-b3a4-0db6923bbe02","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/loyalties/:campaign-id/tiers","host":["{{url}}"],"path":["loyalties",":campaign-id","tiers"],"query":[{"key":"limit","value":"","disabled":true}],"variable":[{"id":"391d6b4f-4e5f-41ec-966e-aa005cdf1fad","key":"campaign-id","value":"{{campaign_id or campaign_name}}","description":"Unique loyalty campaign ID or name."}]}},"response":[],"_postman_id":"d744a047-ff33-4e0d-b3a4-0db6923bbe02"},{"name":"Create Loyalty Tiers","id":"5361f9d7-fa58-4ef5-b1e3-e1dac5be5913","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"[\n    {\n        \"name\": \"{{tier_name}}\", // Loyalty Tier name.\n        \"earning_rules\": { // Contains a list of earning rule IDs and their points mapping for the given earning rule.\n            \"{{earning_rule_ID}}\": {\n                \"type\": \"MULTIPLY\",\n                \"multiplier\": 2\n            }\n        },\n        \"rewards\": { // Contains a list of reward IDs and their points mapping for the given reward.\n            \"{{reward_assignment_ID}}\": {\n                \"type\": \"MULTIPLY\",\n                \"multiplier\": 0.5\n            }\n        },\n        \"points\": {\n            \"from\": 0,\n            \"to\": 0\n        }\n    }\n]","options":{"raw":{"language":"json"}}},"url":{"raw":"{{url}}/loyalties/:campaign-id/tiers","host":["{{url}}"],"path":["loyalties",":campaign-id","tiers"],"variable":[{"id":"df9ec8f8-7948-4043-b7f9-e7db4a90c183","key":"campaign-id","value":"{{campaign_id or campaign_name}}","description":"Unique loyalty campaign ID or name."}]}},"response":[],"_postman_id":"5361f9d7-fa58-4ef5-b1e3-e1dac5be5913"},{"name":"Get Loyalty Tier","event":[{"listen":"test","script":{"id":"67a823cc-604f-4f91-b978-0b88772a8cd2","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript"}}],"id":"fb6cb04f-7991-49be-966e-e31fb0846c36","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/loyalties/:campaign-id/tiers/:tier-id","host":["{{url}}"],"path":["loyalties",":campaign-id","tiers",":tier-id"],"variable":[{"id":"14fffee0-0110-4274-865a-bf8b06baafb7","key":"campaign-id","value":"{{campaign_id or campaign_name}}","description":"Unique loyalty campaign ID or name."},{"id":"7b88c0f8-7c90-4b85-a43a-97702a2a6b50","key":"tier-id","value":"{{tier_id}}","description":"Unique loyalty tier ID."}]}},"response":[],"_postman_id":"fb6cb04f-7991-49be-966e-e31fb0846c36"},{"name":"List Loyalty Tier Earning Rules","id":"c913187d-d344-4a6b-9a0a-2e6c2ced60ae","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/loyalties/:campaign-id/tiers/:tier-id/earning-rules","host":["{{url}}"],"path":["loyalties",":campaign-id","tiers",":tier-id","earning-rules"],"variable":[{"id":"6dac9455-f4ae-4c66-9ff3-1035dc551390","key":"campaign-id","value":"{{campaign_id or campaign_name}}","description":"Unique campaign ID or name."},{"id":"4cc7770f-3d44-44a4-a204-11ca1a47bd94","key":"tier-id","value":"{{tier_id}}","description":"Unique loyalty tier ID."}]}},"response":[],"_postman_id":"c913187d-d344-4a6b-9a0a-2e6c2ced60ae"},{"name":"List Loyalty Tier Rewards","id":"b57c90af-4a13-4b3f-8237-e9fb799b2a3b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/loyalties/:campaign-id/tiers/:tier-id/rewards","host":["{{url}}"],"path":["loyalties",":campaign-id","tiers",":tier-id","rewards"],"variable":[{"id":"f9e1298b-1c8f-4287-98f1-97f159475958","key":"campaign-id","value":"{{campaign_id or campaign_name}}","description":"Unique campaign ID or name."},{"id":"69db6ae3-6577-4153-a8a0-e9c0e695b11e","key":"tier-id","value":"{{tier_id}}","description":"Unique loyalty tier ID."}]}},"response":[],"_postman_id":"b57c90af-4a13-4b3f-8237-e9fb799b2a3b"}],"id":"745eed9a-1996-4ba3-89a3-5f9e2e4451c8","description":"This section lets you control [ loyalty campaigns](https://docs.voucherify.io/reference/loyalty-campaign-object), including [ loyalty cards](https://docs.voucherify.io/reference/loyalty-card-object), [ loyalty tiers](https://docs.voucherify.io/reference/loyalty-tier-object), and [ earning rules](https://docs.voucherify.io/reference/earning-rule-object).\n\nThis section focuses on endpoints used for managing loyalty campaigns. It is recommended that loyalty campaigns be created and managed via the dashboard.","_postman_id":"745eed9a-1996-4ba3-89a3-5f9e2e4451c8"},{"name":"Loyalties - Loyalty Member Experience","item":[{"name":"Get Member - alternative","event":[{"listen":"test","script":{"id":"3457ad3b-71ba-4a82-924a-3270efb098c8","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript"}}],"id":"eb4fdb92-c0a1-4f0e-924e-0d5f93427c8d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/loyalties/members/:member-id","host":["{{url}}"],"path":["loyalties","members",":member-id"],"variable":[{"id":"774086da-8e4c-4df6-8eab-b44b14f1abbd","key":"member-id","value":"{{member_id}}","description":"Unique loyalty card code assigned to a particular customer."}]}},"response":[],"_postman_id":"eb4fdb92-c0a1-4f0e-924e-0d5f93427c8d"},{"name":"Get Member","event":[{"listen":"test","script":{"id":"3457ad3b-71ba-4a82-924a-3270efb098c8","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript"}}],"id":"99be5296-7a8e-4346-b850-0006d7a94c44","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/loyalties/:campaign-id/members/:member-id","host":["{{url}}"],"path":["loyalties",":campaign-id","members",":member-id"],"variable":[{"id":"3eff3cd6-ad57-43a1-bd36-8c39c54edf9e","key":"campaign-id","value":"{{campaign_id}}","description":"Unique campaign ID."},{"id":"6a885997-4563-4410-bd78-5f18a0a72981","key":"member-id","value":"{{member_id}}","description":"Unique code that identifies the loyalty card."}]}},"response":[],"_postman_id":"99be5296-7a8e-4346-b850-0006d7a94c44"},{"name":"List Member Pending Points","event":[{"listen":"test","script":{"id":"3457ad3b-71ba-4a82-924a-3270efb098c8","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript","packages":{}}}],"id":"e1e2cc47-3130-4fca-9a01-bc3f693b0f00","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/loyalties/members/:memberId/pending-points?limit=100","host":["{{url}}"],"path":["loyalties","members",":memberId","pending-points"],"query":[{"key":"limit","value":"100","description":"Limit the number of the pending point entries that the API returns in the response."},{"key":"order","value":"id","description":"Orders the pending point entries according the pending point entry ID. The dash - preceding a sorting option means sorting in a descending order.","disabled":true},{"key":"starting_after_id","value":"{{id}}","description":"A cursor for pagination. It retrieves the results starting after a result with the given ID.","disabled":true}],"variable":[{"id":"4cdcc587-21cd-48cf-bf14-7a236851879e","key":"memberId","value":"{{member_id}}","description":"Unique loyalty card code assigned to a particular customer."}]}},"response":[],"_postman_id":"e1e2cc47-3130-4fca-9a01-bc3f693b0f00"},{"name":"List Member Pending Points (with campaign ID)","event":[{"listen":"test","script":{"id":"3457ad3b-71ba-4a82-924a-3270efb098c8","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript","packages":{}}}],"id":"36f60d10-0308-470a-bfa9-ec46a4d2b0db","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/loyalties/:campaignId/members/:memberId/pending-points?limit=100","host":["{{url}}"],"path":["loyalties",":campaignId","members",":memberId","pending-points"],"query":[{"key":"limit","value":"100","description":"Limit the number of the pending point entries that the API returns in the response."},{"key":"order","value":"id","description":"Orders the pending point entries according the pending point entry ID. The dash - preceding a sorting option means sorting in a descending order.","disabled":true},{"key":"starting_after_id","value":"{{id}}","description":"A cursor for pagination. It retrieves the results starting after a result with the given ID.","disabled":true}],"variable":[{"id":"36382155-a740-4df7-9a30-a6ab52a28288","key":"campaignId","value":"{{campaign_id}}","description":"Unique campaign ID."},{"id":"1b252a28-a6a9-444f-b2de-2139d45b6ea2","key":"memberId","value":"{{member_id}}","description":"Unique loyalty card code assigned to a particular customer."}]}},"response":[],"_postman_id":"36f60d10-0308-470a-bfa9-ec46a4d2b0db"},{"name":"List Campaign Pending Points","event":[{"listen":"test","script":{"id":"3457ad3b-71ba-4a82-924a-3270efb098c8","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript","packages":{}}}],"id":"31a9d1a4-49a4-451a-8e10-df09c05c6d6c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/loyalties/:campaignId/pending-points?limit=100","host":["{{url}}"],"path":["loyalties",":campaignId","pending-points"],"query":[{"key":"limit","value":"100","description":"Limit the number of the pending point entries that the API returns in the response."},{"key":"order","value":"id","description":"Orders the pending point entries according the pending point entry ID. The dash - preceding a sorting option means sorting in a descending order.","disabled":true},{"key":"starting_after_id","value":"{{id}}","description":"A cursor for pagination. It retrieves the results starting after a result with the given ID.","disabled":true}],"variable":[{"id":"fbb8601d-2469-4110-bfb2-2dfd44fcdd39","key":"campaignId","value":"{{campaign_id}}","description":"Unique campaign ID."}]}},"response":[],"_postman_id":"31a9d1a4-49a4-451a-8e10-df09c05c6d6c"},{"name":"Activate Member Pending Points","event":[{"listen":"test","script":{"id":"b9463588-4ac5-46ea-a5c5-9b4060127c0d","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript","packages":{}}}],"id":"3b8cb7d7-a330-4868-9618-f4eb45d19682","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/loyalties/members/:memberId/pending-points/:pendingPointsId/activate","host":["{{url}}"],"path":["loyalties","members",":memberId","pending-points",":pendingPointsId","activate"],"variable":[{"key":"memberId","value":"{{member_id}}","description":"Unique loyalty card code assigned to a particular customer."},{"key":"pendingPointsId","value":"{{pending_points_id}}","description":"Unique pending point identifier, assigned by Voucherify."}]}},"response":[],"_postman_id":"3b8cb7d7-a330-4868-9618-f4eb45d19682"},{"name":"Cancel Member Pending Points","event":[{"listen":"test","script":{"id":"b9463588-4ac5-46ea-a5c5-9b4060127c0d","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript","packages":{}}}],"id":"1b4f9cc4-247c-41a0-b1d8-03fd579f2442","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/loyalties/members/:memberId/pending-points/:pendingPointsId/cancel","host":["{{url}}"],"path":["loyalties","members",":memberId","pending-points",":pendingPointsId","cancel"],"variable":[{"key":"memberId","value":"{{member_id}}","description":"Unique loyalty card code assigned to a particular customer."},{"key":"pendingPointsId","value":"{{pending_points_id}}","description":"Unique pending point identifier, assigned by Voucherify."}]}},"response":[],"_postman_id":"1b4f9cc4-247c-41a0-b1d8-03fd579f2442"},{"name":"Adjust Member Pending Points","event":[{"listen":"test","script":{"id":"b9463588-4ac5-46ea-a5c5-9b4060127c0d","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript","packages":{}}}],"id":"6fa81a98-ab44-40b9-b76b-33558824a602","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"points\": {{number of points}} // Add or subtract pending points with a given ID. A negative value subtracts the points.\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"{{url}}/loyalties/members/:memberId/pending-points/:pendingPointsId/balance","host":["{{url}}"],"path":["loyalties","members",":memberId","pending-points",":pendingPointsId","balance"],"variable":[{"key":"memberId","value":"{{member_id}}","description":"Unique loyalty card code assigned to a particular customer."},{"key":"pendingPointsId","value":"{{pending_points_id}}","description":"Unique pending point identifier, assigned by Voucherify."}]}},"response":[],"_postman_id":"6fa81a98-ab44-40b9-b76b-33558824a602"},{"name":"Add Member","event":[{"listen":"test","script":{"id":"b9463588-4ac5-46ea-a5c5-9b4060127c0d","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript"}}],"id":"54f6f93e-4bce-4c2f-9823-1d110c2f43c6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"customer\": {\n        \"source_id\": \"{{source_id}}\", // 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.\n        \"name\": \"{{customer_name}}\",\n        \"email\": \"{{customer_email}}\"\n    },\n    \"metadata\": { // 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.\n        \"year\": 2024\n    },\n    \"channel\": \"facebook\", // Specify the distribution channel.\n    \"voucher\": \"{{voucher_code}}\" // Specify the loyalty card code that you would like to publish to a customer. Optional.\n}"},"url":{"raw":"{{url}}/loyalties/:campaign-id/members","host":["{{url}}"],"path":["loyalties",":campaign-id","members"],"variable":[{"id":"28b9144f-413c-4a73-b346-aae690e3b65a","key":"campaign-id","value":"{{campaign_id}}","description":"Unique campaign ID of the loyalty program."}]}},"response":[],"_postman_id":"54f6f93e-4bce-4c2f-9823-1d110c2f43c6"},{"name":"List Member Activity","event":[{"listen":"test","script":{"id":"0657ab6e-6557-4fe8-98cf-99b35982d29a","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript","packages":{}}}],"id":"58502b36-9515-4d1e-ae5d-928880f25350","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/loyalties/members/:memberId/activity","host":["{{url}}"],"path":["loyalties","members",":memberId","activity"],"variable":[{"key":"memberId","value":"{{member_id}}","description":"Unique loyalty card assigned to a particular customer."}]}},"response":[],"_postman_id":"58502b36-9515-4d1e-ae5d-928880f25350"},{"name":"List Member Activity (with campaign ID)","event":[{"listen":"test","script":{"id":"0657ab6e-6557-4fe8-98cf-99b35982d29a","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript","packages":{}}}],"id":"2cf27a24-d6b3-4312-9098-d60e939240b0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/loyalties/:campaignId/members/:memberId/activity","host":["{{url}}"],"path":["loyalties",":campaignId","members",":memberId","activity"],"variable":[{"key":"campaignId","value":"{{campaign_id}}","description":"Unique campaign ID."},{"key":"memberId","value":"{{member_id}}","description":"Unique loyalty card assigned to a particular customer."}]}},"response":[],"_postman_id":"2cf27a24-d6b3-4312-9098-d60e939240b0"},{"name":"Add or Remove Loyalty Card Balance - alternative","event":[{"listen":"test","script":{"id":"b64557aa-7b31-4ef5-a9ad-e6f978d9daf8","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript"}}],"id":"a5700116-b7dc-4af4-be3a-0232f561275d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"points\": 100, // Incremental balance to be added to/subtracted from the loyalty card. To add points: 100. To subtract points, add a minus: -100\n    \"expiration_type\": \"CUSTOM_DATE\", // Set the type of expiration for added points. PROGRAM_RULES: Inherit rules from campaign. NON_EXPIRING: Points never expire. CUSTOM_DATE: Points expire on a particular date. Requires expiration_date parameter.\n    \"expiration_date\": \"2024-05-30\" // Set expiration date for added points, i.e. YYYY-MM-DD. This parameter is required only when expiration_type is set to CUSTOM_DATE.\n}"},"url":{"raw":"{{url}}/loyalties/members/:member-id/balance","host":["{{url}}"],"path":["loyalties","members",":member-id","balance"],"variable":[{"id":"c0a9fba4-5089-4b0d-8d02-dba3581d9a18","key":"member-id","value":"{{member_id}}","description":"Unique loyalty card assigned to a particular customer."}]}},"response":[],"_postman_id":"a5700116-b7dc-4af4-be3a-0232f561275d"},{"name":"Add or Remove Loyalty Card Balance","event":[{"listen":"test","script":{"id":"b64557aa-7b31-4ef5-a9ad-e6f978d9daf8","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript"}}],"id":"520fbcb9-2da8-4892-843b-7557f9addbd6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"points\": 100, // Incremental balance to be added to/subtracted from the loyalty card. To add points: 100. To subtract points, add a minus: -100\n    \"expiration_type\": \"CUSTOM_DATE\", // Set the type of expiration for added points. PROGRAM_RULES: Inherit rules from campaign. NON_EXPIRING: Points never expire. CUSTOM_DATE: Points expire on a particular date. Requires expiration_date parameter.\n    \"expiration_date\": \"2024-05-30\" // Set expiration date for added points, i.e. YYYY-MM-DD. This parameter is required only when expiration_type is set to CUSTOM_DATE.\n}"},"url":{"raw":"{{url}}/loyalties/:campaign-id/members/:member-id/balance","host":["{{url}}"],"path":["loyalties",":campaign-id","members",":member-id","balance"],"variable":[{"id":"6e277de2-c96e-4196-83a6-6b3cc037ccb4","key":"campaign-id","value":"{{campaign_id}}","description":"Unique campaign ID."},{"id":"e8c71dcd-8092-4755-85b2-8f1e79a1e853","key":"member-id","value":"{{member_id}}","description":"A code that identifies the loyalty card."}]}},"response":[],"_postman_id":"520fbcb9-2da8-4892-843b-7557f9addbd6"},{"name":"Transfer Points","event":[{"listen":"test","script":{"id":"52550909-2565-497a-a972-2d4a646faf61","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript"}}],"id":"ebb953de-e586-4dde-8d55-89b4b76d893b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"[\n    {\n        \"code\": \"{{loyalty_card_code}}\", // Unique loyalty card code from which the user wants to transfer loyalty points (source).\n        \"points\": 25 // 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).\n    },\n    {\n        \"code\": \"{{loyalty_card_code}}\",\n        \"points\": 10\n    }\n]"},"url":{"raw":"{{url}}/loyalties/:campaign-id/members/:member-id/transfers","host":["{{url}}"],"path":["loyalties",":campaign-id","members",":member-id","transfers"],"variable":[{"id":"2cf5557f-86ab-46b0-8e8d-f3c45d3595d9","key":"campaign-id","value":"{{campaign_id}}","description":"A unique identifier of the loyalty campaign containing the voucher to which the loyalty points will be sent (destination)."},{"id":"6f6f1e7e-2563-4824-b4c9-8530319d802c","key":"member-id","value":"{{member_id}}","description":"A unique code identifying the loyalty card to which the user wants to transfer loyalty points (destination)."}]}},"response":[],"_postman_id":"ebb953de-e586-4dde-8d55-89b4b76d893b"},{"name":"Estimate Points","event":[{"listen":"test","script":{"id":"52550909-2565-497a-a972-2d4a646faf61","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript","packages":{},"requests":{}}}],"id":"5297c72a-a216-4876-97c3-85de83b5462a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{  \n    \"customer\": {  \n        \"source_id\": \"{{source_id}}\",  // 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.\n        \"metadata\": {  \n            \"reason\": \"loyaltyQualifications\"  // The metadata object stores all custom attributes assigned to the customer. A set of key/value pairs that you can attach to a customer object. It can be useful for storing additional information about the customer in a structured format.\n        }  \n    },  \n    \"order\": {  \n        \"id\": \"{{order_id}}\",  // A unique identifier of the order.\n        \"metadata\": {  \n            \"source\": \"qualifyPoints\"  // The metadata object stores all custom attributes assigned to the order. A set of key/value pairs that you can attach to an order object. It can be useful for storing additional information about the order in a structured format.\n        }  \n    }\n}"},"url":{"raw":"{{url}}/v1/loyalties/:campaign-id/qualifications","host":["{{url}}"],"path":["v1","loyalties",":campaign-id","qualifications"],"variable":[{"key":"campaign-id","value":"{{campaign_id}}","description":"A unique identifier of the loyalty campaign containing the voucher to which the loyalty points will be sent (destination)."}]},"description":"Endpoint to estimate loyalty points for a given campaign based on customer and order context."},"response":[],"_postman_id":"5297c72a-a216-4876-97c3-85de83b5462a"},{"name":"List Loyalty Card Transactions - alternative","id":"9a629ee1-b609-4182-830a-74f0dc2841d5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/loyalties/members/:member-id/transactions?limit=100&order={{id}}&starting_after_id={{id}}&filters[created_at][$after]=2024-01-01T00:00:00.000Z","host":["{{url}}"],"path":["loyalties","members",":member-id","transactions"],"query":[{"key":"limit","value":"100","description":"Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items."},{"key":"order","value":"{{id}}","description":"Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order."},{"key":"starting_after_id","value":"{{id}}","description":"A cursor for pagination. It retrieves the transactions starting after a transaction with the given ID."},{"key":"filters[created_at][$after]","value":"2024-01-01T00:00:00.000Z","description":"Value is after this date. The value for this parameter is shown in the ISO 8601 format.","type":"text"},{"key":"filters[id][$is]","value":"XYZ","description":"Value is exactly this value (single value).","type":"text","disabled":true}],"variable":[{"key":"member-id","value":"{{member_id}}","description":"A unique code identifying the loyalty card that you are looking to retrieve transaction data for."}]}},"response":[],"_postman_id":"9a629ee1-b609-4182-830a-74f0dc2841d5"},{"name":"List Loyalty Card Transactions","id":"5ca7ef6c-f8f4-4502-a67d-cae9d21f8417","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/loyalties/:campaign-id/members/:member-id/transactions?limit=100&order={{id}}&starting_after_id={{id}}&filters[created_at][$after]=2024-01-01T00:00:00.000Z","host":["{{url}}"],"path":["loyalties",":campaign-id","members",":member-id","transactions"],"query":[{"key":"limit","value":"100","description":"Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items."},{"key":"order","value":"{{id}}","description":"Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order."},{"key":"starting_after_id","value":"{{id}}","description":"A cursor for pagination. It retrieves the transactions starting after a transaction with the given ID."},{"key":"filters[created_at][$after]","value":"2024-01-01T00:00:00.000Z","description":"Value is after this date. The value for this parameter is shown in the ISO 8601 format.","type":"text"},{"key":"filters[id][$is]","value":"XYZ","description":"Value is exactly this value (single value).","type":"text","disabled":true}],"variable":[{"key":"campaign-id","value":"{{campaign_id}}","description":"A unique identifier of the loyalty campaign containing the voucher whose transactions you would like to return."},{"key":"member-id","value":"{{member_id}}","description":"A unique code identifying the loyalty card that you are looking to retrieve transaction data for."}]}},"response":[],"_postman_id":"5ca7ef6c-f8f4-4502-a67d-cae9d21f8417"},{"name":"Export Loyalty Card Transactions - alternative","id":"55f4dc53-21a0-45e4-a44b-e6c29bd4d511","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"parameters\": { // List of available fields and filters that can be exported with an order along with the sorting order of the returned data.\n        \"order\": \"-created_at\",\n        \"fields\": [\n            \"id\",\n            \"type\",\n            \"source_id\",\n            \"reason\",\n            \"balance\",\n            \"amount\",\n            \"created_at\",\n            \"voucher_id\",\n            \"campaign_id\",\n            \"details\",\n            \"related_transaction_id\"\n        ]\n    }\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"{{url}}/loyalties/members/:member-id/transactions/export","host":["{{url}}"],"path":["loyalties","members",":member-id","transactions","export"],"variable":[{"id":"414bdc1c-1703-46db-8603-f9c31a11e77c","key":"member-id","value":"{{member_id}}","description":"A unique code identifying the loyalty card that you are looking to export transaction data for."}]}},"response":[],"_postman_id":"55f4dc53-21a0-45e4-a44b-e6c29bd4d511"},{"name":"Export Loyalty Card Transactions","id":"aceceea7-8b80-4a34-9882-ed2bdc67809e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"parameters\": { // List of available fields and filters that can be exported with an order along with the sorting order of the returned data.\n        \"order\": \"-created_at\",\n        \"fields\": [\n            \"id\",\n            \"type\",\n            \"source_id\",\n            \"reason\",\n            \"balance\",\n            \"amount\",\n            \"created_at\",\n            \"voucher_id\",\n            \"campaign_id\",\n            \"details\",\n            \"related_transaction_id\"\n        ]\n    }\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"{{url}}/loyalties/:campaign-id/members/:member-id/transactions/export","host":["{{url}}"],"path":["loyalties",":campaign-id","members",":member-id","transactions","export"],"variable":[{"id":"b6fe283b-61ac-401f-a125-0730dae6a976","key":"campaign-id","value":"{{campaign_id}}","description":"A unique identifier of the loyalty campaign containing the voucher whose transactions you would like to export."},{"id":"ecba81a7-c373-4f45-84db-5ae9d07f0870","key":"member-id","value":"{{member_id}}","description":"A unique code identifying the loyalty card that you are looking to export transaction data for."}]}},"response":[],"_postman_id":"aceceea7-8b80-4a34-9882-ed2bdc67809e"},{"name":"Get Points Expiration","id":"0240d0e7-e3f2-4d5d-ac00-986a4f9a7d19","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/loyalties/:campaign-id/members/:member-id/points-expiration?limit=100&page=1","host":["{{url}}"],"path":["loyalties",":campaign-id","members",":member-id","points-expiration"],"query":[{"key":"limit","value":"100","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100 items."},{"key":"page","value":"1","description":"Which page of results to return."}],"variable":[{"id":"5cd07060-3a32-4e6f-bfce-f4c2fa4e3cb5","key":"campaign-id","value":"{{campaign_id or campaign_name}}","description":"The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign."},{"id":"cd305d84-a328-4067-8485-1436569a4849","key":"member-id","value":"{{member_id}}","description":"Loyalty card code."}]}},"response":[],"_postman_id":"0240d0e7-e3f2-4d5d-ac00-986a4f9a7d19"},{"name":"List Member Rewards","id":"7d29873e-69dc-4027-9833-3a7db5263366","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/loyalties/members/:member-id/rewards?affordable_only=true","host":["{{url}}"],"path":["loyalties","members",":member-id","rewards"],"query":[{"key":"affordable_only","value":"true","description":"Limit the results to rewards that the customer can actually afford (only rewards whose price in points is not higher than the loyalty points balance on a loyalty card). Set this flag to true to return rewards which the customer can actually afford."}],"variable":[{"id":"cd233f55-0efe-4ecc-a0b9-27f868d5dc0a","key":"member-id","value":"{{member_id}}","description":"Unique loyalty card assigned to a particular customer."}]}},"response":[],"_postman_id":"7d29873e-69dc-4027-9833-3a7db5263366"},{"name":"Redeem Reward - alternative","event":[{"listen":"test","script":{"id":"4729fcb7-44a8-4667-a61b-076770c9a0ac","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript"}}],"id":"c50a42db-80e0-4e5d-ae52-3e7d4308542a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"reward\": { // Contains information about the reward that the customer wants to redeem and the number of points the customer is choosing to use for the reward if the reward is a pay with points reward.\n        \"id\": \"{{reward_id}}\", // Unique reward ID assigned by Voucherify. The reward must be assigned to the campaign in order for the user to be able to use the reward.\n        \"points\": 100 // The number of loyalty points that the user wants to spend in order to fulfill the order. The number of points cannot be higher than the current balance on the loyalty card.\n    },\n    \"order\": { // Order object that is required when redeeming a pay with points reward.\n        \"items\": [ // Array of items applied to the order.\n            {\n                \"product_id\": \"{{product_id}}\", // A unique product ID assigned by Voucherify.\n                \"quantity\": \"1\" // The quantity of the particular item in the cart.\n            },\n            {\n                \"product_id\": \"{{product_id}}\",\n                \"quantity\": \"2\"\n            }\n        ]\n    }\n}"},"url":{"raw":"{{url}}/loyalties/members/:member-id/redemption","host":["{{url}}"],"path":["loyalties","members",":member-id","redemption"],"variable":[{"id":"22c013ce-a3d3-4e36-ab95-9ff5156e2f40","key":"member-id","value":"{{member_id}}","description":"Unique loyalty card assigned to a particular customer."}]}},"response":[],"_postman_id":"c50a42db-80e0-4e5d-ae52-3e7d4308542a"},{"name":"Redeem Reward","event":[{"listen":"test","script":{"id":"4729fcb7-44a8-4667-a61b-076770c9a0ac","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript"}}],"id":"80ca2389-7b89-4d2f-b0b0-843e52d4f126","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"reward\": { // Contains information about the reward that the customer wants to redeem and the number of points the customer is choosing to use for the reward if the reward is a pay with points reward.\n        \"id\": \"{{reward_id}}\", // Unique reward ID assigned by Voucherify. The reward must be assigned to the campaign in order for the user to be able to use the reward.\n        \"points\": 100 // The number of loyalty points that the user wants to spend in order to fulfill the order. The number of points cannot be higher than the current balance on the loyalty card.\n    },\n    \"order\": { // Order object that is required when redeeming a pay with points reward.\n        \"items\": [ // Array of items applied to the order.\n            {\n                \"product_id\": \"{{product_id}}\", // A unique product ID assigned by Voucherify.\n                \"quantity\": \"1\" // The quantity of the particular item in the cart.\n            },\n            {\n                \"product_id\": \"{{product_id}}\",\n                \"quantity\": \"2\"\n            }\n        ]\n    }\n}"},"url":{"raw":"{{url}}/loyalties/:campaign-id/members/:member-id/redemption","host":["{{url}}"],"path":["loyalties",":campaign-id","members",":member-id","redemption"],"variable":[{"id":"f1925be0-3a06-49f9-94a1-737a1f52e97b","key":"campaign-id","value":"{{campaign_id}}","description":"Unique campaign ID."},{"id":"fef8251a-a55f-4daa-9b09-b86fa8e12cf4","key":"member-id","value":"{{member_id}}","description":"A code that identifies the loyalty card."}]}},"response":[],"_postman_id":"80ca2389-7b89-4d2f-b0b0-843e52d4f126"},{"name":"List Member's Loyalty Tiers","id":"0bbaa53f-a21b-4571-aabf-12a7a6cc4705","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/loyalties/members/:member-id/tiers","host":["{{url}}"],"path":["loyalties","members",":member-id","tiers"],"variable":[{"id":"49b20798-87da-4b1e-893b-7a48b0c7dd85","key":"member-id","value":"{{member_id}}","description":"Unique loyalty card assigned to a particular customer."}]}},"response":[],"_postman_id":"0bbaa53f-a21b-4571-aabf-12a7a6cc4705"}],"id":"588efb26-250c-4512-9af2-ab1dbc863401","description":"This section focuses on endpoints used for interactions with members, such as adding new members, pulling member details, or listing rewards per member.","_postman_id":"588efb26-250c-4512-9af2-ab1dbc863401"},{"name":"Referrals","item":[{"name":"List Referral Code Holders","id":"a00b8aec-c836-48e7-b78f-08d7b53c23ef","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}","type":"text"},{"key":"X-App-Token","value":"{{X-App-Token}}","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"url":{"raw":"{{url}}/referrals/:campaignId/members/:memberId/holders","host":["{{url}}"],"path":["referrals",":campaignId","members",":memberId","holders"],"query":[{"key":"limit","value":"{{number}}","description":"Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.","disabled":true},{"key":"order","value":"{{id}}","description":"Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.","disabled":true},{"key":"starting_after_id","value":"{{id}}","description":"A cursor for pagination. It retrieves the results starting after the given ID.","type":"text","disabled":true},{"key":"filters[id][conditions][$in][0]","value":"{{redeemable_holder_id}}","description":"Unique redeemable holder ID, i.e. rh_0e77502f84f0f4a6a8.","type":"text","disabled":true},{"key":"filters[holder_role][conditions][$is]","value":"REFEREE","description":"Holder role of the redeemable. Allowed values: REFEREE, REFERRER.","type":"text","disabled":true},{"key":"filters[customer_id][conditions][$in][0]","value":"{{customer_id}}","description":"Unique customer ID, i.e. cust_sehkNIi8Uq2qQuRqSr7xn4Zi.","type":"text","disabled":true},{"key":"filters[junction]","value":"AND","description":"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.","type":"text","disabled":true}],"variable":[{"key":"campaignId","value":"{{campaign_id}}","description":"Unique identifier of a referral program campaign."},{"key":"memberId","value":"{{member_id}}","description":"Unique referral code or its identifier."}]}},"response":[],"_postman_id":"a00b8aec-c836-48e7-b78f-08d7b53c23ef"},{"name":"List Referral Code Holders (alternative)","id":"4d15aee9-42a2-411a-b8b7-c53cfe588729","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}","type":"text"},{"key":"X-App-Token","value":"{{X-App-Token}}","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"url":{"raw":"{{url}}/referrals/members/:memberId/holders","host":["{{url}}"],"path":["referrals","members",":memberId","holders"],"query":[{"key":"limit","value":"{{number}}","description":"Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.","disabled":true},{"key":"order","value":"{{id}}","description":"Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.","disabled":true},{"key":"starting_after_id","value":"{{id}}","description":"A cursor for pagination. It retrieves the results starting after the given ID.","type":"text","disabled":true},{"key":"filters[id][conditions][$in][0]","value":"{{redeemable_holder_id}}","description":"Unique redeemable holder ID, i.e. rh_0e77502f84f0f4a6a8.","type":"text","disabled":true},{"key":"filters[holder_role][conditions][$is]","value":"REFEREE","description":"Holder role of the redeemable. Allowed values: REFEREE, REFERRER.","type":"text","disabled":true},{"key":"filters[customer_id][conditions][$in][0]","value":"{{customer_id}}","description":"Unique customer ID, i.e. cust_sehkNIi8Uq2qQuRqSr7xn4Zi.","type":"text","disabled":true},{"key":"filters[junction]","value":"AND","description":"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.","type":"text","disabled":true}],"variable":[{"key":"memberId","value":"{{member_id}}","description":"Unique referral code or its identifier."}]}},"response":[],"_postman_id":"4d15aee9-42a2-411a-b8b7-c53cfe588729"},{"name":"Add Referral Code Holders","id":"a0f618b9-d7ca-4270-bc0b-1a9c2d970df1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}","type":"text"},{"key":"X-App-Token","value":"{{X-App-Token}}","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n   \"holders\":[ // Array of holders to be added to a referral card as referees. You have to send at least one object in the array up to a maximum of 100 objects. You can send either a source_id or id, or both; however, at least one of them is required. If both are sent, Voucherify checks id to upsert that customer's data.\n      {\n         \"source_id\":\"13082024\", // 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.\n         \"name\":\"Max Sandler\", // Customer's first and last name.\n         \"email\":\"max-sandler@your.domain.com\", // Customer's email address.\n         \"country\":\"England\" // Country.\n      },\n      {\n         \"source_id\":\"14082024\",\n         \"name\":\"Alex Joe\",\n         \"email\":\"alex-joe@your.domain.com\",\n         \"country\":\"Wales\"\n      }\n   ],\n   \"metadata\":{ // 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.\n      \"influencer_code\":true\n   }\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"{{url}}/referrals/:campaignId/members/:memberId/holders","host":["{{url}}"],"path":["referrals",":campaignId","members",":memberId","holders"],"variable":[{"key":"campaignId","value":"{{campaign_id}}","description":"Unique identifier of a referral program campaign."},{"key":"memberId","value":"{{member_id}}","description":"Unique referral code or its identifier."}]}},"response":[],"_postman_id":"a0f618b9-d7ca-4270-bc0b-1a9c2d970df1"},{"name":"Add Referral Code Holders (alternative)","id":"698e3fe7-c144-42b4-aa40-86cfcc9e788a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}","type":"text"},{"key":"X-App-Token","value":"{{X-App-Token}}","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n   \"holders\":[ // Array of holders to be added to a referral card as referees. You have to send at least one object in the array up to a maximum of 100 objects. You can send either a source_id or id, or both; however, at least one of them is required. If both are sent, Voucherify checks id to upsert that customer's data.\n      {\n         \"source_id\":\"13082024\", // 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.\n         \"name\":\"Max Sandler\", // Customer's first and last name.\n         \"email\":\"max-sandler@your.domain.com\", // Customer's email address.\n         \"country\":\"England\" // Country.\n      },\n      {\n         \"source_id\":\"14082024\",\n         \"name\":\"Alex Joe\",\n         \"email\":\"alex-joe@your.domain.com\",\n         \"country\":\"Wales\"\n      }\n   ],\n   \"metadata\":{ // 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.\n      \"influencer_code\":true\n   }\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"{{url}}/referrals/members/:memberId/holders","host":["{{url}}"],"path":["referrals","members",":memberId","holders"],"variable":[{"key":"memberId","value":"{{member_id}}","description":"Unique referral code or its identifier."}]}},"response":[],"_postman_id":"698e3fe7-c144-42b4-aa40-86cfcc9e788a"},{"name":"Remove Referral Code Holder","id":"f0aec61f-3a71-411a-ade9-b846d56b3a4a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"X-App-Id","value":"{{X-App-Id}}","type":"text"},{"key":"X-App-Token","value":"{{X-App-Token}}","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"url":{"raw":"{{url}}/referrals/:campaignId/members/:memberId/holders/:holderId","host":["{{url}}"],"path":["referrals",":campaignId","members",":memberId","holders",":holderId"],"variable":[{"key":"campaignId","value":"{{campaign_id}}","description":"Unique identifier of a referral program campaign."},{"key":"memberId","value":"{{member_id}}","description":"Unique referral code or its identifier."},{"key":"holderId","value":"{{holder_id}}","description":"Unique identifier of a redeemable holder."}]}},"response":[],"_postman_id":"f0aec61f-3a71-411a-ade9-b846d56b3a4a"},{"name":"Remove Referral Code Holder (alternative)","id":"2d0454cb-ddb4-454d-870f-e958ce6a2bcf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"X-App-Id","value":"{{X-App-Id}}","type":"text"},{"key":"X-App-Token","value":"{{X-App-Token}}","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"url":{"raw":"{{url}}/referrals/members/:memberId/holders/:holderId","host":["{{url}}"],"path":["referrals","members",":memberId","holders",":holderId"],"variable":[{"key":"memberId","value":"{{member_id}}","description":"Unique referral code or its identifier."},{"key":"holderId","value":"{{holder_id}}","description":"Unique identifier of a redeemable holder."}]}},"response":[],"_postman_id":"2d0454cb-ddb4-454d-870f-e958ce6a2bcf"}],"id":"b3ccc66c-6991-4868-af16-1f9992a78be2","description":"This section focuses on the endpoints connected with referral programs. You can list, add, or remove code holders.","_postman_id":"b3ccc66c-6991-4868-af16-1f9992a78be2"},{"name":"Customers","item":[{"name":"List Customers","event":[{"listen":"test","script":{"id":"f2408750-dafa-4577-991c-2650466a85ec","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","",""],"type":"text/javascript"}}],"id":"32e98a54-893f-4d3d-b526-7c4e0b320226","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/customers?limit=100&page=1&city=Paris&segment_id={{segment_id}}","host":["{{url}}"],"path":["customers"],"query":[{"key":"email","value":"{{email}}","description":"Limit the customers to the ones that have this specific email address.","disabled":true},{"key":"name","value":"{{name}}","description":"Filter customers by the name property.","disabled":true},{"key":"order","value":"{{order}}","description":"This is a property that controls the sorting direction of the results. Sort the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.","disabled":true},{"key":"starting_after","value":"{{date and time}}","description":"A cursor for use in 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. The value has to be passed in the UTF-8 encoding standard.","disabled":true},{"key":"limit","value":"100","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100 items."},{"key":"page","value":"1","description":"Which page of results to return."},{"key":"city","value":"Paris","description":"Limit the customers to the ones that are located in the specified city."},{"key":"segment_id","value":"{{segment_id}}","description":"Filter customers by the segment id."}]}},"response":[],"_postman_id":"32e98a54-893f-4d3d-b526-7c4e0b320226"},{"name":"Get Customer","event":[{"listen":"test","script":{"id":"d0fe9a75-69c8-4842-84a4-1d65bbea7dfe","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","",""],"type":"text/javascript"}}],"id":"82f6e3f5-315e-4dd6-b030-6409b25cccb0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/customers/:customer-id-or-source-id","host":["{{url}}"],"path":["customers",":customer-id-or-source-id"],"variable":[{"id":"5e8504a6-4753-4291-930c-2f25ae3b5a28","key":"customer-id-or-source-id","value":"{{customer_id or source_id}}","description":"A Voucherify customer's id or source_id."}]}},"response":[],"_postman_id":"82f6e3f5-315e-4dd6-b030-6409b25cccb0"},{"name":"List Customer Activity","event":[{"listen":"test","script":{"id":"1fc68caf-a936-4b6c-805c-4f0c8d162854","exec":["tests[\"Status code is 400\"] = responseCode.code === 412;","",""],"type":"text/javascript","packages":{}}}],"id":"d51254ab-e5b0-4d02-b396-001189c12f04","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/customers/:customerId/activity","host":["{{url}}"],"path":["customers",":customerId","activity"],"query":[{"key":"order","value":"{{order}}","description":"Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.","disabled":true},{"key":"starting_after","value":"{{date and time}}","description":"A cursor for use in pagination. starting_after is a date-time value that defines your place in the list based on created_at property from the activity 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. The value has to be passed in the UTF-8 encoding standard.","disabled":true},{"key":"starting_after_id","value":"{{event_id}}","description":"By applying this filter value, you will get events starting after an event with the given ID.","disabled":true}],"variable":[{"key":"customerId","value":"{{customer_id}}","description":"ID of a customer in Voucherify."}]}},"response":[],"_postman_id":"d51254ab-e5b0-4d02-b396-001189c12f04"},{"name":"List Customer's Segments","id":"69798199-a70d-4dba-909e-35f9404b1723","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/customers/:customer-id/segments","host":["{{url}}"],"path":["customers",":customer-id","segments"],"variable":[{"id":"b633770a-ca2c-4591-b2ce-76a1815e004e","key":"customer-id","value":"{{customer_id or source_id}}","description":"Unique identifier of a customer represented by an internal customer ID or customer source ID."}]}},"response":[],"_postman_id":"69798199-a70d-4dba-909e-35f9404b1723"},{"name":"List Customer Redeemables","id":"7fd1728e-4821-48fa-b65b-10acab74e616","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/customers/:customerId/redeemables","host":["{{url}}"],"path":["customers",":customerId","redeemables"],"query":[{"key":"limit","value":"100","description":"Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.","type":"text","disabled":true},{"key":"order","value":"id","description":"Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.","type":"text","disabled":true},{"key":"starting_after_id","value":"{{event_id}}","description":"A cursor for pagination. It retrieves the events starting after an event with the given ID.","type":"text","disabled":true},{"key":"filters[id][conditions][$in][0]","value":"{{redeemable_holder_id}}","description":"Unique redeemable holder ID, i.e. rh_0e77502f84f0f4a6a8.","type":"text","disabled":true},{"key":"filters[holder_role][conditions][$is]","value":"REFERRER","description":"Holder role of the redeemable. Allowed values: OWNER, REFEREE, REFERRER.","type":"text","disabled":true},{"key":"filters[campaign_type][conditions][$in][0]","value":"REFERRAL_PROGRAM","description":"Type of the campaign. Allowed values: DISCOUNT_COUPONS, REFERRAL_PROGRAM, GIFT_VOUCHERS, LOYALTY_PROGRAM.","type":"text","disabled":true},{"key":"filters[junction]","value":"AND","description":"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.","type":"text","disabled":true}],"variable":[{"key":"customerId","value":"{{customer_id}}","description":"Unique identifier of a customer represented by an internal customer ID or customer source ID."}]}},"response":[],"_postman_id":"7fd1728e-4821-48fa-b65b-10acab74e616"},{"name":"Create Customer","event":[{"listen":"test","script":{"id":"06bae8ae-151e-4f89-a5eb-c3df9be22174","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Customer id is defined\"] = _.isUndefined(jsonData.id) === false;","tests[\"Source id is src_id\"] = jsonData.source_id === pm.environment.get(\"test-customer-email\");","tests[\"Date is correct\"] = Math.abs(Date.create(jsonData.created_at) - Date.create(pm.environment.get(\"start-date\"))) < 5000;","","pm.environment.set(\"customer-id\", jsonData.id);",""],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"c4dd5b36-6ef0-4495-a617-c022129bda79","exec":["pm.environment.set(\"test-customer-email\", \"postman.dev.tests+\" + Number.random(1, 1000000) + \"@voucherify.io\");","pm.environment.set(\"start-date\", new Date().toISOString());",""],"type":"text/javascript"}}],"id":"a1150792-666a-40db-a19a-c0a0472d325e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"source_id\": \"source_123\", // 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.\n    \"name\": \"Bob Smith\", // Customer's first and last name.\n    \"description\": \"A frequent customer\", // An arbitrary string that you can attach to a customer object.\n    \"email\": \"bob.smith@email.com\", // Customer's email address.\n    \"phone\": \"+1 933 222 3333\", // Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel.\n    \"address\": { // Customer's address.\n        \"city\": \"New York\",\n        \"country\": \"United States\",\n        \"line_1\": \"123 Main St.\",\n        \"line_2\": \"APT 3 BLG 4\",\n        \"postal_code\": \"10001\",\n        \"state\": \"NY\"\n    },\n    \"metadata\": { // 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.\n        \"lang\": \"en\",\n        \"test\": true\n    },\n    \"birthdate\": \"1991-11-24\" // Customer's birthdate; format YYYY-MM-DD.\n}"},"url":"{{url}}/customers"},"response":[],"_postman_id":"a1150792-666a-40db-a19a-c0a0472d325e"},{"name":"Import and Update Customers Using CSV","event":[{"listen":"test","script":{"id":"c1969685-78bd-428e-8d5a-6a910e74ae7f","exec":["tests[\"Status code is 400\"] = responseCode.code === 400;","",""],"type":"text/javascript"}}],"id":"d369621f-f7e5-4d9d-9bba-84a66bd62223","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"}],"body":{"mode":"formdata","formdata":[{"key":"file","type":"file","value":null}]},"url":"{{url}}/customers/importCSV"},"response":[],"_postman_id":"d369621f-f7e5-4d9d-9bba-84a66bd62223"},{"name":"Update Customer","event":[{"listen":"test","script":{"id":"474e6e93-301f-4f6b-9f05-35859767f61d","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Customer id is defined\"] = _.isUndefined(jsonData.id) === false;","tests[\"Customer email is updated\"] = jsonData.email === 'john@voucherify.io';","",""],"type":"text/javascript"}}],"id":"4f5f0a9d-6699-4d8f-a007-7e593f0bffa7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"source_id\": \"source_123\", // 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.\n    \"name\": \"Bob Smith\", // Customer's first and last name.\n    \"description\": \"A frequent customer\", // An arbitrary string that you can attach to a customer object.\n    \"email\": \"bob.smith@email.com\", // Customer's email address.\n    \"phone\": \"+1 933 222 3333\", // Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel.\n    \"address\": { // Customer's address.\n        \"city\": \"Quebec\",\n        \"country\": \"Canada\",\n        \"line_1\": \"123 Main St.\",\n        \"line_2\": \"APT 3 BLG 4\",\n        \"postal_code\": \"10001\"\n    },\n    \"metadata\": { // 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.\n        \"lang\": \"en\",\n        \"test\": true\n    },\n    \"birthdate\": \"1991-11-24\" // Customer's birthdate; format YYYY-MM-DD.\n}"},"url":{"raw":"{{url}}/customers/:customer-id-or-source-id","host":["{{url}}"],"path":["customers",":customer-id-or-source-id"],"variable":[{"id":"f226bf8f-a36f-4819-af3a-20c3b41b386f","key":"customer-id-or-source-id","value":"{{customer_id or source_id}}","description":"A Voucherify customer's id or source_id."}]}},"response":[],"_postman_id":"4f5f0a9d-6699-4d8f-a007-7e593f0bffa7"},{"name":"Update Customer's Consents (deprecated)","event":[{"listen":"test","script":{"id":"b17d80af-559f-4a37-9b03-726372104c2b","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Order amount is 12345\"] = jsonData.amount === 12345;","tests[\"Order status is CREATED\"] = jsonData.status === \"CREATED\";","","pm.environment.set(\"order-id\", jsonData.id);","pm.environment.set(\"order-customer-id\", jsonData.id);"],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"fdd48aea-0f0c-4136-a86f-8a9a6abee074","exec":["pm.environment.set(\"start-date\", new Date().toISOString());",""],"type":"text/javascript"}}],"id":"11dd034a-b3b2-4cdd-b181-a771c5e284a8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"{{consent_ID_1}}\": true, // Key-value pairs where the key is the consent identifier and value is a boolean that identifies if a customer has given the consent or not.\n    \"{{consent_ID_2}}\": true,\n    \"unsubscribed\": true // To deny all consents, use unsubscribed as a consent identifier and true as a value.\n}"},"url":{"raw":"{{url}}/customers/:customer-id/consents","host":["{{url}}"],"path":["customers",":customer-id","consents"],"variable":[{"key":"customer-id","value":"{{customer_id or source_id}}","description":"A Voucherify unique customer identifier or source ID."}]}},"response":[],"_postman_id":"11dd034a-b3b2-4cdd-b181-a771c5e284a8"},{"name":"Update Customers in Bulk","event":[{"listen":"test","script":{"id":"4769162e-8096-484f-991c-c9857c8a18b8","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Customer id is defined\"] = _.isUndefined(jsonData.id) === false;","tests[\"Customer email is updated\"] = jsonData.email === 'john@voucherify.io';","",""],"type":"text/javascript"}}],"id":"af66a4fd-4ed8-4238-a2f5-6c5572fb743d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"[\n    {\n        \"source_id\": \"source_123\", // 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.\n        \"name\": \"Bob Smith\", // Customer's first and last name.\n        \"description\": \"A frequent customer\", // An arbitrary string that you can attach to a customer object.\n        \"email\": \"bob.smith@email.com\", // Customer's email address.\n        \"phone\": \"+1 933 222 3333\", // Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel.\n        \"address\": { // Customer's address.\n            \"city\": \"Quebec\",\n            \"country\": \"Canada\",\n            \"line_1\": \"123 Main St.\",\n            \"line_2\": \"APT 3 BLG 4\",\n            \"postal_code\": \"10001\"\n        },\n        \"metadata\": { // 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.\n            \"lang\": \"en\",\n            \"test\": true\n        },\n        \"birthdate\": \"1991-11-24\" // Customer's birthdate; format YYYY-MM-DD.\n    },\n    {\n        \"source_id\": \"Jane.Smith@email.com\",\n        \"name\": \"Jane Smith\",\n        \"email\": \"Jane.Smith@email.com\",\n        \"description\": \"Updating customer data\",\n        \"phone\": \"+1 (132) 222-2222\",\n        \"address\": {\n            \"city\": \"New York\",\n            \"country\": \"United States\",\n            \"line_1\": \"123 Main St.\",\n            \"line_2\": \"APT 3 BLG 4\",\n            \"postal_code\": \"10001\",\n            \"state\": \"NY\"\n        },\n        \"metadata\": {\n            \"lang\": \"en\",\n            \"test\": true\n        },\n        \"birthday\": \"1962-03-03\"\n    },\n    {\n        \"source_id\": \"Sally.Smith@email.com\",\n        \"name\": \"Sally Smith\",\n        \"email\": \"Sally.Smith@email.com\",\n        \"description\": \"Updating customer data\",\n        \"phone\": \"+1 (132) 222-2222\",\n        \"address\": {\n            \"city\": \"New York\",\n            \"country\": \"United States\",\n            \"line_1\": \"123 Main St.\",\n            \"line_2\": \"APT 3 BLG 4\",\n            \"postal_code\": \"10001\",\n            \"state\": \"NY\"\n        },\n        \"metadata\": {\n            \"lang\": \"en\",\n            \"test\": true\n        },\n        \"birthdate\": \"2000-02-02\"\n    }\n]"},"url":"{{url}}/customers/bulk/async"},"response":[],"_postman_id":"af66a4fd-4ed8-4238-a2f5-6c5572fb743d"},{"name":"Update Customers' Metadata in Bulk","event":[{"listen":"test","script":{"id":"a7a5a8e1-6370-463d-a166-1ce491b6e45f","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Customer id is defined\"] = _.isUndefined(jsonData.id) === false;","tests[\"Customer email is updated\"] = jsonData.email === 'john@voucherify.io';","",""],"type":"text/javascript"}}],"id":"ebf6c9c0-ab46-486f-8111-f61f10f3584a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"source_ids\": [ // An array of customer source_id's.\n        \"source_123\",\n        \"source_456\"\n    ],\n    \"metadata\": { // Metadata key value pairs to be updated. 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.\n        \"lang\": \"en\",\n        \"test\": false\n    }\n}"},"url":"{{url}}/customers/metadata/async"},"response":[],"_postman_id":"ebf6c9c0-ab46-486f-8111-f61f10f3584a"},{"name":"Delete Customer","event":[{"listen":"test","script":{"id":"b1a7002e-b79c-4b63-986b-4a4aea421788","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","",""],"type":"text/javascript"}}],"id":"ecc241b2-2675-465e-8d35-ad11fed27168","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":""},"url":{"raw":"{{url}}/customers/:customer-id-or-source-id","host":["{{url}}"],"path":["customers",":customer-id-or-source-id"],"variable":[{"id":"663f816e-9eed-4dc8-a454-7e1a7b851672","key":"customer-id-or-source-id","value":"{{customer_id or source_id}}","description":"A Voucherify customer's id or source_id."}]}},"response":[],"_postman_id":"ecc241b2-2675-465e-8d35-ad11fed27168"},{"name":"Delete Customer Permanently","event":[{"listen":"test","script":{"id":"edd10b50-d1a7-441b-89ce-0786d7e08ea6","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","",""],"type":"text/javascript"}}],"id":"f6021fbb-3c83-46b9-80ab-781e51d9d693","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":""},"url":{"raw":"{{url}}/customers/:customer-id-or-source-id/permanent-deletion","host":["{{url}}"],"path":["customers",":customer-id-or-source-id","permanent-deletion"],"variable":[{"id":"9af5e2e6-c26a-40a5-89f6-33b4995bab1d","key":"customer-id-or-source-id","value":"{{customer_id or source_id}}","description":"A Voucherify customer's id or source_id."}]}},"response":[],"_postman_id":"f6021fbb-3c83-46b9-80ab-781e51d9d693"}],"id":"6ab7704b-ab3f-4a3b-9806-b81571445a17","description":"This section allows you to perform various operations on [ customers](https://docs.voucherify.io/reference/customer-object) and [ customer-related activities](https://docs.voucherify.io/reference/customer-activity-object). Synchronizing customer details with Voucherify is optional. You can read more about customer synchronization in our [documentation](https://docs.voucherify.io/docs/data-synchronization#customer-synchronization).","_postman_id":"6ab7704b-ab3f-4a3b-9806-b81571445a17"},{"name":"Orders","item":[{"name":"List Orders","event":[{"listen":"test","script":{"id":"442a7bb4-14f4-4fba-9e40-aae29e7b95d2","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Order amount is 12345\"] = jsonData.amount === 12345;","tests[\"Order status is CREATED\"] = jsonData.status === \"CREATED\";","","pm.environment.set(\"order-id\", jsonData.id);","pm.environment.set(\"order-customer-id\", jsonData.id);"],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"2742a451-f871-4458-98bc-0e1b3f1c82e3","exec":["pm.environment.set(\"start-date\", new Date().toISOString());",""],"type":"text/javascript"}}],"id":"781097e7-c6bd-4fad-b76d-4a3e43c4427b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":""},"url":{"raw":"{{url}}/orders?limit=100&page=1","host":["{{url}}"],"path":["orders"],"query":[{"key":"limit","value":"100","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100 items."},{"key":"page","value":"1","description":"Which page of results to return."}]}},"response":[],"_postman_id":"781097e7-c6bd-4fad-b76d-4a3e43c4427b"},{"name":"Get Order","event":[{"listen":"test","script":{"id":"1a3ee170-e820-431f-be23-7abd49158e7b","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Order amount is 12345\"] = jsonData.amount === 12345;","tests[\"Order status is CREATED\"] = jsonData.status === \"CREATED\";","","pm.environment.set(\"order-id\", jsonData.id);","pm.environment.set(\"order-customer-id\", jsonData.id);"],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"2ee4fab2-7da7-43dd-b3cc-aa007f1d2b2a","exec":["pm.environment.set(\"start-date\", new Date().toISOString());",""],"type":"text/javascript"}}],"id":"8fbfcf42-37ca-403e-8e01-e84b0a4809b7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"customer\": {\n        \"source_id\": \"123123\"\n    },\n    \"status\":\"PAID\",\n    \"items\": [\n        {\n            \"product_id\": \"prod_090cafbb84d3a81ce3\",\n            \"quantity\": 1,\n            \"price\": 1000,\n            \"product\": {\n                \"metadata\": {\n                    \"category\": \"a\"\n                }\n            }\n        },\n        {\n            \"product_id\": \"prod_092f74cb134164e32b\",\n            \"quantity\": 1,\n            \"price\": 1000,\n            \"product\": {\n                \"metadata\": {\n                    \"category\": \"b\"\n                }\n            }\n        }\n    ]\n}"},"url":{"raw":"{{url}}/orders/:order-id","host":["{{url}}"],"path":["orders",":order-id"],"variable":[{"id":"45c18b19-a741-43de-8d3a-bd334c33aa8c","key":"order-id","value":"{{order_id or order_source_id}}","description":"Unique Voucherify order ID or order source ID."}]}},"response":[],"_postman_id":"8fbfcf42-37ca-403e-8e01-e84b0a4809b7"},{"name":"Create Order","event":[{"listen":"test","script":{"id":"d13f4858-98e6-44cd-8f32-0ec5aecd4cfe","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Order amount is 12345\"] = jsonData.amount === 12345;","tests[\"Order status is CREATED\"] = jsonData.status === \"CREATED\";","","pm.environment.set(\"order-id\", jsonData.id);","pm.environment.set(\"order-customer-id\", jsonData.id);"],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"ff373d32-7e0f-4f01-a1fb-06089f65b141","exec":["pm.environment.set(\"start-date\", new Date().toISOString());",""],"type":"text/javascript"}}],"id":"ee10bd1b-61f1-4e96-b4bc-14892abd0ffc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"customer\": {\n        \"source_id\": \"{{customer_source_id}}\", // 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.\n        \"name\": \"Bob Smith\", // Customer's first and last name.\n        \"description\": \"A frequent customer\", // An arbitrary string that you can attach to a customer object.\n        \"email\": \"bob.smith@email.com\", // Customer's email address.\n        \"phone\": \"+1 933 222 3333\", // Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel.\n        \"address\": { // Customer's address.\n            \"city\": \"New York\",\n            \"country\": \"United States\",\n            \"line_1\": \"123 Main St.\",\n            \"line_2\": \"APT 3 BLG 4\",\n            \"postal_code\": \"10001\",\n            \"state\": \"NY\"\n        },\n        \"metadata\": { // 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.\n            \"lang\": \"en\",\n            \"test\": true\n        },\n        \"birthdate\": \"1991-11-24\" // Customer's birthdate; format YYYY-MM-DD.\n    },\n    \"amount\": 171000, // 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.\n    \"status\": \"PAID\", //The order status.\n    \"items\": [\n        {\n            \"quantity\": 1, // Subtotal quantity for each item. \n            \"price\": 90000, // Individual item price. Decimals are not used, so this means $900.00. \n            \"amount\": 90000, // Subtotal (quantity x price). Decimals are not used, so this means $900.00. \n            \"source_id\": \"galaxy_s24\", // Product's unique source ID.\n            \"name\": \"Samsung Galaxy\", // Source ID of the product.\n            \"related_object\": \"product\", // Used along with the source_id property, can be set to either sku or product.\n            \"product\": {\n                \"metadata\": { // Product metadata will vary based on custom attributes you assign. Examples are shown below. \n                    \"brand\": \"Samsung\",\n                    \"colour\": \"Indigo\",\n                    \"category\": \"smartphone\"\n                }\n            }\n        },\n        {\n            \"quantity\": 1, // Subtotal quantity for each item. \n            \"price\": 65000, // Individual item price. Decimals are not used, so this means $650.00. \n            \"amount\": 65000, // Subtotal (quantity x price). Decimals are not used, so this means $650.00. \n            \"source_id\": \"NT670U\", // Product's unique source ID.\n            \"name\": \"Samsung TV\", // Source ID of the product.\n            \"related_object\": \"product\", // Used along with the source_id property, can be set to either sku or product.\n            \"product\": {\n                \"metadata\": { // Product metadata will vary based on custom attributes you assign. Examples are shown below. \n                    \"brand\": \"Samsung\",\n                    \"colour\": \"black\",\n                    \"category\": \"tv\"\n                }\n            }\n        },\n        {\n            \"quantity\": 1, // Subtotal quantity for each item. \n            \"price\": 6000, // Individual item price. Decimals are not used, so this means $60.00. \n            \"amount\": 6000, // Subtotal (quantity x price). Decimals are not used, so this means $60.00. \n            \"source_id\": \"galaxy_active2\", // Product's unique source ID.\n            \"name\": \"Samsung Smartwatch\", // Source ID of the product.\n            \"related_object\": \"product\", // Used along with the source_id property, can be set to either sku or product.\n            \"product\": {\n                \"metadata\": { // Product metadata will vary based on custom attributes you assign. Examples are shown below. \n                    \"brand\": \"Samsung\",\n                    \"colour\": \"Blue\",\n                    \"category\": \"smartwatch\"\n                }\n            }\n        },\n        {\n            \"quantity\": 2, // Subtotal quantity for each item. \n            \"price\": 5000, // Individual item price. Decimals are not used, so this means $50.00. \n            \"amount\": 10000, // Subtotal (quantity x price). Decimals are not used, so this means $100.00. \n            \"source_id\": \"galaxy_buds\", // Product's unique source ID.\n            \"name\": \"Samsung Headphones\", // Source ID of the product.\n            \"related_object\": \"product\", // Used along with the source_id property, can be set to either sku or product.\n            \"product\": {\n                \"metadata\": { // Product metadata will vary based on custom attributes you assign. Examples are shown below. \n                    \"brand\": \"Samsung\",\n                    \"colour\": \"White\",\n                    \"category\": \"earbuds\"\n                }\n            }\n        }\n    ]\n}"},"url":"{{url}}/orders"},"response":[],"_postman_id":"ee10bd1b-61f1-4e96-b4bc-14892abd0ffc"},{"name":"Update Order","event":[{"listen":"test","script":{"id":"b1dcecae-4bfa-4735-aad9-72e232d1e412","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Order amount is 12345\"] = jsonData.amount === 12345;","tests[\"Order status is CREATED\"] = jsonData.status === \"CREATED\";","","pm.environment.set(\"order-id\", jsonData.id);","pm.environment.set(\"order-customer-id\", jsonData.id);"],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"e4f4c974-f50a-478a-a41c-0d768520ff88","exec":["pm.environment.set(\"start-date\", new Date().toISOString());",""],"type":"text/javascript"}}],"id":"4ef662e9-933a-4c54-bf11-19a2fe14ef59","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"status\": \"CANCELED\" // The order status.\n}"},"url":{"raw":"{{url}}/orders/:order-id","host":["{{url}}"],"path":["orders",":order-id"],"variable":[{"id":"97e5c0bf-36cf-46df-bf86-d1351902affc","key":"order-id","value":"{{order_id or order_source_id}}","description":"Unique Voucherify order ID or order source ID."}]}},"response":[],"_postman_id":"4ef662e9-933a-4c54-bf11-19a2fe14ef59"},{"name":"Import Orders","id":"5c5e78da-6ffd-44bf-bf9f-af4b91e28a5d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"// This endpoint should only be used to import historical orders into Voucherify. For on-going synchronization, the create order and update order endpoints should be used. This is critical because this endpoint does not store events or launch distributions.\n[\n    {\n        \"source_id\": \"{{order_source_id}}\", // Unique source ID of an existing order that will be linked to the redemption of this request.\n        \"status\": \"PAID\", // The order status.\n        \"metadata\": { // 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.\n            \"location_id\": [\n                \"L1\",\n                \"L2\"\n            ],\n            \"payment_mean\": [\n                \"paypal\",\n                \"credit-card\"\n            ]\n        },\n        \"customer\": {\n            \"source_id\": \"{{customer_source_id}}\"\n        },\n        \"items\": [\n            {\n                \"source_id\": \"{{product_id or sku_id}}\", // 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.\n                \"related_object\": \"product\", // Used along with the source_id property, can be set to either sku or product.\n                \"quantity\": 2, // The quantity of the particular item in the cart.\n                \"product\": {\n                    \"name\": \"Apple iPhone 12\", // Product name.\n                    \"price\": 70000, // Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00).\n                    \"metadata\": { // 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.\n                        \"color\": [\n                            \"silver\"\n                        ],\n                        \"vendor\": \"mall\"\n                    },\n                    \"override\": true // 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.\n                }\n            }\n        ]\n    }\n]","options":{"raw":{"language":"json"}}},"url":"{{url}}/orders/import"},"response":[],"_postman_id":"5c5e78da-6ffd-44bf-bf9f-af4b91e28a5d"},{"name":"Create Orders Export","event":[{"listen":"test","script":{"type":"text/javascript","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Order amount is 12345\"] = jsonData.amount === 12345;","tests[\"Order status is CREATED\"] = jsonData.status === \"CREATED\";","","pm.environment.set(\"order-id\", jsonData.id);","pm.environment.set(\"order-customer-id\", jsonData.id);"],"id":"a6362518-74fc-4f20-9e7c-b74a56140b8d"}},{"listen":"prerequest","script":{"type":"text/javascript","exec":["pm.environment.set(\"start-date\", new Date().toISOString());",""],"id":"73819973-22fd-41e1-b18a-84d23137553e"}}],"id":"5947ffd3-47e7-4c46-8b6d-7bc237010d36","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"parameters\": {\n        \"fields\": [\n            \"id\",\n            \"source_id\",\n            \"status\",\n            \"created_at\",\n            \"updated_at\",\n            \"amount\",\n            \"discount_amount\",\n            \"items_discount_amount\",\n            \"total_discount_amount\",\n            \"total_amount\",\n            \"customer_id\",\n            \"referrer_id\"\n        ]\n    }\n}"},"url":"{{url}}/orders/export"},"response":[],"_postman_id":"5947ffd3-47e7-4c46-8b6d-7bc237010d36"}],"id":"0f6fa26d-9a74-44f2-9ba0-909709e1a045","description":"This section allows you to perform various operations on [orders](https://docs.voucherify.io/reference/order-object).","_postman_id":"0f6fa26d-9a74-44f2-9ba0-909709e1a045"},{"name":"Products","item":[{"name":"List Products","event":[{"listen":"test","script":{"id":"eb7246d3-8d2f-4140-832e-c0b5eab56fd1","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Products quantity is correct\"] = jsonData.products.length === jsonData.total;"],"type":"text/javascript"}}],"id":"85c26293-ac39-45cc-a257-d21b2807aac3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/products?limit=100&page=1&order=created_at","host":["{{url}}"],"path":["products"],"query":[{"key":"limit","value":"100","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100 items."},{"key":"page","value":"1","description":"Which page of results to return."},{"key":"order","value":"created_at","description":"Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order."},{"key":"start_date","value":"{{start date time}}","description":"Timestamp representing the date and time which results must start on. Represented in ISO 8601 format. The value has to be passed in the UTF-8 encoding standard.","disabled":true},{"key":"end_date","value":"{{end date time}}","description":"Timestamp representing the date and time which results must end on. Represented in ISO 8601 format.","disabled":true}]}},"response":[],"_postman_id":"85c26293-ac39-45cc-a257-d21b2807aac3"},{"name":"Get Product","event":[{"listen":"test","script":{"id":"8af54f64-311f-4797-817b-3669fe1a2940","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"SKUs quantity is correct\"] = jsonData.skus.data.length === jsonData.skus.total;","tests[\"SKUs quantity is correct\"] = jsonData.skus.total === 1;"],"type":"text/javascript"}}],"id":"53fc91aa-71de-440b-9e74-911fbd7345dc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/products/:product-id-or-source-id","host":["{{url}}"],"path":["products",":product-id-or-source-id"],"variable":[{"id":"7a4b1e19-f361-47cc-9191-a04fa07260ba","key":"product-id-or-source-id","value":"{{product_id or source_id}}","description":"A Voucherify product ID or source ID."}]}},"response":[],"_postman_id":"53fc91aa-71de-440b-9e74-911fbd7345dc"},{"name":"Create Product","event":[{"listen":"test","script":{"id":"e30e19f0-59fd-484f-9903-b841b0950c51","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Product id is defined\"] = _.isUndefined(jsonData.id) === false;","tests[\"Product type is 'product'\"] = jsonData.object === \"product\";","tests[\"Date is correct\"] = Math.abs(Date.create(jsonData.created_at) - Date.create(pm.environment.get(\"start-date\"))) < 5000;","","pm.environment.set(\"product-id\", jsonData.id);"],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"62ecdaeb-15e1-4ac3-9f7d-29f72604dcee","exec":["pm.environment.set(\"start-date\", new Date().toISOString());",""],"type":"text/javascript"}}],"id":"75a537e4-82ab-449d-99a6-2d51ea1b773f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"source_id\": \"{{source_id}}\", // Unique product source ID.\n    \"name\": \"Samsung Phone\", // Unique user-defined product name.\n    \"price\": 200000, // 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.\n    \"attributes\": [ // 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.\n        \"color\",\n        \"memory\",\n        \"processor\"\n    ],\n    \"metadata\": { // 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.\n        \"test\": true,\n        \"vendor\": \"Online Store\"\n    },\n    \"image_url\": \"https://www.website.com/image.png\" // The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image.\n}"},"url":"{{url}}/products"},"response":[],"_postman_id":"75a537e4-82ab-449d-99a6-2d51ea1b773f"},{"name":"Import Products Using CSV","id":"402aff56-2524-4f5b-906a-c99d0b1e30a9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"}],"body":{"mode":"formdata","formdata":[{"key":"file","type":"file","value":null}]},"url":"{{url}}/products/importCSV"},"response":[],"_postman_id":"402aff56-2524-4f5b-906a-c99d0b1e30a9"},{"name":"Update Product","event":[{"listen":"test","script":{"id":"792bbb9c-6d35-4a12-b46a-272a7cff5ffb","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests['Metadata modified'] = jsonData.metadata.test2 === \"false\";","tests[\"Update date is correct\"] = Math.abs(Date.create(jsonData.updated_at) - Date.create(pm.environment.get(\"start-date\"))) < 5000;",""],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"061b40b1-2fc0-4bb0-9ed6-417e6a036ec3","exec":["pm.environment.set(\"start-date\", new Date().toISOString());",""],"type":"text/javascript"}}],"id":"5933299d-f6c1-4ff1-85f0-8b61cf763af0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"source_id\": \"{{source_id}}\", // Unique product source ID.\n    \"name\": \"Samsung Phone\", // Unique user-defined product name.\n    \"price\": 190000, // 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.\n    \"attributes\": [ // 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.\n        \"color\",\n        \"memory\",\n        \"processor\"\n    ],\n    \"metadata\": { // 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.\n        \"test\": true,\n        \"vendor\": \"Online Store\"\n    },\n    \"image_url\": \"https://www.website.com/image.png\" // The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image.\n}"},"url":{"raw":"{{url}}/products/:product-id-or-source-id","host":["{{url}}"],"path":["products",":product-id-or-source-id"],"variable":[{"id":"d544fc36-3b09-4f9f-9972-9a21d683f4d5","key":"product-id-or-source-id","value":"{{product_id or source_id}}","description":"A Voucherify product ID or source ID."}]}},"response":[],"_postman_id":"5933299d-f6c1-4ff1-85f0-8b61cf763af0"},{"name":"Update Products in Bulk","event":[{"listen":"test","script":{"id":"031d73e9-ffd7-4347-868b-3af0126b73d6","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Product id is defined\"] = _.isUndefined(jsonData.id) === false;","tests[\"Product type is 'product'\"] = jsonData.object === \"product\";","tests[\"Date is correct\"] = Math.abs(Date.create(jsonData.created_at) - Date.create(pm.environment.get(\"start-date\"))) < 5000;","","pm.environment.set(\"product-id\", jsonData.id);"],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"ee6f4246-75f2-4894-a113-526cab624835","exec":["pm.environment.set(\"start-date\", new Date().toISOString());",""],"type":"text/javascript"}}],"id":"06a78ee5-dc3f-4012-b029-6a16cdb8c422","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"[\n    {\n        \"source_id\": \"first_product\", // Unique product source ID from your inventory system.\n        \"name\": \"Samsung Phone 1\", // Unique user-defined product name.\n        \"price\": 220000, // 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.\n        \"attributes\": [ // 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.\n            \"color\",\n            \"memory\",\n            \"processor\"\n        ],\n        \"metadata\": { // 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.\n            \"test\": true,\n            \"vendor\": \"Online Store - 3\"\n        },\n        \"image_url\": \"{{image_url}}\" // The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image.\n    },\n    {\n        \"source_id\": \"second_product\", // Unique product source ID from your inventory system.\n        \"name\": \"Samsung Phone 2\", // Unique user-defined product name.\n        \"price\": 230000, // 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.\n        \"attributes\": [ // 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.\n            \"color\",\n            \"memory\",\n            \"processor\"\n        ],\n        \"metadata\": { // 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.\n            \"test\": true,\n            \"vendor\": \"Online Store - 4\"\n        },\n        \"image_url\": \"{{image_url}}\" // The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image.\n    }\n]"},"url":"{{url}}/products/bulk/async"},"response":[],"_postman_id":"06a78ee5-dc3f-4012-b029-6a16cdb8c422"},{"name":"Update Products' Metadata in bulk","event":[{"listen":"test","script":{"id":"031d73e9-ffd7-4347-868b-3af0126b73d6","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Product id is defined\"] = _.isUndefined(jsonData.id) === false;","tests[\"Product type is 'product'\"] = jsonData.object === \"product\";","tests[\"Date is correct\"] = Math.abs(Date.create(jsonData.created_at) - Date.create(pm.environment.get(\"start-date\"))) < 5000;","","pm.environment.set(\"product-id\", jsonData.id);"],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"ee6f4246-75f2-4894-a113-526cab624835","exec":["pm.environment.set(\"start-date\", new Date().toISOString());",""],"type":"text/javascript"}}],"id":"04713cfa-5bdc-4ee5-a416-94a31a2e6014","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"metadata\": { // Metadata to be updated\n        \"test\": \"true\",\n        \"brand\": \"Voucherify\"\n    },\n    \"source_ids\": [ // List of products' source ids that will be affected by the update\n        \"first_product\",\n        \"second_product\"\n    ]\n}"},"url":"{{url}}/products/metadata/async"},"response":[],"_postman_id":"04713cfa-5bdc-4ee5-a416-94a31a2e6014"},{"name":"Delete Product","event":[{"listen":"test","script":{"id":"91daf470-9caf-4b4a-92c1-7252067b48a5","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;",""],"type":"text/javascript"}}],"id":"38253a5e-7d6e-4175-9668-a529778ab314","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":""},"url":{"raw":"{{url}}/products/:product-id-or-source-id?force={{true or false}}","host":["{{url}}"],"path":["products",":product-id-or-source-id"],"query":[{"key":"force","value":"{{true or false}}","description":"If this flag is set to true, the product will be removed permanently. Going forward, the user will be able to create another product with exactly the same source_id."}],"variable":[{"id":"9b18493c-62c8-4dca-b4c0-624876347761","key":"product-id-or-source-id","value":"{{product_id or source_id}}","description":"A Voucherify product ID or source ID."}]}},"response":[],"_postman_id":"38253a5e-7d6e-4175-9668-a529778ab314"},{"name":"List SKUs in Product","event":[{"listen":"test","script":{"id":"86f90d67-9f39-4854-84fc-f735ecd5552d","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","","tests[`SKUs total count is correct`] = jsonData.total === jsonData.skus.length;","tests[`SKUs count is correct`] = jsonData.skus.length === 1;"],"type":"text/javascript"}}],"id":"aeb26126-7978-46e4-9b9a-2d283e5aa29f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/products/:product-id-or-source-id/skus?limit=100&page=1","host":["{{url}}"],"path":["products",":product-id-or-source-id","skus"],"query":[{"key":"limit","value":"100","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100 items."},{"key":"page","value":"1","description":"Which page of results to return."}],"variable":[{"id":"7d482fbb-8eb9-4ec5-9b2f-f0beb58fc962","key":"product-id-or-source-id","value":"{{product_id or source_id}}","description":"A Voucherify product ID or product source ID."}]}},"response":[],"_postman_id":"aeb26126-7978-46e4-9b9a-2d283e5aa29f"},{"name":"Get SKU","event":[{"listen":"test","script":{"id":"5e16f62d-4220-428a-946d-0479782cc5b1","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"SKU id is correct\"] = jsonData.id === pm.environment.get(\"sku-id\");"],"type":"text/javascript"}}],"id":"91014ee0-9b63-4993-903d-39b0da7f616e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/skus/:sku-id-or-source-id","host":["{{url}}"],"path":["skus",":sku-id-or-source-id"],"variable":[{"id":"c41d8397-f5a6-4adb-b73d-4f382c9493ee","key":"sku-id-or-source-id","value":"{{sku_id or source_id}}","description":"A Voucherify SKU identifier or SKU source ID."}]}},"response":[],"_postman_id":"91014ee0-9b63-4993-903d-39b0da7f616e"},{"name":"Create SKU","event":[{"listen":"test","script":{"id":"f3d0d41d-d952-4b08-8893-057f080e2bdf","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"SKU id is defined\"] = _.isUndefined(jsonData.id) === false;","tests[\"SKU type is 'sku'\"] = jsonData.object === \"sku\";","tests[\"Date is correct and done in less than 1 sec\"] = Math.abs(Date.create(jsonData.created_at) - Date.create(pm.environment.get(\"start-date\"))) < 1000;","","pm.environment.set(\"sku-id\", jsonData.id);"],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"d4ad3d84-4bb3-45fb-9ca1-d15ff67f72c9","exec":["pm.environment.set(\"start-date\", new Date().toISOString());",""],"type":"text/javascript"}}],"id":"f990f433-29fa-49a0-887e-2ff2aa0bb5f6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"source_id\": \"first_product_sku_1\", // A unique SKU identifier from your inventory system.\n    \"sku\": \"Samsung phone 256GB\", // Unique user-defined SKU name.\n    \"price\": 130000, // SKU unit price. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents for $100.00.\n    \"currency\": \"USD\", // SKU price currency.\n    \"attributes\": { // 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.\n        \"color\": \"vintage-black\",\n        \"memory\": \"256\",\n        \"processor\": \"Intel\"\n    },\n    \"image_url\": \"{{image_url}}\", // The HTTPS URL pointing to the .png or .jpg file that will be used to render the SKU image.\n    \"metadata\": { // 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.\n        \"imported\": true\n    }\n}"},"url":{"raw":"{{url}}/products/:product-id-or-source-id/skus","host":["{{url}}"],"path":["products",":product-id-or-source-id","skus"],"variable":[{"id":"3a5e37bb-1891-4deb-a625-04577f2842fd","key":"product-id-or-source-id","value":"{{product_id or source_id}}","description":"A Voucherify product ID or product source ID. The SKU will be associated with that product."}]}},"response":[],"_postman_id":"f990f433-29fa-49a0-887e-2ff2aa0bb5f6"},{"name":"Import SKUs Using CSV","event":[{"listen":"test","script":{"id":"9d2c2b51-bdf3-4e58-a1a6-91b547b3c643","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Product id is defined\"] = _.isUndefined(jsonData.id) === false;","tests[\"Product type is 'product'\"] = jsonData.object === \"product\";","tests[\"Date is correct\"] = Math.abs(Date.create(jsonData.created_at) - Date.create(pm.environment.get(\"start-date\"))) < 5000;","","pm.environment.set(\"product-id\", jsonData.id);"],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"cc341cc7-1e4d-4aaf-90b7-6aea975c39e9","exec":["pm.environment.set(\"start-date\", new Date().toISOString());",""],"type":"text/javascript"}}],"id":"6ce308b5-fb4a-4e86-95b4-255e4d216075","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"}],"body":{"mode":"formdata","formdata":[{"key":"file","type":"file","value":null}]},"url":"{{url}}/skus/importCSV"},"response":[],"_postman_id":"6ce308b5-fb4a-4e86-95b4-255e4d216075"},{"name":"Update SKU","event":[{"listen":"test","script":{"id":"1037c380-24d5-4136-a921-91329618ee71","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Attribute has been modified\"] = jsonData.attributes.memory === 16;","tests[\"Update date is correct\"] = Math.abs(Date.create(jsonData.updated_at) - Date.create(pm.environment.get(\"start-date\"))) < 10000;",""],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"e10b7835-e1ae-4cb7-af26-0afdeadfc1b4","exec":["pm.globals.get(\"start-date\", new Date().toISOString());",""],"type":"text/javascript"}}],"id":"b21c015f-568f-4e8e-a0d0-d44a902523c1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"source_id\": \"first_product_sku_1\", // A unique SKU identifier from your inventory system.\n    \"sku\": \"Samsung phone 256GB\", // Unique user-defined SKU name.\n    \"price\": 135000, // SKU unit price. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents for $100.00.\n    \"currency\": \"USD\", // SKU price currency.\n    \"attributes\": { // 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.\n        \"color\": \"rusty-brown\",\n        \"memory\": \"256\",\n        \"processor\": \"Intel\"\n    },\n    \"image_url\": \"{{image_url}}\", // The HTTPS URL pointing to the .png or .jpg file that will be used to render the SKU image.\n    \"metadata\": { // 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.\n        \"imported\": true\n    }\n}"},"url":{"raw":"{{url}}/products/:product-id-or-source-id/skus/:sku-id-or-source-id","host":["{{url}}"],"path":["products",":product-id-or-source-id","skus",":sku-id-or-source-id"],"variable":[{"id":"71aeb8e0-98f2-4f09-a456-bda81f475cff","key":"product-id-or-source-id","value":"{{product_id or source_id}}","description":"A unique Voucherify product ID or product source ID."},{"id":"cfd272c9-55a3-4cb4-b228-b1eba345fc92","key":"sku-id-or-source-id","value":"{{sku_id or source_id}}","description":"A Voucherify SKU ID or SKU source ID."}]}},"response":[],"_postman_id":"b21c015f-568f-4e8e-a0d0-d44a902523c1"},{"name":"Delete SKU","event":[{"listen":"test","script":{"id":"97941852-5d42-47b9-b3f3-b24ffd08f5d3","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;",""],"type":"text/javascript"}}],"id":"e6a8daf5-41dc-4b06-97ab-9ebf951ad711","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":""},"url":{"raw":"{{url}}/products/:product-id-or-source-id/skus/:sku-id-or-source-id?force={{true or false}}","host":["{{url}}"],"path":["products",":product-id-or-source-id","skus",":sku-id-or-source-id"],"query":[{"key":"force","value":"{{true or false}}","description":"If this flag is set to true, the SKU will be removed permanently. Going forward, the user will be able to create another SKU with exactly the same source_id."}],"variable":[{"id":"6364a5dc-2e07-48ef-b97a-c3b6e42bb214","key":"product-id-or-source-id","value":"{{product_id or source_id}}","description":"A unique Voucherify product ID or product source ID."},{"id":"c987a03a-8843-473c-b592-563cdd511e6f","key":"sku-id-or-source-id","value":"{{sku_id or source_id}}","description":"A Voucherify SKU ID or SKU source ID."}]}},"response":[],"_postman_id":"e6a8daf5-41dc-4b06-97ab-9ebf951ad711"}],"id":"1f52949d-2603-46ec-b506-e30d11a49e06","description":"This section allows you to perform various operations on [ products](https://docs.voucherify.io/reference/product-object) and [ SKUs](https://docs.voucherify.io/reference/sku-object). Synchronizing product details with Voucherify is optional. You can read more about product synchronization in our [documentation](https://docs.voucherify.io/docs/data-synchronization#product-synchronization).","_postman_id":"1f52949d-2603-46ec-b506-e30d11a49e06"},{"name":"Product Collections","item":[{"name":"Create Product Collection","id":"8b4d6bd5-600d-48bd-8049-a15812520048","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"type\": \"AUTO_UPDATE\", // Show that the product collection is dynamic (products come in and leave based on set criteria). Default: AUTO_UPDATE.\n    \"name\": \"Voucherify example collection\",\n    \"filter\": {\n        \"junction\": \"and\", // 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.\n        \"metadata.brand\": {\n            \"conditions\": {\n                \"$is\": [\n                    \"Voucherify\"\n                ]\n            }\n        },\n        \"price\": {\n            \"conditions\": {\n                \"$more_than\": [\n                    5000\n                ]\n            }\n        }\n    }\n}","options":{"raw":{"language":"json"}}},"url":"{{url}}/product-collections"},"response":[],"_postman_id":"8b4d6bd5-600d-48bd-8049-a15812520048"},{"name":"List Product Collections","event":[{"listen":"test","script":{"id":"8d8c1c4f-ec3f-4473-a8fb-539d1a6d9de2","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;",""],"type":"text/javascript"}}],"id":"c0b7b3ad-2e8c-4af1-a7a4-371b83b4f7e0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/product-collections?limit=100&page=1","host":["{{url}}"],"path":["product-collections"],"query":[{"key":"limit","value":"100","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100 items."},{"key":"page","value":"1","description":"Which page of results to return."},{"key":"order","value":"{{order}}","description":"Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.","disabled":true}]}},"response":[],"_postman_id":"c0b7b3ad-2e8c-4af1-a7a4-371b83b4f7e0"},{"name":"Get Product Collection","event":[{"listen":"test","script":{"id":"f22328da-93bc-48d6-a173-ef34e9ff2e1b","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;",""],"type":"text/javascript"}}],"id":"f8e799f3-2443-440b-a7e2-6d4a30ed74e6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/product-collections/:product-collection-id","host":["{{url}}"],"path":["product-collections",":product-collection-id"],"variable":[{"id":"e71814a0-535f-48be-88d9-d4adbd2d7444","key":"product-collection-id","value":"{{product_collection_id}}","description":"A unique product collection ID."}]}},"response":[],"_postman_id":"f8e799f3-2443-440b-a7e2-6d4a30ed74e6"},{"name":"List Products in Collection","event":[{"listen":"test","script":{"id":"9929c93d-346b-4731-949d-f69c685572e4","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;",""],"type":"text/javascript"}}],"id":"1e55b22f-8ca6-4ce9-a90d-a45c0ba7f884","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/product-collections/:product-collection-id/products?limit=100&page=1","host":["{{url}}"],"path":["product-collections",":product-collection-id","products"],"query":[{"key":"limit","value":"100","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100 items."},{"key":"page","value":"1","description":"Which page of results to return."}],"variable":[{"id":"9b48e193-f45b-471d-8c44-abb98f2db574","key":"product-collection-id","value":"{{product_collection_id}}","description":"Unique product collection ID."}]}},"response":[],"_postman_id":"1e55b22f-8ca6-4ce9-a90d-a45c0ba7f884"},{"name":"Delete Product Collection","event":[{"listen":"test","script":{"id":"1bb43bdf-eb39-4382-984e-f55c3be7f034","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;",""],"type":"text/javascript"}}],"id":"de6d6dda-b871-4424-a8d2-ef57e3e77826","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/product-collections/:product-collection-id","host":["{{url}}"],"path":["product-collections",":product-collection-id"],"variable":[{"id":"4a442a77-f232-4858-8f60-9562bcd60450","key":"product-collection-id","value":"{{product_collection_id}}","description":"A unique product collection ID."}]}},"response":[],"_postman_id":"de6d6dda-b871-4424-a8d2-ef57e3e77826"},{"name":"Update Product Collection","id":"e7fd8f9b-89d5-4c49-aac3-c934e7d125fb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"Updated Voucherify collection\", // New product collection name. Can be updated for both STATIC and AUTO_UPDATE collections. Must be a non-empty string.\n\n    \"filter\": {\n        \"junction\": \"and\", // Logical operator between filters. Use \"and\" when ALL conditions must match, or \"or\" when ANY condition can match. Can be updated only for AUTO_UPDATE collections.\n\n        \"metadata.brand\": {\n            \"conditions\": {\n                \"$is\": [\n                    \"Voucherify\" // Match products where metadata.brand equals \"Voucherify\"\n                ]\n            }\n        },\n\n        \"price\": {\n            \"conditions\": {\n                \"$more_than\": [\n                    5000 // Match products with price greater than 5000\n                ]\n            }\n        }\n\n    }\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"{{url}}/product-collections/:id","host":["{{url}}"],"path":["product-collections",":id"],"variable":[{"id":"e774fb80-1289-46ab-aa4b-91d2ec9760b7","key":"id","value":"{{product_collection_id}}","description":"The unique identifier of the product collection to update."}]},"description":"Updates an existing product collection.\n\nYou can update the collection name for both static and auto-update product collections.\n\nYou can update the filter only for auto-update product collections.\n\nFor static product collections, changing the product IDs list is not supported by this endpoint.\n\nAt least one of `name` or `filter` must be provided."},"response":[],"_postman_id":"e7fd8f9b-89d5-4c49-aac3-c934e7d125fb"},{"name":"List Product Collection Activities","id":"62f9a047-e1d6-45ac-bee7-a588cfbf3586","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/product-collections/:id/activities","host":["{{url}}"],"path":["product-collections",":id","activities"],"query":[{"key":"limit","value":"{{limit}}","description":"Maximum number of activities returned per request. Allowed range: 1–100.","disabled":true},{"key":"order","value":"{{order}}","description":"Sort results by creation date. Use created_at for ascending or -created_at for descending. Default: -created_at.","disabled":true},{"key":"starting_after_id","value":"{{activity_id}}","description":"Cursor for pagination based on activity ID. Returns activities that appear after the specified activity in the current sort order.","disabled":true},{"key":"start_date","value":"{{start_date}}","description":"Filter activities created on or after this timestamp. Use ISO 8601 timestamp format, for example 2025-12-18T00:00:00.000Z.","disabled":true},{"key":"end_date","value":"{{end_date}}","description":"Filter activities created on or before this timestamp. Use ISO 8601 timestamp format, for example 2025-12-18T23:59:59.999Z.","disabled":true},{"key":"type","value":"{{product_collection_activity_type}}","description":"Filter by event type. Allowed values: product_collection.created, product_collection.updated, product_collection.deleted, product_collection.filters.updated.","disabled":true},{"key":"category","value":"{{activity_category}}","description":"Filter by event category. Allowed values: ACTION or EFFECT.","disabled":true}],"variable":[{"key":"id","value":"{{product_collection_id}}","description":"The unique identifier of the product collection whose activities will be retrieved."}]},"description":"Returns a list of activity events for a specific product collection.\n\nActivities include events such as product collection creation, updates, deletion, and filter changes.\n\nResults are sorted by creation time, newest first, by default.\n\nExample:\n\n`GET /v1/product-collections/{id}/activities?limit=10&type=product_collection.updated`"},"response":[],"_postman_id":"62f9a047-e1d6-45ac-bee7-a588cfbf3586"}],"id":"37924003-7034-4ba9-93da-ba5c8b2793bb","description":"This section lets you use our APIs connected with [product collections](https://docs.voucherify.io/reference/product-collection-object).","_postman_id":"37924003-7034-4ba9-93da-ba5c8b2793bb"},{"name":"Validation Rules","item":[{"name":"List Validation Rules","event":[{"listen":"test","script":{"id":"16fb60e3-c601-41c6-a686-7127c9563d11","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"VR type is 'validation_rules'\"] = jsonData.object === \"validation_rules\";",""],"type":"text/javascript"}}],"id":"0287c5ba-9a99-4340-af6b-94fa690de288","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/validation-rules?limit=100&page=1","host":["{{url}}"],"path":["validation-rules"],"query":[{"key":"limit","value":"100","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100 items."},{"key":"page","value":"1","description":"Which page of results to return."},{"key":"start_date","value":"{{start_date}}","description":"Timestamp representing the date and time which results must start on. Represented in ISO 8601 format. The value has to be passed in the UTF-8 encoding standard.","disabled":true},{"key":"end_date","value":"{{end_date}}","description":"Timestamp representing the date and time which results must end on. Represented in ISO 8601 format.","disabled":true}]}},"response":[],"_postman_id":"0287c5ba-9a99-4340-af6b-94fa690de288"},{"name":"Get Validation Rule","event":[{"listen":"test","script":{"id":"609b8236-ede8-4c12-8de3-b9a24b3c2086","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"VR type is 'validation_rules'\"] = jsonData.object === \"validation_rules\";",""],"type":"text/javascript"}}],"id":"e2900892-2386-4232-b559-86f733742cfe","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/validation-rules/:validation-rule-id","host":["{{url}}"],"path":["validation-rules",":validation-rule-id"],"variable":[{"id":"cfdd5ae7-bd6b-4e6c-8490-ecbee6ebadd5","key":"validation-rule-id","value":"{{validation_rule_id}}","description":"A unique validation rule ID."}]}},"response":[],"_postman_id":"e2900892-2386-4232-b559-86f733742cfe"},{"name":"Create Validation Rule","event":[{"listen":"test","script":{"id":"19e72237-c31d-47c5-9706-75f8b4062782","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"VR id is defined\"] = _.isUndefined(jsonData.id) === false;","tests[\"VR type is 'validation_rules'\"] = jsonData.object === \"validation_rules\";","tests[\"Date is correct and done in less than 1 sec\"] = Math.abs(Date.create(jsonData.created_at) - Date.create(pm.environment.get(\"start-date\"))) < 10000;","","pm.environment.set(\"validation-rule-id\", jsonData.id);"],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"5619864a-bab9-414a-9179-392f170d26cf","exec":["pm.environment.set(\"start-date\", new Date().toISOString());",""],"type":"text/javascript"}}],"id":"9e1a21a0-170a-4274-bc93-eb8e9ce35046","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    // This is an example of a Validation Rule that will give a discount to a specific product collection only when the customer is paying in USD.\n    // The customer will get the discount if he pays for the collection at least $200 if he's not subscribed or $100 otherwise.\n    // The example shows the flexibility of creating the earning rules. Due to the huge number of different rules we recommed using the Dashboard for creating complex conditions.\n    \"name\": \"Discount for jeans with different rules for subscribers and non-subscribers\",\n    \"rules\": { // Contains all the rule definitions for the validation rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from 1. The values are objects containing the rule conditions.\n        \"1\": {\n            \"name\": \"order.metadata\",\n            \"property\": \"currency\",\n            \"conditions\": {\n                \"$is\": [\n                    \"USD\" // The customer must pay in USD\n                ]\n            },\n            \"rules\": {},\n            \"error\": {\n                \"message\": \"You need to pay in USD.\"\n            }\n        },\n        \"2\": {\n            \"name\": \"order.items.any\",\n            \"conditions\": {\n                \"$is\": [\n                    {\n                        \"id\": \"{{ID of a product collection}}\",\n                        \"type\": \"products_collection\",\n                        \"object\": \"products_collection\"\n                    }\n                ]\n            },\n            \"rules\": {\n                \"1\": {\n                    \"name\": \"order.items.aggregated_amount\",\n                    \"conditions\": {\n                        \"$more_than_or_equal\": [\n                            20000\n                        ]\n                    },\n                    \"rules\": {},\n                    \"error\": {\n                        \"message\": \"As a customer who is not subscribed, you need to pay more than $200 to get a discount.\"\n                    }\n                },\n                \"logic\": \" 1\"\n            },\n            \"error\": {\n                \"message\": \"You need to have jeans in the cart.\"\n            }\n        },\n        \"3\": {\n            \"name\": \"customer.metadata\",\n            \"property\": \"subscribed\",\n            \"conditions\": {\n                \"$is\": [\n                    false\n                ]\n            },\n            \"rules\": {}\n        },\n        \"4\": {\n            \"name\": \"order.items.any\",\n            \"conditions\": {\n                \"$is\": [\n                    {\n                        \"id\": \"{{ID of a product collection}}\",\n                        \"type\": \"products_collection\",\n                        \"object\": \"products_collection\"\n                    }\n                ]\n            },\n            \"rules\": {\n                \"1\": {\n                    \"name\": \"order.items.aggregated_amount\",\n                    \"conditions\": {\n                        \"$more_than_or_equal\": [\n                            10000\n                        ]\n                    },\n                    \"rules\": {},\n                    \"error\": {\n                        \"message\": \"As a subscribed customer, you need to pay more than $100 to get a discount.\"\n                    }\n                },\n                \"logic\": \" 1\"\n            },\n            \"error\": {\n                \"message\": \"You need to have jeans in the cart.\"\n            }\n        },\n        \"5\": {\n            \"name\": \"customer.metadata\",\n            \"property\": \"subscribed\",\n            \"conditions\": {\n                \"$is\": [\n                    true\n                ]\n            },\n            \"rules\": {}\n        },\n        \"logic\": \" 1 AND (  (  2 AND 3 ) AND (  4 AND 5 ) )\" // Condition logic that depends on the subscribed attribute and the value of the items.\n    },\n    \"applicable_to\": {\n        \"excluded\": [],\n        \"included\": [\n            {\n                \"object\": \"products_collection\",\n                \"id\": \"{{ID of a product collection}}\", // This collection will receive a discount\n                \"strict\": false,\n                \"effect\": \"APPLY_TO_EVERY\"\n            }\n        ],\n        \"included_all\": false\n    },\n    \"type\": \"expression\"\n}"},"url":"{{url}}/validation-rules"},"response":[],"_postman_id":"9e1a21a0-170a-4274-bc93-eb8e9ce35046"},{"name":"Update Validation Rule","event":[{"listen":"test","script":{"id":"fdffe5da-847f-49da-87c2-312b5c8fa009","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Updated order rules are correct\"] = _.isEqual(jsonData.orders, JSON.parse(request.data).orders);","tests[\"Date is correct and done in less than 10 sec\"] = Math.abs(Date.create(jsonData.updated_at) - Date.create(pm.environment.get(\"start-date\"))) < 10000;","","pm.environment.set(\"validation-rule-id\", jsonData.id);"],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"3bb231d5-a4ee-4e21-bfcb-054bc980c606","exec":["pm.environment.set(\"start-date\", new Date().toISOString());",""],"type":"text/javascript"}}],"id":"98364de8-09eb-4b56-8026-79ae0379c0e7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    // This is an example of a Validation Rule that will give a discount to a specific product collection only when the customer is paying in USD.\n    // The customer will get the discount if he pays for the collection at least $200 if he's not subscribed or $100 otherwise.\n    // The example shows the flexibility of creating the earning rules. Due to the huge number of different rules we recommed using the Dashboard for creating complex conditions.\n    \"name\": \"Discount for jeans with different rules for subscribers and non-subscribers\",\n    \"rules\": { // Contains all the rule definitions for the validation rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from 1. The values are objects containing the rule conditions.\n        \"1\": {\n            \"name\": \"order.metadata\",\n            \"property\": \"currency\",\n            \"conditions\": {\n                \"$is\": [\n                    \"USD\" // The customer must pay in USD\n                ]\n            },\n            \"rules\": {},\n            \"error\": {\n                \"message\": \"You need to pay in USD.\"\n            }\n        },\n        \"2\": {\n            \"name\": \"order.items.any\",\n            \"conditions\": {\n                \"$is\": [\n                    {\n                        \"id\": \"{{ID of a product collection}}\",\n                        \"type\": \"products_collection\",\n                        \"object\": \"products_collection\"\n                    }\n                ]\n            },\n            \"rules\": {\n                \"1\": {\n                    \"name\": \"order.items.aggregated_amount\",\n                    \"conditions\": {\n                        \"$more_than_or_equal\": [\n                            20000\n                        ]\n                    },\n                    \"rules\": {},\n                    \"error\": {\n                        \"message\": \"As a customer who is not subscribed, you need to pay more than $200 to get a discount.\"\n                    }\n                },\n                \"logic\": \" 1\"\n            },\n            \"error\": {\n                \"message\": \"You need to have jeans in the cart.\"\n            }\n        },\n        \"3\": {\n            \"name\": \"customer.metadata\",\n            \"property\": \"subscribed\",\n            \"conditions\": {\n                \"$is\": [\n                    false\n                ]\n            },\n            \"rules\": {}\n        },\n        \"4\": {\n            \"name\": \"order.items.any\",\n            \"conditions\": {\n                \"$is\": [\n                    {\n                        \"id\": \"{{ID of a product collection}}\",\n                        \"type\": \"products_collection\",\n                        \"object\": \"products_collection\"\n                    }\n                ]\n            },\n            \"rules\": {\n                \"1\": {\n                    \"name\": \"order.items.aggregated_amount\",\n                    \"conditions\": {\n                        \"$more_than_or_equal\": [\n                            10000\n                        ]\n                    },\n                    \"rules\": {},\n                    \"error\": {\n                        \"message\": \"As a subscribed customer, you need to pay more than $100 to get a discount.\"\n                    }\n                },\n                \"logic\": \" 1\"\n            },\n            \"error\": {\n                \"message\": \"You need to have jeans in the cart.\"\n            }\n        },\n        \"5\": {\n            \"name\": \"customer.metadata\",\n            \"property\": \"subscribed\",\n            \"conditions\": {\n                \"$is\": [\n                    true\n                ]\n            },\n            \"rules\": {}\n        },\n        \"logic\": \" 1 AND (  (  2 AND 3 ) AND (  4 AND 5 ) )\" // Condition logic that depends on the subscribed attribute and the value of the items.\n    },\n    \"applicable_to\": {\n        \"excluded\": [],\n        \"included\": [\n            {\n                \"object\": \"products_collection\",\n                \"id\": \"{{ID of a product collection}}\", // This collection will receive a discount\n                \"strict\": false,\n                \"effect\": \"APPLY_TO_EVERY\"\n            }\n        ],\n        \"included_all\": false\n    },\n    \"type\": \"expression\"\n}"},"url":{"raw":"{{url}}/validation-rules/:validation-rule-id","host":["{{url}}"],"path":["validation-rules",":validation-rule-id"],"variable":[{"id":"3c20116b-7eb5-4ec8-925e-810bd74c3d89","key":"validation-rule-id","value":"{{validation_rule_id}}","description":"A unique validation rule ID."}]}},"response":[],"_postman_id":"98364de8-09eb-4b56-8026-79ae0379c0e7"},{"name":"Delete Validation Rule","event":[{"listen":"test","script":{"id":"ea2e4776-cce0-4817-a970-9954161f210c","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;",""],"type":"text/javascript"}}],"id":"fe7ac08c-dae8-4c70-b284-854eb99e8797","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/validation-rules/:validation-rule-id","host":["{{url}}"],"path":["validation-rules",":validation-rule-id"],"variable":[{"id":"46bd09f6-4974-4078-b1ac-f042173e6f62","key":"validation-rule-id","value":"{{validation_rule_id}}","description":"A unique validation rule ID."}]}},"response":[],"_postman_id":"fe7ac08c-dae8-4c70-b284-854eb99e8797"},{"name":"List Validation Rules' Assignment(s)","id":"0f98328d-7cab-47ab-be7c-416d0b96bc23","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/validation-rules-assignments?rule={{validation_rule_id}}&page=1&limit=100","host":["{{url}}"],"path":["validation-rules-assignments"],"query":[{"key":"related_object_id","value":"{{related_object_id}}","description":"The resource ID to which the validation rule was assigned; this could be, for example, a resource ID of a voucher, campaign, earning rule, reward assignment, promotion tier, or distribution.","disabled":true},{"key":"rule","value":"{{validation_rule_id}}","description":"Validation rule ID."},{"key":"page","value":"1","description":"Which page of results to return."},{"key":"limit","value":"100","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100 items."}]}},"response":[],"_postman_id":"0f98328d-7cab-47ab-be7c-416d0b96bc23"},{"name":"List Validation Rule Assignments","event":[{"listen":"test","script":{"id":"7c16698c-b833-49c9-930e-498c9599c1a9","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"VR type is 'validation_rules'\"] = jsonData.object === \"validation_rules\";",""],"type":"text/javascript"}}],"id":"a7a60ae3-ca20-4d66-b08f-5ae336cb2972","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/validation-rules/:validation-rule-id/assignments?limit=100&page=1","host":["{{url}}"],"path":["validation-rules",":validation-rule-id","assignments"],"query":[{"key":"limit","value":"100","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100 items."},{"key":"page","value":"1","description":"Which page of results to return."}],"variable":[{"id":"ee04fa0a-cb6c-4e74-b34c-30a29bda3f81","key":"validation-rule-id","value":"{{validation_rule_id}}","description":"Unique validation rule ID."}]}},"response":[],"_postman_id":"a7a60ae3-ca20-4d66-b08f-5ae336cb2972"},{"name":"Create Validation Rule Assignment","event":[{"listen":"test","script":{"id":"6efeb18b-6f62-4199-b736-f4c77bf7f98e","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"VR id is defined\"] = _.isUndefined(jsonData.id) === false;","tests[\"VR type is 'validation_rules'\"] = jsonData.object === \"validation_rules\";","tests[\"Date is correct and done in less than 1 sec\"] = Math.abs(Date.create(jsonData.created_at) - Date.create(pm.environment.get(\"start-date\"))) < 10000;","","pm.environment.set(\"validation-rule-id\", jsonData.id);"],"type":"text/javascript","packages":{}}},{"listen":"prerequest","script":{"id":"0817e933-7261-40c9-a593-07fc670190eb","exec":["pm.environment.set(\"start-date\", new Date().toISOString());",""],"type":"text/javascript","packages":{}}}],"id":"3b923436-698d-4385-ae2c-fb7f5820ea95","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"related_object_type\": \"campaign\", // Defines the related object. You can choose between voucher, promotion_tier, campaign, earning_rule, distribution, and reward_assignment.\n\t\"related_object_id\": \"{{campaignId}}\" // Unique related object ID assigned by Voucherify, e.g v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher.\n}"},"url":{"raw":"{{url}}/validation-rules/:validation-rule_id/assignments","host":["{{url}}"],"path":["validation-rules",":validation-rule_id","assignments"],"variable":[{"key":"validation-rule_id","value":"{{validation_rule_id}}","description":"Unique validation rule ID."}]}},"response":[],"_postman_id":"3b923436-698d-4385-ae2c-fb7f5820ea95"},{"name":"Delete Validation Rule Assignment","event":[{"listen":"test","script":{"id":"a976dfbb-4068-49c0-aad6-3a25b638c2cd","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;",""],"type":"text/javascript"}}],"id":"d4294b67-aa72-4615-8975-eadf8d27f1d2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/validation-rules/:validation-rule-id/assignments/:assignment-id","host":["{{url}}"],"path":["validation-rules",":validation-rule-id","assignments",":assignment-id"],"variable":[{"id":"7641d119-7fd2-4880-b004-111604ed02b6","key":"validation-rule-id","value":"{{validation_rule_id}}","description":"A unique validation rule ID."},{"id":"aba66b31-4a4c-499c-a2ef-dfd3c97094db","key":"assignment-id","value":"{{validation_rule_assignment_id}}","description":"A unique validation rule assignment ID."}]}},"response":[],"_postman_id":"d4294b67-aa72-4615-8975-eadf8d27f1d2"}],"id":"a1d6d171-50f0-4e21-b337-d6759fa4476d","description":"This section allows you to perform various operations on [ validation rules](https://docs.voucherify.io/reference/validation-rule-object) and [ validation rules assignments](https://docs.voucherify.io/reference/validation-rule-assignment-object). Validation rules define promotion usage restrictions which can be based on, for example, customer segments, products, orders, budget, or metadata.\n\nIt's recommended to create validation rules via the Dashboard.","_postman_id":"a1d6d171-50f0-4e21-b337-d6759fa4476d"},{"name":"Segments","item":[{"name":"Get Segment","event":[{"listen":"test","script":{"id":"0afd7b5d-b48d-4faa-a95e-6a63447d35f1","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Segment id is defined\"] = _.isUndefined(jsonData.id) === false;"],"type":"text/javascript"}}],"id":"1510b9c6-bdbf-46e7-ad80-b42018db9116","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/segments/:segment-id","host":["{{url}}"],"path":["segments",":segment-id"],"variable":[{"id":"3fa8a853-cd13-4b8a-adfb-9e1b763962cf","key":"segment-id","value":"{{segment_id}}","description":"A unique customer segment ID."}]}},"response":[],"_postman_id":"1510b9c6-bdbf-46e7-ad80-b42018db9116"},{"name":"Create Segment - static example","event":[{"listen":"test","script":{"id":"9193acc8-b875-4695-856e-226a109e32e3","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Segment type is static\"] = jsonData.type === \"static\";","","pm.environment.set(\"segment-id\", jsonData.id);"],"type":"text/javascript","packages":{},"requests":{}}},{"listen":"prerequest","script":{"id":"e2c33075-33d1-4f52-b21d-cf5bd8bf5e8b","exec":["pm.environment.set(\"start-date\", new Date().toISOString());",""],"type":"text/javascript","packages":{},"requests":{}}}],"id":"27d33a8e-5429-4c6f-a80a-7cad024a1591","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"{{segment_name}}\", // Segment name.\n    \"type\": \"static\", // Describes whether the segment is active (customers come in and leave based on set criteria) or static (manually selected customers).\n    \"customers\": [ // Array of customer ID or IDs.\n        \"{{source_id_customer_1}}\",\n        \"{{source_id_customer_2}}\"\n    ]\n}"},"url":"{{url}}/segments"},"response":[],"_postman_id":"27d33a8e-5429-4c6f-a80a-7cad024a1591"},{"name":"Create Segment - passive example","event":[{"listen":"test","script":{"id":"9193acc8-b875-4695-856e-226a109e32e3","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Segment type is static\"] = jsonData.type === \"static\";","","pm.environment.set(\"segment-id\", jsonData.id);"],"type":"text/javascript","packages":{},"requests":{}}},{"listen":"prerequest","script":{"id":"e2c33075-33d1-4f52-b21d-cf5bd8bf5e8b","exec":["pm.environment.set(\"start-date\", new Date().toISOString());",""],"type":"text/javascript","packages":{},"requests":{}}}],"id":"675af197-5d78-4203-a299-41aba14dfebd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"name\": \"{{segment_name}}\", // Segment name.\n\t\"type\": \"passive\", // Describes whether the segment is active (customers come in and leave based on set criteria), passive or static (manually selected customers).\n\t// The following example will create a passive segment that groups subscribed customers with more than $1,000 worth of orders.\n\t\"filter\": {\n\t\t\"junction\": \"and\",\n\t\t\"metadata.newsletter_subscribed\": {\n\t\t\t\"conditions\": {\n\t\t\t\t\"$is\": [\n\t\t\t\t\t\"true\"\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t\"summary.orders.total_amount\": {\n\t\t\t\"conditions\": {\n\t\t\t\t\"$more_than\": [\n\t\t\t\t\t100000\n\t\t\t\t]\n\t\t\t}\n\t\t}\n\t}\n}"},"url":"{{url}}/segments"},"response":[],"_postman_id":"675af197-5d78-4203-a299-41aba14dfebd"},{"name":"Create Segment - active example","event":[{"listen":"test","script":{"id":"9193acc8-b875-4695-856e-226a109e32e3","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Segment type is static\"] = jsonData.type === \"static\";","","pm.environment.set(\"segment-id\", jsonData.id);"],"type":"text/javascript","packages":{},"requests":{}}},{"listen":"prerequest","script":{"id":"e2c33075-33d1-4f52-b21d-cf5bd8bf5e8b","exec":["pm.environment.set(\"start-date\", new Date().toISOString());",""],"type":"text/javascript","packages":{},"requests":{}}}],"id":"63e36983-73df-4ecf-ae3c-838a3051092a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"{{segment_name}}\", // Segment name.\n    \"type\": \"auto-update\", // Describes whether the segment is active (customers come in and leave based on set criteria) or static (manually selected customers).\n    // The following example will create a segment that groups all Gold Loyalty customers from Voucherify who are subscribed and have more than $3,000 worth of orders.\n    // Please note, that the active segments can be complex. Voucherify's Dashboard offers creating even the most complex customer segments.\n    \"filter\": {\n        \"junction\": \"and\",\n        \"email\": {\n            \"conditions\": {\n                \"$ends_with\": [\n                    \"voucherify.io\"\n                ]\n            }\n        },\n        \"summary.orders.total_amount\": {\n            \"conditions\": {\n                \"$more_than\": [\n                    300000\n                ]\n            }\n        },\n        \"loyalty_tier.campaigns.{{Loyalty_Program_Name}}.loyalty_tier\": {\n            \"conditions\": {\n                \"$in\": [\n                    \"{{Loyalty_Tier_ID}}\"\n                ]\n            }\n        },\n        \"metadata.newsletter_subscribed\": {\n            \"conditions\": {\n                \"$is\": [\n                    \"true\"\n                ]\n            }\n        }\n    }\n}"},"url":"{{url}}/segments"},"response":[],"_postman_id":"63e36983-73df-4ecf-ae3c-838a3051092a"},{"name":"Delete Segment","event":[{"listen":"test","script":{"id":"a2face0d-a83a-4a69-acac-53afda8cf3fc","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;",""],"type":"text/javascript"}}],"id":"392a8f2f-f0a6-4e77-a192-96803258c22e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":""},"url":{"raw":"{{url}}/segments/:segment-id","host":["{{url}}"],"path":["segments",":segment-id"],"variable":[{"id":"941f7fa1-e2e4-4635-8fbb-7e571f1b8b61","key":"segment-id","value":"{{segment_id}}","description":"A unique customer segment ID."}]}},"response":[],"_postman_id":"392a8f2f-f0a6-4e77-a192-96803258c22e"},{"name":"List Segments","id":"8072c1f1-c385-4fd9-bc49-4204a2aac279","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/segments","host":["{{url}}"],"path":["segments"],"query":[{"key":"limit","value":"{{limit}}","description":"Maximum number of segments returned per request.\nAllowed range: 1–100.","disabled":true},{"key":"order","value":"{{order}}","description":"Sort results by creation date. Use created_at for ascending or -created_at for descending. Default: -created_at.","disabled":true},{"key":"starting_after","value":"{{starting_after}}","description":"Cursor for pagination. Returns segments created after the given timestamp (ISO 8601 format).","disabled":true},{"key":"filters[type][conditions][$is]","value":"{{segment_type}}","description":"Filter by segment type.\nExample: filters[type][conditions][$is]=auto-update\n\nSupported values include static, active and auto-update.","disabled":true},{"key":"filters[name][conditions][$contains]","value":"{{segment_name}}","description":"Filter by segment name using substring matching.\nReturns segments whose name contains the given value.\n\nExample: filters[name][conditions][$contains]=VIP","disabled":true},{"key":"filters[created_at][conditions][$after]","value":"{{segment_created_at}}","description":"Filter by segment creation date (ISO 8601 format) using condition-based operators.\n\nExamples:\nfilters[created_at][conditions][$after]=2025-01-01T00:00:00Z\nfilters[created_at][conditions][$before]=2025-12-31T23:59:59Z\n\nMultiple conditions can be combined to define a date range.","disabled":true},{"key":"ids","value":"{{segment_id}}","description":"Filter by a specific segment ID.\nExample: filters[id][conditions][$is]=seg_123\nReturn only selected segment(s).\nCan be repeated for multiple values:\nids=seg_1&ids=seg_2","disabled":true},{"key":"filters[id][conditions][$in][0]","value":"{{segment_id}}","description":"Filter by one or more segment IDs using the $in operator.\n\nProvide values as indexed parameters:\n\nfilters[id][conditions][$in][0]=seg_1\nfilters[id][conditions][$in][1]=seg_2\n\nEach index represents one value in the list.","type":"text","disabled":true},{"key":"filters[junction]","value":"{{filters_junction}}","description":"Defines how multiple filters are combined.\n\nand - all filter conditions must match\nor - any filter condition can match","type":"text","disabled":true}]},"description":"Returns a list of segments with support for filtering, sorting, and pagination.\n\nFiltering uses a condition-based query format:\n\n`filters[field][conditions][operator]=value`\n\nExample:\n\n`filters[type][conditions][$is]=auto-update`\n\nMultiple filters can be combined to narrow results.\n\nCommon operators:\n\n- `$is` - exact match\n    \n- `$contains` - substring match\n    \n- `$after`, `$before` - date filtering\n    \n\nExample request:\n\n`GET /v1/segments?limit=10&order=-created_at&filters[type][conditions][$is]=static`\n\n⚠️ Note: Simple filters like `filters[type]=value` are not supported."},"response":[],"_postman_id":"8072c1f1-c385-4fd9-bc49-4204a2aac279"},{"name":"List Segment Activities","id":"2fba1306-89c6-473b-9f3f-d2de686085e8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/segments/:id/activities","host":["{{url}}"],"path":["segments",":id","activities"],"query":[{"key":"limit","value":"{{limit}}","description":"Maximum number of activities returned per request.\nAllowed range: 1–100.","disabled":true},{"key":"order","value":"{{order}}","description":"Sort results by creation date.\nUse created_at (ascending) or -created_at (descending).\nDefault: -created_at.","disabled":true},{"key":"starting_after_id","value":"{{activity_id}}","description":"Cursor for pagination based on activity ID. Returns activities created after the specified activity.","disabled":true},{"key":"start_date","value":"{{start_date}}","description":"Filter activities created on or after this date.\nUse ISO 8601 timestamp format, for example:\n2025-12-18T00:00:00.000Z","disabled":true},{"key":"end_date","value":"{{end_date}}","description":"Filter activities created on or before this date.\nUse ISO 8601 timestamp format, for example:\n2025-12-18T23:59:59.999Z","disabled":true},{"key":"type","value":"{{activity_type}}","description":"Filter by event type.\nExample values:\n\nsegment.created\nsegment.updated\nsegment.filters.updated\nsegment.deleted\nsegment.activated","disabled":true},{"key":"category","value":"{{activity_category}}","description":"Filter by event category. Allowed values: ACTION or EFFECT.","disabled":true}],"variable":[{"key":"id","value":"{{segment_id}}","description":"The unique identifier of the segment whose activities will be retrieved."}]},"description":"Returns a list of activity events for a specific segment.\n\nActivities include events such as segment creation, updates, filter changes, activation, and deletion.\n\nResults are sorted by creation time (newest first) by default.\n\nExample requests:\n\n- Get all activities  \n    `GET /v1/segments/{id}/activities`\n    \n- Filter by type  \n    `GET /v1/segments/{id}/activities?type=segment.created`\n    \n- Filter by date range  \n    `GET /v1/segments/{id}/activities?start_date=2024-01-01&end_date=2024-12-31`\n    \n- Combine filters  \n    `GET /v1/segments/{id}/activities?type=segment.updated&limit=5&order=created_at`"},"response":[],"_postman_id":"2fba1306-89c6-473b-9f3f-d2de686085e8"}],"id":"322a3e68-7b80-491a-b046-476a09fdc7e9","description":"This section allows you to perform various operations on [ segments](https://docs.voucherify.io/reference/customer-segment-object). Voucherify lets you group customers in static or dynamic segments that can be used for validation rules, distribution targeting, and more. \n\nIt's recommended to create customer segments via the Dashboard.","_postman_id":"322a3e68-7b80-491a-b046-476a09fdc7e9"},{"name":"Events","item":[{"name":"Track Custom Event","event":[{"listen":"test","script":{"id":"678a0ca8-7844-4aaa-b023-15d6372d5aac","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;"],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"2ff1e8f5-99bc-4149-822c-b91d106be3df","exec":["pm.environment.set(\"start-date\", new Date().toISOString());",""],"type":"text/javascript"}}],"id":"8f7a8f1b-8a25-4a6a-a37a-dae6df5e803f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"customer\": {\n        \"source_id\": \"{{referee_source_id}}\" // 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.\n    },\n    \"referral\": { // Optional\n        \"code\": \"{{voucher_code}}\", // A code through which a new visitor has been referred to a service.\n        \"referrer_id\": \"{{referrer_source_id}}\" // Unique ID of the referring person - it is optional and not required if the referral code is provided.\n    },\n    \"event\": \"{{event_name}}\", // Event name. This is the same name that you used to define a custom event in the Dashboard > Project Settings > Event Schema.\n    \"metadata\": { // Optional, contains additional details of the event .\n        \"rating\": 5, // The integer values can be used as the basis for loyalty campaign's earning rules.\n        \"comment\": \"The examples are clean, efficient, and easy to understand.\" // Additional information that might be useful for reporting or validation.\n    }\n}"},"url":"{{url}}/events"},"response":[],"_postman_id":"8f7a8f1b-8a25-4a6a-a37a-dae6df5e803f"}],"id":"3dfc4a88-0204-4177-b329-9a18f44dd3f1","description":"This section lets you track [ custom events](https://docs.voucherify.io/reference/custom-event-object). You can use custom events for segmentation, referral code conversions, loyalty-earning rules, and more.","_postman_id":"3dfc4a88-0204-4177-b329-9a18f44dd3f1"},{"name":"Consents","item":[{"name":"List Consents (deprecated)","event":[{"listen":"test","script":{"type":"text/javascript","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Order amount is 12345\"] = jsonData.amount === 12345;","tests[\"Order status is CREATED\"] = jsonData.status === \"CREATED\";","","pm.environment.set(\"order-id\", jsonData.id);","pm.environment.set(\"order-customer-id\", jsonData.id);"],"id":"6c85a449-8789-406e-9fb0-6c7ab593148d"}},{"listen":"prerequest","script":{"type":"text/javascript","exec":["pm.environment.set(\"start-date\", new Date().toISOString());",""],"id":"9e4a9040-7c68-4e5f-98ba-38f06fb7f324"}}],"id":"8ce5e2fa-1c17-4510-88e9-57eb048a51fc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":"{{url}}/consents"},"response":[],"_postman_id":"8ce5e2fa-1c17-4510-88e9-57eb048a51fc"}],"id":"e9cc4531-fe02-4ef0-b5b3-87e06afc3874","description":"This section lets you list [list consents](https://docs.voucherify.io/reference/consents-object).","_postman_id":"e9cc4531-fe02-4ef0-b5b3-87e06afc3874"},{"name":"Async Actions","item":[{"name":"List Async Actions","event":[{"listen":"test","script":{"id":"5b86af16-3bbe-4197-b4c7-2be20107a1b8","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;"],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"39df7ac8-9877-4390-993d-66016cd664ac","exec":["pm.environment.set(\"start-date\", new Date().toISOString());",""],"type":"text/javascript"}}],"id":"4569b79a-48f1-4406-b06c-e24166703dca","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/async-actions?limit=100","host":["{{url}}"],"path":["async-actions"],"query":[{"key":"limit","value":"100","description":"Limit the number of asynchronous actions that the API returns in the response."},{"key":"end_date","value":"{{end_date}}","description":"Limits results to actions scheduled before the end_date. The date format needs to be consistent with ISO 8601 format (2016-11-16T14:14:31Z or 2016-11-16). The value has to be passed in the UTF-8 encoding standard.","disabled":true}]}},"response":[],"_postman_id":"4569b79a-48f1-4406-b06c-e24166703dca"},{"name":"Get Async Action","event":[{"listen":"test","script":{"id":"87cf0463-338c-4828-a657-bf047296221a","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;"],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"b874466d-a2a6-4bd2-bf70-7db538018df3","exec":["pm.environment.set(\"start-date\", new Date().toISOString());",""],"type":"text/javascript"}}],"id":"b6c876b9-fcc9-4adf-b4cb-43820678e6ff","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/async-actions/:async-action-id","host":["{{url}}"],"path":["async-actions",":async-action-id"],"variable":[{"id":"ca93d61f-c556-4c15-9613-83d3463c0946","key":"async-action-id","value":""}]}},"response":[],"_postman_id":"b6c876b9-fcc9-4adf-b4cb-43820678e6ff"}],"id":"9513f26e-ee88-4fdd-9bde-3a773c62c687","description":"This section lets you use our APIs connected with [async actions](https://docs.voucherify.io/reference/async-action-object).","_postman_id":"9513f26e-ee88-4fdd-9bde-3a773c62c687"},{"name":"Exports","item":[{"name":"List Exports","event":[{"listen":"test","script":{"id":"ee51d166-d437-4077-ad0a-110b6bb381a5","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Export ID is defined\"] = _.isUndefined(jsonData.id) === false;","tests[\"Created date is correct\"] = Math.abs(Date.create(jsonData.created_at) - Date.create(pm.environment.get(\"req-start-date\"))) < 5000;","","pm.environment.set(\"export-id\", jsonData.id);"],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"bf9c7ed9-0a26-4388-b43f-800737b3dcb9","exec":["pm.environment.set(\"req-start-date\", new Date().toISOString());",""],"type":"text/javascript"}}],"id":"61676c2b-cb0c-4ca2-8635-2a66a80a5f40","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/exports?limit=100&page=1&order=status","host":["{{url}}"],"path":["exports"],"query":[{"key":"limit","value":"100","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100 items."},{"key":"page","value":"1","description":"Which page of results to return."},{"key":"order","value":"status","description":"Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order."}]}},"response":[],"_postman_id":"61676c2b-cb0c-4ca2-8635-2a66a80a5f40"},{"name":"Get Export","event":[{"listen":"test","script":{"id":"cf22bf8b-b8a3-43fe-af07-6868c6c860b4","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Export ID is defined\"] = _.isUndefined(jsonData.id) === false;","tests[\"Created date is correct\"] = Math.abs(Date.create(jsonData.created_at) - Date.create(pm.environment.get(\"req-start-date\"))) < 5000;","","pm.environment.set(\"export-id\", jsonData.id);"],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"60f295f2-96d0-4a2a-b966-482fbc18570d","exec":["pm.environment.set(\"req-start-date\", new Date().toISOString());",""],"type":"text/javascript"}}],"id":"55d80090-7b26-4e95-9038-021166f94c2a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/exports/:export-id","host":["{{url}}"],"path":["exports",":export-id"],"variable":[{"id":"24ee0432-4884-4df3-a0b0-34410608b6e4","key":"export-id","value":""}]}},"response":[],"_postman_id":"55d80090-7b26-4e95-9038-021166f94c2a"},{"name":"Download Export","event":[{"listen":"test","script":{"id":"e91e8f5b-69a1-42bc-af25-66fda4906bbd","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Export ID is defined\"] = _.isUndefined(jsonData.id) === false;","tests[\"Created date is correct\"] = Math.abs(Date.create(jsonData.created_at) - Date.create(pm.environment.get(\"req-start-date\"))) < 5000;","","pm.environment.set(\"export-id\", jsonData.id);"],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"033d4433-7ae9-4009-b905-28c4932d7534","exec":["pm.environment.set(\"req-start-date\", new Date().toISOString());",""],"type":"text/javascript"}}],"id":"a7462519-26d5-46fb-8c29-b600097c78be","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":""},"url":{"raw":"https://{{cluster}}.download.voucherify.io/v1/exports/:export-id?token={{token}}","protocol":"https","host":["{{cluster}}","download","voucherify","io"],"path":["v1","exports",":export-id"],"query":[{"key":"token","value":"{{token}}","description":"Token that was issued to the export, to get this token, get the export first."}],"variable":[{"id":"e0f49e31-613f-4008-be0f-67522aec45e6","key":"export-id","value":""}]}},"response":[],"_postman_id":"a7462519-26d5-46fb-8c29-b600097c78be"},{"name":"Create Export","event":[{"listen":"test","script":{"id":"63d0a81e-56cc-4292-8139-73dbeac8fe66","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Export ID is defined\"] = _.isUndefined(jsonData.id) === false;","tests[\"Created date is correct\"] = Math.abs(Date.create(jsonData.created_at) - Date.create(pm.environment.get(\"req-start-date\"))) < 5000;","","pm.environment.set(\"export-id\", jsonData.id);"],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"c83c3e62-676a-4686-9007-943542b19b11","exec":["pm.environment.set(\"req-start-date\", new Date().toISOString());",""],"type":"text/javascript"}}],"id":"f966d35b-7165-4800-a455-14e1e96103c7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"exported_object\": \"voucher\",\n    \"parameters\": {\n        \"fields\": [\n            \"code\",\n            \"voucher_type\",\n            \"value\",\n            \"discount_type\",\n            \"campaign\",\n            \"category\",\n            \"start_date\",\n            \"expiration_date\",\n            \"gift_balance\",\n            \"loyalty_balance\",\n            \"redemption_quantity\",\n            \"redemption_count\",\n            \"active\",\n            \"qr_code\",\n            \"bar_code\",\n            \"metadata\",\n            \"id\",\n            \"is_referral_code\",\n            \"created_at\",\n            \"updated_at\",\n            \"validity_timeframe_interval\",\n            \"validity_timeframe_duration\",\n            \"validity_day_of_week\",\n            \"discount_amount_limit\",\n            \"campaign_id\",\n            \"additional_info\",\n            \"customer_id\",\n            \"discount_unit_type\",\n            \"discount_unit_effect\"\n        ],\n        \"filters\": {\n            \"campaign_ids\": {\n                \"conditions\": {\n                    \"$in\": [\n                        \"{{campaign_id}}\"\n                    ]\n                }\n            }\n        }\n    }\n}"},"url":"{{url}}/exports"},"response":[],"_postman_id":"f966d35b-7165-4800-a455-14e1e96103c7"},{"name":"Delete Export","event":[{"listen":"test","script":{"id":"40817425-e580-43d7-afdb-51dc802bd5cc","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;",""],"type":"text/javascript"}}],"id":"f60089fb-93af-4992-9ef7-452b2901a3c2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/exports/:export-id","host":["{{url}}"],"path":["exports",":export-id"],"variable":[{"id":"cc3cc9b9-7be2-4eb2-af65-5e2c15d90255","key":"export-id","value":"{{export_id}}","description":"Unique export object ID of previously created export. This object can be a: voucher, redemption, publication, customer, order, points_expiration, or voucher_transactions."}]}},"response":[],"_postman_id":"f60089fb-93af-4992-9ef7-452b2901a3c2"}],"id":"cd8f1bb9-e5da-4abf-8665-8e4ca1df760b","description":"This section lets you use our APIs connected with [exports](https://docs.voucherify.io/reference/export-object).","_postman_id":"cd8f1bb9-e5da-4abf-8665-8e4ca1df760b"},{"name":"Categories","item":[{"name":"List Categories","id":"56ea8b95-1291-4d2c-8c2b-dbb5ecff2714","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":"{{url}}/categories"},"response":[],"_postman_id":"56ea8b95-1291-4d2c-8c2b-dbb5ecff2714"},{"name":"Get Category","id":"fe5e637c-518f-4ea4-9c78-f15f7e0d4718","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/categories/:category-id","host":["{{url}}"],"path":["categories",":category-id"],"variable":[{"id":"aed5a4b3-f517-4b96-a33e-9e5bfdf5a260","key":"category-id","value":"{{category_id}}","description":"Unique category ID assigned by Voucherify."}]}},"response":[],"_postman_id":"fe5e637c-518f-4ea4-9c78-f15f7e0d4718"},{"name":"Create Category","id":"82d43603-61b4-4629-8968-844b045a54b6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"First\",\n    \"hierarchy\": 1\n}","options":{"raw":{"language":"json"}}},"url":"{{url}}/categories"},"response":[],"_postman_id":"82d43603-61b4-4629-8968-844b045a54b6"},{"name":"Update Category","id":"c275d1cf-cb84-4e19-89ed-f0cf8973afdf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"Summer\",\n    \"hierarchy\": 2\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"{{url}}/categories/:category-id","host":["{{url}}"],"path":["categories",":category-id"],"variable":[{"id":"fcc0bc82-b13d-4c5c-a84b-c012e35a1952","key":"category-id","value":"{{category_id}}","description":"Unique category ID assigned by Voucherify."}]}},"response":[],"_postman_id":"c275d1cf-cb84-4e19-89ed-f0cf8973afdf"},{"name":"Delete Category","id":"70a0faa5-ca65-4866-9a76-bcffd31a1ad5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/categories/:category-id","host":["{{url}}"],"path":["categories",":category-id"],"variable":[{"id":"92fe85ca-7520-417d-9bf4-f18a00ff5279","key":"category-id","value":"{{category_id}}","description":"Unique category ID assigned by Voucherify."}]}},"response":[],"_postman_id":"70a0faa5-ca65-4866-9a76-bcffd31a1ad5"}],"id":"88de27a8-0318-44b0-82f3-665e3e3ffabe","description":"This section allows you to perform various operations on [categories](https://docs.voucherify.io/reference/category-object).","_postman_id":"88de27a8-0318-44b0-82f3-665e3e3ffabe"},{"name":"Metadata Schemas","item":[{"name":"List Metadata Schemas","id":"f99886c6-d057-45d2-a7cc-b5159eae706c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":"{{url}}/metadata-schemas"},"response":[],"_postman_id":"f99886c6-d057-45d2-a7cc-b5159eae706c"},{"name":"Get Metadata Schema","id":"fd1dcad5-af81-4175-83f9-637c37c098df","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/metadata-schemas/:resource","host":["{{url}}"],"path":["metadata-schemas",":resource"],"variable":[{"id":"04048495-e93d-4c71-9ad6-7964e6837be2","key":"resource","value":"{{resource}}","description":"There is an infinite number of possibilities for retrieving metadata schemas by the resource type because you can define custom metadata schemas."}]}},"response":[],"_postman_id":"fd1dcad5-af81-4175-83f9-637c37c098df"}],"id":"a7e6f29c-8889-46e6-bac0-33f28e60489d","description":"This section lets you use our APIs connected with [ metadata schemas](https://docs.voucherify.io/reference/metadata-schema-object). With metadata, you can attach unique attributes to all Voucherify objects to build business-specific promotions. For example, booking_type, gender, and payment_method are all examples of metadata.","_postman_id":"a7e6f29c-8889-46e6-bac0-33f28e60489d"},{"name":"Locations","item":[{"name":"List Locations","id":"347647bb-26f0-4e18-aa15-3095980696d2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/locations?limit=100","host":["{{url}}"],"path":["locations"],"query":[{"key":"limit","value":"100","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100 items."},{"key":"order","value":"-created_at","description":"Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.","disabled":true},{"key":"filters[created_at][conditions][$before]","value":"2024-02-12T14%3A14%3A31Z","description":"Value is before this date. Value for this parameter is in ISO 8601 format. The value has to be passed in the UTF-8 encoding standard.","disabled":true},{"key":"filters[name][name][conditions][$in][0]","value":"{{name}}","description":"A filter on the list based on the name field.","type":"text","disabled":true},{"key":"filters[junction]","value":"AND","description":"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.","type":"text","disabled":true}]}},"response":[],"_postman_id":"347647bb-26f0-4e18-aa15-3095980696d2"},{"name":"Get Location","id":"8fea5e09-6c92-482c-913e-28b30b12ae9c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/locations/:location-id","host":["{{url}}"],"path":["locations",":location-id"],"variable":[{"id":"5ba4a640-2825-4049-8e0d-e4716bcb649e","key":"location-id","value":"{{location_id}}","description":"The unique location ID."}]}},"response":[],"_postman_id":"8fea5e09-6c92-482c-913e-28b30b12ae9c"}],"id":"186412de-d6d4-4f9d-8fa9-0cc74a4f8853","description":"This section allows you to use our APIs connected with [locations](https://docs.voucherify.io/reference/location-object). Note that the geofencing feature is available only in the Enterprise subscription (on demand).","_postman_id":"186412de-d6d4-4f9d-8fa9-0cc74a4f8853"},{"name":"Bin","item":[{"name":"List Bin Entries","id":"b98c3e83-0d66-4704-adde-3fd77286a206","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/trash-bin?limit=100&order=id","host":["{{url}}"],"path":["trash-bin"],"query":[{"key":"limit","value":"100","description":"Limits the number of bin entry objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 entries."},{"key":"order","value":"id","description":"Orders the bin entries according to the date and time when they were moved to the bin or according to the bin entry ID. The dash - preceding a sorting option means sorting in a descending order."},{"key":"starting_after_id","value":"","description":"A cursor for pagination. It retrieves the results starting after the given bin entry ID.","disabled":true},{"key":"filters","value":"","description":"Filters for listing bin entries.","disabled":true}]}},"response":[],"_postman_id":"b98c3e83-0d66-4704-adde-3fd77286a206"},{"name":"Delete Bin Entry","id":"0a983379-f882-4603-acd4-70a9e261b44b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"X-App-Id","value":"{{X-App-Id}}"},{"key":"X-App-Token","value":"{{X-App-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{url}}/trash-bin/:binEntryId","host":["{{url}}"],"path":["trash-bin",":binEntryId"],"variable":[{"id":"aa552bdb-6735-4949-a031-376efaa896c8","key":"binEntryId","value":"{{binEntryId}}","description":"Provide the unique identifier of the bin entry."}]}},"response":[],"_postman_id":"0a983379-f882-4603-acd4-70a9e261b44b"}],"id":"c146bb09-f73f-46e9-92ee-f15f69e94ceb","description":"This section allows you to use our APIs connected with the [bin](https://docs.voucherify.io/reference/list-bin-entries) functionality.","_postman_id":"c146bb09-f73f-46e9-92ee-f15f69e94ceb"},{"name":"Management","item":[{"name":"Project Management","item":[{"name":"Create Project","id":"603c6adb-f767-4718-ba66-f1bed7e7ea5c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-Management-Id","value":"{{X-Management-Id}}"},{"key":"X-Management-Token","value":"{{X-Management-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"case_sensitive_codes\": true, // Determines if the vouchers in the project will be case sensitive (if true, C0dE-cfV is not equal to c0de-cfv) or case insensitive (if false, C0dE-cfV is equal to c0de-cfv).\n    \"name\": \"Test Project5\", // The name of the project.\n    \"description\": \"For testing purposes\", // A user-defined description of the project, e.g. its purpose, scope, region.\n    \"timezone\": \"UTC\", // The time zone in which the project is established. It is equal to one of the allowed values.\n    \"currency\": \"EUR\", // The currency used in the project. It is equal to a 3-letter ISO code.\n    \"dial_code\": \"+48\", // The dial code for the project. It is equal to one of the allowed values.\n    \"webhook_version\": \"v2024-01-01\", // The webhook version used in the project.\n    \"client_trusted_domains\": [ // An array of URL addresses that allow client requests.\n    ],\n    \"client_redeem_enabled\": false, // Enables client-side redemption. Value true means the feature is enabled. Value false means the feature is disabled.\n    \"client_publish_enabled\": false, // Enables client-side publication. Value true means the feature is enabled. Value false means the feature is disabled.\n    \"client_list_vouchers_enabled\": false, // Enables client-side listing of vouchers. Value true means the feature is enabled. Value false means the feature is disabled.\n    \"client_create_customer_enabled\": false, // Enables client-side creation of customers. Value true means the feature is enabled. Value false means the feature is disabled.\n    \"client_loyalty_events_enabled\": false, // Enables client-side events for loyalty and referral programs. Value true means the feature is enabled. Value false means the feature is disabled.\n    \"client_set_voucher_expiration_date_enabled\": false, // Enables client-side setting of voucher expiration date. Value true means the feature is enabled. Value false means the feature is disabled.\n    \"api_usage_notifications\": { // Determines the notification settings.\n        \"redemptions\": { // Determines the notification settings for redemptions. The notification can be used as a warning that a limit will be reached soon.\n            \"enabled\": true, // Enables the notification. Value true means the feature is enabled. Value false means the feature is disabled.\n            \"value\": 80, // The percent value of the limit which, when reached, triggers the notification.\n            \"emails\": [ // An array of email addresses which will receive the notification.\n                \"your.email@your.domain\"\n            ],\n            \"in_app\": true // Enables the notification in the application. Value true means the feature is enabled. Value false means the feature is disabled.\n        },\n        \"messages\": { // Determines the notification settings for distributed messages according to the day and month limit. The notification can be used as a warning that a limit will be reached soon.\n            \"enabled\": true, // Enables the notification. Value true means the feature is enabled. Value false means the feature is disabled.\n            \"value\": 80, // The percent value of the limit which, when reached, triggers the notification.\n            \"emails\": [\n                \"your.email@your.domain\" // An array of email addresses which will receive the notification.\n            ],\n            \"in_app\": true // Enables the notification in the application. Value true means the feature is enabled. Value false means the feature is disabled.\n        },\n        \"api_calls\": { // Determines the notification settings for API calls made for the hourly limit. The notification can be used as a warning that a limit will be reached soon. It is sent maximum once per hour.\n            \"enabled\": true, // Enables the notification. Value true means the feature is enabled. Value false means the feature is disabled.\n            \"value\": 80, // The percent value of the limit which, when reached, triggers the notification.\n            \"emails\": [\n                \"your.email@your.domain\" // An array of email addresses which will receive the notification.\n            ],\n            \"in_app\": true // Enables the notification in the application. Value true means the feature is enabled. Value false means the feature is disabled.\n        },\n        \"bulk_api_calls\": { // Determines the notification settings for bulk API calls made for the hourly limit. The notification can be used as a warning that a limit will be reached soon. It is sent maximum once per hour.\n            \"enabled\": true, // Enables the notification. Value true means the feature is enabled. Value false means the feature is disabled.\n            \"value\": 80, // The percent value of the limit which, when reached, triggers the notification.\n            \"emails\": [ // An array of email addresses which will receive the notification.\n                \"your.email@your.domain\"\n            ],\n            \"in_app\": true // Enables the notification in the application. Value true means the feature is enabled. Value false means the feature is disabled.\n        },\n        \"webhook_calls\": { // Determines the notification settings for webhook calls made for the daily limit. The notification can be used as a warning that a limit will be reached soon. It is sent maximum four times a day.\n            \"enabled\": true, // Enables the notification. Value true means the feature is enabled. Value false means the feature is disabled.\n            \"value\": 80, // The percent value of the limit which, when reached, triggers the notification.\n            \"emails\": [ // An array of email addresses which will receive the notification.\n                \"your.email@your.domain\"\n            ],\n            \"in_app\": true // Enables the notification in the application. Value true means the feature is enabled. Value false means the feature is disabled.\n        },\n        \"cycle_calls\": { // Determines the notification settings for API calls made for the billing cycle limit. The notification can be used as a warning that a limit will be reached soon. It is sent maximum once per the billing cycle.\n            \"enabled\": true, // Enables the notification. Value true means the feature is enabled. Value false means the feature is disabled.\n            \"value\": 80, // The percent value of the limit which, when reached, triggers the notification.\n            \"emails\": [ // An array of email addresses which will receive the notification.\n                \"your.email@your.domain\"\n            ],\n            \"in_app\": true // Enables the notification in the application. Value true means the feature is enabled. Value false means the feature is disabled.\n        }\n    },\n    \"webhooks_callout_notifications\": { // Determines the notification settings for webhook callouts configured in Distributions and Project settings.\n        \"distributions\": { // Determines the notification settings for webhooks sent through Distributions.\n            \"email\": true, // Enables the notification through an email. Value true means the feature is enabled. Value false means the feature is disabled.\n            \"in_app\": true, // Enables the notification through an email. Value true means the feature is enabled. Value false means the feature is disabled.\n            \"emails\": [\n                \"your.email@your.domain\" // An array of email addresses which will receive the notification.\n            ]\n        },\n        \"webhooks\": { // Determines the notification settings for webhooks sent as set out in the Project settings.\n            \"email\": true, // Enables the notification through an email. Value true means the feature is enabled. Value false means the feature is disabled.\n            \"in_app\": true, // Enables the notification through an email. Value true means the feature is enabled. Value false means the feature is disabled.\n            \"emails\": [\n                \"your.email@your.domain\" // An array of email addresses which will receive the notification.\n            ]\n        }\n    },\n    \"cluster_id\": \"eu1\", // The identifier of the cluster where the project will be created. The default cluster is eu1 unless otherwise configured.\n    \"api_version\": \"v2018-08-01\", // The API version used in the project. Currently, the default and only value is v2018-08-01.\n    \"users\": [ // The users (their identifiers, logins, and roles) who will be assigned to the project. You can assign only existing Voucherify users.It must be used either in the following combinations: id and role, or login and role.\n        {\n            \"id\": \"id\", // The unique identifier of the user who will be assigned to the project. Required with the role string. Do not use with the login string. You can find it in the Team Settings -> Team -> Edit User (3 dots at the end of the row)\n            \"login\": \"login\", // The login data of the user who will be assigned to the project. Required with the role string. Do not use with the id string.\n            \"role\": \"role\" // The role of the user to be added. It can be one of the following predefined roles: ADMIN, USER, VIEWER, MERCHANT or an ID of a custom role.\n        }\n    ]\n}"},"url":{"raw":"{{managementUrl}}/projects/","host":["{{managementUrl}}"],"path":["projects",""],"query":[{"key":"","value":"","disabled":true}]}},"response":[],"_postman_id":"603c6adb-f767-4718-ba66-f1bed7e7ea5c"},{"name":"List Projects","id":"486a6e16-483f-4be6-ac5c-7e8cf65e3f03","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-Management-Id","value":"{{X-Management-Id}}"},{"key":"X-Management-Token","value":"{{X-Management-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":"{{managementUrl}}/projects"},"response":[],"_postman_id":"486a6e16-483f-4be6-ac5c-7e8cf65e3f03"},{"name":"Get Project","id":"597a7037-7a39-4e2c-b906-c7640dc0a4ad","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-Management-Id","value":"{{X-Management-Id}}"},{"key":"X-Management-Token","value":"{{X-Management-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{managementUrl}}/projects/:projectID","host":["{{managementUrl}}"],"path":["projects",":projectID"],"variable":[{"key":"projectID","value":""}]}},"response":[],"_postman_id":"597a7037-7a39-4e2c-b906-c7640dc0a4ad"},{"name":"Update Project","id":"ee0061db-f387-4d6f-8169-e364a237e79f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"X-Management-Id","value":"{{X-Management-Id}}"},{"key":"X-Management-Token","value":"{{X-Management-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"case_sensitive_codes\": true, // Determines if the vouchers in the project will be case sensitive (if true, C0dE-cfV is not equal to c0de-cfv) or case insensitive (if false, C0dE-cfV is equal to c0de-cfv).\n    \"name\": \"Name change\", // The name of the project.\n    \"description\": \"For testing purposes\", // A user-defined description of the project, e.g. its purpose, scope, region.\n    \"timezone\": \"UTC\", // The time zone in which the project is established. It is equal to one of the allowed values.\n    \"currency\": \"EUR\", // The currency used in the project. It is equal to a 3-letter ISO code.\n    \"dial_code\": \"+48\", // The dial code for the project. It is equal to one of the allowed values.\n    \"webhook_version\": \"v2024-01-01\", // The webhook version used in the project.\n    \"client_trusted_domains\": [ // An array of URL addresses that allow client requests.\n    ],\n    \"client_redeem_enabled\": false, // Enables client-side redemption. Value true means the feature is enabled. Value false means the feature is disabled.\n    \"client_publish_enabled\": false, // Enables client-side publication. Value true means the feature is enabled. Value false means the feature is disabled.\n    \"client_list_vouchers_enabled\": false, // Enables client-side listing of vouchers. Value true means the feature is enabled. Value false means the feature is disabled.\n    \"client_create_customer_enabled\": false, // Enables client-side creation of customers. Value true means the feature is enabled. Value false means the feature is disabled.\n    \"client_loyalty_events_enabled\": false, // Enables client-side events for loyalty and referral programs. Value true means the feature is enabled. Value false means the feature is disabled.\n    \"client_set_voucher_expiration_date_enabled\": false, // Enables client-side setting of voucher expiration date. Value true means the feature is enabled. Value false means the feature is disabled.\n    \"api_usage_notifications\": { // Determines the notification settings.\n        \"redemptions\": { // Determines the notification settings for redemptions. The notification can be used as a warning that a limit will be reached soon.\n            \"enabled\": true, // Enables the notification. Value true means the feature is enabled. Value false means the feature is disabled.\n            \"value\": 80, // The percent value of the limit which, when reached, triggers the notification.\n            \"emails\": [ // An array of email addresses which will receive the notification.\n                \"your.email@your.domain\"\n            ],\n            \"in_app\": true // Enables the notification in the application. Value true means the feature is enabled. Value false means the feature is disabled.\n        },\n        \"messages\": { // Determines the notification settings for distributed messages according to the day and month limit. The notification can be used as a warning that a limit will be reached soon.\n            \"enabled\": true, // Enables the notification. Value true means the feature is enabled. Value false means the feature is disabled.\n            \"value\": 80, // The percent value of the limit which, when reached, triggers the notification.\n            \"emails\": [\n                \"your.email@your.domain\" // An array of email addresses which will receive the notification.\n            ],\n            \"in_app\": true // Enables the notification in the application. Value true means the feature is enabled. Value false means the feature is disabled.\n        },\n        \"api_calls\": { // Determines the notification settings for API calls made for the hourly limit. The notification can be used as a warning that a limit will be reached soon. It is sent maximum once per hour.\n            \"enabled\": true, // Enables the notification. Value true means the feature is enabled. Value false means the feature is disabled.\n            \"value\": 80, // The percent value of the limit which, when reached, triggers the notification.\n            \"emails\": [\n                \"your.email@your.domain\" // An array of email addresses which will receive the notification.\n            ],\n            \"in_app\": true // Enables the notification in the application. Value true means the feature is enabled. Value false means the feature is disabled.\n        },\n        \"bulk_api_calls\": { // Determines the notification settings for bulk API calls made for the hourly limit. The notification can be used as a warning that a limit will be reached soon. It is sent maximum once per hour.\n            \"enabled\": true, // Enables the notification. Value true means the feature is enabled. Value false means the feature is disabled.\n            \"value\": 80, // The percent value of the limit which, when reached, triggers the notification.\n            \"emails\": [ // An array of email addresses which will receive the notification.\n                \"your.email@your.domain\"\n            ],\n            \"in_app\": true // Enables the notification in the application. Value true means the feature is enabled. Value false means the feature is disabled.\n        },\n        \"webhook_calls\": { // Determines the notification settings for webhook calls made for the daily limit. The notification can be used as a warning that a limit will be reached soon. It is sent maximum four times a day.\n            \"enabled\": true, // Enables the notification. Value true means the feature is enabled. Value false means the feature is disabled.\n            \"value\": 80, // The percent value of the limit which, when reached, triggers the notification.\n            \"emails\": [ // An array of email addresses which will receive the notification.\n                \"your.email@your.domain\"\n            ],\n            \"in_app\": true // Enables the notification in the application. Value true means the feature is enabled. Value false means the feature is disabled.\n        },\n        \"cycle_calls\": { // Determines the notification settings for API calls made for the billing cycle limit. The notification can be used as a warning that a limit will be reached soon. It is sent maximum once per the billing cycle.\n            \"enabled\": true, // Enables the notification. Value true means the feature is enabled. Value false means the feature is disabled.\n            \"value\": 80, // The percent value of the limit which, when reached, triggers the notification.\n            \"emails\": [ // An array of email addresses which will receive the notification.\n                \"your.email@your.domain\"\n            ],\n            \"in_app\": true // Enables the notification in the application. Value true means the feature is enabled. Value false means the feature is disabled.\n        }\n    },\n    \"webhooks_callout_notifications\": { // Determines the notification settings for webhook callouts configured in Distributions and Project settings.\n        \"distributions\": { // Determines the notification settings for webhooks sent through Distributions.\n            \"email\": true, // Enables the notification through an email. Value true means the feature is enabled. Value false means the feature is disabled.\n            \"in_app\": true, // Enables the notification through an email. Value true means the feature is enabled. Value false means the feature is disabled.\n            \"emails\": [\n                \"your.email@your.domain\" // An array of email addresses which will receive the notification.\n            ]\n        },\n        \"webhooks\": { // Determines the notification settings for webhooks sent as set out in the Project settings.\n            \"email\": true, // Enables the notification through an email. Value true means the feature is enabled. Value false means the feature is disabled.\n            \"in_app\": true, // Enables the notification through an email. Value true means the feature is enabled. Value false means the feature is disabled.\n            \"emails\": [\n                \"your.email@your.domain\" // An array of email addresses which will receive the notification.\n            ]\n        }\n    },\n    \"cluster_id\": \"staging\", // The identifier of the cluster where the project will be created. The default cluster is eu1 unless otherwise configured.\n    \"api_version\": \"v2018-08-01\", // The API version used in the project. Currently, the default and only value is v2018-08-01.\n    \"users\": [ // The users (their identifiers, logins, and roles) who will be assigned to the project. You can assign only existing Voucherify users.It must be used either in the following combinations: id and role, or login and role.\n        {\n            \"id\": \"string\", // The unique identifier of the user who will be assigned to the project. Required with the role string. Do not use with the login string. You can find it in the Team Settings -> Team -> Edit User (3 dots at the end of the row)\n            \"login\": \"string\", // The login data of the user who will be assigned to the project. Required with the role string. Do not use with the id string.\n            \"role\": \"string\" // The role of the user to be added. It can be one of the following predefined roles: ADMIN, USER, VIEWER, MERCHANT or an ID of a custom role.\n        }\n    ]\n}"},"url":{"raw":"{{managementUrl}}/projects/:projectID","host":["{{managementUrl}}"],"path":["projects",":projectID"],"variable":[{"key":"projectID","value":""}]}},"response":[],"_postman_id":"ee0061db-f387-4d6f-8169-e364a237e79f"},{"name":"Delete Project","id":"efc17b35-f3c0-4c12-93a1-d7b5d466ff76","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"X-Management-Id","value":"{{X-Management-Id}}"},{"key":"X-Management-Token","value":"{{X-Management-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{managementUrl}}/projects/:projectID","host":["{{managementUrl}}"],"path":["projects",":projectID"],"variable":[{"key":"projectID","value":""}]}},"response":[],"_postman_id":"efc17b35-f3c0-4c12-93a1-d7b5d466ff76"}],"id":"41b4f9e3-06a5-4efa-9967-0381c1e0eb03","_postman_id":"41b4f9e3-06a5-4efa-9967-0381c1e0eb03"},{"name":"User Management","item":[{"name":"Invite a New User","id":"e9bd1980-6110-40c9-bb3c-fc8fffa0ba67","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-Management-Id","value":"{{X-Management-Id}}"},{"key":"X-Management-Token","value":"{{X-Management-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"email\": \"alex.doe@your-domain-name.com\", // Email address to which the invitation will be sent. Must be a valid email address.\n    \"first_name\": \"Alex\", // First name of the person who will receive the invitation. The name will be used in the user profile.\n    \"last_name\": \"Doe\", // Last name of the person who will receive the invitation. The name will be used in the user profile.\n    \"projects\": { // In the key, provide the project ID to which the new user will be assigned. In the value, provide the role which the user will have in the project. The predefined Voucherify roles are: ADMIN, USER, VIEWER, MERCHANT, USER_RESTRICTED. Send a custom role ID (Enterprise feature) to assign a custom role.\n        \"{{project_id}}\": \"{{user_role}}\"\n    }\n}"},"url":{"raw":"{{managementUrl}}/projects/users/invite","host":["{{managementUrl}}"],"path":["projects","users","invite"],"query":[{"key":"","value":"","disabled":true}]}},"response":[],"_postman_id":"e9bd1980-6110-40c9-bb3c-fc8fffa0ba67"},{"name":"Assign User","id":"372d7734-2033-461a-9165-aee1bf23e9e9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-Management-Id","value":"{{X-Management-Id}}"},{"key":"X-Management-Token","value":"{{X-Management-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"id\": \"id\", // The unique identifier of the user who will be assigned to the project. Required with the role string. Do not use with the login string. You can find it in the Team Settings -> Team -> Edit User (3 dots at the end of the row)\n    \"login\": \"login\", // The login data of the user who will be assigned to the project. Required with the role string. Do not use with the id string.\n    \"role\": \"role\" // The role of the user to be added. It can be one of the following predefined roles: ADMIN, USER, VIEWER, MERCHANT or an ID of a custom role.\n}"},"url":{"raw":"{{managementUrl}}/projects/:projectID/users","host":["{{managementUrl}}"],"path":["projects",":projectID","users"],"query":[{"key":"","value":"","disabled":true}],"variable":[{"key":"projectID","value":""}]}},"response":[],"_postman_id":"372d7734-2033-461a-9165-aee1bf23e9e9"},{"name":"List Users","id":"bad56432-58ea-472f-9b93-10d0d9be5afc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-Management-Id","value":"{{X-Management-Id}}"},{"key":"X-Management-Token","value":"{{X-Management-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{managementUrl}}/projects/:projectID/users","host":["{{managementUrl}}"],"path":["projects",":projectID","users"],"query":[{"key":"","value":"","disabled":true}],"variable":[{"key":"projectID","value":""}]}},"response":[],"_postman_id":"bad56432-58ea-472f-9b93-10d0d9be5afc"},{"name":"Get User","id":"df0465ab-353f-4172-b9cf-32380d01d76f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-Management-Id","value":"{{X-Management-Id}}"},{"key":"X-Management-Token","value":"{{X-Management-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{managementUrl}}/projects/:projectID/users/:userID","host":["{{managementUrl}}"],"path":["projects",":projectID","users",":userID"],"query":[{"key":"","value":"","disabled":true}],"variable":[{"key":"projectID","value":""},{"key":"userID","value":""}]}},"response":[],"_postman_id":"df0465ab-353f-4172-b9cf-32380d01d76f"},{"name":"Update User","id":"d939881f-3b46-4e53-9fba-b59cbe196259","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"X-Management-Id","value":"{{X-Management-Id}}"},{"key":"X-Management-Token","value":"{{X-Management-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"role\": \"role\" // The role of the user to be added. It can be a custom role or one of following predefined roles: ADMIN, USER, VIEWER, MERCHANT or an ID of a custom role.\n}"},"url":{"raw":"{{managementUrl}}/projects/:projectID/users/:userID","host":["{{managementUrl}}"],"path":["projects",":projectID","users",":userID"],"query":[{"key":"","value":"","disabled":true}],"variable":[{"key":"projectID","value":"sand_GD11tDC9"},{"key":"userID","value":"user_dpadKlN8OlY5pNCrr074qj4S53UMSo2u"}]}},"response":[],"_postman_id":"d939881f-3b46-4e53-9fba-b59cbe196259"},{"name":"Unassign User","id":"8a6e5474-fa39-4c8f-8c06-c8925e8bdce0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"X-Management-Id","value":"{{X-Management-Id}}"},{"key":"X-Management-Token","value":"{{X-Management-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{managementUrl}}/projects/:projectID/users/:userID","host":["{{managementUrl}}"],"path":["projects",":projectID","users",":userID"],"query":[{"key":"","value":"","disabled":true}],"variable":[{"key":"projectID","value":""},{"key":"userID","value":""}]}},"response":[],"_postman_id":"8a6e5474-fa39-4c8f-8c06-c8925e8bdce0"}],"id":"d9b67512-881b-4135-b561-fed03e55b536","_postman_id":"d9b67512-881b-4135-b561-fed03e55b536"},{"name":"Metadata Schema Management","item":[{"name":"Create Metadata Schema (String)","id":"ec71a591-af59-4000-bfb2-96b6c34e41fe","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-Management-Id","value":"{{X-Management-Id}}"},{"key":"X-Management-Token","value":"{{X-Management-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"related_object\": \"custom_test\", // The resource type. You can define custom metadata schemas, which have a custom \"related_object\" resource type, or you can use standard resource types: \"campaign\", \"customer\", \"earning_rule\", \"loyalty_tier\", \"order\", \"order_item\", \"product\", \"promotion_tier\", \"publication\", \"redemption\", \"reward\", \"voucher\".\n    \"allow_defined_only\": true, // 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.\n    \"properties\": { // Object representing metadata definitions.\n        \"region\": { // Custom property name. This is also shown in Project Settings > Metadata Schema in the Voucherify Dashboard.\n            \"type\": \"string\", // Indicates the type of metadata: string, number, object, date, datetime, geopoint, boolean, image_URL. Note that \"geopoint\" type is a paid feature.\n            \"optional\": true, // Indicates if this definition is optional or not for the resource.\n            \"array\": true, // Indicates if the definition is an array.\n            \"deleted\": false, // Indicates if the definition has been deleted from the schema.\n            \"object_type\": null, // The name of the custom resource (i.e. a nested object) if the resource has been previously defined. Otherwise, it is null for other types.\n            // \"min_length\": 0, // Value indicating the minimum length. Available only for the string type.\n            // \"max_length\": 0, // Value indicating the maximum length. Available only for the string type.\n            // \"exact_length\": 6, // Value indicating the exact length. Available only for the string type.\n            \"eq\": [ // Array of values that are allowed. Available only for the string and number types.\n                \"APAC\",\n                \"NA\"\n            ]\n        },\n        \"minimal_order_value\": { // Custom property name. This is also shown in Project Settings > Metadata Schema in the Voucherify Dashboard.\n            \"type\": \"number\", // Indicates the type of metadata: string, number, object, date, datetime, geopoint, boolean, image_URL. Note that \"geopoint\" type is a paid feature.\n            \"optional\": true, // Indicates if this definition is optional or not for the resource.\n            \"array\": true, // Indicates if the definition is an array.\n            \"deleted\": false, // Indicates if the definition has been deleted from the schema.\n            \"object_type\": null, // The name of the custom resource (i.e. a nested object) if the resource has been previously defined. Otherwise, it is null for other types.\n            // \"eq\": [ // Array of values that are allowed. Available only for the string and number types.\n            // ]\n            // \"ne\": [ // Array of values that are not allowed. Available only for the number type.\n            // 0\n            // ]\n            // \"lt\": 0, // A property of the number type must have less than this value. The value should be up to two decimal places.\n            // \"lte\": 0, // A property of the number type must be less than or equal to this value. The value should be up to two decimal places.\n            // \"gt\": 0, // A property of number type must be greater than this value. The value should be up to two decimal places.\n            \"gte\": 10000 // A property of number type must be greater than or equal to this value. The value should be up to two decimal places.\n        }\n    }\n}"},"url":{"raw":"{{managementUrl}}/projects/:projectId/metadata-schemas","host":["{{managementUrl}}"],"path":["projects",":projectId","metadata-schemas"],"query":[{"key":"","value":"","disabled":true}],"variable":[{"key":"projectId","value":""}]}},"response":[],"_postman_id":"ec71a591-af59-4000-bfb2-96b6c34e41fe"},{"name":"List Metadata Schemas","id":"08d1b8ec-1fa6-42bf-95f4-efeefeacbdad","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-Management-Id","value":"{{X-Management-Id}}"},{"key":"X-Management-Token","value":"{{X-Management-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{managementUrl}}/projects/:projectId/metadata-schemas","host":["{{managementUrl}}"],"path":["projects",":projectId","metadata-schemas"],"query":[{"key":"","value":"","disabled":true}],"variable":[{"key":"projectId","value":""}]}},"response":[],"_postman_id":"08d1b8ec-1fa6-42bf-95f4-efeefeacbdad"},{"name":"Get Metadata Schema","id":"b265b87c-2050-4736-83ee-902cdc61dd56","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-Management-Id","value":"{{X-Management-Id}}"},{"key":"X-Management-Token","value":"{{X-Management-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{managementUrl}}/projects/:projectId/metadata-schemas/:metadataSchemaId","host":["{{managementUrl}}"],"path":["projects",":projectId","metadata-schemas",":metadataSchemaId"],"query":[{"key":"","value":"","disabled":true}],"variable":[{"key":"projectId","value":""},{"key":"metadataSchemaId","value":""}]}},"response":[],"_postman_id":"b265b87c-2050-4736-83ee-902cdc61dd56"},{"name":"Update Metadata Schema","id":"1a3d4829-352b-4753-b9cb-ce2fcd6fcb4b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"X-Management-Id","value":"{{X-Management-Id}}"},{"key":"X-Management-Token","value":"{{X-Management-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"related_object\": \"reward\", // The resource type. You can define custom metadata schemas, which have a custom \"related_object\" resource type, or you can use standard resource types: \"campaign\", \"customer\", \"earning_rule\", \"loyalty_tier\", \"order\", \"order_item\", \"product\", \"promotion_tier\", \"publication\", \"redemption\", \"reward\", \"voucher\".\n    \"allow_defined_only\": true, // 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.\n    \"properties\": { // Object representing metadata definitions.\n        \"country\": { // Custom property name. This is also shown in Project Settings > Metadata Schema in the Voucherify Dashboard.\n            \"type\": \"string\", // Indicates the type of metadata: string, number, object, date, datetime, geopoint, boolean, image_URL. Note that \"geopoint\" type is a paid feature.\n            \"optional\": true, // Indicates if this definition is optional or not for the resource.\n            \"array\": true, // Indicates if the definition is an array.\n            \"deleted\": false, // Indicates if the definition has been deleted from the schema.\n            \"object_type\": null, // The name of the custom resource (i.e. a nested object) if the resource has been previously defined. Otherwise, it is null for other types.\n            \"min_length\": 3, // Value indicating the minimum length. Available only for the string type.\n            \"max_length\": 3, // Value indicating the maximum length. Available only for the string type.\n            \"exact_length\": 3, // Value indicating the exact length. Available only for the string type.\n            \"eq\": [ // Array of values that are allowed. Available only for the string and number types.\n                \"USA\"\n            ],\n            \"ne\": [ // Array of values that are not allowed. Available only for the number type.\n                0\n            ],\n            \"lt\": 0, // A property of the number type must have less than this value. The value should be up to two decimal places.\n            \"lte\": 0, // A property of the number type must be less than or equal to this value. The value should be up to two decimal places.\n            \"gt\": 0, // A property of number type must be greater than this value. The value should be up to two decimal places.\n            \"gte\": 0 // A property of number type must be greater than or equal to this value. The value should be up to two decimal places.\n        }\n    }\n}"},"url":{"raw":"{{managementUrl}}/projects/:projectId/metadata-schemas/:metadataSchemaId","host":["{{managementUrl}}"],"path":["projects",":projectId","metadata-schemas",":metadataSchemaId"],"query":[{"key":"","value":"","disabled":true}],"variable":[{"key":"projectId","value":""},{"key":"metadataSchemaId","value":""}]}},"response":[],"_postman_id":"1a3d4829-352b-4753-b9cb-ce2fcd6fcb4b"},{"name":"Delete Metadata Schema","id":"038b878e-fb20-489f-9e87-b87c5c21acc6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"X-Management-Id","value":"{{X-Management-Id}}"},{"key":"X-Management-Token","value":"{{X-Management-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{managementUrl}}/projects/:projectId/metadata-schemas/:metadataSchemaId","host":["{{managementUrl}}"],"path":["projects",":projectId","metadata-schemas",":metadataSchemaId"],"query":[{"key":"","value":"","disabled":true}],"variable":[{"key":"projectId","value":""},{"key":"metadataSchemaId","value":""}]}},"response":[],"_postman_id":"038b878e-fb20-489f-9e87-b87c5c21acc6"}],"id":"84370f19-f42d-40e1-a644-46e9f59f4e47","_postman_id":"84370f19-f42d-40e1-a644-46e9f59f4e47"},{"name":"Custom Event Schema Management","item":[{"name":"Create Custom Event Schema","id":"f08c3c26-a561-47ff-b037-c40149d48308","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-Management-Id","value":"{{X-Management-Id}}"},{"key":"X-Management-Token","value":"{{X-Management-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"review\", // User-defined name of the custom event. This is also shown in Project Settings > Event Schema in the Voucherify Dashboard.\n    \"schema\": { // Object containing custom event schema and its custom attributes (metadata).\n        \"properties\": { // Defines custom event custom attributes (metadata).\n            \"additionalProp\": { // Custom event metadata name.\n                \"type\": \"boolean\", // Indicates the type of the custom event. You can choose between string, number, date, datetime, or boolean.\n                \"optional\": true, // Indicates if this property is optional or not for the resource.\n                \"deleted\": false // Indicates if the property has been deleted from the schema. A deleted schema is inactive, but it can be restored.\n            }\n        }\n    }\n}"},"url":{"raw":"{{managementUrl}}/projects/:projectId/custom-event-schemas","host":["{{managementUrl}}"],"path":["projects",":projectId","custom-event-schemas"],"query":[{"key":"","value":"","disabled":true}],"variable":[{"key":"projectId","value":""}]}},"response":[],"_postman_id":"f08c3c26-a561-47ff-b037-c40149d48308"},{"name":"List Custom Event Schemas","id":"b97806eb-e0ab-4522-b644-d29389b37827","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-Management-Id","value":"{{X-Management-Id}}"},{"key":"X-Management-Token","value":"{{X-Management-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{managementUrl}}/projects/:projectId/custom-event-schemas","host":["{{managementUrl}}"],"path":["projects",":projectId","custom-event-schemas"],"query":[{"key":"","value":"","disabled":true}],"variable":[{"key":"projectId","value":""}]}},"response":[],"_postman_id":"b97806eb-e0ab-4522-b644-d29389b37827"},{"name":"Get Custom Event Schema","id":"8a0c6134-3139-4fd2-af7d-cf8b691c0f22","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-Management-Id","value":"{{X-Management-Id}}"},{"key":"X-Management-Token","value":"{{X-Management-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{managementUrl}}/projects/:projectId/custom-event-schemas/:customEventSchemaId","host":["{{managementUrl}}"],"path":["projects",":projectId","custom-event-schemas",":customEventSchemaId"],"query":[{"key":"","value":"","disabled":true}],"variable":[{"key":"projectId","value":""},{"key":"customEventSchemaId","value":""}]}},"response":[],"_postman_id":"8a0c6134-3139-4fd2-af7d-cf8b691c0f22"},{"name":"Update Custom Event Schema","id":"8f0e7410-4f7c-4616-85d7-c3f6d0fe6655","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"X-Management-Id","value":"{{X-Management-Id}}"},{"key":"X-Management-Token","value":"{{X-Management-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"schema\": { // Object containing custom event schema and its custom attributes (metadata).\n        \"properties\": { // Defines custom event custom attributes (metadata).\n            \"additionalProp\": { // Custom event metadata name.\n                \"type\": \"boolean\", // Indicates the type of the custom event.\n                \"optional\": false, // Indicates if this property is optional or not for the resource.\n                \"deleted\": false // Indicates if the property has been deleted from the schema. A deleted schema is inactive, but it can be restored.\n            }\n        }\n    }\n}"},"url":{"raw":"{{managementUrl}}/projects/:projectId/custom-event-schemas/:customEventSchemaId","host":["{{managementUrl}}"],"path":["projects",":projectId","custom-event-schemas",":customEventSchemaId"],"query":[{"key":"","value":"","disabled":true}],"variable":[{"key":"projectId","value":""},{"key":"customEventSchemaId","value":""}]}},"response":[],"_postman_id":"8f0e7410-4f7c-4616-85d7-c3f6d0fe6655"},{"name":"Delete Custom Event Schema","id":"941ca7ea-16d4-40be-97c0-ab242616c37f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"X-Management-Id","value":"{{X-Management-Id}}"},{"key":"X-Management-Token","value":"{{X-Management-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{managementUrl}}/projects/:projectId/custom-event-schemas/:customEventSchemaId","host":["{{managementUrl}}"],"path":["projects",":projectId","custom-event-schemas",":customEventSchemaId"],"query":[{"key":"","value":"","disabled":true}],"variable":[{"key":"projectId","value":""},{"key":"customEventSchemaId","value":""}]}},"response":[],"_postman_id":"941ca7ea-16d4-40be-97c0-ab242616c37f"}],"id":"8d2ece3d-a73f-4dff-bfa0-cf1f4d09d778","_postman_id":"8d2ece3d-a73f-4dff-bfa0-cf1f4d09d778"},{"name":"Webhook Management","item":[{"name":"Create Webhook","id":"e04e3fd3-1292-46ac-b72e-6bbd7d452820","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-Management-Id","value":"{{X-Management-Id}}"},{"key":"X-Management-Token","value":"{{X-Management-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"target_url\": \"https://redemption_webhook.com\", // URL address that receives webhooks.\n    \"events\": [ // Lists the events that trigger webhook sendout.\n        \"redemption.succeeded\",\n        \"redemption.failed\",\n        \"redemption.rollback.succeeded\",\n        \"redemption.rollback.failed\",\n        \"publication.succeeded\",\n        \"voucher.published\",\n        \"voucher.updated\",\n        \"voucher.deleted\",\n        \"voucher.created\",\n        \"voucher.enabled\",\n        \"voucher.disabled\",\n        \"voucher.loyalty_card.points_added\",\n        \"voucher.gift.balance_added\",\n        \"campaign.enabled\",\n        \"campaign.deleted\",\n        \"campaign.created\",\n        \"campaign.updated\",\n        \"campaign.disabled\",\n        \"campaign.vouchers.generation.completed\",\n        \"business_validation_rule.assignment.created\",\n        \"business_validation_rule.assignment.deleted\",\n        \"business_validation_rule.created\",\n        \"business_validation_rule.deleted\",\n        \"business_validation_rule.updated\",\n        \"customer.created\",\n        \"customer.deleted\",\n        \"customer.rewarded\",\n        \"customer.rewarded.loyalty_points\",\n        \"customer.consents.revoked\",\n        \"customer.consents.given\"\n    ],\n    \"active\": true // Determines if the webhook configuration is active.\n}"},"url":{"raw":"{{managementUrl}}/projects/:projectId/webhooks","host":["{{managementUrl}}"],"path":["projects",":projectId","webhooks"],"query":[{"key":"","value":"","disabled":true}],"variable":[{"key":"projectId","value":""}]}},"response":[],"_postman_id":"e04e3fd3-1292-46ac-b72e-6bbd7d452820"},{"name":"List Webhooks","id":"67634c38-e426-4b8b-8b9b-fc111a88da47","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-Management-Id","value":"{{X-Management-Id}}"},{"key":"X-Management-Token","value":"{{X-Management-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{managementUrl}}/projects/:projectId/webhooks","host":["{{managementUrl}}"],"path":["projects",":projectId","webhooks"],"query":[{"key":"","value":"","disabled":true}],"variable":[{"key":"projectId","value":""}]}},"response":[],"_postman_id":"67634c38-e426-4b8b-8b9b-fc111a88da47"},{"name":"Get Webhook","id":"6e09fdb6-6b5b-4af0-86b9-1b61a19e6b62","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-Management-Id","value":"{{X-Management-Id}}"},{"key":"X-Management-Token","value":"{{X-Management-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{managementUrl}}/projects/:projectId/webhooks/:webhookId","host":["{{managementUrl}}"],"path":["projects",":projectId","webhooks",":webhookId"],"query":[{"key":"","value":"","disabled":true}],"variable":[{"key":"projectId","value":""},{"key":"webhookId","value":""}]}},"response":[],"_postman_id":"6e09fdb6-6b5b-4af0-86b9-1b61a19e6b62"},{"name":"Update Webhook","id":"93fe088c-7fd0-49d2-9c55-78eacaee5ff8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"X-Management-Id","value":"{{X-Management-Id}}"},{"key":"X-Management-Token","value":"{{X-Management-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"target_url\": \"https://redemption_webhook.com\", // URL address that receives webhooks.\n    \"events\": [ // Lists the events that trigger webhook sendout.\n        \"redemption.succeeded\",\n        \"customer.created\"\n    ],\n    \"active\": true // Determines if the webhook configuration is active.\n}"},"url":{"raw":"{{managementUrl}}/projects/:projectId/webhooks/:webhookId","host":["{{managementUrl}}"],"path":["projects",":projectId","webhooks",":webhookId"],"query":[{"key":"","value":"","disabled":true}],"variable":[{"key":"projectId","value":""},{"key":"webhookId","value":""}]}},"response":[],"_postman_id":"93fe088c-7fd0-49d2-9c55-78eacaee5ff8"},{"name":"Delete Webhook","id":"beca8ca9-9b90-4da9-8d33-9e0e4b3c16ec","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"X-Management-Id","value":"{{X-Management-Id}}"},{"key":"X-Management-Token","value":"{{X-Management-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{managementUrl}}/projects/:projectId/webhooks/:webhookId","host":["{{managementUrl}}"],"path":["projects",":projectId","webhooks",":webhookId"],"query":[{"key":"","value":"","disabled":true}],"variable":[{"key":"projectId","value":""},{"key":"webhookId","value":""}]}},"response":[],"_postman_id":"beca8ca9-9b90-4da9-8d33-9e0e4b3c16ec"}],"id":"0036ebeb-c14b-4b7a-82e3-0685b5415127","description":"Read [Webhooks v2024-01-01 article](https://docs.voucherify.io/reference/introduction-to-webhooks) to learn how webhooks work in Voucherify.","_postman_id":"0036ebeb-c14b-4b7a-82e3-0685b5415127"},{"name":"Stacking Rules Management","item":[{"name":"Create Stacking Rules","id":"824d88fa-e5b6-4a72-8fcc-587eef2a9366","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-Management-Id","value":"{{X-Management-Id}}"},{"key":"X-Management-Token","value":"{{X-Management-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"exclusive_categories\": [ // Lists the IDs of the categories that are exclusive.\n        \"id\"\n    ],\n    \"joint_categories\": [ // Lists the IDs of the categories that are joint.\n        \"id\"\n    ],\n    \"redeemables_limit\": 30, // Defines how many redeemables can be sent to Voucherify for validation at the same time.\n    \"applicable_redeemables_limit\": 15, // Defines how many redeemables can be applied at the same time. The number must be less than or equal to \"redeemables_limit\".\n    \"applicable_redeemables_per_category_limit\": 5, // Defines how many redeemables with the same category can be applied at the same time. The number must be less than or equal to \"applicable_redeemables_limit\".\n    \"applicable_exclusive_redeemables_limit\": 1, // Defines how many redeemables with an assigned exclusive category can be applied at the same time.\n    \"applicable_exclusive_redeemables_per_category_limit\": 1, // Defines how many exclusive redeemables with the same category can be applied at the same time. The number must be less than or equal to \"applicable_exclusive_redeemables_limit\".\n    \"discount_calculation_mode\": \"DISCOUNTED_AMOUNT\", // Defines if the discounts are applied by taking into account the initial order amount or the discounted order amount.\n    \"initial_amount_mode_categories\": [ // Lists the IDs of the categories that apply a discount based on the initial amount.\n        \"id\"\n    ],\n    \"discounted_amount_mode_categories\": [ // Lists the IDs of the categories that apply a discount based on the discounted amount.\n        \"id\"\n    ],\n    \"redeemables_application_mode\": \"ALL\", // 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.\n    \"redeemables_sorting_rule\": \"CATEGORY_HIERARCHY\" // Defines the sorting rule for redeemables. \"CATEGORY_HIERARCHY\" means that redeemables are applied with the order established by the hierarchy of the categories. \"REQUESTED_ORDER\" means that redeemables are applied with the order established in the request.\n}"},"url":{"raw":"{{managementUrl}}/projects/:projectId/stacking-rules","host":["{{managementUrl}}"],"path":["projects",":projectId","stacking-rules"],"query":[{"key":"","value":"","disabled":true}],"variable":[{"key":"projectId","value":""}]}},"response":[],"_postman_id":"824d88fa-e5b6-4a72-8fcc-587eef2a9366"},{"name":"List Stacking Rules","id":"bee5885e-e19f-4536-96c8-e924706baa04","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-Management-Id","value":"{{X-Management-Id}}"},{"key":"X-Management-Token","value":"{{X-Management-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{managementUrl}}/projects/:projectId/stacking-rules","host":["{{managementUrl}}"],"path":["projects",":projectId","stacking-rules"],"query":[{"key":"","value":"","disabled":true}],"variable":[{"key":"projectId","value":""}]}},"response":[],"_postman_id":"bee5885e-e19f-4536-96c8-e924706baa04"},{"name":"Get Stacking Rules","id":"73ae9b68-255e-4e0d-9170-6708bc1e167d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-Management-Id","value":"{{X-Management-Id}}"},{"key":"X-Management-Token","value":"{{X-Management-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{managementUrl}}/projects/:projectId/stacking-rules/:stackingRulesId","host":["{{managementUrl}}"],"path":["projects",":projectId","stacking-rules",":stackingRulesId"],"query":[{"key":"","value":"","disabled":true}],"variable":[{"key":"projectId","value":""},{"key":"stackingRulesId","value":""}]}},"response":[],"_postman_id":"73ae9b68-255e-4e0d-9170-6708bc1e167d"},{"name":"Update Stacking Rules","id":"abcacd28-e84b-47d4-8237-74a513b57f64","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"X-Management-Id","value":"{{X-Management-Id}}"},{"key":"X-Management-Token","value":"{{X-Management-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"exclusive_categories\": [ // Lists the IDs of the categories that are exclusive.\n        \"id\"\n    ],\n    \"joint_categories\": [ // Lists the IDs of the categories that are joint.\n        \"id\"\n    ],\n    \"redeemables_limit\": 15, // Defines how many redeemables can be sent to Voucherify for validation at the same time.\n    \"applicable_redeemables_limit\": 12, // Defines how many redeemables can be applied at the same time. The number must be less than or equal to \"redeemables_limit\".\n    \"applicable_redeemables_per_category_limit\": 4, // Defines how many redeemables with the same category can be applied at the same time. The number must be less than or equal to \"applicable_redeemables_limit\".\n    \"applicable_exclusive_redeemables_limit\": 1, // Defines how many redeemables with an assigned exclusive category can be applied at the same time.\n    \"applicable_exclusive_redeemables_per_category_limit\": 0, // Defines how many exclusive redeemables with the same category can be applied at the same time. The number must be less than or equal to \"applicable_exclusive_redeemables_limit\".\n    \"discount_calculation_mode\": \"DISCOUNTED_AMOUNT\", // Defines if the discounts are applied by taking into account the initial order amount or the discounted order amount.\n    \"initial_amount_mode_categories\": [ // Lists the IDs of the categories that apply a discount based on the initial amount.\n        \"id\"\n    ],\n    \"discounted_amount_mode_categories\": [ // Lists the IDs of the categories that apply a discount based on the discounted amount.\n        \"id\"\n    ],\n    \"redeemables_application_mode\": \"ALL\", // 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.\n    \"redeemables_sorting_rule\": \"CATEGORY_HIERARCHY\" // Defines the sorting rule for redeemables. \"CATEGORY_HIERARCHY\" means that redeemables are applied with the order established by the hierarchy of the categories. \"REQUESTED_ORDER\" means that redeemables are applied with the order established in the request.\n}"},"url":{"raw":"{{managementUrl}}/projects/:projectId/stacking-rules/:stackingRulesId","host":["{{managementUrl}}"],"path":["projects",":projectId","stacking-rules",":stackingRulesId"],"query":[{"key":"","value":"","disabled":true}],"variable":[{"key":"projectId","value":""},{"key":"stackingRulesId","value":""}]}},"response":[],"_postman_id":"abcacd28-e84b-47d4-8237-74a513b57f64"},{"name":"Delete Stacking Rules","id":"e60ed8d2-92f6-421e-8fa6-cd2a7ae4c058","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"X-Management-Id","value":"{{X-Management-Id}}"},{"key":"X-Management-Token","value":"{{X-Management-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{managementUrl}}/projects/:projectId/stacking-rules/:stackingRulesId","host":["{{managementUrl}}"],"path":["projects",":projectId","stacking-rules",":stackingRulesId"],"query":[{"key":"","value":"","disabled":true}],"variable":[{"key":"projectId","value":""},{"key":"stackingRulesId","value":""}]}},"response":[],"_postman_id":"e60ed8d2-92f6-421e-8fa6-cd2a7ae4c058"}],"id":"a84c640b-851e-44fb-ae32-7de79705d2dc","_postman_id":"a84c640b-851e-44fb-ae32-7de79705d2dc"},{"name":"Branding Management","item":[{"name":"Create Brand","id":"2b07618d-8ced-40fc-8f94-19ee9f9cd143","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-Management-Id","value":"{{X-Management-Id}}"},{"key":"X-Management-Token","value":"{{X-Management-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"brand\": { // Defines basic brand details.\n        \"name\": \"Voucherify PSA\", // Defines brand name.\n        \"privacy_policy_url\": null, // Defines the URL to the brand's privacy policy. It must be a valid URL format.\n        \"terms_of_use_url\": null, // Defines the URL to the brand's terms of use. It must be a valid URL format.\n        \"permission_reminder\": \"You are receiving this email because you opted in at our website.\", // Defines the message that is displayed to customers who opted in an email newsletter.\n        \"website_url\": \"voucherify.io\" // Defines the URL to the brand's website. It must be a valid URL format.\n    },\n    \"address\": { // Defines the address details.\n        \"street\": \"Porcelanowa 23\", // Defines the brand's street.\n        \"city\": \"Katowice\", // Defines the brand's city.\n        \"postal\": \"43-246\", // Defines the brand's postal code.\n        \"state\": null, // Defines the brand's state or similar administrative area.\n        \"country\": \"Poland\" // Defines the brand's country.\n    },\n    \"contact\": { // Defines contact details.\n        \"email\": \"support@voucherify.io\", // Defines the brand's email address. It must be a valid email format.\n        \"phone\": null // Defines the brand's phone number.\n    },\n    \"cockpits\": { // Defines customer cockpit details.\n        \"campaigns_overview_enabled\": false, // Enables the campaign overview for customers.\n        \"loyalty_enabled\": true, // Enables the loyalty campaign overview for customers.\n        \"gift_cards_enabled\": true, // Enables the gift card overview for customers.\n        \"coupons_enabled\": true, // Enables the discount coupon overview for customers.\n        \"referrals_enabled\": true, // Enables the referral campaign overview for customers.\n        \"lucky_draw_enabled\": false, // Enables the lucky draw overview for customers.\n        \"theme\": \"default\", // Determines the color scheme of the customer cockpit. You can choose between the default theme and several other colours: blue, dark-green, green, grey, orange, purple, and red.\n        \"use_custom_double_opt_in_redirect_url\": false, // Enables the double opt-in option. It must be a valid URL format.\n        \"custom_double_opt_in_redirect_url\": null // Defines the URL for the double opt-in consent. It must be a valid URL format.\n    }\n}"},"url":{"raw":"{{managementUrl}}/projects/:projectId/branding","host":["{{managementUrl}}"],"path":["projects",":projectId","branding"],"query":[{"key":"","value":"","disabled":true}],"variable":[{"key":"projectId","value":""}]}},"response":[],"_postman_id":"2b07618d-8ced-40fc-8f94-19ee9f9cd143"},{"name":"List Brands","id":"a8674a6f-06f1-40a7-9ba9-53b23425e778","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-Management-Id","value":"{{X-Management-Id}}"},{"key":"X-Management-Token","value":"{{X-Management-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{managementUrl}}/projects/:projectId/branding","host":["{{managementUrl}}"],"path":["projects",":projectId","branding"],"query":[{"key":"","value":"","disabled":true}],"variable":[{"key":"projectId","value":""}]}},"response":[],"_postman_id":"a8674a6f-06f1-40a7-9ba9-53b23425e778"},{"name":"Get Brand","id":"9bb07c60-cef3-44e5-955b-8935e6d32dab","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-Management-Id","value":"{{X-Management-Id}}"},{"key":"X-Management-Token","value":"{{X-Management-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{managementUrl}}/projects/:projectId/branding/:brandingId","host":["{{managementUrl}}"],"path":["projects",":projectId","branding",":brandingId"],"query":[{"key":"","value":"","disabled":true}],"variable":[{"key":"projectId","value":""},{"key":"brandingId","value":""}]}},"response":[],"_postman_id":"9bb07c60-cef3-44e5-955b-8935e6d32dab"},{"name":"Update Brand","id":"6c0760dc-635c-4802-93ea-9ca55d489bc1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"X-Management-Id","value":"{{X-Management-Id}}"},{"key":"X-Management-Token","value":"{{X-Management-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"brand\": { // Defines basic brand details.\n        \"name\": \"Voucherify PSA\", // Defines brand name.\n        \"privacy_policy_url\": null, // Defines the URL to the brand's privacy policy. It must be a valid URL format.\n        \"terms_of_use_url\": null, // Defines the URL to the brand's terms of use. It must be a valid URL format.\n        \"permission_reminder\": \"You are receiving this email because you opted in at our website.\", // Defines the message that is displayed to customers who opted in an email newsletter.\n        \"website_url\": \"voucherify.io\" // Defines the URL to the brand's website. It must be a valid URL format.\n    },\n    \"address\": { // Defines the address details.\n        \"street\": \"Porcelanowa 23\", // Defines the brand's street.\n        \"city\": \"Katowice\", // Defines the brand's city.\n        \"postal\": \"43-246\", // Defines the brand's postal code.\n        \"state\": null, // Defines the brand's state or similar administrative area.\n        \"country\": \"Poland\" // Defines the brand's country.\n    },\n    \"contact\": { // Defines contact details.\n        \"email\": \"support@voucherify.io\", // Defines the brand's email address. It must be a valid email format.\n        \"phone\": null // Defines the brand's phone number.\n    },\n    \"cockpits\": { // Defines customer cockpit details.\n        \"campaigns_overview_enabled\": true, // Enables the campaign overview for customers.\n        \"loyalty_enabled\": false, // Enables the loyalty campaign overview for customers.\n        \"gift_cards_enabled\": true, // Enables the gift card overview for customers.\n        \"coupons_enabled\": true, // Enables the discount coupon overview for customers.\n        \"referrals_enabled\": true, // Enables the referral campaign overview for customers.\n        \"lucky_draw_enabled\": false, // Enables the lucky draw overview for customers.\n        \"theme\": \"dark-green\", // Determines the color scheme of the customer cockpit. You can choose between the default theme and several other colours: blue, dark-green, green, grey, orange, purple, and red.\n        \"use_custom_double_opt_in_redirect_url\": false, // Enables the double opt-in option. It must be a valid URL format.\n        \"custom_double_opt_in_redirect_url\": null // Defines the URL for the double opt-in consent. It must be a valid URL format.\n    }\n}"},"url":{"raw":"{{managementUrl}}/projects/:projectId/branding/:brandingId","host":["{{managementUrl}}"],"path":["projects",":projectId","branding",":brandingId"],"query":[{"key":"","value":"","disabled":true}],"variable":[{"key":"projectId","value":""},{"key":"brandingId","value":""}]}},"response":[],"_postman_id":"6c0760dc-635c-4802-93ea-9ca55d489bc1"},{"name":"Delete Brand","id":"c5012c61-37ea-464a-b51b-e72216d4fadf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"X-Management-Id","value":"{{X-Management-Id}}"},{"key":"X-Management-Token","value":"{{X-Management-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{managementUrl}}/projects/:projectId/branding/:brandingId","host":["{{managementUrl}}"],"path":["projects",":projectId","branding",":brandingId"],"query":[{"key":"","value":"","disabled":true}],"variable":[{"key":"projectId","value":""},{"key":"brandingId","value":""}]}},"response":[],"_postman_id":"c5012c61-37ea-464a-b51b-e72216d4fadf"}],"id":"50847407-9062-43cc-8294-7955bc3c5838","_postman_id":"50847407-9062-43cc-8294-7955bc3c5838"},{"name":"Campaign Templates Management","item":[{"name":"List Campaign Templates","id":"3df8a186-b243-4c3d-bf50-5032435311e9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-Management-Id","value":"{{X-Management-Id}}"},{"key":"X-Management-Token","value":"{{X-Management-Token}}"},{"key":"Content-Type","value":"application/json"}],"url":{"raw":"{{managementUrl}}/projects/:projectId/templates/campaigns","host":["{{managementUrl}}"],"path":["projects",":projectId","templates","campaigns"],"query":[{"key":"","value":"","disabled":true},{"key":"limit","value":"100","description":"Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.","type":"text","disabled":true},{"key":"starting_after_id","value":"","description":"A cursor for pagination. It retrieves the campaign templates created after a template with the given ID.","type":"text","disabled":true},{"key":"order","value":"","description":"Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.","type":"text","disabled":true},{"key":"include_total","value":"true","description":"If set to true, the response returns the number of all campaign templates, regardless of the applied filters or limits. Set to false by default.","type":"text","disabled":true},{"key":"filters[name][conditions][$in][0]","value":"","description":"Unique user-defined template name.","type":"text","disabled":true},{"key":"filters[junction]","value":"AND","description":"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.","type":"text","disabled":true}],"variable":[{"key":"projectId","value":"{{project_id}}","description":"Provide the unique identifier of the project."}]}},"response":[],"_postman_id":"3df8a186-b243-4c3d-bf50-5032435311e9"},{"name":"Copy Campaign Template","id":"e30d9274-b1fb-4365-ad8a-ca22a2ee0bf8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-Management-Id","value":"{{X-Management-Id}}"},{"key":"X-Management-Token","value":"{{X-Management-Token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"string\", // User-defined name of the campaign template. It must be unique.\n    \"description\": \"string\", // User-defined description of the campaign template.\n    \"destination_project_id\": \"string\" // Unique identifier of the project to which the campaign template will be copied.\n}"},"url":{"raw":"{{managementUrl}}/projects/:projectId/templates/campaigns/:campaignTemplateId/copy","host":["{{managementUrl}}"],"path":["projects",":projectId","templates","campaigns",":campaignTemplateId","copy"],"query":[{"key":"","value":"","disabled":true}],"variable":[{"key":"projectId","value":"{{project_id}}","description":"Provide the unique identifier of the project."},{"key":"campaignTemplateId","value":"{{campaign_template_id}}","description":"Provide the unique identifier of the campaign template."}]}},"response":[],"_postman_id":"e30d9274-b1fb-4365-ad8a-ca22a2ee0bf8"}],"id":"42d7a9ab-0ac7-46cd-881d-9235d5e811a1","_postman_id":"42d7a9ab-0ac7-46cd-881d-9235d5e811a1"}],"id":"ec12fe14-21e3-4077-8a71-2364a2449a1e","description":"[Management API](https://docs.voucherify.io/docs/management-api) introduces endpoints that let you perform account-related operations. These endpoints will be divided into subfolders according to their functions:\n\n- Project Management\n    \n- User Management\n    \n- Metadata Schema Management\n    \n- Custom Event Schema Management\n    \n- Webhook Management\n    \n- Stacking Rules Management\n    \n- Branding Management\n    \n\n**Note that Management API endpoints use new environment variables:**\n\n- X-Management-Id\n    \n- X-Management-Token\n    \n\n**The Management API is an Enterprise feature.**","_postman_id":"ec12fe14-21e3-4077-8a71-2364a2449a1e"},{"name":"OAuth","item":[{"name":"Generate OAuth 2.0 Token","id":"e59fd14b-07a0-49c5-b079-f570e081c653","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}","type":"text"},{"key":"X-App-Token","value":"{{X-App-Token}}","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"grant_type","value":"client_credentials","description":"Gives an access token outside of the context of a user.","type":"text","uuid":"ccc503e6-8caa-42c8-8811-46cb45a98c4f"},{"key":"scope","value":"{{scope}}","description":"Defines the scope of possible actions that can be done with the OAuth token. The api scope allows using the server-side API. The client_api scope allows using the whole client-side API. The values are space-delimited; do not use commas to separate the values.\n\nAllowed values: api, assets, async-actions, campaigns, categories, client_api, client_consents, client_customers, client_events, client_promotions, client_publish, client_qualifications, client_redeem, client_redemptions, client_validate, client_validations, client_vouchers, consents, customers, events, exports, locations, loyalties, metadata-schemas, orders, product-collections, products, promotions, publications, qualifications, redemptions, referrals, rewards, segments, skus, task-results, templates, trash-bin, validation-rules-assignments, validation-rules, validations, vouchers.","type":"text","uuid":"8d88c53b-13c1-4c42-a52c-0ee5ddb501fd"}]},"url":"{{url}}/oauth/token"},"response":[],"_postman_id":"e59fd14b-07a0-49c5-b079-f570e081c653"},{"name":"Introspect OAuth 2.0 Token","id":"e3204546-6517-45ed-9bbc-2370a70f5d8c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}","type":"text"},{"key":"X-App-Token","value":"{{X-App-Token}}","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"access_token","value":"{{token}}","description":"An OAuth 2.0 token generated with the API token and key.","type":"text","uuid":"d119ec3d-04da-4208-9dea-76556ee4299c"}]},"url":"{{url}}/oauth/introspect"},"response":[],"_postman_id":"e3204546-6517-45ed-9bbc-2370a70f5d8c"},{"name":"Revoke OAuth 2.0 Token","id":"7a7f4b57-62c1-4b2b-838f-fe11430baf54","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{X-App-Id}}","type":"text"},{"key":"X-App-Token","value":"{{X-App-Token}}","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"access_token","value":"{{token}}","description":"An OAuth 2.0 token generated with the API token and key.","type":"text","uuid":"c4041873-0d68-4413-b7da-0c5c40ac182a"}]},"url":"{{url}}/oauth/token/revoke"},"response":[],"_postman_id":"7a7f4b57-62c1-4b2b-838f-fe11430baf54"}],"id":"d5f738ff-fe23-4018-84a1-efa103de939f","description":"Generate, introspect, or revoke an OAuth 2.0 token for an API client. The token can be used to authorize access to the Voucherify API. The token inherits the permissions and IP whitelists of the API key that is used to generate the OAuth token. You can define the scope that limits its usage. You can generate up to 1000 OAuth tokens per project. The token expires in 900 seconds (15 minutes).","_postman_id":"d5f738ff-fe23-4018-84a1-efa103de939f"},{"name":"Client-side","item":[{"name":"Create Publication","id":"0aae0578-ddd0-40e2-b8c4-ae7e3d121f74","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-Client-Application-Id","value":"{{X-Client-Application-Id}}"},{"key":"X-Client-Token","value":"{{X-Client-Token}}"},{"key":"Content-Type","value":"application/json"},{"key":"origin","value":"yourdomain.com"}],"body":{"mode":"raw","raw":"{\n    \"source_id\": \"{{source_id}}\", // 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. If source_id is provided only 1 voucher can be published per request.\n    \"customer\": {\n        \"source_id\": \"{{source_id}}\", // 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.\n        \"name\": \"{{customer_name}}\",\n        \"email\": \"{{customer_email}}\"\n    },\n    \"metadata\": {\n        \"key\": \"{{value}}\"\n    },\n    \"campaign\": { // You can either use campaign name or voucher code.\n        \"name\": \"{{campaign_name}}\",\n        \"count\": 1 // This is optional and allows you to decide how many vouchers you want to publish.\n    },\n    \"voucher\": \"{{voucher_code}}\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"{{clientUrl}}/publish?join_once=true","host":["{{clientUrl}}"],"path":["publish"],"query":[{"key":"join_once","value":"true","description":"Through this flag, you can control if a particular person gets only one and always the same code even if the app sends multiple publication requests. It means that if you have a referral program, a referrer is assigned only to one code if an integration sends publication requests more than once for the same customer."}]}},"response":[],"_postman_id":"0aae0578-ddd0-40e2-b8c4-ae7e3d121f74"},{"name":"Check Eligibility","id":"176e05f0-03fd-4566-bb17-4f95f7fabc27","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-Client-Application-Id","value":"{{X-Client-Application-Id}}"},{"key":"X-Client-Token","value":"{{X-Client-Token}}"},{"key":"Content-Type","value":"application/json"},{"key":"origin","value":"yourdomain.com"}],"body":{"mode":"raw","raw":"{\n    \"scenario\": \"ALL\", // Returns all redeemables available for the customer in one API request.\n    \"customer\": {\n        \"source_id\": \"{{external_customer_id}}\", // The ID you use to identify the customer.\n        \"name\": \"John Doe\",\n        \"email\": \"{{customer_email}}\",\n        \"metadata\": {\n            \"metadata_key\": \"{{value}}\",\n            \"customer_location\": \"geo:37.786971,-122.399677\",\n            \"subscribed\": true\n        }\n    },\n    \"order\": {\n        \"amount\": {{amount}}, // Amount to pay for the order in cents.\n        \"status\": \"CREATED\",\n        \"source_id\": \"{{external_order_id}}\",\n        \"metadata\": {\n            \"channel\": \"web\",\n            \"currency\": \"USD\",\n            \"restaurant\": \"Freddy's\",\n            \"any_key\": \"{{any_value}}\"\n        },\n        \"items\": [\n            {\n                \"quantity\": 1,\n                \"price\": 2500,\n                \"amount\": 2500,\n                \"source_id\": \"BBQ_meal\",\n                \"related_object\": \"product\",\n                \"product\": {\n                    \"metadata\": {\n                        \"cuisine\": \"American\",\n                        \"food_type\": \"meal\",\n                        \"meal_type\": \"dinner\",\n                        \"star_rating\": 4,\n                        \"vegetarian\": false,\n                        \"vegan\": false\n                    }\n                }\n            },\n            {\n                \"quantity\": 1,\n                \"price\": 700,\n                \"amount\": 700,\n                \"source_id\": \"Refreshing_Cola\",\n                \"related_object\": \"product\",\n                \"product\": {\n                    \"metadata\": {\n                        \"cuisine\": \"American\",\n                        \"food_type\": \"beverage\",\n                        \"star_rating\": 4,\n                        \"vegetarian\": true,\n                        \"vegan\": false\n                    }\n                }\n            }\n        ]\n    },\n    \"options\": {\n        \"limit\": 30,\n        \"expand\": [\n            \"redeemable\"\n        ],\n        \"starting_after\": null, // Cursor used for paging.\n        \"sorting_rule\": \"DEFAULT\",\n        \"filters\": { // Filters allow you to limit the returned results. Optional.\n            \"resource_type\": {\n                \"conditions\": {\n                    \"$in\": [\n                        \"voucher\",\n                        \"campaign\",\n                        \"promotion_tier\"\n                    ]\n                }\n            },\n            \"category_id\": {\n                \"conditions\": {\n                    \"$is\": [\n                        \"{{category_id}}\"\n                    ]\n                }\n            }\n        }\n    }\n}","options":{"raw":{"language":"json"}}},"url":"{{clientUrl}}/qualifications"},"response":[],"_postman_id":"176e05f0-03fd-4566-bb17-4f95f7fabc27"},{"name":"Validate Stackable Discounts","id":"45261af7-1040-4841-a431-c337d25d8092","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-Client-Application-Id","value":"{{X-Client-Application-Id}}"},{"key":"X-Client-Token","value":"{{X-Client-Token}}"},{"key":"Content-Type","value":"application/json"},{"key":"origin","value":"yourdomain.com"}],"body":{"mode":"raw","raw":"{\n    \"redeemables\": [\n        {\n            \"object\": \"voucher\",\n            \"id\": \"{{voucher_code}}\" // Discount Code, Gift Voucher, Referral  Code, Loyalty Card\n        },\n        {\n            \"object\": \"voucher\",\n            \"id\": \"{{gift_voucher}}\",\n            \"gift\": {\n                \"credits\": 100 // Optional\n            }\n        },\n        {\n            \"object\": \"voucher\",\n            \"id\": \"{{loyalty_card}}\",\n            \"reward\": {\n                \"points\": 10, // Optional - Number of points to redeem for the Pay With Points reward\n                \"id\": \"{{reward_id}}\" // Optional - The ID of the reward to exchange the points to\n            }\n        },\n        {\n            \"object\": \"promotion_tier\",\n            \"id\": \"{{promotion_tier_id}}\"\n        },\n        {\n            \"object\": \"promotion_stack\",\n            \"id\": \"{{promotion_stack_id}}\"\n        }\n    ],\n    \"customer\": {\n        \"source_id\": \"{{external_customer_id}}\", // The ID you use to identify the customer\n        \"name\": \"John Doe\",\n        \"email\": \"{{customer_email}}\",\n        \"metadata\": {\n            \"metadata_key\": \"{{metadata_value}}\",\n            \"customer_location\": \"geo:37.786971,-122.399677\",\n            \"subscribed\": true\n        }\n    },\n    \"order\": {\n        \"amount\": {{amount}}, // Amount to pay for the order in cents\n        \"status\": \"CREATED\",\n        \"source_id\": \"{{external_order_id}}\",\n        \"metadata\": {\n            \"channel\": \"web\",\n            \"currency\": \"USD\",\n            \"restaurant\": \"Freddy's\",\n            \"any_key\": \"{{any_value}}\"\n        },\n        \"items\": [\n            {\n                \"quantity\": 1,\n                \"price\": 2500,\n                \"amount\": 2500,\n                \"source_id\": \"BBQ_meal\",\n                \"related_object\": \"product\",\n                \"product\": {\n                    \"metadata\": {\n                        \"cuisine\": \"American\",\n                        \"food_type\": \"meal\",\n                        \"meal_type\": \"dinner\",\n                        \"star_rating\": 4,\n                        \"vegetarian\": false,\n                        \"vegan\": false\n                    }\n                }\n            },\n            {\n                \"quantity\": 1,\n                \"price\": 700,\n                \"amount\": 700,\n                \"source_id\": \"Refreshing_Cola\",\n                \"related_object\": \"product\",\n                \"product\": {\n                    \"metadata\": {\n                        \"cuisine\": \"American\",\n                        \"food_type\": \"beverage\",\n                        \"star_rating\": 4,\n                        \"vegetarian\": true,\n                        \"vegan\": false\n                    }\n                }\n            }\n        ]\n    },\n    \"options\": {\n        \"expand\": [\n            \"order\",\n            \"redeemable\"\n        ]\n    }\n}","options":{"raw":{"language":"json"}}},"url":"{{clientUrl}}/validations"},"response":[],"_postman_id":"45261af7-1040-4841-a431-c337d25d8092"},{"name":"Redeem Stackable Discounts","id":"767e0943-9db6-4207-8d13-c74d3f00b222","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-Client-Application-Id","value":"{{X-Client-Application-Id}}"},{"key":"X-Client-Token","value":"{{X-Client-Token}}"},{"key":"Content-Type","value":"application/json"},{"key":"origin","value":"yourdomain.com"}],"body":{"mode":"raw","raw":"{\n    \"redeemables\": [\n        {\n            \"object\": \"voucher\",\n            \"id\": \"{{voucher_code}}\" // Discount Code, Gift Voucher, Referral  Code, Loyalty Card\n        },\n        {\n            \"object\": \"voucher\",\n            \"id\": \"{{gift_voucher}}\",\n            \"gift\": {\n                \"credits\": 100 // Optional\n            }\n        },\n        {\n            \"object\": \"voucher\",\n            \"id\": \"{{loyalty_card}}\",\n            \"reward\": {\n                \"points\": 10, // Optional - Number of points to redeem for the Pay With Points reward\n                \"id\": \"{{reward_id}}\" // Optional - The ID of the reward to exchange the points to\n            }\n        },\n        {\n            \"object\": \"promotion_tier\",\n            \"id\": \"{{promotion_tier_id}}\"\n        },\n        {\n            \"object\": \"promotion_stack\",\n            \"id\": \"{{promotion_stack_id}}\"\n        }\n    ],\n    \"customer\": {\n        \"source_id\": \"{{external_customer_id}}\", // The ID you use to identify the customer\n        \"name\": \"John Doe\",\n        \"email\": \"{{customer_email}}\",\n        \"metadata\": {\n            \"metadata_key\": \"{{metadata_value}}\",\n            \"customer_location\": \"geo:37.786971,-122.399677\",\n            \"subscribed\": true\n        }\n    },\n    \"order\": {\n        \"amount\": {{amount}}, // Amount to pay for the order in cents\n        \"status\": \"PAID\",\n        \"source_id\": \"{{external_order_id}}\",\n        \"metadata\": {\n            \"channel\": \"web\",\n            \"currency\": \"USD\",\n            \"restaurant\": \"Freddy's\",\n            \"any_key\": \"{{any_value}}\"\n        },\n        \"items\": [\n            {\n                \"quantity\": 1,\n                \"price\": 2500,\n                \"amount\": 2500,\n                \"source_id\": \"BBQ_meal\",\n                \"related_object\": \"product\",\n                \"product\": {\n                    \"metadata\": {\n                        \"cuisine\": \"American\",\n                        \"food_type\": \"meal\",\n                        \"meal_type\": \"dinner\",\n                        \"star_rating\": 4,\n                        \"vegetarian\": false,\n                        \"vegan\": false\n                    }\n                }\n            },\n            {\n                \"quantity\": 1,\n                \"price\": 700,\n                \"amount\": 700,\n                \"source_id\": \"Refreshing_Cola\",\n                \"related_object\": \"product\",\n                \"product\": {\n                    \"metadata\": {\n                        \"cuisine\": \"American\",\n                        \"food_type\": \"beverage\",\n                        \"star_rating\": 4,\n                        \"vegetarian\": true,\n                        \"vegan\": false\n                    }\n                }\n            }\n        ]\n    },\n    \"options\": {\n        \"expand\": [\n            \"order\",\n            \"redeemable\"\n        ]\n    }\n}","options":{"raw":{"language":"json"}}},"url":"{{clientUrl}}/redemptions"},"response":[],"_postman_id":"767e0943-9db6-4207-8d13-c74d3f00b222"},{"name":"List Promotion Tiers","event":[{"listen":"test","script":{"id":"7b0ed85f-1b73-4b4f-a668-edba1ea1e29a","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;",""],"type":"text/javascript"}}],"id":"557ca1d3-ef2d-4a81-a07b-7e6c621cea4e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-Client-Application-Id","value":"{{X-Client-Application-Id}}"},{"key":"X-Client-Token","value":"{{X-Client-Token}}"},{"key":"Content-Type","value":"application/json"},{"key":"origin","value":"yourdomain.com"}],"url":{"raw":"{{clientUrl}}/promotions/tiers?is_available=true&limit=100&page=1","host":["{{clientUrl}}"],"path":["promotions","tiers"],"query":[{"key":"is_available","value":"true","description":"This parameter allows filtering promotions that are only available at the moment. When set to true, it selects only non-expired and active promotions."},{"key":"limit","value":"100","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100 items."},{"key":"page","value":"1","description":"Which page of results to return."}]}},"response":[],"_postman_id":"557ca1d3-ef2d-4a81-a07b-7e6c621cea4e"},{"name":"Update Customer's Consents (deprecated)","event":[{"listen":"test","script":{"id":"48bdf0fe-cf26-4b9d-b131-f3291f804240","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Order amount is 12345\"] = jsonData.amount === 12345;","tests[\"Order status is CREATED\"] = jsonData.status === \"CREATED\";","","pm.environment.set(\"order-id\", jsonData.id);","pm.environment.set(\"order-customer-id\", jsonData.id);"],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"cb06053e-bc87-4fd9-9bfc-12d714ac2454","exec":["pm.environment.set(\"start-date\", new Date().toISOString());",""],"type":"text/javascript"}}],"id":"741f52fb-ed19-485b-b109-a0d5f927c33a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"X-Client-Application-Id","value":"{{X-Client-Application-Id}}"},{"key":"X-Client-Token","value":"{{X-Client-Token}}"},{"key":"Content-Type","value":"application/json"},{"key":"origin","value":"yourdomain.com"}],"body":{"mode":"raw","raw":"{\n    \"{{consent_ID_1}}\": true, // Key-value pairs where the key is the consent identifier and value is a boolean that identifies if a customer has given the consent or not.\n    \"{{consent_ID_2}}\": true,\n    \"unsubscribed\": false // To deny all consents, use unsubscribed as a consent identifier and true as a value.\n}"},"url":{"raw":"{{clientUrl}}/customers/:customer-id/consents","host":["{{clientUrl}}"],"path":["customers",":customer-id","consents"],"variable":[{"id":"5b98b3aa-0a40-4185-bdf8-01a31b83e9fe","key":"customer-id","value":"{{customer_id}}","description":"A Voucherify customer identifier or source_id"}]}},"response":[],"_postman_id":"741f52fb-ed19-485b-b109-a0d5f927c33a"},{"name":"Track Custom Event","event":[{"listen":"test","script":{"id":"4daf0a39-bbad-4900-a13e-46ff463e14c3","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;"],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"f539799f-51e6-4ac8-bae0-37cf5360f8b5","exec":["pm.environment.set(\"start-date\", new Date().toISOString());",""],"type":"text/javascript"}}],"id":"8a10b718-67b5-42d5-83e9-a588d71b57be","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-Client-Application-Id","value":"{{X-Client-Application-Id}}"},{"key":"X-Client-Token","value":"{{X-Client-Token}}"},{"key":"Content-Type","value":"application/json"},{"key":"origin","value":"yourdomain.com"}],"body":{"mode":"raw","raw":"{\n    \"customer\": {\n        \"source_id\": \"{{customer_source_id}}\" // 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.\n    },\n    \"referral\": { // 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.\n        \"code\": \"{{referral_code}}\", //A code through which a new visitor has been referred to a service.\n        \"referrer_id\": \"{{customer_id}}\" // Unique ID of the referring person - it is optional and not required if the referral code is provided.\n    },\n    \"metadata\": { // 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.\n        \"login\": \"bob\",\n        \"pricing_plan\": \"PP1\",\n        \"volume_number\": 4\n    },\n    \"event\": \"user_subscribed\" // Event name. This is the same name that you used to define a custom event in the Dashboard > Project Settings > Event Schema.\n}"},"url":"{{clientUrl}}/events"},"response":[],"_postman_id":"8a10b718-67b5-42d5-83e9-a588d71b57be"},{"name":"List Consents (deprecated)","event":[{"listen":"test","script":{"type":"text/javascript","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Order amount is 12345\"] = jsonData.amount === 12345;","tests[\"Order status is CREATED\"] = jsonData.status === \"CREATED\";","","pm.environment.set(\"order-id\", jsonData.id);","pm.environment.set(\"order-customer-id\", jsonData.id);"],"id":"ea7efad0-f010-422a-b917-6d8c2dfa6469"}},{"listen":"prerequest","script":{"type":"text/javascript","exec":["pm.environment.set(\"start-date\", new Date().toISOString());",""],"id":"ddb74605-032a-4740-a534-ee5bd77070b2"}}],"id":"265042bf-c1f5-415c-abcb-7a588c75ac1c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-Client-Application-Id","value":"{{X-Client-Application-Id}}"},{"key":"X-Client-Token","value":"{{X-Client-Token}}"},{"key":"Content-Type","value":"application/json"},{"key":"origin","value":"yourdomain.com"}],"url":"{{clientUrl}}/consents"},"response":[],"_postman_id":"265042bf-c1f5-415c-abcb-7a588c75ac1c"}],"id":"ac744625-90e0-4a9c-9c6e-47a2ca8a0075","description":"This section allows you to use our basic API requests from the client-side.\n\n\n","_postman_id":"ac744625-90e0-4a9c-9c6e-47a2ca8a0075"}],"event":[{"listen":"prerequest","script":{"id":"376af8db-af1f-4ec1-a51f-ce62605bb1bc","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"9e1b17e1-4f67-4555-9fa4-b3bb83366f71","type":"text/javascript","exec":[""]}}]}