From f5bf3d62defa404a1d8acb9b2067264389074509 Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Fri, 5 Sep 2025 16:17:31 +0200 Subject: [PATCH 1/5] OVPAY-2018 - Added endpoints and examples for Customer Devices. --- src/openapi/customers/customers-crud-v2.yaml | 269 +++++++++++++++++-- 1 file changed, 246 insertions(+), 23 deletions(-) diff --git a/src/openapi/customers/customers-crud-v2.yaml b/src/openapi/customers/customers-crud-v2.yaml index 322d118..c08ede4 100644 --- a/src/openapi/customers/customers-crud-v2.yaml +++ b/src/openapi/customers/customers-crud-v2.yaml @@ -278,6 +278,13 @@ paths: phoneTypeId: 2 name: Work isPreferred: false + devices: + - deviceId: "5bedce29-af0c-4f3c-b182-2caa8a1f9377" + externalDeviceId: "c5545584-04af-4c60-a955-d6a70baab848" + alias: "iPhone prive" + - deviceId: "d7683e89-b2ad-4e79-85b3-dbb42aad0325" + externalDeviceId: "7122a988-a00a-417d-a5b4-da2d91354976" + alias: "iPhone zakelijk" ovChipcards: - ovChipCardId: 1 chipCardNumber: "1234123412341234" @@ -404,6 +411,13 @@ paths: phoneTypeId: 2 name: Work isPreferred: false + devices: + - deviceId: "5bedce29-af0c-4f3c-b182-2caa8a1f9377" + externalDeviceId: "c5545584-04af-4c60-a955-d6a70baab848" + alias: "iPhone prive" + - deviceId: "d7683e89-b2ad-4e79-85b3-dbb42aad0325" + externalDeviceId: "7122a988-a00a-417d-a5b4-da2d91354976" + alias: "iPhone zakelijk" ovChipcards: - ovChipCardId: 1 chipCardNumber: "1234123412341234" @@ -543,6 +557,13 @@ paths: phoneTypeId: 2 name: Work isPreferred: false + devices: + - deviceId: "5bedce29-af0c-4f3c-b182-2caa8a1f9377" + externalDeviceId: "c5545584-04af-4c60-a955-d6a70baab848" + alias: "iPhone prive" + - deviceId: "d7683e89-b2ad-4e79-85b3-dbb42aad0325" + externalDeviceId: "7122a988-a00a-417d-a5b4-da2d91354976" + alias: "iPhone zakelijk" ovChipcards: - ovChipCardId: 1 chipCardNumber: "1234123412341234" @@ -677,6 +698,13 @@ paths: phoneTypeId: 2 name: Work isPreferred: false + devices: + - deviceId: "5bedce29-af0c-4f3c-b182-2caa8a1f9377" + externalDeviceId: "c5545584-04af-4c60-a955-d6a70baab848" + alias: "iPhone prive" + - deviceId: "d7683e89-b2ad-4e79-85b3-dbb42aad0325" + externalDeviceId: "7122a988-a00a-417d-a5b4-da2d91354976" + alias: "iPhone zakelijk" ovChipcards: - ovChipCardId: 1 chipCardNumber: "1234123412341234" @@ -823,6 +851,11 @@ paths: countryCode: "+31" phoneTypeId: 2 isPreferred: false + devices: + - externalDeviceId: "c5545584-04af-4c60-a955-d6a70baab848" + alias: "iPhone prive" + - externalDeviceId: "7122a988-a00a-417d-a5b4-da2d91354976" + alias: "iPhone zakelijk" required: true responses: 201: @@ -1027,7 +1060,7 @@ paths: /customers/{customerProfileId}/addresses: post: tags: - - Customer address + - Addresses summary: Add a customer address description: >- @@ -1069,7 +1102,7 @@ paths: /addresses/{addressId}: patch: tags: - - Customer address + - Addresses summary: Edit a customer address description: >- @@ -1109,7 +1142,7 @@ paths: x-throttling-tier: Unlimited delete: tags: - - Customer address + - Addresses summary: Delete a customer address description: >- @@ -1132,8 +1165,8 @@ paths: /customers/{customerProfileId}/phones: post: tags: - - Customer phoneNumber - summary: Add a customer phonenumber + - Phones + summary: Add a customer phone description: >- parameters: @@ -1171,8 +1204,8 @@ paths: /phones/{phoneId}: patch: tags: - - Customer phoneNumber - summary: Edit a customer phonenumber + - Phones + summary: Edit a customer phone description: >- parameters: @@ -1213,7 +1246,7 @@ paths: x-throttling-tier: Unlimited delete: tags: - - Customer phoneNumber + - Phones summary: Delete a customer phone description: >- @@ -1233,12 +1266,202 @@ paths: - default: [] x-auth-type: Application & Application User x-throttling-tier: Unlimited + /devices: + get: + tags: + - Devices + summary: Find devices. + description: Find devices. + parameters: + - in: query + name: deviceId + schema: + type: string + format: uuid + example: 5bedce29-af0c-4f3c-b182-2caa8a1f9377 + required: false + description: The id of the device. + - in: query + name: externalDeviceId + schema: + type: string + format: uuid + example: c5545584-04af-4c60-a955-d6a70baab848 + required: false + description: The external id of the device. + - in: query + name: alias + schema: + type: string + example: iPhone prive + required: false + description: The alias of the device. + - in: query + name: customerProfileId + schema: + type: integer + example: 1 + required: false + description: The id of the customer profile. + - name: sort + in: query + schema: + type: string + - name: offset + in: query + schema: + type: integer + - name: limit + in: query + schema: + type: integer + example: 20 + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "devices": + [ + { + "deviceId": "5bedce29-af0c-4f3c-b182-2caa8a1f9377", + "externalDeviceId": "c5545584-04af-4c60-a955-d6a70baab848", + "alias": "iPhone prive", + "customerProfileId": 1 + }, + { + "deviceId": "d7683e89-b2ad-4e79-85b3-dbb42aad0325", + "externalDeviceId": "7122a988-a00a-417d-a5b4-da2d91354976", + "alias": "iPhone zakelijk", + "customerProfileId": 1 + } + ], + "_links": + { + "self": + { + "href": "https://api.integratielaag.nl/abt/abtcustomers/2.0/devices?offset=20", + "method": "GET", + }, + "prev": + { + "href": "https://api.integratielaag.nl/abt/abtcustomers/2.0/devices", + "method": "GET", + }, + "next": + { + "href": "https://api.integratielaag.nl/abt/abtcustomers/2.0/devices?offset=40", + "method": "GET", + }, + }, + } + /customers/{customerProfileId}/devices: + post: + tags: + - Devices + summary: Add a customer device + description: >- + + parameters: + - name: customerProfileId + in: path + required: true + schema: + type: integer + example: 1 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + examples: + customerDevice: + value: + device: + externalDeviceId: "c5545584-04af-4c60-a955-d6a70baab848" + alias: "iPhone prive" + required: true + responses: + 201: + description: Successfully created a customer device + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + security: + - default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited + /devices/{deviceId}: + patch: + tags: + - Devices + summary: Edit a customer device + description: >- + + parameters: + - name: deviceId + in: path + required: true + schema: + type: string + format: uuid + example: 5bedce29-af0c-4f3c-b182-2caa8a1f9377 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + examples: + updateDevice: + value: + device: + alias: "iPhone zakelijk" + required: true + responses: + 200: + description: Successfully modified a customer device + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + security: + - default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited + delete: + tags: + - Devices + summary: Delete a customer device + description: >- + + parameters: + - name: deviceId + in: path + required: true + schema: + type: string + format: uuid + example: 5bedce29-af0c-4f3c-b182-2caa8a1f9377 + responses: + 200: + description: Successfully deleted a customer device + content: + application/json: {} + security: + - default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited /ovpaytokens: get: tags: - - Ovpay Token - summary: Find ovpay tokens. - description: Find ovpay tokens. + - OVpay Tokens + summary: Find OVpay tokens. + description: Find OVpay tokens. parameters: - in: query name: ovPayTokenId @@ -1389,8 +1612,8 @@ paths: /customers/{customerProfileId}/ovpaytokens: post: tags: - - Ovpay Token - summary: Create a new ovpay token + - OVpay Tokens + summary: Create a new OVpay token description: >- parameters: @@ -1440,8 +1663,8 @@ paths: /ovpaytokens/{ovpaytokenId}: patch: tags: - - Ovpay Token - summary: Update an ovpay token + - OVpay Tokens + summary: Update an OVpay token description: >- parameters: @@ -1491,8 +1714,8 @@ paths: x-throttling-tier: Unlimited delete: tags: - - Ovpay Token - summary: Delete an ovpay token + - OVpay Tokens + summary: Delete an OVpay token description: >- parameters: @@ -1514,8 +1737,8 @@ paths: /customers/{customerProfileId}/ovchipcards: post: tags: - - Ovchipcard - summary: Create a new ovchipcard + - OV Chipcards + summary: Create a new OV chipcard description: >- parameters: @@ -1552,8 +1775,8 @@ paths: /ovchipcards/{ovchipcardId}: patch: tags: - - Ovchipcard - summary: Update an ovchipcard + - OV Chipcards + summary: Update an OV chipcard description: >- parameters: @@ -1587,8 +1810,8 @@ paths: x-throttling-tier: Unlimited delete: tags: - - Ovchipcard - summary: Delete an ovchipcard + - OV Chipcards + summary: Delete an OV chipcard description: >- parameters: From 11add823da6b39ec5753d82fa665af64347385a8 Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Mon, 8 Sep 2025 12:02:15 +0200 Subject: [PATCH 2/5] OVPAY-2018 - Added schemas. --- src/openapi/customers/customers-crud-v2.yaml | 92 +++++++++++++++++--- 1 file changed, 79 insertions(+), 13 deletions(-) diff --git a/src/openapi/customers/customers-crud-v2.yaml b/src/openapi/customers/customers-crud-v2.yaml index c08ede4..2bbaa38 100644 --- a/src/openapi/customers/customers-crud-v2.yaml +++ b/src/openapi/customers/customers-crud-v2.yaml @@ -1281,6 +1281,13 @@ paths: example: 5bedce29-af0c-4f3c-b182-2caa8a1f9377 required: false description: The id of the device. + - in: query + name: customerProfileId + schema: + type: integer + example: 1 + required: false + description: The id of the customer profile. - in: query name: externalDeviceId schema: @@ -1296,13 +1303,6 @@ paths: example: iPhone prive required: false description: The alias of the device. - - in: query - name: customerProfileId - schema: - type: integer - example: 1 - required: false - description: The id of the customer profile. - name: sort in: query schema: @@ -1322,22 +1322,22 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" + $ref: "#/components/schemas/getDevicesResponse" example: { "devices": [ { + "customerProfileId": 1, "deviceId": "5bedce29-af0c-4f3c-b182-2caa8a1f9377", "externalDeviceId": "c5545584-04af-4c60-a955-d6a70baab848", "alias": "iPhone prive", - "customerProfileId": 1 }, { + "customerProfileId": 1, "deviceId": "d7683e89-b2ad-4e79-85b3-dbb42aad0325", "externalDeviceId": "7122a988-a00a-417d-a5b4-da2d91354976", "alias": "iPhone zakelijk", - "customerProfileId": 1 } ], "_links": @@ -1377,7 +1377,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" + $ref: "#/components/schemas/postCustomerDevice" examples: customerDevice: value: @@ -1391,7 +1391,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" + $ref: "#/components/schemas/getDevices" security: - default: [] x-auth-type: Application & Application User @@ -1415,7 +1415,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" + $ref: "#/components/schemas/patchCustomerDevice" examples: updateDevice: value: @@ -2402,6 +2402,10 @@ components: type: array items: $ref: "#/components/schemas/getPhones" + devices: + type: array + items: + $ref: "#/components/schemas/getDevices" getAddresses: type: object properties: @@ -2448,6 +2452,21 @@ components: type: integer name: type: string + getDevices: + type: object + properties: + deviceId: + type: string + format: uuid + externalDeviceId: + type: string + format: uuid + alias: + type: string + required: + - deviceId + - externalDeviceId + - alias getCustomerPreference: type: object properties: @@ -2552,6 +2571,17 @@ components: type: integer isPreferred: type: boolean + devicePostEntity: + required: + - externalDeviceId + - alias + type: object + properties: + externalDeviceId: + type: string + format: uuid + alias: + type: string defaultCustomerProfileResponse: type: object properties: @@ -2575,6 +2605,10 @@ components: type: array items: $ref: "#/components/schemas/postPhoneEntity" + devices: + type: array + items: + $ref: "#/components/schemas/devicePostEntity" postCustomerAddress: type: object properties: @@ -2801,6 +2835,38 @@ components: ovPayTokenId: type: integer example: 1 + getDevicesResponse: + type: object + properties: + devices: + type: array + items: + $ref: "#/components/schemas/getDeviceEntity" + getDeviceEntity: + type: object + properties: + deviceId: + type: string + format: uuid + customerProfileId: + type: integer + externalDeviceId: + type: string + format: uuid + alias: + type: string + required: + - deviceId + - customerProfileId + - externalDeviceId + - alias + postCustomerDevice: + $ref: "#/components/schemas/devicePostEntity" + patchCustomerDevice: + type: object + properties: + alias: + type: string ErrorResponse: type: object properties: From a2e81d0f43791ba06501bd0c70a278d1d8129a2f Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Tue, 9 Sep 2025 11:16:24 +0200 Subject: [PATCH 3/5] OVPAY-2018 - Added devices patch response. --- src/openapi/customers/customers-crud-v2.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/openapi/customers/customers-crud-v2.yaml b/src/openapi/customers/customers-crud-v2.yaml index 2bbaa38..de34997 100644 --- a/src/openapi/customers/customers-crud-v2.yaml +++ b/src/openapi/customers/customers-crud-v2.yaml @@ -1428,7 +1428,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" + $ref: "#/components/schemas/getDevices" + examples: + updateDeviceResponse: + value: + deviceId: "5bedce29-af0c-4f3c-b182-2caa8a1f9377" + externalDeviceId: "7122a988-a00a-417d-a5b4-da2d91354976" + alias: "iPhone zakelijk" + security: - default: [] x-auth-type: Application & Application User From 3c7a9d3cb9763eeb46ef508b93f9e1f2ea03d1c8 Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Tue, 9 Sep 2025 14:35:41 +0200 Subject: [PATCH 4/5] OVPAY-2018 - Added touch point endpoints. --- src/openapi/customers/SE-customers.yaml | 182 +++++++++++++++++++----- 1 file changed, 146 insertions(+), 36 deletions(-) diff --git a/src/openapi/customers/SE-customers.yaml b/src/openapi/customers/SE-customers.yaml index f141616..37079cb 100644 --- a/src/openapi/customers/SE-customers.yaml +++ b/src/openapi/customers/SE-customers.yaml @@ -240,6 +240,18 @@ paths: "phoneTypeId": 2, "isPreferred": false } + ], + "devices": [ + { + "deviceTypeId": 1, + "deviceIdentifier": "123e4567-e89b-12d3-a456-426614174000", + "isPreferred": true + }, + { + "deviceTypeId": 2, + "deviceIdentifier": "987e6543-e21b-12d3-a456-426614174999", + "isPreferred": false + } ] } } @@ -327,6 +339,20 @@ paths: "phoneTypeId": 2, "isPreferred": false } + ], + "devices": [ + { + "deviceId": 1, + "deviceTypeId": 1, + "deviceIdentifier": "123e4567-e89b-12d3-a456-426614174000", + "isPreferred": true + }, + { + "deviceId": 2, + "deviceTypeId": 2, + "deviceIdentifier": "987e6543-e21b-12d3-a456-426614174999", + "isPreferred": false + } ] } } @@ -3293,6 +3319,89 @@ paths: }, ], } + /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 components: schemas: unavailable: @@ -3471,27 +3580,6 @@ components: country: type: string example: NL - _links: - type: object - properties: - self: - type: object - properties: - href: - type: string - example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/addresses/1 - method: - type: string - example: GET - delete_address: - type: object - properties: - href: - type: string - example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/addresses/1 - method: - type: string - example: DELETE phones: type: array items: @@ -3518,24 +3606,56 @@ components: countryCode: type: string example: "0031" + devices: + type: array + items: + type: object + properties: + deviceId: + type: integer + example: 1 + deviceType: + type: object + properties: + deviceTypeId: + type: integer + example: 1 + name: + type: string + example: iOS + pushToken: + type: string + example: abcdef123456 + isPreferred: + type: boolean + example: true _links: type: object properties: - self: + add_device: type: object properties: href: type: string - example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/phones/1 + example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/devices method: type: string - example: GET - delete_phone: + example: POST + edit_device: type: object properties: href: type: string - example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/phones/1 + 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 @@ -3551,16 +3671,6 @@ components: method: type: string example: GET - create_customer_status: - type: object - description: ONLY ALLOWED FOR SMP - Create a new customer status - properties: - href: - type: string - example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/statuses - method: - type: string - example: POST partial_edit: type: object properties: From d2176dfdc340832563ec62d89ba08be64dc4042a Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Fri, 3 Oct 2025 14:02:21 +0200 Subject: [PATCH 5/5] OVPAY-2018 - Processed review remarks. --- src/openapi/customers/SE-customers.yaml | 49 ++++++++++--------------- 1 file changed, 19 insertions(+), 30 deletions(-) diff --git a/src/openapi/customers/SE-customers.yaml b/src/openapi/customers/SE-customers.yaml index 37079cb..3c8d039 100644 --- a/src/openapi/customers/SE-customers.yaml +++ b/src/openapi/customers/SE-customers.yaml @@ -243,14 +243,12 @@ paths: ], "devices": [ { - "deviceTypeId": 1, - "deviceIdentifier": "123e4567-e89b-12d3-a456-426614174000", - "isPreferred": true + "externalDeviceId": "123e4567-e89b-12d3-a456-426614174000", + "alias": "My iPhone", }, { - "deviceTypeId": 2, - "deviceIdentifier": "987e6543-e21b-12d3-a456-426614174999", - "isPreferred": false + "externalDeviceId": "987e6543-e21b-12d3-a456-426614174999", + "alias": "My iPad", } ] } @@ -342,16 +340,14 @@ paths: ], "devices": [ { - "deviceId": 1, - "deviceTypeId": 1, - "deviceIdentifier": "123e4567-e89b-12d3-a456-426614174000", - "isPreferred": true + "deviceId": "813afdd8-bf8c-4e26-bfda-4da79552bd38", + "externalDeviceId": "123e4567-e89b-12d3-a456-426614174000", + "alias": "My iPhone", }, { - "deviceId": 2, - "deviceTypeId": 2, - "deviceIdentifier": "987e6543-e21b-12d3-a456-426614174999", - "isPreferred": false + "deviceId": "4f4249a2-ac6c-44f9-b740-66e66b6f3c28", + "externalDeviceId": "987e6543-e21b-12d3-a456-426614174999", + "alias": "My iPad", } ] } @@ -3612,23 +3608,16 @@ components: type: object properties: deviceId: - type: integer - example: 1 - deviceType: - type: object - properties: - deviceTypeId: - type: integer - example: 1 - name: - type: string - example: iOS - pushToken: type: string - example: abcdef123456 - isPreferred: - type: boolean - example: true + 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: