GetbeelDocs
API referenceTax rules

Approve or reject a proposal

Approves (in force at once) or rejects a pending rule value or proroga. Through the API only a proposal with an official source can be approved, and a rules-watch proposal only when its quote was found word for word in the source (400 quote_not_verified: a PDF; approve it in the admin page after reading it). 404 proposal_not_found when it was already decided. Tax rules apply to every company: only getbeel administrators change them, with a live key that has the admin-only tax_rules:admin scope (created in the admin page; 403 insufficient_scope otherwise, 403 live_key_required with a test key, 403 super_admin_required when its creator is no longer an administrator). Recorded in the audit log.

POST
/tax-rules/decisions

Approves (in force at once) or rejects a pending rule value or proroga. Through the API only a proposal with an official source can be approved, and a rules-watch proposal only when its quote was found word for word in the source (400 quote_not_verified: a PDF; approve it in the admin page after reading it). 404 proposal_not_found when it was already decided. Tax rules apply to every company: only getbeel administrators change them, with a live key that has the admin-only tax_rules:admin scope (created in the admin page; 403 insufficient_scope otherwise, 403 live_key_required with a test key, 403 super_admin_required when its creator is no longer an administrator). Recorded in the audit log.

Authorization

apiKey
headerAuthorizationBearer <token>

API key: gb_test_… or gb_live_…

Header Parameters

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

Request Body

application/json
  1. body
kind*string
Value in"rule_value""override"
id*string

The proposal id (GET /v1/tax-rules → pending)

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
decision*string
Value in"approve""reject""withdraw"
note?|

Why (kept with the decision)

Response Body

OK

application/json
  1. response
object*string
kind*string
Value in"rule_value""override"
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
status*string
Value in"active""rejected"
decided_at*string
filings_updated*integer
Range-9007199254740991 <= value <= 9007199254740991
rule_value*|null
override*|null
Example Request
curl -X POST 'https://www.getbeel.com/api/v1/tax-rules/decisions' \  -H 'Content-Type: application/json' \  -d '{  "kind": "rule_value",  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "decision": "approve"}'
Example Response
{  "object": "tax_rule_decision",  "kind": "rule_value",  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "status": "active",  "decided_at": "string",  "filings_updated": -9007199254740991,  "rule_value": {    "object": "tax_rule_value",    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "key": "inps.maternity_yearly",    "value": 0,    "valid_from": "string",    "valid_to": "string",    "source_url": "string",    "source_title": "string",    "source_article": "string",    "source_quote": "string",    "quote_verified": true,    "status": "pending",    "proposed_via": "admin",    "decided_at": "string",    "decision_note": "string",    "created_at": "string"  },  "override": {    "object": "tax_calendar_override",    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "deadline_kind": "all",    "nominal_from": "string",    "nominal_to": "string",    "new_due_date": "string",    "valid_from": "string",    "source_url": "string",    "source_title": "string",    "source_quote": "string",    "quote_verified": true,    "note": "string",    "status": "pending",    "proposed_via": "admin",    "decided_at": "string",    "notified_at": "string",    "created_at": "string",    "filings_updated": -9007199254740991  }}