> ## Documentation Index
> Fetch the complete documentation index at: https://docs.splose.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a paged array of appointments

> Get a paged array of appointments



## OpenAPI

````yaml get /appointments
openapi: 3.0.0
info:
  version: 1.0.0
  title: splose public API
  description: "\nWelcome to the splose API documentation. splose serves as a comprehensive Allied Health & NDIS practice management software designed to streamline administrative tasks and foster the growth of your practice.\n\n# Introduction\nThe splose API follows a REST architectural style, offering JSON-encoded responses, standard HTTP response codes, easily understandable resource-oriented URLs, and robust authentication mechanisms.\n\n# Authentication\n### API Key Authentication\nThe splose API employs API keys for request authentication. Workspace owners can apply for and manage API keys through the splose dashboard. It's crucial to safeguard the API key, as it grants the same permissions as the associated user.\n\n### Bearer Authentication\nAuthentication for API access is achieved via Bearer Authentication. Include the API key in the request header using the format: `Authorization: Bearer your_api_key`.\n\n### Secure Communication\nAll API requests must be conducted over HTTPS. Requests made over plain HTTP will not succeed. Additionally, unauthenticated API requests will result in failure.\n\n# Rate limit\nThere are limits to the number of API calls that your application can make with one API key.\n\n+ Minute Limit: 60 calls per minute\n\n# Error\nsplose uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. \nCodes in the 4xx range indicate an error that failed given the information provided. Codes in the 5xx range indicate an error with splose's servers.\n\nError types:\n+ 400 - Bad request: the request failed due to missing or invalid parameters.\n+ 401 - Unauthorized: No valid API key provided.\n+ 404 - Not Found: \tThe requested resource doesn't exist.\n+ 429 - Too Many Requests: Too many requests hit the API too quickly.\n+ 500 - Internal Server Error : Something went wrong on splose's end.\n\n# Datetime\nAll datetime values provided in request parameters and responses are in Coordinated Universal Time (UTC). The accepted datetime formats are outlined below:\n+ 2023-07-01\n+ 2023-07-01T00:00:00Z\n+ 2023-07-01T00:00:00.000Z\n\n# Pagination\n\n### Pagination for Multiple Objects\nFor endpoints returning multiple objects, pagination is in place to manage response sizes. Each response is limited to a certain number of objects. \nAdditionally, the response includes a `links` field that provides URLs for fetching the next and/or previous pages, if applicable.\n\n### Manual Positioning\nYou have the option to manually specify the `id_gt` or `id_lt` value as a request parameter. This allows you to retrieve objects starting from a specific position. If neither of these values is provided, the initial page of objects will be returned by default.\n+ `id_gt`: Request for next page of objects with id greater than the specified value. \n+ `id_lt`: Request for previous page of objects with id less than the specified value. \n\n# Realtime feed\nCertain users may require real-time data retrieval. Given the substantial data volume, retrieving the complete dataset may not be efficient. To address this, we offer the option to retrieve data based on its update timestamp. This approach necessitates fetching the entire dataset only during the initial request. Subsequent retrievals involve fetching solely the modified data to replace outdated information.\n+ `update_gt`: Request for objects updated after the specified datetime. \n+ `update_lt`: Request for objects updated before the specified datetime. \n\n# Change log\n+ 2024-04-10: add payment method and payment endpoints\n+ 2024-02-28: add availability endpoint\n"
  contact:
    email: support@splose.com
servers:
  - url: https://api.splose.com/v1
security: []
externalDocs:
  description: Find out more about splose
  url: https://splose.com
