---
title: "Campaign sample approved event"
method: POST
path: "campaign_sample.approved"
tags: ["Webhook Events"]
---

# Campaign sample approved event

`POST campaign_sample.approved` (webhook)

You approved a sample request.

### Discount code

`sample.discountCode` is the single-use, 100% off code created in your store for that product.

## Payload

- WebhookPayloadCampaignSample: Webhook payload for `campaign_sample.requested`, `campaign_sample.approved`, `campaign_sample.shipped` and `campaign_sample.declined`. `sample.status` is the status after the change; `sample.discountCode` is set from approval on.
  - `id` string, required: Stable webhook event ID: the dedupe key, also sent as the X-Zernio-Event-Id header and identical on every retry and redelivery. It identifies the event only, never an account or other resource.
  - `profiles` object[]: The profiles this event belongs to, each with the externalId you set on it (null when none is set). Use it to route the event to your tenant without storing Zernio profile ids. Present on every event tied to a profile, absent on events that belong to none. Events spanning several profiles (a post published to accounts of different profiles) list each once.
    - `id` string, required
    - `externalId` string, nullable, required
  - `test` boolean: Always true when present: only a sample sent by POST /v1/webhooks/test with an event carries it. Real deliveries never do.
  - `event` 'campaign_sample.requested' | 'campaign_sample.approved' | 'campaign_sample.shipped' | 'campaign_sample.declined', required
  - `campaign` object, required
    - `id` string, required
    - `name` string, required
  - `participant` object, required
    - `id` string, required
  - `creator` object, required
    - `id` string, required
    - `displayName` string, required
  - `sample` object, required
    - `id` string, required
    - `storeAccountId` string, required
    - `productId` string, required
    - `variantId` string, nullable, required
    - `productTitle` string, required
    - `variantTitle` string, nullable, required
    - `status` 'pending' | 'approved' | 'shipped' | 'declined', required
    - `shippingAddress` CampaignSampleShippingAddress, required
      - `name` string, required
      - `line1` string, required
      - `line2` string
      - `city` string, required
      - `region` string
      - `postalCode` string, required
      - `country` string, required: ISO 3166-1 alpha-2 country code.
      - `phone` string
    - `note` string, nullable, required
    - `discountCode` string, nullable, required: The 100%-off, single-use code, set from approval on.
    - `trackingUrl` string, nullable, required
    - `declineReason` string, nullable, required
  - `timestamp` string, date-time, required: UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.

## Acknowledgement `200`

Webhook received successfully

---

[API](https://skmtc.dev/zernio/apis/zernio-api.md) - [All operations](https://skmtc.dev/zernio/apis/zernio-api/llms.txt) - [OpenAPI document](https://skmtc.dev/zernio/apis/zernio-api/revisions/a79c233ebf22?raw)
