NewCompany stats count voided invoices by how they were voided
BeeL
Get startedMulti-NIFVeriFactuRulesStripeAPI referenceChangelog
ApiCustom Fields

List the custom fields of a company

Scopecustom-fields:read

Returns the invoice custom fields of this company, each one with the options that apply to the query, ordered by key. A field with suggest_values: false carries no options.

  • Options per customer: with customer_id, each field carries the common options and those of that customer, which is what an invoice for that customer can offer. Without it, only the common options. To page through every option of a field, use GET /v1/companies/{company_id}/custom-fields/{key}/options.
  • Archived: archived fields and options are left out unless include_archived=true.

Closed catalogue. A company defines a small set of fields: this collection carries no pagination, takes no page/limit, and every response holds the whole set.


GET
/v1/companies/{company_id}/custom-fields
AuthorizationBearer <token>

Keys are prefixed beel_sk_, and each one carries the scopes it was created with: a key short of the scope an operation needs is answered 403. The scope an operation requires is shown next to its title, and the full catalogue lives in the Scopes reference.

Keys are created from the BeeL dashboard. They are secret credentials: do not share them or commit them to source control.

In: header

Path Parameters

company_idstring

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.

Formatuuid

Query Parameters

customer_id?string

Adds the options of this customer to the common ones. A value that names no customer of this company is not an error: only the common options come back.

Formatuuid
include_archived?boolean

Include archived fields and archived options.

Defaultfalse

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://app.beel.es/api/v1/companies/497f6eca-6276-4993-bfeb-53cbbbba6f08/custom-fields"
{
  "success": true,
  "data": {
    "custom_fields": [
      {
        "id": "7d2f8a40-3c1e-4b6a-9f0d-2e5b8c1a4d77",
        "key": "store",
        "label": "Store",
        "show_on_pdf": true,
        "suggest_values": true,
        "is_archived": false,
        "options": [
          {
            "id": "0b6c1e2f-5a4d-4c3b-8e7f-1a2b3c4d5e6f",
            "value": "Online store",
            "customer_id": null,
            "is_archived": false
          },
          {
            "id": "c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f",
            "value": "Gran Vía 12",
            "customer_id": "4f244735-980b-4d9c-80e8-6331fa0b1958",
            "is_archived": false
          }
        ]
      }
    ]
  },
  "meta": {
    "timestamp": "2025-01-15T10:30:00Z",
    "request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
  }
}
{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "The parameter 'invoice_id' has an invalid type. Expected: UUID.",
    "details": {
      "field": "invoice_id",
      "invalid_value": "deliveries",
      "expected_format": "UUID"
    }
  },
  "meta": {
    "timestamp": "2025-01-15T10:30:00Z",
    "request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
  }
}
{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Authentication is required to access this resource"
  },
  "meta": {
    "timestamp": "2025-01-15T10:30:00Z",
    "request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
  }
}
{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "The provided data is not valid",
    "details": {
      "field": "specific error message"
    }
  },
  "meta": {
    "timestamp": "2025-01-15T10:30:00Z",
    "request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
  },
  "type": "https://docs.beel.es/errors/INVOICE_NO_LINES",
  "title": "INVOICE_NO_LINES",
  "detail": "The invoice must have at least one line",
  "instance": "/v1/invoices/abc-123"
}
{
  "success": false,
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "Too many requests. Please try again in 60 seconds."
  },
  "meta": {
    "timestamp": "2025-01-15T10:30:00Z",
    "request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
  }
}
{
  "success": false,
  "error": {
    "code": "INTERNAL_ERROR",
    "message": "Internal server error"
  },
  "meta": {
    "timestamp": "2025-01-15T10:30:00Z",
    "request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
  }
}
{
  "success": false,
  "error": {
    "code": "UNSUPPORTED_MEDIA_TYPE",
    "message": "Unsupported media type: text/plain. Supported: application/json"
  },
  "meta": {
    "timestamp": "2025-01-15T10:30:00Z",
    "request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
  }
}