curl --request POST \
--url https://app.sahlfinancial.com/api/v1/partner/registry/rib \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"rib": "MA64011519000001205000534921"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({rib: 'MA64011519000001205000534921'})
};
fetch('https://app.sahlfinancial.com/api/v1/partner/registry/rib', 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/registry/rib"
payload = { "rib": "MA64011519000001205000534921" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"available": true,
"environment": "sandbox",
"kind": "rib",
"normalized": "<string>",
"valid": true,
"bank_known": true,
"note": "<string>",
"source": "<string>",
"message": "<string>",
"formatted": "<string>",
"rib_key_ok": true,
"iban_check_ok": true,
"bank_code": "<string>",
"bank_name": "<string>",
"bank_logo": "<string>",
"account_checked": false
}{
"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": "commit_failed",
"message": "The change could not be saved; nothing changed. Retry."
}
}Check a Moroccan RIB or IBAN
Required scope: registry:read.
A 24-digit RIB or 28-character Moroccan IBAN: length, RIB key, IBAN check digits and the bank the first three digits name. No account lookup.
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 POST \
--url https://app.sahlfinancial.com/api/v1/partner/registry/rib \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"rib": "MA64011519000001205000534921"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({rib: 'MA64011519000001205000534921'})
};
fetch('https://app.sahlfinancial.com/api/v1/partner/registry/rib', 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/registry/rib"
payload = { "rib": "MA64011519000001205000534921" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"available": true,
"environment": "sandbox",
"kind": "rib",
"normalized": "<string>",
"valid": true,
"bank_known": true,
"note": "<string>",
"source": "<string>",
"message": "<string>",
"formatted": "<string>",
"rib_key_ok": true,
"iban_check_ok": true,
"bank_code": "<string>",
"bank_name": "<string>",
"bank_logo": "<string>",
"account_checked": false
}{
"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": "commit_failed",
"message": "The change could not be saved; nothing changed. Retry."
}
}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
Body
Response
OK