Bloss Docs

Campaign spend and budget

Developers
GET
/brands/{brandId}/campaign/spend

What a campaign (a set of payout cycles) has cost: spend is base pay + CPM bonus, the pay your creators earn on those cycles' sets. With prepayment (the budget you were prepaid), also what remains and whether spend has reached thresholdPct of it. tagIds and groupIds scope the totals. breakdown=tag adds spend and CPM per tag (attributed by the set's tags; a set with several tags counts under each; tagIds doesn't apply to it). breakdown=day adds spend per day, which is null on every day when tagIds or groupIds is set (pay can't be attributed to a day that way) and on days no cycle covers; a day can be negative when pay was revised down. Full admins only.

Authorization

bearerAuth payouts:read
headerAuthorizationBearer <token>

Personal access token. Scopes: account:read, creator:read, creator:earnings, managed:read, coach:read, brand:read, creators:read, videos:read, analytics:read, recruitment:read, engagement:read, support:read, integrations:read, payouts:read, funds:read, billing:read.

Scope: payouts:read

Path Parameters

brandId*string

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

Length1 <= length

Query Parameters

cycleIds*string

Comma-separated payout cycle ids (from GET /brands/{brandId}/cycles): the cycles that make up the campaign.

Length1 <= length
tagIds?string

Comma-separated tag ids (from GET /brands/{brandId}/tags). Matches any of them.

groupIds?string

Comma-separated creator-group ids (from GET /brands/{brandId}/creator-groups); __ungrouped__ selects creators in no group. Matches creators in any of them. An unknown group id is a 400.

prepayment?number

Total prepaid budget, US dollars.

Range0 <= value
thresholdPct?number

Budget use (%) that turns atThreshold true. Default 70.

Range0 <= value
breakdown?string

"tag" adds spend per tag; "day" adds spend per day. Default "none".

Default"none"
Value in"none""tag""day"
from?string

breakdown=day: clamp the window's start, YYYY-MM-DD.

to?string

breakdown=day: clamp the window's end, YYYY-MM-DD.

Response Body

Success.

application/json
  1. response
currency*string
metrics*
budget*|

Present only with a prepayment.

cycles*array<>
tags*array<>|

breakdown=tag only; otherwise null.

days*|

breakdown=day only; otherwise null.

curl -X GET 'https://example.com/api/v1/brands/string/campaign/spend?cycleIds=string'
{  "currency": "USD",  "metrics": {    "totalSpend": 0,    "totalRemains": 0  },  "budget": {    "prepayment": 0,    "budgetUsedPct": 0,    "thresholdPct": 0,    "atThreshold": true  },  "cycles": [    {      "cycleId": "string",      "startDate": "string",      "endDate": "string",      "status": "string",      "spend": 0    }  ],  "tags": [    {      "tagId": "string",      "name": "string",      "color": "string",      "spend": 0,      "cpm": 0    }  ],  "days": {    "from": "string",    "to": "string",    "days": [      {        "date": "string",        "spend": 0      }    ]  }}

Was this page helpful?