post https://example.com/EVENTS.PUBLICATION.SUCCEEDED
EVENT: "EVENTS.PUBLICATION.SUCCEEDED"
HTTP method: POST
HTTP method: POST
The EVENTS.PUBLICATION.SUCCEEDED
event indicates that a voucher code was successfully published to a customer.
This event serves as a real-time notification mechanism and it can notify other systems or applications that a voucher was assigned. As a result, the systems can react by, for example, sending a notification about an assignment to a customer.
This event is used in a webhook configured in Project settings in Voucherify dashboard.
Webhook documentation
This page documents only the event. If you need more details about the webhook payload data that includes this event, go to Webhook v2024-01-01 page.
Example: publication.succeeded
{
"user": {
"id": "user_ypzfEcSAphSONMGJRlj6trzXKsh7FGX7"
},
"campaign": {
"id": "camp_EV79Z6CjaAMpX4pFxVivvzzk",
"name": "Free product zero items-test",
"type": "AUTO_UPDATE",
"active": true,
"object": "campaign",
"voucher": {
"gift": null,
"type": "DISCOUNT_VOUCHER",
"discount": {
"type": "UNIT",
"units": null,
"effect": "ADD_NEW_ITEMS",
"unit_off": 0,
"unit_type": "prod_0df14b7e7d8975079d"
},
"redemption": {
"quantity": null,
"redeemed_quantity": 0
},
"code_config": {
"length": 1,
"prefix": "ZERO-",
"charset": "0123456789",
"pattern": "#",
"postfix": ""
},
"loyalty_card": null
},
"auto_join": false,
"join_once": false,
"created_at": "2024-01-24T12:39:58.736Z",
"updated_at": "2024-01-24T12:41:49.631Z",
"category_id": null,
"campaign_type": "DISCOUNT_COUPONS",
"is_referral_code": false
},
"customer": {
"id": "cust_IdgAFZxYwwHctOk9pPuMu308",
"name": "Jack Webhook",
"email": null,
"object": "customer",
"metadata": {
"region": "EMEA"
},
"source_id": "jck-wbhk"
},
"vouchers": [
{
"id": "v_gZt6Zc74XKRv6VXSqubC2jDMfHjzbFPi",
"code": "ZERO-8",
"type": "DISCOUNT_VOUCHER",
"active": true,
"object": "voucher",
"campaign": "Free product zero items-test",
"discount": {
"type": "UNIT",
"effect": "ADD_NEW_ITEMS",
"unit_off": 0,
"unit_type": "prod_0df14b7e7d8975079d"
},
"holder_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
"created_at": "2024-01-24T12:39:59.139Z",
"redemption": {
"quantity": null,
"redeemed_quantity": 5
},
"updated_at": "2024-02-01T12:54:33.183Z",
"campaign_id": "camp_EV79Z6CjaAMpX4pFxVivvzzk",
"category_id": null,
"is_referral_code": false
}
],
"publication": {
"id": "pub_r0413bLwExpB6LE0v286eNVmEpx6NxmP",
"object": "publication",
"result": "SUCCESS",
"channel": "voucherify-web-ui",
"customer": {
"id": "cust_IdgAFZxYwwHctOk9pPuMu308",
"name": "Jack Webhook",
"object": "customer",
"address": null,
"loyalty": null,
"summary": null,
"metadata": {
"region": "EMEA"
},
"referrals": null,
"source_id": "jck-wbhk"
},
"metadata": {
"method": "manual"
},
"source_id": "public_321932",
"created_at": "2024-02-01T12:54:33.174Z",
"customer_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
"tracking_id": "jck-wbhk",
"vouchers_id": [
"v_gZt6Zc74XKRv6VXSqubC2jDMfHjzbFPi"
]
}
}