Skip to main content

Organization

GET /organization

Who the key acts as: its organization, and the key itself. Call it first, to check a key.

Keys: every key.

Parameters​

None.

Response​

FieldTypeDescription
idstringThe organization's id.
namestringThe organization's name.
fiscal_year_monthintegerThe month its fiscal year starts, from 1 (January) to 12 (December).
key.kindstringpersonal for a key you created: it acts as you. Other kinds exist for Spendbaker's own apps: don't fail on them.
key.scopestringWhat the key may do: read, the only value today.
key.userobjectWho the key acts as: id, first_name, last_name. Left out for a key that acts as no one.

Example​

curl https://app.spendbaker.com/sb_back/api/v1/organization \
-H "Authorization: Bearer $SPENDBAKER_KEY"
{
"id": "3f6c2a1e-8b4d-4c7a-9e21-5d0f7b3a9c14",
"name": "Acme",
"fiscal_year_month": 1,
"key": {
"kind": "personal",
"scope": "read",
"user": {
"id": "0b9e4d27-6a13-4f58-b2c9-81e7d4a0f365",
"first_name": "Camille",
"last_name": "Martin"
}
}
}

Errors​

401, 429 and 500, as in Errors and limits, and:

StatuscodeWhen
404not_foundThe organization was deleted.