Keystone Developers
Open Keystone
API reference

Console API

Ads monthly cap

1 endpoint.

GET/api/v1/admin/businesses/{business_id}/ads/monthly-cap

The monthly ad cap and the month's spend against it

Authentication

Authorization: Bearer <token>.

Parameters

NameInTypeDescription
business_idrequiredpathstring (uuid)

Responses

200Successful Response
application/jsonSuccessResponse_AdMonthlyCapData_
FieldTypeDescription
request_idrequiredstring
successtruedefault true
datarequiredAdMonthlyCapData
AdMonthlyCapData fields
FieldTypeDescription
monthlyCapMinorrequiredinteger | null

Null: no cap is set

currencyCoderequiredstring
monthrequiredstring

YYYY-MM

timezoneNamerequiredstring
spentMinorrequiredinteger

Synced campaign spend this month, today included

spentThroughrequiredstring (date) | null

The last day with synced spend this month; null when none

dailyBudgetMinorrequiredinteger

What the active campaigns run a day, in the cap's currency: a campaign budget whole, else its switched-on ad sets' budgets

daysLeftrequiredinteger

Days left in the month, today included

projectedMinorrequiredinteger

Estimate: the spend before today plus dailyBudgetMinor for every day left

remainingMinorrequiredinteger | null

Cap minus spend; negative once spend passed it; null with no cap

updatedAtrequiredstring (date-time) | null

When the cap was last set

metadataResponseMetadata | null
ResponseMetadata fields
FieldTypeDescription
paginationPaginationMetadata | null
PaginationMetadata fields
FieldTypeDescription
limitrequiredinteger
next_cursorstring | null
prev_cursorstring | null
has_morerequiredboolean
has_prevbooleandefault false
total_countinteger | null
status_countsobject | null
object | null fields

Map of string to integer

lifecycle_countsLifecycleCounts | null
LifecycleCounts fields
FieldTypeDescription
allintegerdefault 0
leadintegerdefault 0
prospectintegerdefault 0
customerintegerdefault 0
former_customerintegerdefault 0
classification_countsClassificationCounts | null
ClassificationCounts fields
FieldTypeDescription
signalobject
object fields

Nested object (not expanded)

touchobject
object fields

Nested object (not expanded)

stageobject
object fields

Nested object (not expanded)

metaResponseMeta | null
ResponseMeta fields
FieldTypeDescription
totalinteger | null
total_countinteger | null
pageinteger | null
per_pageinteger | null
  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.