AlayaCare visit sys_admin API

The visit sys_admin API from AlayaCare — 2 operation(s) for visit sys_admin.

OpenAPI Specification

alayacare-visit-sys-admin-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  version: 1.0.19-oas3
  title: AlayaCare Accounting Accounts visit sys_admin API
  description: '**AlayaCare IDs:**

    The following terms are used to reference IDs that identify resources in AlayaCare:

    - id

    - visit_id

    - premium_id

    - visit_premium_id

    - employee_id

    - cost_centre_id

    - client_id


    **External IDs**

    The following terms are used to reference IDs that identify resources systems external to AlayaCare:

    - employee_external_id

    - client_external_id


    External IDs are required to be unique.

    No other assumptions are made regarding their format they are treated as strings.

    '
servers:
- url: https://example.alayacare.com/ext/api/v2/accounting
security:
- basic_auth: []
tags:
- name: visit sys_admin
paths:
  /v1/sys_admin/visits:
    get:
      tags:
      - visit sys_admin
      description: '# Authorization

        Required role: `sys_admin`.


        # Description

        Get a collection of Visits.

        '
      parameters:
      - in: query
        name: id
        schema:
          type: string
          format: uuid
      - in: query
        name: inbox_id
        schema:
          type: string
      - in: query
        name: outbox_id
        schema:
          type: string
      - in: query
        name: demand_persona_id
        schema:
          type: string
          format: uuid
      - in: query
        name: supply_persona_id
        schema:
          type: string
          format: uuid
      - $ref: '#/components/parameters/ReferralIdQueryParam'
      - $ref: '#/components/parameters/ServiceIdQueryParam'
      - in: query
        name: service_outbox_id
        schema:
          type: string
        description: ID of a service in the demand system.
        required: false
      - $ref: '#/components/parameters/PageNumberParam'
      - $ref: '#/components/parameters/ItemsPerPageParam'
      - in: query
        name: sort_by
        schema:
          type: string
          enum:
          - last_modified
          - start_at
          default: start_at
      - $ref: '#/components/parameters/SortOrderParam'
      responses:
        200:
          description: Successfully retrieved a collection of Visits.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SysAdminVisitPageResponse'
      x-amazon-apigateway-integration:
        uri:
          Fn::Sub: arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${OfferApiFunctionV2.Arn}:live/invocations
        httpMethod: POST
        passthroughBehavior: when_no_match
        type: aws_proxy
  /v1/sys_admin/visits/{visit_id}:
    parameters:
    - $ref: '#/components/parameters/VisitIdPathParam'
    get:
      tags:
      - visit sys_admin
      description: '# Authorization

        Required role: `sys_admin`.


        # Description

        Get the details of a Visit.

        '
      responses:
        200:
          description: Successfully returned visit details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SysAdminVisitDetailResponse'
      x-amazon-apigateway-integration:
        uri:
          Fn::Sub: arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${OfferApiFunctionV2.Arn}:live/invocations
        httpMethod: POST
        passthroughBehavior: when_no_match
        type: aws_proxy
components:
  parameters:
    PageNumberParam:
      in: query
      name: page
      schema:
        $ref: '#/components/schemas/PageNumberCore'
    SortOrderParam:
      in: query
      name: sort_order
      schema:
        $ref: '#/components/schemas/SortOrderCore'
    ItemsPerPageParam:
      in: query
      name: items_per_page
      schema:
        $ref: '#/components/schemas/ItemsPerPageCore'
    ServiceIdQueryParam:
      in: query
      name: service_id
      schema:
        type: string
        format: uuid
    VisitIdPathParam:
      in: path
      name: visit_id
      schema:
        type: string
        format: uuid
      required: true
      description: ID of a visit.
    ReferralIdQueryParam:
      in: query
      name: referral_id
      schema:
        type: string
        format: uuid
  schemas:
    SysAdminVisitPageResponse:
      allOf:
      - $ref: '#/components/schemas/PageCore'
      - type: object
        properties:
          items:
            type: array
            items:
              $ref: '#/components/schemas/SysAdminVisitCollectionResponse'
    SysAdminVisitDetailResponse:
      type: object
      properties:
        visit:
          title: SysAdminVisitDetailCore
          type: object
          properties:
            id:
              type: string
              format: uuid
            outbox_id:
              type: string
            inbox_id:
              type: string
            referral_id:
              type: string
              format: uuid
            service_id:
              type: string
              format: uuid
            service_outbox_id:
              type: string
              minLength: 1
            status:
              type: string
              enum:
              - scheduled
              - deleted
              - cancelled
              - on_hold
            start_at:
              type: string
              format: date-time
            end_at:
              type: string
              format: date-time
            verified_start_at:
              type: string
              format: date-time
            verified_end_at:
              type: string
              format: date-time
          required:
          - status
          - id
          - referral_id
          - service_id
          - service_outbox_id
          - start_at
          - end_at
        supply:
          title: SysAdminVisitDetailSupplyResponse
          properties:
            id:
              type: string
              format: uuid
          required:
          - id
        supply_employee:
          title: SysAdminVisitDetailSupplyEmployeeResponse
          type: object
          properties:
            id:
              type: string
              format: uuid
            supply_persona_id:
              type: string
              format: uuid
            ssn_placeholder:
              type: string
            inbox_employee_id:
              type: integer
            first_name:
              type: string
            last_name:
              type: string
            date_of_birth:
              type: string
              format: date
            data:
              type: object
          required:
          - id
          - supply_persona_id
          - ssn_placeholder
          - inbox_employee_id
          - first_name
          - last_name
        tasks:
          title: SysAdminVisitTaskResponse
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
              outbox_id:
                type: string
              is_completed:
                type: boolean
              completed_at:
                type: string
                format: date-time
              completion_comment:
                type: string
            required:
            - id
            - is_completed
      required:
      - supply
      - visit
      - tasks
    PageNumberCore:
      type: integer
      minimum: 1
      default: 1
    ItemsPerPageCore:
      type: integer
      minimum: 1
      default: 100
    SysAdminVisitCollectionResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        outbox_id:
          type: string
        inbox_id:
          type: string
        referral_id:
          type: string
          format: uuid
        service_id:
          type: string
          format: uuid
        service_outbox_id:
          type: string
          minLength: 1
        status:
          type: string
          enum:
          - scheduled
          - deleted
          - cancelled
          - on_hold
        start_at:
          type: string
          format: date-time
        end_at:
          type: string
          format: date-time
      required:
      - status
      - id
      - referral_id
      - service_id
      - service_outbox_id
      - start_at
      - end_at
    SortOrderCore:
      type: string
      enum:
      - asc
      - desc
      default: desc
    PageCore:
      description: Root page schema for returning collections.
      type: object
      properties:
        page:
          $ref: '#/components/schemas/PageNumberCore'
        items_per_page:
          $ref: '#/components/schemas/ItemsPerPageCore'
        total_items:
          type: integer
          minimum: 0
        total_pages:
          type: integer
          minimum: 0
      required:
      - page
      - items_per_page
      - total_items
      - total_pages
  securitySchemes:
    basic_auth:
      type: http
      description: Basic HTTP auth over https
      scheme: basic