curl --request GET \
--url https://app.sahlfinancial.com/api/v1/partner/usage \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.sahlfinancial.com/api/v1/partner/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.sahlfinancial.com/api/v1/partner/usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"plan": "<string>",
"production": {
"period_start": "2023-12-25",
"resets_at": "2023-11-07T05:31:56Z",
"documents_used": 123,
"api_documents": 123,
"document_limit": 123,
"remaining": 123,
"refused": 123,
"locked": true
},
"sandbox": {
"day": "2023-12-25",
"resets_at": "2023-11-07T05:31:56Z",
"documents_used": 123,
"refused": 123,
"daily_cap": 123,
"remaining": 123
},
"environment": "sandbox",
"endpoints": [
{
"method": "<string>",
"path": "<string>",
"calls": 123,
"errors": 123
}
],
"window_days": 7
}{
"detail": {
"code": "partner_identity_rejected",
"message": "The key is bound to a service account and X-Partner-Identity was missing or did not verify for it."
}
}{
"detail": "API key lacks the required scope"
}{
"detail": {
"code": "invalid_environment",
"message": "environment / X-Sahl-Environment must be 'sandbox' or 'production'."
}
}{
"detail": {
"code": "rate_limit_exceeded",
"message": "Too many calls a minute: per API key on the partner routes, or per key / per address at the edge. Wait for Retry-After."
}
}{
"detail": {
"code": "internal_error",
"message": "Unexpected error. Quote X-Request-ID to support."
}
}Document quota and call counts
Required scope: usage:read.
Production documents this month vs the plan, today’s Sandbox counter vs its cap, and this key’s calls per endpoint over the last 7 days (in the call’s environment).
Choose the environment with the X-Sahl-Environment header or the environment parameter or field; the Sandbox is the default. Two values that disagree are refused (422 environment_conflict).
curl --request GET \
--url https://app.sahlfinancial.com/api/v1/partner/usage \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.sahlfinancial.com/api/v1/partner/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.sahlfinancial.com/api/v1/partner/usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"plan": "<string>",
"production": {
"period_start": "2023-12-25",
"resets_at": "2023-11-07T05:31:56Z",
"documents_used": 123,
"api_documents": 123,
"document_limit": 123,
"remaining": 123,
"refused": 123,
"locked": true
},
"sandbox": {
"day": "2023-12-25",
"resets_at": "2023-11-07T05:31:56Z",
"documents_used": 123,
"refused": 123,
"daily_cap": 123,
"remaining": 123
},
"environment": "sandbox",
"endpoints": [
{
"method": "<string>",
"path": "<string>",
"calls": 123,
"errors": 123
}
],
"window_days": 7
}{
"detail": {
"code": "partner_identity_rejected",
"message": "The key is bound to a service account and X-Partner-Identity was missing or did not verify for it."
}
}{
"detail": "API key lacks the required scope"
}{
"detail": {
"code": "invalid_environment",
"message": "environment / X-Sahl-Environment must be 'sandbox' or 'production'."
}
}{
"detail": {
"code": "rate_limit_exceeded",
"message": "Too many calls a minute: per API key on the partner routes, or per key / per address at the edge. Wait for Retry-After."
}
}{
"detail": {
"code": "internal_error",
"message": "Unexpected error. Quote X-Request-ID to support."
}
}Authorizations
API key created in the console. Scopes: kyc:extract, kyc:verify, kyc:eid; kyb:onboard, kyb:ice; statements:read; webhooks:manage; requests:read, requests:write; bank:read, bank:write (Growth plan, enabled per workspace by Sahl); registry:read; cases:read; scoring:read, scoring:write; policy:read, policy:write; usage:read. The Sandbox specimen routes, GET /v1/partner/me and GET /v1/partner/errors need any valid key.
Headers
Query Parameters
Response
OK