Usage
Get a client's credit usage
/v1/integration/usageThe credits the client named in `Alfa-Company-Id` used in a period, by job. Only for clients your platform created. 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
Headers
Alfa-Company-IdstringThe Company ID of the company to act for. Required with a platform key, and that company must have authorized your platform; a company key acts for its own company and can leave it out.
Response body
companyIdstringrequiredThe client’s Company ID.
fromstringrequiredThe start of the period.
tostringrequiredThe end of the period, excluded.
usedintegerrequiredCredits the client used in the period.
jobsobject[]requiredUsage by job in the period, highest first.
Show fields
jobIdintegerrequiredAlfa's id for the job.
externalJobIdstring | nullrequiredYour ATS job id.
titlestring | nullrequiredThe job title.
usedintegerrequiredCredits used on the job in the period.
interviewsintegerrequiredAI Interviews in the period.
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