swagger: '2.0'
info:
  x-ibm-name: ndis-quotations
  title: NDIS Quotations
  version: 3.0.0
  description: Allows Digital Partners to view quotations and respond to the quotes sent to them by NDIA for specific services
  contact:
    name: NDIA Support Team
    email: api.support@ndis.gov.au
schemes:
  - https
host: api.ndis.gov.au
basePath: /sharedservices/ndis-api/ndis/3.0/quotations
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/3.0/quotations
      description: ''
      type:
        - production
        - development
    - url: https://api.ndis.gov.au/sharedservices/ndis-api/ndis/3.0/quotations
      description: ''
      type:
        - production
        - development
paths:
  /:
    get:
      responses:
        '200':
          description: 200 OK
          schema:
            $ref: '#/definitions/quotations_list_response'
      tags: []
      parameters:
        - name: user_status_code
          type: string
          required: false
          in: query
          description: Filter by field
        - name: quotation_id
          type: string
          required: false
          in: query
          description: Filter by field
        - name: quote_type
          type: string
          required: false
          in: query
          description: Filter by field
        - $ref: '#/parameters/participant'
      summary: Request list of quotations for the respective provider
      description: Retrieves a summary of all quotations for the provider along with current status on each
      operationId: quotationlist
    parameters:
      - $ref: '#/parameters/skip'
      - $ref: '#/parameters/top'
      - $ref: '#/parameters/orderby'
      - $ref: '#/parameters/sortorder'
      - $ref: '#/parameters/authorization'
      - $ref: '#/parameters/inlinecount'
  /{quotation_id}:
    patch:
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/patch_quotation_response'
      tags: []
      produces:
        - application/json
      parameters:
        - name: quotation_request_data
          required: true
          in: body
          schema:
            $ref: '#/definitions/quotation_request_data'
        - $ref: '#/parameters/authorization'
      summary: Update a specific quotation for the respective  Provider
      description: |-
        This operation will allow the Digital Partners to respond to quotations that are in the status of "Awaiting Provider Response" (key = "SNTP"). When responding to the quotation request, please use the status of "NDIS has received response" (key = "RESR") for the field "user_status_code".  When the quote is approved by the NDIS, a service booking is automatically created and the status of the quote changes to Quote is accepted (key = "ACPT").  

        Also, note that, there is no mechanism via the API's to update and resubmit a revised quote. Where negotiation is required, please contact your local NDIA office prior to submitting your quote.
      operationId: updatequotation
    parameters:
      - $ref: '#/parameters/quotation_id'
      - $ref: '#/parameters/participant'
parameters:
  authorization:
    name: authorization
    type: string
    required: true
    in: header
    description: Bearer token
    x-example: valid Authorizaton Token
  participant:
    name: participant
    type: string
    required: false
    in: header
    description: The NDIS participant ID
    x-example: 430111111
  skip:
    name: skip
    type: integer
    required: false
    in: header
    description: pagination field - No of rows to be skipped
    format: int32
    x-example: 1
  top:
    name: top
    type: integer
    required: false
    in: header
    description: pagination field - No of rows to be returned
    format: int32
    x-example: 1
  orderby:
    name: orderby
    type: string
    required: false
    in: header
    description: Pagination - sort by field
    x-example: field
  sortorder:
    name: sortorder
    type: string
    required: false
    in: header
    description: 'Pagination - sort order: valid values - asc/desc'
    x-example: asc
  inlinecount:
    name: inlinecount
    type: string
    required: false
    in: header
    description: allpages
    x-example: allpages
  quotation_id:
    name: quotation_id
    type: string
    required: true
    in: path
    description: Quotation ID
    x-example: 1011111
definitions:
  quotations_list_response:
    properties:
      success:
        type: boolean
        description: success status of call
        example: true
      result:
        $ref: '#/definitions/quotations_list'
        description: result object
    additionalProperties: false
    required:
      - success
  quotations_list:
    type: array
    items:
      $ref: '#/definitions/quotations_list_item'
  quotations_list_item:
    properties:
      quotation_id:
        type: integer
        description: Quote number/id
        maxLength: 12
        example: 10125329
        format: int32
      participant:
        type: integer
        description: Participant NDIS Id
        example: 430212474
        maxLength: 10
        format: int32
      participant_name:
        type: string
        description: Participant Name
        example: Joy Sunshine
      request_date:
        type: string
        description: date, Quote request submitted date
        example: '2001-12-31'
        format: date
      reply_by_date:
        type: string
        description: 'date, Quote Reply by date '
        example: '2001-12-31'
        format: date
      user_status_code:
        type: string
        description: Status of quote at the present - ( E0002-OPEN-Quotation open / E0003-SNTP-Awaiting provider response / E0004-RESR-NDIA has received response / E0005-EXPR-Quote has expired / E0006-ACPT-Quote is accepted / E0009-REJC-Quote was unsuccessful / E0010-ARCH-Archived )
        example: OPEN
        maxLength: 4
      product_id:
        type: string
        description: Product number/Id
        example: 5425010912
        maxLength: 40
      product_name:
        type: string
        description: Product name/Desc
        example: Power Bed - Composite
      quote_type:
        type: string
        description: Type of quote
        maxLength: 50
        example: ZQ02
      quantity:
        type: number
        description: Maxlength P13, S3, Quantity in quote
        example: 1
        format: double
      supply_details:
        type: string
        description: Details about supply
        example: will be delivered
      specifications:
        type: string
        description: Item specification
        example: no batteries
      inclusions:
        type: string
        description: Inclusions
        example: include the cover
      specific_exclusions:
        type: string
        description: Specific exclusion in quote
        example: 10/10
      price:
        type: number
        description: Maxlength P15, S2, Unit price of the item
        example: 321.33
        format: double
      gst_amount:
        type: number
        description: Maxlength P15, S2, Amount of the GST on item
        example: 12.25
        format: double
      terms_of_quote:
        type: string
        description: Quote validity period
        example: ZQ01
        maxLength: 4
    additionalProperties: false
  quotation_request_data:
    properties:
      price:
        type: number
        example: 2.05
        description: Price per unit. MaxLength P15 S2
        format: double
      gst_amount:
        type: number
        example: 2.05
        description: Gst Amount per unit. MaxLength P15 S2
        format: double
      user_status_code:
        type: string
        maxLength: 4
        example: RESR
        description: Status Code for the Quotation
      supply_details:
        type: string
        example: will be delivered
        description: Supply Details
      specifications:
        type: string
        example: no batteries
        description: Specifications
      inclusions:
        type: string
        example: include the cover
        description: Inclusions
      specific_exclusions:
        type: string
        example: 10/10
        description: Specific Exclusions
      terms_of_quote:
        type: string
        maxLength: 4
        example: ZQ01
        description: Terms Of Quote
      user_notes:
        type: string
        example: test
        description: User notes
    additionalProperties: true
    required:
      - price
      - gst_amount
      - user_status_code
      - supply_details
      - specifications
      - inclusions
      - specific_exclusions
      - terms_of_quote
      - user_notes
  patch_quotation_response:
    description: Response for update quotation
    properties:
      success:
        type: boolean
        example: true
      errors:
        $ref: '#/definitions/errors'
    additionalProperties: false
    required:
      - success
  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: []
