List cases
curl --request GET \
--url https://api.melso.ai/v1/companies/{company_id}/cases \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.melso.ai/v1/companies/{company_id}/cases"
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}/cases', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "modelo",
"status": "draft",
"created_at": "2023-11-07T05:31:56Z",
"deadline": "2023-12-25",
"current_version": 123,
"approved_version": 123,
"payment_url": "<string>",
"information_request": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"items": [
{
"id": "<string>",
"kind": "document",
"label": "<string>"
}
]
},
"messages": [
{
"author": "company",
"content": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
],
"documents": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"content_type": "<string>",
"size_bytes": 123,
"url": "<string>"
}
],
"external_reference": "<string>",
"completed_on": "2023-12-25",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"next_cursor": "<string>"
}{
"error": "invalid token",
"code": "unauthorized",
"request_id": "req_01JAB3K9X2"
}{
"error": "invoice not found",
"code": "not_found",
"request_id": "req_01JAB3K9X2"
}Cases
List cases
Lists the company’s cases, newest first, with their status, deadlines, versions and filing reference.
GET
/
companies
/
{company_id}
/
cases
List cases
curl --request GET \
--url https://api.melso.ai/v1/companies/{company_id}/cases \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.melso.ai/v1/companies/{company_id}/cases"
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}/cases', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "modelo",
"status": "draft",
"created_at": "2023-11-07T05:31:56Z",
"deadline": "2023-12-25",
"current_version": 123,
"approved_version": 123,
"payment_url": "<string>",
"information_request": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"items": [
{
"id": "<string>",
"kind": "document",
"label": "<string>"
}
]
},
"messages": [
{
"author": "company",
"content": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
],
"documents": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"content_type": "<string>",
"size_bytes": 123,
"url": "<string>"
}
],
"external_reference": "<string>",
"completed_on": "2023-12-25",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"next_cursor": "<string>"
}{
"error": "invalid token",
"code": "unauthorized",
"request_id": "req_01JAB3K9X2"
}{
"error": "invoice not found",
"code": "not_found",
"request_id": "req_01JAB3K9X2"
}Live capability. Melso runs this in production today. Partner keys reach it once your partner account is enabled. See Availability.
Authorizations
Your partner secret key, mk_live_… for real companies or mk_test_…
for test companies. Keep it on your servers. See
Authentication.
Path Parameters
The company's ID. Every company-scoped call works in exactly this company.
Query Parameters
Page size.
Required range:
1 <= x <= 200The next_cursor of the previous page.
draft: not sent yet. review: Melso's professionals are working on
it. info: they asked the company for something
(information_request). approval: a draft waits for the company's
approval. filing: approved, being filed. done: filed, with the
administration's external_reference. cancelled: withdrawn before
filing.
Available options:
draft, review, info, approval, filing, done, cancelled