Usage
List credit usage line items
/v1/integration/platform/usage/events/pageEvery AI Interview that used a credit in the period, oldest first, for reconciling with your own records. Requires an API key with the `usage:read` scope.
Requires an Alfa API key as a bearer token. How API keys work
Query parameters
fromstringThe start of the period. Defaults to the start of the current month (UTC).
format date-time
tostringThe end of the period, excluded. Defaults to now.
format date-time
companyIdstringOnly this client’s interviews.
at least 1 characters · at most 64 characters
limitstringHow many results to return, from 1 to 100. Defaults to 25.
cursorstringThe `nextCursor` of the previous page. Leave it out for the first page.
at least 1 characters · at most 2048 characters
Response body
dataobject[]requiredThe results on this page.
Show fields
usageIdintegerrequiredThe line item id.
companyIdstringrequiredThe client’s Company ID.
jobIdintegerrequiredAlfa's id for the job.
externalJobIdstring | nullrequiredYour ATS job id.
candidateIdstringrequiredAlfa's id for the candidate.
externalCandidateIdstring | nullrequiredYour candidate id, for applicants you sent.
creditsintegerrequiredCredits used.
durationSecondsinteger | nullrequiredHow long the interview lasted.
occurredAtstringrequiredWhen the interview finished.
nextCursorstring | nullrequiredPass as `cursor` to read the next page; null on the last page.
Responses
- 200Success.
- 400The request is malformed: invalid JSON, an unexpected body or an unknown query parameter. Problem details
- 401The bearer token is missing, expired or invalid. Problem details
- 403The caller may not perform this operation, or has no active organisation. Problem details
- 404The resource does not exist or is not visible to the caller. Problem details
- 422The request failed validation; `errors` lists each invalid field. Problem details
- 429Too many requests, or the AI service is busy. Retry after a short wait. Problem details
- 500An unexpected error. Quote the `correlationId` to support. Problem details