Customers

List sub-accounts of the authenticated customer

Returns the list of sub-accounts of the currently authenticated Customer (Customers whose parent_id equals the authenticated Customer's ID).

Customer authentication only. This endpoint is available exclusively under customer authentication (an access token issued with auth_type=customer). Requests authenticated as an administrator or by an API key receive 403 Forbidden.

Only listing is supported — view, create, update and delete are disabled for this entry point.

The ownership filter is enforced on the server side: results are always restricted to parent_id = <authenticated customer id>. Search parameters cannot bypass it — passing ?main_attributes[id]=... (or any other main_attributes) for a Customer that is not your sub-account returns an empty array. Standard order, limit and offset options still apply within the ownership scope. The password field is never returned.

get/admin/customers/customer-sub-accounts

Request

  • Base URL: https://demo.splynx.com/api/2.0
  • URL: https://demo.splynx.com/api/2.0/admin/customers/customer-sub-accounts
  • Auth: HTTP basic

Response

loginstring

Login

statusstring

Status: 'new', 'active', 'blocked', 'disabled'. Default value: 'new'

partner_idnumber required

Partner id. You can get it at page "Administration / Partners"

location_idnumber required

Location id. You can get it at page "Administration / Locations"

parent_idnumber

ID of the main (parent) account.

namestring required

Full name

emailstring

Email

billing_emailstring

Billing email

phonestring

Phone number

categorystring required

Category: 'person' (for private person) or 'company' (for company). Default value: 'person'

street_1string

Address part #1

zip_codestring

Zip

citystring

City

date_addstring

Date of adding. Format: 'YYYY-MM-DD'. Default value: current date

subdivision_idnumber

State/province ID

conversion_datestring

Date conversion customer.

daily_prepaid_costnumber

Cost of daily prepayment.

passwordstring

Password

gpsstring

Geo data customer. Format: '49.9902794,36.2303893'.

mrr_totalnumber

Mrr total. Default value: 0.0000.

billing_typestring

Billing type.

added_bystring

Source of customer addition (e.g. 'admin', 'api').

added_by_idnumber

Id of the administrator who added the customer.

last_onlinestring

Date last online customer.

last_updatestring

Last date update customer.

account_type'regular' | 'main' | 'sub_independent' | 'sub_aggregated'

Read-only. Account type. Shows only if sub accounts are used in the system

can_manage_aggregated_sub_accounts'0' | '1'

Read-only. Whether this account can manage its linked aggregated sub-accounts: 1 for a main account that has sub-account management enabled, otherwise 0. Shows only if sub accounts are used in the system.

idnumber required

Customer ID

Example response

[
  {
    "login": "john_doe_jr",
    "status": "active",
    "partner_id": 1,
    "location_id": 1,
    "parent_id": 1,
    "name": "John Doe Jr",
    "email": "john.doe.jr@domain.com",
    "billing_email": "",
    "phone": "555-0199",
    "category": "person",
    "street_1": "Paper Street",
    "zip_code": "",
    "city": "",
    "date_add": "",
    "customer_labels": [],
    "subdivision_id": 1,
    "conversion_date": "",
    "daily_prepaid_cost": 0,
    "id": 2,
    "gps": "",
    "mrr_total": 0,
    "billing_type": "",
    "added_by": "admin",
    "added_by_id": 1,
    "last_online": "",
    "last_update": "",
    "account_type": "regular",
    "can_manage_aggregated_sub_accounts": "0",
    "contacts": []
  }
]

Changes

No recorded changes to this operation across all 1 revision of this API.