# List Accounts for a Patient

Endpoint: GET /patient/{client_id}/account
Version: v1
Security: x-api-key, a-api-key

## Path parameters:

  - `client_id` (integer, required)

## Query parameters:

  - `page` (integer)

  - `page_size` (integer)

  - `sort_by` (array)
    Comma separated search fields. See [Sorting](/#sorting)

  - `q[]` (array)
    Filter result by one or more fields.

See [Query Filtering](/#query-filtering)

Available filters:

| Value | Format |
|---|---|
| created | [timestamp](/#timestamp) |
| updated | [timestamp](/#timestamp) |
| short_description | [string](/#string) |

## Response 200 fields (application/json):

  - `accounts` (array)

  - `accounts.row_num` (integer)

  - `accounts.total_rows` (integer)

  - `accounts.links` (object)

  - `accounts.links.self` (string, required)
    Example: https://api.pracsuite.com/v1/patient/1/account/1

  - `accounts.links.invoices` (string)
    Example: https://api.pracsuite.com/v1/patient/1/account/1/invoice

  - `accounts.links.payments` (string)
    Example: https://api.pracsuite.com/v1/patient/1/account/1/payment

  - `accounts.tenant_id` (integer)

  - `accounts.client_id` (integer)
    Example: 1

  - `accounts.archive` (boolean)
    Example: false

  - `accounts.bill_3rd_party` (boolean)
    Example: false

  - `accounts.short_description` (string)
    Example: Private

  - `accounts.billing_name` (string)

  - `accounts.email` (string)

  - `accounts.contact_name` (string)

  - `accounts.acc_no` (string)

  - `accounts.claim_number` (string)

  - `accounts.employer_name` (string)

  - `accounts.injury` (string)

  - `accounts.date_of_injury` (string)

  - `accounts.hospital` (string)

  - `accounts.fee_cat_id` (integer)

  - `accounts.client_no` (string)

  - `accounts.address_1` (string)

  - `accounts.address_2` (string)

  - `accounts.address_3` (string)

  - `accounts.address_4` (string)

  - `accounts.suburb` (string)

  - `accounts.address_state` (string)

  - `accounts.postcode` (string)

  - `accounts.country` (string)

  - `accounts.phone` (string)

  - `accounts.fax` (string)

  - `accounts.notes` (string)

  - `accounts.payer_id` (integer)

  - `accounts.payer_contact_id` (integer)

  - `accounts.custom_field_name` (string)
    Example: Custom

  - `accounts.custom_field_value` (string)

  - `accounts.bill_family` (boolean)
    Example: false

  - `accounts.referrals` (array)

  - `accounts.referrals.referral_id` (integer)

  - `accounts.referrals.referral_date` (string)

  - `accounts.referrals.end_date` (string)

  - `accounts.referrals.indefinite_expiry` (boolean)

  - `accounts.referrals.referrer_id` (integer)

  - `accounts.referrals.archived` (boolean)

  - `accounts.referrals.current_referral` (boolean)

  - `accounts.treatment_plans` (array)

  - `accounts.treatment_plans.treatment_plan_id` (integer)

  - `accounts.treatment_plans.description` (string)

  - `accounts.treatment_plans.archived` (boolean)

  - `accounts.treatment_plans.start_date` (string)

  - `accounts.treatment_plans.end_date` (string)

  - `accounts.treatment_plans.tp_type` (string)

  - `accounts.treatment_plans.tp_limit` (integer)

  - `accounts.treatment_plans.alert_after` (integer)

  - `accounts.treatment_plans.tp_state` (string)

  - `accounts.treatment_plans.prevent_invoicing` (boolean)

  - `accounts.treatment_plans.enable_funding_periods` (boolean)

  - `accounts.treatment_plans.periods` (array)

  - `accounts.treatment_plans.periods.start_date` (string)

  - `accounts.treatment_plans.periods.end_date` (string)

  - `accounts.treatment_plans.periods.tp_limit` (integer)

  - `accounts.treatment_plans.periods.alert_after` (integer)

  - `total_entries` (integer)

  - `links` (object)

  - `links.self` (string)
    Example: https://api.pracsuite.com/v1/patient/1/account?page=2

  - `links.previous` (string)
    Example: https://api.pracsuite.com/v1/patient/1/account?page=1

  - `links.next` (string)
    Example: https://api.pracsuite.com/v1/patient/1/account?page=3

## Response 400 fields (application/json):

  - `error` (object, required)

  - `error.status` (integer)
    Example: 400

  - `error.code` (string)
    Example: INVALID_PARAMS

  - `error.detail` (string)
    Human readable explanation of the error
    Example: One or more request parameters are invalid.

  - `request_id` (string, required)
    Example: 00000000-0000-0000-0000-000000000000

## Response 401 fields (application/json):

  - `error` (object, required)

  - `error.status` (integer)
    Example: 403

  - `error.code` (string)
    Example: UNAUTHORIZED

  - `error.detail` (string)
    Human readable explanation of the error
    Example: Access could not be verified for this request.

  - `request_id` (string, required)
    Example: 00000000-0000-0000-0000-000000000000

## Response 403 fields (application/json):

  - `error` (object, required)

  - `error.status` (integer)
    Example: 403

  - `error.code` (string)
    Example: MISSING_AUTHENTICATION_TOKEN

  - `error.detail` (string)
    Human readable explanation of the error
    Example: Authentication token is missing or the requested endpoint does not exist

  - `request_id` (string, required)
    Example: 00000000-0000-0000-0000-000000000000

## Response 500 fields (application/json):

  - `error` (object, required)

  - `error.status` (integer)
    Example: 500

  - `error.code` (string)
    Example: SERVER_ERROR

  - `error.detail` (string)
    Human readable explanation of the error
    Example: An unexpected error occurred while processing your request. Please try again in a few minutes. If it keeps happening, contact support with Request ID: 00000000-0000-0000-0000-000000000000.

  - `request_id` (string, required)
    Example: 00000000-0000-0000-0000-000000000000

