openapi: 3.0.3
info:
  title: ABT GBO APIM APIs
  description: APIs for calling GBO APIM - internal use only, these are NOT the functional APIs to be used by touchpoints!
  version: "1.0"
servers:
  - url: https://api.integratielaag.nl/abt/gboapim/1.0
paths:
  /pad-management/v2/personal-data/{xtat}/administrative-data:
    servers:
      - url: https://api.integratielaag.nl/abt/serviceengine
        description: APIPRODUCT ABT Service Engine Portal
      - url: https://api.integratielaag.nl/abt/gboapim/1.0
        description: API ABT GBO APIM
    get:
      tags:
        - API WSO2 - GBO APIM
      summary: API 1211 - Get Administrative Data
      operationId: ABTPAD-GetAdministrativeData
      parameters:
        - name: xtat
          description: xTAT to get administrative data for
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AdministrativeData"
              examples:
                Valid and complete PAD:
                  summary: Valid and complete PAD
                  value:
                    name:
                      inaccuracyFlag: false
                      inaccuracyFlagReason: null
                      inaccuracyFlagCounter: 0
                      changeCounter: 0
                      maxUpdatesVerificationCount: 1
                      lastChangeDate: "2025-03-26T10:18:42.947"
                      isValidated: false
                    photo:
                      inaccuracyFlag: false
                      inaccuracyFlagReason: null
                      inaccuracyFlagCounter: 0
                      changeCounter: 0
                      maxUpdatesVerificationCount: 5
                      lastChangeDate: "2025-03-26T10:18:42.947"
                      isValidated: false
                    birthdate:
                      inaccuracyFlag: false
                      inaccuracyFlagReason: null
                      inaccuracyFlagCounter: 0
                      changeCounter: 0
                      maxUpdatesVerificationCount: 3
                      lastChangeDate: "2025-03-26T10:18:42.947"
                      isValidated: false
                Partially filled PAD (no photo):
                  summary: Partially filled PAD (no photo)
                  value:
                    name:
                      inaccuracyFlag: false
                      inaccuracyFlagReason: null
                      inaccuracyFlagCounter: 0
                      changeCounter: 0
                      maxUpdatesVerificationCount: 1
                      lastChangeDate: "2025-03-26T10:18:42.947"
                      isValidated: false
                    photo: null
                    birthdate:
                      inaccuracyFlag: false
                      inaccuracyFlagReason: null
                      inaccuracyFlagCounter: 0
                      changeCounter: 0
                      maxUpdatesVerificationCount: 3
                      lastChangeDate: "2025-03-26T10:18:42.947"
                      isValidated: false
                Flagged PAD:
                  summary: Flagged PAD
                  value:
                    name:
                      inaccuracyFlag: true
                      inaccuracyFlagReason: "Invalid name"
                      inaccuracyFlagCounter: 1
                      changeCounter: 1
                      maxUpdatesVerificationCount: 1
                      lastChangeDate: "2025-03-26T10:18:42.947"
                      isValidated: false
                    photo:
                      inaccuracyFlag: true
                      inaccuracyFlagReason: "Invalid photo"
                      inaccuracyFlagCounter: 1
                      changeCounter: 0
                      maxUpdatesVerificationCount: 5
                      lastChangeDate: "2025-03-26T10:18:42.947"
                      isValidated: false
                    birthdate:
                      inaccuracyFlag: true
                      inaccuracyFlagReason: "Invalid birthdate"
                      inaccuracyFlagCounter: 1
                      changeCounter: 2
                      maxUpdatesVerificationCount: 3
                      lastChangeDate: "2025-03-26T10:18:42.947"
                      isValidated: false
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
              examples:
                Invalid UUID:
                  summary: Invalid UUID
                  value:
                    errors:
                      code: "0x03000103"
                      data: [
                        "geen-uuid"
                      ]
                      message: "The provided scTat is not a valid UUID"
                    exceptionClassName: "PadpConstraintViolationException"
                    exceptionStackTrace: "not available because debug mode is turned off"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
              examples:
                No PAD found for xTAT:
                  summary: No PAD found for xTAT
                  value:
                    errors:
                      code: "0x03000105"
                      data: []
                      message: "Transit account not found"
                    exceptionClassName: "PadpEntityNotFoundException"
                    exceptionStackTrace: "not available because debug mode is turned off"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
              examples:
                Unknown xTAT:
                  summary: Unknown xTAT
                  value:
                    errors:
                      code: "0x00000001"
                      data: null
                      message: "400 : \"{\"errorMessage\":{\"referenceId\":\"076f0de4-df33-42a3-add0-def971ab6679\",\"message\":\"Unknown external transit account token.\"},\"businessExceptions\":[{\"code\":\"TM0207\",\"message\":\"Unknown external transit account token.\"}]}\""
                    exceptionClassName: "BadRequest"
                    exceptionStackTrace: "not available because debug mode is turned off"

  /internal/b2b-client-authentication/v1/token/idp/b2b-access-token:
    servers:
      - url: https://only-for-internal-use.com
    get:
      tags:
        - Internal DHIL use only - Raw GBO APIM
      summary: API 1020 - Get B2B Access Token
      description: Returns a client access token, needed for most other PADP APIs.
      operationId: GetB2bAccessToken
      parameters:
        - name: APIKey
          description: B2B IDP APIM Product API Key
          in: header
          required: true
          schema:
            type: string
        - name: grant_type
          description: A grant_type IS A string THAT defines the method which is used by client to request Access Token. grant_type = client_credentials - is used for M2M communication
          in: query
          required: true
          example: client_credentials
          schema:
            type: string
        - name: client_id
          description: A client_id IS A string THAT is a unique identifier of the client application
          in: query
          required: true
          schema:
            type: string
        - name: client_secret
          description: A client_secret IS A unique identifier THAT is issued by IDP server on client registertraion and known only to Client and IDP server
          in: query
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/B2bAccessToken"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
  /internal/pad-management/v2/personal-data/{xtat}/administrative-data:
    servers:
      - url: https://only-for-internal-use.com
    get:
      tags:
        - Internal DHIL use only - Raw GBO APIM
      summary: API 1211 - Get Administrative Data
      operationId: InternalGBOAPIM-GetAdministrativeData
      parameters:
        - name: xtat
          description: xTAT to get administrative data for
          in: path
          required: true
          schema:
            type: string
        - name: APIKey
          description: PADP APIM Product API Key
          in: header
          required: true
          schema:
            type: string
        - name: Authorization
          description: B2B Client Access Token, without the 'Bearer ' prefix
          in: header
          required: true
          schema:
            type: string
        - name: requestId
          description: A unique identifier for the request
          in: header
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AdministrativeData"
              examples:
                Valid and complete PAD:
                  summary: Valid and complete PAD
                  value:
                    name:
                      inaccuracyFlag: false
                      inaccuracyFlagReason: null
                      inaccuracyFlagCounter: 0
                      changeCounter: 0
                      maxUpdatesVerificationCount: 1
                      lastChangeDate: "2025-03-26T10:18:42.947"
                      isValidated: false
                    photo:
                      inaccuracyFlag: false
                      inaccuracyFlagReason: null
                      inaccuracyFlagCounter: 0
                      changeCounter: 0
                      maxUpdatesVerificationCount: 5
                      lastChangeDate: "2025-03-26T10:18:42.947"
                      isValidated: false
                    birthdate:
                      inaccuracyFlag: false
                      inaccuracyFlagReason: null
                      inaccuracyFlagCounter: 0
                      changeCounter: 0
                      maxUpdatesVerificationCount: 3
                      lastChangeDate: "2025-03-26T10:18:42.947"
                      isValidated: false
                Partially filled PAD (no photo):
                  summary: Partially filled PAD (no photo)
                  value:
                    name:
                      inaccuracyFlag: false
                      inaccuracyFlagReason: null
                      inaccuracyFlagCounter: 0
                      changeCounter: 0
                      maxUpdatesVerificationCount: 1
                      lastChangeDate: "2025-03-26T10:18:42.947"
                      isValidated: false
                    photo: null
                    birthdate:
                      inaccuracyFlag: false
                      inaccuracyFlagReason: null
                      inaccuracyFlagCounter: 0
                      changeCounter: 0
                      maxUpdatesVerificationCount: 3
                      lastChangeDate: "2025-03-26T10:18:42.947"
                      isValidated: false
                Flagged PAD:
                  summary: Flagged PAD
                  value:
                    name:
                      inaccuracyFlag: true
                      inaccuracyFlagReason: "Invalid name"
                      inaccuracyFlagCounter: 1
                      changeCounter: 1
                      maxUpdatesVerificationCount: 1
                      lastChangeDate: "2025-03-26T10:18:42.947"
                      isValidated: false
                    photo:
                      inaccuracyFlag: true
                      inaccuracyFlagReason: "Invalid photo"
                      inaccuracyFlagCounter: 1
                      changeCounter: 0
                      maxUpdatesVerificationCount: 5
                      lastChangeDate: "2025-03-26T10:18:42.947"
                      isValidated: false
                    birthdate:
                      inaccuracyFlag: true
                      inaccuracyFlagReason: "Invalid birthdate"
                      inaccuracyFlagCounter: 1
                      changeCounter: 2
                      maxUpdatesVerificationCount: 3
                      lastChangeDate: "2025-03-26T10:18:42.947"
                      isValidated: false
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
              examples:
                Invalid UUID:
                  summary: Invalid UUID
                  value:
                    errors:
                      code: "0x03000103"
                      data: [
                        "geen-uuid"
                      ]
                      message: "The provided scTat is not a valid UUID"
                    exceptionClassName: "PadpConstraintViolationException"
                    exceptionStackTrace: "not available because debug mode is turned off"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
              examples:
                No PAD found for xTAT:
                  summary: No PAD found for xTAT
                  value:
                    errors:
                      code: "0x03000105"
                      data: []
                      message: "Transit account not found"
                    exceptionClassName: "PadpEntityNotFoundException"
                    exceptionStackTrace: "not available because debug mode is turned off"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
              examples:
                Unknown xTAT:
                  summary: Unknown xTAT
                  value:
                    errors:
                      code: "0x00000001"
                      data: null
                      message: "400 : \"{\"errorMessage\":{\"referenceId\":\"076f0de4-df33-42a3-add0-def971ab6679\",\"message\":\"Unknown external transit account token.\"},\"businessExceptions\":[{\"code\":\"TM0207\",\"message\":\"Unknown external transit account token.\"}]}\""
                    exceptionClassName: "BadRequest"
                    exceptionStackTrace: "not available because debug mode is turned off"
