openapi: 3.0.1
info:
  title: Service Engine APIs for Customers
  description: >-
    Service Engine APIs for HTM Customers. These are NOT the CRUD APIs to access raw data in the database.
    To be used by touchpoints to get information about HTM customers.
  version: "2.0"
servers:
  - url: https://services.acc.api.htm.nl/abt/touchpoint/2.0
tags:
  - name: Customers
    description: >-
      Service Engine APIs for HTM Customers. These are NOT the CRUD APIs to access raw data in the database.
      To be used by touchpoints to get information about HTM customers.
paths:
  /customers:
    get:
      tags:
        - Customers
      summary: Get a customer profile based on search parameters
      description: |
        Get a profile based on search parameters. Only returns a profile if a single result matches for a customer
        the parameters; when multiple results are found, additional search parameters are required to disambiguate. If role is klantenservice, multiple customers can be returned.
      parameters:
        - name: customerProfileId
          in: query
          schema:
            type: integer
            example: 1
        - name: customerNumber
          in: query
          schema:
            type: integer
            example: 1000001
        - name: customerStatusId
          in: query
          schema:
            type: integer
            example: 1
        - name: debtorNumber
          in: query
          schema:
            type: integer
            example: 100001
        - name: debtorStatusId
          in: query
          schema:
            type: integer
            example: 1
        - name: birthname
          in: query
          schema:
            type: string
            example: John
        - name: surname
          in: query
          schema:
            type: string
            example: Doe
        - 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: 1234 AB
        - name: addressCity
          in: query
          schema:
            type: string
            example: The Hague
        - name: addressCountry
          in: query
          schema:
            type: string
            example: The Netherlands
        - name: phoneNumber
          in: query
          schema:
            type: string
            example: "0123456789"
        - name: ovChipcardNumber
          in: query
          schema:
            type: integer
            example: 0123456789
        - name: ovChipcardAlias
          in: query
          schema:
            type: string
            example: My ovchipcard
        - name: ovPayTokenNumber
          in: query
          schema:
            type: integer
            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
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CustomersResponseList"
        "404":
          description: No customer found
          content:
            application/json:
              example:
                {
                  "type": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers",
                  "apiErrorCode": "400.1",
                  "title": "Niet gevonden",
                  "detail": "Klant niet gevonden",
                  "instance": "555d00b5-bc3f-4591-949b-479e76d49ea7",
                  "errors": [{ "subApiErrorCode": "0017" }],
                }
        "409":
          description: Multiple customers found
          content:
            application/json:
              example:
                {
                  "type": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers",
                  "apiErrorCode": "409.1",
                  "title": "Meer dan 1 klantprofiel gevonden",
                  "detail": "Meer dan 1 klantprofiel gevonden. Verfijn je zoekcriteria.",
                  "instance": "555d00b5-bc3f-4591-949b-479e76d49ea7",
                }
    post:
      tags:
        - Customers
      parameters:
        - name: X-HTM-ROLE-HEADER
          in: header
          schema:
            type: string
            example: Customer
          required: false
          description: The role of the HTM employee in the case of the SMP, in this case the call can only be done through the SMP
      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.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/unavailable"
            examples:
              minimalCustomerProfile:
                value:
                  { "person": { "emailAddress": "j.jansen@hatseflats.nl" } }
              fullCustomerProfile:
                value:
                  {
                    "customerPreference": { "languageId": 1 },
                    "person":
                      {
                        "birthname": "Jan",
                        "surname": "Jansen",
                        "prefix": "dhr",
                        "suffix": "jr",
                        "dateOfBirth": "1970-01-01",
                        "emailAddress": "j.jansen@hatseflats.nl",
                        "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": "0031",
                              "phoneTypeId": 1,
                              "isPreferred": true,
                            },
                            {
                              "number": "7012345678",
                              "countryCode": "0031",
                              "phoneTypeId": 2,
                              "isPreferred": false,
                            },
                          ],
                        "devices":
                          [
                            {
                              "externalDeviceId": "123e4567-e89b-12d3-a456-426614174000",
                              "alias": "My iPhone",
                            },
                            {
                              "externalDeviceId": "987e6543-e21b-12d3-a456-426614174999",
                              "alias": "My iPad",
                            },
                          ],
                      },
                  }
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CustomersResponse"
    patch:
      tags:
        - Customers
      parameters:
        - name: X-HTM-JWT-AUTH-HEADER
          in: header
          schema:
            type: string
            example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
          required: false
          description: The JWT of a customer in case of touchpoint were customer logs in themselves
        - name: X-HTM-CUSTOMER-PROFILE-ID-HEADER
          in: header
          schema:
            type: string
            example: feaaef83-a551-4283-8419-340b1ada3b55
          required: false
          description: The customerProfileId of a customer in the case of the SMP
        - name: X-HTM-ROLE-HEADER
          in: header
          schema:
            type: string
            example: Customer
          required: false
          description: The role of the HTM employee in the case of the SMP
      summary: Update a customer profile
      description: Update a customer profile based on the sub from the JWT, or customerProfileId in case of SMP
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/unavailable"
            examples:
              patchCustomer:
                value:
                  {
                    "person":
                      {
                        "birthname": "Jan",
                        "surname": "Jansen",
                        "prefix": "dhr",
                        "suffix": "jr",
                        "dateOfBirth": "1970-01-01",
                        "addresses":
                          [
                            {
                              "addressId": 2,
                              "street": "Laan van Meerdervoort",
                              "houseNumber": 5,
                              "postalCode": "2500AA",
                              "city": "Den Haag",
                              "country": "NL",
                            },
                            {
                              "addressId": 1,
                              "street": "Beeklaan",
                              "houseNumber": 30,
                              "houseNumberSuffix": "B",
                              "postalCode": "2500AA",
                              "city": "Den Haag",
                              "country": "NL",
                              "addressTypeId": 2,
                            },
                          ],
                        "phones":
                          [
                            {
                              "phoneId": 1,
                              "number": "6123456789",
                              "countryCode": "0031",
                              "phoneTypeId": 1,
                              "isPreferred": true,
                            },
                            {
                              "phoneId": 2,
                              "number": "7012345678",
                              "countryCode": "0031",
                              "phoneTypeId": 2,
                              "isPreferred": false,
                            },
                          ],
                        "devices":
                          [
                            {
                              "deviceId": "813afdd8-bf8c-4e26-bfda-4da79552bd38",
                              "externalDeviceId": "123e4567-e89b-12d3-a456-426614174000",
                              "alias": "My iPhone",
                            },
                            {
                              "deviceId": "4f4249a2-ac6c-44f9-b740-66e66b6f3c28",
                              "externalDeviceId": "987e6543-e21b-12d3-a456-426614174999",
                              "alias": "My iPad",
                            },
                          ],
                      },
                  }
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CustomersResponse"
  /customers/customerstatusinstances:
    post:
      tags:
        - Customers
      summary: Create a new customer status element (only for SMP)
      description: >-

      parameters:
        - name: X-HTM-CUSTOMER-PROFILE-ID-HEADER
          in: header
          schema:
            type: integer
            example: 323
          required: false
          description: The id of the customer Profile
        - name: X-HTM-ROLE-HEADER
          in: header
          schema:
            type: string
            example: Customer
          required: false
          description: The role of the HTM employee in the case of the SMP
      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/CustomersResponse"
      x-auth-type: Application & Application User
      x-throttling-tier: Unlimited
  /customers/customerpreferences:
    post:
      tags:
        - Customers
      summary: Create a customer preference element for a language for instance
      description: >-

      parameters:
        - name: X-HTM-JWT-AUTH-HEADER
          in: header
          schema:
            type: string
            example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
          required: false
          description: The JWT of a customer in case of touchpoint were customer logs in themselves
        - name: X-HTM-CUSTOMER-PROFILE-ID-HEADER
          in: header
          schema:
            type: integer
            example: 323
          required: false
          description: The id of the customer Profile
        - name: X-HTM-ROLE-HEADER
          in: header
          schema:
            type: string
            example: Customer
          required: false
          description: The role of the HTM employee in the case of the SMP
      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/CustomersResponse"
      x-auth-type: Application & Application User
      x-throttling-tier: Unlimited
  /customerpreferences/{customerPreferenceId}:
    patch:
      tags:
        - Customers
      summary: Update a customer preference element, for example the language preference
      description: >-

      parameters:
        - name: X-HTM-JWT-AUTH-HEADER
          in: header
          schema:
            type: string
            example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
          required: false
          description: The JWT of a customer in case of touchpoint were customer logs in themselves
        - name: X-HTM-CUSTOMER-PROFILE-ID-HEADER
          in: header
          schema:
            type: integer
            example: 323
          required: false
          description: The id of the customer Profile
        - name: X-HTM-ROLE-HEADER
          in: header
          schema:
            type: string
            example: Customer
          required: false
          description: The role of the HTM employee in the case of the SMP
        - 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/CustomersResponse"
      x-auth-type: Application & Application User
      x-throttling-tier: Unlimited
  /customers/addresses:
    post:
      tags:
        - Customers
      summary: Add a customer address
      description: >-

      parameters:
        - name: X-HTM-JWT-AUTH-HEADER
          in: header
          schema:
            type: string
            example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
          required: false
          description: The JWT of a customer in case of touchpoint were customer logs in themselves
        - name: X-HTM-CUSTOMER-PROFILE-ID-HEADER
          in: header
          schema:
            type: integer
            example: 323
          required: false
          description: The id of the customer Profile
        - name: X-HTM-ROLE-HEADER
          in: header
          schema:
            type: string
            example: Customer
          required: false
          description: The role of the HTM employee in the case of the SMP

      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/CustomersResponse"
      x-auth-type: Application & Application User
      x-throttling-tier: Unlimited
  /customers/addresses/{addressId}:
    patch:
      tags:
        - Customers
      summary: Edit a customer address
      description: >-

      parameters:
        - name: X-HTM-JWT-AUTH-HEADER
          in: header
          schema:
            type: string
            example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
          required: false
          description: The JWT of a customer in case of touchpoint were customer logs in themselves
        - name: X-HTM-CUSTOMER-PROFILE-ID-HEADER
          in: header
          schema:
            type: integer
            example: 323
          required: false
          description: The id of the customer Profile
        - name: X-HTM-ROLE-HEADER
          in: header
          schema:
            type: string
            example: Customer
          required: false
          description: The role of the HTM employee in the case of the SMP
        - 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/CustomersResponse"
      x-auth-type: Application & Application User
      x-throttling-tier: Unlimited
    delete:
      tags:
        - Customers
      summary: Delete a customer address
      description: >-

      parameters:
        - name: X-HTM-JWT-AUTH-HEADER
          in: header
          schema:
            type: string
            example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
          required: false
          description: The JWT of a customer in case of touchpoint were customer logs in themselves
        - name: X-HTM-CUSTOMER-PROFILE-ID-HEADER
          in: header
          schema:
            type: integer
            example: 323
          required: false
          description: The id of the customer Profile
        - name: X-HTM-ROLE-HEADER
          in: header
          schema:
            type: string
            example: Customer
          required: false
          description: The role of the HTM employee in the case of the SMP
        - name: addressId
          in: path
          required: true
          schema:
            type: integer
            example: 2
      responses:
        200:
          description: Successfully deleted a customer Address
          content:
            application/json: {}
      x-auth-type: Application & Application User
      x-throttling-tier: Unlimited
  /customers/phones:
    post:
      tags:
        - Customers
      summary: Add a customer phone
      description: >-

      parameters:
        - name: X-HTM-JWT-AUTH-HEADER
          in: header
          schema:
            type: string
            example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
          required: false
          description: The JWT of a customer in case of touchpoint were customer logs in themselves
        - name: X-HTM-CUSTOMER-PROFILE-ID-HEADER
          in: header
          schema:
            type: integer
            example: 323
          required: false
          description: The id of the customer Profile
        - name: X-HTM-ROLE-HEADER
          in: header
          schema:
            type: string
            example: Customer
          required: false
          description: The role of the HTM employee in the case of the SMP
      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/CustomersResponse"
      x-auth-type: Application & Application User
      x-throttling-tier: Unlimited
  /customers/phones/{phoneId}:
    patch:
      tags:
        - Customers
      summary: Edit a customer phone
      description: >-

      parameters:
        - name: X-HTM-JWT-AUTH-HEADER
          in: header
          schema:
            type: string
            example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
          required: false
          description: The JWT of a customer in case of touchpoint were customer logs in themselves
        - name: X-HTM-CUSTOMER-PROFILE-ID-HEADER
          in: header
          schema:
            type: integer
            example: 323
          required: false
          description: The id of the customer Profile
        - name: X-HTM-ROLE-HEADER
          in: header
          schema:
            type: string
            example: Customer
          required: false
          description: The role of the HTM employee in the case of the SMP
        - 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/CustomersResponse"
      x-auth-type: Application & Application User
      x-throttling-tier: Unlimited
    delete:
      tags:
        - Customers
      summary: Delete a customer phone
      description: >-

      parameters:
        - name: X-HTM-JWT-AUTH-HEADER
          in: header
          schema:
            type: string
            example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
          required: false
          description: The JWT of a customer in case of touchpoint were customer logs in themselves
        - name: X-HTM-CUSTOMER-PROFILE-ID-HEADER
          in: header
          schema:
            type: integer
            example: 323
          required: false
          description: The id of the customer Profile
        - name: X-HTM-ROLE-HEADER
          in: header
          schema:
            type: string
            example: Customer
          required: false
          description: The role of the HTM employee in the case of the SMP
        - name: phoneId
          in: path
          required: true
          schema:
            type: integer
            example: 2
      responses:
        200:
          description: Successfully deleted a customer phonenumber
          content:
            application/json: {}
      x-auth-type: Application & Application User
      x-throttling-tier: Unlimited
  /customers/billinginformations:
    get:
      tags:
        - Customers
      summary: Find billing information for customer
      description: >-

      parameters:
        - name: X-HTM-JWT-AUTH-HEADER
          in: header
          schema:
            type: string
            example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
          required: false
          description: The JWT of a customer in case of touchpoint were customer logs in themselves
        - name: X-HTM-CUSTOMER-PROFILE-ID-HEADER
          in: header
          schema:
            type: integer
            example: 323
          required: false
          description: The id of the customer Profile
        - name: X-HTM-ROLE-HEADER
          in: header
          schema:
            type: string
            example: Customer
          required: false
          description: The role of the HTM employee in the case of the SMP
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/unavailable"
              examples:
                getBillingInformationSingleSpecificCustomer:
                  summary: Get singel billing information entity for a specific customers
                  description: >-
                    Found one billing information for this customer
                  value:
                    {
                      "billingInformations":
                        [
                          {
                            "billingInformationId": 1,
                            "iban": "NL••••••••••••1234",
                            "ascription": "J. Doe",
                            "alias": null,
                            "created": "2024-10-20T17:05:52.000",
                          },
                        ],
                    }
  /customers/directdebitmandates:
    get:
      tags:
        - Customers
      summary: Find direct debit mandates for a customer.
      description: Find direct debit mandates  for a customer.
      parameters:
        - name: X-HTM-JWT-AUTH-HEADER
          in: header
          schema:
            type: string
            example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
          required: false
          description: The JWT of a customer in case of touchpoint were customer logs in themselves
        - name: X-HTM-CUSTOMER-PROFILE-ID-HEADER
          in: header
          schema:
            type: integer
            example: 323
          required: false
          description: The id of the customer Profile
        - name: X-HTM-ROLE-HEADER
          in: header
          schema:
            type: string
            example: Customer
          required: false
          description: The role of the HTM employee in the case of the SMP
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/unavailable"
              examples:
                getDirectDebitMandateForCustomer:
                  value:
                    {
                      "directDebitMandates":
                        [
                          {
                            "directDebitMandateId": 71,
                            "billingInformationId":
                              {
                                "billingInformationId": 15,
                                "iban": "NL••••••••••••1234",
                                "ascription": "J. Doe",
                                "alias": null,
                                "created": "2024-10-20T17:05:52.000",
                              },
                            "directDebitMandateType":
                              {
                                "directDebitMandateTypeId": 1,
                                "name": "import",
                                "description": "import",
                              },
                            "created": "2024-03-22T08:55:00",
                            "mandateReference": "CORE01",
                            "mandateState": "SIGNED",
                            "updateTimestamp": "2024-03-22T08:55:00",
                          },
                        ],
                    }
  /customers/tokens:
    get:
      tags:
        - Customers
      parameters:
        - name: X-HTM-JWT-AUTH-HEADER
          in: header
          schema:
            type: string
            example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
          required: false
          description: The JWT of a customer in case of touchpoint were customer logs in themselves
        - name: X-HTM-CUSTOMER-PROFILE-ID-HEADER
          in: header
          schema:
            type: string
            example: feaaef83-a551-4283-8419-340b1ada3b55
          required: false
          description: The customerProfileId of a customer in the case of the SMP
        - name: X-HTM-ROLE-HEADER
          in: header
          schema:
            type: string
            example: Customer
          required: false
          description: The role of the HTM employee in the case of the SMP
        - name: ovPayTokenId
          in: query
          schema:
            type: integer
            example: 1
          required: false
          description: The ovpay token id of a specific customer token
        - name: tokenTypeId
          in: query
          schema:
            type: array
            items:
              type: integer
          explode: false
          description: Filter on tokentype. 1 = EMV, 2 = OV-pas physical, 3 = OV-pas digital
          required: false
        - name: xTat
          in: query
          schema:
            type: string
            example: 4c2d60e2-cd03-4c80-ae70-573a301f0bff
          required: false
          description: Filter on the xTat of a customer token
        - name: xBot
          in: query
          schema:
            type: string
            example: 91641b54-056c-49ea-b598-ccde81d6c45a
          required: false
          description: Filter on the xBot of a customer token
        - name: ovpasNumber
          in: query
          schema:
            type: string
            example: 56HYRTL
          required: false
          description: Filter on the OV pasNumber of a customer token of type OV Pas
        - name: lastDigits
          in: query
          schema:
            type: string
            example: 1234
          required: false
          description: Filter on the last digits of a customer token of type EMV
        - name: tokenStatusId
          in: query
          schema:
            type: array
            items:
              type: integer
          explode: false
          description: Filter on token status. 1 = Retired, 2 = Active, 3 = Replaced (*), 4 = On Stock, 5 = Suspended, 6 = Removed by customer (*), 7 = Renewed Active
          required: false
        - name: expirationDate
          in: query
          schema:
            type: string
            format: date-time
            example: 2027-01-01T09:00:00Z
          required: false
          description: Filter on the expirationDate of a customer token
        - name: replacedByTokenId
          in: query
          schema:
            type: integer
            example: 2
          required: false
          description: Filter on the replacedByTokenId of a customer token
      summary: Get a list of all OvPayTokens for a certain customer.
      description: Get a list of all OvPayTokens for a certain customer, only returns the tokens for an identified customer through JWT or customerProfileId in the headers.
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/unavailable"
              examples:
                Empty token list:
                  summary: Empty token list
                  description: Empty token list
                  value:
                    {
                      "ovPayTokens": [],
                      _links:
                        {
                          "self":
                            {
                              "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens",
                              "method": "GET",
                            },
                        },
                    }
                EMV without PAD:
                  summary: EMV without PAD
                  description: EMV without PAD
                  value:
                    {
                      "ovPayTokens":
                        [
                          {
                            "customerProfileId": 1,
                            "ovPayTokenId": 1,
                            "xTat": "32089cc8-d187-47ff-a3a9-5c2558def811",
                            "ovpasNumber": "",
                            "alias": "Mijn EMV pas",
                            "tokenType": { "tokenTypeId": 1, "name": "EMV" },
                            "tokenStatus":
                              { "tokenStatusId": 2, "name": "Active" },
                            "expirationDate": "2028-02-01",
                            "replacedByTokenId": null,
                            "autoReloadRegistration": null,
                            "ePurse": null,
                            "personalAccountData":
                              {
                                "name": null,
                                "birthdate": null,
                                "photo": null,
                              },
                            "gboAgeProfile": null,
                            "tatSecurity": {
                              "isSecured": true,
                              "isAuthorized": true,
                            },
                            "_links":
                              {
                                "self":
                                  {
                                    "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens?ovPaytokenId=1",
                                    "method": "GET",
                                  },
                                "partial_edit":
                                  {
                                    "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1",
                                    "method": "PATCH",
                                  },
                                "delete_token":
                                  {
                                    "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1",
                                    "method": "DELETE",
                                  },
                                "get_productinstances":
                                  {
                                    "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1/productinstances",
                                    "method": "GET",
                                  },
                                "get_trips":
                                  {
                                    "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1/trips",
                                    "method": "GET",
                                  },
                                "add_personal-data":
                                  {
                                    "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/personal-data/32089cc8-d187-47ff-a3a9-5c2558def811",
                                    "method": "POST",
                                  },
                                "compare_token":
                                  {
                                    "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/5/compare",
                                    "method": "POST",
                                  },
                              },
                          },
                        ],
                      _links:
                        {
                          "self":
                            {
                              "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens",
                              "method": "GET",
                            },
                        },
                    }
                OV pas without PAD, without AGO:
                  summary: OV pas without PAD, without AGO
                  description: OV pas without PAD, without AGO
                  value:
                    {
                      "ovPayTokens":
                        [
                          {
                            "customerProfileId": 1,
                            "ovPayTokenId": 1,
                            "xTat": "32089cc8-d187-47ff-a3a9-5c2558def811",
                            "tokenType":
                              { "tokenTypeId": 2, "name": "OV-pas physical" },
                            "ovpasNumber": "OV34567",
                            "alias": "MyToken",
                            "tokenStatus":
                              { "tokenStatusId": 2, "name": "Active" },
                            "expirationDate": "2028-02-01",
                            "replacedByTokenId": null,
                            "autoReloadRegistration": null,
                            "ePurse":
                              {
                                "e-PurseBalance":
                                  { "currency": "EUR", "amount": 350 },
                                "status": "ACTIVE",
                                "originDate": "2019-07-16T11:00:00+02:00",
                              },
                            "personalAccountData":
                              {
                                "name": null,
                                "birthdate": null,
                                "photo": null,
                              },
                            "gboAgeProfile": null,
                            "tatSecurity": {
                              "isSecured": false,
                              "isAuthorized": null,
                            },
                            "_links":
                              {
                                "self":
                                  {
                                    "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens?ovPaytokenId=1",
                                    "method": "GET",
                                  },
                                "partial_edit":
                                  {
                                    "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1",
                                    "method": "PATCH",
                                  },
                                "delete_token":
                                  {
                                    "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1",
                                    "method": "DELETE",
                                  },
                                "get_productinstances":
                                  {
                                    "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1/productinstances",
                                    "method": "GET",
                                  },
                                "get_trips":
                                  {
                                    "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1/trips",
                                    "method": "GET",
                                  },
                                "add_personal-data":
                                  {
                                    "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/personal-data/32089cc8-d187-47ff-a3a9-5c2558def811",
                                    "method": "POST",
                                  },
                                "compare_token":
                                  {
                                    "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/51compare",
                                    "method": "POST",
                                  },
                              },
                          },
                        ],
                      _links:
                        {
                          "self":
                            {
                              "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens",
                              "method": "GET",
                            },
                        },
                    }
                OV pas with PAD, with autoReload, with AGO:
                  summary: OV pas with PAD, with autoReload, with AGO
                  description: OV pas with PAD, with autoReload, with AGO
                  value:
                    {
                      "ovPayTokens":
                        [
                          {
                            "customerProfileId": 1,
                            "ovPayTokenId": 1,
                            "xTat": "32089cc8-d187-47ff-a3a9-5c2558def811",
                            "tokenType":
                              { "tokenTypeId": 2, "name": "OV-pas physical" },
                            "ovpasNumber": "OV34567",
                            "alias": "MyToken",
                            "tokenStatus":
                              { "tokenStatusId": 2, "name": "Active" },
                            "expirationDate": "2028-02-01",
                            "replacedByTokenId": null,
                            "autoReloadRegistration":
                              {
                                "autoReloadAmount": 500,
                                "retailerReferenceId": "abc",
                                "arrit": "425f7fc2-1103-4822-9c79-7c4aaa2fb6aa",
                                "autoReloadRegistrationStatus": "ACTIVE",
                                "autoReloadRegistrationStartDateTime": "2024-06-02T15:03:46Z",
                              },
                            "ePurse":
                              {
                                "e-PurseBalance":
                                  { "currency": "EUR", "amount": 350 },
                                "status": "ACTIVE",
                                "originDate": "2019-07-16T11:00:00+02:00",
                              },
                            "personalAccountData":
                              {
                                "name":
                                  {
                                    "inaccuracyFlag": false,
                                    "inaccuracyFlagReason": null,
                                    "inaccuracyFlagSetCounter": 0,
                                    "isValidated": false,
                                    "changeCounter": 0,
                                    "maxUpdatesVerificationCount": 0,
                                    "lastChangeDate": "2024-08-24T14:15:22Z",
                                  },
                                "birthdate":
                                  {
                                    "inaccuracyFlag": false,
                                    "inaccuracyFlagReason": null,
                                    "inaccuracyFlagSetCounter": 0,
                                    "isValidated": false,
                                    "changeCounter": 0,
                                    "maxUpdatesVerificationCount": 0,
                                    "lastChangeDate": "2024-08-24T14:15:22Z",
                                  },
                                "photo":
                                  {
                                    "inaccuracyFlag": false,
                                    "inaccuracyFlagReason": null,
                                    "inaccuracyFlagSetCounter": 0,
                                    "isValidated": false,
                                    "changeCounter": 0,
                                    "maxUpdatesVerificationCount": 0,
                                    "lastChangeDate": "2024-08-24T14:15:22Z",
                                  },
                              },
                            "gboAgeProfile":
                              {
                                "gboAgeProfileId": 1,
                                "name": "Kind (4 t/m 11 jaar)",
                                "ageFromInclusive": 4,
                                "ageToInclusive": 11,
                              },
                            "tatSecurity": {
                              "isSecured": true,
                              "isAuthorized": true,
                            },
                            "_links":
                              {
                                "self":
                                  {
                                    "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens?ovPaytokenId=1",
                                    "method": "GET",
                                  },
                                "partial_edit":
                                  {
                                    "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1",
                                    "method": "PATCH",
                                  },
                                "delete_token":
                                  {
                                    "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1",
                                    "method": "DELETE",
                                  },
                                "get_productinstances":
                                  {
                                    "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1/productinstances",
                                    "method": "GET",
                                  },
                                "get_trips":
                                  {
                                    "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1/trips",
                                    "method": "GET",
                                  },
                                "update_personal-data":
                                  {
                                    "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/personal-data/32089cc8-d187-47ff-a3a9-5c2558def811",
                                    "method": "PATCH",
                                  },
                                "compare_token":
                                  {
                                    "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1/compare",
                                    "method": "POST",
                                  },
                              },
                          },
                        ],
                      _links:
                        {
                          "self":
                            {
                              "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens",
                              "method": "GET",
                            },
                        },
                    }
                OV pas with partial PAD:
                  summary: OV pas with partial PAD
                  description: OV pas with partial PAD
                  value:
                    {
                      "ovPayTokens":
                        [
                          {
                            "customerProfileId": 1,
                            "ovPayTokenId": 1,
                            "xTat": "32089cc8-d187-47ff-a3a9-5c2558def811",
                            "tokenType":
                              { "tokenTypeId": 2, "name": "OV-pas physical" },
                            "ovpasNumber": "OV34567",
                            "alias": "MyToken",
                            "tokenStatus":
                              { "tokenStatusId": 2, "name": "Active" },
                            "expirationDate": "2028-02-01",
                            "replacedByTokenId": null,
                            "autoReloadRegistration": null,
                            "ePurse":
                              {
                                "e-PurseBalance":
                                  { "currency": "EUR", "amount": 350 },
                                "status": "ACTIVE",
                                "originDate": "2019-07-16T11:00:00+02:00",
                              },
                            "personalAccountData":
                              {
                                "name": null,
                                "birthdate":
                                  {
                                    "inaccuracyFlag": true,
                                    "inaccuracyFlagReason": "Invalid birthdate",
                                    "inaccuracyFlagSetCounter": 1,
                                    "isValidated": false,
                                    "changeCounter": 0,
                                    "maxUpdatesVerificationCount": 0,
                                    "lastChangeDate": "2024-08-24T14:15:22Z",
                                  },
                                "photo": null,
                              },
                            "gboAgeProfile":
                              {
                                "gboAgeProfileId": 1,
                                "name": "Kind (4 t/m 11 jaar)",
                                "ageFromInclusive": 4,
                                "ageToInclusive": 11,
                              },
                            "tatSecurity": {
                              "isSecured": true,
                              "isAuthorized": true,
                            },
                            "_links":
                              {
                                "self":
                                  {
                                    "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens?ovPaytokenId=1",
                                    "method": "GET",
                                  },
                                "partial_edit":
                                  {
                                    "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1",
                                    "method": "PATCH",
                                  },
                                "delete_token":
                                  {
                                    "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1",
                                    "method": "DELETE",
                                  },
                                "get_productinstances":
                                  {
                                    "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1/productinstances",
                                    "method": "GET",
                                  },
                                "get_trips":
                                  {
                                    "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1/trips",
                                    "method": "GET",
                                  },
                                "update_personal-data":
                                  {
                                    "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/personal-data/32089cc8-d187-47ff-a3a9-5c2558def811",
                                    "method": "PATCH",
                                  },
                                "compare_token":
                                  {
                                    "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1/compare",
                                    "method": "POST",
                                  },
                              },
                          },
                        ],
                      _links:
                        {
                          "self":
                            {
                              "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens",
                              "method": "GET",
                            },
                        },
                    }
                OV pas with invalid PAD:
                  summary: OV pas with invalid PAD
                  description: OV pas with invalid PAD
                  value:
                    {
                      "ovPayTokens":
                        [
                          {
                            "customerProfileId": 1,
                            "ovPayTokenId": 1,
                            "xTat": "32089cc8-d187-47ff-a3a9-5c2558def811",
                            "tokenType":
                              { "tokenTypeId": 2, "name": "OV-pas physical" },
                            "ovpasNumber": "OV34567",
                            "alias": "MyToken",
                            "tokenStatus":
                              { "tokenStatusId": 2, "name": "Active" },
                            "expirationDate": "2028-02-01",
                            "replacedByTokenId": null,
                            "autoReloadRegistration": null,
                            "ePurse":
                              {
                                "e-PurseBalance":
                                  { "currency": "EUR", "amount": 350 },
                                "status": "ACTIVE",
                                "originDate": "2019-07-16T11:00:00+02:00",
                              },
                            "personalAccountData":
                              {
                                "name":
                                  {
                                    "inaccuracyFlag": true,
                                    "inaccuracyFlagReason": "T.B.D",
                                    "inaccuracyFlagSetCounter": 1,
                                    "isValidated": false,
                                    "changeCounter": 0,
                                    "maxUpdatesVerificationCount": 0,
                                    "lastChangeDate": "2024-08-24T14:15:22Z",
                                  },
                                "birthdate":
                                  {
                                    "inaccuracyFlag": true,
                                    "inaccuracyFlagReason": "T.B.D",
                                    "inaccuracyFlagSetCounter": 1,
                                    "isValidated": false,
                                    "changeCounter": 0,
                                    "maxUpdatesVerificationCount": 0,
                                    "lastChangeDate": "2024-08-24T14:15:22Z",
                                  },
                                "photo":
                                  {
                                    "inaccuracyFlag": true,
                                    "inaccuracyFlagReason": null,
                                    "inaccuracyFlagSetCounter": 1,
                                    "isValidated": false,
                                    "changeCounter": 0,
                                    "maxUpdatesVerificationCount": 0,
                                    "lastChangeDate": "2024-08-24T14:15:22Z",
                                  },
                              },
                            "gboAgeProfile":
                              {
                                "gboAgeProfileId": 1,
                                "name": "Kind (4 t/m 11 jaar)",
                                "ageFromInclusive": 4,
                                "ageToInclusive": 11,
                              },
                            "tatSecurity": {
                              "isSecured": true,
                              "isAuthorized": true,
                            },
                            "_links":
                              {
                                "self":
                                  {
                                    "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens?ovPaytokenId=1",
                                    "method": "GET",
                                  },
                                "partial_edit":
                                  {
                                    "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1",
                                    "method": "PATCH",
                                  },
                                "delete_token":
                                  {
                                    "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1",
                                    "method": "DELETE",
                                  },
                                "get_productinstances":
                                  {
                                    "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1/productinstances",
                                    "method": "GET",
                                  },
                                "get_trips":
                                  {
                                    "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1/trips",
                                    "method": "GET",
                                  },
                                "update_personal-data":
                                  {
                                    "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/personal-data/32089cc8-d187-47ff-a3a9-5c2558def811",
                                    "method": "PATCH",
                                  },
                                "compare_token":
                                  {
                                    "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1/compare",
                                    "method": "POST",
                                  },
                              },
                          },
                        ],
                      _links:
                        {
                          "self":
                            {
                              "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens",
                              "method": "GET",
                            },
                        },
                    }
                Token list with every status for tokenTypeId = 2, role = KlantenService:
                  summary: Token list with every status for tokenTypeId = 2, role = KlantenService
                  description: Token list with every status for tokenTypeId = 2, role = KlantenService
                  value:
                    {
                      "ovPayTokens":
                        [
                          {
                            "customerProfileId": 1,
                            "ovPayTokenId": 1,
                            "xTat": "e7fa3392-646b-40e2-95a6-c417dc0b0969",
                            "tokenType":
                              { "tokenTypeId": 2, "name": "OV-pas physical" },
                            "ovpasNumber": "OV34567",
                            "alias": "MyToken",
                            "tokenStatus":
                              { "tokenStatusId": 2, "name": "Active" },
                            "expirationDate": "2028-02-01",
                            "replacedByTokenId": null,
                            "autoReloadRegistration": null,
                            "ePurse": null,
                            "personalAccountData":
                              {
                                "name": null,
                                "birthdate": null,
                                "photo": null,
                              },
                          },
                          {
                            "customerProfileId": 1,
                            "ovPayTokenId": 6,
                            "xTat": "e7fa3392-646b-40e2-95a6-c417dc0b0969",
                            "tokenType":
                              { "tokenTypeId": 2, "name": "OV-pas physical" },
                            "ovpasNumber": "OV54567",
                            "alias": "MyToken",
                            "tokenStatus":
                              { "tokenStatusId": 3, "name": "Replaced (*)" },
                            "expirationDate": "2028-02-01",
                            "replacedByTokenId": 2,
                            "autoReloadRegistration": null,
                            "ePurse": null,
                            "personalAccountData":
                              {
                                "name": null,
                                "birthdate": null,
                                "photo": null,
                              },
                            "gboAgeProfile": null,
                            "tatSecurity": {
                              "isSecured": true,
                              "isAuthorized": true,
                            },
                          },
                          {
                            "customerProfileId": 18,
                            "ovPayTokenId": 13,
                            "xTat": "e7fa3392-646b-40e2-95a6-c417dc0b0969",
                            "tokenType":
                              { "tokenTypeId": 2, "name": "OV-pas physical" },
                            "ovpasNumber": "OV34547",
                            "alias": "MyToken",
                            "tokenStatus":
                              { "tokenStatusId": 4, "name": "On stock" },
                            "expirationDate": "2028-02-01",
                            "replacedByTokenId": null,
                            "autoReloadRegistration": null,
                            "ePurse": null,
                            "personalAccountData":
                              {
                                "name": null,
                                "birthdate": null,
                                "photo": null,
                              },
                            "gboAgeProfile": null,
                            "tatSecurity": {
                              "isSecured": true,
                              "isAuthorized": true,
                            },
                          },
                          {
                            "customerProfileId": 132,
                            "ovPayTokenId": 21,
                            "xTat": "e7fa3392-646b-40e2-95a6-c417dc0b0969",
                            "tokenType":
                              { "tokenTypeId": 2, "name": "OV-pas physical" },
                            "ovpasNumber": "OV34831",
                            "alias": "Mijn OV Pas",
                            "tokenStatus":
                              { "tokenStatusId": 5, "name": "Suspended" },
                            "expirationDate": "2028-02-01",
                            "replacedByTokenId": null,
                            "autoReloadRegistration": null,
                            "ePurse": null,
                            "personalAccountData":
                              {
                                "name": null,
                                "birthdate": null,
                                "photo": null,
                              },
                            "gboAgeProfile": null,
                            "tatSecurity": {
                              "isSecured": true,
                              "isAuthorized": true,
                            },
                          },
                          {
                            "customerProfileId": 166,
                            "ovPayTokenId": 28,
                            "xTat": "e7fa3392-646b-40e2-95a6-c417dc0b0969",
                            "tokenType":
                              { "tokenTypeId": 2, "name": "OV-pas physical" },
                            "ovpasNumber": "OV34984",
                            "alias": "Mijn OV Pas",
                            "tokenStatus":
                              {
                                "tokenStatusId": 6,
                                "name": "Removed by customer (*)",
                              },
                            "expirationDate": "2028-02-01",
                            "replacedByTokenId": null,
                            "autoReloadRegistration": null,
                            "ePurse": null,
                            "personalAccountData":
                              {
                                "name": null,
                                "birthdate": null,
                                "photo": null,
                              },
                            "gboAgeProfile": null,
                            "tatSecurity": {
                              "isSecured": true,
                              "isAuthorized": true,
                            },
                          },
                          {
                            "customerProfileId": 166,
                            "ovPayTokenId": 115,
                            "xTat": "e7fa3392-646b-40e2-95a6-c417dc0b0969",
                            "tokenType":
                              { "tokenTypeId": 2, "name": "OV-pas physical" },
                            "ovpasNumber": "OV54368",
                            "alias": "My retired token",
                            "tokenStatus":
                              { "tokenStatusId": 1, "name": "Retired" },
                            "expirationDate": "2025-02-01",
                            "replacedByTokenId": null,
                            "autoReloadRegistration": null,
                            "ePurse": null,
                            "personalAccountData":
                              {
                                "name": null,
                                "birthdate": null,
                                "photo": null,
                              },
                            "gboAgeProfile": null,
                            "tatSecurity": {
                              "isSecured": true,
                              "isAuthorized": true,
                            },
                          },
                          {
                            "customerProfileId": 1,
                            "ovPayTokenId": 118,
                            "xTat": "e7fa3392-646b-40e2-95a6-c417dc0b0969",
                            "tokenType":
                              { "tokenTypeId": 2, "name": "OV-pas physical" },
                            "ovpasNumber": "OV98263",
                            "alias": "My found token",
                            "tokenStatus":
                              { "tokenStatusId": 7, "name": "Renewed Active" },
                            "expirationDate": "2028-02-01",
                            "replacedByTokenId": null,
                            "autoReloadRegistration": null,
                            "ePurse": null,
                            "personalAccountData":
                              {
                                "name": null,
                                "birthdate": null,
                                "photo": null,
                              },
                            "gboAgeProfile": null,
                            "tatSecurity": {
                              "isSecured": true,
                              "isAuthorized": true,
                            },
                          },
                        ],
                      _links:
                        {
                          "self":
                            {
                              "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens",
                              "method": "GET",
                            },
                        },
                    }
    post:
      tags:
        - Customers
      parameters:
        - name: X-HTM-JWT-AUTH-HEADER
          in: header
          schema:
            type: string
            example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
          required: false
          description: The JWT of a customer in case of touchpoint were customer logs in themselves
        - name: X-HTM-CUSTOMER-PROFILE-ID-HEADER
          in: header
          schema:
            type: string
            example: feaaef83-a551-4283-8419-340b1ada3b55
          required: false
          description: The customerProfileId of a customer in the case of the SMP
        - name: X-HTM-ROLE-HEADER
          in: header
          schema:
            type: string
            example: Customer
          required: false
      summary: Create a new OV paytoken in the database for a given customer
      description: Create a new OV paytoken for a customerProfile
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/unavailable"
            examples:
              Add EMV token:
                summary: Add EMV token
                description: Add EMV token
                value:
                  {
                    "ovPayToken":
                      {
                        "tokenTypeId": 1,
                        "serviceReferenceId": "NLOV1234567ABCDEFG",
                        "amount": 200,
                        "alias": "Mijn token",
                      },
                  }
              Add OV pas physical token:
                summary: Add OV pas physical token
                description: Add OV pas physical token
                value:
                  {
                    "ovPayToken":
                      {
                        "tokenTypeId": 2,
                        "ovpasNumber": "OV34567",
                        "verificationCode": "211",
                        "alias": "Mijn token",
                      },
                  }
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/unavailable"
              examples:
                Add EMV token:
                  summary: Add EMV token
                  description: Add EMV token
                  value:
                    {
                      "ovPayToken":
                        {
                          "customerProfileId": 1,
                          "ovPayTokenId": 1,
                          "xTat": "32089cc8-d187-47ff-a3a9-5c2558def811",
                          "tokenType": { "tokenTypeId": 1, "name": "EMV" },
                          "lastDigits": null,
                          "ovpasNumber": null,
                          "alias": "Mijn token",
                          "tokenStatus":
                            { "tokenStatusId": 2, "name": "Active" },
                          "expirationDate": "2028-08-31T23:59:00+02:00",
                          "replacedByTokenId": null,
                          "autoReloadRegistration": null,
                          "ePurse": null,
                          "personalAccountData":
                            { "name": null, "birthdate": null, "photo": null },
                          "gboAgeProfile": null,
                          "tatSecurity": {
                              "isSecured": true,
                              "isAuthorized": true,
                            },
                          "_links":
                            {
                              "self":
                                {
                                  "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens?ovPaytokenId=1",
                                  "method": "GET",
                                },
                              "partial_edit":
                                {
                                  "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1",
                                  "method": "PATCH",
                                },
                              "delete_token":
                                {
                                  "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1",
                                  "method": "DELETE",
                                },
                              "get_productinstances":
                                {
                                  "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1/productinstances",
                                  "method": "GET",
                                },
                              "get_trips":
                                {
                                  "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1/trips",
                                  "method": "GET",
                                },
                              "add_personal-data":
                                {
                                  "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/personal-data/32089cc8-d187-47ff-a3a9-5c2558def811",
                                  "method": "POST",
                                },
                              "compare_token":
                                {
                                  "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1/compare",
                                  "method": "POST",
                                },
                            },
                        },
                      "_links":
                        {
                          "self":
                            {
                              "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens",
                              "method": "POST",
                            },
                        },
                    }
                Add OV pas physical token:
                  summary: Add OV pas physical token
                  description: Add OV pas physical token
                  value:
                    {
                      "ovPayToken":
                        {
                          "customerProfileId": 1,
                          "ovPayTokenId": 1,
                          "xTat": "32089cc8-d187-47ff-a3a9-5c2558def811",
                          "tokenType":
                            { "tokenTypeId": 2, "name": "OV-pas physical" },
                          "lastDigits": null,
                          "ovpasNumber": "OV34567",
                          "alias": "Mijn token",
                          "tokenStatus":
                            { "tokenStatusId": 2, "name": "Active" },
                          "expirationDate": "2028-08-31T23:59:00+02:00",
                          "replacedByTokenId": null,
                          "autoReloadRegistration": null,
                          "ePurse":
                            {
                              "e-PurseBalance":
                                { "currency": "EUR", "amount": 00 },
                              "status": "INACTIVE",
                              "originDate": "2019-07-16T11:00:00+02:00",
                            },
                          "personalAccountData":
                            { "name": null, "birthdate": null, "photo": null },
                          "gboAgeProfile": null,
                          "tatSecurity": {
                              "isSecured": true,
                              "isAuthorized": true,
                            },
                          "_links":
                            {
                              "self":
                                {
                                  "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens?ovPaytokenId=1",
                                  "method": "GET",
                                },
                              "partial_edit":
                                {
                                  "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1",
                                  "method": "PATCH",
                                },
                              "delete_token":
                                {
                                  "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1",
                                  "method": "DELETE",
                                },
                              "get_productinstances":
                                {
                                  "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1/productinstances",
                                  "method": "GET",
                                },
                              "get_trips":
                                {
                                  "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1/trips",
                                  "method": "GET",
                                },
                              "add_personal-data":
                                {
                                  "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/personal-data/32089cc8-d187-47ff-a3a9-5c2558def811",
                                  "method": "POST",
                                },
                              "compare_token":
                                {
                                  "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1/compare",
                                  "method": "POST",
                                },
                            },
                        },
                      "_links":
                        {
                          "self":
                            {
                              "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens",
                              "method": "POST",
                            },
                        },
                    }
  /customers/tokens/{ovPayTokenId}:
    patch:
      tags:
        - Customers
      parameters:
        - name: X-HTM-JWT-AUTH-HEADER
          in: header
          schema:
            type: string
            example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
          required: false
          description: The JWT of a customer in case of touchpoint were customer logs in themselves
        - name: X-HTM-CUSTOMER-PROFILE-ID-HEADER
          in: header
          schema:
            type: string
            example: feaaef83-a551-4283-8419-340b1ada3b55
          required: false
          description: The customerProfileId of a customer in the case of the SMP
        - name: X-HTM-ROLE-HEADER
          in: header
          schema:
            type: string
            example: Customer
          required: false
        - name: ovPayTokenId
          in: path
          schema:
            type: integer
            example: 1
          required: true
      summary: Edit an existing OV paytoken
      description: Edit an existing OV paytoken in the database for a given customer
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/unavailable"
            examples:
              Update an OV pay token status:
                summary: Update an OV pay token status
                description: Update an OV pay token status
                value: { "ovPayToken": { "tokenStatusId": 5 } }
              Update an OV pay token alias:
                summary: Update an OV pay token alias
                description: Update an OV pay token alias
                value: { "ovPayToken": { "alias": "Mijn nieuwe tokennaam" } }
              Update an OV pay token full:
                summary: Update an OV pay token full
                description: Update an OV pay token full
                value:
                  {
                    "ovPayToken":
                      { "tokenStatusId": 5, "alias": "Mijn verloren pas" },
                  }
      responses:
        "200":
          description: Ok
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/unavailable"
              examples:
                Update an OV pay token status:
                  summary: Update an OV pay token status
                  description: Update an OV pay token status
                  value:
                    {
                      "ovPayToken":
                        {
                          "customerProfileId": 1,
                          "ovPayTokenId": 5,
                          "xTat": "32089cc8-d187-47ff-a3a9-5c2558def811",
                          "tokenType": { "tokenTypeId": 1, "name": "EMV" },
                          "lastDigits": null,
                          "ovpasNumber": null,
                          "alias": "Mijn token",
                          "tokenStatus":
                            { "tokenStatusId": 5, "name": "Suspended" },
                          "expirationDate": "2028-08-31T23:59:00+02:00",
                          "replacedByTokenId": null,
                          "autoReloadRegistration": null,
                          "ePurse": null,
                          "personalAccountData":
                            { "name": null, "birthdate": null, "photo": null },
                          "_links":
                            {
                              "self":
                                {
                                  "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens?ovPaytokenId=5",
                                  "method": "GET",
                                },
                              "partial_edit":
                                {
                                  "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/5",
                                  "method": "PATCH",
                                },
                              "delete_token":
                                {
                                  "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/5",
                                  "method": "DELETE",
                                },
                              "get_productinstances":
                                {
                                  "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/5/productinstances",
                                  "method": "GET",
                                },
                              "get_trips":
                                {
                                  "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/5/trips",
                                  "method": "GET",
                                },
                              "add_personal-data":
                                {
                                  "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/personal-data/32089cc8-d187-47ff-a3a9-5c2558def811",
                                  "method": "POST",
                                },
                              "compare_token":
                                {
                                  "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/5/compare",
                                  "method": "POST",
                                },
                            },
                        },
                    }
                Update an OV pay token alias:
                  summary: Update an OV pay token alias
                  description: Update an OV pay token alias
                  value:
                    {
                      "ovPayToken":
                        {
                          "customerProfileId": 1,
                          "ovPayTokenId": 5,
                          "xTat": "32089cc8-d187-47ff-a3a9-5c2558def811",
                          "tokenType": { "tokenTypeId": 1, "name": "EMV" },
                          "lastDigits": null,
                          "ovpasNumber": null,
                          "alias": "Mijn nieuwe tokennaam",
                          "tokenStatus":
                            { "tokenStatusId": 2, "name": "Active" },
                          "expirationDate": "2028-08-31T23:59:00+02:00",
                          "replacedByTokenId": null,
                          "autoReloadRegistration": null,
                          "ePurse": null,
                          "personalAccountData":
                            { "name": null, "birthdate": null, "photo": null },
                          "gboAgeProfile": null,
                          "tatSecurity": {
                              "isSecured": true,
                              "isAuthorized": true,
                            },
                          "_links":
                            {
                              "self":
                                {
                                  "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens?ovPaytokenId=5",
                                  "method": "GET",
                                },
                              "partial_edit":
                                {
                                  "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/5",
                                  "method": "PATCH",
                                },
                              "delete_token":
                                {
                                  "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/5",
                                  "method": "DELETE",
                                },
                              "get_productinstances":
                                {
                                  "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/5/productinstances",
                                  "method": "GET",
                                },
                              "get_trips":
                                {
                                  "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/5/trips",
                                  "method": "GET",
                                },
                              "add_personal-data":
                                {
                                  "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/personal-data/32089cc8-d187-47ff-a3a9-5c2558def811",
                                  "method": "POST",
                                },
                              "compare_token":
                                {
                                  "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/5/compare",
                                  "method": "POST",
                                },
                            },
                        },
                    }
                Update an OV pay token full:
                  summary: Update an OV pay token full
                  description: Update an OV pay token full
                  value:
                    {
                      "ovPayToken":
                        {
                          "customerProfileId": 1,
                          "ovPayTokenId": 5,
                          "xTat": "e35977b2-52bb-48ef-aca8-297b2c1d5058",
                          "tokenType": { "tokenTypeId": 1, "name": "EMV" },
                          "lastDigits": null,
                          "ovpasNumber": null,
                          "alias": "Mijn verloren pas",
                          "tokenStatus":
                            { "tokenStatusId": 5, "name": "Suspended" },
                          "expirationDate": "2028-08-31T23:59:00+02:00",
                          "replacedByTokenId": null,
                          "autoReloadRegistration": null,
                          "ePurse": null,
                          "personalAccountData":
                            { "name": null, "birthdate": null, "photo": null },
                          "gboAgeProfile": null,
                          "tatSecurity": {
                              "isSecured": true,
                              "isAuthorized": true,
                            },
                          "_links":
                            {
                              "self":
                                {
                                  "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens?ovPaytokenId=5",
                                  "method": "GET",
                                },
                              "partial_edit":
                                {
                                  "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/5",
                                  "method": "PATCH",
                                },
                              "delete_token":
                                {
                                  "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/5",
                                  "method": "DELETE",
                                },
                              "get_productinstances":
                                {
                                  "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/5/productinstances",
                                  "method": "GET",
                                },
                              "get_trips":
                                {
                                  "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/5/trips",
                                  "method": "GET",
                                },
                              "add_personal-data":
                                {
                                  "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/personal-data/e35977b2-52bb-48ef-aca8-297b2c1d5058",
                                  "method": "POST",
                                },
                              "compare_token":
                                {
                                  "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/5/compare",
                                  "method": "POST",
                                },
                            },
                        },
                    }
    delete:
      tags:
        - Customers
      parameters:
        - name: X-HTM-JWT-AUTH-HEADER
          in: header
          schema:
            type: string
            example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
          required: false
          description: The JWT of a customer in case of touchpoint were customer logs in themselves
        - name: X-HTM-CUSTOMER-PROFILE-ID-HEADER
          in: header
          schema:
            type: string
            example: feaaef83-a551-4283-8419-340b1ada3b55
          required: false
          description: The customerProfileId of a customer in the case of the SMP
        - name: X-HTM-ROLE-HEADER
          in: header
          schema:
            type: string
            example: Customer
          required: false
        - name: ovPayTokenId
          in: path
          schema:
            type: integer
            example: 1
          required: true
      summary: Delete an existing OV paytoken
      description: Delete an existing OV paytoken for a given customer
      responses:
        "200":
          description: Ok
  /customers/tokens/{ovPayTokenId}/productinstances:
    get:
      tags:
        - Customers
      summary: Get a list of all HTM products instantiated on the given OvPayToken
      description: |-
        Get a list of all HTM products instantiated on the given OvPayToken.
        Only HTM products are returned; GBO does not allow HTM to get information on non-HTM product-instances.
        Where relevant, operations to be performed are returned as HATEOAS links per product-instance.
      parameters:
        - name: ovPayTokenId
          in: path
          required: true
          style: simple
          description: Id of the OvPayToken to get product-instances for.
          schema:
            type: integer
            example: 1
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OvPayTokenProductInstancesResponse"
              examples:
                getEmptyProductInstances:
                  summary: No product-instances found on token
                  value:
                    productInstances: []
                getSingleProductInstance:
                  summary: One non-renewable product-instance
                  value:
                    {
                      "productInstances":
                        [
                          {
                            "productId": 1,
                            "name": "HTM 90% Korting",
                            "status": "Active",
                            "isRenewable": true,
                            "productCategory":
                              {
                                "productCategoryId": 1,
                                "name": "Kortingsabonnement",
                              },
                            "fromInclusive": "2024-11-25T13:25:00+01:00",
                            "untilInclusive": "2024-12-25T03:59:59+01:00",
                            "orderId": "501B17EF-36C4-4039-B92C-6517969B464E",
                            "orderLineId": "38B17EF-36C4-4039-B92C-4817969B464E",
                            "contractId": "56B17EF-C436-9043-B76C-481797WEB464F",
                            "_links":
                              {
                                "self":
                                  {
                                    "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1/productinstances/1",
                                    "method": "GET",
                                  },
                                "get_order":
                                  {
                                    "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/orders/501B17EF-36C4-4039-B92C-6517969B464E",
                                    "method": "GET",
                                  },
                                "get_contract":
                                  {
                                    "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/contracts/56B17EF-C436-9043-B76C-481797WEB464F",
                                    "method": "GET",
                                  },
                              },
                          },
                        ],
                    }
  /customers/tokens/{ovPayTokenId}/compare:
    parameters:
      - name: X-HTM-JWT-AUTH-HEADER
        in: header
        schema:
          type: string
          example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
        required: false
        description: The JWT of a customer in case of touchpoint were customer logs in themselves
      - name: X-HTM-CUSTOMER-PROFILE-ID-HEADER
        in: header
        schema:
          type: string
          example: feaaef83-a551-4283-8419-340b1ada3b55
        required: false
        description: The customerProfileId of a customer in the case of the SMP
      - name: X-HTM-ROLE-HEADER
        in: header
        schema:
          type: string
          example: Customer
        required: false
      - name: ovPayTokenId
        in: path
        required: true
        style: simple
        description: Id of the OVpay token for the LHS of the comparison.
        schema:
          type: integer
          example: 1
    post:
      summary: Compare attributes of two OVpay tokens.
      description: |-
        Compare the attributes of an existing OVpay token in the customer profile with the
        attributes of a new OVpay token. The new token can be passed using one of the following
        methods:

        - Compare with an existing OVpay token
        - Compare with an XBOT
        - Compare with an XTAT
        - Compare with SRID + amount
        - Compare with OVpas number + verification code

        The comparison results are returned in the response body. Comparison is made on the following
        attributes:

        - Token type
        - Token status (only if target token is known in the customer profile)
        - Expiry date
        - Instantiated GBO products
        - Auto reload registration
        - E-purse
        - PAD (name, birthdate, photo)
        - Age profile
      tags:
        - Customers
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CompareRequest"
            examples:
              Compare with an existing OVpay token:
                value: { "ovPayTokenId": 1 }
              Compare with an xBOT:
                value: { "xBot": "e35977b2-52bb-48ef-aca8-297b2c1d5058" }
              Compare with an xTAT:
                value: { "xTat": "e35977b2-52bb-48ef-aca8-297b2c1d5058" }
              Compare with SRID + amount:
                value:
                  { "serviceReferenceId": "NLOV1234567ABCDEFG", "amount": 230 }
              Compare with OVpas number + verification code:
                value: { "ovpasNumber": "OV34567", "verificationCode": "1234" }
              Complete request body (for development only):
                value:
                  {
                    "ovPayTokenId": 1,
                    "xBot": "e35977b2-52bb-48ef-aca8-297b2c1d5058",
                    "xTat": "e35977b2-52bb-48ef-aca8-297b2c1d5058",
                    "serviceReferenceId": "NLOV1234567ABCDEFG",
                    "amount": 230,
                    "ovpasNumber": "OV34567",
                    "verificationCode": "1234",
                  }
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/unavailable"
              examples:
                Transferable token:
                  value:
                    {
                      "oldOvPayToken":
                        {
                          "customerProfileId": 1,
                          "ovPayTokenId": 1,
                          "xTat": "e7fa3392-646b-40e2-95a6-c417dc0b0969",
                          "tokenType": { "tokenTypeId": 1, "name": "EMV" },
                          "alias": "MyToken",
                          "tokenStatus":
                            { "tokenStatusId": 2, "name": "Active" },
                          "expirationDate": "2028-02-01",
                          "productInstances": [],
                          "replacedByTokenId": null,
                          "autoReloadRegistration": null,
                          "ePurse": null,
                          "personalAccountData":
                            { "name": null, "birthdate": null, "photo": null },
                          "gboAgeProfile": null,
                        },
                      "newOvPayToken":
                        {
                          "customerProfileId": null,
                          "ovPayTokenId": null,
                          "xTat": "32089cc8-d187-47ff-a3a9-5c2558def811",
                          "tokenType": { "tokenTypeId": 1, "name": "EMV" },
                          "alias": null,
                          "tokenStatus": null,
                          "expirationDate": "2028-02-01",
                          "productInstances": [],
                          "replacedByTokenId": null,
                          "autoReloadRegistration": null,
                          "ePurse": null,
                          "personalAccountData":
                            { "name": null, "birthdate": null, "photo": null },
                          "gboAgeProfile": null,
                        },
                      "isTransferable": true,
                      "transferableObjects":
                        {
                          "tokenType": true,
                          "tokenStatus": true,
                          "expirationDate": true,
                          "productInstances": true,
                          "autoReloadRegistration": true,
                          "ePurse": true,
                          "personalAccountData":
                            { "name": true, "birthdate": true, "photo": true },
                          "gboAgeProfile": true,
                        },
                      "_links":
                        {
                          "transfer_token":
                            {
                              "href": "https://services.dev.api.htm.nl/abt/touchpoint/1.0/customers/tokens/1/transfer",
                              "method": "POST",
                            },
                        },
                    }
                Non-transferable token (products not compatible on new token):
                  value:
                    {
                      "oldOvPayToken":
                        {
                          "customerProfileId": 1,
                          "ovPayTokenId": 1,
                          "xTat": "e7fa3392-646b-40e2-95a6-c417dc0b0969",
                          "tokenType": { "tokenTypeId": 1, "name": "EMV" },
                          "alias": "MyToken",
                          "tokenStatus":
                            { "tokenStatusId": 2, "name": "Active" },
                          "expirationDate": "2028-02-01",
                          "productInstances":
                            [
                              {
                                "productId": 1,
                                "name": "HTM 90% Korting EMV",
                                "status": "Active",
                                "isRenewable": true,
                                "productCategory":
                                  {
                                    "productCategoryId": 1,
                                    "name": "Kortingsabonnement",
                                  },
                                "fromInclusive": "2025-11-25T13:25:00+01:00",
                                "untilInclusive": "2025-12-25T03:59:59+01:00",
                                "orderId": "501B17EF-36C4-4039-B92C-6517969B464E",
                                "orderLineId": "38B17EF-36C4-4039-B92C-4817969B464E",
                                "contractId": "56B17EF-C436-9043-B76C-481797WEB464F",
                                "_links":
                                  {
                                    "self":
                                      {
                                        "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1/productinstances/1",
                                        "method": "GET",
                                      },
                                    "get_order":
                                      {
                                        "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/orders/501B17EF-36C4-4039-B92C-6517969B464E",
                                        "method": "GET",
                                      },
                                    "get_contract":
                                      {
                                        "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/contracts/56B17EF-C436-9043-B76C-481797WEB464F",
                                        "method": "GET",
                                      },
                                  },
                              },
                            ],
                          "replacedByTokenId": null,
                          "autoReloadRegistration": null,
                          "ePurse": null,
                          "personalAccountData":
                            { "name": null, "birthdate": null, "photo": null },
                          "gboAgeProfile": null,
                        },
                      "newOvPayToken":
                        {
                          "customerProfileId": null,
                          "ovPayTokenId": null,
                          "xTat": "32089cc8-d187-47ff-a3a9-5c2558def811",
                          "tokenType":
                            { "tokenTypeId": 2, "name": "OV-pas physical" },
                          "alias": null,
                          "tokenStatus": null,
                          "expirationDate": "2028-02-01",
                          "productInstances": [],
                          "replacedByTokenId": null,
                          "autoReloadRegistration": null,
                          "ePurse": null,
                          "personalAccountData":
                            { "name": null, "birthdate": null, "photo": null },
                          "gboAgeProfile": null,
                        },
                      "isTransferable": false,
                      "transferableObjects":
                        {
                          "tokenType": true,
                          "tokenStatus": true,
                          "expirationDate": true,
                          "productInstances": false,
                          "autoReloadRegistration": true,
                          "ePurse": true,
                          "personalAccountData":
                            { "name": true, "birthdate": true, "photo": true },
                          "gboAgeProfile": true,
                        },
                      "_links": {},
                    }
                Non-transferable token (unsupported token type combination):
                  value:
                    {
                      "oldOvPayToken":
                        {
                          "customerProfileId": 1,
                          "ovPayTokenId": 1,
                          "xTat": "e7fa3392-646b-40e2-95a6-c417dc0b0969",
                          "tokenType":
                            { "tokenTypeId": 2, "name": "OV-pas physical" },
                          "alias": "MyToken",
                          "tokenStatus":
                            { "tokenStatusId": 2, "name": "Active" },
                          "expirationDate": "2028-02-01",
                          "productInstances": [],
                          "replacedByTokenId": null,
                          "autoReloadRegistration": null,
                          "ePurse": null,
                          "personalAccountData":
                            { "name": null, "birthdate": null, "photo": null },
                          "gboAgeProfile": null,
                        },
                      "newOvPayToken":
                        {
                          "customerProfileId": null,
                          "ovPayTokenId": null,
                          "xTat": "32089cc8-d187-47ff-a3a9-5c2558def811",
                          "tokenType": { "tokenTypeId": 1, "name": "EMV" },
                          "alias": null,
                          "tokenStatus": null,
                          "expirationDate": "2028-02-01",
                          "productInstances": [],
                          "replacedByTokenId": null,
                          "autoReloadRegistration": null,
                          "ePurse": null,
                          "personalAccountData":
                            { "name": null, "birthdate": null, "photo": null },
                          "gboAgeProfile": null,
                        },
                      "isTransferable": false,
                      "transferableObjects":
                        {
                          "tokenType": false,
                          "tokenStatus": true,
                          "expirationDate": true,
                          "productInstances": true,
                          "autoReloadRegistration": true,
                          "ePurse": true,
                          "personalAccountData":
                            { "name": true, "birthdate": true, "photo": true },
                          "gboAgeProfile": true,
                        },
                      "_links": {},
                    }
                Non-transferable token (marked PAD):
                  value:
                    {
                      "oldOvPayToken":
                        {
                          "customerProfileId": 1,
                          "ovPayTokenId": 1,
                          "xTat": "e7fa3392-646b-40e2-95a6-c417dc0b0969",
                          "tokenType": { "tokenTypeId": 1, "name": "EMV" },
                          "alias": "MyToken",
                          "tokenStatus":
                            { "tokenStatusId": 2, "name": "Active" },
                          "expirationDate": "2028-02-01",
                          "productInstances": [],
                          "replacedByTokenId": 2,
                          "autoReloadRegistration": null,
                          "ePurse": null,
                          "personalAccountData":
                            {
                              "name":
                                {
                                  "inaccuracyFlag": true,
                                  "inaccuracyFlagReason": "T.B.D",
                                  "inaccuracyFlagSetCounter": 1,
                                  "isValidated": false,
                                  "changeCounter": 0,
                                  "maxUpdatesVerificationCount": 0,
                                  "lastChangeDate": "2024-08-24T14:15:22Z",
                                },
                              "birthdate":
                                {
                                  "inaccuracyFlag": true,
                                  "inaccuracyFlagReason": "T.B.D",
                                  "inaccuracyFlagSetCounter": 1,
                                  "isValidated": false,
                                  "changeCounter": 0,
                                  "maxUpdatesVerificationCount": 0,
                                  "lastChangeDate": "2024-08-24T14:15:22Z",
                                },
                              "photo":
                                {
                                  "inaccuracyFlag": true,
                                  "inaccuracyFlagReason": null,
                                  "inaccuracyFlagSetCounter": 1,
                                  "isValidated": false,
                                  "changeCounter": 0,
                                  "maxUpdatesVerificationCount": 0,
                                  "lastChangeDate": "2024-08-24T14:15:22Z",
                                },
                            },
                          "gboAgeProfile":
                            {
                              "gboAgeProfileId": 1,
                              "name": "Kind (4 t/m 11 jaar)",
                              "ageFromInclusive": 4,
                              "ageToInclusive": 11,
                            },
                        },
                      "newOvPayToken":
                        {
                          "customerProfileId": null,
                          "ovPayTokenId": null,
                          "xTat": "32089cc8-d187-47ff-a3a9-5c2558def811",
                          "tokenType": { "tokenTypeId": 1, "name": "EMV" },
                          "alias": null,
                          "tokenStatus": null,
                          "expirationDate": "2028-02-01",
                          "productInstances": [],
                          "replacedByTokenId": null,
                          "autoReloadRegistration": null,
                          "ePurse": null,
                          "personalAccountData":
                            { "name": null, "birthdate": null, "photo": null },
                          "gboAgeProfile": null,
                        },
                      "isTransferable": false,
                      "transferableObjects":
                        {
                          "tokenType": true,
                          "tokenStatus": true,
                          "expirationDate": true,
                          "productInstances": true,
                          "autoReloadRegistration": true,
                          "ePurse": true,
                          "personalAccountData":
                            {
                              "name": false,
                              "birthdate": false,
                              "photo": false,
                            },
                          "gboAgeProfile": true,
                        },
                      "_links": {},
                    }
                Non-transferable token (different age profile):
                  value:
                    {
                      "oldOvPayToken":
                        {
                          "customerProfileId": 1,
                          "ovPayTokenId": 1,
                          "xTat": "e7fa3392-646b-40e2-95a6-c417dc0b0969",
                          "tokenType": { "tokenTypeId": 1, "name": "EMV" },
                          "alias": "MyToken",
                          "tokenStatus":
                            { "tokenStatusId": 2, "name": "Active" },
                          "expirationDate": "2028-02-01",
                          "productInstances": [],
                          "replacedByTokenId": 2,
                          "autoReloadRegistration": null,
                          "ePurse": null,
                          "personalAccountData":
                            {
                              "name": null,
                              "birthdate":
                                {
                                  "inaccuracyFlag": false,
                                  "inaccuracyFlagReason": "T.B.D",
                                  "inaccuracyFlagSetCounter": 1,
                                  "isValidated": false,
                                  "changeCounter": 0,
                                  "maxUpdatesVerificationCount": 0,
                                  "lastChangeDate": "2024-08-24T14:15:22Z",
                                },
                              "photo": null,
                            },
                          "gboAgeProfile":
                            {
                              "gboAgeProfileId": 1,
                              "name": "Kind (4 t/m 11 jaar)",
                              "ageFromInclusive": 4,
                              "ageToInclusive": 11,
                            },
                        },
                      "newOvPayToken":
                        {
                          "customerProfileId": null,
                          "ovPayTokenId": null,
                          "xTat": "e7fa3392-646b-40e2-95a6-c417dc0b0969",
                          "tokenType": { "tokenTypeId": 1, "name": "EMV" },
                          "alias": null,
                          "tokenStatus": null,
                          "expirationDate": "2028-02-01",
                          "productInstances": [],
                          "replacedByTokenId": null,
                          "autoReloadRegistration": null,
                          "ePurse": null,
                          "personalAccountData":
                            {
                              "name": null,
                              "birthdate":
                                {
                                  "inaccuracyFlag": false,
                                  "inaccuracyFlagReason": "T.B.D",
                                  "inaccuracyFlagSetCounter": 1,
                                  "isValidated": false,
                                  "changeCounter": 0,
                                  "maxUpdatesVerificationCount": 0,
                                  "lastChangeDate": "2024-08-24T14:15:22Z",
                                },
                              "photo": null,
                            },
                          "gboAgeProfile":
                            {
                              "gboAgeProfileId": 4,
                              "name": "Kind (19 t/m 65 jaar)",
                              "ageFromInclusive": 19,
                              "ageToInclusive": 65,
                            },
                        },
                      "isTransferable": false,
                      "transferableObjects":
                        {
                          "tokenType": true,
                          "tokenStatus": true,
                          "expirationDate": true,
                          "productInstances": true,
                          "autoReloadRegistration": true,
                          "ePurse": false,
                          "personalAccountData":
                            { "name": true, "birthdate": false, "photo": true },
                          "gboAgeProfile": false,
                        },
                      "_links": {},
                    }
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/unavailable"
              examples:
                New token already present in other customer profile:
                  value:
                    {
                      "type": "https://htm.nl/api/v1/probs/badrequest",
                      "title": "Bad Request",
                      "detail": "New token already present in other customer profile.",
                      "instance": "urn:uuid:4017fabc-1b28-11e8-accf-0ed5f89f718b",
                      "errors":
                        [
                          {
                            "detail": "New token already present in other customer profile.",
                            "pointer": "#/0/ovPayTokenId",
                            "ovPayTokenId": 2,
                          },
                        ],
                    }
        "404":
          description: Not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/unavailable"
              examples:
                Old token not found in profile:
                  value:
                    {
                      "type": "https://htm.nl/api/v1/probs/notfound",
                      "title": "The item you requested was not found.",
                      "detail": "The old token was not found in the customer profile.",
                      "instance": "urn:uuid:4017fabc-1b28-11e8-accf-0ed5f89f718b",
                      "errors":
                        [
                          {
                            "detail": "The old token was not found in the customer profile.",
                            "pointer": "#/0/ovPayTokenId",
                            "ovPayTokenId": 1,
                          },
                        ],
                    }
                New token not found in profile:
                  value:
                    {
                      "type": "https://htm.nl/api/v1/probs/notfound",
                      "title": "The item you requested was not found.",
                      "detail": "The new token was not found in the customer profile.",
                      "instance": "urn:uuid:4017fabc-1b28-11e8-accf-0ed5f89f718b",
                      "errors":
                        [
                          {
                            "detail": "The new token was not found in the customer profile.",
                            "pointer": "#/0/ovPayTokenId",
                            "ovPayTokenId": 2,
                          },
                        ],
                    }
                XTAT for new token not found in GBO:
                  value:
                    {
                      "type": "https://htm.nl/api/v1/probs/notfound",
                      "title": "The item you requested was not found.",
                      "detail": "The new token was not found in GBO:.",
                      "instance": "urn:uuid:4017fabc-1b28-11e8-accf-0ed5f89f718b",
                      "errors":
                        [
                          {
                            "detail": "XTAT for the new token was not found in GBO.",
                            "pointer": "#/0/xTat",
                            "xTat": "e35977b2-52bb-48ef-aca8-297b2c1d5058",
                          },
                        ],
                    }
                SRID for new token not found in GBO:
                  value:
                    {
                      "type": "https://htm.nl/api/v1/probs/notfound",
                      "title": "The item you requested was not found.",
                      "detail": "The new token was not found in GBO:.",
                      "instance": "urn:uuid:4017fabc-1b28-11e8-accf-0ed5f89f718b",
                      "errors":
                        [
                          {
                            "detail": "Service Reference ID for the new token was not found in GBO.",
                            "pointer": "#/0/serviceReferenceId",
                            "serviceReferenceId": "NLOV1234567ABCDEFG",
                          },
                        ],
                    }
  /customers/tokens/{ovPayTokenId}/transfer:
    parameters:
      - name: X-HTM-JWT-AUTH-HEADER
        in: header
        schema:
          type: string
          example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
        required: false
        description: The JWT of a customer in case of touchpoint were customer logs in themselves
      - name: X-HTM-CUSTOMER-PROFILE-ID-HEADER
        in: header
        schema:
          type: string
          example: feaaef83-a551-4283-8419-340b1ada3b55
        required: false
        description: The customerProfileId of a customer in the case of the SMP
      - name: X-HTM-ROLE-HEADER
        in: header
        schema:
          type: string
          example: Customer
        required: false
      - name: ovPayTokenId
        in: path
        required: true
        style: simple
        description: Id of the OVpay token from which data will be transferred.
        schema:
          type: integer
          example: 1
    post:
      summary: "**INTEGRATIELAAG** Transfer old OVpay token to new OVpay token."
      description: |-
        **Note that this directly calls the integratielaag and not the Service Engine!**
        First transfers all personal account data (if present), then all products, of an existing OVpay token
        to a new OVpay token. The new token will also be persisted in the profile as a replacement
        of the old token. This call is asynchronous, and progress can be monitored using the
        `/customers/tokens/transfer/responsestatus/*` endpoint.
      tags:
        - Token Replace v2
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TransferRequest"
            examples:
              Transfer from a token without PAD to a new token:
                summary: Transfer from a token without PAD to a new token
                description: |
                  Transfer of a token without PAD to a new OVpay token. Note the new token in the request is always
                  identified by xTAT, regardless if the new token already exists in the customer profile. If the new
                  token does not exist in the customer profile, the user needs to provide an alias for the new token,
                  and it will be created in the customer profile.
                value:
                  {
                    "oldOvPayToken": {},
                    "newOvPayToken":
                      {
                        "xTat": "e7fa3392-646b-40e2-95a6-c417dc0b0969",
                        "alias": "My new token",
                      },
                  }
              Transfer from a token with PAD to a new token without existing PAD:
                summary: Transfer from a token with PAD to a new token without existing PAD
                description: |
                  Transfer of a token with PAD to a new token by xTAT without existing PAD. Note how this request is
                  different, since it has an e-mail address on which the new PAD should be created. This request may
                  optionally provide an OTP for verification of th provided email address.
                  Also note the new token in the request is always identified by xTAT, regardless if the new token
                  already exists in the customer profile. If the new token does not exist in the customer profile, the
                  user needs to provide an alias for the new token, and it will be created in the customer profile.
                value:
                  {
                    "oldOvPayToken": { "padOtp": "123456" },
                    "newOvPayToken":
                      {
                        "xTat": "e7fa3392-646b-40e2-95a6-c417dc0b0969",
                        "alias": "My new token",
                        "padEmailAddress": "jandevries@outlook.com",
                        "padOtp": "678901",
                      },
                  }
              Transfer from a token with PAD to a new token with existing PAD:
                summary: Transfer from a token with PAD to a new token with existing PAD
                description: |
                  Transfer of a token with PAD to a new token by xTAT with existing PAD.
                  Note that the new token in the request is always identified by xTAT, regardless if the new token
                  already exists in the customer profile. If the new token does not exist in the customer profile, the
                  user needs to provide an alias for the new token, and it will be created in the customer profile.
                value:
                  {
                    "oldOvPayToken": { "padOtp": "123456" },
                    "newOvPayToken":
                      {
                        "xTat": "e7fa3392-646b-40e2-95a6-c417dc0b0969",
                        "alias": "My new token",
                        "padOtp": "678901",
                      },
                  }
              Complete request body (for development only):
                summary: Complete request body (for development only)
                description: |
                  Complete request body (for development only).
                value:
                  {
                    "oldOvPayToken": { "padOtp": "123456" },
                    "newOvPayToken":
                      {
                        "xTat": "e7fa3392-646b-40e2-95a6-c417dc0b0969",
                        "alias": "My new token",
                        "padEmailAddress": "jandevries@outlook.com",
                        "padOtp": "678901",
                      },
                  }
      responses:
        "202":
          description: Accepted
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/unavailable"
              examples:
                Transfer of token started:
                  description: |
                    The transfer of the token was started successfully. The data of the token will be transferred
                    asynchronously. In the response body the consumer will find information on how to retrieve the
                    processing status.
                  value:
                    {
                      "startTime": "2025-02-14T05:32:47.067Z",
                      "status": "Running",
                      "clientTrackingId": "08584620957189579629541919368CU00",
                      "callbackurl": "https://api.integratielaag.nl/customers/tokens/transfer/responsestatus/runtime/webhooks/workflow/scaleUnits/prod-00/workflows/6fd466916c",
                      "retryAfter": 10,
                    }
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/unavailable"
              examples:
                Request body validation error:
                  value:
                    {
                      "type": "https://htm.nl/api/v1/probs/validation",
                      "title": "Validation error",
                      "detail": "The request body is not valid.",
                      "instance": "urn:uuid:4017fabc-1b28-11e8-accf-0ed5f89f718b",
                      "errors":
                        [
                          {
                            "detail": "The old token is required.",
                            "pointer": "#/oldOvPayToken",
                          },
                          {
                            "detail": "The new token is required.",
                            "pointer": "#/newOvPayToken",
                          },
                        ],
                    }
  /customers/tokens/transfer/responsestatus/*:
    get:
      tags:
        - Token Replace v2
      summary: "**INTEGRATIELAAG** Get the status of the initiated token transfer process."
      description: |
        **Note that this directly calls the integratielaag and not the Service Engine!** Get the status of the
        asynchronous token transfer processing.
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/unavailable"
              examples:
                New token as a result of a successful transfer:
                  description: |
                    The transfer of the token was processed successfully. The response body shows the details of the new
                    token to which the data was transferred.
                  value:
                    {
                      "customerProfileId": 1,
                      "ovPayTokenId": 2,
                      "xTat": "e7fa3392-646b-40e2-95a6-c417dc0b0969",
                      "tokenType":
                        { "tokenTypeId": 2, "name": "OV-pas physical" },
                      "alias": "MyToken",
                      "tokenStatus": { "tokenStatusId": 2, "name": "Active" },
                      "expirationDate": "2028-02-01",
                      "replacedByTokenId": null,
                      "autoReloadRegistration":
                        {
                          "autoReloadAmount": 500,
                          "retailerReferenceId": "abc",
                          "arrit": "425f7fc2-1103-4822-9c79-7c4aaa2fb6aa",
                          "autoReloadRegistrationStatus": "ACTIVE",
                          "autoReloadRegistrationStartDateTime": "2024-06-02T15:03:46Z",
                        },
                      "ePurse":
                        {
                          "e-PurseBalance":
                            { "currency": "EUR", "amount": 350 },
                          "status": "ACTIVE",
                          "originDate": "2019-07-16T11:00:00+02:00",
                        },
                      "personalAccountData":
                        {
                          "name":
                            {
                              "inaccuracyFlag": false,
                              "inaccuracyFlagReason": null,
                              "inaccuracyFlagSetCounter": 0,
                              "isValidated": false,
                              "changeCounter": 0,
                              "maxUpdatesVerificationCount": 0,
                              "lastChangeDate": "2024-08-24T14:15:22Z",
                            },
                          "birthdate":
                            {
                              "inaccuracyFlag": false,
                              "inaccuracyFlagReason": null,
                              "inaccuracyFlagSetCounter": 0,
                              "isValidated": false,
                              "changeCounter": 0,
                              "maxUpdatesVerificationCount": 0,
                              "lastChangeDate": "2024-08-24T14:15:22Z",
                            },
                          "photo":
                            {
                              "inaccuracyFlag": false,
                              "inaccuracyFlagReason": null,
                              "inaccuracyFlagSetCounter": 0,
                              "isValidated": false,
                              "changeCounter": 0,
                              "maxUpdatesVerificationCount": 0,
                              "lastChangeDate": "2024-08-24T14:15:22Z",
                            },
                        },
                      "gboAgeProfile":
                        {
                          "gboAgeProfileId": 1,
                          "name": "Kind (4 t/m 11 jaar)",
                          "ageFromInclusive": 4,
                          "ageToInclusive": 11,
                        },
                      "_links":
                        {
                          "self":
                            {
                              "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens?ovPaytokenId=1",
                              "method": "GET",
                            },
                          "partial_edit":
                            {
                              "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1",
                              "method": "PATCH",
                            },
                          "delete_token":
                            {
                              "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1",
                              "method": "DELETE",
                            },
                          "get_productinstances":
                            {
                              "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1/productinstances",
                              "method": "GET",
                            },
                          "get_trips":
                            {
                              "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1/trips",
                              "method": "GET",
                            },
                          "update_personal-data":
                            {
                              "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/personal-data/e7fa3392-646b-40e2-95a6-c417dc0b0969",
                              "method": "PATCH",
                            },
                          "compare_token":
                            {
                              "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1/compare",
                              "method": "POST",
                            },
                        },
                    }
        "202":
          description: Accepted
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/unavailable"
              examples:
                Token transfer in progress:
                  description: |
                    The transfer of the token is still in progress. The response body shows the details of the
                    processing status.
                  value:
                    {
                      "startTime": "2025-02-14T05:32:47.067Z",
                      "status": "Running",
                      "clientTrackingId": "08584620957189579629541919368CU00",
                    }
        "404":
          description: Not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/unavailable"
              examples:
                Old token not found in profile:
                  value:
                    {
                      "type": "https://htm.nl/api/v1/probs/notfound",
                      "title": "The item you requested was not found.",
                      "detail": "The old token was not found in the customer profile.",
                      "instance": "urn:uuid:4017fabc-1b28-11e8-accf-0ed5f89f718b",
                      "errors":
                        [
                          {
                            "detail": "The old token was not found in the customer profile.",
                            "pointer": "#/0/ovPayTokenId",
                            "ovPayTokenId": 1,
                          },
                        ],
                    }
                New token not found in profile:
                  value:
                    {
                      "type": "https://htm.nl/api/v1/probs/notfound",
                      "title": "The item you requested was not found.",
                      "detail": "The new token was not found in the customer profile.",
                      "instance": "urn:uuid:4017fabc-1b28-11e8-accf-0ed5f89f718b",
                      "errors":
                        [
                          {
                            "detail": "The new token was not found in the customer profile.",
                            "pointer": "#/0/ovPayTokenId",
                            "ovPayTokenId": 2,
                          },
                        ],
                    }
                XTAT for new token not found in GBO:
                  value:
                    {
                      "type": "https://htm.nl/api/v1/probs/notfound",
                      "title": "The item you requested was not found.",
                      "detail": "The new token was not found in GBO:.",
                      "instance": "urn:uuid:4017fabc-1b28-11e8-accf-0ed5f89f718b",
                      "errors":
                        [
                          {
                            "detail": "XTAT for the new token was not found in GBO.",
                            "pointer": "#/0/xTat",
                            "xTat": "e35977b2-52bb-48ef-aca8-297b2c1d5058",
                          },
                        ],
                    }
        "405":
          description: Not allowed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/unavailable"
              examples:
                Old token is wrong token type:
                  value:
                    {
                      "type": "https://htm.nl/api/v1/probs/notallowed",
                      "title": "The transfer you requested was not allowed.",
                      "detail": "The old token has wrong token type.",
                      "instance": "urn:uuid:4017fabc-1b28-11e8-accf-0ed5f89f718b",
                      "errors":
                        [
                          {
                            "detail": "The old token has token type OV-pas physical.",
                            "pointer": "#/0/ovPayToken/tokenTypeId",
                            "tokenTypeId": 2,
                          },
                        ],
                    }
                Old token has wrong token status:
                  value:
                    {
                      "type": "https://htm.nl/api/v1/probs/notallowed",
                      "title": "The transfer you requested was not allowed.",
                      "detail": "The old token has wrong token status.",
                      "instance": "urn:uuid:4017fabc-1b28-11e8-accf-0ed5f89f718b",
                      "errors":
                        [
                          {
                            "detail": "The old token has token status replaced.",
                            "pointer": "#/0/ovPayToken/tokenStatusId",
                            "tokenStatusId": 4,
                          },
                        ],
                    }
                New token is expired:
                  value:
                    {
                      "type": "https://htm.nl/api/v1/probs/notallowed",
                      "title": "The transfer you requested was not allowed.",
                      "detail": "The new token is expired.",
                      "instance": "urn:uuid:4017fabc-1b28-11e8-accf-0ed5f89f718b",
                      "errors":
                        [
                          {
                            "detail": "The new token is expired.",
                            "pointer": "#/0/ovPayToken/expirationDate",
                            "expirationDate": "2022-01-01",
                          },
                        ],
                    }
                One or more GBO product instances not transferable:
                  value:
                    {
                      "type": "https://htm.nl/api/v1/probs/notallowed",
                      "title": "The transfer you requested was not allowed.",
                      "detail": "One or more GBO product instances are not transferable.",
                      "instance": "urn:uuid:4017fabc-1b28-11e8-accf-0ed5f89f718b",
                      "errors":
                        [
                          {
                            "detail": "One or more GBO product instances are not transferable",
                            "pointer": "#/0/ovPayToken/packageTemplateId",
                            "packageTemplateId": "33613",
                          },
                        ],
                    }
                One or more PAD attributes marked:
                  value:
                    {
                      "type": "https://htm.nl/api/v1/probs/notallowed",
                      "title": "The transfer you requested was not allowed.",
                      "detail": "One or more PAD attributes are not transferable.",
                      "instance": "urn:uuid:4017fabc-1b28-11e8-accf-0ed5f89f718b",
                      "errors":
                        [
                          {
                            "detail": "PAD attribute birthdate is marked on the old token",
                            "pointer": "#/0/ovPayToken/padAttributes/birthdate",
                          },
                        ],
                    }
  /purchasedproducts:
    parameters:
      - name: X-HTM-JWT-AUTH-HEADER
        in: header
        schema:
          type: string
          example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
        required: false
        description: The JWT of a customer in case of a touchpoint where customer logs in themselves
      - name: X-HTM-CUSTOMER-PROFILE-ID-HEADER
        in: header
        schema:
          type: string
          example: feaaef83-a551-4283-8419-340b1ada3b55
        required: false
        description: The customerProfileId of a customer in the case of the SMP
      - name: X-HTM-ROLE-HEADER
        in: header
        schema:
          type: string
          example: Customer
        required: false
      - name: deviceId
        in: query
        description: Id of the device you want to get the purchased HTM products for.
        schema:
          type: string
          format: uuid
      - name: externalDeviceId
        in: query
        description: External id of the device you want to get the purchased HTM products for.
        schema:
          type: string
      - name: ovpayTokenId
        in: query
        description: Id of the OVpay-token you want to get the purchased HTM products for.
        schema:
          type: string
          format: uuid
    get:
      summary: Get a list of all purchased HTM products for a specific device or token of the given customer. At least one of the query parameters should be filled in.
      description: |-
        Get a list of all purchased HTM products for a specific device or token of the given customer. At least one of the query parametersshould be filled in.
        Only HTM products are returned.
        Where relevant, operations to be performed are returned as HATEOAS links per purchased product.
      tags:
        - Purchased Products
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PurchasedProductsResponse"
              examples:
                getEmptyPurchasedProducts:
                  summary: No purchased products found
                  value:
                    purchasedProducts: {
                       "ovPayProducts":[],
                       "barcodeTickets": [],
                       "vouchers":[]
                      }
                getTwoBarcodePurchasedProductsForDevice:
                  summary: Two BarcodeTicket purchased products, one PendingActivation and one Active
                  description: |-
                    The first ticket (PendingActivation) shows the 30-day range in which the ticket can be activated
                    (using the PATCH endpoint) in the validityStart and validityEnd fields. The second ticket (Active)
                    shows the actual validity period of the ticket after activation.
                  value:
                    {
                      "purchasedProducts":{
                       "ovPayProducts":[],
                       "barcodeTickets":[
                          {
                            "purchasedProductId": "0f0981bf-6d60-4b06-bc55-de1ba325f366",
                            "productId": 14,
                            "name": "HTM 2 uurskaart",
                            "description": "Met deze kaart reis je 2 uur lang onbeperkt met de bussen en trams van HTM. Overstappen is natuurlijk toegestaan!",
                            "status": "PendingActivation",
                            "productCategory":
                              {
                                "productCategoryId": 5,
                                "name": "Barcode",
                              },
                            "orderId": "501B17EF-36C4-4039-B92C-6517969B464E",
                            "orderLineId": "38B17EF-36C4-4039-B92C-4817969B464E",
                            "ticketReference": "KJj43nejhbTxhrfef287",
                            "serviceId": "HTM-4321-7654-7659",
                            "issuedAt": "2026-03-21T09:01:35+01:00",
                            "activatedAt": null,
                            "blocked": false,
                            "cancelledAt": null,
                            "activateBefore": "2026-03-30",
                            "validityStart": null,
                            "validityEnd": null,
                            "barcode": null,
                            "externalDeviceId": "e2be51ae-2701-4803-a2d7-97d4b714482d",
                            "_links": {
                              "get_order": {
                                "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/orders/501B17EF-36C4-4039-B92C-6517969B464E",
                                "method": "GET"
                              },
                              "patch_purchasedproduct": {
                                    "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/purchasedproducts/0f0981bf-6d60-4b06-bc55-de1ba325f366",
                                    "method": "PATCH"
                              }
                            }
                          },
                          {
                            "purchasedProductId": "0f0981bf-6d60-4b06-bc55-de1ba325f366",
                            "productId": 14,
                            "name": "HTM 2 uurskaart",
                            "description": "Met deze kaart reis je 2 uur lang onbeperkt met de bussen en trams van HTM. Overstappen is natuurlijk toegestaan!",
                            "status": "Active",
                            "productCategory":
                              {
                                "productCategoryId": 5,
                                "name": "Barcode",
                              },
                            "orderId": "501B17EF-36C4-4039-B92C-6517969B464E",
                            "orderLineId": "38B17EF-36C4-4039-B92C-4817969B464E",
                            "ticketReference": "KJj43nejhbTxhr897287",
                            "serviceId": "HTM-1234-7654-8945",
                            "issuedAt": "2026-03-21T10:01:12+01:00",
                            "activatedAt": "2026-03-21T12:45:01+01:00",
                            "blocked": false,
                            "cancelledAt": null,
                            "activateBefore": null,
                            "validityStart": "2026-03-21T12:45:01+01:00",
                            "validityEnd": "2026-03-21T14:45:01+01:00",
                            "barcode": "iVBORw0KGgoAAAANSUhEUgAAAVwAAAFcAQAAAACsbTuBAAAFDElEQVR4Xu2bQa6rOhBEGzHwMEtgKewMyM5YCkvIkAGif50yyc/Tl770piZW9HSNywzqVlW3nXcjc83cusxnvsbMjBieuelf/bzGYz1jWCKmeGS+4g5grSwlz/IaI+JgEfzcvzQZo2yhxQgW7wDutLJrvVLzEInbVHLpM/tK5T7kHmNdbxssgqSipQj/0KLA24yqNvEWWRclpJKpefNgE7YZr/lj1eZ55wMYIWkUbZb7Xj/wH+BezvPkFJhQetmD+7AI2VuSEQMevANYESzqZh49VlEXIKOT7SDtseqnpz0Iyc2DJZezkEB5aaVKSvuF5FMwaIdB7wCGOgb5fFgus2wlKhPDpUiTlogr1tsHG7lfzcqYLlVnDHq6ylYn1OE54qd5cNC6aQxL0UQRy2YJJxCS8N4m273Gm4BJFAhzlytb5T4A0QrCYmUTrxd1bYNVgGqqPndH7vHwYqHLHf9cpO1pHJxU3Nq6vUbAVhXaocnTKO5cpK+4AViLitRwf8IQdYFwBkkKW7FzZxNh/AN/g5NHqXyed5MOz45kjkvKofpLYNwBrNBR/Dz9SKpTDkGd8CApZYonT24B7un56XKnoMeXkOBNHqTDk/NOmrrwyfIWYHe51O4kn4FBnfYbnHjqKuw3AGMreKOvC07DCAebHS5lAXWq5eKVA0HjYA2xM0MYCSMnqTqpx48ZVSmPTd15tT03AF+LVBuOgJoMqc2HL6Gy8nr1/K2DU+YpmKerd45fQ2ypzSFyq8coUM2D1yBksNWqOTWnjqvLpVYPvrt17f6BP+AaQk85zR4MarfHbAlSu/XhgGCJNg6mQNmASXnGhpZY+tKp93lywaY+SjcPhroCWx1BHFAnVemR81mdjEikWlllzYNrCM27bKVt7nInLplEnef6SfPFhb19MDmCbewcjtL/d7FwAzCqmShYzMd/qaPnp0AxV+SOpq5xMCnLZJOhZCNCZuIR4BWwL6un4luF5sE9N7CKXIJ2Zecncnt3vZ0it+hN7wNC6+DU/Ene1gj+lOOr4BDGilyT3D74NZ4OlYm2Xmx9t2rJN+kb7P3A/wUzV6lSQaonIoR3DUdy7vR1WQt782CrzrbbvTOdxwu2ZKy4MZXXflPzYJoVLg6GpbIVtLSb2JxduzEg+6Mm+R3AXECaHYRjG4nH2UIak7jSm9zXNQ9OLha2yhbUCT/vOA1VHUAGXpVuhpsHE7H7O0d6d2+i7rxeI2EVVMTm4wZg5vZUV2/nBUmoG5befZ0XERKkNg9O8zR9Rexls+WgldPRmTYHp90BrAIkqqYYnkmNGfvEY1E2Ijeu/3SQLKar1Q/8AX88eDqCRe3wZKJ89sVCRdaTZfvg/u8uFhoH14J0apHvil2rFwrUNtuDcXLOruNdvRoGB9ezgJXP2OrwN+mz8jl9lPab3Ob0NwDbVteFpEuX+7ylbHGdo5Oeny8y4vJgy2DniHhzQQp3c4yCkLwZvPbXk+INwKeqj6grVB/ha+dC88LVfec3zR/q2gYnlyO5GD+Kvfp03unruKCUygJb1e8HmwdbPp2pg8fgr3XYnE6YQGUWUp20Dz6hSgReznmXY3hLJ5A2ozJT9wN/gfVIEbzBsxvdYSneL571OV279S+/jubBiuCzAL5qt5xHPNHMcHgciSuD15rXbYMtJFbE1piEkEi0fPp6AoLX5Lvjt+paBvOIRQjSEEHaCX5BSP4DBSalHh4bB/8DVeIFt2RfPhQAAAAASUVORK5CYII=",
                            "externalDeviceId": "e2be51ae-2701-4803-a2d7-97d4b714482d",
                            "_links": {
                              "get_order": {
                                "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/orders/501B17EF-36C4-4039-B92C-6517969B464E",
                                "method": "GET"
                              }
                            }
                          }
                        ],
                       "vouchers":[]
                      }
                    }
                getSingleOvpayPurchasedProductForSpecificOvPayToken:
                  summary: One Ovpay purchased product
                  value:
                    {
                      "purchasedProducts":{
                       "ovPayProducts":[  {
                            "purchasedProductId": "26d41861-f77e-4666-9cde-2c5c66ace0a2",
                            "productId": 1,
                            "name": "HTM 90% Korting",
                            "status": "Active",
                            "isRenewable": true,
                            "productCategory":
                              {
                                "productCategoryId": 1,
                                "name": "Kortingsabonnement",
                              },
                            "fromInclusive": "2024-11-25T13:25:00+01:00",
                            "untilInclusive": "2024-12-25T03:59:59+01:00",
                            "orderId": "501B17EF-36C4-4039-B92C-6517969B464E",
                            "orderLineId": "38B17EF-36C4-4039-B92C-4817969B464E",
                            "contractId": "56B17EF-C436-9043-B76C-481797WEB464F",
                            "ovPayTokenId": 42,
                            "_links":
                              {
                                "get_order":
                                  {
                                    "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/orders/501B17EF-36C4-4039-B92C-6517969B464E",
                                    "method": "GET",
                                  },
                                "get_contract":
                                  {
                                    "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/contracts/56B17EF-C436-9043-B76C-481797WEB464F",
                                    "method": "GET",
                                  },
                              },
                          },
                          ],
                       "barcodeTickets":[],
                       "vouchers":[]
                      }
                    }
                getSingleVoucherPurchasedProductForCustomer:
                  summary: One voucher purchased product
                  value:
                    {
                      "purchasedProducts":{
                       "ovPayProducts":[],
                       "barcodeTickets":[],
                       "vouchers":[
                          {
                            "purchasedProductId": "07a55d42-ea42-4f5c-896a-b340ab084309",
                            "productId": 81,
                            "name": "HTM ooivaarspas voucher",
                            "productCategory":
                             {
                                "productCategoryId": 9,
                                "name": "Voucher",
                              },
                            "voucherCode": "HTM45253",
                            "fromInclusive": "2026-01-01T00:00:00",
                            "untilInclusive": "2026-12-31T23:59:99",
                            "voucherStatus": {
                              "voucherStatusId": 2,
                              "name": "issued"
                            },
                            "mandatoryCustomerDataItems":
                              [
                                {
                                  "mandatoryCustomerDataItemId": 8,
                                  "customerDataItem": "padBirthDate",
                                },
                                {
                                  "mandatoryCustomerDataItemId": 4,
                                  "customerDataItem": "emailAddress",
                                },
                              ]
                          }
                       ]
                      }
                    }
  /purchasedproducts/{purchasedProductId}:
    parameters:
      - name: X-HTM-JWT-AUTH-HEADER
        in: header
        schema:
          type: string
          example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
        required: false
        description: The JWT of a customer in case of a touchpoint where customer logs in themselves
      - name: X-HTM-CUSTOMER-PROFILE-ID-HEADER
        in: header
        schema:
          type: string
          example: feaaef83-a551-4283-8419-340b1ada3b55
        required: false
        description: The customerProfileId of a customer in the case of the SMP
      - name: X-HTM-ROLE-HEADER
        in: header
        schema:
          type: string
          example: Customer
        required: false
      - name: purchasedProductId
        in: path
        required: true
        style: simple
        description: Id of the purchased product you want to change
        schema:
          type: string
          format: uuid
          example: 0f0981bf-6d60-4b06-bc55-de1ba325f366
    patch:
      summary: Update a purchased product
      description: |-
        Update the given purchased product. Currently only used to activate a barcode ticket.
      tags:
        - Purchased Products
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/unavailable"
            examples:
              Activate a TapConnect purchased product:
                value:
                  {
                    "status": "Active"
                  }
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PurchasedProductsResponse"
              examples:
                Activate a TapConnect purchased product:
                  summary: Activate a TapConnect purchased product
                  value:
                    {
                      "purchasedProducts": {
                        "ovPayProducts": [],
                        "barcodeTickets": [
                          {
                            "purchasedProductId": "0f0981bf-6d60-4b06-bc55-de1ba325f366",
                            "productId": 14,
                            "name": "HTM 2 uurskaart",
                            "description": "Met deze kaart reis je 2 uur lang onbeperkt met de bussen en trams van HTM. Overstappen is natuurlijk toegestaan!",
                            "status": "Active",
                            "productCategory": {
                              "productCategoryId": 5,
                              "name": "Barcode"
                            },
                            "orderId": "501B17EF-36C4-4039-B92C-6517969B464E",
                            "orderLineId": "38B17EF-36C4-4039-B92C-4817969B464E",
                            "ticketReference": "KJj43nejhbTxhr897287",
                            "serviceId": "HTM-1234-7654-8945",
                            "issuedAt": "2026-03-21T10:01:12+01:00",
                            "activatedAt": "2026-03-21T12:45:01+01:00",
                            "blocked": false,
                            "cancelledAt": null,
                            "activateBefore": null,
                            "validityStart": "2026-03-21T12:45:01+01:00",
                            "validityEnd": "2026-03-21T14:45:01+01:00",
                            "barcode": "iVBORw0KGgoAAAANSUhEUgAAAVwAAAFcAQAAAACsbTuBAAAFDElEQVR4Xu2bQa6rOhBEGzHwMEtgKewMyM5YCkvIkAGif50yyc/Tl770piZW9HSNywzqVlW3nXcjc83cusxnvsbMjBieuelf/bzGYz1jWCKmeGS+4g5grSwlz/IaI+JgEfzcvzQZo2yhxQgW7wDutLJrvVLzEInbVHLpM/tK5T7kHmNdbxssgqSipQj/0KLA24yqNvEWWRclpJKpefNgE7YZr/lj1eZ55wMYIWkUbZb7Xj/wH+BezvPkFJhQetmD+7AI2VuSEQMevANYESzqZh49VlEXIKOT7SDtseqnpz0Iyc2DJZezkEB5aaVKSvuF5FMwaIdB7wCGOgb5fFgus2wlKhPDpUiTlogr1tsHG7lfzcqYLlVnDHq6ylYn1OE54qd5cNC6aQxL0UQRy2YJJxCS8N4m273Gm4BJFAhzlytb5T4A0QrCYmUTrxd1bYNVgGqqPndH7vHwYqHLHf9cpO1pHJxU3Nq6vUbAVhXaocnTKO5cpK+4AViLitRwf8IQdYFwBkkKW7FzZxNh/AN/g5NHqXyed5MOz45kjkvKofpLYNwBrNBR/Dz9SKpTDkGd8CApZYonT24B7un56XKnoMeXkOBNHqTDk/NOmrrwyfIWYHe51O4kn4FBnfYbnHjqKuw3AGMreKOvC07DCAebHS5lAXWq5eKVA0HjYA2xM0MYCSMnqTqpx48ZVSmPTd15tT03AF+LVBuOgJoMqc2HL6Gy8nr1/K2DU+YpmKerd45fQ2ypzSFyq8coUM2D1yBksNWqOTWnjqvLpVYPvrt17f6BP+AaQk85zR4MarfHbAlSu/XhgGCJNg6mQNmASXnGhpZY+tKp93lywaY+SjcPhroCWx1BHFAnVemR81mdjEikWlllzYNrCM27bKVt7nInLplEnef6SfPFhb19MDmCbewcjtL/d7FwAzCqmShYzMd/qaPnp0AxV+SOpq5xMCnLZJOhZCNCZuIR4BWwL6un4luF5sE9N7CKXIJ2Zecncnt3vZ0it+hN7wNC6+DU/Ene1gj+lOOr4BDGilyT3D74NZ4OlYm2Xmx9t2rJN+kb7P3A/wUzV6lSQaonIoR3DUdy7vR1WQt782CrzrbbvTOdxwu2ZKy4MZXXflPzYJoVLg6GpbIVtLSb2JxduzEg+6Mm+R3AXECaHYRjG4nH2UIak7jSm9zXNQ9OLha2yhbUCT/vOA1VHUAGXpVuhpsHE7H7O0d6d2+i7rxeI2EVVMTm4wZg5vZUV2/nBUmoG5befZ0XERKkNg9O8zR9Rexls+WgldPRmTYHp90BrAIkqqYYnkmNGfvEY1E2Ijeu/3SQLKar1Q/8AX88eDqCRe3wZKJ89sVCRdaTZfvg/u8uFhoH14J0apHvil2rFwrUNtuDcXLOruNdvRoGB9ezgJXP2OrwN+mz8jl9lPab3Ob0NwDbVteFpEuX+7ylbHGdo5Oeny8y4vJgy2DniHhzQQp3c4yCkLwZvPbXk+INwKeqj6grVB/ha+dC88LVfec3zR/q2gYnlyO5GD+Kvfp03unruKCUygJb1e8HmwdbPp2pg8fgr3XYnE6YQGUWUp20Dz6hSgReznmXY3hLJ5A2ozJT9wN/gfVIEbzBsxvdYSneL571OV279S+/jubBiuCzAL5qt5xHPNHMcHgciSuD15rXbYMtJFbE1piEkEi0fPp6AoLX5Lvjt+paBvOIRQjSEEHaCX5BSP4DBSalHh4bB/8DVeIFt2RfPhQAAAAASUVORK5CYII=",
                            "externalDeviceId": "e2be51ae-2701-4803-a2d7-97d4b714482d",
                            "_links": {
                              "get_order": {
                                "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/orders/501B17EF-36C4-4039-B92C-6517969B464E",
                                "method": "GET"
                              }
                            }
                          }
                        ],
                        "vouchers": []
                      }
                    }
  /customers/devices:
    post:
      summary: Add a new device to a customer profile.
      description: Add a new device to a customer profile.
      tags:
        - Devices
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/unavailable"
            examples:
              Add a new device:
                value:
                  {
                    "externalDeviceId": "dee7d80e-9288-4508-a3ed-c067e619179f",
                    "alias": "My iPhone 13",
                  }
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/unavailable"
              examples:
                New device added to customer profile:
                  value:
                    {
                      "deviceId": "0f0981bf-6d60-4b06-bc55-de1ba325f366",
                      "externalDeviceId": "dee7d80e-9288-4508-a3ed-c067e619179f",
                      "alias": "My iPhone 13",
                    }
  /customers/devices/{deviceId}:
    parameters:
      - name: deviceId
        in: path
        required: true
        style: simple
        description: Id of the device to be deleted.
        schema:
          type: string
          format: uuid
          example: 0f0981bf-6d60-4b06-bc55-de1ba325f366
    patch:
      summary: Update alias of a device in a customer profile.
      description: Update alias of a device in a customer profile.
      tags:
        - Devices
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/unavailable"
            examples:
              Update alias of a device:
                value: { "alias": "My old iPhone 13" }
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/unavailable"
              examples:
                Device alias updated in customer profile:
                  value:
                    {
                      "deviceId": "0f0981bf-6d60-4b06-bc55-de1ba325f366",
                      "externalDeviceId": "dee7d80e-9288-4508-a3ed-c067e619179f",
                      "alias": "My old iPhone 13",
                    }
    delete:
      summary: Delete a device from a customer profile.
      description: Delete a device from a customer profile.
      tags:
        - Devices
      responses:
        "200":
          description: OK
  /customers/tokens/{ovPayTokenId}/activateago:
    parameters:
    - name: ovPayTokenId
      in: path
      required: true
      style: simple
      description: Id of the OvPayToken to activate AGO for.
      schema:
        type: integer
        example: 1
    - name: X-HTM-JWT-AUTH-HEADER
      in: header
      schema:
        type: string
        example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
      required: false
      description: The JWT of a customer in case of touchpoint were customer logs in themselves
    - name: X-HTM-CUSTOMER-PROFILE-ID-HEADER
      in: header
      schema:
        type: integer
        example: 323
      required: false
      description: The id of the customer Profile
    - name: X-HTM-ROLE-HEADER
      in: header
      schema:
        type: string
        example: Customer
      required: false
      description: The role of the HTM employee in the case of the SMP
    post:
      tags:
        - AGO
      summary: Request additional OV-pas security for a token in profile.
      description: Request additional OV-pas security for a token in profile.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ActivateAgoRequest"
            example:
              emailAddress: stasjo@htm.nl
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: "#/components/schemas/EmailPreApprovedResponse"
                  - $ref: "#/components/schemas/EmailNotPreApprovedResponse"
              examples:
                Email preapproved:
                  value:
                    status: Success
                    description: TAT Secured
                Email not preapproved:
                  value:
                    uid: 7594f3ee-cd3d-40a3-8e82-73b90d16c481
                    recipient: xxxxxx.user@gmail.com
                    key: 123456789123456789123456789abcde
                    description: OTP Sent
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
              examples:
                Missing Parameters:
                  value:
                    status: 400
                    title: Missing Mandatory Parameter
                    detail: Required parameter {0} is missing.
                Invalid Parameters:
                  value:
                    status: 400
                    title: Invalid Parameter
                    detail: Required parameter {0} is invalid.
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
              examples:
                Unauthorized:
                  value:
                    status: 401
                    title: Unauthorized
                    detail: Invalid Access Token
        "404":
          description: Not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
              examples:
                TAT not found:
                  value:
                    status: 404
                    title: Not Found
                    detail: TAT Account Not Found
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                TAT Already Secured:
                  value:
                    status: 409
                    title: Conflict
                    detail: TAT Already Secured
        "500":
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
              example:
                error: An unknown error has occurred
  /customers/tokens/{ovPayTokenId}/validateotp:
    parameters:
    - name: ovPayTokenId
      in: path
      required: true
      style: simple
      description: Id of the OvPayToken to verify OTP for.
      schema:
        type: integer
        example: 1
    - name: X-HTM-JWT-AUTH-HEADER
      in: header
      schema:
        type: string
        example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
      required: false
      description: The JWT of a customer in case of touchpoint were customer logs in themselves
    - name: X-HTM-CUSTOMER-PROFILE-ID-HEADER
      in: header
      schema:
        type: integer
        example: 323
      required: false
      description: The id of the customer Profile
    - name: X-HTM-ROLE-HEADER
      in: header
      schema:
        type: string
        example: Customer
      required: false
      description: The role of the HTM employee in the case of the SMP
    post:
      tags:
        - AGO
      summary: Submit an OTP for a triggered OTP flow.
      description: |
        Submit an OTP for a triggered OTP flow. This can either be result of an AGO activation, or
        result of an AGO authorization flow. Since the backoffice behaves slightly different depending 
        on which use case is executed, the calling TP needs to provide an `action` in the request body.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/VerifyOtpRequest"
            examples:
              OTP verification for TAT security activation:
                value:
                  otp: 123456
                  action: secure
              OTP verification for TAT security authorization:
                value:
                  otp: 123456
                  action: authorize  
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VerifyOtpResponse'
              examples:
                Tat Secured:
                  value:
                    status: Success
                    description: TAT Secured
                Tat Unsecured:
                  value:
                    status: Success
                    description: TAT Unsecured
                Tat Authorized:
                  value:
                    status: Success
                    description: TAT Authorized
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
              examples:
                Missing Parameters:
                  value:
                    status: 400
                    title: Missing Mandatory Parameter
                    detail: Required parameter {0} is missing.
                Invalid Parameters:
                  value:
                    status: 400
                    title: Invalid Parameter
                    detail: Required parameter {0} is invalid.
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
              examples:
                Unauthorized:
                  value:
                    status: 401
                    title: Unauthorized
                    detail: Invalid Access Token
        "500":
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
              example:
                error: An unknown error has occurred
components:
  schemas:
    unavailable:
      type: object
    CompareRequest:
      type: object
      properties:
        ovPayTokenId:
          type: integer
          example: 1
          description: When new token is already present in customer profile
        xBOT:
          type: string
          format: uuid
          example: "91641b54-056c-49ea-b598-ccde81d6c45a"
        xTAT:
          type: string
          format: uuid
          example: "4c2d60e2-cd03-4c80-ae70-573a301f0bff"
        serviceReferenceId:
          type: string
          example: "NLOV1234567ABCDEFG"
          description: When provided, amount is also required
        amount:
          type: integer
          example: 100
          description: When provided, serviceReferenceId is also required
        ovpasNumber:
          type: string
          example: "OV34567"
          description: When provided, verificationCode is also required
        verificationCode:
          type: string
          example: "1234"
          description: When provided, ovpasNumber is also required
    TransferRequest:
      type: object
      required:
        - oldOvPayToken
        - newOvPayToken
      properties:
        oldOvPayToken:
          type: object
          properties:
            padOtp:
              type: string
              pattern: ^[0-9]{6}$
              example: "023456"
        newOvPayToken:
          type: object
          properties:
            ovPayTokenId:
              type: integer
              example: 1
              description: When new token is already present in customer profile
            xBOT:
              type: string
              format: uuid
              example: "91641b54-056c-49ea-b598-ccde81d6c45a"
            xTAT:
              type: string
              format: uuid
              example: "4c2d60e2-cd03-4c80-ae70-573a301f0bff"
            serviceReferenceId:
              type: string
              example: "NLOV1234567ABCDEFG"
              description: When provided, amount is also required
            amount:
              type: integer
              example: 100
              description: When provided, serviceReferenceId is also required
            padOtp:
              type: string
              pattern: ^[0-9]{6}$
              example: "123456"
              description: Can be xTAT-based OTP (for existing PAD), or email-based OTP (for new PAD). In the latter case, padEmailAddress should be the same address as used for the OTP!
            padEmailAddress:
              type: string
              format: email
              example: 8Z9dG@example.com
            alias:
              type: string
              example: MyNewToken
    CustomersResponseList:
      type: object
      properties:
        customers:
          type: array
          items:
            $ref: "#/components/schemas/CustomersResponse"
    CustomersResponse:
      type: object
      properties:
        customerProfileId:
          type: integer
          example: 1
        customerPreference:
          $ref: "#/components/schemas/getCustomerPreference"
        customerNumber:
          type: integer
          example: 1000001
        customerStatus:
          type: object
          properties:
            customerStatusId:
              type: integer
              example: 1
            name:
              type: string
              example: Active
        debtorNumber:
          type: string
          example: DB100001
        debtorStatus:
          type: object
          properties:
            debtorStatusId:
              type: integer
              example: 1
            name:
              type: string
              example: Active
        person:
          type: object
          properties:
            prefix:
              type: string
              example: Mr
            birthname:
              type: string
              example: John
            surname:
              type: string
              example: Doe
            suffix:
              type: string
              example: Jr.
            dateOfBirth:
              type: string
              format: date
              example: "2023-02-01"
            emailAddress:
              type: string
              format: email
              example: 4j2dD@example.com
            addresses:
              type: array
              items:
                type: object
                properties:
                  addressId:
                    type: integer
                    example: 1
                  addressType:
                    type: object
                    properties:
                      addressTypeId:
                        type: integer
                        example: 1
                      name:
                        type: string
                        example: Shipping
                  street:
                    type: string
                    example: Appelstraat
                  houseNumber:
                    type: integer
                    example: 1
                  houseNumberSuffix:
                    type: string
                    example: BS
                  postalCode:
                    type: string
                    example: 1234AB
                  city:
                    type: string
                    example: Den Haag
                  country:
                    type: string
                    example: NL
            phones:
              type: array
              items:
                type: object
                properties:
                  phoneId:
                    type: integer
                    example: 1
                  isPreferred:
                    type: boolean
                    example: true
                  phoneType:
                    type: object
                    properties:
                      phoneTypeId:
                        type: integer
                        example: 1
                      name:
                        type: string
                        example: Home
                  number:
                    type: string
                    example: "0123456789"
                  countryCode:
                    type: string
                    example: "0031"
            devices:
              type: array
              items:
                type: object
                properties:
                  deviceId:
                    type: string
                    format: uuid
                    example: 1
                  externalDeviceId:
                    type: string
                    format: uuid
                    example: dee7d80e-9288-4508-a3ed-c067e619179f
                  alias:
                    type: string
                    example: My iPhone 13
                  _links:
                    type: object
                    properties:
                      add_device:
                        type: object
                        properties:
                          href:
                            type: string
                            example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/devices
                          method:
                            type: string
                            example: POST
                      edit_device:
                        type: object
                        properties:
                          href:
                            type: string
                            example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/devices/1
                          method:
                            type: string
                            example: PATCH
                      delete_device:
                        type: object
                        properties:
                          href:
                            type: string
                            example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/devices/1
                          method:
                            type: string
                            example: DELETE
        _links:
          type: object
          properties:
            self:
              type: object
              properties:
                href:
                  type: string
                  example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers
                method:
                  type: string
                  example: GET
            partial_edit:
              type: object
              properties:
                href:
                  type: string
                  example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers
                method:
                  type: string
                  example: PATCH
            get_tokens:
              type: object
              properties:
                href:
                  type: string
                  example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens
                method:
                  type: string
                  example: GET
            create_token:
              type: object
              properties:
                href:
                  type: string
                  example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens
                method:
                  type: string
                  example: POST
    customerPreferencesEntity:
      type: object
      properties:
        customerPreferenceId:
          type: integer
        languageId:
          type: integer
    customerStatusEntity:
      type: object
      properties:
        customerStatusId:
          type: integer
    OvPayTokensResponse:
      type: object
      required:
        - ovPayTokens
      properties:
        ovPayTokens:
          type: array
          items:
            type: object
            properties:
              ovPayTokenId:
                type: integer
                example: 1
              tokenType:
                type: object
                properties:
                  tokenTypeId:
                    type: integer
                    example: 1
                  name:
                    type: string
                    example: EMV
              alias:
                type: string
                example: MyToken
              tokenStatus:
                type: object
                properties:
                  tokenStatusId:
                    type: integer
                    example: 1
                  name:
                    type: string
                    example: Active
              expirationDate:
                type: string
                format: date
                example: "2023-02-01"
              replacedByTokenId:
                type: integer
                example: 1
              _links:
                type: object
                properties:
                  self:
                    type: object
                    properties:
                      href:
                        type: string
                        example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1
                      method:
                        type: string
                        example: GET
                  partial_edit:
                    type: object
                    description: External touchpoints are only allowed to change alias - SMP can also change tokenStatus
                    properties:
                      href:
                        type: string
                        example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1
                      method:
                        type: string
                        example: PATCH
                  replace_token:
                    type: object
                    properties:
                      href:
                        type: string
                        example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1/replace
                      method:
                        type: string
                        example: POST
                  delete_token:
                    type: object
                    properties:
                      href:
                        type: string
                        example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1
                      method:
                        type: string
                        example: DELETE
                  get_productinstances:
                    type: object
                    properties:
                      href:
                        type: string
                        example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1/productinstances
                      method:
                        type: string
                        example: GET
                  get_trips:
                    type: object
                    properties:
                      href:
                        type: string
                        example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1/trips
                      method:
                        type: string
                        example: GET
    OvPayTokenProductInstancesResponse:
      type: object
      properties:
        productInstances:
          type: array
          items:
            type: object
            properties:
              productId:
                type: integer
                example: 1
              name:
                type: string
                example: HTM 90% Korting
              status:
                type: string
                enum: ["Active", "Ended", "Refunded"]
                example: Active
              isRenewable:
                type: boolean
                example: true
              productCategory:
                type: object
                description: The category of the originating HTM product definition
                properties:
                  productCategoryId:
                    type: integer
                    example: 1
                  name:
                    type: string
                    example: Kortingsabonnement
              fromInclusive:
                type: string
                format: date-time-offset
                example: "2024-11-25T13:25:00+01:00"
              untilInclusive:
                type: string
                format: date-time-offset
                description: >-
                  If not present, this product-instance represents a subscription/contract without a real end date. If present, it can be either the natural end date or the refund timestamp.
                example: "2024-12-25T03:59:59+01:00"
              orderId:
                type: string
                format: uuid
                example: 501B17EF-36C4-4039-B92C-6517969B464E
              orderLineId:
                type: string
                format: uuid
                example: 38B17EF-36C4-4039-B92C-4817969B464E
              contractId:
                type: string
                format: uuid
                example: 56B17EF-C436-9043-B76C-481797WEB464F
                description: Only present for subscriptions/contracts
              _links:
                type: object
                properties:
                  self:
                    type: object
                    properties:
                      href:
                        type: string
                        example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1/productinstances
                      method:
                        type: string
                        example: GET
                  get_order:
                    type: object
                    properties:
                      href:
                        type: string
                        description: Always present for any HTM product-instance
                        example: https://api.integratielaag.nl/abt/touchpoint/1.0/orders/501B17EF-36C4-4039-B92C-6517969B464E
                      method:
                        type: string
                        example: GET
                  get_contract:
                    type: object
                    properties:
                      href:
                        type: string
                        description: Only present for subscriptions/contracts
                        example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/contracts/56B17EF-C436-9043-B76C-481797WEB464F
                      method:
                        type: string
                        example: GET
    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
    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
    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
    PurchasedProductsResponse:
      type: object
      required:
        - purchasedProducts
      properties:
        purchasedProducts:
          type: object
          required:
            - ovPayProducts
            - barcodeTickets
            - vouchers
          properties:
            ovPayProducts:
              type: array
              items:
                type: object
                required:
                  - purchasedProductId
                  - productId
                  - name
                  - status
                  - isRenewable
                  - productCategory
                  - fromInclusive
                  - orderId
                  - orderLineId
                  - _links
                properties:
                  purchasedProductId:
                    type: string
                    format: uuid
                    example: 0f0981bf-6d60-4b06-bc55-de1ba325f366
                  productId:
                    type: integer
                    example: 1
                  name:
                    type: string
                    example: HTM 90% Korting
                  status:
                    type: string
                    enum: ["Active", "Ended", "Refunded"]
                    example: Active
                  isRenewable:
                    type: boolean
                    example: true
                  productCategory:
                    type: object
                    description: The category of the originating HTM product definition
                    properties:
                      productCategoryId:
                        type: integer
                        example: 1
                      name:
                        type: string
                        example: Kortingsabonnement
                  fromInclusive:
                    type: string
                    format: date-time-offset
                    example: "2024-11-25T13:25:00+01:00"
                  untilInclusive:
                    type: string
                    format: date-time-offset
                    description: >-
                      If not present, this purchased product represents a subscription/contract without a real end date. If present, it can be either the natural end date or the refund timestamp.
                    example: "2024-12-25T03:59:59+01:00"
                  orderId:
                    type: string
                    format: uuid
                    example: 501B17EF-36C4-4039-B92C-6517969B464E
                  orderLineId:
                    type: string
                    format: uuid
                    example: 38B17EF-36C4-4039-B92C-4817969B464E
                  contractId:
                    type: string
                    format: uuid
                    example: 56B17EF-C436-9043-B76C-481797WEB464F
                    description: Only present for subscriptions/contracts
                  _links:
                    type: object
                    properties:
                      self:
                        type: object
                        properties:
                          href:
                            type: string
                            example: https://api.integratielaag.nl/abt/touchpoint/1.0/purchasedproducts
                          method:
                            type: string
                            example: GET
                      get_order:
                        type: object
                        properties:
                          href:
                            type: string
                            description: Always present for any HTM purchased product
                            example: https://api.integratielaag.nl/abt/touchpoint/1.0/orders/501B17EF-36C4-4039-B92C-6517969B464E
                          method:
                            type: string
                            example: GET
                      get_contract:
                        type: object
                        properties:
                          href:
                            type: string
                            description: Only present for subscriptions/contracts
                            example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/contracts/56B17EF-C436-9043-B76C-481797WEB464F
                          method:
                            type: string
                            example: GET
            barcodeTickets:
              type: array
              items:
                type: object
                required:
                  - purchasedProductId
                  - productId
                  - name
                  - description
                  - status
                  - productCategory
                  - orderId
                  - orderLineId
                  - ticketReference
                  - serviceId
                  - issuedAt
                  - blocked
                  - _links
                properties:
                  purchasedProductId:
                    type: string
                    format: uuid
                    example: 0f0981bf-6d60-4b06-bc55-de1ba325f366
                  productId:
                    type: integer
                    example: 1
                  name:
                    type: string
                    example: HTM 2 uurskaart
                    description: |-
                      The name of the originating HTM product definition.
                      Will be returned in the language as specified in the Accept-Language header or the customer profile. Otherwise defaults to NL.
                  description:
                    type: string
                    example: "Met deze kaart reis je 2 uur lang onbeperkt met de bussen en trams van HTM. Overstappen is natuurlijk toegestaan!"
                    description: |-
                      The description of the originating HTM product definition.
                      Will be returned in the language as specified in the Accept-Language header or the customer profile. Otherwise defaults to NL.
                  status:
                    type: string
                    enum: ["PendingActivation", "Active", "Ended", "Blocked", "Refunded"]
                    example: Active
                    description: |-
                      The status of the barcode ticket.
                      - PendingActivation: The ticket is in the validity range (activateBefore is in the future) and can be activated using the PATCH endpoint
                      - Active: The ticket has been activated and can be used for travel within the validity range as denoted by the validityStart and validityEnd fields
                      - Ended: The ticket is no longer active (validityEnd and/or activateBefore are in the past) and cannot be used for travel
                      - Blocked: The ticket is blocked and cannot be used for travel
                      - Refunded: The ticket is refunded and cannot be used for travel
                  productCategory:
                    type: object
                    description: The category of the originating HTM product definition
                    properties:
                      productCategoryId:
                        type: integer
                        example: 5
                      name:
                        type: string
                        example: Barcode
                  orderId:
                    type: string
                    format: uuid
                    example: 501B17EF-36C4-4039-B92C-6517969B464E
                  orderLineId:
                    type: string
                    format: uuid
                    example: 38B17EF-36C4-4039-B92C-4817969B464E
                  ticketReference:
                    type: string
                    example: KJj43nejhbTxhr897287
                  serviceId:
                    type: string
                    example: HTM-1234-7654-8945
                  issuedAt:
                    type: string
                    format: date-time-offset
                    example: "2024-11-25T13:25:00+01:00"
                  activatedAt:
                    type: string
                    format: date-time-offset
                    description: Only present for active and ended barcode tickets
                    example: "2024-11-25T13:25:00+01:00"
                  blocked:
                    type: boolean
                    example: false
                  cancelledAt:
                    type: string
                    format: date-time-offset
                    example: "2024-11-25T13:25:00+01:00"
                  activateBefore:
                    type: string
                    format: date
                    example: "2024-11-30"
                    description: Only present for barcode tickets that are not yet activated. Tickets can only be activated BEFORE this date.
                  validityStart:
                    description: |-
                      Only present for barcode tickets that have been activated. The date-time at which the ticket will become valid for traveling.
                      The ticket will not be valid before this date/time.
                    type: string
                    format: date-time-offset
                    example: "2024-11-25T13:25:00+01:00"
                  validityEnd:
                    description: |-
                      Only present for barcode tickets that have been activated. The date-time at which the ticket will become invalid for traveling.
                      The ticket will not be valid after this date/time.
                    type: string
                    format: date-time-offset
                    example: "2024-11-25T15:25:00+01:00"
                  barcode:
                    type: string
                    format: base64
                    description: Base64 encoded barcode image of type `image/png`. Might not be present for barcode tickets that are not yet activated.
                    example: iVBORw0KGgoAAAANSUhEUgAAAVwAAAFcAQAAAACsbTuBAAAFDElEQVR4Xu2bQa6rOhBEGzHwMEtgKewMyM5YCkvIkAGif50yyc/Tl770piZW9HSNywzqVlW3nXcjc83cusxnvsbMjBieuelf/bzGYz1jWCKmeGS+4g5grSwlz/IaI+JgEfzcvzQZo2yhxQgW7wDutLJrvVLzEInbVHLpM/tK5T7kHmNdbxssgqSipQj/0KLA24yqNvEWWRclpJKpefNgE7YZr/lj1eZ55wMYIWkUbZb7Xj/wH+BezvPkFJhQetmD+7AI2VuSEQMevANYESzqZh49VlEXIKOT7SDtseqnpz0Iyc2DJZezkEB5aaVKSvuF5FMwaIdB7wCGOgb5fFgus2wlKhPDpUiTlogr1tsHG7lfzcqYLlVnDHq6ylYn1OE54qd5cNC6aQxL0UQRy2YJJxCS8N4m273Gm4BJFAhzlytb5T4A0QrCYmUTrxd1bYNVgGqqPndH7vHwYqHLHf9cpO1pHJxU3Nq6vUbAVhXaocnTKO5cpK+4AViLitRwf8IQdYFwBkkKW7FzZxNh/AN/g5NHqXyed5MOz45kjkvKofpLYNwBrNBR/Dz9SKpTDkGd8CApZYonT24B7un56XKnoMeXkOBNHqTDk/NOmrrwyfIWYHe51O4kn4FBnfYbnHjqKuw3AGMreKOvC07DCAebHS5lAXWq5eKVA0HjYA2xM0MYCSMnqTqpx48ZVSmPTd15tT03AF+LVBuOgJoMqc2HL6Gy8nr1/K2DU+YpmKerd45fQ2ypzSFyq8coUM2D1yBksNWqOTWnjqvLpVYPvrt17f6BP+AaQk85zR4MarfHbAlSu/XhgGCJNg6mQNmASXnGhpZY+tKp93lywaY+SjcPhroCWx1BHFAnVemR81mdjEikWlllzYNrCM27bKVt7nInLplEnef6SfPFhb19MDmCbewcjtL/d7FwAzCqmShYzMd/qaPnp0AxV+SOpq5xMCnLZJOhZCNCZuIR4BWwL6un4luF5sE9N7CKXIJ2Zecncnt3vZ0it+hN7wNC6+DU/Ene1gj+lOOr4BDGilyT3D74NZ4OlYm2Xmx9t2rJN+kb7P3A/wUzV6lSQaonIoR3DUdy7vR1WQt782CrzrbbvTOdxwu2ZKy4MZXXflPzYJoVLg6GpbIVtLSb2JxduzEg+6Mm+R3AXECaHYRjG4nH2UIak7jSm9zXNQ9OLha2yhbUCT/vOA1VHUAGXpVuhpsHE7H7O0d6d2+i7rxeI2EVVMTm4wZg5vZUV2/nBUmoG5befZ0XERKkNg9O8zR9Rexls+WgldPRmTYHp90BrAIkqqYYnkmNGfvEY1E2Ijeu/3SQLKar1Q/8AX88eDqCRe3wZKJ89sVCRdaTZfvg/u8uFhoH14J0apHvil2rFwrUNtuDcXLOruNdvRoGB9ezgJXP2OrwN+mz8jl9lPab3Ob0NwDbVteFpEuX+7ylbHGdo5Oeny8y4vJgy2DniHhzQQp3c4yCkLwZvPbXk+INwKeqj6grVB/ha+dC88LVfec3zR/q2gYnlyO5GD+Kvfp03unruKCUygJb1e8HmwdbPp2pg8fgr3XYnE6YQGUWUp20Dz6hSgReznmXY3hLJ5A2ozJT9wN/gfVIEbzBsxvdYSneL571OV279S+/jubBiuCzAL5qt5xHPNHMcHgciSuD15rXbYMtJFbE1piEkEi0fPp6AoLX5Lvjt+paBvOIRQjSEEHaCX5BSP4DBSalHh4bB/8DVeIFt2RfPhQAAAAASUVORK5CYII=
                  externalDeviceId:
                    type: string
                    example: e2be51ae-2701-4803-a2d7-97d4b714482d
                  _links:
                    type: object
                    properties:
                      self:
                        type: object
                        properties:
                          href:
                            type: string
                            example: https://api.integratielaag.nl/abt/touchpoint/1.0/purchasedproducts
                          method:
                            type: string
                            example: GET
                      get_order:
                        type: object
                        properties:
                          href:
                            type: string
                            description: Always present for any HTM purchased product
                            example: https://api.integratielaag.nl/abt/touchpoint/1.0/orders/501B17EF-36C4-4039-B92C-6517969B464E
                          method:
                            type: string
                            example: GET
                      patch_purchasedproduct:
                        type: object
                        properties:
                          href:
                            type: string
                            description: Only present for purchased products that are PATCHable
                            example: https://api.integratielaag.nl/abt/touchpoint/1.0/purchasedproducts/56B17EF-C436-9043-B76C-481797WEB464F
                          method:
                            type: string
                            example: PATCH
            vouchers:
              type: array
              items:
                type: object
                required:
                  - purchasedProductId
                  - productId
                  - name
                  - productCategory
                  - voucherCode
                  - fromInclusive
                  - voucherStatus
                properties:
                  purchasedProductId:
                    type: string
                    format: uuid
                    example: 0f0981bf-6d60-4b06-bc55-de1ba325f366
                  productId:
                    type: integer
                    example: 81
                  name:
                    type: string
                    example: HTM ooivaarspas voucher
                  productCategory:
                    type: object
                    description: The category of the originating HTM product definition
                    properties:
                      productCategoryId:
                        type: integer
                        example: 6
                      name:
                        type: string
                        example: Voucher
                  voucherCode:
                    type: string
                    example: HKV-A7J-128-PYT
                  fromInclusive:
                    type: string
                    format: date-time-offset
                    example: "2024-11-25T13:25:00+01:00"
                  untilInclusive:
                    type: string
                    format: date-time-offset
                    example: "2024-12-25T03:59:59+01:00"
                  voucherStatus:
                    type: object
                    properties:
                      voucherStatusId:
                        type: integer
                        example: 2
                      name:
                        type: string
                        example: issued
                  mandatoryCustomerDataItems:
                    type: array
                    items:
                      type: object
                      properties:
                        mandatoryCustomerDataItemId:
                          type: integer
                          example: 4
                        customerDataItem:
                          type: string
                          example: emailAddress
    GenerateTatOutput:
      type: object
      properties:
        uid:
          type: string
          description: >-
            An uid IS A unique identifier THAT is associated with the
            user.
        recipient:
          type: string
          description: >-
            A recipient IS A unique identifier THAT is associated with the
            TAT owner.
        key:
          type: string
          description: >-
            A key IS a 32 character string THAT uniquely identifies the
            OTP session.
    EmailPreApprovedResponse:
      type: object
      description: >-
        AN EmailPreApprovedResponse IS AN object THAT represents the response of
        email pre-approval check.
      properties:
        status:
          type: string
          description: >-
            A status IS A boolean THAT indicates that the provided email address
            is pre-approved by the calling client app/web.
          example: Success
        description:
          type: string
          description: >-
            A description IS A string THAT provides additional information
            relating to the aprroval result
          example: TAT Secured
    EmailNotPreApprovedResponse:
      type: object
      description: >-
        EmailNotPreApprovedResponse IS AN object THAT represents the response of
        email pre-approval check.
      properties:
        uid:
          type: string
          description: A uid IS A unique identifier THAT is associated with the user.
          example: 7594f3ee-cd3d-40a3-8e82-73b90d16c481
        recipient:
          type: string
          description: >-
            A recipient IS A unique identifier THAT is associated with the TAT
            owner.
          example: xxxxxx.user@gmail.com
        key:
          type: string
          description: >-
            A key IS a 32 character string THAT uniquely identifies the OTP
            session.
          example: 123456789123456789123456789abcde
        description:
          type: string
          description: >-
            A description IS A string THAT describes the reason why the email is
            not pre-approved.
          example: OTP Sent
    ActivateAgoRequest:
      type: object
      properties:
        emailAddress:
          type: string
          format: email
          example: stasjo@htm.nl
    VerifyOtpRequest:
      type: object
      properties:
        emailAddress:
          type: string
          example: 123456
        action:
          type: string
          example: secure
    VerifyOtpResponse:
      type: object
      properties:
        status:
          type: string
          example: Success
        description: 
          type: string
          example: TAT Secured
    ErrorResponse:
      description: Default response when an invalid request has been sent
      type: object
      properties:
        status:
          type: integer
          description: >-
            A status IS An integer that represents the HTTP status code of the
            response.
          example: 400
        title:
          type: string
          description: A title IS A string that provides a brief summary of the error.
        detail:
          type: string
          description: A detail IS A string that provides more details about the error.