From e2d78ec969494ce035b64d051f13d52768a4291e Mon Sep 17 00:00:00 2001 From: Mirjam Herald Date: Mon, 19 Jan 2026 14:51:38 +0100 Subject: [PATCH] created generic endpoint for product Instances --- src/openapi/customers/SE-customers.yaml | 1266 +++++++++++++++-------- 1 file changed, 822 insertions(+), 444 deletions(-) diff --git a/src/openapi/customers/SE-customers.yaml b/src/openapi/customers/SE-customers.yaml index fc5167e..ed030ef 100644 --- a/src/openapi/customers/SE-customers.yaml +++ b/src/openapi/customers/SE-customers.yaml @@ -166,10 +166,10 @@ paths: "detail": "Meer dan 1 klantprofiel gevonden. Verfijn je zoekcriteria.", "instance": "555d00b5-bc3f-4591-949b-479e76d49ea7", } - post: + post: tags: - Customers - parameters: + parameters: - name: X-HTM-ROLE-HEADER in: header schema: @@ -178,7 +178,7 @@ paths: 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. + 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: @@ -187,71 +187,73 @@ paths: examples: minimalCustomerProfile: value: - { "person": { "emailAddress": "j.jansen@hatseflats.nl" } } + { + "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", - "isPreferred": true, - "addressTypeId": 1, - }, - { - "street": "Beeklaan", - "houseNumber": 30, - "houseNumberSuffix": "B", - "postalCode": "2500AA", - "city": "Den Haag", - "country": "NL", - "isPreferred": false, - "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", - }, - ], - }, + "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", + "isPreferred": true, + "addressTypeId": 1 + }, + { + "street": "Beeklaan", + "houseNumber": 30, + "houseNumberSuffix": "B", + "postalCode": "2500AA", + "city": "Den Haag", + "country": "NL", + "isPreferred": false, + "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: + responses: "201": description: Created content: @@ -285,7 +287,7 @@ paths: 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: + requestBody: content: application/json: schema: @@ -294,74 +296,69 @@ paths: 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: + "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" - + $ref: "#/components/schemas/CustomersResponse" /customers/tokens: get: tags: @@ -492,9 +489,8 @@ paths: "customerProfileId": 1, "ovPayTokenId": 1, "xTat": "32089cc8-d187-47ff-a3a9-5c2558def811", - "ovpasNumber": "", - "alias": "Mijn EMV pas", "tokenType": { "tokenTypeId": 1, "name": "EMV" }, + "alias": "MyToken", "tokenStatus": { "tokenStatusId": 2, "name": "Active" }, "expirationDate": "2028-02-01", @@ -569,8 +565,7 @@ paths: "ovPayTokenId": 1, "xTat": "32089cc8-d187-47ff-a3a9-5c2558def811", "tokenType": - { "tokenTypeId": 2, "name": "OV-pas physical" }, - "ovpasNumber": "OV34567", + { "tokenTypeId": 2, "name": "OV-pas physical" }, "alias": "MyToken", "tokenStatus": { "tokenStatusId": 2, "name": "Active" }, @@ -589,7 +584,7 @@ paths: "name": null, "birthdate": null, "photo": null, - }, + }, "gboAgeProfile": null, "_links": { @@ -652,8 +647,7 @@ paths: "ovPayTokenId": 1, "xTat": "32089cc8-d187-47ff-a3a9-5c2558def811", "tokenType": - { "tokenTypeId": 2, "name": "OV-pas physical" }, - "ovpasNumber": "OV34567", + { "tokenTypeId": 2, "name": "OV-pas physical" }, "alias": "MyToken", "tokenStatus": { "tokenStatusId": 2, "name": "Active" }, @@ -712,7 +706,7 @@ paths: "gboAgeProfileId": 1, "name": "Kind (4 t/m 11 jaar)", "ageFromInclusive": 4, - "ageToInclusive": 11, + "ageToInclusive": 11 }, "_links": { @@ -775,8 +769,7 @@ paths: "ovPayTokenId": 1, "xTat": "32089cc8-d187-47ff-a3a9-5c2558def811", "tokenType": - { "tokenTypeId": 2, "name": "OV-pas physical" }, - "ovpasNumber": "OV34567", + { "tokenTypeId": 2, "name": "OV-pas physical" }, "alias": "MyToken", "tokenStatus": { "tokenStatusId": 2, "name": "Active" }, @@ -810,7 +803,7 @@ paths: "gboAgeProfileId": 1, "name": "Kind (4 t/m 11 jaar)", "ageFromInclusive": 4, - "ageToInclusive": 11, + "ageToInclusive": 11 }, "_links": { @@ -873,8 +866,7 @@ paths: "ovPayTokenId": 1, "xTat": "32089cc8-d187-47ff-a3a9-5c2558def811", "tokenType": - { "tokenTypeId": 2, "name": "OV-pas physical" }, - "ovpasNumber": "OV34567", + { "tokenTypeId": 2, "name": "OV-pas physical" }, "alias": "MyToken", "tokenStatus": { "tokenStatusId": 2, "name": "Active" }, @@ -921,12 +913,12 @@ paths: "lastChangeDate": "2024-08-24T14:15:22Z", }, }, - "gboAgeProfile": + "gboAgeProfile": { "gboAgeProfileId": 1, "name": "Kind (4 t/m 11 jaar)", "ageFromInclusive": 4, - "ageToInclusive": 11, + "ageToInclusive": 11 }, "_links": { @@ -989,8 +981,7 @@ paths: "ovPayTokenId": 1, "xTat": "e7fa3392-646b-40e2-95a6-c417dc0b0969", "tokenType": - { "tokenTypeId": 2, "name": "OV-pas physical" }, - "ovpasNumber": "OV34567", + { "tokenTypeId": 2, "name": "OV-pas physical" }, "alias": "MyToken", "tokenStatus": { "tokenStatusId": 2, "name": "Active" }, @@ -1010,8 +1001,7 @@ paths: "ovPayTokenId": 6, "xTat": "e7fa3392-646b-40e2-95a6-c417dc0b0969", "tokenType": - { "tokenTypeId": 2, "name": "OV-pas physical" }, - "ovpasNumber": "OV54567", + { "tokenTypeId": 2, "name": "OV-pas physical" }, "alias": "MyToken", "tokenStatus": { "tokenStatusId": 3, "name": "Replaced (*)" }, @@ -1032,8 +1022,7 @@ paths: "ovPayTokenId": 13, "xTat": "e7fa3392-646b-40e2-95a6-c417dc0b0969", "tokenType": - { "tokenTypeId": 2, "name": "OV-pas physical" }, - "ovpasNumber": "OV34547", + { "tokenTypeId": 2, "name": "OV-pas physical" }, "alias": "MyToken", "tokenStatus": { "tokenStatusId": 4, "name": "On stock" }, @@ -1047,15 +1036,14 @@ paths: "birthdate": null, "photo": null, }, - "gboAgeProfile": null, + "gboAgeProfile": null }, { "customerProfileId": 132, "ovPayTokenId": 21, "xTat": "e7fa3392-646b-40e2-95a6-c417dc0b0969", "tokenType": - { "tokenTypeId": 2, "name": "OV-pas physical" }, - "ovpasNumber": "OV34831", + { "tokenTypeId": 2, "name": "OV-pas physical" }, "alias": "Mijn OV Pas", "tokenStatus": { "tokenStatusId": 5, "name": "Suspended" }, @@ -1069,15 +1057,14 @@ paths: "birthdate": null, "photo": null, }, - "gboAgeProfile": null, + "gboAgeProfile": null }, { "customerProfileId": 166, "ovPayTokenId": 28, "xTat": "e7fa3392-646b-40e2-95a6-c417dc0b0969", "tokenType": - { "tokenTypeId": 2, "name": "OV-pas physical" }, - "ovpasNumber": "OV34984", + { "tokenTypeId": 2, "name": "OV-pas physical" }, "alias": "Mijn OV Pas", "tokenStatus": { @@ -1094,15 +1081,14 @@ paths: "birthdate": null, "photo": null, }, - "gboAgeProfile": null, + "gboAgeProfile": null }, { "customerProfileId": 166, "ovPayTokenId": 115, "xTat": "e7fa3392-646b-40e2-95a6-c417dc0b0969", "tokenType": - { "tokenTypeId": 2, "name": "OV-pas physical" }, - "ovpasNumber": "OV54368", + { "tokenTypeId": 2, "name": "OV-pas physical" }, "alias": "My retired token", "tokenStatus": { "tokenStatusId": 1, "name": "Retired" }, @@ -1116,15 +1102,14 @@ paths: "birthdate": null, "photo": null, }, - "gboAgeProfile": null, + "gboAgeProfile": null }, { "customerProfileId": 1, "ovPayTokenId": 118, "xTat": "e7fa3392-646b-40e2-95a6-c417dc0b0969", "tokenType": - { "tokenTypeId": 2, "name": "OV-pas physical" }, - "ovpasNumber": "OV98263", + { "tokenTypeId": 2, "name": "OV-pas physical" }, "alias": "My found token", "tokenStatus": { "tokenStatusId": 7, "name": "Renewed Active" }, @@ -1138,7 +1123,7 @@ paths: "birthdate": null, "photo": null, }, - "gboAgeProfile": null, + "gboAgeProfile": null }, ], _links: @@ -1228,7 +1213,7 @@ paths: "xTat": "32089cc8-d187-47ff-a3a9-5c2558def811", "tokenType": { "tokenTypeId": 1, "name": "EMV" }, "lastDigits": null, - "ovpasNumber": null, + "ovPasNumber": null, "alias": "Mijn token", "tokenStatus": { "tokenStatusId": 2, "name": "Active" }, @@ -1964,12 +1949,11 @@ paths: type: integer example: 1 required: true - summary: |- - NOT TO BE CALLED BY TOUCHPOINTS - Replace an OVpay token with another (+ transfer products) - V2 - description: |- - **NOTE: This endpoint is for usage by integratielaag only. Touchpoints should use - `/customers/tokens/{ovpayTokenId}/transfer` instead.**\ + summary: Replace an OVpay token with another (+ transfer products) - V2 (for Integratielaag) + description: | Transfer products from one OVpay token to another, and replace the tokens in the database. + This endpoint is for usage by integratielaag only. Touch points should use + `/customers/tokens/{ovpayTokenId}/transfer` instead. requestBody: content: application/json: @@ -2225,7 +2209,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/OvPayTokenProductInstancesResponse" + $ref: "#/components/schemas/ProductInstancesResponse" examples: getEmptyProductInstances: summary: No product-instances found on token @@ -2238,6 +2222,7 @@ paths: "productInstances": [ { + "productInstanceId": "26d41861-f77e-4666-9cde-2c5c66ace0a2", "productId": 1, "name": "HTM 90% Korting", "status": "Active", @@ -2254,11 +2239,6 @@ paths: "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", @@ -2384,7 +2364,7 @@ paths: "ePurse": null, "personalAccountData": { "name": null, "birthdate": null, "photo": null }, - "gboAgeProfile": null, + "gboAgeProfile": null }, "newOvPayToken": { @@ -2401,7 +2381,7 @@ paths: "ePurse": null, "personalAccountData": { "name": null, "birthdate": null, "photo": null }, - "gboAgeProfile": null, + "gboAgeProfile": null }, "isTransferable": true, "transferableObjects": @@ -2414,11 +2394,11 @@ paths: "ePurse": true, "personalAccountData": { "name": true, "birthdate": true, "photo": true }, - "gboAgeProfile": true, + "gboAgeProfile": true }, "_links": { - "transfer_token": + "transfer": { "href": "https://services.dev.api.htm.nl/abt/touchpoint/1.0/customers/tokens/1/transfer", "method": "POST", @@ -2438,57 +2418,50 @@ paths: "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", - }, - }, + "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, + "gboAgeProfile": null }, "newOvPayToken": { "customerProfileId": null, "ovPayTokenId": null, "xTat": "32089cc8-d187-47ff-a3a9-5c2558def811", - "tokenType": - { "tokenTypeId": 2, "name": "OV-pas physical" }, + "tokenType": { "tokenTypeId": 2, "name": "OV-pas physical" }, "alias": null, "tokenStatus": null, "expirationDate": "2028-02-01", @@ -2498,7 +2471,7 @@ paths: "ePurse": null, "personalAccountData": { "name": null, "birthdate": null, "photo": null }, - "gboAgeProfile": null, + "gboAgeProfile": null }, "isTransferable": false, "transferableObjects": @@ -2535,7 +2508,7 @@ paths: "ePurse": null, "personalAccountData": { "name": null, "birthdate": null, "photo": null }, - "gboAgeProfile": null, + "gboAgeProfile": null }, "newOvPayToken": { @@ -2552,7 +2525,7 @@ paths: "ePurse": null, "personalAccountData": { "name": null, "birthdate": null, "photo": null }, - "gboAgeProfile": null, + "gboAgeProfile": null }, "isTransferable": false, "transferableObjects": @@ -2624,8 +2597,8 @@ paths: "gboAgeProfileId": 1, "name": "Kind (4 t/m 11 jaar)", "ageFromInclusive": 4, - "ageToInclusive": 11, - }, + "ageToInclusive": 11 + } }, "newOvPayToken": { @@ -2642,7 +2615,7 @@ paths: "ePurse": null, "personalAccountData": { "name": null, "birthdate": null, "photo": null }, - "gboAgeProfile": null, + "gboAgeProfile": null }, "isTransferable": false, "transferableObjects": @@ -2696,12 +2669,12 @@ paths: "photo": null, }, "gboAgeProfile": - { - "gboAgeProfileId": 1, - "name": "Kind (4 t/m 11 jaar)", - "ageFromInclusive": 4, - "ageToInclusive": 11, - }, + { + "gboAgeProfileId": 1, + "name": "Kind (4 t/m 11 jaar)", + "ageFromInclusive": 4, + "ageToInclusive": 11 + } }, "newOvPayToken": { @@ -2731,13 +2704,13 @@ paths: }, "photo": null, }, - "gboAgeProfile": - { - "gboAgeProfileId": 4, - "name": "Kind (19 t/m 65 jaar)", - "ageFromInclusive": 19, - "ageToInclusive": 65, - }, + "gboAgeProfile": + { + "gboAgeProfileId": 4, + "name": "Kind (19 t/m 65 jaar)", + "ageFromInclusive": 19, + "ageToInclusive": 65 + } }, "isTransferable": false, "transferableObjects": @@ -2879,9 +2852,9 @@ paths: type: integer example: 1 post: - summary: "Transfer old OVpay token to new OVpay token." + summary: "**INTEGRATIELAAG** Transfer old OVpay token to new OVpay token." description: |- - **Note that this directly calls the integratielaag and not the Service Engine!** + **Note that this is an integratielaag endpoint, not a Service Engine endpoint!** 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 @@ -3020,9 +2993,9 @@ paths: get: tags: - Token Replace v2 - summary: "Get the status of the initiated token transfer process (POST)." + summary: "**INTEGRATIELAAG** Get the status of the initiated token transfer process (POST)." description: | - **Note that this directly calls the integratielaag and not the Service Engine!** Get the status of the + **Note that this is an integratielaag endpoint, not a Service Engine endpoint!** Get the status of the asynchronous token transfer processing. responses: "200": @@ -3097,10 +3070,10 @@ paths: }, "gboAgeProfile": { - "gboAgeProfileId": 1, - "name": "Kind (4 t/m 11 jaar)", - "ageFromInclusive": 4, - "ageToInclusive": 11, + "gboAgeProfileId": 1, + "name": "Kind (4 t/m 11 jaar)", + "ageFromInclusive": 4, + "ageToInclusive": 11 }, "_links": { @@ -3141,22 +3114,60 @@ paths: }, }, } - "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", + "properties": + { + "waitEndTime": "2025-06-04T09:29:21.9641991Z", + "startTime": "2025-06-04T09:29:21.9641991Z", + "status": "Running", + "correlation": + { + "clientTrackingId": "08584525775244808022011782750CU00", + }, + "workflow": + { + "id": "/workflows/9cd96b77c0b94b31832778569f8ef2f9/versions/08584532480062676349", + "name": "08584532480062676349", + "type": "workflows/versions", + }, + "trigger": + { + "name": "token_transfer", + "inputsLink": + { + "uri": "https://htm-abt-logicapp-acc.azurewebsites.net:443/runtime/webhooks/workflow/scaleUnits/prod-00/workflows/9cd96b77c0b94b31832778569f8ef2f9/runs/08584525775235278538475939776CU00/contents/TriggerInputs?api-version=2022-05-01&code=C6PDQGl3MGwt8KyA9BjWDdQbzBwm-01gEmZaTp-hPJ5UAzFuPU-thg%3d%3d&se=2025-06-04T13%3A00%3A00.0000000Z&sp=%2Fruns%2F08584525775235278538475939776CU00%2Fcontents%2FTriggerInputs%2Fread&sv=1.0&sig=6Uxs33K7cQ7jONWzhv9XFPzx4RRHZ6smzfM6wNPk5Mc", + "contentSize": 298, + }, + "outputsLink": + { + "uri": "https://htm-abt-logicapp-acc.azurewebsites.net:443/runtime/webhooks/workflow/scaleUnits/prod-00/workflows/9cd96b77c0b94b31832778569f8ef2f9/runs/08584525775235278538475939776CU00/contents/TriggerOutputs?api-version=2022-05-01&code=C6PDQGl3MGwt8KyA9BjWDdQbzBwm-01gEmZaTp-hPJ5UAzFuPU-thg%3d%3d&se=2025-06-04T13%3A00%3A00.0000000Z&sp=%2Fruns%2F08584525775235278538475939776CU00%2Fcontents%2FTriggerOutputs%2Fread&sv=1.0&sig=vJ6pmCsmz2aP7f73MVOmCTes3YvC1e2w0ZLqdypLXrM", + "contentSize": 6110, + }, + "startTime": "2025-06-04T09:29:21.9497457Z", + "endTime": "2025-06-04T09:29:21.9497457Z", + "originHistoryName": "08584525775235278538475939776CU00", + "correlation": + { + "clientTrackingId": "08584525775244808022011782750CU00", + }, + "status": "Succeeded", + }, + "outputs": {}, + "response": + { + "startTime": "2025-06-04T09:29:21.9642901Z", + "correlation": {}, + "status": "Waiting", + }, + }, + "id": "/workflows/9cd96b77c0b94b31832778569f8ef2f9/runs/08584525775235278538475939776CU00", + "name": "08584525775235278538475939776CU00", + "type": "workflows/runs", } "404": description: Not found @@ -3355,7 +3366,10 @@ paths: $ref: "#/components/schemas/unavailable" examples: Update alias of a device: - value: { "alias": "My old iPhone 13" } + value: + { + "alias": "My old iPhone 13", + } responses: "200": description: OK @@ -3379,6 +3393,337 @@ paths: responses: "200": description: OK + /productinstances: + 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: deviceId + in: query + description: Id of the device you want to get the instantiated HTM products for. + schema: + type: string + format: uuid + - name: externalDeviceId + in: query + description: Id of the device you want to get the instantiated HTM products for. + schema: + type: string + - name: ovpayTokenId + in: query + description: Id of the ovpay token you want to get the instantiated HTM products for. + schema: + type: string + format: uuid + get: + summary: Get a list of all HTM products for a specific customer, device or token, at least one should be filled in + description: |- + Get a list of all HTM products instantiated for a specific customer, device or token, at least one of the query params should be filled in. + Only HTM products are returned. + Where relevant, operations to be performed are returned as HATEOAS links per product-instance. + tags: + - ProductInstances + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/ProductInstancesResponse" + examples: + getEmptyProductInstances: + summary: No product-instances found f + value: + productInstances: { + "ovpayProducten":[], + "barcodeTickets": [], + "vouchers":[] + } + getSingleBarcodeProductInstanceForDevie: + summary: One BarcodeTicket product-instance + value: + { + "productInstances":{ + "ovpayProducten":[], + "barcodeTickets":[ + { + "productInstanceId": "0f0981bf-6d60-4b06-bc55-de1ba325f366", + "productId": 13, + "name": "HTM dagkaart", + "productCategory": + { + "productCategoryId": 5, + "name": "Barcode", + }, + "orderId": "501B17EF-36C4-4039-B92C-6517969B464E", + "orderLineId": "38B17EF-36C4-4039-B92C-4817969B464E", + "status": "Active", + "ticketReference": "KJj43nejhbTxhr897287", + "issuedAt": "2020-03-21T00:00:00", + "activatedAt": null, + "blocked": false, + "cancelledAt": null, + "fraudDetected": false, + "barcode": "barcodeBytes", + "deviceId": "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_productinstance": + { + "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/productinstances/0f0981bf-6d60-4b06-bc55-de1ba325f366", + "method": "PATCH", + }, + }, + }, + ], + "vouchers":[] + } + } + getSingleOvpayProductInstanceForSpecificOvPayToke: + summary: One Ovpay product-instance + value: + { + "productInstances":{ + "ovpayProducten":[ { + "productInstanceId": "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, + "deviceId": null, + "_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":[] + } + } + getMultipleProductInstancesForCustomer: + summary: Multiple product-instances for a customer + value: + { + "productInstances":{ + "ovpayProducten":[ { + "productInstanceId": "26d41861-f77e-4666-9cde-2c5c66ace0a2", + "productId": 1, + "name": "HTM 90% Korting", + "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, + "deviceId": null, + "_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": + [ + { + "productInstanceId": "0f0981bf-6d60-4b06-bc55-de1ba325f366", + "productId": 13, + "name": "HTM dagkaart", + "productCategory": + { + "productCategoryId": 5, + "name": "Barcode", + }, + "orderId": "501B17EF-36C4-4039-B92C-6517969B464E", + "orderLineId": "38B17EF-36C4-4039-B92C-4817969B464E", + "status": "Active", + "ticketReference": "KJj43nejhbTxhr897287", + "issuedAt": "2020-03-21T00:00:00", + "activatedAt": null, + "blocked": false, + "cancelledAt": null, + "fraudDetected": false, + "barcode": "barcodeBytes", + "deviceId": "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_productinstance": + { + "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/productinstances/0f0981bf-6d60-4b06-bc55-de1ba325f366", + "method": "PATCH", + }, + }, + }, + ], + "vouchers":[] + } + } + /customers/productinstances/{productInstanceId}: + 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: productInstanceId + in: path + required: true + style: simple + description: Id of the product instance you want to change + schema: + type: string + format: uuid + example: 0f0981bf-6d60-4b06-bc55-de1ba325f366 + patch: + summary: Update a productInstance + description: |- + Update the status of the give productInstance. + tags: + - Product instances + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + examples: + Update a productInstance status to active: + value: + { + "status": "Active" + } + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + examples: + Update a productInstance status to active: + summary: Update a productInstance status to active + value: + { + "productInstances": + [ + { + "productInstanceId": "0f0981bf-6d60-4b06-bc55-de1ba325f366", + "productId": 13, + "name": "HTM dagkaart", + "purchasedProductType": "TapConnect", + "status": "Active", + "isRenewable": false, + "productCategory": + { + "productCategoryId": 2, + "name": "Afgekocht reisrecht", + }, + "fromInclusive": "2024-11-25T13:25:00+01:00", + "untilInclusive": null, + "orderId": "501B17EF-36C4-4039-B92C-6517969B464E", + "orderLineId": "38B17EF-36C4-4039-B92C-4817969B464E", + "contractId": null, + "content": { + "ticketReference": "KJj43nejhbTxhr897287", + "issuedAt": "2020-03-21T00:00:00", + "activatedAt": "2020-03-21T00:00:00", + "blocked": false, + "cancelledAt": null, + "fraudDetected": false, + "barcode": "barcodeBytes" + }, + "_links": + { + "get_order": + { + "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/orders/501B17EF-36C4-4039-B92C-6517969B464E", + "method": "GET", + }, + "patch_productinstance": + { + "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/productinstances/0f0981bf-6d60-4b06-bc55-de1ba325f366", + "method": "PATCH", + }, + }, + }, + ], + } components: schemas: unavailable: @@ -3465,209 +3810,209 @@ components: CustomersResponseList: type: object properties: - customers: + customers: type: array items: - $ref: "#/components/schemas/CustomersResponse" - CustomersResponse: + $ref: "#/components/schemas/CustomersResponse" + CustomersResponse: type: object properties: - customerProfileId: - type: integer - example: 1 - 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: + customerProfileId: + type: integer + example: 1 + 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: - addressId: - type: integer - example: 1 - addressType: - type: object - properties: - addressTypeId: - type: integer - example: 1 - name: - type: string - example: Shipping - street: + href: type: string - example: Appelstraat - houseNumber: - type: integer - example: 1 - houseNumberSuffix: + example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers + method: type: string - example: BS - postalCode: - type: string - example: 1234AB - city: - type: string - example: Den Haag - country: - type: string - example: NL - phones: - type: array - items: + example: GET + partial_edit: 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: + href: type: string - example: "0123456789" - countryCode: + example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers + method: type: string - example: "0031" - devices: - type: array - items: + example: PATCH + get_tokens: type: object properties: - deviceId: + href: type: string - format: uuid - example: 1 - externalDeviceId: + example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens + method: type: string - format: uuid - example: dee7d80e-9288-4508-a3ed-c067e619179f - alias: + example: GET + create_token: + type: object + properties: + href: 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 + example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens + method: + type: string + example: POST OvPayTokensResponse: type: object required: @@ -3767,20 +4112,39 @@ components: method: type: string example: GET - OvPayTokenProductInstancesResponse: + ProductInstancesResponse: type: object + required: + - productInstances properties: productInstances: type: array items: type: object + required: + - productInstanceId + - productId + - name + - status + - purchasedProductType + - isRenewable + - productCategory + - _links properties: + productInstanceId: + type: string + format: uuid + example: 0f0981bf-6d60-4b06-bc55-de1ba325f366 productId: type: integer example: 1 name: type: string example: HTM 90% Korting + purchasedProductType: + type: string + description: The type of product instance (e.g. GBO, TapConnect, physical, etc.) + example: GBO status: type: string enum: ["Active", "Ended", "Refunded"] @@ -3821,6 +4185,10 @@ components: format: uuid example: 56B17EF-C436-9043-B76C-481797WEB464F description: Only present for subscriptions/contracts + content: + type: object + description: Custom data for the product-instance, depending on the purchasedProductType + example: null _links: type: object properties: @@ -3835,21 +4203,31 @@ components: example: GET get_order: type: object + description: Always present for any HTM product-instance 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 + description: Only present for subscriptions/contracts 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 + patch_productinstance: + type: object + description: Only present for TapConnect product-instances that need to be activated + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/productinstances/0f0981bf-6d60-4b06-bc55-de1ba325f366 + method: + type: string + example: PATCH