Bulk action on library rows
curl --request POST \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/documents/bulk \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"items": [
{
"id": 123
}
]
}
'const options = {
method: 'POST',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({items: [{id: 123}]})
};
fetch('https://app.yampi.ai/api/v1/accounts/{account_id}/documents/bulk', 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}/documents/bulk"
payload = { "items": [{ "id": 123 }] }
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"results": [
{
"kind": "<string>",
"id": 123,
"status": "done",
"reason": "<string>"
}
],
"done": 123,
"skipped": 123
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{}{}Documents
Bulk action on library rows
Apply one action to up to 100 library rows at once (documents and contracts). The response answers row by row. Reassigning the owner needs an administrator.
POST
/
api
/
v1
/
accounts
/
{account_id}
/
documents
/
bulk
Bulk action on library rows
curl --request POST \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/documents/bulk \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"items": [
{
"id": 123
}
]
}
'const options = {
method: 'POST',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({items: [{id: 123}]})
};
fetch('https://app.yampi.ai/api/v1/accounts/{account_id}/documents/bulk', 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}/documents/bulk"
payload = { "items": [{ "id": 123 }] }
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"results": [
{
"kind": "<string>",
"id": 123,
"status": "done",
"reason": "<string>"
}
],
"done": 123,
"skipped": 123
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{}{}Body
application/json