Create contract import
curl --request POST \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/contract_imports \
--header 'Content-Type: multipart/form-data' \
--header 'api_access_token: <api-key>' \
--form 'files=<string>' \
--form files.items='@example-file'const form = new FormData();
form.append('files', '<string>');
form.append('files.items', '{
"fileName": "example-file"
}');
const options = {method: 'POST', headers: {api_access_token: '<api-key>'}};
options.body = form;
fetch('https://app.yampi.ai/api/v1/accounts/{account_id}/contract_imports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.yampi.ai/api/v1/accounts/{account_id}/contract_imports"
files = { "files.items": ("example-file", open("example-file", "rb")) }
payload = { "files": "<string>" }
headers = {"api_access_token": "<api-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text){
"id": 123,
"status": "<string>",
"total_records": 123,
"processed_records": 123,
"created_at": 123,
"items": [
{
"id": 123,
"source_name": "<string>",
"status": "<string>",
"document_kind": "<string>",
"proposal": {},
"proposal_digest": "<string>",
"warnings": [
"<string>"
],
"refusal": "<string>",
"error": "<string>",
"property_id": 123,
"property_manager_id": 123,
"created_at": 123
}
]
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{}{}Contract Imports
Create contract import
Start a contract import batch. One item is created per uploaded file. Requires the contract_import feature.
POST
/
api
/
v1
/
accounts
/
{account_id}
/
contract_imports
Create contract import
curl --request POST \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/contract_imports \
--header 'Content-Type: multipart/form-data' \
--header 'api_access_token: <api-key>' \
--form 'files=<string>' \
--form files.items='@example-file'const form = new FormData();
form.append('files', '<string>');
form.append('files.items', '{
"fileName": "example-file"
}');
const options = {method: 'POST', headers: {api_access_token: '<api-key>'}};
options.body = form;
fetch('https://app.yampi.ai/api/v1/accounts/{account_id}/contract_imports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.yampi.ai/api/v1/accounts/{account_id}/contract_imports"
files = { "files.items": ("example-file", open("example-file", "rb")) }
payload = { "files": "<string>" }
headers = {"api_access_token": "<api-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text){
"id": 123,
"status": "<string>",
"total_records": 123,
"processed_records": 123,
"created_at": 123,
"items": [
{
"id": 123,
"source_name": "<string>",
"status": "<string>",
"document_kind": "<string>",
"proposal": {},
"proposal_digest": "<string>",
"warnings": [
"<string>"
],
"refusal": "<string>",
"error": "<string>",
"property_id": 123,
"property_manager_id": 123,
"created_at": 123
}
]
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{}{}Authorizations
Path Parameters
The numeric ID of the account
Body
multipart/form-data
Contract files to import