GetbeelDocs
Riferimento APIReceived invoices

Add a category

Adds a category; its slug comes from the label (made unique in the team) and, without a colour, it gets the next preset. Live keys only.

POST
/categories

Adds a category; its slug comes from the label (made unique in the team) and, without a colour, it gets the next preset. Live keys only.

Autorizzazione

apiKey
headerAuthorizationBearer <token>

API key: gb_test_… or gb_live_…

Idempotency-Key?string

Recommended. Retrying with the same key and body within 24 hours replays the first response (header Idempotent-Replayed: true) instead of acting twice. The same key with a different body returns 422 idempotency_key_reused.

Lengthlength <= 255
Getbeel-Company?string

Act on one of the account's client companies (its id from GET /companies) instead of the key's own account. 404 company_not_found when the key cannot act on it.

Formatuuid
application/json
  1. body
label*string

Name shown in the app

Length1 <= length <= 100
color?string

Colour: #rrggbb or hsl(h, s%, l%)

Match^(#[0-9a-fA-F]{6}|hsl\(\s*\d{1,3}(\.\d+)?\s*,\s*\d{1,3}(\.\d+)?%\s*,\s*\d{1,3}(\.\d+)?%\s*\))$

Corpo della risposta

OK

application/json
  1. response
object*string
id*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid
slug*string

Stable key used on received invoices (category field)

label*string
color*string
is_default*boolean

Default categories cannot be deleted

sort_order*integer
Range-9007199254740991 <= value <= 9007199254740991
Esempio di richiesta
curl -X POST 'https://www.getbeel.com/api/v1/categories' \  -H 'Content-Type: application/json' \  -d '{  "label": "string"}'
Esempio di risposta
{  "object": "category",  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "slug": "software",  "label": "string",  "color": "string",  "is_default": true,  "sort_order": -9007199254740991}