Accounts API

List accounts by customer

GET /rest/v1/subjects/customers/:customer_id/accounts

Request

Headers

Accept: application/json
Content-Type: application/json

Route

GET /rest/v1/subjects/customers/78299201/accounts

Response

Headers

Content-Type: application/json; charset=utf-8

Status

200 OK

Body

{
  "accounts": [
    {
      "n_account_id": 78299501,
      "n_currency_id": 1044,
      "vc_name": "Лицевой счет №1099",
      "vc_code": "1099",
      "vc_account": "1099",
      "vc_rem": null,
      "n_max_credit_limit": null,
      "actions": {
        "show": "http://example.org/rest/v1/subjects/customers/78299201/accounts/78299501",
        "edit": "http://example.org/rest/v1/subjects/customers/78299201/accounts/78299501/edit"
      }
    },
    {
      "n_account_id": 78305201,
      "n_currency_id": 1044,
      "vc_name": "account_for_destroy",
      "vc_code": "1100",
      "vc_account": "1100",
      "vc_rem": null,
      "n_max_credit_limit": null,
      "actions": {
        "show": "http://example.org/rest/v1/subjects/customers/78299201/accounts/78305201",
        "edit": "http://example.org/rest/v1/subjects/customers/78299201/accounts/78305201/edit"
      }
    },
    {
      "n_account_id": 78305901,
      "n_currency_id": 1044,
      "vc_name": "Лицевой счет №1102",
      "vc_code": "1102",
      "vc_account": "1102",
      "vc_rem": null,
      "n_max_credit_limit": null,
      "actions": {
        "show": "http://example.org/rest/v1/subjects/customers/78299201/accounts/78305901",
        "edit": "http://example.org/rest/v1/subjects/customers/78299201/accounts/78305901/edit"
      }
    }
  ],
  "navigation": {
    "self": "http://example.org/rest/v1/subjects/customers/78299201/accounts",
    "customer": "http://example.org/rest/v1/subjects/customers/78299201"
  }
}