GetbeelDocs
API referenceAutofatture

Send an autofattura to SDI

Sends a generated autofattura to SDI, exactly like the Send to SDI button: the XML must be generated, and the send is paid from the prepaid balance at the SDI send price (402 insufficient_balance when it does not cover it). It is queued and returns the autofattura with sdi.status = queued; read it again for the SDI answer. Safe to repeat: a second call never sends or charges again (409 autofattura_already_queued or autofattura_already_sent). A corrected resend after an SDI rejection is not charged again. Live keys only.

POST
/autofatture/{id}/send

Sends a generated autofattura to SDI, exactly like the Send to SDI button: the XML must be generated, and the send is paid from the prepaid balance at the SDI send price (402 insufficient_balance when it does not cover it). It is queued and returns the autofattura with sdi.status = queued; read it again for the SDI answer. Safe to repeat: a second call never sends or charges again (409 autofattura_already_queued or autofattura_already_sent). A corrected resend after an SDI rejection is not charged again. Live keys only.

Authorization

apiKey
headerAuthorizationBearer <token>

API key: gb_test_… or gb_live_…

Path Parameters

id*string

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

Response Body

OK

application/json
  1. response
id*string
object*string
date*string

Date of the purchase (bank debit or document)

supplier*string|null
supplier_country*|

IdPaese of the foreign supplier

supplier_invoice_number*string|null
amount*string

Amount of the purchase, as a decimal string

currency*string
tipo_documento*|

TD17, TD18 or TD19 (reverse charge)

numero*|

Number of the autofattura

status*string

not_created, queued, processing, generated (XML ready), error, needs_country

xml_ready*boolean
sdi*
Example Request
curl -X POST 'https://www.getbeel.com/api/v1/autofatture/string/send'
Example Response
{  "id": "string",  "object": "autofattura",  "date": "string",  "supplier": "string",  "supplier_country": "string",  "supplier_invoice_number": "string",  "amount": "string",  "currency": "string",  "tipo_documento": "string",  "numero": "string",  "status": "string",  "xml_ready": true,  "sdi": {    "status": "string",    "id": "string",    "error": "string",    "updated_at": "string"  }}