openapi: "3.0.3"
info:
  title: ABT Customers CRUD APIs v2
  version: "2.0"
  description: CRUD APIs for ABT Customer database. These are NOT the functional APIs from Service Engine.
servers:
  - url: https://services.acc.api.htm.nl/abt/abtcustomers/2.0  
paths:
  /customers:
    get:
      tags:
        - Customer
      summary: Search customer profiles
      description: >-
        Search for all customer profile list in the ABT database matching given query parameters
      parameters:
        - name: customerProfileId
          in: query
          schema:
            type: integer
            example: 1
        - name: customerNumber
          in: query
          schema:
            type: integer
            example: 1000001
        - name: customerStatusId
          in: query                       
          explode: false
          schema:
            type: array
            items:
              type: integer 
          description: Filter on possible customer statuses. 1 = Inactive, 2 = Active, 3 = Blocked, 4 = Frozen, 5 = Cleaned
        - name: debtorNumber
          in: query
          schema:
            type: string
            example: DB100001
        - name: debtorStatusId
          in: query                                 
          explode: false
          schema:
            type: array
            items:
              type: integer
          description: Filter on possible debtor statuses. 1 = Active, 2 = Inactive
        - name: vasCustomerNumber
          in: query
          schema:
            type: string
            example: VAS100001
        - name: lastLoginBefore
          in: query
          schema:
            type: string
            format: date-time
            example: "2022-08-04 15:01:00.000"
        - name: lastLoginAfter
          in: query
          schema:
            type: string
            format: date-time
            example: "2022-08-04 15:01:00.000"
        - name: birthname
          in: query
          schema:
            type: string
            example: John
        - name: surname
          in: query
          schema:
            type: string
            example: Doe
        - name: prefix
          in: query
          schema:
            type: string
            example: de
        - name: suffix
          in: query
          schema:
            type: string
            example: PhD
        - name: emailAddress
          in: query
          schema:
            type: string
            format: email
            example: john.doe@mymailprovider.com
        - name: dateOfBirth
          in: query
          schema:
            type: string
            format: date
            example: "2000-01-01"
        - name: addressStreet
          in: query
          schema:
            type: string
            example: Sesamestreet
        - name: addressHouseNumber
          in: query
          schema:
            type: integer
            example: 1
        - name: addressHouseNumberSuffix
          in: query
          schema:
            type: string
            example: A
        - name: addressPostalCode
          in: query
          schema:
            type: string
            example: 1234AB
        - name: addressCity
          in: query
          schema:
            type: string
            example: The Hague
        - name: addressCountry
          in: query
          schema:
            type: string
            example: NL
        - name: phoneNumber
          in: query
          schema:
            type: string
            example: "0123456789"
        - name: phoneCountryCode
          in: query
          schema:
            type: string
            example: "+31"
        - name: chipcardNumber
          in: query
          schema:
            type: string
            example: "0123456789"
        - name: ovChipCardAlias
          in: query
          schema:
            type: string
            example: My ovchipcard
        - name: ovPasNumber
          in: query
          schema:
            type: string
            example: 0123456789
        - name: ovPayTokenAlias
          in: query
          schema:
            type: string
            example: My Ov Pay Token
        - name: ovPayTokenXTat
          in: query
          schema:
            type: string
            example: 180d04e0-a721-447e-a1d9-b416937b43bc
        - name: ovPayTokenXBot
          in: query
          schema:
            type: string
            example: e1307c73-676a-4d07-967b-6141276f7c7c
        - name: mandateReference
          in: query
          schema:
            type: string
            example: PAYT-1
        - name: iban
          in: query
          schema:
            type: string
            example: NL20INGB0001234567
        - name: bic
          in: query
          schema:
            type: string
            example: NL20INGB
        - name: ascription
          in: query
          schema:
            type: string
            example: j.jansen
        - name: billingAlias
          in: query
          schema:
            type: string
            example: Mijn ING bankrekening
        - name: sort
          in: query
          schema:
            type: string
        - name: offset
          in: query
          schema:
            type: integer
        - name: limit
          in: query
          schema:
            type: integer
            example: 20
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/getCustomerProfiles"
              examples:
                getCustomersMultiple:
                  summary: getCustomersMultiple
                  description: >-
                    Found multiple customer profiles matching the search parameters, does not return the financial details
                  value:
                    customers:
                      - customerProfileId: 1
                        customerNumber: 1000001
                        debtorNumber: DB100001
                        debtorStatus:
                          debtorStatusId: 1
                          name: Inactive
                        vasCustomerNumber: CST005
                        customerPreference:
                          customerPreferenceId: 1
                          language:
                            languageId: 1
                            name: Dutch
                            ietfCode: nl-NL
                            iso639Code: nl
                        customerStatusInstances:
                          - customerStatus:
                              name: Active
                              customerStatusId: 2
                            fromInclusive: "2022-08-04 15:01:00.000"
                            toInclusive: "2022-08-05 15:01:00.000"
                        person:
                          birthname: Pieter
                          surname: Valen
                          prefix: de
                          suffix: PhD
                          dateOfBirth: "2002-10-29"
                          emailAddresses: TEST@HTM.NL
                          isEmailVerified: True
                          addresses:
                            - addressId: 1
                              street: mystreet
                              houseNumber: 1
                              houseNumberSuffix: null
                              postalCode: 0000AA
                              city: Den Haag
                              country: NL
                              addressType:
                                addressTypeId: 2
                                name: Billing
                            - addressId: 2
                              street: mystreet 33
                              houseNumber: 1
                              houseNumberSuffix: null
                              postalCode: 4455CA
                              city: Den BOSCH
                              country: NL
                              addressType:
                                addressTypeId: 1
                                name: Shipping
                          phones:
                            - phoneId: 1
                              number: "3112345678"
                              countryCode: "+31"
                              phoneType:
                                phoneTypeId: 1
                                name: Home
                              isPreferred: true
                            - phoneId: 2
                              number: "333225588"
                              countryCode: "+31"
                              phoneType:
                                phoneTypeId: 2
                                name: Work
                              isPreferred: false
                          devices:
                            - deviceId: "5bedce29-af0c-4f3c-b182-2caa8a1f9377"
                              externalDeviceId: "c5545584-04af-4c60-a955-d6a70baab848"
                              alias: "iPhone prive"
                            - deviceId: "d7683e89-b2ad-4e79-85b3-dbb42aad0325"
                              externalDeviceId: "7122a988-a00a-417d-a5b4-da2d91354976"
                              alias: "iPhone zakelijk"
                        ovChipCards:
                          - ovChipCardId: 1
                            chipCardNumber: "1234123412341234"
                            validUntil: "2023-01-01"
                            alias: alias
                          - ovChipCardId: 2
                            chipCardNumber: "1234123412341235"
                            validUntil: "2025-01-01"
                            alias: alias
                        ovPayTokens:
                          - ovPayTokenId: 126
                            tokenType:
                              tokenTypeId: 1
                              name: EMV
                            xTat: 0115b0df-db38-4702-8811-6f7de00db3ac
                            xBot: 71a88843-32b8-4d52-ac25-de2458c47775
                            alias: alias
                            lastDigits: "5678"
                            ovpasNumber: null
                            tokenStatus:
                              tokenStatusId: 2
                              name: Active
                            expirationDate: "2025-04-20T17:05:52.000+02:00"
                            replacedByTokenId: 1
                          - ovPayTokenId: 127
                            tokenType:
                              tokenTypeId: 2
                              name: OV-pas physical
                            xTat: 0115b0df-db38-4702-8811-6f7de00db3ac
                            xBot: 71a88843-32b8-4d52-ac25-de2458c47775
                            alias: alias
                            lastDigits: "5674"
                            ovpasNumber: OV34568
                            tokenStatus:
                              tokenStatusId: 2
                              name: Active
                            expirationDate: "2024-04-20T17:05:52.000+02:00"
                            replacedByTokenId: 2
                        auditTrails:
                          - auditTrailId: 1
                            customerProfileId: 1
                            action: insert
                            user: user
                            timestamp: "2023-10-20T17:05:52.000+02:00"
                            correlationId: 01c6d8b4-1cd3-4f9b-85ea-c9adca53ce95
                        _links:
                          {
                            "self":
                              {
                                "href": "https://api.integratielaag.nl/abt/abtcustomers/2.0/customers?customerProfileId=1",
                                "method": "GET",
                              },
                          }
                      - customerProfileId: 12
                        customerNumber: 1000002
                        debtorNumber: DB100121
                        debtorStatus:
                          debtorStatusId: 1
                          name: Inactive
                        vasCustomerNumber: CST005
                        customerPreference:                        
                          customerPreferenceId: 2
                          language:
                            languageId: 1
                            name: Dutch
                            ietfCode: nl-NL
                            iso639Code: nl
                        customerStatusInstances:                        
                          - customerStatus:
                              name: Active
                              customerStatusId: 2
                            fromInclusive: "2022-08-04 15:01:00.000"
                            toInclusive: "2022-08-05 15:01:00.000"
                          - customerStatus:
                              name: Blocked
                              customerStatusId: 3
                            fromInclusive: "2022-08-05 15:01:00.000"
                            toInclusive: "2023-08-05 15:01:00.000"
                          - customerStatus:
                              name: Active
                              customerStatusId: 2
                            fromInclusive: "2023-08-05 15:01:00.000"
                            toInclusive: null
                        person:
                          birthname: Pieter
                          surname: Valen
                          prefix: de
                          suffix: PhD
                          dateOfBirth: "2002-10-29"
                          emailAddresses: TEST@HTM.NL
                          isEmailVerified: False
                          address:
                            - addressId: 1
                              street: mystreet
                              houseNumber: 1
                              houseNumberSuffix: null
                              postalCode: 0000AA
                              city: Den Haag
                              country: NL
                              addressType:
                                addressTypeId: 2
                                name: Billing
                            - addressId: 2
                              street: mystreet 33
                              houseNumber: 1
                              houseNumberSuffix: null
                              postalCode: 4455CA
                              city: Den BOSCH
                              country: NL
                              isPreferred: true
                              addressType:
                                addressTypeId: 1
                                name: Shipping
                          phones:
                            - phoneId: 1
                              number: "3112345678"
                              countryCode: "+31"
                              phoneType:
                                phoneTypeId: 1
                                name: Home
                              isPreferred: true
                            - phoneId: 2
                              number: "333225588"
                              countryCode: "+31"
                              phoneType:
                                phoneTypeId: 2
                                name: Work
                              isPreferred: false
                          devices:
                            - deviceId: "5bedce29-af0c-4f3c-b182-2caa8a1f9377"
                              externalDeviceId: "c5545584-04af-4c60-a955-d6a70baab848"
                              alias: "iPhone prive"
                            - deviceId: "d7683e89-b2ad-4e79-85b3-dbb42aad0325"
                              externalDeviceId: "7122a988-a00a-417d-a5b4-da2d91354976"
                              alias: "iPhone zakelijk"
                        ovChipCards:
                          - ovChipCardId: 1
                            chipCardNumber: "1234123412341234"
                            validUntil: "2023-01-01"
                            alias: alias
                          - ovChipCardId: 2
                            chipCardNumber: "1234123412341235"
                            validUntil: "2025-01-01"
                            alias: alias
                        ovPayTokens:
                          - ovPayTokenId: 126
                            tokenType:
                              tokenTypeId: 2
                              name: OV-pas physical
                            xTat: 0115b0df-db38-4702-8811-6f7de00db3ac
                            xBot: 71a88843-32b8-4d52-ac25-de2458c47775
                            alias: alias
                            lastDigits: "5678"
                            ovpasNumber: OV34567
                            tokenStatus:
                              tokenStatusId: 2
                              name: active
                            expirationDate: "2025-04-20T17:05:52.000+02:00"
                            replacedByTokenId: 1
                          - ovPayTokenId: 127
                            tokenType:
                              tokenTypeId: 2
                              name: OV-pas physical
                            xTat: 0115b0df-db38-4702-8811-6f7de00db3ac
                            xBot: 71a88843-32b8-4d52-ac25-de2458c47775
                            alias: alias
                            lastDigits: "5674"
                            ovpasNumber: OV34568
                            tokenStatus:
                              tokenStatusId: 2
                              name: active
                            expirationDate: "2024-04-20T17:05:52.000+02:00"
                            replacedByTokenId: 2
                        auditTrails:
                          - auditTrailId: 1
                            customerProfileId: 1
                            action: insert
                            user: user
                            timestamp: "2023-10-20T17:05:52.000+02:00"
                            correlationId: 01c6d8b4-1cd3-4f9b-85ea-c9adca53ce95
                        _links:
                          {
                            "self":
                              {
                                "href": "https://api.integratielaag.nl/abt/abtcustomers/2.0/customers?customerProfileId=12",
                                "method": "GET",
                              },
                          }
                    _links:
                      {
                        "self":
                          {
                            "href": "https://api.integratielaag.nl/abt/abtcustomers/2.0/customers?offset=20",
                            "method": "GET",
                          },
                        "prev":
                          {
                            "href": "https://api.integratielaag.nl/abt/abtcustomers/2.0/customers",
                            "method": "GET",
                          },
                        "next":
                          {
                            "href": "https://api.integratielaag.nl/abt/abtcustomers/2.0/customers?offset=40",
                            "method": "GET",
                          },
                      }
                getCustomerActive:
                  summary: getCustomerActive
                  description: >-
                    Found a single customerProfile with an active status
                  value:
                    customers:
                      - customerProfileId: 1
                        customerNumber: 1000001
                        debtorNumber: DB100001
                        debtorStatus:
                          debtorStatusId: 1
                          name: Inactive
                        vasCustomerNumber: CST005
                        customerPreference:                        
                          customerPreferenceId: 1
                          language:
                            languageId: 1
                            name: Dutch
                            ietfCode: nl-NL
                            iso639Code: nl
                        customerStatusInstances:
                          - customerStatus:
                              name: Active
                              customerStatusId: 2
                            fromInclusive: "2022-08-04 15:01:00.000"
                            toInclusive: null
                        person:
                          birthname: Pieter
                          surname: Valen
                          prefix: de
                          suffix: PhD
                          dateOfBirth: "2002-10-29"
                          emailAddresses: TEST@HTM.NL
                          isEmailVerified: False
                          addresses:
                            - addressId: 1
                              street: mystreet
                              houseNumber: 1
                              houseNumberSuffix: null
                              postalCode: 0000AA
                              city: Den Haag
                              country: NL
                              addressType:
                                addressTypeId: 2
                                name: Billing
                            - addressId: 2
                              street: mystreet 33
                              houseNumber: 1
                              houseNumberSuffix: null
                              postalCode: 4455CA
                              city: Den BOSCH
                              country: NL
                              addressType:
                                addressTypeId: 1
                                name: Shipping
                          phones:
                            - phoneId: 1
                              number: "3112345678"
                              countryCode: "+31"
                              phoneType:
                                phoneTypeId: 1
                                name: Home
                              isPreferred: true
                            - phoneId: 2
                              number: "333225588"
                              countryCode: "+31"
                              phoneType:
                                phoneTypeId: 2
                                name: Work
                              isPreferred: false
                          devices:
                            - deviceId: "5bedce29-af0c-4f3c-b182-2caa8a1f9377"
                              externalDeviceId: "c5545584-04af-4c60-a955-d6a70baab848"
                              alias: "iPhone prive"
                            - deviceId: "d7683e89-b2ad-4e79-85b3-dbb42aad0325"
                              externalDeviceId: "7122a988-a00a-417d-a5b4-da2d91354976"
                              alias: "iPhone zakelijk"
                        ovChipCards:
                          - ovChipCardId: 1
                            chipCardNumber: "1234123412341234"
                            validUntil: "2023-01-01"
                            alias: alias
                          - ovChipCardId: 2
                            chipCardNumber: "1234123412341235"
                            validUntil: "2025-01-01"
                            alias: alias
                        ovPayTokens:
                          - ovPayTokenId: 126
                            tokenType:
                              tokenTypeId: 1
                              name: EMV
                            xTat: 0115b0df-db38-4702-8811-6f7de00db3ac
                            xBot: 71a88843-32b8-4d52-ac25-de2458c47775
                            alias: alias
                            lastDigits: "5678"
                            ovpasNumber: null
                            tokenStatus:
                              tokenStatusId: 2
                              name: Active
                            expirationDate: "2025-04-20T17:05:52.000+02:00"
                            replacedByTokenId: 1
                          - ovPayTokenId: 127
                            tokenType:
                              tokenTypeId: 2
                              name: OV-pas physical
                            xTat: 0115b0df-db38-4702-8811-6f7de00db3ac
                            xBot: 71a88843-32b8-4d52-ac25-de2458c47775
                            alias: alias
                            lastDigits: "5674"
                            ovpasNumber: OV34568
                            tokenStatus:
                              tokenStatusId: 2
                              name: Active
                            expirationDate: "2024-04-20T17:05:52.000+02:00"
                            replacedByTokenId: 2
                        auditTrails:
                          - auditTrailId: 1
                            customerProfileId: 1
                            action: insert
                            user: user
                            timestamp: "2023-10-20T17:05:52.000+02:00"
                            correlationId: 01c6d8b4-1cd3-4f9b-85ea-c9adca53ce95
                        _links:
                          {
                            "self":
                              {
                                "href": "https://api.integratielaag.nl/abt/abtcustomers/2.0/customers?customerProfileId=1",
                                "method": "GET",
                              },
                          }
                    _links:
                      {
                        "self":
                          {
                            "href": "https://api.integratielaag.nl/abt/abtcustomers/2.0/customers",
                            "method": "GET",
                          },
                      }
                getCustomerBlocked:
                  summary: getCustomerBlocked
                  description: >-
                    Found a single customerProfile with a blocked status
                  value:
                    customers:
                      - customerProfileId: 1
                        customerNumber: 1000001
                        debtorNumber: DB100001
                        debtorStatus:
                          debtorStatusId: 2
                          name: Active
                        vasCustomerNumber: CST005
                        customerPreference:                        
                          customerPreferenceId: 5
                          language:
                            languageId: 1
                            name: Dutch
                            ietfCode: nl-NL
                            iso639Code: nl
                        customerStatusInstances:
                          - customerStatus:
                              name: Active
                              customerStatusId: 2
                            fromInclusive: "2022-08-04 15:01:00.000"
                            toInclusive: "2022-08-05 15:01:00.000"
                          - customerStatus:
                              name: Blocked
                              customerStatusId: 3
                            fromInclusive: "2022-08-05 15:01:00.000"
                            toInclusive: null
                        person:
                          birthname: Pieter
                          surname: Valen
                          prefix: de
                          suffix: PhD
                          dateOfBirth: "2002-10-29"
                          emailAddresses: TEST@HTM.NL
                          isEmailVerified: True
                          addresses:
                            - addressId: 1
                              street: mystreet
                              houseNumber: 1
                              houseNumberSuffix: null
                              postalCode: 0000AA
                              city: Den Haag
                              country: NL
                              addressType:
                                addressTypeId: 2
                                name: Billing
                            - addressId: 2
                              street: mystreet 33
                              houseNumber: 1
                              houseNumberSuffix: null
                              postalCode: 4455CA
                              city: Den BOSCH
                              country: NL
                              addressType:
                                addressTypeId: 1
                                name: Shipping
                          phones:
                            - phoneId: 1
                              number: "3112345678"
                              countryCode: "+31"
                              phoneType:
                                phoneTypeId: 1
                                name: Home
                              isPreferred: true
                            - phoneId: 2
                              number: "333225588"
                              countryCode: "+31"
                              phoneType:
                                phoneTypeId: 2
                                name: Work
                              isPreferred: false
                          devices:
                            - deviceId: "5bedce29-af0c-4f3c-b182-2caa8a1f9377"
                              externalDeviceId: "c5545584-04af-4c60-a955-d6a70baab848"
                              alias: "iPhone prive"
                            - deviceId: "d7683e89-b2ad-4e79-85b3-dbb42aad0325"
                              externalDeviceId: "7122a988-a00a-417d-a5b4-da2d91354976"
                              alias: "iPhone zakelijk"
                        ovChipCards:
                          - ovChipCardId: 1
                            chipCardNumber: "1234123412341234"
                            validUntil: "2023-01-01"
                            alias: alias
                          - ovChipCardId: 2
                            chipCardNumber: "1234123412341235"
                            validUntil: "2025-01-01"
                            alias: alias
                        ovPayTokens:
                          - ovPayTokenId: 126
                            tokenType:
                              tokenTypeId: 1
                              name: EMV
                            xTat: 0115b0df-db38-4702-8811-6f7de00db3ac
                            xBot: 71a88843-32b8-4d52-ac25-de2458c47775
                            alias: alias
                            lastDigits: "5678"
                            ovpasNumber: null
                            tokenStatus:
                              tokenStatusId: 2
                              name: Active
                            expirationDate: "2025-04-20T17:05:52.000+02:00"
                            replacedByTokenId: 1
                          - ovPayTokenId: 127
                            tokenType:
                              tokenTypeId: 2
                              name: OV-pas physical
                            xTat: 0115b0df-db38-4702-8811-6f7de00db3ac
                            xBot: 71a88843-32b8-4d52-ac25-de2458c47775
                            alias: alias
                            lastDigits: "5674"
                            ovpasNumber: OV34568
                            tokenStatus:
                              tokenStatusId: 2
                              name: Active
                            expirationDate: "2024-04-20T17:05:52.000+02:00"
                            replacedByTokenId: 2
                        auditTrails:
                          - auditTrailId: 1
                            customerProfileId: 1
                            action: insert
                            user: user
                            timestamp: "2023-10-20T17:05:52.000+02:00"
                            correlationId: 01c6d8b4-1cd3-4f9b-85ea-c9adca53ce95
                        _links:
                          {
                            "self":
                              {
                                "href": "https://api.integratielaag.nl/abt/abtcustomers/2.0/customers?customerProfileId=1",
                                "method": "GET",
                              },
                          }
                    _links:
                      {
                        "self":
                          {
                            "href": "https://api.integratielaag.nl/abt/abtcustomers/2.0/customers",
                            "method": "GET",
                          },
                      }
        400:
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
              examples:
                invalidDataTypeError:
                  summary: invalidDataTypeError
                  description: >-
                    The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
                  value:
                    type: https://htm.nl/api/v1/probs/bad-request
                    title: Your request contains an invalid datatype
                    detail: "'2023-02-01 00:00:00' is not a valid Datetime"
                    instance: urn:uuid:4017fabc-1b28-11e8-accf-0ed5f89f718b
      security:
        - default: []
      x-auth-type: Application & Application User
      x-throttling-tier: Unlimited
    post:
      tags:
        - Customer
      summary: Create a customer profile
      description: >-
        Create a customer profile in the ABT database with status ACTIVE and
        debtorStatus Inactive with a start date based on the timestamp of this
        post call. 

          - Requested format for postal code:
            - 0000AA
          - Requested format for country:
            - NL
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/postCustomerProfile"
            examples:
              minimumProfile:
                value: {}
              basicCustomerProfile:
                value:
                  debtorStatusId: 2
                  person:
                    birthname: Jan
                    surname: Jansen
                    emailAddress: j.jansen@hatseflats.nl
              fullCustomerProfile:
                value:
                  customerPreference:
                    languageId: 1
                  debtorStatusId: 2
                  person:
                    birthname: Jan
                    surname: Jansen
                    prefix: de
                    suffix: jr
                    dateOfBirth: "1970-01-01"
                    emailAddress: j.jansen@hatseflats.nl
                    isEmailVerified: False
                    addresses:
                      - street: Laan van Meerdervoort
                        houseNumber: 5
                        houseNumberSuffix: B
                        postalCode: 2500AA
                        city: Den Haag
                        country: NL
                        addressTypeId: 1
                      - street: Beeklaan
                        houseNumber: 30
                        houseNumberSuffix: B
                        postalCode: 2500AA
                        city: Den Haag
                        country: NL
                        addressTypeId: 2
                    phones:
                      - number: "6123456789"
                        countryCode: "+31"
                        phoneTypeId: 1
                        isPreferred: true
                      - number: "7012345678"
                        countryCode: "+31"
                        phoneTypeId: 2
                        isPreferred: false
                    devices:
                      -  externalDeviceId: "c5545584-04af-4c60-a955-d6a70baab848"
                         alias: "iPhone prive"
                      -  externalDeviceId: "7122a988-a00a-417d-a5b4-da2d91354976"
                         alias: "iPhone zakelijk"
        required: true
      responses:
        201:
          description: Successful created a customer profile
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/postCustomerProfileResponse"
              examples:
                customerProfileCreated:
                  summary: customerProfileCreated
                  description: >-
                    Successfully created a customer profile
                  value:
                    customerProfileId: 1
                    customerNumber: 1000001
                    debtorNumber: DB100001
        400:
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
              examples:
                invalidDataTypeError:
                  summary: invalidDataTypeError
                  description: >-
                    The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
                  value:
                    type: https://htm.nl/api/v1/probs/bad-request
                    title: Your request contains an invalid datatype
                    detail: "'2023-02-01 00:00:00' is not a valid Datetime"
                    instance: urn:uuid:4017fabc-1b28-11e8-accf-0ed5f89f718b
      security:
        - default: []
      x-auth-type: Application & Application User
      x-throttling-tier: Unlimited
  /customers/{customerProfileId}:
    patch:
      tags:
        - Customer
      summary: Modify a customer debtorStatus
      description: >-

      parameters:
        - name: customerProfileId
          in: path
          required: true
          schema:
            type: integer
            example: 1
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/customersEntity"
            examples:
              updateDebtorStatus:
                value:
                  debtorStatusId: 2
              updateFullPerson:
                value:
                  person: {
                      birthname: "Jan",
                      surname: "Jansen",
                      prefix: "de",
                      suffix: "jr",
                      dateOfBirth: "1970-01-01",
                      emailAddress: "TEST@TEST1.NL",
                      isEmailVerified: False
                    }
              updateCompleteEntity:
                value:                  
                  debtorStatusId: 2
                  person: {
                      birthname: "Jan",
                      surname: "Jansen",
                      prefix: "de",
                      suffix: "jr",
                      dateOfBirth: "1970-01-01",
                      emailAddress: "TEST@TEST1.NL",
                      isEmailVerified: True
                    }
        required: true
      responses:
        201:
          description: Successfully modified a customer
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/patchCustomerProfileResponse"
      security:
        - default: []
      x-auth-type: Application & Application User
      x-throttling-tier: Unlimited
  /customers/{customerProfileId}/customerStatusInstances:
    post:
      tags:
        - Customer
      summary: Create a new customer status element
      description: >-

      parameters:
        - name: customerProfileId
          in: path
          required: true
          schema:
            type: integer
            example: 1
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/customerStatusEntity"
            examples:
              customerStatus:
                value:
                  customerStatus:
                    customerStatusId: 2
        required: true
      responses:
        201:
          description: Successfully created a customer Status
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/postCustomerStatusResponse"
      security:
        - default: []
      x-auth-type: Application & Application User
      x-throttling-tier: Unlimited
  /customers/{customerProfileId}/customerPreferences:
    post:
      tags:
        - Customer
      summary: Create a customer preference element
      description: >-

      parameters:
        - name: customerProfileId
          in: path
          schema:
            type: integer
            example: 1
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/customerPreferencesEntity"
            examples:
              customerPreference:
                value:
                  customerPreference:
                    languageId: 1
        required: true
      responses:
        201:
          description: Successfully created a customer preference
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/postCustomerPreferencesResponse"
      security:
        - default: []
      x-auth-type: Application & Application User
      x-throttling-tier: Unlimited
  /customerPreferences/{customerPreferenceId}:
    patch:
      tags:
        - Customer
      summary: Modify a customer preference element
      description: >-

      parameters:
        - name: customerPreferenceId
          in: path
          required: true
          schema:
            type: integer
            example: 1
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/customerPreferencesEntity"
            examples:
              customerPreference:
                value:
                  customerPreference:
                    languageId: 1
        required: true
      responses:
        200:
          description: Successfully modified a customer preference
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/patchCustomerPreferencesResponse"
      security:
        - default: []
      x-auth-type: Application & Application User
      x-throttling-tier: Unlimited
  /customers/{customerProfileId}/addresses:
    post:
      tags:
        - Addresses
      summary: Add a customer address
      description: >-

      parameters:
        - name: customerProfileId
          in: path
          required: true
          schema:
            type: integer
            example: 1
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/postCustomerAddress"
            examples:
              customerAddress:
                value:
                  customerAddress:
                    addressTypeId: 1
                    street: Sesamstraat
                    houseNumber: 1
                    houseNumberSuffix: A
                    postalCode: 1234 AB
                    city: Den Haag
                    country: NL
        required: true
      responses:
        201:
          description: Successfully created a customer address
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/postCustomerProfileAddressResponse"
      security:
        - default: []
      x-auth-type: Application & Application User
      x-throttling-tier: Unlimited
  /addresses/{addressId}:
    patch:
      tags:
        - Addresses
      summary: Edit a customer address
      description: >-

      parameters:
        - name: addressId
          in: path
          required: true
          schema:
            type: integer
            example: 2
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/patchCustomerAddress"
            examples:
              fullAddress:
                value:
                  address:
                    street: Sesamstraat
                    houseNumber: 1
                    houseNumberSuffix: A
                    postalCode: 1234 AB
                    city: Den Haag
                    country: NL
        required: true
      responses:
        200:
          description: Successfully modified a customer Address
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/postCustomerProfileAddressResponse"
      security:
        - default: []
      x-auth-type: Application & Application User
      x-throttling-tier: Unlimited
    delete:
      tags:
        - Addresses
      summary: Delete a customer address
      description: >-

      parameters:
        - name: addressId
          in: path
          required: true
          schema:
            type: integer
            example: 2
      responses:
        200:
          description: Successfully deleted a customer Address
          content:
            application/json: {}
      security:
        - default: []
      x-auth-type: Application & Application User
      x-throttling-tier: Unlimited
  /customers/{customerProfileId}/phones:
    post:
      tags:
        - Phones
      summary: Add a customer phone
      description: >-

      parameters:
        - name: customerProfileId
          in: path
          required: true
          schema:
            type: integer
            example: 1
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/phoneEntity"
            examples:
              customerPhone:
                value:
                  customerPhone:
                    number: "0701112233"
                    countryCode: "0031"
                    phoneTypeId: 1
                    isPreferred: true
        required: true
      responses:
        201:
          description: Successfully created a customer phonenumber
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/postPhoneResponse"
      security:
        - default: []
      x-auth-type: Application & Application User
      x-throttling-tier: Unlimited
  /phones/{phoneId}:
    patch:
      tags:
        - Phones
      summary: Edit a customer phone
      description: >-

      parameters:
        - name: phoneId
          in: path
          required: true
          schema:
            type: integer
            example: 2
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/phoneEntity"
            examples:            
              updateFullPhoneEntity:
                value:
                  phone:
                    phoneTypeId: 2
                    number: "0701112233"
                    countryCode: "0031"
                    isPreferred: false
              updatePhoneTypeId:
                value:
                  phone:
                    phoneTypeId: 2
        required: true
      responses:
        200:
          description: Successfully modified a customer phonenumber
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/postPhoneResponse"
      security:
        - default: []
      x-auth-type: Application & Application User
      x-throttling-tier: Unlimited
    delete:
      tags:
        - Phones
      summary: Delete a customer phone
      description: >-

      parameters:
        - name: phoneId
          in: path
          required: true
          schema:
            type: integer
            example: 2
      responses:
        200:
          description: Successfully deleted a customer phonenumber
          content:
            application/json: {}
      security:
        - default: []
      x-auth-type: Application & Application User
      x-throttling-tier: Unlimited
  /devices:
    get:
      tags:
        - Devices
      summary: Find devices.
      description: Find devices.
      parameters:
        - in: query
          name: deviceId
          schema:
            type: string
            format: uuid
            example: 5bedce29-af0c-4f3c-b182-2caa8a1f9377
          required: false
          description: The id of the device.
        - in: query
          name: customerProfileId
          schema:
            type: integer
            example: 1
          required: false
          description: The id of the customer profile.
        - in: query
          name: externalDeviceId
          schema:
            type: string
            format: uuid
            example: c5545584-04af-4c60-a955-d6a70baab848
          required: false
          description: The external id of the device.
        - in: query
          name: alias
          schema:
            type: string
            example: iPhone prive
          required: false
          description: The alias of the device.
        - name: sort
          in: query
          schema:
            type: string
        - name: offset
          in: query
          schema:
            type: integer
        - name: limit
          in: query
          schema:
            type: integer
            example: 20
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/getDevicesResponse"
              example:
                {
                  "devices":
                    [
                      {
                        "customerProfileId": 1,
                        "deviceId": "5bedce29-af0c-4f3c-b182-2caa8a1f9377",
                        "externalDeviceId": "c5545584-04af-4c60-a955-d6a70baab848",
                        "alias": "iPhone prive",
                      },
                      {
                        "customerProfileId": 1,
                        "deviceId": "d7683e89-b2ad-4e79-85b3-dbb42aad0325",
                        "externalDeviceId": "7122a988-a00a-417d-a5b4-da2d91354976",
                        "alias": "iPhone zakelijk",
                      }
                    ],
                  "_links":
                    {
                      "self":
                        {
                          "href": "https://api.integratielaag.nl/abt/abtcustomers/2.0/devices?offset=20",
                          "method": "GET",
                        },
                      "prev":
                        {
                          "href": "https://api.integratielaag.nl/abt/abtcustomers/2.0/devices",
                          "method": "GET",
                        },
                      "next":
                        {
                          "href": "https://api.integratielaag.nl/abt/abtcustomers/2.0/devices?offset=40",
                          "method": "GET",
                        },
                    },
                }
  /customers/{customerProfileId}/devices:
    post:
      tags:
        - Devices
      summary: Add a customer device
      description: >-

      parameters:
        - name: customerProfileId
          in: path
          required: true
          schema:
            type: integer
            example: 1
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/postCustomerDevice"
            examples:
              customerDevice:
                value:
                  device:
                    externalDeviceId: "c5545584-04af-4c60-a955-d6a70baab848"
                    alias: "iPhone prive"
        required: true
      responses:
        201:
          description: Successfully created a customer device
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/getDevices"
      security:
        - default: []
      x-auth-type: Application & Application User
      x-throttling-tier: Unlimited
  /devices/{deviceId}:
    patch:
      tags:
        - Devices
      summary: Edit a customer device
      description: >-

      parameters:
        - name: deviceId
          in: path
          required: true
          schema:
            type: string
            format: uuid
            example: 5bedce29-af0c-4f3c-b182-2caa8a1f9377
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/patchCustomerDevice"
            examples:
              updateDevice:
                value:
                  device:
                    alias: "iPhone zakelijk"
        required: true
      responses:
        200:
          description: Successfully modified a customer device
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/getDevices"
              examples:
                updateDeviceResponse:
                  value:
                    deviceId: "5bedce29-af0c-4f3c-b182-2caa8a1f9377"
                    externalDeviceId: "7122a988-a00a-417d-a5b4-da2d91354976"
                    alias: "iPhone zakelijk"
                      
      security:
        - default: []
      x-auth-type: Application & Application User
      x-throttling-tier: Unlimited
    delete:
      tags:
        - Devices
      summary: Delete a customer device
      description: >-

      parameters:
        - name: deviceId
          in: path
          required: true
          schema:
            type: string
            format: uuid
            example: 5bedce29-af0c-4f3c-b182-2caa8a1f9377
      responses:
        200:
          description: Successfully deleted a customer device
          content:
            application/json: {}
      security:
        - default: []
      x-auth-type: Application & Application User
      x-throttling-tier: Unlimited
  /ovpaytokens:
    get:
      tags:
        - OVpay Tokens
      summary: Find OVpay tokens.
      description: Find OVpay tokens.
      parameters:
        - in: query
          name: ovPayTokenId
          schema:
            type: integer
            example: 71
          required: false
          description: The id of the token.
        - in: query
          name: customerProfileId
          schema:
            type: integer
            example: 12
          required: false
          description: The id of the customer profile.
        - in: query
          name: tokenTypeId                                 
          explode: false
          schema:
            type: array
            items:
              type: integer
            example: [1, 2]
          required: false
          description: Filter on possible token types. 1 = EMV, 2 = OV-pas physical, 3 = OV-pas digital.
        - in: query
          name: xTat
          schema:
            type: string
            format: uuid
            example: 700b0516-bf8b-4e6e-bf16-13bfeb078e23
          explode: false
          required: false
          description: The XTAT of the token.
        - in: query
          name: xBot
          schema:
            type: string
            format: uuid
            example: de1a9a7a-a777-4473-889c-44a3bb07daae
          explode: false
          required: false
          description: The XBOT of the token.
        - in: query
          name: alias
          schema:
            type: string
            example: Mijn OV-pas
          required: false
          description: The alias of the token.
        - in: query
          name: lastDigits
          schema:
            type: integer
            example: 3301
          required: false
          description: The last digits of the token.
        - in: query
          name: ovpasNumber
          schema:
            type: string
            example: 63AW974
          required: false
          description: Number of the OVpas.
        - in: query
          name: tokenStatusId
          schema:
            type: array
            items:
              type: integer
            example: [1, 2]
          explode: false
          required: false
          description: Filter on possible token statuses.  Filter on token status. 1 = Retired, 2 = Active, 3 = Replaced (*), 4 = On Stock, 5 = Suspended, 6 = Removed by customer (*), 7 = Renewed Active
        - in: query
          name: expirationDate
          schema:
            type: string
            format: date-time
            example: 2029-03-22T09:00:00
          required: false
          description: The expiration date of the token.
        - in: query
          name: replacedByTokenId
          schema:
            type: integer
            example: 12
          required: false
          description: The id of the token that replaced this token.
        - name: sort
          in: query
          schema:
            type: string
        - name: offset
          in: query
          schema:
            type: integer
        - name: limit
          in: query
          schema:
            type: integer
            example: 20
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/unavailable"
              example:
                {
                  "ovPayTokens":
                    [
                      {
                        "ovPayTokenId": 71,
                        "customerProfileId": 12,
                        "tokenType":
                          { "tokenTypeId": 2, "name": "OV-pas physical" },
                        "xTat": "700b0516-bf8b-4e6e-bf16-13bfeb078e23",
                        "xBot": "de1a9a7a-a777-4473-889c-44a3bb07daae",
                        "alias": "Mijn OV-pas",
                        "lastDigits": 3301,
                        "ovpasNumber": "63AW974",
                        "tokenStatus": { "tokenStatusId": 2, "name": "Active" },
                        "expirationDate": "2029-03-22T09:00:00",
                        "replacedByTokenId": 12,
                      },
                    ],
                  "_links":
                    {
                      "self":
                        {
                          "href": "https://api.integratielaag.nl/abt/abtcustomers/2.0/ovPayTokens?offset=20",
                          "method": "GET",
                        },
                      "prev":
                        {
                          "href": "https://api.integratielaag.nl/abt/abtcustomers/2.0/ovPayTokens",
                          "method": "GET",
                        },
                      "next":
                        {
                          "href": "https://api.integratielaag.nl/abt/abtcustomers/2.0/ovPayTokens?offset=40",
                          "method": "GET",
                        },
                    },
                }
  /customers/{customerProfileId}/ovpaytokens:
    post:
      tags:
        - OVpay Tokens
      summary: Create a new OVpay token
      description: >-

      parameters:
        - name: customerProfileId
          in: path
          required: true
          schema:
            type: integer
            example: 1
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ovPayTokenEntity"
            examples:
              EMV token:
                value:
                  ovPayToken:
                    tokenTypeId: 1
                    xTat: 0115b0df-db38-4702-8811-6f7de00db3ac
                    xBot: 71a88843-32b8-4d52-ac25-de2458c47775
                    alias: Mijn Rabo Pas
                    tokenStatusId: 2
                    expirationDate: "2026-04-20T17:05:52.000+02:00"
              OVpas token physical:
                value:
                  ovPayToken:
                    tokenTypeId: 2
                    xTat: 0115b0df-db38-4702-8811-6f7de00db3ac
                    xBot: 71a88843-32b8-4d52-ac25-de2458c47775
                    alias: Mijn OV Pas
                    ovpasNumber: "4048453105891361"
                    tokenStatusId: 2
                    expirationDate: "2026-04-20T17:05:52.000+02:00"
        required: true
      responses:
        201:
          description: Successfully created a customer ovPayToken
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/postOvPayTokenResponse"
      security:
        - default: []
      x-auth-type: Application & Application User
      x-throttling-tier: Unlimited
  /ovpaytokens/{ovPayTokenId}:
    patch:
      tags:
        - OVpay Tokens
      summary: Update an OVpay token
      description: >-

      parameters:
        - name: ovPayTokenId
          in: path
          required: true
          schema:
            type: integer
            example: 1
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ovPayTokenEntity"
            examples:
              updateFullToken:
                value: 
                  ovPayToken:
                    alias: "ING pas mobiel"                    
                    tokenStatusId: 1                    
                    replacedByTokenId: 8
                    lastDigits: 4563
              updateTokenAlias:
                value:
                  ovPayToken:
                    alias: "ING pas mobiel"
              updateTokenStatus to removed:
                value:
                  ovPayToken:
                    tokenStatusId: 6
              replaceToken:
                value:
                  ovPayToken:
                    tokenStatusId: 3
                    replacedByTokenId: 8
        required: true
      responses:
        200:
          description: Successfully updated a customer ovPayToken
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/postOvPayTokenResponse"
      security:
        - default: []
      x-auth-type: Application & Application User
      x-throttling-tier: Unlimited
    delete:
      tags:
        - OVpay Tokens
      summary: Delete an OVpay token
      description: >-

      parameters:
        - name: ovPayTokenId
          in: path
          required: true
          schema:
            type: integer
            example: 2
      responses:
        200:
          description: Successfully deleted a customer ovPayToken
          content:
            application/json: {}
      security:
        - default: []
      x-auth-type: Application & Application User
      x-throttling-tier: Unlimited
  /customers/{customerProfileId}/ovchipcards:
    post:
      tags:
        - OV Chipcards
      summary: Create a new OV chipcard
      description: >-

      parameters:
        - name: customerProfileId
          in: path
          required: true
          schema:
            type: integer
            example: 1
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ovChipCardEntity"
            examples:
              ovChipCards:
                value:
                  ovChipCard:
                    chipcardNumber: "1234123412341234"
                    validUntil: "2027-01-01"
                    alias: Mijn chipkaart
        required: true
      responses:
        201:
          description: Successfully created a customer ovChipCard
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/postOvChipCardResponse"
      security:
        - default: []
      x-auth-type: Application & Application User
      x-throttling-tier: Unlimited
  /ovchipcards/{ovChipCardId}:
    patch:
      tags:
        - OV Chipcards
      summary: Update an OV chipcard
      description: >-

      parameters:
        - name: ovChipCardId
          in: path
          required: true
          schema:
            type: integer
            example: 1
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ovChipCardEntity"
            examples:
              updateOvChipCardAlias:
                value:
                  ovChipCard:
                    alias: "Zoon 1 chipkaart"
        required: true
      responses:
        200:
          description: Successfully updated a customer ovChipCard
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/postOvChipCardResponse"
      security:
        - default: []
      x-auth-type: Application & Application User
      x-throttling-tier: Unlimited
    delete:
      tags:
        - OV Chipcards
      summary: Delete an OV chipcard
      description: >-

      parameters:
        - name: ovChipCardId
          in: path
          required: true
          schema:
            type: integer
            example: 2
      responses:
        200:
          description: Successfully deleted a customer ovchipcard
          content:
            application/json: {}
      security:
        - default: []
      x-auth-type: Application & Application User
      x-throttling-tier: Unlimited
  /billingInformations:
    get:
      tags:
        - Billing Information
      summary: Find billing information
      description: >-

      parameters:
        - name: customerProfileId
          in: query
          schema:
            type: integer
            example: 1
        - name: iban
          in: query
          schema:
            type: string
            example: "NL73RABO2677424363"
        - name: bic
          in: query
          schema:
            type: string
            example: "GHJZIEJSKVM"
        - name: ascription
          in: query
          schema:
            type: string
            example: "J. Doe"
        - name: alias
          in: query
          schema:
            type: string
            example: "John's billing details"
        - in: query
          name: createdBefore
          schema:
            type: string
            format: date-time
            example: 2020-12-31T23:59:59
          required: false
          description: Filter on created before.
        - in: query
          name: createdAfter
          schema:
            type: string
            format: date-time
            example: 2020-12-31T23:59:59
          required: false
          description: Filter on created after.
        - name: sort
          in: query
          schema:
            type: string
        - name: offset
          in: query
          schema:
            type: integer
        - name: limit
          in: query
          schema:
            type: integer
            example: 20
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/unavailable"
              examples:
                getBillingInformationMultipleSpecificCustomer:
                  summary: Get multiple billing information entities for a specific customers
                  description: >-
                    Found multiple billing informations matching the search parameters
                  value:
                    {
                      "billingInformations":
                        [
                          {
                            "billingInformationId": 1,
                            "customerProfileId": 1,
                            "iban": "NL06RABO8902022560",
                            "ascription": "J. Doe",
                            "alias": null,
                            "created": "2023-10-20T17:05:52.000",
                          },
                          {
                            "billingInformationId": 2,
                            "customerProfileId": 1,
                            "iban": "NL27ABNA4458972219",
                            "bic": "GHJZIEJSKVM",
                            "ascription": "J. Doe",
                            "alias": "John's billing details",                            
                            "created": "2024-10-20T17:05:52.000",
                          },
                        ],
                    }
                getBillingInformationSingleSpecificCustomer:
                  summary: Get singel billing information entity for a specific customers
                  description: >-
                    Found one billing information matching the search parameters
                  value:
                    {
                      "billingInformations":
                        [
                          {
                            "billingInformationId": 1,
                            "customerProfileId": 1,
                            "iban": "NL06RABO8902022560",
                            "ascription": "J. Doe",
                            "alias": null,                            
                            "created": "2024-10-20T17:05:52.000",
                          },
                        ],
                    }
  /customers/{customerProfileId}/billingInformations:
    post:
      tags:
        - Billing Information
      summary: Add billing information for a customer
      description: >-

      parameters:
        - name: customerProfileId
          in: path
          required: true
          schema:
            type: integer
            example: 1
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/billingInformationEntity"
            examples:
              customerBillinginformationMandatoryFields:
                value:
                  billingInformation:
                    iban: "NL73RABO2677424363"
                    ascription: "J. Doe"
              customerBillinginformationMandatoryFull:
                value:
                  billingInformation:
                    iban: "NL73RABO2677424363"
                    bic: "GHJZIEJSKVM"
                    ascription: "J. Doe"
                    alias: "John's billing details"
        required: true
      responses:
        201:
          description: Successfully created a customer billingInformation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/postBillingInformationResponse"
      security:
        - default: []
      x-auth-type: Application & Application User
      x-throttling-tier: Unlimited
  /directdebitmandates:
    get:
      tags:
        - Mandates
      summary: Find direct debit mandates.
      description: Find direct debit mandates.
      parameters:
        - in: query
          name: directDebitMandateId
          schema:
            type: integer
            example: 71
          required: false
          description: The id of the direct debit mandate.
        - in: query
          name: customerProfileId
          schema:
            type: integer
            example: 12
          required: false
          description: The id of the customer related to the mandate.
        - in: query
          name: billingInformationId
          schema:
            type: integer
            example: 51
          required: false
          description: The id of the billing information related to the mandate.
        - in: query
          name: directDebitMandateTypeId
          schema:
            type: array
            items:
              type: integer
            example: [1, 2]
          explode: false
          required: false
          description: The id of the direct debit mandate type. 1 = Paper contract, 2 = PIN transaction, 3 = SEPA eMandate, 4 = Digital signature, 5 = iDEAL transaction.
        - in: query
          name: createdBefore
          schema:
            type: string
            format: date-time
            example: 2020-12-31T23:59:59
          required: false
          description: Filter on created before.
        - in: query
          name: createdAfter
          schema:
            type: string
            format: date-time
            example: 2020-01-01T00:00:00
          required: false
          description: Filter on created after.
        - in: query
          name: mandateReference
          schema:
            type: string
            example: CORE01
          required: false
          description: Filter on mandate reference.
        - in: query
          name: mandateState
          schema:
            type: array
            items:
              type: string
            example: [SIGNED, PREPARED]
          explode: false
          required: false
          description: Filter on possible states of the mandate. SIGNED = signed, PREPARED = prepared, CANCELLED = cancelled.
        - in: query
          name: updatedBefore
          schema:
            type: string
            format: date-time
            example: 2020-12-31T23:59:59
          required: false
          description: Filter on updated before.
        - in: query
          name: updatedAfter
          schema:
            type: string
            format: date-time
            example: 2020-01-01T00:00:00
          required: false
          description: Filter on updated after.
        - name: sort
          in: query
          schema:
            type: string
        - name: offset
          in: query
          schema:
            type: integer
        - name: limit
          in: query
          schema:
            type: integer
            example: 20
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/unavailable"
              examples:
                getDirectDebitMandateWithNextPage:
                  value:
                    {
                      "directDebitMandates":
                        [
                          {
                            "directDebitMandateId": 71,
                            "customerProfileId": 12,
                            "billingInformationId": 51,
                            "directDebitMandateType":
                              {
                                "directDebitMandateTypeId": 1,
                                "name": "import",
                                "description": "import",
                              },
                            "created": "2024-03-22T08:55:00",
                            "mandateReference": "CORE01",
                            "mandateState": "SIGNED",
                            "updateTimestamp": "2024-03-22T08:55:00",
                          },
                        ],
                      "_links":
                        {
                          "self":
                            {
                              "href": "https://api.integratielaag.nl/abt/abtcustomers/2.0/directdebitmandates",
                              "method": "GET",
                            },
                          "next":
                            {
                              "href": "https://api.integratielaag.nl/abt/abtcustomers/2.0/directdebitmandates?offset=20",
                              "method": "GET",
                            },
                        },
                    }
                getDirectDebitMandateWithNextPageandPreviousPage:
                  value:
                    {
                      "directDebitMandates":
                        [
                          {
                            "directDebitMandateId": 71,
                            "customerProfileId": 12,
                            "billingInformationId": 51,
                            "directDebitMandateType":
                              {
                                "directDebitMandateTypeId": 1,
                                "name": "import",
                                "description": "import",
                              },
                            "created": "2024-03-22T08:55:00",
                            "mandateReference": "CORE01",
                            "mandateState": "SIGNED",
                            "updateTimestamp": "2024-03-22T08:55:00",
                          },
                        ],
                      "_links":
                        {
                          "self":
                            {
                              "href": "https://api.integratielaag.nl/abt/abtcustomers/2.0/directdebitmandates?offset=20",
                              "method": "GET",
                            },
                          "prev":
                            {
                              "href": "https://api.integratielaag.nl/abt/abtcustomers/2.0/directdebitmandates",
                              "method": "GET",
                            },
                          "next":
                            {
                              "href": "https://api.integratielaag.nl/abt/abtcustomers/2.0/directdebitmandates?offset=40",
                              "method": "GET",
                            },
                        },
                    }
  /billingInformation/{billingInformationId}/directdebitmandates:
    post:
      tags:
        - Mandates
      summary: Add a customer direct debit mandate
      description: >-

      parameters:
        - name: billingInformationId
          in: path
          required: true
          schema:
            type: integer
            example: 1
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/mandateEntity"
            examples:
              customerDirectDebitMandatePrepared:
                value:
                  directDebitMandate:
                    directDebitMandateTypeId: 1
                    mandateReference: HTM-mandate-001
                    mandateState: PREPARED
        required: true
      responses:
        201:
          description: Successfully created a customer mandate
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/postDirectDebitMandateResponse"
      security:
        - default: []
      x-auth-type: Application & Application User
      x-throttling-tier: Unlimited
  /directdebitmandates/{directdebitmandateId}:
    patch:
      tags:
        - Mandates
      summary: Update a customer direct debit mandate
      description: >-

      parameters:
        - name: directdebitmandateId
          in: path
          required: true
          schema:
            type: integer
            example: 1
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/mandateEntity"
            examples:
              customerDirectDebitMandateCancelled:
                value:
                  directDebitMandate:
                    mandateState: CANCELLED
        required: true
      responses:
        200:
          description: Successfully updated a customer mandate
          content:
            application/json:
              example:
                {
                  "directDebitMandateId": 1,
                  "customerProfileId": 12,
                  "billingInformationId": 51,
                  "directDebitMandateType":
                    {
                      "directDebitMandateTypeId": 1,
                      "name": "import",
                      "description": "import",
                    },
                  "created": "2024-03-22T08:55:00",
                  "mandateReference": "CORE01",
                  "mandateState": "CANCELLED",
                  "updateTimestamp": "2025-03-22T08:55:00",
                }
      security:
        - default: []
      x-auth-type: Application & Application User
      x-throttling-tier: Unlimited
