swagger: '2.0'
info:
  x-ibm-name: ndis-pace-historical
  title: NDIS PACE Historical
  version: 4.0.0
  description: Request the PACE Historical details for a provider
  contact:
    name: NDIA Support Team
    email: api.support@ndis.gov.au
schemes:
  - https
host: api.ndis.gov.au
basePath: /sharedservices/ndis-api/ndis/ext-int-part/4.0/pace/historical
consumes:
  - application/json
produces:
  - application/json
security:
  - clientIdHeader: []
securityDefinitions:
  clientIdHeader:
    type: apiKey
    in: header
    name: X-IBM-Client-Id
    description: 'apiKey provided during registration. Max Length(64). example: aa111aa-11a1-1a11-111a-1a1a11aa111a'
x-ibm-configuration:
  testable: true
  enforced: true
  cors:
    enabled: true
  phase: realized
  type: rest
  servers:
    - url: https://api.ndis.gov.au/sharedservices/ndis-api/ndis/ext-int-part/4.0/pace/historical
      description: ''
      type:
        - production
        - development
    - url: https://api.ndis.gov.au/sharedservices/ndis-api/ndis/ext-int-part/4.0/pace/historical
      description: ''
      type:
        - production
        - development
paths:
  /budgets:
    get:
      responses:
        '200':
          description: 'Success: The request was successful'
          schema:
            $ref: '#/definitions/get_historical_budget_response'
        '400':
          description: 'Bad Request: A validation resulted in the request being rejected.'
          schema:
            $ref: '#/definitions/http_error'
        '401':
          description: 'Unauthorised: No authentication credentials provided or authentication has failed.'
          schema:
            $ref: '#/definitions/http_error'
        '404':
          description: The URI path or the requested record was not found.
          schema:
            $ref: '#/definitions/http_error'
        '500':
          description: 'Internal Server Error: An internal error has occurred and the server is unable to respond.'
          schema:
            $ref: '#/definitions/http_error'
      tags:
        - GET
      operationId: get_historical_budget
      summary: This Operation will allow Plan Managers and Support Coordinators to retrieve PACE participant's historical budget details.
      description: |-

        <b>Participant with PACE Plan</b></br>

        This API will allow Plan Managers and Support Coordinators to retrieve PACE participant's historical budget details.
        * Historical Budget API is only for participants with a PACE plan.
        * Historical Budget API is reflecting only historical budget details of the plan not the details of current budget 
        * Plan Manager and Support Coordinator payload response will differ details on both payloads found in release notes

        To get a successful response, please ensure that as a Plan Manager and Support Coordinator, you have:
        1. Plan Manager or Support Coordinator relationship with the participant to view historical budget details</br></br>
        AND
        2. Participant NDIS Number.
        3. Date of Birth
        4. Last Name
      parameters:
        - $ref: '#/parameters/participant_surname'
        - $ref: '#/parameters/date_of_birth'
    parameters:
      - $ref: '#/parameters/authorization'
      - $ref: '#/parameters/participant'
  /plans:
    get:
      responses:
        '200':
          description: 200 OK
          schema:
            $ref: '#/definitions/get_historical_plan_response'
        '400':
          description: 'Bad Request: A validation resulted in the request being rejected.'
          schema:
            $ref: '#/definitions/http_error'
        '401':
          description: 'Unauthorised: No authentication credentials provided or authentication has failed.'
          schema:
            $ref: '#/definitions/http_error'
        '404':
          description: The URI path or the requested record was not found.
          schema:
            $ref: '#/definitions/http_error'
        '500':
          description: 'Internal Server Error: An internal error has occurred and the server is unable to respond.'
          schema:
            $ref: '#/definitions/http_error'
      tags:
        - GET
      summary: This Operation will allow Plan Managers and Support Coordinators to retrieve PACE participant's historical plan details.
      operationId: get_historical_plans
      description: |-

        <b>Participant with PACE Plan</b></br>

        This API will allow Plan Managers and Support Coordinators to retrieve a PACE participant's historical plan details. 
        * This API is only for participants with a PACE plan.
        * Historical Plan API is reflecting only historical plan details of the plan not the details of current plan
        * The My Provider role has no access to historical plans in line with existing Portal functionality

        To get a successful response, please ensure that as a Plan Manager and Support Coordinator, you have:
        1. A Plan Manager or Support Coordinator relationship with the PACE participant to view historical plan details.</br></br>
        AND
        2. Participant NDIS Number
        3. Date of Birth 
        4. Last Name 
    parameters:
      - name: participant
        type: integer
        required: true
        in: query
        description: NDIS number of Participant
        format: int64
        x-example: 430111111
      - $ref: '#/parameters/participant_surname'
      - $ref: '#/parameters/date_of_birth'
      - $ref: '#/parameters/authorization'
  /goals:
    get:
      responses:
        '200':
          description: 200 OK
          schema:
            $ref: '#/definitions/get_historical_goals_response'
        '400':
          description: 'Bad Request: A validation resulted in the request being rejected.'
          schema:
            $ref: '#/definitions/http_error'
        '401':
          description: 'Unauthorised: No authentication credentials provided or authentication has failed.'
          schema:
            $ref: '#/definitions/http_error'
        '404':
          description: The URI path or the requested record was not found.
          schema:
            $ref: '#/definitions/http_error'
        '500':
          description: 'Internal Server Error: An internal error has occurred and the server is unable to respond.'
          schema:
            $ref: '#/definitions/http_error'
      tags:
        - GET
      summary: This Operation will allow Plan Managers and Support Coordinators to retrieve PACE participant's historical goals details.
      operationId: get_historical_goals
      description: |-

        <b>Participant with PACE Plan</b></br>

        This API will allow Plan Managers and Support Coordinators to retrieve a PACE participant's historical goals (inactive goals) details.
        * This API is only for PACE Participant
        * Historical Goals Include only Inactive Goals
        * Support Coordinator will additionally be able view details About Participants
        * The My Provider role has no access to Historical Goals in line with existing Portal functionality

        To get a successful response, please ensure that as a Plan Manager and Support Coordinator, you have:
        1. Plan Manager or Support Coordinator relationship with the participant </br></br>
        AND
        2. Participant NDIS Number
        3. Date of Birth 
        4. Last Name 
    parameters:
      - $ref: '#/parameters/participant'
      - $ref: '#/parameters/participant_surname'
      - $ref: '#/parameters/date_of_birth'
      - $ref: '#/parameters/authorization'
