Approve campaign submission
Approves a tracking or pending_review submission of an active campaign and fires campaign_submission.approved.
The Zernio dashboard offers Approve only on pending_review (a post that needs a decision) and waits for tracking posts to get there. The API accepts tracking so an integration can approve early.
Authentication
API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
Path parameters
Campaign ID.
Submission ID.
Headers
OptionalOptional client-generated unique key (e.g. a UUID) that makes retries safe.
- Same key + same body: replays the original response.
- Same key + different body: 422.
- Key still processing: 409.
A request cut off mid-handler (e.g. by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
On the Ads create, boost and duplicate endpoints, a same-body retry runs again once the cut-off request started more than 15 minutes ago.
Responses
Success· the request worked
Errors· the request failed
How it behaves
Earnings
- What the post earned so far moves to owed and is held for the campaign's
holdDays. - Later earnings post straight to owed.
- A per-post campaign pays
perApprovedPostCentshere.
Errors
- 409: the submission is in any other state.
- 409 (
invalid_resource_state, "This post is already approved in another campaign of yours."): the same post was approved in another of your campaigns, so one post never earns twice.
Approve campaign sample request
Approves a `pending` sample request. Zernio creates a 100%-off, single-use discount code (`SAMPLE-XXXXXXXX`) limited to the requested product in the campaign's store (Shopify or WooCommerce), returns it as `discountCode`, emails it to the creator and fires `campaign_sample.approved`. The creator redeems it at checkout. The code is created before the request changes, so when the store refuses (missing discount permission, an unsupported store, a store error) its error is returned and the request stays `pending`. The approval also starts the `sampleContentDueDays` clock behind `contentDueAt` and `contentOwed`. ### Errors - 400 `platform_not_supported`: the store cannot create discounts. - 403: the store has not granted the permission discounts need. - 409 `invalid_resource_state`: the request is not `pending`. - 502 `platform_api_error`: the store is unavailable.
Close creator campaign
Closes an `active` or `paused` campaign for good and fires `creator_campaign.closed`. Open tracking windows are cancelled. A pool campaign is split among participants at this moment by their approved eligible views. Closing a pool campaign therefore answers 409 while any post still awaits review. A campaign also closes by itself once `endsAt` passed and every tracking window had its final read.