components:
  securitySchemes:
    default:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://services.acc.api.htm.nl/authorize
          scopes: {}
  schemas:
    unavailable:
      type: object
    rfc9457:
      type: object
      properties:
        type:
          type: string
          format: url
          example: https://example.com/probs/out-of-credit
        title:
          type: string
          example: You do not have enough credit.
        detail:
          type: string
          example: Your current balance is 30, but that costs 50.
        instance:
          type: string
          example: /account/12345/msgs/abc
        balance:
          type: string
          example: 30
        accounts:
          type: array
          items:
            type: string
            example:
              - /account/12345
              - /account/67890
    getAuditTrails:
      type: object
      properties:
        auditTrailId:
          type: integer
        customerProfileId:
          type: integer
        action:
          type: string
        user:
          type: string
        timestamp:
          type: string
          format: datetime
        correlationId:
          type: string
    getOvPayTokens:
      type: object
      properties:
        ovPayTokenId:
          type: integer
        tokenTypeId:
          type: integer
        xTat:
          type: string
        xBot:
          type: string
        alias:
          type: string
        lastDigits:
          type: integer
        ovpasNumber:
          type: string
        tokenStatusId:
          type: integer
        expirationDate:
          type: string
        replacedByTokenId:
          type: integer
    getOvChipcards:
      type: object
      properties:
        ovChipCardId:
          type: integer
        chipCardNumber:
          type: string
        validUntil:
          type: string
          format: date
        alias:
          type: string
    getCustomerStatusInstance:
      type: object
      properties:
        customerStatus:
          $ref: "#/components/schemas/getCustomerStatus"
        fromInclusive:
          type: string
          format: date
        toInclusive:
          type: string
          format: date
    getCustomerStatus:
      type: object
      properties:
        customerStatusId:
          type: integer
        name:
          type: string
    getDebtorStatus:
      type: object
      properties:
        debtorStatusId:
          type: integer
        name:
          type: string
    getPerson:
      type: object
      properties:
        birthname:
          type: string
          description: voornaam
        surname:
          type: string
          description: achternaam
        prefix:
          type: string
          description: tussenvoegsel
        suffix:
          type: string
          description: achtervoegsel
        dateOfBirth:
          type: string
          format: date
        emailAddresses:
          type: string
          format: email
        isEmailVerified:        
          type: boolean
        addresses:
          type: array
          items:
            $ref: "#/components/schemas/getAddresses"
        phones:
          type: array
          items:
            $ref: "#/components/schemas/getPhones"
        devices:
          type: array
          items:
            $ref: "#/components/schemas/getDevices"
    getAddresses:
      type: object
      properties:
        addressId:
          type: integer
        street:
          type: string
        houseNumber:
          type: integer
        houseNumberSuffix:
          type: string
        postalCode:
          type: string
        city:
          type: string
        country:
          type: string
        addressType:
          $ref: "#/components/schemas/getAddressType"
    getAddressType:
      type: object
      properties:
        addressTypeId:
          type: integer
        name:
          type: string
    getPhones:
      type: object
      properties:
        phoneId:
          type: integer
        number:
          type: string
        countryCode:
          type: string
        phoneType:
          $ref: "#/components/schemas/getPhoneType"
        isPreferred:
          type: boolean
    getPhoneType:
      type: object
      properties:
        phoneTypeId:
          type: integer
        name:
          type: string
    getDevices:
      type: object
      properties:
        deviceId:
          type: string
          format: uuid
        externalDeviceId:
          type: string
          format: uuid
        alias:
          type: string
      required:
        - deviceId
        - externalDeviceId
        - alias
    getCustomerPreference:
      type: object
      properties:
        language:
          $ref: "#/components/schemas/getCustomerLanguage"
    getCustomerLanguage:
      type: object
      properties:
        languageId:
          type: integer
        name:
          type: string
        ietfCode:
          type: string
        iso639Code:
          type: string
    getCustomerProfiles:
      type: object
      properties:
        customers:
          type: array
          items:
            $ref: "#/components/schemas/getCustomerProfile"
    getCustomerProfile:
      type: object
      properties:
        customerNumber:
          type: integer
        debtorNumber:
          type: integer
        debtorStatus:
          $ref: "#/components/schemas/getDebtorStatus"
        vasCustomerNumber:
          type: integer
        customerPreference:
          $ref: "#/components/schemas/getCustomerPreference"
        customerStatusInstances:
          type: array
          items:
            $ref: "#/components/schemas/getCustomerStatusInstance"
        person:
          $ref: "#/components/schemas/getPerson"
        ovChipCards:
          type: array
          items:
            $ref: "#/components/schemas/getOvChipcards"
        ovPayTokens:
          type: array
          items:
            $ref: "#/components/schemas/getOvPayTokens"
        auditTrails:
          type: array
          items:
            $ref: "#/components/schemas/getAuditTrails"
    addressPostEntity:
      required:
        - addressTypeId
        - city
        - country
        - houseNumber
        - postalCode
        - street
      type: object
      properties:
        street:
          type: string
        houseNumber:
          type: integer
        houseNumberSuffix:
          type: string
        postalCode:
          type: string
        city:
          type: string
        country:
          type: string
        addressTypeId:
          type: integer
    postPhoneEntity:
      required:
        - countryCode
        - number
        - phoneTypeId
      type: object
      properties:
        number:
          type: string
        countryCode:
          type: string
        phoneTypeId:
          type: integer
        isPreferred:
          type: boolean
    phoneEntity:
      type: object
      properties:
        number:
          type: string
        countryCode:
          type: string
        phoneTypeId:
          type: integer
        isPreferred:
          type: boolean
    devicePostEntity:
      required:
        - externalDeviceId
        - alias
      type: object
      properties:
        externalDeviceId:
          type: string
          format: uuid
        alias:
          type: string
    defaultCustomerProfileResponse:
      type: object
      properties:
        customerNumber:
          type: integer
          example: 10000001
    postCustomerProfile:
      type: object
      properties:
        debtorStatusId:
          type: integer
        customerPreference:
          $ref: "#/components/schemas/customerPreferencesEntity"
        person:
          $ref: "#/components/schemas/personEntity"
        addresses:
          type: array
          items:
            $ref: "#/components/schemas/addressPostEntity"
        phones:
          type: array
          items:
            $ref: "#/components/schemas/postPhoneEntity"
        devices:
          type: array
          items:
            $ref: "#/components/schemas/devicePostEntity"
    postCustomerAddress:
      type: object
      properties:
        street:
          type: string
        houseNumber:
          type: integer
        houseNumberSuffix:
          type: string
        postalCode:
          type: string
        city:
          type: string
        country:
          type: string
        addressType:
          type: integer
    patchCustomerAddress:
      type: object
      properties:
        street:
          type: string
        houseNumber:
          type: integer
        houseNumberSuffix:
          type: string
        postalCode:
          type: string
        city:
          type: string
        country:
          type: string
        addressType:
          type: integer
    postCustomerProfileResponse:
      type: object
      properties:
        customerNumber:
          type: integer
          example: 10000001
        customerProfileId:
          type: integer
          example: 1
    postCustomerProfileAddressResponse:
      type: object
      properties:
        customerProfileId:
          type: integer
          example: 1
        addressId:
          type: integer
          example: 3
    postPhoneResponse:
      type: object
      properties:
        phoneId:
          type: integer
          example: 2
    postBillingInformationResponse:
      type: object
      properties:
        billingInformationId:
          type: integer
          example: 1
    postDirectDebitMandateResponse:
      type: object
      properties:
        directDebitMandateId:
          type: integer
          example: 1
    postOvChipCardResponse:
      type: object
      properties:
        ovChipCardId:
          type: integer
          example: 1
    patchCustomerProfileResponse:
      type: object
      properties:
        customerProfileId:
          type: integer
          example: 1
    postCustomerStatusResponse:
      type: object
    postCustomerPreferencesResponse:
      type: object
      properties:
        customerPreferenceId:
          type: integer
          example: 1
    patchCustomerPreferencesResponse:
      type: object
      properties:
        customerPreferenceId:
          type: integer
          example: 1
        customerLanguageId:
          type: integer
          example: 1
    getCustomerProfileOvPayTokenResponse:
      type: object
      properties:
        ovPayToken:
          type: array
          items:
            $ref: "#/components/schemas/ovPayTokenEntity"
    customerPreferencesEntity:
      type: object
      properties:
        customerPreferenceId:
          type: integer
        languageId:
          type: integer
    customerStatusEntity:
      type: object
      properties:
        customerStatusId:
          type: integer
    customersEntity:
      type: object
      properties:
        debtorStatusId:
          type: integer
    billingInformationEntity:
      type: object
      properties:
        billingInformationId:
          type: integer
        iban:
          type: string
        bic:
          type: string
        ascription:
          type: string
        alias:
          type: string
        created:
          type: string
    mandateEntity:
      type: object
      properties:
        directDebitMandateId:
          type: integer
        directDebitMandateTypeId:
          type: integer
        mandateReference:
          type: string
        mandateState:
          type: string
    ovPayTokenEntity:
      type: object
      properties:
        ovPayTokenId:
          type: integer
        tokenType:
          type: object
          properties:
            tokenTypeId:
              type: string
            name:
              type: string
        xTat:
          type: string
        xBot:
          type: string
        alias:
          type: string
        lastDigits:
          type: integer
        ovpasNumber:
          type: string
        tokenStatus:
          type: object
          properties:
            tokenStatusId:
              type: integer
            name:
              type: string
        expirationDate:
          type: string
        replacedByTokenId:
          type: integer
    ovChipCardEntity:
      type: object
      properties:
        ovChipCardId:
          type: integer
        chipCardNumber:
          type: string
        validUntil:
          type: string
          format: date
        alias:
          type: string
    personEntity:
      type: object
      properties:
        personId:
          type: integer
        birthname:
          type: string
          description: voornaam
        surname:
          type: string
          description: achternaam
        prefix:
          type: string
          description: tussenvoegsel
        suffix:
          type: string
          description: achtervoegsel
        dateOfBirth:
          type: string
          format: date
        emailAddress:
          type: string
        isEmailVerified:
          type: string
    postOvPayTokenResponse:
      type: object
      properties:
        ovPayTokenId:
          type: integer
          example: 1
    getDevicesResponse:
      type: object
      properties:
        devices:
          type: array
          items:
            $ref: "#/components/schemas/getDeviceEntity"
    getDeviceEntity:
      type: object
      properties:
        deviceId:
          type: string
          format: uuid
        customerProfileId:
          type: integer
        externalDeviceId:
          type: string
          format: uuid
        alias:
          type: string
      required:
        - deviceId
        - customerProfileId
        - externalDeviceId
        - alias
    postCustomerDevice:
      $ref: "#/components/schemas/devicePostEntity"
    patchCustomerDevice:
      type: object
      properties:
        alias:
          type: string
    ErrorResponse:
      type: object
      properties:
        type:
          type: string
        title:
          type: string
        detail:
          type: string
        instance:
          type: string