parameters:
  authorization:
    name: authorization
    type: string
    required: true
    in: header
    description: Bearer token
    x-example: valid Authorizaton Token
  participant_plan_id:
    name: participant_plan_id
    type: integer
    required: false
    in: header
    description: Plan ID for which details are required
    format: int64
    x-example: 1011111
  participant:
    name: participant
    type: integer
    required: true
    in: header
    description: The participant NDIS ID for whom the service was provided. Max Length(10)
    x-example: 430111111
  participant_surname:
    name: participant_surname
    type: string
    required: true
    in: query
    description: Participant Last Name. Max Length(40)
    x-example: surname
  date_of_birth:
    name: date_of_birth
    type: string
    required: true
    in: query
    description: Date of Birth is captured on the login screen. Max Length(8)
    format: date
definitions:
  get_historical_budget_response:
    description: Response for Getting a budget
    properties:
      success:
        type: boolean
        example: true
      result:
        $ref: '#/definitions/get_historical_budget_response_data'
      errors:
        $ref: '#/definitions/errors'
    additionalProperties: false
    required:
      - success
  get_historical_budget_response_data:
    description: Fields of a historical budget used to Get it
    properties:
      historical_budget:
        $ref: '#/definitions/get_historical_budgets_response_array'
    additionalProperties: false
  get_historical_budgets_response_array:
    description: Array - historical Budget
    type: array
    items:
      $ref: '#/definitions/get_historical_budgets_response_data'
  get_historical_budgets_response_data:
    description: Fields of historical budget
    properties:
      end_date:
        type: string
        description: End Date
        format: date
        example: '2023-03-20'
      start_date:
        type: string
        description: Start Date
        format: date
        example: '2023-03-20'
      total_plan_available:
        type: number
        format: double
        description: The total budget for plan.
        example: 100
      bgt_typ_lvl_dtls:
        $ref: '#/definitions/get_bgt_typ_lvl_dtls_response_array'
    additionalProperties: false
  get_bgt_typ_lvl_dtls_response_array:
    description: Array - historical Budget
    type: array
    items:
      $ref: '#/definitions/get_bgt_typ_lvl_dtls_response_data'
  get_bgt_typ_lvl_dtls_response_data:
    description: Fields of historical budget
    properties:
      budget_type_total_available:
        type: number
        format: double
        description: The total budget for type
        example: 100
      budget_type:
        type: string
        description: Budget type
        example: Stated
      plan_management:
        $ref: '#/definitions/get_hist_plan_management_response_array'
    additionalProperties: false
  get_hist_plan_management_response_array:
    description: Array - Plan Management
    type: array
    items:
      $ref: '#/definitions/get_hist_plan_management_response__data'
  get_hist_plan_management_response__data:
    description: Fields of plan management
    properties:
      management_total_available:
        type: number
        format: double
        description: The management total
        example: 0
      fund_management_type:
        type: string
        description: Fund management type
        example: Plan-managed
      funded_supports:
        $ref: '#/definitions/get_funded_supports_response_array'
    additionalProperties: false
  get_funded_supports_response_array:
    description: Array - Funded supports
    type: array
    items:
      $ref: '#/definitions/get_funded_supports_response__data'
  get_funded_supports_response__data:
    description: Fields of Funded Supports
    properties:
      support_category:
        type: string
        description: Support Category Code.
        example: Home Modifications
      support_type:
        type: string
        description: Support Type.
        example: Capital
      budget_status:
        type: string
        description: Budget Status.
        example: Available
      end_date:
        type: string
        description: End Date
        format: date
        example: '2023-03-20'
      start_date:
        type: string
        description: Start Date
        format: date
        example: '2023-03-20'
      spent_amount:
        type: number
        format: double
        description: Spent Amount
        example: 0
      remaining_amount:
        type: number
        format: double
        description: Remaining Amount
        example: 100
      approved_amount:
        type: number
        format: double
        description: Approved Amount
        example: 100
    additionalProperties: false
  get_historical_plan_response:
    properties:
      success:
        type: boolean
        description: Status of the request
        example: true
      result:
        description: Result of the request
        $ref: '#/definitions/get_historical_plan_base_response_data'
      errors:
        $ref: '#/definitions/errors'
        description: Array of string errors
    additionalProperties: false
    required:
      - success
  get_historical_plan_base_response_data:
    description: Fields of a historical Plan
    properties:
      historical_plan:
        $ref: '#/definitions/get_historical_plan_response_array'
    additionalProperties: false
  get_historical_plan_response_array:
    description: Array - historical Plan
    type: array
    items:
      $ref: '#/definitions/get_historical_plan_response_data'
  get_historical_plan_response_data:
    description: Fields of historical plan
    properties:
      end_date:
        type: string
        description: End Date
        format: date
        example: '2023-03-20'
      start_date:
        type: string
        description: Start Date
        format: date
        example: '2026-03-20'
    additionalProperties: false
  get_historical_goals_response:
    properties:
      success:
        type: boolean
        description: Status of the request
        example: true
      result:
        description: Result of the request
        $ref: '#/definitions/get_historical_goals_base_response_data'
      errors:
        $ref: '#/definitions/errors'
        description: Array of string errors
    additionalProperties: false
    required:
      - success
  get_historical_goals_base_response_data:
    description: Fields of a historical goals
    properties:
      historical_goals:
        $ref: '#/definitions/get_historical_goals_response_array'
      about_me:
        description: About me
        $ref: '#/definitions/get_about_me_response_data'
    additionalProperties: false
  get_historical_goals_response_array:
    description: Array - historical goals
    type: array
    items:
      $ref: '#/definitions/get_historical_goals_response_data'
  get_historical_goals_response_data:
    description: Fields of historical goals
    properties:
      how_reach:
        type: string
        description: How reach
        example: Training1
      goal_description:
        type: string
        description: Goal Description
        example: Goal1
      goal_status:
        type: string
        description: Goal Status
        example: Inactive
      goal_created:
        type: string
        description: Goal Created Date
        example: 2024-05-14T05:54:10.000+0000
    additionalProperties: false
  get_about_me_response_data:
    description: Fields of a about me
    properties:
      daily_life:
        type: string
        description: Daily Life
        example: Wheel chair
      strengths:
        type: string
        description: Strengths
        example: Software skills
      provided_by:
        type: string
        description: Provided By
        example: Participant
      living_arrangements:
        type: string
        description: Living Arrangements
        example: Support for online tutorials
    additionalProperties: false
  errors:
    description: A set of errors
    type: array
    items:
      type: string
      example: error
  http_error:
    description: A single HTTP response
    properties:
      http_code:
        type: string
        example: 400
        description: HTTP status code
      http_message:
        type: string
        example: Bad Request
        description: HTTP Message
      more_information:
        type: string
        example: One or more required API parameters are missing.
        description: Additional information
    additionalProperties: false
tags: []
