Bloss Docs

Change a campaign's pay rules

Developers
POST
/brands/{brandId}/campaigns/{campaignId}/rules

Save new pay rules for a campaign as a new version and reprice its sets: base pay (one rate or per platform), minimum views and how they're counted, the bonus (tiers, or a rate per 1,000 views with a cap), the earning window, which sets count, late-found videos, the Base pay queue, payment requirements and trial pay. Send only what changes. By default the change reaches sets with nothing paid yet; alsoTopUpPaid also raises sets already paid. Money already paid is never reduced. A save needs a dry run first: call with ?dryRun=true to get the preview (totals, basedOnVersionId, inForceFrom), show it to the user, then call again with the same body plus basedOnVersionId and expected (the preview's totals). The save is refused with 409 when someone else changed the rules since, when the figures moved, while a payment is in flight, and on a closed campaign. Full admins only. Returns the new version's id, how many sets moved and the totals.

Authorization

bearerAuth campaigns:write
headerAuthorizationBearer <token>

Personal access token. Scopes: account:read, creator:read, creator:earnings, managed:read, coach:read, brand:read, creators:read, videos:read, analytics:read, onboarding:read, onboarding:signatures, engagement:read, support:read, integrations:read, payouts:read, funds:read, billing:read, groups:write, videos:write, onboarding:write, sync:write, payouts:write, campaigns:write.

Scope: campaigns:write

Path Parameters

brandId*string

A brand id from GET /me or GET /creator/brands.

Length1 <= length
campaignId*string

A campaign id from GET /brands/{brandId}/campaigns. A payout cycle id is the same id.

Length1 <= length

Query Parameters

dryRun?string

"true": run every check and return { dryRun: true, wouldChange } without changing anything.

Value in"true""false"

Request Body

application/json
  1. body
rules*

The rules to change, in the field names brand.campaigns.get returns. Omitted fields keep their value.

appliesTo?|

Who gets the new rules: "unpaid" (default: every set with nothing paid yet), or { "from": "YYYY-MM-DD" } for sets from that day on.

alsoTopUpPaid?boolean

Also raise sets already paid to the new rules. Money already paid is never reduced.

note?string

Kept with the version and in the history.

Lengthlength <= 500
basedOnVersionId?|

Required to save: the basedOnVersionId the dry run returned (null for a campaign with no saved version yet).

expected?

Required to save: the totals the dry run returned.

Response Body

Success.

application/json
  1. response
versionId*string
inForceFrom*string

ISO-8601 timestamp.

setsMoved*integer

Sets that now price by the new rules.

Range-9007199254740991 <= value <= 9007199254740991
totals*

What the change does to the money.

figuresStale*boolean

Saved, but the repricing will only finish at the next sync.

curl -X POST 'https://example.com/api/v1/brands/string/campaigns/string/rules' \  -H 'Content-Type: application/json' \  -d '{  "rules": {}}'
{  "versionId": "string",  "inForceFrom": "string",  "setsMoved": -9007199254740991,  "totals": {    "sets": -9007199254740991,    "creators": -9007199254740991,    "owedBefore": 0,    "owedAfter": 0,    "setsUp": -9007199254740991,    "setsDown": -9007199254740991  },  "figuresStale": true}

Was this page helpful?