beel_create_custom_field_option
Adds a value to a custom field's options for one customer or all customers, reusing an equivalent existing option instead of creating a duplicate.
Instructions
Adds a value to the options of this custom field, for one customer or, without
customer_id, common to every customer. Use it to seed a catalogue before the first
invoice; values used on invoices are added on their own.
Equivalent values: two values are equivalent when they match ignoring case, accents and repeated spaces. If the field already has an equivalent option — of that customer or a common one — no option is created: the response is
200with the existing option, and its text is kept. Only when nothing equivalent exists is the option created, with201.Archived options: an equivalent archived option counts as existing. It comes back with
200and stays archived; reactivate it withPATCH /v1/companies/{company_id}/custom-fields/{key}/options/{option_id}.Suggestions off: a field with
suggest_values: falseaccepts options in the same way, so a catalogue can be prepared before turning suggestions on. They are not offered on invoices while the setting is off.
BeeL API endpoint: POST /v1/companies/{company_id}/custom-fields/{key}/options (reference: https://docs.beel.es)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"company_id": "<company_id>",
"key": "<key>",
"body": "<body>"
},
"name": "beel_create_custom_field_option"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Key of the custom field: lowercase letters, digits and `_`, up to 64 characters. A key outside that format answers `422`. | |
| body | Yes | ||
| company_id | Yes | Unique identifier (UUID) of the company the operation acts on — its identifier, not its NIF. It is the only source of context: the account that owns it is derived from it, and the `BeeL-Active-Company` header plays no part. A company you do not reach answers `403`, and so does a company that does not exist, so the existence of a company in another account is never disclosed. | |
| idempotency_key | No | Optional idempotency key for this operation. Omit it and one is derived from the request itself, which makes a blind retry safe but also collapses a SECOND, deliberately identical operation into the first for 24 hours. Set it — to an order id, or anything unique per intended operation — whenever you mean to create something that may look identical to what you just created. |