Attach uploaded documents to a case
curl --request POST \
--url https://app.sahlfinancial.com/api/v1/cases/{case_id}/documents/attach \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"document_ids": [
"a8f1c3e5-6b2d-4974-8e0a-1d5c7b9f3e26"
],
"force": false
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({document_ids: ['a8f1c3e5-6b2d-4974-8e0a-1d5c7b9f3e26'], force: false})
};
fetch('https://app.sahlfinancial.com/api/v1/cases/{case_id}/documents/attach', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.sahlfinancial.com/api/v1/cases/{case_id}/documents/attach"
payload = {
"document_ids": ["a8f1c3e5-6b2d-4974-8e0a-1d5c7b9f3e26"],
"force": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"case_id": "7e3b9a14-2d6c-4c85-b1f0-6a8d4e2c9b37",
"attached": [
"a8f1c3e5-6b2d-4974-8e0a-1d5c7b9f3e26"
],
"skipped": []
}{
"detail": "document_ids required"
}{
"detail": "Invalid or expired token"
}{
"detail": "Insufficient permissions"
}{
"detail": "Case not found"
}{
"detail": [
{
"type": "missing",
"loc": [
"body",
"bank_code"
],
"msg": "Field required",
"input": {}
}
]
}{
"code": "rate_limit_exceeded",
"message": "Too many requests. Please slow down."
}Attach uploaded documents to a case
Who can call it: tenant_admin, tenant_reviewer, tenant_api_manager or platform_admin. A tenant_viewer is read-only and gets 403.
Attaches documents already uploaded to this workspace. A document that is on another case is skipped unless force is true.
Auth: dashboard session (Authorization: Bearer <access token>). Not available with a partner API key.
Attach uploaded documents to a case
curl --request POST \
--url https://app.sahlfinancial.com/api/v1/cases/{case_id}/documents/attach \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"document_ids": [
"a8f1c3e5-6b2d-4974-8e0a-1d5c7b9f3e26"
],
"force": false
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({document_ids: ['a8f1c3e5-6b2d-4974-8e0a-1d5c7b9f3e26'], force: false})
};
fetch('https://app.sahlfinancial.com/api/v1/cases/{case_id}/documents/attach', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.sahlfinancial.com/api/v1/cases/{case_id}/documents/attach"
payload = {
"document_ids": ["a8f1c3e5-6b2d-4974-8e0a-1d5c7b9f3e26"],
"force": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"case_id": "7e3b9a14-2d6c-4c85-b1f0-6a8d4e2c9b37",
"attached": [
"a8f1c3e5-6b2d-4974-8e0a-1d5c7b9f3e26"
],
"skipped": []
}{
"detail": "document_ids required"
}{
"detail": "Invalid or expired token"
}{
"detail": "Insufficient permissions"
}{
"detail": "Case not found"
}{
"detail": [
{
"type": "missing",
"loc": [
"body",
"bank_code"
],
"msg": "Field required",
"input": {}
}
]
}{
"code": "rate_limit_exceeded",
"message": "Too many requests. Please slow down."
}Authorizations
The access token (JWT) of a signed-in console user, from POST /v1/auth/login. It lasts 30 minutes. It is not an API key: a partner API key is refused here. There is no cookie.
Path Parameters
Body
application/json
The body is of type Body · object.
Response
OK
The response is of type Response Attach Documents Api V1 Cases Case Id Documents Attach Post · object.