Conversion caps usage in the current period
const url = 'https://restapi.affattr.com/v1/conversion-caps/usage?app_id=1';const options = {method: 'GET', headers: {'API-KEY': '<API-KEY>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://restapi.affattr.com/v1/conversion-caps/usage?app_id=1' \ --header 'API-KEY: <API-KEY>'Each not deleted cap of the application, the inactive ones too, ordered by id. limit, used and remaining are conversions for a count cap and an amount in the application currency for a cost cap. Periods start in the application timezone. next_reset_at is the start of the next period of an hour, day, week or month cap and null for an interval or total cap. reset_at is the last reset of the counter or change of the type, window or filters of the cap, null if there was none.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ”Application id
Responses
Section titled “ Responses ”Usage of the caps
object
object
object
NextResetAt is when the counter starts over by itself: the start of the next period of a calendar window, null for the interval and the total ones.
Over is the number of conversions that went over the limit in the period.
PeriodStart is the start of the current period, null for the total window.
ResetAt is the last manual reset or change of what the cap counts, null if there was none.
Currency is the application currency, the unit of the cost caps.
Timezone is the zone the periods start in: the application timezone, UTC if it is unknown.
Example
{ "data": { "caps": [ { "limit_type": "count", "window": "hour" } ] }}Bad request
Example generated
exampleNo credentials (answered with 403 until default-deny is enabled)
Example generated
exampleInvalid credentials or no access
Example generated
exampleInternal server error
Example generated
example