openapi: 3.0.3
info:
  contact:
    email: contact@dsb.gov.au
    name: Data Standards Body
    url: https://dsb.gov.au/
  description: Specifications for common endpoints applicable to all data holders
    (except secondary data holders).
  license:
    name: MIT License
    url: https://opensource.org/licenses/MIT
  title: CDR Common API
  version: 1.34.1
servers:
- description: MTLS
  url: https://mtls.dh.example.com/cds-au/v1
tags:
- description: Data Holder Customer endpoints
  name: Data Holder Customers
  x-shortName: Customers
- description: Data Holder Operations endpoints
  name: Data Holder Operations
  x-shortName: Operations
paths:
  /common/customer:
    get:
      description: |-
        Obtain basic information on the customer that has authorised the current session.

        <h3 id='cdr-common-api_get-customer_conventions'>Conventions</h3>
        In the customer payloads there are conventions that are explained below.

        #### Given Names

        _firstName_ represents the first of a person's given names.

        _middleNames_ represents a collection of given names if the person has more than one given name.

        Where a data holder holds a person's given names as a single string in source systems, it may not possible in some situations to reliably split these given names into their component first and middle names. In these situations, data holders **MAY** use the _firstName_ field to return the single string of given names and an empty _middleNames_ array.

        For example, if a person's given names are "John Paul Winston" and the Data Holder is unable to determine which is the first name, they can return `"firstName": "John Paul Winston"`.
      operationId: getCustomer
      parameters:
      - description: Version of the API endpoint requested by the client. Must be
          set to a positive integer. The endpoint should respond with the highest
          supported version between [_x-min-v_](#request-headers) and [_x-v_](#request-headers).
          If the value of [_x-min-v_](#request-headers) is equal to or higher than
          the value of [_x-v_](#request-headers) then the [_x-min-v_](#request-headers)
          header should be treated as absent. If all versions requested are not supported
          then the endpoint **MUST** respond with a `406 Not Acceptable`. See [HTTP
          Headers](#request-headers).
        explode: false
        in: header
        name: x-v
        required: true
        schema:
          type: string
        style: simple
      - description: Minimum version of the API endpoint requested by the client.
          Must be set to a positive integer if provided. The endpoint should respond
          with the highest supported version between [_x-min-v_](#request-headers)
          and [_x-v_](#request-headers). If all versions requested are not supported
          then the endpoint **MUST** respond with a `406 Not Acceptable`.
        explode: false
        in: header
        name: x-min-v
        required: false
        schema:
          type: string
        style: simple
      - description: An **[[RFC4122]](#nref-RFC4122)** UUID used as a correlation
          id. If provided, the data holder **MUST** play back this value in the _x-fapi-interaction-id_
          response header. If not provided a **[[RFC4122]](#nref-RFC4122)** UUID value
          is required to be provided in the response header to track the interaction.
        explode: false
        in: header
        name: x-fapi-interaction-id
        required: false
        schema:
          type: string
        style: simple
      - description: The time when the customer last logged in to the Data Recipient
          Software Product as described in **[[FAPI-1.0-Baseline]](#nref-FAPI-1-0-Baseline)**.
          Required for all resource calls (customer present and unattended). Not required
          for unauthenticated calls.
        explode: false
        in: header
        name: x-fapi-auth-date
        required: false
        schema:
          type: string
        style: simple
        x-conditional: true
      - description: The customer's original IP address if the customer is currently
          logged in to the Data Recipient Software Product. The presence of this header
          indicates that the API is being called in a customer present context. Not
          to be included for unauthenticated calls.
        explode: false
        in: header
        name: x-fapi-customer-ip-address
        required: false
        schema:
          type: string
        style: simple
      - description: The customer's original standard http headers [Base64](#common-field-types)
          encoded, including the original User-Agent header, if the customer is currently
          logged in to the Data Recipient Software Product. Mandatory for customer
          present calls. Not required for unattended or unauthenticated calls.
        explode: false
        in: header
        name: x-cds-client-headers
        required: false
        schema:
          type: string
        style: simple
        x-conditional: true
        x-cds-type: Base64
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseCommonCustomer'
          description: Successful response
          headers:
            x-v:
              $ref: '#/components/headers/XV'
            x-fapi-interaction-id:
              $ref: '#/components/headers/XFAPIInteractionId'
        "400":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorListV2'
          description: The following error codes **MUST** be supported:<br/><ul class="error-code-list"><li>[400
            - Invalid Field](#error-400-field-invalid)</li><li>[400 - Missing Required
            Field](#error-400-field-missing)</li><li>[400 - Invalid Version](#error-400-header-invalid-version)</li></ul>
          headers:
            x-fapi-interaction-id:
              $ref: '#/components/headers/XFAPIInteractionId'
        "406":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorListV2'
          description: The following error codes **MUST** be supported:<br/><ul class="error-code-list"><li>[406
            - Unsupported Version](#error-406-header-unsupported-version)</li></ul>
          headers:
            x-fapi-interaction-id:
              $ref: '#/components/headers/XFAPIInteractionId'
      summary: Get Customer
      tags:
      - Data Holder Customers
      x-scopes:
      - common:customer.basic:read
      x-version: "1"
  /common/customer/detail:
    get:
      description: |-
        Obtain detailed information on the authorised customer within the current session.

        Obsolete versions: [v1](includes/obsolete/get-customer-detail-v1.html).
      operationId: getCustomerDetail
      parameters:
      - description: Version of the API endpoint requested by the client. Must be
          set to a positive integer. The endpoint should respond with the highest
          supported version between [_x-min-v_](#request-headers) and [_x-v_](#request-headers).
          If the value of [_x-min-v_](#request-headers) is equal to or higher than
          the value of [_x-v_](#request-headers) then the [_x-min-v_](#request-headers)
          header should be treated as absent. If all versions requested are not supported
          then the endpoint **MUST** respond with a `406 Not Acceptable`. See [HTTP
          Headers](#request-headers).
        explode: false
        in: header
        name: x-v
        required: true
        schema:
          type: string
        style: simple
      - description: Minimum version of the API endpoint requested by the client.
          Must be set to a positive integer if provided. The endpoint should respond
          with the highest supported version between [_x-min-v_](#request-headers)
          and [_x-v_](#request-headers). If all versions requested are not supported
          then the endpoint **MUST** respond with a `406 Not Acceptable`.
        explode: false
        in: header
        name: x-min-v
        required: false
        schema:
          type: string
        style: simple
      - description: An **[[RFC4122]](#nref-RFC4122)** UUID used as a correlation
          id. If provided, the data holder **MUST** play back this value in the _x-fapi-interaction-id_
          response header. If not provided a **[[RFC4122]](#nref-RFC4122)** UUID value
          is required to be provided in the response header to track the interaction.
        explode: false
        in: header
        name: x-fapi-interaction-id
        required: false
        schema:
          type: string
        style: simple
      - description: The time when the customer last logged in to the Data Recipient
          Software Product as described in **[[FAPI-1.0-Baseline]](#nref-FAPI-1-0-Baseline)**.
          Required for all resource calls (customer present and unattended). Not required
          for unauthenticated calls.
        explode: false
        in: header
        name: x-fapi-auth-date
        required: false
        schema:
          type: string
        style: simple
        x-conditional: true
      - description: The customer's original IP address if the customer is currently
          logged in to the Data Recipient Software Product. The presence of this header
          indicates that the API is being called in a customer present context. Not
          to be included for unauthenticated calls.
        explode: false
        in: header
        name: x-fapi-customer-ip-address
        required: false
        schema:
          type: string
        style: simple
      - description: The customer's original standard http headers [Base64](#common-field-types)
          encoded, including the original User-Agent header, if the customer is currently
          logged in to the Data Recipient Software Product. Mandatory for customer
          present calls. Not required for unattended or unauthenticated calls.
        explode: false
        in: header
        name: x-cds-client-headers
        required: false
        schema:
          type: string
        style: simple
        x-conditional: true
        x-cds-type: Base64
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseCommonCustomerDetailV2'
          description: Successful response
          headers:
            x-v:
              $ref: '#/components/headers/XV'
            x-fapi-interaction-id:
              $ref: '#/components/headers/XFAPIInteractionId'
        "400":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorListV2'
          description: The following error codes **MUST** be supported:<br/><ul class="error-code-list"><li>[400
            - Invalid Field](#error-400-field-invalid)</li><li>[400 - Missing Required
            Field](#error-400-field-missing)</li><li>[400 - Invalid Version](#error-400-header-invalid-version)</li></ul>
          headers:
            x-fapi-interaction-id:
              $ref: '#/components/headers/XFAPIInteractionId'
        "406":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorListV2'
          description: The following error codes **MUST** be supported:<br/><ul class="error-code-list"><li>[406
            - Unsupported Version](#error-406-header-unsupported-version)</li></ul>
          headers:
            x-fapi-interaction-id:
              $ref: '#/components/headers/XFAPIInteractionId'
      summary: Get Customer Detail
      tags:
      - Data Holder Customers
      x-scopes:
      - common:customer.detail:read
      x-version: "2"
  /discovery/status:
    get:
      description: Obtain a health check status for the implementation.
      operationId: getStatus
      parameters:
      - description: Version of the API endpoint requested by the client. Must be
          set to a positive integer. The endpoint should respond with the highest
          supported version between [_x-min-v_](#request-headers) and [_x-v_](#request-headers).
          If the value of [_x-min-v_](#request-headers) is equal to or higher than
          the value of [_x-v_](#request-headers) then the [_x-min-v_](#request-headers)
          header should be treated as absent. If all versions requested are not supported
          then the endpoint **MUST** respond with a `406 Not Acceptable`. See [HTTP
          Headers](#request-headers).
        explode: false
        in: header
        name: x-v
        required: true
        schema:
          type: string
        style: simple
      - description: Minimum version of the API endpoint requested by the client.
          Must be set to a positive integer if provided. The endpoint should respond
          with the highest supported version between [_x-min-v_](#request-headers)
          and [_x-v_](#request-headers). If all versions requested are not supported
          then the endpoint **MUST** respond with a `406 Not Acceptable`.
        explode: false
        in: header
        name: x-min-v
        required: false
        schema:
          type: string
        style: simple
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseCommonDiscoveryStatus'
          description: Successful response
          headers:
            x-v:
              $ref: '#/components/headers/XV'
        "400":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorListV2'
          description: The following error codes **MUST** be supported:<br/><ul class="error-code-list"><li>[400
            - Invalid Field](#error-400-field-invalid)</li><li>[400 - Missing Required
            Field](#error-400-field-missing)</li><li>[400 - Invalid Version](#error-400-header-invalid-version)</li></ul>
        "406":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorListV2'
          description: The following error codes **MUST** be supported:<br/><ul class="error-code-list"><li>[406
            - Unsupported Version](#error-406-header-unsupported-version)</li></ul>
      servers:
      - description: TLS
        url: https://tls.dh.example.com/cds-au/v1
      summary: Get Status
      tags:
      - Data Holder Operations
      x-version: "1"
  /discovery/outages:
    get:
      description: Obtain a list of scheduled outages for the implementation.
      operationId: getOutages
      parameters:
      - description: Version of the API endpoint requested by the client. Must be
          set to a positive integer. The endpoint should respond with the highest
          supported version between [_x-min-v_](#request-headers) and [_x-v_](#request-headers).
          If the value of [_x-min-v_](#request-headers) is equal to or higher than
          the value of [_x-v_](#request-headers) then the [_x-min-v_](#request-headers)
          header should be treated as absent. If all versions requested are not supported
          then the endpoint **MUST** respond with a `406 Not Acceptable`. See [HTTP
          Headers](#request-headers).
        explode: false
        in: header
        name: x-v
        required: true
        schema:
          type: string
        style: simple
      - description: Minimum version of the API endpoint requested by the client.
          Must be set to a positive integer if provided. The endpoint should respond
          with the highest supported version between [_x-min-v_](#request-headers)
          and [_x-v_](#request-headers). If all versions requested are not supported
          then the endpoint **MUST** respond with a `406 Not Acceptable`.
        explode: false
        in: header
        name: x-min-v
        required: false
        schema:
          type: string
        style: simple
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseDiscoveryOutagesList'
          description: Successful response
          headers:
            x-v:
              $ref: '#/components/headers/XV'
        "400":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorListV2'
          description: The following error codes **MUST** be supported:<br/><ul class="error-code-list"><li>[400
            - Invalid Field](#error-400-field-invalid)</li><li>[400 - Missing Required
            Field](#error-400-field-missing)</li><li>[400 - Invalid Version](#error-400-header-invalid-version)</li></ul>
        "406":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorListV2'
          description: The following error codes **MUST** be supported:<br/><ul class="error-code-list"><li>[406
            - Unsupported Version](#error-406-header-unsupported-version)</li></ul>
      servers:
      - description: TLS
        url: https://tls.dh.example.com/cds-au/v1
      summary: Get Outages
      tags:
      - Data Holder Operations
      x-version: "1"
components:
  headers:
    XV:
      description: The [payload version](#response-headers) that the endpoint has
        responded with.
      explode: false
      required: true
      schema:
        type: string
      style: simple
    XFAPIInteractionId:
      description: An **[[RFC4122]](#nref-RFC4122)** UUID used as a correlation id.
        If provided, the data holder **MUST** play back this value in the _x-fapi-interaction-id_
        response header. If not provided a **[[RFC4122]](#nref-RFC4122)** UUID value
        is required to be provided in the response header to track the interaction.
      explode: false
      required: true
      schema:
        type: string
      style: simple
  parameters:
    HeaderXV:
      description: Version of the API endpoint requested by the client. Must be set
        to a positive integer. The endpoint should respond with the highest supported
        version between [_x-min-v_](#request-headers) and [_x-v_](#request-headers).
        If the value of [_x-min-v_](#request-headers) is equal to or higher than the
        value of [_x-v_](#request-headers) then the [_x-min-v_](#request-headers)
        header should be treated as absent. If all versions requested are not supported
        then the endpoint **MUST** respond with a `406 Not Acceptable`. See [HTTP
        Headers](#request-headers).
      explode: false
      in: header
      name: x-v
      required: true
      schema:
        type: string
      style: simple
    HeaderXMinV:
      description: Minimum version of the API endpoint requested by the client. Must
        be set to a positive integer if provided. The endpoint should respond with
        the highest supported version between [_x-min-v_](#request-headers) and [_x-v_](#request-headers).
        If all versions requested are not supported then the endpoint **MUST** respond
        with a `406 Not Acceptable`.
      explode: false
      in: header
      name: x-min-v
      required: false
      schema:
        type: string
      style: simple
    HeaderXFAPIInteractionId:
      description: An **[[RFC4122]](#nref-RFC4122)** UUID used as a correlation id.
        If provided, the data holder **MUST** play back this value in the _x-fapi-interaction-id_
        response header. If not provided a **[[RFC4122]](#nref-RFC4122)** UUID value
        is required to be provided in the response header to track the interaction.
      explode: false
      in: header
      name: x-fapi-interaction-id
      required: false
      schema:
        type: string
      style: simple
    HeaderXFAPIAuthDate:
      description: The time when the customer last logged in to the Data Recipient
        Software Product as described in **[[FAPI-1.0-Baseline]](#nref-FAPI-1-0-Baseline)**.
        Required for all resource calls (customer present and unattended). Not required
        for unauthenticated calls.
      explode: false
      in: header
      name: x-fapi-auth-date
      required: false
      schema:
        type: string
      style: simple
      x-conditional: true
    HeaderXFAPICustomerIPAddress:
      description: The customer's original IP address if the customer is currently
        logged in to the Data Recipient Software Product. The presence of this header
        indicates that the API is being called in a customer present context. Not
        to be included for unauthenticated calls.
      explode: false
      in: header
      name: x-fapi-customer-ip-address
      required: false
      schema:
        type: string
      style: simple
    HeaderXCDSClientHeaders:
      description: The customer's original standard http headers [Base64](#common-field-types)
        encoded, including the original User-Agent header, if the customer is currently
        logged in to the Data Recipient Software Product. Mandatory for customer present
        calls. Not required for unattended or unauthenticated calls.
      explode: false
      in: header
      name: x-cds-client-headers
      required: false
      schema:
        type: string
      style: simple
      x-conditional: true
      x-cds-type: Base64
  responses:
    GetCustomer200:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseCommonCustomer'
      description: Successful response
      headers:
        x-v:
          $ref: '#/components/headers/XV'
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFAPIInteractionId'
    GetCustomer400:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseErrorListV2'
      description: The following error codes **MUST** be supported:<br/><ul class="error-code-list"><li>[400
        - Invalid Field](#error-400-field-invalid)</li><li>[400 - Missing Required
        Field](#error-400-field-missing)</li><li>[400 - Invalid Version](#error-400-header-invalid-version)</li></ul>
      headers:
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFAPIInteractionId'
    GetCustomer406:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseErrorListV2'
      description: The following error codes **MUST** be supported:<br/><ul class="error-code-list"><li>[406
        - Unsupported Version](#error-406-header-unsupported-version)</li></ul>
      headers:
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFAPIInteractionId'
    GetCustomerDetail200:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseCommonCustomerDetailV2'
      description: Successful response
      headers:
        x-v:
          $ref: '#/components/headers/XV'
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFAPIInteractionId'
    GetCustomerDetail400:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseErrorListV2'
      description: The following error codes **MUST** be supported:<br/><ul class="error-code-list"><li>[400
        - Invalid Field](#error-400-field-invalid)</li><li>[400 - Missing Required
        Field](#error-400-field-missing)</li><li>[400 - Invalid Version](#error-400-header-invalid-version)</li></ul>
      headers:
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFAPIInteractionId'
    GetCustomerDetail406:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseErrorListV2'
      description: The following error codes **MUST** be supported:<br/><ul class="error-code-list"><li>[406
        - Unsupported Version](#error-406-header-unsupported-version)</li></ul>
      headers:
        x-fapi-interaction-id:
          $ref: '#/components/headers/XFAPIInteractionId'
    GetStatus200:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseCommonDiscoveryStatus'
      description: Successful response
      headers:
        x-v:
          $ref: '#/components/headers/XV'
    GetStatus400:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseErrorListV2'
      description: The following error codes **MUST** be supported:<br/><ul class="error-code-list"><li>[400
        - Invalid Field](#error-400-field-invalid)</li><li>[400 - Missing Required
        Field](#error-400-field-missing)</li><li>[400 - Invalid Version](#error-400-header-invalid-version)</li></ul>
    GetStatus406:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseErrorListV2'
      description: The following error codes **MUST** be supported:<br/><ul class="error-code-list"><li>[406
        - Unsupported Version](#error-406-header-unsupported-version)</li></ul>
    GetOutages200:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseDiscoveryOutagesList'
      description: Successful response
      headers:
        x-v:
          $ref: '#/components/headers/XV'
    GetOutages400:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseErrorListV2'
      description: The following error codes **MUST** be supported:<br/><ul class="error-code-list"><li>[400
        - Invalid Field](#error-400-field-invalid)</li><li>[400 - Missing Required
        Field](#error-400-field-missing)</li><li>[400 - Invalid Version](#error-400-header-invalid-version)</li></ul>
    GetOutages406:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseErrorListV2'
      description: The following error codes **MUST** be supported:<br/><ul class="error-code-list"><li>[406
        - Unsupported Version](#error-406-header-unsupported-version)</li></ul>
  schemas:
    ResponseCommonDiscoveryStatus:
      example:
        data:
          updateTime: updateTime
          explanation: explanation
          expectedResolutionTime: expectedResolutionTime
          detectionTime: detectionTime
          status: OK
        meta: '{}'
        links:
          self: self
      properties:
        data:
          $ref: '#/components/schemas/ResponseCommonDiscoveryStatus_data'
        links:
          $ref: '#/components/schemas/Links'
        meta:
          type: object
      required:
      - data
      - links
      type: object
    ResponseDiscoveryOutagesList:
      example:
        data:
          outages:
          - duration: duration
            outageTime: outageTime
            isPartial: true
            explanation: explanation
          - duration: duration
            outageTime: outageTime
            isPartial: true
            explanation: explanation
        meta: '{}'
        links:
          self: self
      properties:
        data:
          $ref: '#/components/schemas/ResponseDiscoveryOutagesList_data'
        links:
          $ref: '#/components/schemas/Links'
        meta:
          type: object
      required:
      - data
      - links
      type: object
    DiscoveryOutage:
      example:
        duration: duration
        outageTime: outageTime
        isPartial: true
        explanation: explanation
      properties:
        outageTime:
          description: Date and time that the outage is scheduled to begin.
          type: string
          x-cds-type: DateTimeString
        duration:
          description: Planned duration of the outage. Formatted according to [ISO
            8601 Durations](https://en.wikipedia.org/wiki/ISO_8601#Durations) (excludes
            recurrence syntax).
          type: string
          x-cds-type: ExternalRef
        isPartial:
          description: Flag that indicates, if present and set to `true`, that the
            outage is only partial meaning that only a subset of normally available
            endpoints will be affected by the outage.
          type: boolean
        explanation:
          description: Provides an explanation of the current outage that can be displayed
            to an end customer.
          type: string
      required:
      - duration
      - explanation
      - outageTime
      type: object
    ResponseCommonCustomer:
      example:
        data:
          person:
            middleNames:
            - middleNames
            - middleNames
            firstName: firstName
            lastName: lastName
            occupationCode: occupationCode
            prefix: prefix
            occupationCodeVersion: ANZSCO_1220.0_2013_V1.2
            suffix: suffix
            lastUpdateTime: lastUpdateTime
          organisation:
            agentRole: agentRole
            agentLastName: agentLastName
            industryCodeVersion: ANZSIC_1292.0_2006_V2.0
            establishmentDate: establishmentDate
            businessName: businessName
            registeredCountry: AUS
            abn: abn
            acn: acn
            industryCode: industryCode
            organisationType: COMPANY
            legalName: legalName
            isACNCRegistered: true
            agentFirstName: agentFirstName
            shortName: shortName
            lastUpdateTime: lastUpdateTime
          customerUType: organisation
        meta: '{}'
        links:
          self: self
      properties:
        data:
          $ref: '#/components/schemas/ResponseCommonCustomer_data'
        links:
          $ref: '#/components/schemas/Links'
        meta:
          type: object
      required:
      - data
      - links
      type: object
    ResponseCommonCustomerDetailV2:
      example:
        data:
          customerUType: organisation
        meta: '{}'
        links:
          self: self
      properties:
        data:
          $ref: '#/components/schemas/ResponseCommonCustomerDetailV2_data'
        links:
          $ref: '#/components/schemas/Links'
        meta:
          type: object
      required:
      - data
      - links
      type: object
    CommonPerson:
      example:
        middleNames:
        - middleNames
        - middleNames
        firstName: firstName
        lastName: lastName
        occupationCode: occupationCode
        prefix: prefix
        occupationCodeVersion: ANZSCO_1220.0_2013_V1.2
        suffix: suffix
        lastUpdateTime: lastUpdateTime
      properties:
        lastUpdateTime:
          description: The date and time that this record was last updated by the
            customer. If no update has occurred then this date should reflect the
            initial creation date for the data.
          type: string
          x-cds-type: DateTimeString
        firstName:
          description: For people with single names this field need not be present.
            The single name should be in the _lastName_ field. Where a data holder
            cannot determine first and middle names from a collection of given names,
            a single string representing all given names **MAY** be provided.
          type: string
        lastName:
          description: For people with single names, the single name should be in
            this field.
          type: string
        middleNames:
          description: Field is mandatory but array may be empty.
          items:
            type: string
          type: array
        prefix:
          description: Also known as title or salutation. The prefix to the name (e.g.,
            Mr, Mrs, Ms, Miss, Sir, etc.)
          type: string
        suffix:
          description: Used for a trailing suffix to the name (e.g., Jr.)
          type: string
        occupationCode:
          description: Value is a valid **[[ANZSCO]](#iref-ANZSCO)** Standard Occupation
            classification code. If the occupation code held by the data holder is
            not one of the supported **[[ANZSCO]](#iref-ANZSCO)** versions, then it
            must not be supplied.
          type: string
          x-cds-type: ExternalRef
        occupationCodeVersion:
          default: ANZSCO_1220.0_2013_V1.2
          description: The applicable **[[ANZSCO]](#iref-ANZSCO)** release version
            of the occupation code provided. Mandatory if an _occupationCode_ is supplied.
            If _occupationCode_ is supplied but _occupationCodeVersion_ is absent,
            default is `ANZSCO_1220.0_2013_V1.2`.
          enum:
          - ANZSCO_1220.0_2006_V1.0
          - ANZSCO_1220.0_2006_V1.1
          - ANZSCO_1220.0_2013_V1.2
          - ANZSCO_1220.0_2013_V1.3
          type: string
      required:
      - lastName
      - middleNames
      type: object
      x-conditional:
      - occupationCodeVersion
    CommonPersonDetailV2:
      allOf:
      - $ref: '#/components/schemas/CommonPerson'
      - $ref: '#/components/schemas/CommonPersonDetailV2_allOf'
    CommonOrganisation:
      example:
        agentRole: agentRole
        agentLastName: agentLastName
        industryCodeVersion: ANZSIC_1292.0_2006_V2.0
        establishmentDate: establishmentDate
        businessName: businessName
        registeredCountry: AUS
        abn: abn
        acn: acn
        industryCode: industryCode
        organisationType: COMPANY
        legalName: legalName
        isACNCRegistered: true
        agentFirstName: agentFirstName
        shortName: shortName
        lastUpdateTime: lastUpdateTime
      properties:
        lastUpdateTime:
          description: The date and time that this record was last updated by the
            customer. If no update has occurred then this date should reflect the
            initial creation date for the data.
          type: string
          x-cds-type: DateTimeString
        agentFirstName:
          description: The first name of the individual providing access on behalf
            of the organisation. For people with single names this field need not
            be present. The single name should be in the _lastName_ field.
          type: string
        agentLastName:
          description: The last name of the individual providing access on behalf
            of the organisation. For people with single names, the single name should
            be in this field.
          type: string
        agentRole:
          description: The role of the individual identified as the agent who is providing
            authorisation. Expected to be used for display. Default to "Unspecified"
            if the role is not known.
          type: string
        businessName:
          description: Name of the organisation.
          type: string
        legalName:
          description: Legal name, if different to the business name.
          type: string
        shortName:
          description: Short name used for communication, if different to the business
            name.
          type: string
        abn:
          description: Australian Business Number for the organisation.
          type: string
        acn:
          description: Australian Company Number for the organisation. Required only
            if an ACN is applicable for the organisation type.
          type: string
        isACNCRegistered:
          description: '`true` if registered with the ACNC. `false` if not. Absent
            or `null` if not confirmed.'
          type: boolean
        industryCode:
          description: A valid [ANZSIC](http://www.abs.gov.au/ANZSIC) code for the
            organisation. If the industry code held by the data holder is not one
            of the supported [ANZSIC](http://www.abs.gov.au/ANZSIC) versions, then
            it must not be supplied.
          type: string
          x-cds-type: ExternalRef
        industryCodeVersion:
          default: ANZSIC_1292.0_2006_V2.0
          description: The applicable [ANZSIC](http://www.abs.gov.au/ANZSIC) release
            version of the industry code provided. Should only be supplied if _industryCode_
            is also supplied. If _industryCode_ is supplied but _industryCodeVersion_
            is absent, default is `ANZSIC_1292.0_2006_V2.0`.
          enum:
          - ANZSIC_1292.0_2006_V1.0
          - ANZSIC_1292.0_2006_V2.0
          type: string
        organisationType:
          description: Legal organisation type.
          enum:
          - COMPANY
          - GOVERNMENT_ENTITY
          - OTHER
          - PARTNERSHIP
          - SOLE_TRADER
          - TRUST
          type: string
        registeredCountry:
          default: AUS
          description: Enumeration with values from [ISO 3166 Alpha-3](https://www.iso.org/iso-3166-country-codes.html)
            country codes. Assumed to be `AUS` if absent.
          type: string
          x-cds-type: ExternalRef
        establishmentDate:
          description: The date the organisation described was established.
          type: string
          x-cds-type: DateString
      required:
      - agentLastName
      - agentRole
      - businessName
      - organisationType
      type: object
      x-conditional:
      - industryCodeVersion
    CommonOrganisationDetailV2:
      allOf:
      - $ref: '#/components/schemas/CommonOrganisation'
      - $ref: '#/components/schemas/CommonOrganisationDetailV2_allOf'
    CommonPhoneNumber:
      properties:
        isPreferred:
          default: false
          description: May be `true` for one and only one entry to indicate the preferred
            phone number. Assumed to be `false` if not present.
          type: boolean
        purpose:
          description: The purpose of the number as specified by the customer.
          enum:
          - HOME
          - INTERNATIONAL
          - MOBILE
          - OTHER
          - UNSPECIFIED
          - WORK
          type: string
        countryCode:
          description: If absent, assumed to be Australia (`+61`). The `+` should
            be included.
          type: string
        areaCode:
          description: Required for non Mobile Phones, if field is present and refers
            to Australian code - the leading `0` should be omitted.
          type: string
        number:
          description: The actual phone number, with leading zeros as appropriate.
          type: string
        extension:
          description: An extension number (if applicable).
          type: string
        fullNumber:
          description: Fully formatted phone number with country code, area code,
            number and extension incorporated. Formatted according to section 5.1.4.
            of **[[RFC3966]](#iref-RFC3966)**.
          type: string
          x-cds-type: ExternalRef
      required:
      - fullNumber
      - number
      - purpose
      type: object
      x-conditional:
      - areaCode
    CommonEmailAddress:
      properties:
        isPreferred:
          description: May be `true` for one and only one email record in the collection.
            Denotes the default email address.
          type: boolean
        purpose:
          description: The purpose for the email, as specified by the customer.
          enum:
          - HOME
          - OTHER
          - UNSPECIFIED
          - WORK
          type: string
        address:
          description: A correctly formatted email address, as defined by the addr-spec
            format in **[[RFC5322]](#nref-RFC5322)**.
          type: string
          x-cds-type: ExternalRef
      required:
      - address
      - purpose
      type: object
    CommonPhysicalAddressWithPurpose:
      allOf:
      - $ref: '#/components/schemas/CommonPhysicalAddress'
      - $ref: '#/components/schemas/CommonPhysicalAddressWithPurpose_allOf'
    CommonPhysicalAddress:
      properties:
        addressUType:
          description: The type of address object present.
          enum:
          - paf
          - simple
          type: string
        simple:
          $ref: '#/components/schemas/CommonSimpleAddress'
        paf:
          $ref: '#/components/schemas/CommonPAFAddress'
      required:
      - addressUType
      type: object
      x-conditional:
      - simple
      - paf
    CommonSimpleAddress:
      description: Required if _addressUType_ is set to `simple`.
      properties:
        mailingName:
          description: Name of the individual or business formatted for inclusion
            in an address used for physical mail.
          type: string
        addressLine1:
          description: First line of the standard address object.
          type: string
        addressLine2:
          description: Second line of the standard address object.
          type: string
        addressLine3:
          description: Third line of the standard address object.
          type: string
        postcode:
          description: Mandatory for Australian addresses.
          type: string
        city:
          description: Name of the city or locality.
          type: string
        state:
          description: Free text if the country is not Australia. If country is Australia
            then must be one of the values defined by the [State Type Abbreviation](https://auspost.com.au/content/dam/auspost_corp/media/documents/australia-post-data-guide.pdf)
            in the PAF file format. `NSW`, `QLD`, `VIC`, `NT`, `WA`, `SA`, `TAS`,
            `ACT`, `AAT`.
          type: string
        country:
          default: AUS
          description: A valid [ISO 3166 Alpha-3](https://www.iso.org/iso-3166-country-codes.html)
            country code. Australia (`AUS`) is assumed if country is not present.
          type: string
          x-cds-type: ExternalRef
      required:
      - addressLine1
      - city
      - state
      type: object
      x-conditional:
      - postcode
    CommonPAFAddress:
      description: Australian address formatted according to the file format defined
        by the [PAF file format](https://auspost.com.au/content/dam/auspost_corp/media/documents/australia-post-data-guide.pdf).
        Required if _addressUType_ is set to `paf`.
      properties:
        dpid:
          description: Unique identifier for an address as defined by Australia Post.
            Also known as Delivery Point Identifier.
          type: string
        thoroughfareNumber1:
          description: Thoroughfare number for a property (first number in a property
            ranged address).
          type: integer
          x-cds-type: PositiveInteger
        thoroughfareNumber1Suffix:
          description: Suffix for the thoroughfare number. Only relevant if _thoroughfareNumber1_
            is populated.
          type: string
        thoroughfareNumber2:
          description: Second thoroughfare number (only used if the property has a
            ranged address e.g., 23-25).
          type: integer
          x-cds-type: PositiveInteger
        thoroughfareNumber2Suffix:
          description: Suffix for the second thoroughfare number. Only relevant if
            _thoroughfareNumber2_ is populated.
          type: string
        flatUnitType:
          description: Type of flat or unit for the address.
          type: string
        flatUnitNumber:
          description: Unit number (including suffix, if applicable).
          type: string
        floorLevelType:
          description: Type of floor or level for the address.
          type: string
        floorLevelNumber:
          description: Floor or level number (including alpha characters).
          type: string
        lotNumber:
          description: Allotment number for the address.
          type: string
        buildingName1:
          description: Building/Property name 1.
          type: string
        buildingName2:
          description: Building/Property name 2.
          type: string
        streetName:
          description: The name of the street.
          type: string
        streetType:
          description: The street type. Valid enumeration defined by Australia Post
            PAF code file.
          type: string
        streetSuffix:
          description: The street type suffix. Valid enumeration defined by Australia
            Post PAF code file.
          type: string
        postalDeliveryType:
          description: Postal delivery type. (e.g., PO BOX). Valid enumeration defined
            by Australia Post PAF code file.
          type: string
        postalDeliveryNumber:
          description: Postal delivery number if the address is a postal delivery
            type.
          type: integer
          x-cds-type: PositiveInteger
        postalDeliveryNumberPrefix:
          description: Postal delivery number prefix related to the postal delivery
            number.
          type: string
        postalDeliveryNumberSuffix:
          description: Postal delivery number suffix related to the postal delivery
            number.
          type: string
        localityName:
          description: Full name of locality.
          type: string
        postcode:
          description: Postcode for the locality.
          type: string
        state:
          description: State in which the address belongs. Valid enumeration defined
            by Australia Post PAF code file [State Type Abbreviation](https://auspost.com.au/content/dam/auspost_corp/media/documents/australia-post-data-guide.pdf).
            `NSW`, `QLD`, `VIC`, `NT`, `WA`, `SA`, `TAS`, `ACT`, `AAT`.
          type: string
      required:
      - localityName
      - postcode
      - state
      type: object
    Links:
      example:
        self: self
      properties:
        self:
          description: Fully qualified link that generated the current response document.
          type: string
          x-cds-type: URIString
      required:
      - self
      type: object
    Meta:
      type: object
    ResponseErrorListV2:
      properties:
        errors:
          description: List of errors.
          items:
            $ref: '#/components/schemas/ErrorV2'
          type: array
      required:
      - errors
      type: object
    ErrorV2:
      properties:
        code:
          description: The code of the error encountered. Where the error is specific
            to the respondent, an application-specific error code, expressed as a
            string value. If the error is application-specific, the URN code that
            the specific error extends must be provided in the _meta_ object. Otherwise,
            the value is the error code URN.
          type: string
        title:
          description: A short, human-readable summary of the problem that **MUST
            NOT** change from occurrence to occurrence of the problem represented
            by the error code.
          type: string
        detail:
          description: A human-readable explanation specific to this occurrence of
            the problem.
          type: string
        meta:
          $ref: '#/components/schemas/ErrorV2_meta'
      required:
      - code
      - detail
      - title
      type: object
      x-conditional:
      - meta
    ResponseCommonDiscoveryStatus_data:
      example:
        updateTime: updateTime
        explanation: explanation
        expectedResolutionTime: expectedResolutionTime
        detectionTime: detectionTime
        status: OK
      properties:
        status:
          description: 'Enumeration with values: <ul><li>`OK`: (implementation is
            fully functional).<li>`PARTIAL_FAILURE`: (one or more endpoints are unexpectedly
            unavailable).<li>`UNAVAILABLE`: (the full implementation is unexpectedly
            unavailable).<li>`SCHEDULED_OUTAGE`: (an advertised outage is in effect).</ul>'
          enum:
          - OK
          - PARTIAL_FAILURE
          - SCHEDULED_OUTAGE
          - UNAVAILABLE
          type: string
        explanation:
          description: Provides an explanation of the current outage that can be displayed
            to an end customer. Mandatory if the status property is any value other
            than `OK`.
          type: string
        detectionTime:
          description: The date and time that the current outage was detected. Should
            only be present if the status property is `PARTIAL_FAILURE` or `UNAVAILABLE`.
          type: string
          x-cds-type: DateTimeString
        expectedResolutionTime:
          description: The date and time that full service is expected to resume (if
            known). Should not be present if the status property has a value of `OK`.
          type: string
          x-cds-type: DateTimeString
        updateTime:
          description: The date and time that this status was last updated by the
            Data Holder.
          type: string
          x-cds-type: DateTimeString
      required:
      - status
      - updateTime
      type: object
      x-conditional:
      - explanation
    ResponseDiscoveryOutagesList_data:
      example:
        outages:
        - duration: duration
          outageTime: outageTime
          isPartial: true
          explanation: explanation
        - duration: duration
          outageTime: outageTime
          isPartial: true
          explanation: explanation
      properties:
        outages:
          description: List of scheduled outages. Property is mandatory but may contain
            an empty list if no outages are scheduled.
          items:
            $ref: '#/components/schemas/DiscoveryOutage'
          type: array
      required:
      - outages
      type: object
    ResponseCommonCustomer_data:
      example:
        person:
          middleNames:
          - middleNames
          - middleNames
          firstName: firstName
          lastName: lastName
          occupationCode: occupationCode
          prefix: prefix
          occupationCodeVersion: ANZSCO_1220.0_2013_V1.2
          suffix: suffix
          lastUpdateTime: lastUpdateTime
        organisation:
          agentRole: agentRole
          agentLastName: agentLastName
          industryCodeVersion: ANZSIC_1292.0_2006_V2.0
          establishmentDate: establishmentDate
          businessName: businessName
          registeredCountry: AUS
          abn: abn
          acn: acn
          industryCode: industryCode
          organisationType: COMPANY
          legalName: legalName
          isACNCRegistered: true
          agentFirstName: agentFirstName
          shortName: shortName
          lastUpdateTime: lastUpdateTime
        customerUType: organisation
      properties:
        customerUType:
          description: The type of customer object that is present.
          enum:
          - organisation
          - person
          type: string
        person:
          $ref: '#/components/schemas/CommonPerson'
        organisation:
          $ref: '#/components/schemas/CommonOrganisation'
      required:
      - customerUType
      type: object
      x-conditional:
      - person
      - organisation
    ResponseCommonCustomerDetailV2_data:
      example:
        customerUType: organisation
      properties:
        customerUType:
          description: The type of customer object that is present.
          enum:
          - organisation
          - person
          type: string
        person:
          $ref: '#/components/schemas/CommonPersonDetailV2'
        organisation:
          $ref: '#/components/schemas/CommonOrganisationDetailV2'
      required:
      - customerUType
      type: object
      x-conditional:
      - person
      - organisation
    CommonPersonDetailV2_allOf:
      properties:
        phoneNumbers:
          description: Array is mandatory but may be empty if no phone numbers are
            held.
          items:
            $ref: '#/components/schemas/CommonPhoneNumber'
          type: array
        emailAddresses:
          description: May be empty.
          items:
            $ref: '#/components/schemas/CommonEmailAddress'
          type: array
        physicalAddresses:
          description: Array is mandatory but may be empty if no valid addresses are
            held. One and only one address may have the purpose of `REGISTERED`. Zero
            or one, and no more than one, record may have the purpose of `MAIL`. If
            zero then the `REGISTERED` address is to be used for mail.
          items:
            $ref: '#/components/schemas/CommonPhysicalAddressWithPurpose'
          type: array
      required:
      - emailAddresses
      - phoneNumbers
      - physicalAddresses
      type: object
    CommonOrganisationDetailV2_allOf:
      properties:
        physicalAddresses:
          description: Array is mandatory but may be empty if no valid addresses are
            held. One and only one address may have the purpose of `REGISTERED`. Zero
            or one, and no more than one, record may have the purpose of `MAIL`. If
            zero then the `REGISTERED` address is to be used for mail.
          items:
            $ref: '#/components/schemas/CommonPhysicalAddressWithPurpose'
          type: array
      required:
      - physicalAddresses
      type: object
    CommonPhysicalAddressWithPurpose_allOf:
      properties:
        purpose:
          description: Enumeration of values indicating the purpose of the physical
            address.
          enum:
          - MAIL
          - OTHER
          - PHYSICAL
          - REGISTERED
          - WORK
          type: string
      required:
      - purpose
      type: object
    ErrorV2_meta:
      description: Additional data for customised error codes.
      properties:
        urn:
          description: The CDR error code URN which the application-specific error
            code extends. Mandatory if the error _code_ is an application-specific
            error rather than a standardised error code.
          type: string
      type: object
      x-conditional:
      - urn
