curl --request POST \
--url https://api.melso.ai/v1/companies/{company_id}/cases/{case_id}/answers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"answers": [
{
"item_id": "<string>",
"answer": "<string>",
"file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
'import requests
url = "https://api.melso.ai/v1/companies/{company_id}/cases/{case_id}/answers"
payload = {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"answers": [
{
"item_id": "<string>",
"answer": "<string>",
"file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
request_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
answers: [
{
item_id: '<string>',
answer: '<string>',
file_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
]
})
};
fetch('https://api.melso.ai/v1/companies/{company_id}/cases/{case_id}/answers', 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": "lines[0].vat_rate must be 21, 10, 4 or 0",
"code": "invalid_invoice",
"request_id": "req_01JAB3K9X2"
}{
"error": "invalid token",
"code": "unauthorized",
"request_id": "req_01JAB3K9X2"
}{
"error": "The tax return changed or is not ready for approval",
"code": "version_conflict",
"request_id": "req_01JAB3K9X2"
}Answer an information request
Answers every item of the case’s open information request, a document for a document item and text for a question, and returns the case to review.
curl --request POST \
--url https://api.melso.ai/v1/companies/{company_id}/cases/{case_id}/answers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"answers": [
{
"item_id": "<string>",
"answer": "<string>",
"file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
'import requests
url = "https://api.melso.ai/v1/companies/{company_id}/cases/{case_id}/answers"
payload = {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"answers": [
{
"item_id": "<string>",
"answer": "<string>",
"file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
request_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
answers: [
{
item_id: '<string>',
answer: '<string>',
file_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
]
})
};
fetch('https://api.melso.ai/v1/companies/{company_id}/cases/{case_id}/answers', 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": "lines[0].vat_rate must be 21, 10, 4 or 0",
"code": "invalid_invoice",
"request_id": "req_01JAB3K9X2"
}{
"error": "invalid token",
"code": "unauthorized",
"request_id": "req_01JAB3K9X2"
}{
"error": "The tax return changed or is not ready for approval",
"code": "version_conflict",
"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.
Body
Response
The case, back in review.
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.