Skip to main content
WEBHOOK
EVENTS.CUSTOMER.PUBLICATION.SUCCEEDED
{
  "customer": {
    "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
    "name": "Jack Webhook",
    "email": null,
    "source_id": "jck-wbhk",
    "metadata": {
      "region": "EMEA",
      "sign-up": "true"
    },
    "object": "customer"
  },
  "campaign": {
    "id": "camp_iRMdcq07g9W4dOSRXuTovupi",
    "name": "Spring Discounts",
    "campaign_type": "DISCOUNT_COUPONS",
    "type": "AUTO_UPDATE",
    "is_referral_code": false,
    "voucher": {
      "type": "DISCOUNT_VOUCHER",
      "discount": {
        "type": "PERCENT",
        "units": null,
        "effect": "APPLY_TO_ORDER",
        "percent_off": 10,
        "amount_limit": 3000,
        "percent_off_formula": "IF(ORDER_AMOUNT > 150;15;10)"
      },
      "redemption": {
        "quantity": 1,
        "redeemed_quantity": 0
      },
      "code_config": {
        "length": 3,
        "prefix": "SPRING-2024-",
        "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
        "pattern": "###",
        "postfix": ""
      }
    },
    "auto_join": false,
    "join_once": false,
    "active": true,
    "category_id": "cat_0e156dab8f2e43873a",
    "category": null,
    "metadata": {},
    "start_date": null,
    "expiration_date": null,
    "description": "Spring 2024 big campaign",
    "created_at": "2024-02-21T10:01:24.102Z",
    "updated_at": "2024-02-23T11:43:11.539Z",
    "object": "campaign"
  },
  "publication": {
    "id": "pub_DpHmhx5uTanbM0mnndFrODi1U3MEX6rF",
    "object": "publication",
    "result": "SUCCESS",
    "channel": "voucherify-web-ui",
    "voucher": {
      "id": "v_Zmqfq7rKLPtSHv3aCGrD4863sIoQc4QO",
      "code": "SPRING-2024-tPz",
      "gift": null,
      "type": "DISCOUNT_VOUCHER",
      "active": true,
      "assets": {
        "qr": {
          "id": "2658df7c-5943-477e-87f5-7e582a3e8913",
          "url": "{{voucher_qr_code.url}}"
        },
        "barcode": {
          "id": "2833ddba-5319-487d-9b0b-ec35a287a766",
          "url": "{{voucher_barcode.url}}"
        }
      },
      "object": "voucher",
      "publish": {
        "url": "/v1/vouchers/SPRING-2024-tPz/publications?page=1&limit=10",
        "count": 1,
        "object": "list"
      },
      "campaign": "Spring Discounts",
      "category": "Star Platinum",
      "discount": {
        "type": "PERCENT",
        "effect": "APPLY_TO_ORDER",
        "percent_off": 10,
        "amount_limit": 3000,
        "percent_off_formula": "IF(ORDER_AMOUNT > 150;15;10)"
      },
      "metadata": {},
      "holder_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
      "categories": [
        {
          "id": "cat_0e156dab8f2e43873a",
          "name": "Star Platinum",
          "object": "category",
          "hierarchy": 10,
          "created_at": "2024-01-03T10:03:24.092Z"
        }
      ],
      "created_at": "2024-03-13T13:45:41.161Z",
      "redemption": {
        "url": "/v1/vouchers/SPRING-2024-tPz/redemptions?page=1&limit=10",
        "object": "list",
        "quantity": 1,
        "redeemed_quantity": 0
      },
      "start_date": null,
      "updated_at": "2024-03-13T13:45:59.498Z",
      "campaign_id": "camp_iRMdcq07g9W4dOSRXuTovupi",
      "category_id": "cat_0e156dab8f2e43873a",
      "loyalty_card": null,
      "validity_hours": null,
      "additional_info": null,
      "expiration_date": null,
      "is_referral_code": false,
      "validity_timeframe": null,
      "validity_day_of_week": null
    },
    "customer": {
      "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
      "name": "Jack Webhook",
      "object": "customer",
      "address": null,
      "loyalty": null,
      "summary": null,
      "metadata": {
        "region": "EMEA",
        "sign-up": "true"
      },
      "referrals": null,
      "source_id": "jck-wbhk"
    },
    "metadata": {},
    "source_id": null,
    "created_at": "2024-03-13T13:45:59.492Z",
    "customer_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
    "tracking_id": "jck-wbhk",
    "vouchers_id": [
      "v_Zmqfq7rKLPtSHv3aCGrD4863sIoQc4QO"
    ]
  },
  "voucher": {
    "id": "v_Zmqfq7rKLPtSHv3aCGrD4863sIoQc4QO",
    "code": "SPRING-2024-tPz",
    "discount": {
      "type": "PERCENT",
      "amount_limit": 3000,
      "percent_off": 10,
      "effect": "APPLY_TO_ORDER",
      "percent_off_formula": "IF(ORDER_AMOUNT > 150;15;10)"
    },
    "type": "DISCOUNT_VOUCHER",
    "campaign": "Spring Discounts",
    "campaign_id": "camp_iRMdcq07g9W4dOSRXuTovupi",
    "is_referral_code": false,
    "holder_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
    "category_id": "cat_0e156dab8f2e43873a",
    "active": true,
    "created_at": "2024-03-13T13:45:41.161Z",
    "updated_at": "2024-03-13T13:45:59.498Z",
    "redemption": {
      "quantity": 1,
      "redeemed_quantity": 0
    },
    "start_date": null,
    "expiration_date": null,
    "metadata": {},
    "object": "voucher"
  }
}
The EVENTS.CUSTOMER.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 Distributions in Voucherify dashboard.
This page documents only the event. If you need more details about the webhook payload data that includes this event, go to Introduction to webhooks page.

Body

application/json

Event data object schema for `customer.publication.succeeded

customer
object
required

Simplified customer data.

campaign
object
required

Simplified campaign data.

publication
object
required

Publication with a voucher.

voucher
object
required

Simplified voucher data.

Response

Webhook accepted

I