swagger: '2.0'
info:
  x-ibm-name: ndis-budget
  title: NDIS Budget
  version: 4.0.0
  description: Request the budget 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/4.0/budget
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/4.0/budget
      description: ''
      type:
        - production
        - development
    - url: https://api.ndis.gov.au/sharedservices/ndis-api/ndis/4.0/budget
      description: ''
      type:
        - production
        - development
paths:
  /:
    get:
      responses:
        '200':
          description: 'Success: The request was successful'
          schema:
            $ref: '#/definitions/get_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_budget
      summary: This operation will allow the Digital Partners to retreive the details of a participant's budget.
      description: |-

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

        This API will allow Plan Managers to retrieve a participant's plan managed budget details. 
        Existing participant migrated to PACE should use current NDIS number

        In order to get a successful response, please ensure that as a Plan Manager, you have:
        1. An active Standard Service Booking for the Support Category of CB Choice and Control first exists with Support Items of either 14_033_0127_8_3 or 14_034_0127_8_3.
        2. An active Plan Managed Service Booking exists between the participant and your organisation.
        3. Received the participant's consent to view their budget details , via the Participant Portal.
        4. Plan Id is required

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

        This API will allow Plan Managers to retrieve a participant's plan managed budget details. 
        New participant created in PACE should use NDIS number from PACE
        Support_Type and Support_Category - these are only applicable for NONPACE participant budget data and it is not related to PACE participant budgets, there for it will appear as empty.
        Item details will be empty as PACE supports only category level budget and not item level.

        In order to get a successful response, please ensure that as a Plan Manager, you have:
        1. Received the participant's consent to view their budget details , via the PACE System.
        2. Plan ID not required

        <b>Note:</b> 
        * There will be different budget structures at Budget Type level
        * CORE will always be under flexible budget type
        * Capital & Capacity Building will always be under Stated budget type
        * Budget will be displayed as installment of Plan duration 3 Years
      parameters:
        - $ref: '#/parameters/participant_surname'
        - $ref: '#/parameters/date_of_birth'
    parameters:
      - $ref: '#/parameters/authorization'
      - $ref: '#/parameters/participant'
      - $ref: '#/parameters/participant_plan_id'
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_budget_response:
    description: Response for Getting a budget
    properties:
      success:
        type: boolean
        example: true
      result:
        $ref: '#/definitions/get_budgets_response_data'
      errors:
        $ref: '#/definitions/errors'
    additionalProperties: false
    required:
      - success
  get_budgets_response_data:
    description: Fields of a budget used to Get it
    properties:
      instalment_start:
        type: string
        description: Instalment Start Date
        format: date
        example: '0001-01-01'
      instalment_end:
        type: string
        description: Instalment End Date
        format: date
        example: '0001-01-01'
      is_pace_plan:
        type: boolean
        description: Is PACE Plan status.
        example: false
      participant_plan_id:
        type: integer
        description: Plan ID for which budget is required. Max Length(10)
        maxLength: 10
        example: 1010101
        format: int32
      approved_amount:
        type: number
        format: double
        description: The total budget for the specific Support Category  (e.g 297.50). Max Length(P14, S2)
        example: 1000.02
      spent_amount:
        type: number
        format: double
        description: The total spent under the specific Support Category (e.g 0.000). Max Length(P14, S2)
        example: 0
      remaining_amount:
        type: number
        format: double
        description: The total remaining for the specific Support Category (e.g 297.50). Max Length(P14, S2)
        example: 1000.02
      plan_management:
        $ref: '#/definitions/get_plan_management_response_array'
    additionalProperties: false
    required:
      - participant_plan_id
  get_plan_management_response_array:
    description: Array - Plan Management
    type: array
    items:
      $ref: '#/definitions/get_plan_management_response_data'
  get_plan_management_response_data:
    description: Fields of plan management
    properties:
      instalment_start:
        type: string
        description: Instalment Start Date
        format: date
        example: '0001-01-01'
      instalment_end:
        type: string
        description: Instalment End Date
        format: date
        example: '0001-01-01'
      plan_management:
        type: string
        description: Plan Management type - Self,Plan or Agency. Max Length(30)
        maxLength: 30
        example: ZCOR_PLAN
      plan_management_text:
        type: string
        description: Plan Mangement Type Description. Max Length(1333)
        maxLength: 1333
        example: Core Plan Managed
      approved_amount:
        type: number
        format: double
        description: The total budget for support type. Max Length(P14, S2)
        example: 1000.02
      allocated_amount:
        type: number
        format: double
        description: The amount allocated to the Support Type under Service Bookings. Max Length(P14, S2)
        example: 0
      spent_amount:
        type: number
        format: double
        description: The amount spent under the support type. Max Length(P14, S2)
        example: 0
      remaining_amount:
        type: number
        format: double
        description: The amount remanining under the suport type. Max Length(P14, S2)
        example: 1000.02
      supp_typ_lvl_dtls:
        $ref: '#/definitions/get_supp_typ_lvl_dtls_response_array'
    additionalProperties: false
  get_supp_typ_lvl_dtls_response_array:
    description: Array - Support Type level Total Budget Details
    type: array
    items:
      $ref: '#/definitions/get_supp_typ_lvl_dtls_response_data'
  get_supp_typ_lvl_dtls_response_data:
    description: Fields of Support Type level Total Budget Details
    properties:
      instalment_start:
        type: string
        description: Instalment Start Date
        format: date
        example: '0001-01-01'
      instalment_end:
        type: string
        description: Instalment End Date
        format: date
        example: '0001-01-01'
      support_type:
        type: string
        description: Support Type Codes. Max Length(30)
        maxLength: 30
        example: ZCOR
      support_type_text:
        type: string
        description: Support Type Description. Max Length(1333)
        maxLength: 1333
        example: Core
      approved_amount:
        type: number
        format: double
        description: The total budget for support type. Max Length(P14, S2)
        example: 1000.02
      allocated_amount:
        type: number
        format: double
        description: The amount allocated to the Support Type under Service Bookings. Max Length(P14, S2)
        example: 0
      spent_amount:
        type: number
        format: double
        description: The amount spent under the support type. Max Length(P14, S2)
        example: 0
      remaining_amount:
        type: number
        format: double
        description: The amount remanining under the suport type. Max Length(P14, S2)
        example: 1000.02
      supp_cat_lvl_dtls:
        $ref: '#/definitions/get_supp_cat_lvl_dtls_response_array'
    additionalProperties: false
  get_supp_cat_lvl_dtls_response_array:
    description: Array - Support Category level Total Budget Details
    type: array
    items:
      $ref: '#/definitions/get_supp_cat_lvl_dtls_response_data'
  get_supp_cat_lvl_dtls_response_data:
    description: Fields of Support Category level Total Budget Details
    properties:
      instalment_start:
        type: string
        description: Instalment Start Date
        format: date
        example: '0001-01-01'
      instalment_end:
        type: string
        description: Instalment End Date
        format: date
        example: '0001-01-01'
      support_category:
        type: string
        description: Support Category Code. Max Length(30)
        maxLength: 30
        example: CONSUMABLES
      support_category_text:
        type: string
        description: Support Category Description. Max Length(1333)
        maxLength: 1333
        example: Consumables
      approved_amount:
        type: number
        format: double
        description: The total budget for the specific Support Category  (e.g 297.50). Max Length(P14, S2)
        example: 1000.02
      allocated_amount:
        type: number
        format: double
        description: The amount allocated to the Support Category under Service Bookings. Max Length(P14, S2)
        example: 0
      spent_amount:
        type: number
        format: double
        description: The total spent under the specific Support Category (e.g 0.000). Max Length(P14, S2)
        example: 0
      remaining_amount:
        type: number
        format: double
        description: The total remaining for the specific Support Category (e.g 297.50). Max Length(P14, S2)
        example: 1000.02
      supp_itm_lvl_dtls:
        $ref: '#/definitions/get_supp_itm_lvl_dtls_response_array'
    additionalProperties: false
  get_supp_itm_lvl_dtls_response_array:
    description: Array - Support Item level Total Budget Details
    type: array
    items:
      $ref: '#/definitions/get_supp_itm_lvl_dtls_response_data'
  get_supp_itm_lvl_dtls_response_data:
    description: Fields of Support Item level Total Budget Details
    properties:
      item_type:
        type: string
        description: Stated, Quoted, In-kind Items. Max Length(54)
        maxLength: 54
        example: ZSGA
      item:
        type: string
        description: Stated, Quoted, In-kind Items. Max Length(54)
        maxLength: 40
        example: '01_003_0107_1_1'
      approved_amount:
        type: number
        format: double
        description: The total budget for the specific Support Category  (e.g 297.50). Max Length(P14, S2)
        example: 1000.02
      allocated_amount:
        type: number
        format: double
        description: The amount allocated to the Support Category under Service Bookings. Max Length(P14, S2)
        example: 0
      spent_amount:
        type: number
        format: double
        description: The total spent under the specific Support Category (e.g 0.000). Max Length(P14, S2)
        example: 0
      remaining_amount:
        type: number
        format: double
        description: The total remaining for the specific Support Category (e.g 297.50). Max Length(P14, S2)
        example: 1000.02
      quoteable_item:
        type: boolean
        description: Flag to identify if quote required.
        example: true
      quote_approved:
        type: boolean
        description: Flag to identify if quote approved.
        example: true
      in_kind:
        type: boolean
        description: Flag for in-kind item.
        example: true
    additionalProperties: false
  get_budget_sup_response:
    description: Response for Getting a budget
    properties:
      success:
        type: boolean
        example: true
      result:
        $ref: '#/definitions/get_budgets_sup_response_data'
      errors:
        $ref: '#/definitions/errors'
    additionalProperties: false
    required:
      - success
  get_budgets_sup_response_data:
    description: Fields of a budget used to Get it
    properties:
      participant_plan_id:
        type: integer
        description: Plan ID for which budget is required. Max Length(10)
        maxLength: 10
        example: 1010101
        format: int32
      plan_management:
        $ref: '#/definitions/get_plan_management_sup_response_array'
    additionalProperties: false
    required:
      - participant_plan_id
  get_plan_management_sup_response_array:
    description: Array - Plan Management
    type: array
    items:
      $ref: '#/definitions/get_plan_management_sup_response_data'
  get_plan_management_sup_response_data:
    description: Fields of plan management
    properties:
      plan_management:
        type: string
        description: Plan Management type - Self,Plan or Agency. Max Length(30)
        maxLength: 30
        example: ZCOR_PLAN
      plan_management_text:
        type: string
        description: Plan Mangement Type Description. Max Length(1333)
        maxLength: 1333
        example: Core Plan Managed
      supp_typ_lvl_dtls:
        $ref: '#/definitions/get_supp_typ_lvl_dtls_sup_response_array'
    additionalProperties: false
  get_supp_typ_lvl_dtls_sup_response_array:
    description: Array - Support Type level Total Budget Details
    type: array
    items:
      $ref: '#/definitions/get_supp_typ_lvl_dtls_sup_response_data'
  get_supp_typ_lvl_dtls_sup_response_data:
    description: Fields of Support Type level Total Budget Details
    properties:
      support_type:
        type: string
        description: Support Type Codes. Max Length(30)
        maxLength: 30
        example: ZCOR
      support_type_text:
        type: string
        description: Support Type Description. Max Length(1333)
        maxLength: 1333
        example: Core
      approved_amount:
        type: number
        format: double
        description: The total budget for support type. Max Length(P14, S2)
        example: 1000.02
      spent_amount:
        type: number
        format: double
        description: The amount spent under the support type. Max Length(P14, S2)
        example: 0
      remaining_amount:
        type: number
        format: double
        description: The amount remanining under the suport type. Max Length(P14, S2)
        example: 1000.02
      supp_cat_lvl_dtls:
        $ref: '#/definitions/get_supp_cat_lvl_dtls_sup_response_array'
    additionalProperties: false
  get_supp_cat_lvl_dtls_sup_response_array:
    description: Array - Support Category level Total Budget Details
    type: array
    items:
      $ref: '#/definitions/get_supp_cat_lvl_dtls_sup_response_data'
  get_supp_cat_lvl_dtls_sup_response_data:
    description: Fields of Support Category level Total Budget Details
    properties:
      support_category:
        type: string
        description: Support Category Code. Max Length(30)
        maxLength: 30
        example: CONSUMABLES
      support_category_text:
        type: string
        description: Support Category Description. Max Length(1333)
        maxLength: 1333
        example: Consumables
      approved_amount:
        type: number
        format: double
        description: The total budget for the specific Support Category  (e.g 297.50). Max Length(P14, S2)
        example: 1000.02
      spent_amount:
        type: number
        format: double
        description: The total spent under the specific Support Category (e.g 0.000). Max Length(P14, S2)
        example: 0
      remaining_amount:
        type: number
        format: double
        description: The total remaining for the specific Support Category (e.g 297.50). Max Length(P14, S2)
        example: 1000.02
      supp_itm_lvl_dtls:
        $ref: '#/definitions/get_supp_itm_lvl_dtls_sup_response_array'
    additionalProperties: false
  get_supp_itm_lvl_dtls_sup_response_array:
    description: Array - Support Item level Total Budget Details
    type: array
    items:
      $ref: '#/definitions/get_supp_itm_lvl_dtls_sup_response_data'
  get_supp_itm_lvl_dtls_sup_response_data:
    description: Fields of Support Item level Total Budget Details
    properties:
      item_type:
        type: string
        description: Stated, Quoted, In-kind Items. Max Length(54)
        maxLength: 54
        example: ZSGA
      item:
        type: string
        description: Stated, Quoted, In-kind Items. Max Length(54)
        maxLength: 40
        example: '01_003_0107_1_1'
      approved_amount:
        type: number
        format: double
        description: The total budget for the specific Support Category  (e.g 297.50). Max Length(P14, S2)
        example: 1000.02
      spent_amount:
        type: number
        format: double
        description: The total spent under the specific Support Category (e.g 0.000). Max Length(P14, S2)
        example: 0
      remaining_amount:
        type: number
        format: double
        description: The total remaining for the specific Support Category (e.g 297.50). Max Length(P14, S2)
        example: 1000.02
      quoteable_item:
        type: boolean
        description: Flag to identify if quote required.
      quote_approved:
        type: boolean
        description: Flag to identify if quote approved.
      in_kind:
        type: boolean
        description: Flag for in-kind item.
    additionalProperties: false
  get_budget_overview_response:
    description: Response for Getting a budget overview
    properties:
      success:
        type: boolean
        example: true
      result:
        $ref: '#/definitions/get_budgets_overview_response_array'
      errors:
        $ref: '#/definitions/errors'
    additionalProperties: false
    required:
      - success
  get_budgets_overview_response_array:
    description: A set of budgets
    type: array
    items:
      $ref: '#/definitions/get_budget_overview_response_data'
  get_budget_overview_response_data:
    description: Fields of a budget used to Get it
    properties:
      support_type:
        type: string
        description: Support Type Codes (e.g ZCOR). Max Length(30)
        maxLength: 30
      support_type_text:
        type: string
        description: Support Type Description (e.g Core). Max Length(40)
        maxLength: 40
      approved_amount:
        type: number
        format: double
        description: The total budget for support type (e.g 1297.50). Max Length(P14, S2)
      spent_amount:
        type: number
        format: double
        description: The amount spent under the support type (e.g 0.000). Max Length(P14, S2)
      remaining_amount:
        type: number
        format: double
        description: The amount remaining under the suport type (e.g 1297.50). Max Length(P14, S2)
      support_categories:
        $ref: '#/definitions/get_support_categories_response_array'
    additionalProperties: false
  get_support_categories_response_array:
    description: A set of support_categories
    type: array
    items:
      $ref: '#/definitions/get_support_category_response_data'
  get_support_category_response_data:
    description: Fields of a support_category used to Get it
    properties:
      support_category:
        type: string
        description: Support Category Codes specific to the header Support Type (e.g DAILY_ACTIVITIES). Max Length(30)
      support_category_text:
        type: string
        description: Support Category Description specific to the header Support Type(e.g Daily Activities). Max Length(40)
      approved_amount:
        type: number
        format: double
        description: The total budget for the specific Support Category  (e.g 297.50). Max Length(P14, S2)
      spent_amount:
        type: number
        format: double
        description: The total spent under the specific Support Category (e.g 0.000). Max Length(P14, S2)
      remaining_amount:
        type: number
        format: double
        description: The total remaining for the specific Support Category (e.g 297.50). Max Length(P14, S2)
    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: []
