# List Invoices by Appointment

Endpoint: GET /appointment/{appointment_id}/invoice
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

## Path parameters:

  - `appointment_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 |
|---|---|
| owing | [double](/#numeric) |
| payment_id | [integer](/#numeric) |
| created | [timestamp](/#timestamp) |
| updated | [timestamp](/#timestamp) |
| invoice_date | [date](/#date) |
| invoice_number | [integer](/#numeric) |

## Response 200:

  - `200` (unknown)
    Successful

## Response 200 fields (application/json):

  - `invoices` (array)

  - `invoices.row_num` (integer)

  - `invoices.total_rows` (integer)

  - `invoices.links` (object)

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

  - `invoices.tenant_id` (integer)

  - `invoices.invoice_id` (integer)

  - `invoices.client_id` (integer)

  - `invoices.account_id` (integer)

  - `invoices.invoice_date` (string)

  - `invoices.issued` (string)
    RFC 3339 UTC date-time (Z) with microsecond precision.
    Example: 2020-09-12T11:09:42.687393Z

  - `invoices.due_date` (string)

  - `invoices.invoice_number` (integer)

  - `invoices.invoice_notes` (string)

  - `invoices.practice_notes` (string)

  - `invoices.business_id` (integer)

  - `invoices.payer_id` (integer)

  - `invoices.created` (string)
    RFC 3339 UTC date-time (Z) with microsecond precision.
    Example: 2020-09-12T11:09:42.687393Z

  - `invoices.updated` (string)
    RFC 3339 UTC date-time (Z) with microsecond precision.
    Example: 2020-09-12T11:09:42.687393Z

  - `invoices.created_by_user_id` (integer)

  - `invoices.updated_by_user_id` (integer)

  - `invoices.invoice_items` (array)

  - `invoices.invoice_items.invoice_item_id` (integer)

  - `invoices.invoice_items.item_time` (string)
    ISO 8601 local datetime in the tenant's timezone.
    Example: 2026-01-01T12:05:30

  - `invoices.invoice_items.item_id` (integer)

  - `invoices.invoice_items.description` (string)

  - `invoices.invoice_items.debit` (number)

  - `invoices.invoice_items.paid` (number)

  - `invoices.invoice_items.discount` (number)

  - `invoices.invoice_items.write_off` (number)

  - `invoices.invoice_items.owing` (number)

  - `invoices.invoice_items.gst` (number)

  - `invoices.invoice_items.client_id` (integer)

  - `invoices.invoice_items.account_id` (integer)

  - `invoices.invoice_items.fee_cat_id` (integer)

  - `invoices.invoice_items.practitioner_id` (integer)

  - `invoices.invoice_items.quantity` (number)

  - `invoices.invoice_items.appointment_id` (integer)

  - `invoices.invoice_items.unit_price` (number)

  - `invoices.invoice_items.unit_discount` (number)

  - `invoices.invoice_items.unit_gst` (number)

  - `invoices.invoice_items.payment_items` (array)

  - `invoices.invoice_items.payment_items.payment_item_id` (integer)

  - `invoices.invoice_items.payment_items.payment_id` (integer)

  - `invoices.invoice_items.payment_items.amount` (number)

  - `invoices.invoice_items.payment_items.gst` (number)

  - `invoices.invoice_items.payment_items.allocated_time` (string)
    RFC 3339 UTC date-time (Z) with microsecond precision.
    Example: 2020-09-12T11:09:42.687393Z

  - `total_entries` (integer)

  - `links` (object)

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

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

  - `links.next` (string)
    Example: https://api.pracsuite.com/v1/appointment/1/invoice?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 404:

  - `404` (unknown)
    Not Found

## Response 404 fields (application/json):

  - `error` (object, required)

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

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

  - `error.detail` (string)
    Human readable explanation of the error
    Example: Could not find {Resource} with ID {ID_HERE}

  - `request_id` (string)
    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

