Appearance
staff.accountAllocations
7 methods on staff.accountAllocations. Each returns the answer's data and throws NoviqaError on a failed answer.
list
GET
/admin/v1/account-allocationsList account allocation rules
Every rule whose group_path is in the caller's group scope, lowest priority first.
More details
Rights: the staff member needs every one of: config.allocation.
Returns
Promise<AccountAllocation[]>The answer's
data.Errors
401
auth.session_expired: session expired, sign in again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.accountAllocations.list()bash
curl -X GET "$NOVIQA_API_URL/admin/v1/account-allocations" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": [
{
"countries": [
"string"
],
"created_at": "2026-09-25T10:15:00Z",
"default_leverage": 1,
"description": "string",
"enabled": true,
"group_path": "string",
"id": 1,
"leverages": [
1
],
"priority": 1,
"updated_at": "2026-09-25T10:15:00Z",
"version": 1,
"white_label_id": 1
}
],
"request_id": "5b7f2c1e"
}ts
staff.accountAllocations.list(options?: RequestOptions): Promise<models.AccountAllocation[]>create
POST
/admin/v1/account-allocationsCreate an account allocation rule
Adds a rule. group_path is required (an existing trading group). white_label_id, left out or null, means every brand served by the target group's company. leverages empty means the effective default only; countries empty means every country. enabled false rules are kept but never match. priority orders rules low to high; the lowest enabled match is the default choice. Exact demo-root groups offer demo signup; other trading groups offer real applications only. Defaults and offered leverages must be 1-10000, with the effective default included when a list is provided. An explicit invalid selection is rejected. Enabled rules for a kind/brand prevent bypass of their country filter through the legacy fallback group. id, version, created_at and updated_at are set by the server. Writes a config line to the journal. Answers the stored rule.
More details
Rights: the staff member needs every one of: config.allocation.
Request body
countriesstring[]empty = every country
created_atstringUTC time, RFC 3339.
default_leverageinteger0 = the group's own default
descriptionstringenabledbooleangroup_pathstringidintegerleveragesinteger[]empty = the effective default only
priorityintegerupdated_atstringUTC time, RFC 3339.
versionintegerwhite_label_idintegernil = every brand
Returns
Promise<AccountAllocation>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.csrf_invalid: request refused: reload the page and try again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.accountAllocations.create({
countries: [
"DE",
"FR",
"ES"
],
description: "EU clients",
enabled: true,
group_path: "real\\eu-standard",
priority: 10
})bash
curl -X POST "$NOVIQA_API_URL/admin/v1/account-allocations" \
-H "Authorization: Bearer $NOVIQA_TOKEN" \
-H "Content-Type: application/json" \
--data-raw '{
"countries": [
"DE",
"FR",
"ES"
],
"description": "EU clients",
"enabled": true,
"group_path": "real\\eu-standard",
"priority": 10
}'json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"countries": [
"string"
],
"created_at": "2026-09-25T10:15:00Z",
"default_leverage": 1,
"description": "string",
"enabled": true,
"group_path": "string",
"id": 1,
"leverages": [
1
],
"priority": 1,
"updated_at": "2026-09-25T10:15:00Z",
"version": 1,
"white_label_id": 1
},
"request_id": "5b7f2c1e"
}ts
staff.accountAllocations.create(body: models.AccountAllocation, options?: RequestOptions): Promise<models.AccountAllocation>settings
GET
/admin/v1/account-allocations/settingsGet allocation settings
The platform's signup config: demo_url (shown to demo signups instead of the terminal form; empty = none), deposit_url and withdraw_url (general pages; a group's own deposit/withdrawal urls take precedence where set), and link_sets (branded agreement links, checked in sort order; a set's countries empty means every country). Keep version.
More details
Rights: the staff member needs every one of: config.allocation.
Returns
Promise<AllocationSettings>The answer's
data.Errors
401
auth.session_expired: session expired, sign in again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.accountAllocations.settings()bash
curl -X GET "$NOVIQA_API_URL/admin/v1/account-allocations/settings" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"demo_url": "string",
"deposit_url": "string",
"link_sets": [
{
"countries": [
"string"
],
"description": "string",
"id": 1,
"links": [
{}
],
"sort": 1
}
],
"updated_at": "2026-09-25T10:15:00Z",
"version": 1,
"withdraw_url": "string"
},
"request_id": "5b7f2c1e"
}ts
staff.accountAllocations.settings(options?: RequestOptions): Promise<models.AllocationSettings>updateSettings
PUT
/admin/v1/account-allocations/settingsSave allocation settings
Fully replaces the settings and every link set (fields left out reset to their zero value). version is required and must equal the stored version, else conflict. A link needs url (1-512 characters); caption_type 0 is a custom caption, 1-8 are a terminal's fixed captions. Writes a config line to the journal. Answers the saved settings.
More details
Rights: the staff member needs every one of: config.allocation.
Request body
demo_urlstringdeposit_urlstringlink_setsAllocationLinkSet_input[]updated_atstringUTC time, RFC 3339.
versionintegerwithdraw_urlstringReturns
Promise<AllocationSettings>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.csrf_invalid: request refused: reload the page and try again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action409
conflict: already exists500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.accountAllocations.updateSettings({
demo_url: "string",
deposit_url: "string",
link_sets: [
{
countries: [
"string"
],
description: "string",
id: 1,
links: [
{}
],
sort: 1
}
],
updated_at: "2026-09-25T10:15:00Z",
version: 1,
withdraw_url: "string"
})bash
curl -X PUT "$NOVIQA_API_URL/admin/v1/account-allocations/settings" \
-H "Authorization: Bearer $NOVIQA_TOKEN" \
-H "Content-Type: application/json" \
--data-raw '{
"demo_url": "string",
"deposit_url": "string",
"link_sets": [
{
"countries": [
"string"
],
"description": "string",
"id": 1,
"links": [
{}
],
"sort": 1
}
],
"updated_at": "2026-09-25T10:15:00Z",
"version": 1,
"withdraw_url": "string"
}'json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"demo_url": "string",
"deposit_url": "string",
"link_sets": [
{
"countries": [
"string"
],
"description": "string",
"id": 1,
"links": [
{}
],
"sort": 1
}
],
"updated_at": "2026-09-25T10:15:00Z",
"version": 1,
"withdraw_url": "string"
},
"request_id": "5b7f2c1e"
}ts
staff.accountAllocations.updateSettings(body: models.AllocationSettings, options?: RequestOptions): Promise<models.AllocationSettings>retrieve
GET
/admin/v1/account-allocations/{id}Get an account allocation rule
One rule in the caller's group scope. Keep version: an update must send it back.
More details
Rights: the staff member needs every one of: config.allocation.
Parameters
idinteger · pathrequiredAccount allocation rule id.
Returns
Promise<AccountAllocation>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action404
not_found: not found500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.accountAllocations.retrieve(1)bash
curl -X GET "$NOVIQA_API_URL/admin/v1/account-allocations/1" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"countries": [
"string"
],
"created_at": "2026-09-25T10:15:00Z",
"default_leverage": 1,
"description": "string",
"enabled": true,
"group_path": "string",
"id": 1,
"leverages": [
1
],
"priority": 1,
"updated_at": "2026-09-25T10:15:00Z",
"version": 1,
"white_label_id": 1
},
"request_id": "5b7f2c1e"
}ts
staff.accountAllocations.retrieve(id: number, options?: RequestOptions): Promise<models.AccountAllocation>update
PUT
/admin/v1/account-allocations/{id}Replace an account allocation rule
Fully replaces the rule; fields left out reset to their zero value. group_path is required (an existing trading group). white_label_id, left out or null, means every brand served by the target group's company. leverages empty means the effective default only; countries empty means every country. enabled false rules are kept but never match. priority orders rules low to high; the lowest enabled match is the default choice. Exact demo-root groups offer demo signup; other trading groups offer real applications only. Defaults and offered leverages must be 1-10000, with the effective default included when a list is provided. An explicit invalid selection is rejected. Enabled rules for a kind/brand prevent bypass of their country filter through the legacy fallback group. version is required and must equal the stored version, else conflict. Writes a config line to the journal. Answers the saved rule.
More details
Rights: the staff member needs every one of: config.allocation.
Parameters
idinteger · pathrequiredAccount allocation rule id.
Request body
countriesstring[]empty = every country
created_atstringUTC time, RFC 3339.
default_leverageinteger0 = the group's own default
descriptionstringenabledbooleangroup_pathstringidintegerleveragesinteger[]empty = the effective default only
priorityintegerupdated_atstringUTC time, RFC 3339.
versionintegerwhite_label_idintegernil = every brand
Returns
Promise<AccountAllocation>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.csrf_invalid: request refused: reload the page and try again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action404
not_found: not found409
conflict: already exists500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.accountAllocations.update(1, {
countries: [
"string"
],
created_at: "2026-09-25T10:15:00Z",
default_leverage: 1,
description: "string",
enabled: true,
group_path: "string",
id: 1,
leverages: [
1
],
priority: 1,
updated_at: "2026-09-25T10:15:00Z",
version: 1,
white_label_id: 1
})bash
curl -X PUT "$NOVIQA_API_URL/admin/v1/account-allocations/1" \
-H "Authorization: Bearer $NOVIQA_TOKEN" \
-H "Content-Type: application/json" \
--data-raw '{
"countries": [
"string"
],
"created_at": "2026-09-25T10:15:00Z",
"default_leverage": 1,
"description": "string",
"enabled": true,
"group_path": "string",
"id": 1,
"leverages": [
1
],
"priority": 1,
"updated_at": "2026-09-25T10:15:00Z",
"version": 1,
"white_label_id": 1
}'json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"countries": [
"string"
],
"created_at": "2026-09-25T10:15:00Z",
"default_leverage": 1,
"description": "string",
"enabled": true,
"group_path": "string",
"id": 1,
"leverages": [
1
],
"priority": 1,
"updated_at": "2026-09-25T10:15:00Z",
"version": 1,
"white_label_id": 1
},
"request_id": "5b7f2c1e"
}ts
staff.accountAllocations.update(id: number, body: models.AccountAllocation, options?: RequestOptions): Promise<models.AccountAllocation>delete
DELETE
/admin/v1/account-allocations/{id}Delete an account allocation rule
Removes the rule. Accounts it already placed keep their group. Writes a config line to the journal.
More details
Rights: the staff member needs every one of: config.allocation.
Parameters
idinteger · pathrequiredAccount allocation rule id.
Returns
Promise<null>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.csrf_invalid: request refused: reload the page and try again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action404
not_found: not found500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.accountAllocations.delete(1)bash
curl -X DELETE "$NOVIQA_API_URL/admin/v1/account-allocations/1" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": null,
"request_id": "5b7f2c1e"
}ts
staff.accountAllocations.delete(id: number, options?: RequestOptions): Promise<null>