Skip to content

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-allocations

List 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
401auth.session_expired: session expired, sign in again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
500internal: something went wrong
ts
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-allocations

Create 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_atstring
UTC time, RFC 3339.
default_leverageinteger
0 = the group's own default
descriptionstring
enabledboolean
group_pathstring
idinteger
leveragesinteger[]
empty = the effective default only
priorityinteger
updated_atstring
UTC time, RFC 3339.
versioninteger
white_label_idinteger
nil = every brand
Returns
Promise<AccountAllocation>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.csrf_invalid: request refused: reload the page and try again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
500internal: something went wrong
ts
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/settings

Get 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
401auth.session_expired: session expired, sign in again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
500internal: something went wrong
ts
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/settings

Save 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_urlstring
deposit_urlstring
link_setsAllocationLinkSet_input[]
updated_atstring
UTC time, RFC 3339.
versioninteger
withdraw_urlstring
Returns
Promise<AllocationSettings>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.csrf_invalid: request refused: reload the page and try again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
409conflict: already exists
500internal: something went wrong
ts
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 · pathrequired
Account allocation rule id.
Returns
Promise<AccountAllocation>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
404not_found: not found
500internal: something went wrong
ts
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 · pathrequired
Account allocation rule id.
Request body
countriesstring[]
empty = every country
created_atstring
UTC time, RFC 3339.
default_leverageinteger
0 = the group's own default
descriptionstring
enabledboolean
group_pathstring
idinteger
leveragesinteger[]
empty = the effective default only
priorityinteger
updated_atstring
UTC time, RFC 3339.
versioninteger
white_label_idinteger
nil = every brand
Returns
Promise<AccountAllocation>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.csrf_invalid: request refused: reload the page and try again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
404not_found: not found
409conflict: already exists
500internal: something went wrong
ts
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 · pathrequired
Account allocation rule id.
Returns
Promise<null>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.csrf_invalid: request refused: reload the page and try again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
404not_found: not found
500internal: something went wrong
ts
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>