Documents

API endpoints

Authentication: endpoints listed in this page require header authentication with a user token.

List documents

GET https://{domain}.biapi/pro/2.0/users/{userId}/documents

List documents associated with a user.

Path Parameters

NameTypeDescription

userId*

Integer or "me"

ID of the related user.

Query Parameters

NameTypeDescription

id_type

Integer

Filter with a document type.

min_amount

Decimal

Minimal (inclusive) amount.

max_amount

Decimal

Maximum (inclusive) amount.

limit*

Integer

Number of documents to return. The maximum value is 1000.

Response body: DocumentsList object

FIltering route aliases:
/users/{userId}/subscriptions/{subscriptionId}/documents
/users/{userId}/connections/{connectionId}/documents
/users/{userId}/transactions/{transactionId}/documents

Get a document

GET https://{domain}.biapi/pro/2.0/documents/{documentId}

Get a single document by ID.

Path Parameters

NameTypeDescription

documentId*

Integer or "me"

ID of the document.

Response body: Document object

Document resources support update operations to edit metadata:

Update a document

POST https://{domain}.biapi/pro/2.0/documents/{documentId}

Update a single document by ID.

Path Parameters

NameTypeDescription

documentId*

Integer

ID of the document.

Request Body

NameTypeDescription

id_type

Integer

New type of the document.

date

Date

New date of the document.

duedate

Date

New due date of the document.

total_amount

Decimal

New total amount of the document.

untaxed_amount

Decimal

New untaxed amount of the document.

vat

Decimal

New VAT amount of the document.

income

Boolean

Is an income or an outcome.

name

String

New name of the document.

Response body: Document object

Data model

DocumentsList object

PropertyTypeDescription

documents

Array of Document objects

List of documents.

first_date

Date

Minimum available date for results.

last_date

Date

Maximum available date for results.

result_min_date

Date

Minimum date of results in the current response.

result_max_date

Date

Maximum date of results in the current response.

Document object

PropertyTypeDescription

id

Integer

ID of the document.

id_user

Integer

ID of the related user.

id_subscription

Integer or null

ID of the related subscription.

id_type

Integer or null

ID of the related document type.

id_file

Integer or null

ID of the related file.

id_thumbnail

Integer or null

ID of the related thumbnail.

name

String or null

date

DateTime or null

timestamp

DateTime

The moment when this document has been created.

thumb_url

String or null

url

String or null

duedate

Date or null

total_amount

Decimal or null

untaxed_amount

Decimal or null

vat

Decimal or null

income

Boolean or null

readonly

Boolean

number

String or null

issuer

String or null

last_update

DateTime or null

has_file_on_website

Boolean

Whether the file is available on website.

currency

Currency or null

Document currency.

Last updated