components:
  schemas:
    AdministrativeData:
      type: object
      properties:
        name:
          $ref: "#/components/schemas/AdministrativeData_AdministrativeDataElement"
        photo:
          $ref: "#/components/schemas/AdministrativeData_AdministrativeDataElement"
        birthdate:
          $ref: "#/components/schemas/AdministrativeData_AdministrativeDataElement"
      additionalProperties: false
    AdministrativeData_AdministrativeDataElement:
      type: object
      properties:
        inaccuracyFlag:
          type: boolean
        inaccuracyFlagReason:
          type: string
          nullable: true
        inaccuracyFlagCounter:
          type: integer
          format: int32
        changeCounter:
          type: integer
          format: int32
        maxUpdatesVerificationCount:
          type: integer
          format: int32
        lastChangeDate:
          type: string
          format: date-time
        isValidated:
          type: boolean
      additionalProperties: false
    B2bAccessToken:
      type: object
      properties:
        access_token:
          type: string
          nullable: true
        expires_in:
          type: integer
          format: int32
        refresh_expires_in:
          type: integer
          format: int32
        refresh_token:
          type: string
          nullable: true
        token_type:
          type: string
          nullable: true
        not-before-policy:
          type: integer
          format: int32
        scope:
          type: string
          nullable: true
        BE_ID:
          type: string
          nullable: true
      additionalProperties: false
    ErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: "#/components/schemas/ErrorResponse_Error"
          nullable: true
        exceptionClassName:
          type: string
          nullable: true
        exceptionStackTrace:
          type: string
          nullable: true
      additionalProperties: false
    ErrorResponse_Error:
      type: object
      properties:
        code:
          type: string
          nullable: true
        data:
          type: array
          items:
            type: string
          nullable: true
        message:
          type: string
          nullable: true
      additionalProperties: false
