Upload template document
curl --request POST \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/contract_templates/{contract_template_id}/documents \
--header 'Content-Type: multipart/form-data' \
--header 'api_access_token: <api-key>' \
--form file='@example-file'const form = new FormData();
form.append('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}/contract_templates/{contract_template_id}/documents', 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_templates/{contract_template_id}/documents"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"api_access_token": "<api-key>"}
response = requests.post(url, files=files, headers=headers)
print(response.text){
"id": 123,
"name": "<string>",
"slug": "<string>",
"status": "<string>",
"fields": [
{}
],
"schema": {},
"submitters": [
{}
],
"preferences": {},
"labels": [
"<string>"
],
"documents": [
{
"id": 123,
"uuid": "<string>",
"filename": "<string>",
"content_type": "<string>",
"signed_uuid": "<string>"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{}{}Contract Templates
Upload template document
Attach a PDF to a contract template.
POST
/
api
/
v1
/
accounts
/
{account_id}
/
contract_templates
/
{contract_template_id}
/
documents
Upload template document
curl --request POST \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/contract_templates/{contract_template_id}/documents \
--header 'Content-Type: multipart/form-data' \
--header 'api_access_token: <api-key>' \
--form file='@example-file'const form = new FormData();
form.append('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}/contract_templates/{contract_template_id}/documents', 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_templates/{contract_template_id}/documents"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"api_access_token": "<api-key>"}
response = requests.post(url, files=files, headers=headers)
print(response.text){
"id": 123,
"name": "<string>",
"slug": "<string>",
"status": "<string>",
"fields": [
{}
],
"schema": {},
"submitters": [
{}
],
"preferences": {},
"labels": [
"<string>"
],
"documents": [
{
"id": 123,
"uuid": "<string>",
"filename": "<string>",
"content_type": "<string>",
"signed_uuid": "<string>"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{}{}Authorizations
Path Parameters
ID of the template
The numeric ID of the account
Body
multipart/form-data