Invoice fields



General fields structure


Each invoice object contains a set of different fields.


To acces an invoice object, you need to create a mindee.Client and call the Client.parse_invoice method:


from mindee import Client

# Instantiate your client
mindee_client = Client(invoice_token="your_token_here")

# Call the Mindee invoice endpoint and parse the result
invoice_data = mindee_client.parse_invoice("/path/to/my/file")


Whatever the field type, each of them contains the four following attributes:


  • Value: (Str or Float depending on the field type), corresponds to the field value. Set to None if the field was not extracted.
  • Probability: (Float), confidence score of the field prediction.
  • bbox:(Array[Float]), contains the relative vertices coordinates of the bounding box containing the field in the image. If the field is not written, the bbox is an empty array. 
  • reconstructed: (Bool), True if the field was reconstructed using other fields.


Depending on the Field type, there can be extra attributes.




Total amounts


 Invoice.total_incl: Total amount including taxes

# To get the total amount including taxes value (float), ex: 14.24
total_incl = invoice_data.invoice.total_incl.value


 Invoice.total_excl: Total amount excluding taxes

# To get the total amount excluding taxes value (float), ex: 10.21
total_excl = invoice_data.invoice.total_excl.value


Invoice.total_tax: Total tax value reconstructed from tax lines

# To get the total tax amount value (float), ex: 8.42
total_tax = invoice_data.invoice.total_tax.value





invoice.taxes: Array of Tax fields

Each of the tax field has two extra attributes:


  • code: (String), Optional tax code. (HST, GST... for canadian; City Tax, State tax for US etc..)
  • rate: (Float), Optional tax rate.


# To get the list of taxes
taxes = invoice_data.invoice.taxes

# Loop on each Tax field
for tax in taxes:
   # To get the tax amount
   tax_amount = tax.value

   # To get the tax code for from a tax object
   tax_code = tax.code
   # To get the tax rate
   tax_rate = tax.rate






Each date field comes with an extra attribute:


  • date_object: (Datetime), datetime object from python library



 invoice.invoice_date: Date of issuance of the invoice

# To get the invoice date of issuance (string)
invoice_date = invoice_data.invoice.invoice_date.value


invoice.due_date: Payment due date of the invoice

# To get the invoice due date (string)
due_date = invoice_data.invoice.invoice_date.value




Supplier informations


 Invoice.supplier: Supplier name as written in the invoice (logo or supplier infos

# To get the supplier name
supplier_name = invoice_data.invoice.supplier.value


 Invoice.payment_details: Payment information of the supplier (IBAN only supported yet

# To get the total amount excluding taxes value (float), ex: 10.21
total_excl = invoice_data.invoice.total_excl.value


Invoice.vat_number:  VAT registration number of the supplier

# To get the VAT number of the supplier
vat_number = invoice_data.invoice.vat_number.value


invoice.company_number: National company number (Only SIRET or SIREN supported yet)

Contains an extra attribute:


  • type: (String), Either SIRET or SIREN


# To get the company number value
company_number = invoice_data.invoice.company_number.value

# To get the company number type
company_number_type = invoice_data.invoice.company_number.type




Locale and currency


locale: Language ISO code

Contains an extra attribute:


  • currency: (String), ISO currency code


# To get the total language code
language = invoice_data.invoice.locale.value

# To get the invoice currency code
currency = invoice_data.invoice.locale.currency