Saltar al contenido principal
POST
/
api
/
v1
/
invoices
/
upload-invoice
Upload, scan & save an invoice
curl --request POST \
  --url https://www.manglai.io/api/v1/invoices/upload-invoice \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form invoice='@example-file'
{
  "status": "ok",
  "invoice": {}
}

Autorizaciones

Authorization
string
header
requerido

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Parámetros de consulta

id
string

Unique identifier of the invoice.

companyId
string
requerido

Company associated with the invoice. If the ai found a best match company, this will be ignored.

buildingId
string

Used to associate the invoice with a building by default if the invoice does not contain it or ai cannot extract it. If the ai found a best match building, this will be ignored.

externalId
string

External identifier for the invoice (optional).

model
string

Model used for processing (optional).

documentType
string

Type of document (optional).

prompt
string

Prompt for processing (optional).

Cuerpo

multipart/form-data
invoice
file
requerido

Invoice file to be uploaded and scanned.

Respuesta

Invoice successfully uploaded, scanned, and stored.

status
string
Ejemplo:

"ok"

invoice
object

The invoice object