Attach the PDF of a presigned contract
curl --request POST \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/presigned_contracts/{id}/document \
--header 'Content-Type: multipart/form-data' \
--header 'api_access_token: <api-key>' \
--form 'contract={
"file": "<string>"
}'const form = new FormData();
form.append('contract', '{
"file": "<string>"
}');
const options = {method: 'POST', headers: {api_access_token: '<api-key>'}};
options.body = form;
fetch('https://app.yampi.ai/api/v1/accounts/{account_id}/presigned_contracts/{id}/document', 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}/presigned_contracts/{id}/document"
payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"contract\"\r\n\r\n{\r\n \"file\": \"<string>\"\r\n}\r\n-----011000010111000001101001--"
headers = {"api_access_token": "<api-key>"}
response = requests.post(url, data=payload, headers=headers)
print(response.text){}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{}{}Presigned Contracts
Attach the PDF of a presigned contract
The PDF of a presigned contract registered without it. A contract that already has its PDF keeps it and the request is refused.
POST
/
api
/
v1
/
accounts
/
{account_id}
/
presigned_contracts
/
{id}
/
document
Attach the PDF of a presigned contract
curl --request POST \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/presigned_contracts/{id}/document \
--header 'Content-Type: multipart/form-data' \
--header 'api_access_token: <api-key>' \
--form 'contract={
"file": "<string>"
}'const form = new FormData();
form.append('contract', '{
"file": "<string>"
}');
const options = {method: 'POST', headers: {api_access_token: '<api-key>'}};
options.body = form;
fetch('https://app.yampi.ai/api/v1/accounts/{account_id}/presigned_contracts/{id}/document', 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}/presigned_contracts/{id}/document"
payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"contract\"\r\n\r\n{\r\n \"file\": \"<string>\"\r\n}\r\n-----011000010111000001101001--"
headers = {"api_access_token": "<api-key>"}
response = requests.post(url, data=payload, headers=headers)
print(response.text){}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{}{}Was this page helpful?