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
Name | Type | Description |
---|---|---|
userId* | Integer or "me" | ID of the related user. |
Query Parameters
Name | Type | Description |
---|---|---|
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
Get a document
GET
https://{domain}.biapi/pro/2.0/documents/{documentId}
Get a single document by ID.
Path Parameters
Name | Type | Description |
---|---|---|
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
Name | Type | Description |
---|---|---|
documentId* | Integer | ID of the document. |
Request Body
Name | Type | Description |
---|---|---|
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
Property | Type | Description |
---|---|---|
| Array of Document objects | List of documents. |
| Date | Minimum available date for results. |
| Date | Maximum available date for results. |
| Date | Minimum date of results in the current response. |
| Date | Maximum date of results in the current response. |
Document object
Property | Type | Description |
---|---|---|
| Integer | ID of the document. |
| Integer | ID of the related user. |
| Integer or null | ID of the related subscription. |
| Integer or null | ID of the related document type. |
| Integer or null | ID of the related file. |
| Integer or null | ID of the related thumbnail. |
| String or null | |
| DateTime or null | |
| DateTime | The moment when this document has been created. |
| String or null | |
| String or null | |
| Date or null | |
| Decimal or null | |
| Decimal or null | |
| Decimal or null | |
| Boolean or null | |
| Boolean | |
| String or null | |
| String or null | |
| DateTime or null | |
| Boolean | Whether the file is available on website. |
| Currency or null | Document currency. |
Last updated