join_onceboolean
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.
voucherstring
Code of voucher being published.
Create publication with campaign.
namestring
Name of voucher's parent campaign or unique campaign ID that was assigned by Voucherify.
countinteger
Number of vouchers to be published to customer.
source_idstring
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.
customeranyrequired
Contains information about the customer to whom the publication was directed. Use `customer.id`, `customer.source_id`, or both to identify the customer; at least one of them is required.
metadataobject
The metadata object stores all custom attributes assigned to the publication. A set of key/value pairs that you can attach to a publication object. It can be useful for storing additional information about the publication in a structured format.