Sign document
Registers the signing of an affidavit (buy or sell), a mutual funds document, or the terms and conditions for an account.
POST
/v1/broker/document/signRequest
Headers
| Field | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Access token in Bearer ACCESS_TOKEN format |
Content-Type | string | Yes | Must be application/json |
Not applicable: Path Parameters, Query Parameters.
Body
Conditional fields:
description, privacy_policy, versionThe meaning and requirement of description, privacy_policy, and version depend on document_type:
AFFIDAVIT:descriptionis required and must beBUYorSELL.privacy_policyandversionmust not be sent.MUTUAL_FUNDS:descriptionis required and must contain the fund's bloomberg code (e.g.ALDOAHOBMep).privacy_policyandversionmust not be sent.TERMS_AND_CONDITIONS:versionandprivacy_policyare required.descriptionmust not be sent.
| Field | Type | Required | Description |
|---|---|---|---|
account_id | string | Yes | Account identifier signing the document. |
document_type | string | Yes | Type of document being signed. Allowed values: AFFIDAVIT, MUTUAL_FUNDS, TERMS_AND_CONDITIONS. |
description | string | Conditional | BUY/SELL for an affidavit, or the fund's bloomberg code for mutual funds. Must not be provided for TERMS_AND_CONDITIONS. |
privacy_policy | string | Conditional | Privacy policy version. Required only when document_type is TERMS_AND_CONDITIONS. |
version | string | Conditional | Terms and conditions version. Required only when document_type is TERMS_AND_CONDITIONS. |
Response
2XX Success
| Field | Type | Description |
|---|---|---|
msg | string | Result message. If the same document was already signed, msg describes the existing signing instead of registering a new one. |
Error Codes
| Status | Description |
|---|---|
400 | Bad Request — invalid or missing parameters |
401 | Unauthorized — invalid or missing access token |
403 | Forbidden — the token does not have permission to access this resource |
500 | Internal Server Error |
Error structure:
{
"code": "invalid_request",
"description": "description must be BUY or SELL when document type is AFFIDAVIT"
}
Code Example
- cURL
- JavaScript
- Python
- Node.js
curl -X POST https://b2b.allaria.cloud/v1/broker/document/sign \
-H "Authorization: Bearer ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"account_id": "1234",
"document_type": "AFFIDAVIT",
"description": "BUY"
}'
const response = await fetch('https://b2b.allaria.cloud/v1/broker/document/sign', {
method: 'POST',
headers: {
'Authorization': 'Bearer ACCESS_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({
account_id: '1234',
document_type: 'AFFIDAVIT',
description: 'BUY',
}),
});
const data = await response.json();
console.log(data);
import requests
response = requests.post(
'https://b2b.allaria.cloud/v1/broker/document/sign',
headers={
'Authorization': 'Bearer ACCESS_TOKEN',
'Content-Type': 'application/json',
},
json={
'account_id': '1234',
'document_type': 'AFFIDAVIT',
'description': 'BUY',
}
)
data = response.json()
print(data)
const axios = require('axios');
const response = await axios.post(
'https://b2b.allaria.cloud/v1/broker/document/sign',
{
account_id: '1234',
document_type: 'AFFIDAVIT',
description: 'BUY',
},
{
headers: {
Authorization: 'Bearer ACCESS_TOKEN',
'Content-Type': 'application/json',
},
}
);
console.log(response.data);
Affidavit (BUY or SELL declaration)
{
"account_id": "1234",
"document_type": "AFFIDAVIT",
"description": "BUY"
}
Mutual funds document
{
"account_id": "1234",
"document_type": "MUTUAL_FUNDS",
"description": "ALDOAHOBMep"
}
Terms and conditions
{
"account_id": "1234",
"document_type": "TERMS_AND_CONDITIONS",
"version": "1.0",
"privacy_policy": "1.0"
}
2XX Success
{
"msg": "Document signing registered successfully"
}