curl --request GET \
--url https://api.melso.ai/v1/companies/{company_id}/cases/{case_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.melso.ai/v1/companies/{company_id}/cases/{case_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}/cases/{case_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"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"
}{
"error": "invalid token",
"code": "unauthorized",
"request_id": "req_01JAB3K9X2"
}{
"error": "invoice not found",
"code": "not_found",
"request_id": "req_01JAB3K9X2"
}Get a case
Returns the case with its conversation, versions, open information request and documents, including the professionals’ drafts and the filing receipts.
curl --request GET \
--url https://api.melso.ai/v1/companies/{company_id}/cases/{case_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.melso.ai/v1/companies/{company_id}/cases/{case_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}/cases/{case_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"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"
}{
"error": "invalid token",
"code": "unauthorized",
"request_id": "req_01JAB3K9X2"
}{
"error": "invoice not found",
"code": "not_found",
"request_id": "req_01JAB3K9X2"
}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.
Response
The case.
modelo: prepare and file one AEAT form for one period (details
model, period); an empresa cannot ask for the 130, 131 or 100.
alta: register an autónomo with the AEAT and the Social Security
(details start_date, activity). renta: an autónomo's annual income
tax return, modelo 100 (details year, joint). constitucion_sl:
incorporate an S.L. or S.L.U., paid once by the owner before Melso
starts. More kinds are added over time; read them from List case kinds.
modelo, alta, renta, constitucion_sl 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.
draft, review, info, approval, filing, done, cancelled Where the owner pays a service kind before Melso starts.
What the professionals need from the company, with the items to answer.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The professionals' drafts, the company's documents and the filing receipts.
Show child attributes
Show child attributes
The administration's reference for what was filed. Always present once done.