Get a VAT book import
curl --request GET \
--url https://api.melso.ai/v1/companies/{company_id}/book-imports/{import_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.melso.ai/v1/companies/{company_id}/book-imports/{import_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.melso.ai/v1/companies/{company_id}/book-imports/{import_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"book": "received",
"rows": 123,
"created": [
{
"row": 123,
"invoice_number": "<string>",
"expense_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"income_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"skipped": [
{
"row": 123,
"invoice_number": "<string>",
"expense_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"income_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reason": "duplicate"
}
],
"refused": [
{
"row": 123,
"code": "<string>",
"reason": "<string>",
"invoice_number": "<string>"
}
],
"created_at": "2023-11-07T05:31:56Z",
"period": {
"from": "2023-12-25",
"to": "2023-12-25"
}
}{
"error": "The API key is missing, revoked or invalid",
"code": "invalid_api_key",
"request_id": "req_8f14e45fceea167a5a36dedd"
}{
"error": "invoices is not available in this company",
"code": "tool_unavailable",
"next_action": "check_company_and_access",
"request_id": "req_8f14e45fceea167a5a36dedd"
}{
"error": "invoice not found",
"code": "not_found",
"next_action": "refresh_record",
"request_id": "req_8f14e45fceea167a5a36dedd"
}{
"error": "Too many requests: a key makes at most 600 a minute",
"code": "rate_limited",
"request_id": "req_8f14e45fceea167a5a36dedd"
}VAT book imports
Get a VAT book import
Returns a VAT book import, with each invoice created, skipped or refused.
GET
/
companies
/
{company_id}
/
book-imports
/
{import_id}
Get a VAT book import
curl --request GET \
--url https://api.melso.ai/v1/companies/{company_id}/book-imports/{import_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.melso.ai/v1/companies/{company_id}/book-imports/{import_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.melso.ai/v1/companies/{company_id}/book-imports/{import_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"book": "received",
"rows": 123,
"created": [
{
"row": 123,
"invoice_number": "<string>",
"expense_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"income_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"skipped": [
{
"row": 123,
"invoice_number": "<string>",
"expense_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"income_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reason": "duplicate"
}
],
"refused": [
{
"row": 123,
"code": "<string>",
"reason": "<string>",
"invoice_number": "<string>"
}
],
"created_at": "2023-11-07T05:31:56Z",
"period": {
"from": "2023-12-25",
"to": "2023-12-25"
}
}{
"error": "The API key is missing, revoked or invalid",
"code": "invalid_api_key",
"request_id": "req_8f14e45fceea167a5a36dedd"
}{
"error": "invoices is not available in this company",
"code": "tool_unavailable",
"next_action": "check_company_and_access",
"request_id": "req_8f14e45fceea167a5a36dedd"
}{
"error": "invoice not found",
"code": "not_found",
"next_action": "refresh_record",
"request_id": "req_8f14e45fceea167a5a36dedd"
}{
"error": "Too many requests: a key makes at most 600 a minute",
"code": "rate_limited",
"request_id": "req_8f14e45fceea167a5a36dedd"
}Beta. Melso does not serve this operation yet, and its fields can still change. See what is live.
books:read.Authorizations
companyApiKeypartnerApiKey
A company API key, mk_live_…, that the company's owner creates in the
Melso app under Settings, Connect your AI, API keys. It works in that
one company with the owner's authority. Test keys (mk_test_…) are not
issued. Keep the key on your servers. See
Authentication.
Path Parameters
Response
The import.