# List Businesses

Endpoint: GET /business
Version: v1
Security: x-api-key, a-api-key

## Security:

  - `x-api-key` (unknown)
    apiKey in header x-api-key

  - `a-api-key` (unknown)
    apiKey in header a-api-key

## 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) |
| archived | [timestamp](/#timestamp) |
| updated | [timestamp](/#timestamp) |

## Response 200:

  - `200` (unknown)
    Successful

## Response 200 fields (application/json):

  - `businesses` (array)

  - `businesses.row_num` (integer)

  - `businesses.total_rows` (integer)

  - `businesses.links` (object)

  - `businesses.links.self` (string)
    Example: https://api.pracsuite.com/v1/business/1

  - `businesses.links.appointments` (string)
    Example: https://api.pracsuite.com/v1/business/1/appointment

  - `businesses.tenant_id` (integer)
    Example: 1

  - `businesses.business_id` (integer)
    Example: 123

  - `businesses.business_name` (string)

  - `businesses.display_name` (string)

  - `businesses.address_1` (string | null)

  - `businesses.address_2` (string | null)

  - `businesses.address_3` (string | null)

  - `businesses.address_4` (string | null)

  - `businesses.suburb` (string | null)

  - `businesses.address_state` (string | null)

  - `businesses.postcode` (string | null)

  - `businesses.country` (string | null)

  - `businesses.archive` (boolean | null)
    Example: false

  - `businesses.phone` (string | null)

  - `businesses.fax` (string | null)

  - `businesses.email` (string | null)

  - `businesses.website` (string | null)

  - `businesses.appointment_start_time` (string | null)

  - `businesses.appointment_end_time` (string | null)

  - `businesses.registration_number` (string | null)

  - `businesses.registration_type` (string | null)

  - `businesses.short_description` (string | null)

  - `businesses.ndis_registration_number` (string | null)

  - `businesses.appointment_intervals` (integer | null)

  - `total_entries` (integer)

  - `links` (object)

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

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

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

## Response 400:

  - `400` (unknown)
    Bad Request

## 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:

  - `401` (unknown)
    Unauthorised

## 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:

  - `403` (unknown)
    Forbidden

## 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:

  - `500` (unknown)
    Internal Server Error

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

