Update Template
curl --request PATCH \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/contract_templates/{id} \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"contract_template": {
"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"
}
}
'const options = {
method: 'PATCH',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
contract_template: {
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'
}
})
};
fetch('https://app.yampi.ai/api/v1/accounts/{account_id}/contract_templates/{id}', 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/{id}"
payload = { "contract_template": {
"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"
} }
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, 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"
}Contract Templates
Update Template
Update an existing contract template
PATCH
/
api
/
v1
/
accounts
/
{account_id}
/
contract_templates
/
{id}
Update Template
curl --request PATCH \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/contract_templates/{id} \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"contract_template": {
"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"
}
}
'const options = {
method: 'PATCH',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
contract_template: {
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'
}
})
};
fetch('https://app.yampi.ai/api/v1/accounts/{account_id}/contract_templates/{id}', 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/{id}"
payload = { "contract_template": {
"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"
} }
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, 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"
}Authorizations
Body
application/json
Show child attributes
Show child attributes