Accept terms and conditions
Signs the documents of the funds in the specified plan and records the acceptance of the current terms and conditions for the next subscription to that plan.
note
Call this when the client ticks the terms and conditions checkbox on the subscription pre-confirmation screen. It is required before every subscription: Create savings plan subscription consumes the acceptance, so a new subscription needs a new one.
POST
/v1/savings/terms-and-conditions/{account_number}/{plan_id}Request
Headers
| Field | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Access token in Bearer ACCESS_TOKEN format |
Path Parameters
| Field | Type | Required | Description |
|---|---|---|---|
account_number | number | Yes | Account number accepting the terms and conditions. |
plan_id | number | Yes | ID of the savings plan the client is subscribing to. |
Not applicable: Query Parameters.
Body
This endpoint does not require a body.
Response
2XX Success
This endpoint does not return a body on success.
Error Codes
| Status | Condition |
|---|---|
400 | The plan has no fund documents to sign. |
403 | The token does not have access to the specified account. |
Code Example
- cURL
- JavaScript
- Python
- Node.js
curl -X POST https://b2b.allaria.dev/v1/savings/terms-and-conditions/12345678/10 \
-H "Authorization: Bearer ACCESS_TOKEN"
const accountNumber = 12345678;
const planId = 10;
const response = await fetch(
`https://b2b.allaria.dev/v1/savings/terms-and-conditions/${accountNumber}/${planId}`,
{
method: 'POST',
headers: {
'Authorization': 'Bearer ACCESS_TOKEN'
}
}
);
import requests
account_number = 12345678
plan_id = 10
response = requests.post(
f'https://b2b.allaria.dev/v1/savings/terms-and-conditions/{account_number}/{plan_id}',
headers={
'Authorization': 'Bearer ACCESS_TOKEN'
}
)
const axios = require('axios');
const accountNumber = 12345678;
const planId = 10;
await axios.post(
`https://b2b.allaria.dev/v1/savings/terms-and-conditions/${accountNumber}/${planId}`,
null,
{
headers: {
Authorization: 'Bearer ACCESS_TOKEN'
}
}
);