Account Regulatory Data
Create or update regulatory data for a Canadian account.
Endpoint
POST https://sandbox-api.veem.com/veem/v1.2/account/{accountId}/regulatoryData
- Produces:
application/json
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
accountId | Long | Yes | Target account ID whose regulatory data will be created/updated. |
Request Headers
Headers
Three headers are required to use this endpoint.
Required Headers
Name
Type
Required
Description
Authorization
stringYes
Bearer token (OAuth 2.0) This header holds the partner bearer token required to use Veem's public API, and belongs to the partner account. Failure to use a valid bearer token will result in a 404 (Not Found) status code in the response. An example of a valid header value is as follows:
Bearer c047594b-082c-4da1-be89-08fe3770f4b3See Get Access Token section to generate your Bearer token
X-Request-Id
stringYes
This is a unique string that identifies the current API request, and should follow the UUID format. Reusing this header without changing the value will result in a 409 (Conflict) status code in the response. An example X-request-id is as follows:
48855846-628d-4177-b071-80332a116f0a
Content-Type
stringYes
The content type of the request. Must be
application/json
Request Body
Example
{
"firstName": "Jhon",
"lastName": "Doe",
"occupation": "Manager",
"extraInfo": {
"address": {
"countryCode": "CA",
"street": "123 Main St",
"city": "123123",
"stateProvince": "ON",
"postalCode": "K2E2E2"
}
},
"dob": "10/02/2007"
}Field Reference
All fields below are validated. Unless stated otherwise, they are mandatory.
| Field | Type | Required | Notes / Constraints | Example |
|---|---|---|---|---|
firstName | String | Yes | Non-empty. | "Jhon" |
lastName | String | Yes | Non-empty. | "Doe" |
middleName | String | No | Optional field. | "A" |
occupation | String | Yes | Non-empty. | "Manager" |
dob | LocalDate (MM/dd/yyyy) | Yes | Must be a valid date formatted as MM/dd/yyyy. Min 18 years and Max 120 years. | "10/02/2007" |
extraInfo | Object | Yes | Container for address. | {...} |
extraInfo.address | Object | Yes | Canadian address only. | {...} |
extraInfo.address.countryCode | CountryCode | Yes | Must be CA. | "CA" |
extraInfo.address.street | String | Yes | Non-empty. | "123 Main St" |
extraInfo.address.city | String | Yes | Non-empty. | "123123" |
extraInfo.address.stateProvince | String | Yes | Must match a valid Canadian region code ( ON, QC, NS, NB, MB, BC, PE, SK, AB, NL, NT, YT, NU). Case-insensitive. | "ON" |
extraInfo.address.postalCode | String | Yes | Non-empty. | "K2E2E2" |
Validation summary
- The caller must belong to the correct partner for the
accountId.- The target
accountIdmust be Canadian (CA).- Every field marked Yes above is mandatory;
middleNameis optional.stateProvincemust be one of the supported region codes for Canada.
Responses
200 OK
Returns account regulatory data in JSON.
Error Conditions (examples)
| HTTP | Code/Exception (server-side) | When |
|---|---|---|
| 400 | This account 'A' cannot be set by caller 'B' | Caller is not the configured partner for the accountId. |
| 400 | The country US is invalid. Only Canada-CA is valid. | Account is not CA or countryCode in the payload is not CA. |
| 400 | The following parameter(s) is(are) missing: [...]. | One or more required fields are missing/blank (message lists fields). |
| 400 | The state/provice CT is not valid. | stateProvince not in supported Canadian region codes. |
| 400 | lastName contains unsupported characters | lastName or any other field has an invalid character |
| 400 | Customer must be at least 18 years old | The DOB is invalid |
| 403 | <head><title>403 Forbidden</title></head> | The payload has a malformed or invalid character |
cURL Example
curl -X POST "https://sandbox-api.veem.com/veem/v1.2/account/{accountId}/regulatoryData" \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{
"firstName": "Jhon",
"lastName": "Doe",
"occupation": "Manager",
"extraInfo": {
"address": {
"countryCode": "CA",
"street": "123 Main St",
"city": "123123",
"stateProvince": "ON",
"postalCode": "K2E2E2"
}
},
"dob": "10/02/2007"
}'Notes for Maintainers
- Keep the Availability Notice at the top until November 12, 2025. Remove it on/after release.
- If
middleNamemust become mandatory, add it to the required-fields check in validation and update the table accordingly. - If enforcing a minimum age, document the rule under
doband update validation.
Updated 4 days ago
