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
| Field | Type | Description |
|---|---|---|
id | string | The organization's id. |
name | string | The organization's name. |
fiscal_year_month | integer | The month its fiscal year starts, from 1 (January) to 12 (December). |
key.kind | string | personal for a key you created: it acts as you. Other kinds exist for Spendbaker's own apps: don't fail on them. |
key.scope | string | What the key may do: read, the only value today. |
key.user | object | Who 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:
| Status | code | When |
|---|---|---|
| 404 | not_found | The organization was deleted. |