Cancel the fiscal representation
Scopecompanies:writeDeprecated predecessor of DELETE /v1/companies/{company_id}/representation. It cancels
the same representation, but answers 200 with a body where the canonical route answers
204.
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
Account that owns the NIF. The pair must be coherent, and which answer you get depends on how far you reach: an {account_id} you do not reach answers 403 before the NIF is even looked at (the same answer an account that does not exist gets); a {company_id} you do not reach, or reach at a level that does not allow the operation — the usual case on writes, since the level checked is the one you hold over the {account_id} of the path — answers 403 too; and only a {company_id} you do reach but that hangs from a different account answers 404, so the existence of a NIF in another account is never disclosed.
uuiduuidResponse Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X DELETE "https://app.beel.es/api/v1/accounts/497f6eca-6276-4993-bfeb-53cbbbba6f08/companies/497f6eca-6276-4993-bfeb-53cbbbba6f08/representation/cancel"{
"success": true,
"data": {
"status": "string",
"message": "string"
},
"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": "La factura debe tener al menos una línea",
"instance": "/v1/invoices/abc-123"
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
},
"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"
}
}Download the representation document GET
Deprecated alias of `GET /v1/companies/{company_id}/representation/document`, with identical behaviour.
Open an authorization to connect a payment provider POST
Opens an authorization session so the holder of a NIF (company) your account **manages** can connect a payment provider (`stripe`), and returns the `authorization_url` where they authorize it. - **`return_url`:** once the holder authorizes, BeeL's callback finalizes the connection and redirects back to the `return_url` of your portal, if you supplied one, with the parameters described under `return_url`. - **When the connection appears:** it is created only when the holder authorizes, so it does not appear in `GET /v1/companies/{company_id}/payment-connections` until then. It is sealed under the NIF in the path, so auto-invoicing issues under that NIF. - **The NIF must be activated in the mode of your API key** (`beel_sk_test_*` → Test, `beel_sk_live_*` → Live); otherwise the request answers `400` `COMPANY_NOT_ACTIVATED_IN_ENVIRONMENT` and no `authorization_url` is issued, because without activation there is no invoice series or tax configuration to invoice with. Test and Live activations are independent — a NIF activated in one mode still needs activating in the other.