General Information

πŸ“„ About data models

fetchdocs uses data models to structure meta-data of documents. A data model is a set of attributes that describes the document and depends on the document type. Attributes without a value are provided with null.

The following data models are currently supported:

Data Model Document Type Key
Credit Note credit_note
Delivery Note delivery_note
Invoice invoice
Offer offer
Order Confirmation order_confirmation
Other other
Receipt receipt
Settlement Note settlement_note

ℹ️ Need more data models or attributes?

fetchdocs is constantly improving the data models. If you need a specific data model or attribute, please contact the fetchdocs support team. They're happy to assist you.

πŸ“¦ Shared attributes

Some of the data models share certain attributes. The following overview describes the shared attributes.

πŸ“€ Sending / receiving party (PartyData)

The sending party is the party that sends the document. This can be the supplier, the customer, or the company itself. In most cases, fetchdocs provides the sending party for incoming documents.

Attribute Type Description
company_name string The company name.
address Address The address. For the full data structure see below.
address_string string The address as a string. This is a concatenation of the address lines, postal code, city, and country.
external_id string The external ID used to identify the contact in the source system.
bank_details BankDetails The bank details. For the full data structure see below.
vat_id string The VAT ID.
tax_number string The tax number.

Example:

JSON
{ "company_name": "Example Company", "address": { "address_line1": "123 Main St", "address_line2": "Suite 456", "address_line3": null, "postal_code": "12345", "city": "Springfield", "country": "US" }, "address_string": "123 Main St, Suite 456, 12345 Springfield, US", "external_id": "ext-12345", "bank_details": { "name": "Example Bank", "country": "US", "bank_identification_number": "12345678", "account_number": "87654321", "iban": null, "bic": null }, "vat_id": null, "tax_number": null }

🧾 VAT

The vat attribute is used to represent VAT rates and amounts for a document. Some integrations provide multiple VAT rates. It is an array of VatItems, each with the following structure:

Attribute Type Description
vat_rate float The VAT rate in percent (for example 19.00 for 19%).
vat_amount float The VAT amount. Money object with amount/currency.
net_amount float The net amount (excluding VAT).
gross_amount float The gross amount (including VAT).

Example:

JSON
[ { "vat_rate": 19.00, "vat_amount": 28.50, "net_amount": 150.00, "gross_amount": 178.50 } ]

🏒 Address

The address object stores the address of a Party. The address object has the following attributes:

Attribute Type Description
address_line1 string The first address line. Mostly this is the street and number.
address_line2 string The second address line.
address_line3 string The third address line. Not all target applications do support this.
postal_code string The postal code of the address. Also known as ZIP code.
city string The city of the address.
country string The country of the address. As ISO 3166 code, for example DE.

ℹ️ Note: Sometimes the address is also provided as a string in the address_string attribute, which can be a concatenation of the address lines, postal code, city, and country. This is only filled if an integration provides the address as a string and not as a detailed object. It can be split into the individual address lines by the receiving platform if needed.

Example:

JSON
{ "address_line1": "Main Street 123", "address_line2": "Suite 456", "address_line3": null, "postal_code": "12345", "city": "Springfield", "country": "US" }

🏦 Bank details

The bank details object stores the bank details of a Party. It has the following attributes:

Attribute Type Description
name string The name of the bank.
country string The country of the bank. As ISO 3166 code, for example DE.
bank_identification_number string The bank identification number (BLZ / Bank Code).
account_number string The account number.
iban string The IBAN of the account.
bic string The BIC of the account.

Example:

JSON
{ "name": "Bank Name", "country": "DE", "bank_identification_number": "12345678", "account_number": "87654321", "iban": "DE89370400440532013000", "bic": "COBADEFFXXX" }

πŸ’° Payment methods

Data models that support the payment_method attribute provide the following payment methods as string values:

Payment Method Description
unknown The payment method isn't known.
bank_transfer The document uses bank transfer.
cash The document uses payment method cash.
prepaid The document uses prepaid.
credit_card The document uses payment method credit card.
paypal The document uses PayPal.
amazon_pay The document uses Amazon Pay.
wire_transfer The document uses wire transfer.
direct_debit The document uses direct debit.
check The document uses check.
voucher The document uses a voucher to pay it.
crypto_currency The document uses crypto currency.
prepaid_card The document uses a prepaid card.
offsetting The document uses offsetting.

πŸ›Ÿ Need help?

If you need help or want to receive additional attributes, please contact the fetchdocs support team. They're happy to assist you.