paths:
  /appointments:
    get:
      tags:
        - appointment
      summary: Get a paged array of appointments
      description: Get a paged array of appointments
      parameters:
        - schema:
            type: integer
            nullable: true
            description: The starting object id of the next page
            example: 200
          required: false
          name: id_gt
          in: query
        - schema:
            type: integer
            nullable: true
            description: The starting object id of the previous page
            example: 100
          required: false
          name: id_lt
          in: query
        - schema:
            anyOf:
              - type: string
              - type: string
            description: Search for objects updated after this date time
            example: '2023-07-30T09:00:00.000Z'
          required: false
          name: update_gt
          in: query
        - schema:
            anyOf:
              - type: string
              - type: string
            description: Search for objects updated before this date time
            example: '2023-07-30T09:00:00.000Z'
          required: false
          name: update_lt
          in: query
        - schema:
            type: string
            nullable: true
            enum:
              - 'true'
              - 'false'
            default: 'false'
            description: Whether archived objects should be retrieved, default is false
          required: false
          name: include_archived
          in: query
        - schema:
            anyOf:
              - type: string
              - type: string
              - nullable: true
            description: Search for appointments start after this date time
            example: '2023-07-30T09:00:00.000Z'
          required: false
          name: start_gt
          in: query
        - schema:
            anyOf:
              - type: string
              - type: string
              - nullable: true
            description: Search for appointments start before this date time
            example: '2023-07-30T09:00:00.000Z'
          required: false
          name: start_lt
          in: query
        - schema:
            type: number
            nullable: true
            description: Search for appointments with this patient id
            example: 1
          required: false
          name: patientId
          in: query
        - schema:
            type: number
            nullable: true
            description: Search for appointments with this practitioner id
            example: 1
          required: false
          name: practitionerId
          in: query
        - schema:
            type: string
            nullable: true
            enum:
              - Arrived
              - Did not arrive
              - Cancelled
              - Completed
            default: null
            description: Patient status of this appointment
          required: false
          name: status
          in: query
        - schema:
            anyOf:
              - type: string
              - type: string
              - nullable: true
            description: Search for appointments status update after this date time
            example: '2023-07-30T09:00:00.000Z'
          required: false
          name: status_update_gt
          in: query
        - schema:
            anyOf:
              - type: string
              - type: string
              - nullable: true
            description: Search for appointments status update before this date time
            example: '2023-07-30T09:00:00.000Z'
          required: false
          name: status_update_lt
          in: query
      responses:
        '200':
          description: A paged array of appointments
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          minimum: 0
                          exclusiveMinimum: true
                          description: Appointment id
                          example: 1
                        start:
                          anyOf:
                            - type: string
                            - type: string
                          description: Appointment start date time
                          example: '2023-07-30T09:00:00.000Z'
                        end:
                          anyOf:
                            - type: string
                            - type: string
                          description: Appointment end date time
                          example: '2023-07-30T09:00:00.000Z'
                        isUnavailableBlock:
                          type: boolean
                          nullable: true
                          default: false
                          description: >-
                            **@deprecated** - please refer to the new
                            [busy-time](/api-reference/endpoints/busy-time)
                            endpoint. 

                            Whether this time slot is unavailable, eg. busy time
                            or meeting
                          deprecated: true
                        busyTimePractitionerIds:
                          type: array
                          items:
                            type: integer
                            minimum: 0
                            exclusiveMinimum: true
                            example: 1
                          default: []
                          description: >-
                            **@deprecated** - please refer to the new
                            [busy-time](/api-reference/endpoints/busy-time)
                            endpoint. 

                            The practitioner ids of this multiple practitioners
                            busy time
                          deprecated: true
                        serviceId:
                          type: integer
                          nullable: true
                          minimum: 0
                          exclusiveMinimum: true
                          description: The service id of this appointment
                          example: 1
                        locationId:
                          type: integer
                          minimum: 0
                          exclusiveMinimum: true
                          description: The location id of this appointment
                          example: 1
                        practitionerId:
                          type: integer
                          nullable: true
                          minimum: 0
                          exclusiveMinimum: true
                          description: The practitioner id of this appointment
                          example: 1
                        maxPatients:
                          type: integer
                          minimum: 0
                          exclusiveMinimum: true
                          default: 1
                          description: >-
                            The max patient number of this appointment. A number
                            greater than 1 indicates a group appointment.
                        appointmentPatients:
                          type: array
                          items:
                            type: object
                            properties:
                              appointmentId:
                                type: integer
                                minimum: 0
                                exclusiveMinimum: true
                                description: Appointment id
                                example: 1
                              patientId:
                                type: integer
                                minimum: 0
                                exclusiveMinimum: true
                                description: Patient id
                                example: 1
                              caseId:
                                type: integer
                                nullable: true
                                minimum: 0
                                exclusiveMinimum: true
                                description: The case id of this appointment
                                example: 1
                              status:
                                type: string
                                nullable: true
                                enum:
                                  - Arrived
                                  - Did not arrive
                                  - Cancelled
                                  - Completed
                                default: null
                                description: Patient status of this appointment
                              note:
                                type: string
                                nullable: true
                                description: Note for the appointment patient
                                example: Some notes
                              doNotInvoice:
                                type: boolean
                                nullable: true
                                default: false
                                description: >-
                                  Whether this appointment patient will not be
                                  invoiced
                              invoiceId:
                                type: integer
                                nullable: true
                                minimum: 0
                                exclusiveMinimum: true
                                description: Invoice id of this appointment patient
                                example: 1
                              cancellationReason:
                                type: string
                                nullable: true
                                description: >-
                                  The cancellation reason if the appointment is
                                  cancelled
                                example: Other
                              cancellationRate:
                                type: number
                                nullable: true
                                description: >-
                                  The billable rate in percentage if the
                                  appointment is cancelled
                                example: 30
                              cancellationNote:
                                type: string
                                nullable: true
                                description: >-
                                  The cancellation note if the appointment is
                                  cancelled
                                example: Some notes
                              statusUpdatedAt:
                                anyOf:
                                  - type: string
                                  - type: string
                                  - nullable: true
                                description: The status update time
                                example: '2023-07-30T09:00:00.000Z'
                            required:
                              - appointmentId
                              - patientId
                              - caseId
                              - status
                              - note
                              - invoiceId
                              - cancellationReason
                              - cancellationRate
                              - cancellationNote
                              - statusUpdatedAt
                          description: The status of each patient of this appointment
                        repeatId:
                          type: string
                          nullable: true
                          description: An recurring appointment will have this repeat id
                          example: 12345678-abcd-4321-dcba-12a34b56c78d
                        recurringRule:
                          type: string
                          nullable: true
                          description: The rule for recurring appointment
                          example: >-
                            DTSTART:2023080T010000ZRRULE:FREQ=WEEKLY;INTERVAL=2;COUNT=6
                        unit:
                          type: string
                          nullable: true
                          enum:
                            - Hour
                            - Each
                          default: Hour
                          description: The appointment unit
                        pricing:
                          type: number
                          nullable: true
                          description: The appointment unit price, in dollar
                          example: 193.99
                        total:
                          type: number
                          nullable: true
                          description: The appointment total price without tax, in dollar
                          example: 193.99
                        taxType:
                          anyOf:
                            - type: string
                              enum:
                                - STANDARD
                                - ZERO
                                - EXEMPT
                                - REDUCED
                            - type: string
                            - nullable: true
                          description: Tax type, check Splose support for more info
                          example: STANDARD
                        supportItemIds:
                          type: array
                          items:
                            type: integer
                            minimum: 0
                            exclusiveMinimum: true
                            example: 1
                          description: Array of support item ids of this appointment
                          example:
                            - 1
                        note:
                          type: string
                          nullable: true
                          description: The appointment note
                          example: Some notes
                        archived:
                          type: boolean
                          nullable: true
                          default: false
                          description: Whether the appointment has been archived
                        createdAt:
                          anyOf:
                            - type: string
                            - type: string
                          description: Object creation date time
                          example: '2023-07-30T09:00:00.000Z'
                        updatedAt:
                          anyOf:
                            - type: string
                            - type: string
                          description: Object update date time
                          example: '2023-07-30T09:00:00.000Z'
                        deletedAt:
                          anyOf:
                            - type: string
                            - type: string
                            - nullable: true
                          default: null
                          description: Object archived date time
                          example: '2023-07-30T09:00:00.000Z'
                      required:
                        - id
                        - start
                        - end
                        - serviceId
                        - locationId
                        - practitionerId
                        - maxPatients
                        - appointmentPatients
                        - repeatId
                        - recurringRule
                        - unit
                        - pricing
                        - total
                        - taxType
                        - supportItemIds
                        - note
                        - deletedAt
                  links:
                    type: object
                    properties:
                      previousPage:
                        type: string
                        description: The link to retrieve next page
                        example: /v1/${object_type}?id_gt=200
                      nextPage:
                        type: string
                        description: The link to retrieve previous page
                        example: /v1/${object_type}?id_lt=100
                required:
                  - data
                  - links
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````