The CRM’s API credits, as far as they are known
const url = 'https://api.sloose.com/orgs/org_9f3c/connectors/cnn_9f2a/credits';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
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://api.sloose.com/orgs/org_9f3c/connectors/cnn_9f2a/credits \ --header 'Authorization: Bearer <token>'What is known of a Zoho CRM’s daily API allowance, for the tenant (CRM organisation, data centre and host) this connection reaches — every Sloose organisation holding it shares the one pool, so a count read through any of them is returned. Zoho CRM connections only: a connection of any other kind is answered with nothing known — remaining, remainingAt, allowance and edition null, and allowanceAtLeast false — whatever is stored under its spelling. Asks the CRM nothing and spends no credit: it reads what earlier calls and the connect recorded. The run page compares its estimate with remaining and warns; a run that writes is refused only while spent is true (DESTINATION_ALLOWANCE_SPENT at its authorisation). POST …/credits/check asks the CRM first.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The organisation id the session was issued for. A token for one organisation can never read another.
Example
org_9f3cThe organisation id the session was issued for. A token for one organisation can never read another.
The connector id, from the list.
Example
cnn_9f2aThe connector id, from the list.
Responses
Section titled “Responses”What is known.
object
object
The credits the CRM last said were left (X-API-CREDITS-REMAINING), or null: Zoho sends it on any call once half the day is spent and not before, and a count more than a day old is none.
When the CRM said so, any organisation’s call counted.
The CRM’s day, from its licence by Zoho’s published table — or null where its edition or licence count is not known. Add-on credits and other apps’ use of the pool cannot be seen.
Whether allowance is a floor: the figure Zoho publishes for the edition, which its own dashboard has shown a CRM to exceed (the Free edition). False for a figure the table gives outright, and where there is none.
The edition the licence was read as, where it was recognised.
Whether the CRM’s API allowance is known to be spent now: Zoho refused a call because the last 24 hours’ credits are used up, and no call has been answered since. While it is, Sloose refuses this CRM’s calls before sending them, letting one a minute through to ask again; the first of those Zoho does as asked makes this false, and one that fails or is refused does not. Zoho names no time at which credits return.
When Sloose first heard the allowance was spent, or null while it is not.
Examplegenerated
{ "credits": { "remaining": 1, "remainingAt": "example", "allowance": 1, "allowanceAtLeast": true, "edition": "example", "spent": true, "spentAt": "example" }}No bearer, or one that no longer resolves: a session that is unknown or expired (code: AUTH_REQUIRED), or an API token that was revoked or expired (TOKEN_REVOKED, TOKEN_EXPIRED), whose organisation is gone (ORG_NOT_FOUND) or whose member or user row is (MEMBERSHIP_GONE).
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}The bearer’s role is too low (code: ROLE_REQUIRED), or it was issued for a different organisation; the organisation has been closed (code: ORG_CLOSED, either kind of bearer); the person is banned (code: BANNED, a session); or it is a session that is signed in but in no organisation (code: NO_ORG): one that never joined one, or whose person was taken out of the one it was in, or left it. Signing in again changes nothing for NO_ORG; choosing or making an organisation does.
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}No such connector, or it is not visible to this session.
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}The restore switch is on (code: MAINTENANCE): every route but /health and /robots.txt is refused before anything is read, except the operator’s own POST /staff/people/{id}/delete with the ADMIN_TOKEN. Sloose is down for maintenance. Please try again in a few minutes.
object
Example
{ "code": "MAINTENANCE"}Headers
Section titled “Headers”Seconds until asking again is worth it (300 while the switch is on).