Collect payables
Learn how to collect an incoming invoice to start the payable flow.
Overview
There are several ways to collect payables into Monite:
- Create a payable via API by providing the amount, currency, and other details.
- Upload an invoice in PDF, PNG, JPEG, or TIFF formats via API.
- Send an invoice in PDF, PNG, JPEG, or TIFF formats by email to the entity's mailbox.
When a payable is created from a PDF, PNG, JPEG, or TIFF file, Monite's OCR service automatically extracts the invoice information from the file and a new payable is created with the extracted data fields accordingly. The file
property of the payable contains the file metadata and the link to access the original source file.
OCR considerations
- The OCR process is asynchronous and might require several minutes to produce the result. The webhook
ocr_finished
is triggered once the OCR has finished processing the file and storing the extracted data into a payable.- The maximum image file size is 10 MB.
- The maximum email size is 25 MB (including all attachments).
- Files with dimensions smaller than 40x40 px are not considered payables, thus, they are not processed.
- PDF files must have at least one page with dimensions bigger than 40x40 px to be considered a payable, otherwise, they are not processed.
- Multipage PDF and TIFF files can have up to 10 pages.
- Monite's OCR service is not executed if the format of the uploaded document is not supported or the number of pages exceeds 10. Therefore, no invoice information is stored. In this case, only the information about the file is stored.
Create a payable from data
If you already have the invoice data (amount in minor units, currency, vendor information, and other details) stored somewhere as individual attributes, you can create a payable with these attributes by calling POST /payables
.
You can provide the base64-encoded contents of the original invoice file in the field base64_encoded_file
:
curl -X POST 'https://api.sandbox.monite.com/v1/payables' \
-H 'X-Monite-Version: 2023-06-04' \
-H 'X-Monite-Entity-Id: ENTITY_ID' \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-d '{
"currency": "EUR",
"amount": 9900,
"description": "Restock office supplies",
"due_date": "2023-07-15",
"payment_terms": {
"name": "2/10, 1/20, net 30",
"term_1": {
"number_of_days": 10,
"discount": 200
},
"term_2": {
"number_of_days": 20,
"discount": 100
},
"term_final": {
"number_of_days": 30
}
},
"suggested_payment_term": {
"date": "2023-07-25",
"discount": 200
},
"issued_at": "2023-06-15",
"counterpart_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"counterpart_bank_account_id": "ee415e8a-4368-4ef8-b192-d25b8e86ad0f",
"counterpart_address_id": "d0f2899d-e2b1-4b95-8411-2ed1a9063bce",
"counterpart_vat_id_id": "c0d3ca66-bdfa-4cdb-aceb-633d4dfe4f11",
"base64_encoded_file": "... Base64-encoded contents of the invoice file ...",
"file_name": "invoice.pdf",
"tag_ids": [
"ea837e28-509b-4b6a-a600-d54b6aa0b1f5"
],
"document_id": "DE2287",
"subtotal": 9000,
"tax": 1000,
"sender": "[email protected]"
}'
Notes
- The
file_name
field is optional. If omitted, it defaults to"default_file_name"
.- If the settings are configured to automatically set
suggested_payment_term
, this object can be omitted from the request body.
The successful response returns the id
assigned to this payable, along with the information passed in the request. You can use this id
in other API calls to update the data of this payable or trigger status transitions:
{
"partner_metadata": {},
"id": "aa314fdd-a763-4920-a8c8-6285fc1745c0",
"entity_id": "en-your0000-enti-ty00-1D3799b65bcf",
"marked_as_paid_with_comment": null,
"marked_as_paid_by_entity_user_id": null,
"amount_due": 9900,
"amount_paid": 0,
"amount_to_pay": 9900,
"status": "new",
"source_of_payable_data": "user_specified",
"currency": "EUR",
"amount": 9900,
"description": "Restock office supplies",
"due_date": "2023-07-15",
"payment_terms": {
"name": "2/10, 1/20, net 30",
"term_1": {
"number_of_days": 10,
"discount": 200
},
"term_2": {
"number_of_days": 20,
"discount": 100
},
"term_final": {
"number_of_days": 30
}
},
"suggested_payment_term": {
"date": "2023-07-25",
"discount": 200
},
"issued_at": "2022-06-15",
"counterpart_id": "8737964a-5246-47f4-8243-8728a2be1e75",
"counterpart_bank_account_id": "ee415e8a-4368-4ef8-b192-d25b8e86ad0f",
"counterpart_address_id": "d0f2899d-e2b1-4b95-8411-2ed1a9063bce",
"counterpart_vat_id_id": "c0d3ca66-bdfa-4cdb-aceb-633d4dfe4f11",
"counterpart_bank_id": null,
"counterpart_account_id": null,
"counterpart_name": "Acme Inc.",
"counterpart_address": {
"country": "DE",
"city": "Berlin",
"postal_code": "10115",
"state": "BE",
"line1": "Flughafenstrasse 52",
"line2": "Floor 2"
},
"payable_origin": "upload",
"was_created_by_user_id": "e4e422fc-6956-4fdd-b091-920329f8b92e",
"currency_exchange": {
"default_currency_code": "EUR",
"rate": 10.0,
"total": 0
},
"file": {
"id": "2d14935e-505b-4863-a082-b6a340acabbc",
"created_at": "2022-04-05T06:31:31.431Z",
"file_type": "payables",
"name": "file name",
"region": "eu-central-1",
"md5": "623470039566983ed5e5945f769ea873",
"mimetype": "application/pdf",
"url": "https://monite-file-saver-payables-eu-central-1-dev.s3.amazonaws.com/2d14935e.../669bab57c57f.pdf",
"size": 49463,
"previews": [],
"pages": []
},
"tags": [
{
"name": "Marketing",
"id": "ea837e28-509b-4b6a-a600-d54b6aa0b1f5",
"created_at": "2022-09-07T16:35:18.484507+00:00",
"updated_at": "2022-09-07T16:35:18.484507+00:00",
"created_by_entity_user_id": "efe7eedd-89c5-56f5-984c-0712ee41a2eb"
}
],
"created_at": "2022-06-17T06:31:31.431Z",
"updated_at": "2022-06-17T06:31:31.431Z",
"approval_policy_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"document_id": "DE2287",
"subtotal": 9000,
"tax": 1000,
"sender": "[email protected]"
}
Automatic calculation of due date
Automatic calculation of due date
If the values of the fields payment_terms.final_term
and issued_at
are provided in the payable, the due_date
will be automatically calculated based on issued_at
plus the number of days defined by payment_terms.final_term.number_of_days
.
For example, if issued_at
equals to 2023-06-15
and payment_terms.term_final.number_of_days
equals to 10, the due_date
will be automatically set to 2023-06-25
.
In any other case, the due_date
supplied by the user is stored in the payable. The payment_terms
and issued_at
fields have priority in the calculation of the due_date
, even if thedue_date
is supplied by the user.
The automatic calculation of the due_date
happens when the payable is parsed by the OCR, created with data, or updated.
Suggested payment date
Suggested payment date
Once the payable is created, Monite automatically fills the payable's field suggested_payment_term
with a suggestion for the payment date and corresponding discount, if available, based on its payment terms (represented by the field payment_terms
).
It is possible to choose the payment term (term_1
, term_2
, or term_final
) to be suggested as default by setting the field payment_priority
in the entity's settings to one of these values:
-
working_capital: Selects the term with the latest possible payment target.
-
bottom_line: Selects the term with the highest discount.
-
balanced: Selects the intermediate term, that is, a balance between duration and drawn discount.
The suggested_payment_term
will be calculated based on the field issued_at
added by the term_X.number_of_days
. Note that this suggestion does not affect the invoice's due date, which remains the same.
Change the payment priority
To update the payment_priority
of in the entity's settings, call PATCH /entities/{entity_id}/settings
, passing the new payment_priority
in the body:
curl -X PATCH 'https://api.sandbox.monite.com/v1/entities/{entity_id}/settings' \
-H 'X-Monite-Version: 2023-06-04' \
-H 'X-Monite-Entity-Id: ENTITY_ID' \
-H 'Authorization: Bearer YOUR_PARTNER_TOKEN' \
-d '{
"payment_priority": "working_capital"
}'
Attach file
Attach file
You can attach an invoice file to an existing payable, in any status, by calling POST /payables/{payable_id}/attach_file
:
curl -X POST 'https://api.sandbox.monite.com/v1/payables/{payable_id}/attach_file' \
-H 'accept: application/json' \
-H 'X-Monite-Version: 2023-06-04' \
-H 'X-Monite-Entity-Id: ENTITY_ID' \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-H 'Content-Type: multipart/form-data' \
-F '[email protected];type=image/png'
The provided file is then returned in the file field on the Payable object.
{
"partner_metadata": {},
"id": "aa314fdd-a763-4920-a8c8-6285fc1745c0",
"marked_as_paid_with_comment": null,
"marked_as_paid_by_entity_user_id": null,
"amount_due": 9900,
"amount_paid": 0,
"amount_to_pay": 9900,
"entity_id": "en-your0000-enti-ty00-1D3799b65bcf",
"status": "new",
"source_of_payable_data": "user_specified",
"currency": "EUR",
"amount": 9900,
"description": "Restock office supplies",
"due_date": "2022-07-15",
"payable_origin": "upload",
"file": {
"id": "2d14935e-505b-4863-a082-b6a340acabbc",
"created_at": "2022-04-05T06:31:31.431Z",
"file_type": "payables",
"name": "payable",
"region": "eu-central-1",
"md5": "623470039566983ed5e5945f769ea873",
"mimetype": "image/png",
"url": "https://monite-file-saver-payables-eu-central-1-dev.s3.amazonaws.com/2d14935e.../payable.png",
"size": 49463,
"previews": [],
"pages": []
},
"line_items": [
{
"name": "Product name",
"description": "Services , Products & Goods",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"quantity": 1.22,
"unit_price": 1200,
"total": 1200,
"tax": 1250,
"subtotal": 1200,
"ledger_account_id": "7df884fd-8be8-4eba-b6ff-417b66efe033",
"tax_account_id": "dd13735f-ef3a-4312-8c37-835d70341375",
"was_created_by_user_id": "ea837e28-509b-4b6a-a600-d54b6aa0b1f5"
}
],
...
}
Notes
- The uploaded file is stored only for reference purposes.
- The file is not processed by the OCR or validated, therefore, the users need to ensure that the information in the file is correct.
- If the payable already has a file attached, an error is returned when trying to attach another one.
Upload files via API
You can upload invoices in the PDF, PNG, or JPG format to Monite by calling POST /payables/upload_from_file
. The maximum file size is 10 MB:
curl -X POST 'https://api.sandbox.monite.com/v1/payables/upload_from_file' \
-H 'X-Monite-Version: 2023-06-04' \
-H 'X-Monite-Entity-Id: ENTITY_ID' \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-H 'Content-Type: multipart/form-data' \
-F '[email protected];type=application/pdf'
In return, you receive back the 201 Created
response with id
and other parameters:
{
"partner_metadata": {},
"id": "61257ac9-ef71-4977-9e40-c9e027c7d539",
"entity_id": "9d2b4c8f-2087-4738-ba91-7359683c49a4",
"marked_as_paid_with_comment": null,
"marked_as_paid_by_entity_user_id": null,
"amount_due": 9900,
"amount_paid": 0,
"amount_to_pay": 9900,
"status": "draft",
"source_of_payable_data": "ocr",
"currency": "EUR",
"amount": 9900,
"description": null,
"due_date": null,
"payment_terms": null,
"suggested_payment_term": null,
"issued_at": null,
"counterpart_bank_account_id": "ee415e8a-4368-4ef8-b192-d25b8e86ad0f",
"counterpart_address_id": "d0f2899d-e2b1-4b95-8411-2ed1a9063bce",
"counterpart_vat_id_id": "c0d3ca66-bdfa-4cdb-aceb-633d4dfe4f11",
"counterpart_bank_id": null,
"counterpart_id": null,
"counterpart_account_id": null,
"counterpart_name": null,
"counterpart_tax_id": null,
"counterpart_address": null,
"payable_origin": "upload",
"was_created_by_user_id": null,
"currency_exchange": null,
"file": {
"id": "eac016c4-e06e-4cea-8ebf-3ec72dc8b49d",
"created_at": "2023-03-20T18:24:24.808836+00:00",
"file_type": "payables",
"name": "8d545f97-bcb3-4dfc-8ccf-1aa62d887781",
"region": "eu-central-1",
"md5": "89746feb534f35364e6760e2d834fe19",
"mimetype": "application/pdf",
"url": "https://monite-file-saver-payables-eu-central-1-dev.s3.amazonaws.com/2d14935e.../669bab57c57f.pdf",
"size": 18095,
"previews": [],
"pages": []
},
"tags": null,
"created_at": "2023-03-22T08:09:06.650657+00:00",
"updated_at": "2023-03-22T08:09:06.650669+00:00",
"other_extracted_data": {
"total":52649,
"currency":"EUR",
"line_items":[
{
"unit":"items",
"quantity":0.25,
"unit_price":38500,
"description":"Open Space - monthly rent",
"total_excl_vat":9625,
"vat_percentage":1900,
"line_item_ocr_id":"65391e037952904f8af4dbb2_0_cb9bdddf14bd17bf789a24f9d99a94bf"
},
{
"unit":"m",
"quantity":1.0,
"unit_price":38500,
"description":"Open Space - extra requests",
"total_excl_vat":38500,
"vat_percentage":700,
"line_item_ocr_id":"65391e037952904f8af4dbb2_1_3332ec854a09518fccd73598795147e7"
}
],
"document_id":"202008476",
"tax_payer_id":"DE 302071443",
"payment_terms":null,
"counterpart_name":"Mindspace Germany GmbH",
"document_due_date":"2021-02-01",
"counterpart_address":null,
"counterpart_account_id":"DE 57550104000595963377",
"document_issued_at_date":"2021-02-01",
"counterpart_address_object":{
"city":"Berlin",
"line1":"Wittestr . 30 , Haus F",
"line2":null,
"state":null,
"country":null,
"postal_code":"13509",
"original_country_name":null
}
},
"approval_policy_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"document_id": null,
"subtotal": null,
"tax": null,
"sender": null,
"line_items": [..],
"ocr_request_id": "d31562e6-8e7d-4dbd-ba53-a8a62b6c2a62"
}
You will also receive a webhook indicating that this payable resource has been created:
{
"object_id": "aa314fdd-a763-4920-a8c8-6285fc1745c0",
"entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"object_type": "payable",
"action": "payable.created_from_file_upload",
"name": "Action has been performed on the invoice: created_from_file_upload."
}
Note that at this stage the payable resource is incomplete and waiting for the results of the OCR service, which automatically scans the details from the uploaded invoice and maps the information from the invoice to the corresponding data field in the system.
When the OCR scanning is finished (this might take up to 5-7 minutes), you will receive the payable.ocr_finished
webhook event:
{
"object_id": "aa314fdd-a763-4920-a8c8-6285fc1745c0",
"entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"object_type": "payable",
"action": "payable.ocr_finished",
"name": "Action has been performed on the invoice: ocr_finished."
}
Now, you can call GET /payables/{payable_id}
to retrieve the results of the OCR scanning:
{
"partner_metadata": {},
"id": "aa314fdd-a763-4920-a8c8-6285fc1745c0",
"entity_id": "en-your0000-enti-ty00-1D3799b65bcf",
"marked_as_paid_with_comment": null,
"marked_as_paid_by_entity_user_id": null,
"amount_due": 9900,
"amount_paid": 0,
"amount_to_pay": 9900,
"status": "new",
"source_of_payable_data": "ocr",
"currency": "EUR",
"amount": 9900,
"description": "",
"due_date": "2023-07-15",
"payment_terms": {
"name": "2/10, 1/20, net 30",
"term_1": {
"number_of_days": 10,
"discount": 200
},
"term_2": {
"number_of_days": 20,
"discount": 100
},
"term_final": {
"number_of_days": 30
}
},
"suggested_payment_term": {
"date": "2023-07-25",
"discount": 200
},
"issued_at": "2023-06-15",
"counterpart_bank_account_id": "ee415e8a-4368-4ef8-b192-d25b8e86ad0f",
"counterpart_address_id": "d0f2899d-e2b1-4b95-8411-2ed1a9063bce",
"counterpart_vat_id_id": "c0d3ca66-bdfa-4cdb-aceb-633d4dfe4f11",
"counterpart_bank_id": "DEUTDE2HXXX",
"counterpart_id": "8737964a-5246-47f4-8243-8728a2be1e75",
"counterpart_account_id": "123456789012",
"counterpart_name": "Acme Inc.",
"counterpart_address": {
"country": "DE",
"city": "Berlin",
"postal_code": "10115",
"state": "BE",
"line1": "Flughafenstrasse 52",
"line2": "Floor 2"
},
"payable_origin": "upload",
"was_created_by_user_id": "e4e422fc-6956-4fdd-b091-920329f8b92e",
"currency_exchange": null,
"file": {
"id": "2d14935e-505b-4863-a082-b6a340acabbc",
"created_at": "2022-04-05T06:31:31.431Z",
"file_type": "payables",
"name": "invoice-example.pdf",
"region": "eu-central-1",
"md5": "623470039566983ed5e5945f769ea873",
"mimetype": "application/pdf",
"url": "https://monite-file-saver-payables-eu-central-1-dev.s3.amazonaws.com/2d14935e.../669bab57c57f.pdf",
"size": 49463,
"previews": [],
"pages": [
{
"id": "ad712600-bab8-4e0d-9da7-5d561484f1b1",
"mimetype": "image/png",
"size": 219712,
"number": 0,
"url": "https://monite-payables.com/1a95c387.../ac02c56d2a3d.png"
}
]
},
"tags": [],
"created_at": "2022-04-05T06:31:31.431Z",
"updated_at": "2022-04-05T06:31:31.431Z",
"other_extracted_data": {
"total":52649,
"currency":"EUR",
"line_items":[
{
"unit":"items",
"quantity":0.25,
"unit_price":38500,
"description":"Open Space - monthly rent",
"total_excl_vat":9625,
"vat_percentage":1900,
"line_item_ocr_id":"65391e037952904f8af4dbb2_0_cb9bdddf14bd17bf789a24f9d99a94bf"
},
{
"unit":"m",
"quantity":1.0,
"unit_price":38500,
"description":"Open Space - extra requests",
"total_excl_vat":38500,
"vat_percentage":700,
"line_item_ocr_id":"65391e037952904f8af4dbb2_1_3332ec854a09518fccd73598795147e7"
}
],
"document_id":"202008476",
"tax_payer_id":"DE 302071443",
"payment_terms":null,
"counterpart_name":"Mindspace Germany GmbH",
"document_due_date":"2021-02-01",
"counterpart_address":null,
"counterpart_account_id":"DE 57550104000595963377",
"document_issued_at_date":"2021-02-01",
"counterpart_address_object":{
"city":"Berlin",
"line1":"Flughafenstrasse 52",
"line2":null,
"state":"BE",
"country":"DE",
"postal_code":"10115",
"original_country_name":null
}
},
"approval_policy_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"document_id": "DE2287",
"subtotal": 9000,
"tax": 1000,
"sender": "[email protected]",
"line_items": []
}
The other_extracted_data
field in the response contains individual text labels and values extracted by OCR.
You can use this data to review and double-check the recognized text, but keep in mind that the structure of this object can change or even be null depending on the OCR results and various types of invoices:
"other_extracted_data": {
"total":52649,
"currency":"EUR",
"line_items":[
{
"unit":"items",
"quantity":0.25,
"unit_price":38500,
"description":"Open Space - monthly rent",
"total_excl_vat":9625,
"vat_percentage":1900,
"line_item_ocr_id":"65391e037952904f8af4dbb2_0_cb9bdddf14bd17bf789a24f9d99a94bf"
},
{
"unit":"m",
"quantity":1.0,
"unit_price":38500,
"description":"Open Space - extra requests",
"total_excl_vat":38500,
"vat_percentage":700,
"line_item_ocr_id":"65391e037952904f8af4dbb2_1_3332ec854a09518fccd73598795147e7"
}
],
"document_id":"202008476",
"tax_payer_id":"DE 302071443",
"payment_terms":null,
"counterpart_name":"Mindspace Germany GmbH",
"document_due_date":"2021-02-01",
"counterpart_address":null,
"counterpart_account_id":"DE 57550104000595963377",
"document_issued_at_date":"2021-02-01",
"counterpart_address_object":{
"city":"Berlin",
"line1":"Flughafenstrasse 52",
"line2":null,
"state":"BE",
"country":"DE",
"postal_code":"10115",
"original_country_name":null
}
}
Send payables by email
Each entity has a dedicated mailbox in Monite to which the payables can be sent. The entity or entity user can send invoices as attachments in PDF, PNG, JPEG, or TIFF format to this mailbox (the maximum file size is 10 MB).
The Monite OCR service scans the information inside each email's attachments. Then, Monite automatically creates a draft payable invoice for each occurrence found. The email of the sender of these files is saved in the field sender
of the invoice.
To find the mailbox assigned to a specific entity, call GET /v1/mailboxes
:
curl -X GET 'https://api.sandbox.monite.com/v1/mailboxes' \
-H 'X-Monite-Version: 2023-06-04' \
-H 'X-Monite-Entity-Id: ENTITY_ID' \
-H 'Authorization: Bearer YOUR_PARTNER_TOKEN'
The successful response contains information about the mailbox:
[
{
"id": "e8c884f8-bed3-4d92-afc9-3538c5079014",
"entity_id": "68fdd6b5-b60c-4f4d-8642-1cd7f2fa31e8",
"status": "active",
"related_object_type": "payable",
"mailbox_name": "1102737648192968373_payables",
"mailbox_full_address": "[email protected]",
"belongs_to_mailbox_domain_id": null
}
]
By default, the automatically created mailboxes belong to the Monite domain (the web address that comes after
@
in an email address), but the partners can set up their own email domain for better convenience.
View all payables
List all payables
It is possible to view all the payables in the Monite space. To allow the right level of access to the authorized users, Monite allows certain entity users to view them but not change uploads.
To list all payables, call GET /payables
. You can sort and filter the results by the amount, status, and other fields. For the full list of available sort and filter parameters, see the GET /payables
endpoint.
Some examples:
GET /payables?counterpart_name=Acme%20Inc.
- get all payables issued to Acme Inc.GET /payables?amount__gte=15000
- get all payables where the total amount is 150$ or more.GET /payables?status__in=draft&status__in=new
- get alldraft
andnew
payables.GET /payables?created_at__gte=2022-01-01T00%3A00%3A00
- get all payables created on or after January 1, 2022.
Sample request to fetch 100 payables:
curl -X GET 'https://api.sandbox.monite.com/v1/payables?order=asc&limit=100' \
-H 'X-Monite-Version: 2023-06-04' \
-H 'X-Monite-Entity-Id: ENTITY_ID' \
-H 'Authorization: Bearer ACCESS_TOKEN'
The successful response returns a paged series of all payables that the entity has access to. For example:
{
"data": [
{
"partner_metadata": {},
"id": "aa314fdd-a763-4920-a8c8-6285fc1745c0",
"entity_id": "b0ff50d0-cdea-42fd-9461-1b3799b65bcf",
"marked_as_paid_with_comment": null,
"marked_as_paid_by_entity_user_id": null,
"status": "new",
"source_of_payable_data": "ocr",
"currency": "EUR",
"amount": 9900,
"description": null,
"due_date": "2022-06-30",
...,
}
],
"prev_pagination_token": null,
"next_pagination_token": "bGltaXQ9MiZmaXJzdF9vaWQ9MSZuZXh0X3Rva2VuPTQ="
}
The prev_pagination_token
and next_pagination_token
fields in the response are pagination tokens.
Retrieve a payable
Retrieve a payable
Once a payable is uploaded, the entity and entity users can review the information extracted from the payable by the OCR system.
To retrieve a payable, call GET /payables/{payable_id}
:
curl -X GET 'https://api.sandbox.monite.com/v1/payables/{payable_id}' \
-H 'X-Monite-Version: 2023-06-04' \
-H 'X-Monite-Entity-Id: ENTITY_ID' \
-H 'Authorization: Bearer ACCESS_TOKEN'
The successful response contains the payable attributes:
{
"partner_metadata": {},
"id": "aa314fdd-a763-4920-a8c8-6285fc1745c0",
"entity_id": "b0ff50d0-cdea-42fd-9461-1b3799b65bcf",
"marked_as_paid_with_comment": null,
"marked_as_paid_by_entity_user_id": null,
"amount_due": 9900,
"amount_paid": 0,
"amount_to_pay": 9900,
"status": "new",
"amount": 9900,
"source_of_payable_data": "ocr",
"currency": "EUR",
"description": null,
"due_date": "2023-07-15",
"payment_terms": {
"name": "2/10, 1/20, net 30",
"term_1": {
"number_of_days": 10,
"discount": 200
},
"term_2": {
"number_of_days": 20,
"discount": 100
},
"term_final": {
"number_of_days": 30
}
},
"suggested_payment_term": {
"date": "2023-07-25",
"discount": 200
},
"issued_at": "2023-06-15",
"counterpart_bank_id": "DEUTDE2HXXX",
"counterpart_id": "8737964a-5246-47f4-8243-8728a2be1e75",
"counterpart_bank_account_id": "ee415e8a-4368-4ef8-b192-d25b8e86ad0f",
"counterpart_address_id": "d0f2899d-e2b1-4b95-8411-2ed1a9063bce",
"counterpart_vat_id_id": "c0d3ca66-bdfa-4cdb-aceb-633d4dfe4f11",
"counterpart_account_id": "123456789012",
"counterpart_name": "Acme Inc.",
"counterpart_address": {
"country": "DE",
"city": "Berlin",
"postal_code": "10115",
"state": "BE",
"line1": "Flughafenstrasse 52",
"line2": "Floor 2"
},
"payable_origin": "upload",
"was_created_by_user_id": "e4e422fc-6956-4fdd-b091-920329f8b92e",
"currency_exchange": {
"default_currency_code": "EUR",
"rate": 10.0,
"total": 0
},
"file": {
"id": "2d14935e-505b-4863-a082-b6a340acabbc",
"created_at": "2021-11-25T05:10:35.211432+00:00",
"file_type": "payables",
"name": "file name",
"region": "eu-central-1",
"md5": "623470039566983ed5e5945f769ea873",
"mimetype": "image/png",
"url": "https://monite-payables.com/2d14935e.../669bab57c57f.png",
"size": 49463,
"previews": [],
"pages": []
},
"tags": [
{
"name": "Marketing",
"id": "ea837e28-509b-4b6a-a600-d54b6aa0b1f5",
"created_at": "2022-09-07T16:35:18.484507+00:00",
"updated_at": "2022-09-07T16:35:18.484507+00:00",
"created_by_entity_user_id": "ea837e28-509b-4b6a-a600-d54b6aa0b1f5"
}
],
"created_at": "2021-11-25T05:10:35.211432+00:00",
"updated_at": "2021-11-25T05:10:35.211447+00:00",
"other_extracted_data": {
"total":52649,
"currency":"EUR",
"line_items":[
{
"unit":"items",
"quantity":0.25,
"unit_price":38500,
"description":"Open Space - monthly rent",
"total_excl_vat":9625,
"vat_percentage":1900,
"line_item_ocr_id":"65391e037952904f8af4dbb2_0_cb9bdddf14bd17bf789a24f9d99a94bf"
},
{
"unit":"m",
"quantity":1.0,
"unit_price":38500,
"description":"Open Space - extra requests",
"total_excl_vat":38500,
"vat_percentage":700,
"line_item_ocr_id":"65391e037952904f8af4dbb2_1_3332ec854a09518fccd73598795147e7"
}
],
"document_id":"202008476",
"tax_payer_id":"DE 302071443",
"payment_terms":null,
"counterpart_name":"Mindspace Germany GmbH",
"document_due_date":"2021-02-01",
"counterpart_address":null,
"counterpart_account_id":"DE 57550104000595963377",
"document_issued_at_date":"2021-02-01",
"counterpart_address_object":{
"city":"Berlin",
"line1":"Flughafenstrasse 52",
"line2":null,
"state":"BE",
"country":"DE",
"postal_code":"10115",
"original_country_name":null
}
},
"approval_policy_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"document_id": "DE2287",
"subtotal": 9000,
"tax": 1000,
"sender": "[email protected]",
"line_items": []
}
Update a payable
Update a payable
Payables in the draft
and new
statuses can be updated, for example, to provide additional details or fix the information extracted by OCR. To update a payable, call PATCH /payables/{payable_id}
with the request body containing the new field values. For example, to update the amount
and due_date
:
curl -X PATCH 'https://api.sandbox.monite.com/v1/payables/{payable_id}' \
-H 'X-Monite-Version: 2023-06-04' \
-H 'X-Monite-Entity-Id: ENTITY_ID' \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"amount": 19000,
"due_date": "2023-07-12"
}'
Updated 21 days ago