diff --git a/src/openapi/customers/SE-customers-v2.yaml b/src/openapi/customers/SE-customers-v2.yaml index 6f76888..f42ed6b 100644 --- a/src/openapi/customers/SE-customers-v2.yaml +++ b/src/openapi/customers/SE-customers-v2.yaml @@ -1939,288 +1939,6 @@ paths: }, } /customers/tokens/{ovPayTokenId}: - 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 - - name: ovPayTokenId - in: path - schema: - type: integer - example: 1 - required: true - summary: Replace an OVpay token with another (+ transfer products) - V2 (for touch point) - description: | - Transfer products from one OVpay token to another, and replace the tokens in the database. - This endpoint is for touch point usage and will be replaced by `/customers/tokens/{ovPayTokenId}/transfer`. - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/unavailable" - examples: - Replace with new EMV token by SRID: - summary: Replace with new token by SRID - description: Replace with new token by service reference ID and amount. - value: - { - "ovPayToken": - { - "newTokenId": null, - "tokenTypeId": 1, - "serviceReferenceId": "NLOV1234567ABCDEFG", - "amount": 230, - "alias": "Nieuw token", - }, - } - Replace with existing EMV token from profile: - summary: Replace with existing token from profile - description: Replace with existing token from customer profile. - value: { "ovPayToken": { "newTokenId": 10 } } - Replace with new OV pas token: - summary: Replace with new OV pas token - description: Replace with new OV pas token by OV-pas number. - value: - { - "ovPayToken": - { - "tokenTypeId": 2, - "ovpasNumber": "OV34567", - "verificationCode": "211", - "alias": "Mijn token", - }, - } - responses: - "201": - description: Created - content: - application/json: - schema: - $ref: "#/components/schemas/unavailable" - examples: - Replace with new EMV token: - summary: Replace with new EMV token - description: Replace with new EMV token - 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": 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, - "_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", - }, - }, - }, - } - Replace with new OV pas token: - summary: Replace with new OV pas token - description: Replace with new OV pas token - value: - { - "ovPayToken": - { - "customerProfileId": 1, - "ovPayTokenId": 5, - "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": 350 }, - "status": "ACTIVE", - "originDate": "2024-07-16T11:00:00+02:00", - }, - "personalAccountData": - { "name": null, "birthdate": null, "photo": null }, - "gboAgeProfile": 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", - }, - }, - }, - } - "200": - description: Ok - content: - application/json: - schema: - $ref: "#/components/schemas/unavailable" - examples: - Replace with existing EMV token: - summary: Replace with existing EMV token - description: Replace with existing EMV token - value: - { - "ovPayToken": - { - "customerProfileId": 1, - "ovPayTokenId": 10, - "xTat": "32089cc8-d187-47ff-a3a9-5c2558def811", - "tokenType": { "tokenTypeId": 1, "name": "EMV" }, - "lastDigits": null, - "ovpasNumber": null, - "alias": "Mijn bestaande 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, - "_links": - { - "self": - { - "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens?ovPaytokenId=10", - "method": "GET", - }, - "partial_edit": - { - "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/10", - "method": "PATCH", - }, - "delete_token": - { - "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/10", - "method": "DELETE", - }, - "get_productinstances": - { - "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/10/productinstances", - "method": "GET", - }, - "get_trips": - { - "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/10/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/10/compare", - "method": "POST", - }, - }, - }, - } patch: tags: - Customers @@ -3184,7 +2902,7 @@ 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!** First transfers all personal account data (if present), then all products, of an existing OVpay token @@ -3318,7 +3036,7 @@ paths: get: tags: - Token Replace v2 - summary: "Get the status of the initiated token transfer process." + 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. @@ -3597,90 +3315,323 @@ paths: }, ], } - /customers/devices: + /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: Retrieve devices for a customer. - description: Retrieve devices for a customer. + 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: - - Devices - 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: deviceId - in: query - schema: - type: string - format: uuid - example: 3fc3e1d2-cbca-4c67-9210-77601301fd75 - - name: externalDeviceId - in: query - schema: - type: string - example: dsafdefaere5435255 - - name: customerProfileId - in: query - schema: - type: integer - example: 1 + - Purchased Products responses: "200": description: OK content: application/json: schema: - $ref: "#/components/schemas/unavailable" + $ref: "#/components/schemas/PurchasedProductsResponse" examples: - One device found: + 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: { - "devices": - [ - { - "customerProfileId": 1, - "deviceId": "0f0981bf-6d60-4b06-bc55-de1ba325f366", - "externalDeviceId": "dee7d80e-9288-4508-a3ed-c067e619179f", - "alias": "My iPhone 13" - } - ] - } - Multiple devices found: - value: - { - "devices": - [ - { - "customerProfileId": 1, - "deviceId": "5bedce29-af0c-4f3c-b182-2caa8a1f9377", - "externalDeviceId": "c5545584-04af-4c60-a955-d6a70baab848", - "alias": "iPhone prive", - }, - { - "customerProfileId": 1, - "deviceId": "d7683e89-b2ad-4e79-85b3-dbb42aad0325", - "externalDeviceId": "7122a988-a00a-417d-a5b4-da2d91354976", - "alias": "iPhone zakelijk", - } - ] + "purchasedProducts":{ + "ovPayProducts":[], + "barcodeTickets":[ + { + "purchasedProductId": "0f0981bf-6d60-4b06-bc55-de1ba325f366", + "productId": 14, + "name": "HTM 2 uurskaart", + "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", + "activatedAt": null, + "blocked": false, + "cancelledAt": null, + "validityStart": "2026-03-21T09:01:35", + "validityEnd": "2026-04-21T23:59:59", + "barcode": "barcodeBytes", + "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", + "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", + "activatedAt": "2026-03-21T12:45:01", + "blocked": false, + "cancelledAt": null, + "validityStart": "2026-03-21T12:45:01", + "validityEnd": "2026-03-21T14:45:01", + "barcode": "barcodeBytes", + "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", + "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", + "activatedAt": "2026-03-21T12:45:01", + "blocked": false, + "cancelledAt": null, + "validityStart": "2026-03-21T12:45:01", + "validityEnd": "2026-03-21T14:45:01", + "barcode": "barcodeBytes", + "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. @@ -4324,4 +4275,312 @@ components: 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 + - status + - productCategory + - orderId + - orderLineId + - ticketReference + - serviceId + - issuedAt + - blocked + - validityStart + - validityEnd + - _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 + status: + type: string + enum: ["PendingActivation", "Active", "Ended", "Blocked", "Refunded"] + example: Active + 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" + validityStart: + description: |- + The date-time at which the ticket will become valid for traveling. The ticket will not be valid before this date. + For tickets that require activation: Before activation this field will show the lower bound of the range in which + a ticket can be activated, after activation the value of this field is updated to the final start of the validity + range. For example: a 1 hour product that has to be activated within 7 days. Before ticket activation (activatedAt + field returns null) this value (together with validityEnd) will return the 7 day range, after activation (activatedAt + field returns a date-time) the value will show the start of the final 1 hour validity range. + type: string + format: date-time-offset + example: "2024-11-25T13:25:00+01:00" + validityEnd: + description: |- + The date-time at which the ticket will become valid for traveling. The ticket will not be valid before this date. + For tickets that require activation: Before activation this field will show the upper bound of the range in which + a ticket can be activated, after activation the value of this field is updated to the final end of the validity + range. For example: a 1 hour product that has to be activated within 7 days. Before ticket activation (activatedAt + field returns null) this value (together with validityStart) will return the 7 day range, after activation (activatedAt + field returns a date-time) the value will show the end of the final 1 hour validity range. + type: string + format: date-time-offset + example: "2024-11-25T15:25:00+01:00" + barcode: + type: string + example: barcodeBytes + 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 \ No newline at end of file diff --git a/src/openapi/customers/SE-customers.yaml b/src/openapi/customers/SE-customers.yaml index e3d828f..6f3a59d 100644 --- a/src/openapi/customers/SE-customers.yaml +++ b/src/openapi/customers/SE-customers.yaml @@ -1960,7 +1960,7 @@ paths: type: integer example: 1 required: true - summary: Replace an OVpay token with another (+ transfer products) - V2 (for Integratielaag) + summary: "**INTERNAL USE ONLY** Replace an OVpay token with another (+ transfer products) - V2" 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 @@ -2220,7 +2220,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ProductInstancesResponse" + $ref: "#/components/schemas/OvPayTokenProductInstancesResponse" examples: getEmptyProductInstances: summary: No product-instances found on token @@ -2233,7 +2233,6 @@ paths: "productInstances": [ { - "productInstanceId": "26d41861-f77e-4666-9cde-2c5c66ace0a2", "productId": 1, "name": "HTM 90% Korting", "status": "Active", @@ -3404,377 +3403,6 @@ 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 - value: - productInstances: { - "ovPayProducts":[], - "barcodeTickets": [], - "vouchers":[] - } - getSingleBarcodeProductInstanceForDevice: - summary: One BarcodeTicket product-instance - value: - { - "productInstances":{ - "ovPayProducts":[], - "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":[] - } - } - getSingleOvpayProductInstanceForSpecificOvPayToken: - summary: One Ovpay product-instance - value: - { - "productInstances":{ - "ovPayProducts":[ { - "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":{ - "ovPayProducts":[ { - "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":[] - } - } - getSingleVoucherProductInstanceForCustomer: - summary: One voucher product-instance - value: - { - "productInstances":{ - "ovPayProducts":[], - "barcodeTickets":[], - "vouchers":[ - { - "productInstanceId": "07a55d42-ea42-4f5c-896a-b340ab084309", - "productId": 81, - "name": "HTM ooivaarspas voucher ", - "productCategory": - { - "productCategoryId": 9, - "name": "Voucher", - }, - "voucherCode": "HTM45253", - "fromInclusive": "2026-01-01T00:00:00", - "untillInclusive": "2026-12-31T23:59:99", - "voucherStatus": { - "voucherStatusId": 2, - "name": "issued" - }, - "mandatoryCustomerDataItems": - [ - { - "mandatoryCustomerDataItemId": 8, - "customerDataItem": "padBirthDate", - }, - { - "mandatoryCustomerDataItemId": 4, - "customerDataItem": "emailAddress", - }, - ] - } - - ] - } - } - /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: - - ProductInstances - 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: @@ -4163,7 +3791,7 @@ components: method: type: string example: GET - ProductInstancesResponse: + OvPayTokenProductInstancesResponse: type: object required: - productInstances @@ -4173,29 +3801,22 @@ components: items: type: object required: - - productInstanceId - productId - name - status - - purchasedProductType - isRenewable - productCategory + - fromInclusive + - orderId + - orderLineId - _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"] @@ -4236,10 +3857,6 @@ 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: @@ -4272,13 +3889,3 @@ components: 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 diff --git a/src/openapi/customers/customers-crud-v2.yaml b/src/openapi/customers/customers-crud-v2.yaml index 71c95ea..6ff2f7e 100644 --- a/src/openapi/customers/customers-crud-v2.yaml +++ b/src/openapi/customers/customers-crud-v2.yaml @@ -1303,7 +1303,6 @@ paths: name: externalDeviceId schema: type: string - format: uuid example: c5545584-04af-4c60-a955-d6a70baab848 required: false description: The external id of the device. @@ -2480,7 +2479,6 @@ components: format: uuid externalDeviceId: type: string - format: uuid alias: type: string required: @@ -2599,7 +2597,6 @@ components: properties: externalDeviceId: type: string - format: uuid alias: type: string defaultCustomerProfileResponse: @@ -2870,7 +2867,6 @@ components: type: integer externalDeviceId: type: string - format: uuid alias: type: string required: diff --git a/src/openapi/orders/orders-crud.yaml b/src/openapi/orders/orders-crud.yaml index b2fb69a..d8988eb 100644 --- a/src/openapi/orders/orders-crud.yaml +++ b/src/openapi/orders/orders-crud.yaml @@ -57,13 +57,12 @@ paths: required: false description: The id of the touch point where the order was initiated. - in: query - name: deviceId + name: externalDeviceId schema: type: string - format: uuid example: "7a28bd54-7ca9-499a-a722-d15ab858ab99" required: false - description: The id of the device used to place the order. + description: The external id of the device used to place the order. - in: query name: languageId schema: @@ -141,7 +140,7 @@ paths: "touchPointId": 1, "name": "Perplex" }, - "deviceId": "42e77532-d831-41da-b07a-7edb9bb7f004", + "externalDeviceId": "42e77532-d831-41da-b07a-7edb9bb7f004", "language": { "languageId": 1, @@ -374,7 +373,7 @@ paths: "customerProfileId": 1337, "totalAmount": 121, "touchPointId": 1, - "deviceId": "b8ca9fdf-0bb9-4e49-b48d-41e395563377", + "externalDeviceId": "b8ca9fdf-0bb9-4e49-b48d-41e395563377", "languageId": 1, "createdOn": "2024-03-22T09:00:00", "order_OrderStatus": @@ -486,7 +485,7 @@ paths: "touchPointId": 1, "name": "Perplex" }, - "deviceId": null, + "externalDeviceId": null, "language": { "languageId": 1, @@ -659,7 +658,7 @@ paths: example: { "customerProfileId": 1337, - "deviceId": "fe68e624-b75f-48ca-a179-d5f86a8ab7d5", + "externalDeviceId": "fe68e624-b75f-48ca-a179-d5f86a8ab7d5", "totalAmount": 121, "languageId": 1, "lastUpdatedOn": "2024-03-22T09:00:00", diff --git a/src/openapi/orders/service_engine_orders.yaml b/src/openapi/orders/service_engine_orders.yaml index 38c3e5a..2580036 100644 --- a/src/openapi/orders/service_engine_orders.yaml +++ b/src/openapi/orders/service_engine_orders.yaml @@ -132,6 +132,8 @@ paths: "externalOrderId": "bac3958b-804a-43e3-b5f7-0b0fffaae5b7", "orderNumber": "123456", "customerProfileId": 42, + "device": null, + "vouchers":[], "totalAmount": 121, "touchPoint": { @@ -171,6 +173,7 @@ paths: "taxAmount": null, "amountExclTax": null, "amountInclTax": 121, + "vouchers":[], "quantity": 1, "orderLineTerms": [ @@ -259,7 +262,12 @@ paths: "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", "externalOrderId": null, "orderNumber": "ORD-123456", - "customerProfileId": 1337, + "customerProfileId": 1337, + "device": { + "externalDeviceId": "123e4567-e89b-12d3-a456-426614174000", + "alias": null, + }, + "vouchers":[], "totalAmount": 121, "touchPoint": { @@ -301,6 +309,7 @@ paths: "taxAmount": null, "amountExclTax": null, "amountInclTax": 121, + "vouchers":[], "quantity": 1, "orderLineTerms": [ @@ -479,11 +488,13 @@ paths: { "externalOrderId": null, "languageId": 1, + "externalDeviceId": "9d03ca60-d2ab-4429-830d-49e12d0a29d4", "orderLines": [ { "externalOrderLineId": null, "productId": 1, + "vouchers":[], "quantity": 1, "validFrom": "2024-03-22T09:00:00", "validUntil": null, @@ -525,6 +536,10 @@ paths: "externalOrderId": null, "orderNumber": "ORD-123456", "customerProfileId": 1337, + "device":{ + "externalDeviceId": "9d03ca60-d2ab-4429-830d-49e12d0a29d4", + "alias": null }, + "vouchers":[], "totalAmount": 121, "touchPoint": { @@ -566,6 +581,7 @@ paths: "taxAmount": null, "amountExclTax": null, "amountInclTax": 121, + "vouchers":[], "quantity": 1, "orderLineTerms": [ @@ -775,6 +791,10 @@ paths: "externalOrderId": null, "orderNumber": "ORD-123456", "customerProfileId": 1337, + "devices":{ + "externalDeviceId": "8fe1e754-0070-478c-bdba-4ebd89c994f0", + "alias": "Mijn Android" }, + "vouchers":[], "totalAmount": 121, "touchPoint": { @@ -816,6 +836,7 @@ paths: "taxAmount": null, "amountExclTax": null, "amountInclTax": 121, + "vouchers":[], "quantity": 1, "orderLineTerms": [ @@ -954,7 +975,9 @@ paths: "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", "externalOrderId": null, "orderNumber": "ORD-123456", - "customerProfileId": 1337, + "customerProfileId": 1337, + "devices": null, + "vouchers":[], "totalAmount": 121, "touchPoint": { @@ -996,6 +1019,7 @@ paths: "taxAmount": null, "amountExclTax": null, "amountInclTax": 121, + "vouchers":[], "quantity": 1, "orderLineTerms": [ @@ -1146,7 +1170,11 @@ paths: "orderId": "afce35b2-1dff-4ace-98d0-4b9ac405c87d", "externalOrderId": "bac3958b-804a-43e3-b5f7-0b0fffaae5b7", "orderNumber": "123456", - "customerProfileId": 42, + "customerProfileId": 42, + "devices":{ + "externalDeviceId": "8fe1e754-0070-478c-bdba-4ebd89c994f0", + "alias": null }, + "vouchers":[], "totalAmount": 121, "touchPoint": { @@ -1195,6 +1223,7 @@ paths: "taxAmount": null, "amountExclTax": null, "amountInclTax": 121, + "vouchers":[], "quantity": 1, "orderLineTerms": [ @@ -1314,7 +1343,7 @@ paths: { "orderCustomerAddressId": "aa50047c-58ac-4f15-9448-ee000dfc6893", "addressType": - { "addressTypeId": 2, "name": "Billing" }, + { "addressTypeId": 3, "name": "Billing" }, "street": "Kon. Julianaplein", "houseNumber": 10, "houseNumberSuffix": "a", @@ -1345,10 +1374,14 @@ paths: schema: $ref: "#/components/schemas/unavailable" examples: - Update order languageId": + Update order languageId: summary: Update order languageId description: Update order languageId - value: { "languageId": 1 } + value: { "languageId": 1} + Add externalDeviceId: + summary: Add order externalDeviceId + description: Add order externalDeviceId + value: { "externalDeviceId": "f7f0c608-aa9c-4812-bbb6-b1e700d21da0"} responses: "200": description: OK @@ -1357,14 +1390,16 @@ paths: schema: $ref: "#/components/schemas/unavailable" examples: - Concept order with OVpas and PAD: + Update order languageId: value: { "validContents": false, "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", "externalOrderId": null, "orderNumber": "ORD-123456", - "customerProfileId": 1337, + "customerProfileId": 1337, + "devices": null, + "vouchers":[], "totalAmount": 121, "touchPoint": { @@ -1406,6 +1441,202 @@ paths: "taxAmount": null, "amountExclTax": null, "amountInclTax": 121, + "vouchers":[], + "quantity": 1, + "orderLineTerms": + [ + { + "orderLineTermsId": "cccada2c-d5ea-48ab-b4be-f590e16b5468", + "termsUrl": "generalTermsAndConditions.pdf", + }, + { + "orderLineTermsId": "bd76f723-9308-4629-a291-4c4fafd7ed87", + "termsUrl": "productTermsAndConditions.pdf", + }, + ], + "createdOn": "2024-03-22T09:00:00", + "validFrom": "2024-03-22T09:00:00", + "validUntil": null, + "orderLineStatus": + { "orderLineStatusId": 1, "name": "pending" }, + "customerTokens": + [ + { + "customerTokenId": "878ad7c1-cd8f-4bcf-a983-1bd8c6e6975e", + "tokenType": + { "tokenTypeId": 1, "name": "EMV" }, + "ovPayTokenId": 1, + "serviceReferenceId": "NLOV1234567ABCDEFG", + "amount": 34, + "ovpasNumber": "OV34567", + "verificationCode": "A7H6", + "personalAccountData": + { + "personalAccountDataId": "47db8a40-3238-4bf5-9284-759e3888bd47", + "name": "Jan de Vries", + "birthdate": "1970-01-01", + "photo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAWJLR0Q+SWQA4wAAAAd0SU1FB+YCBAwmK58TFQgAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjItMDItMDRUMTI6Mzg6NDMrMDA6MDBAjYOrAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIyLTAyLTA0VDEyOjM4OjQzKzAwOjAwMdA7FwAAAFd6VFh0UmF3IHByb2ZpbGUgdHlwZSBpcHRjAAB4nOPyDAhxVigoyk/LzEnlUgADIwsuYwsTIxNLkxQDEyBEgDTDZAMjs1Qgy9jUyMTMxBzEB8uASKBKLgDqFxF08kI1lQAAAYdpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0n77u/JyBpZD0nVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkJz8+DQo8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIj48cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPjxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSJ1dWlkOmZhZjViZGQ1LWJhM2QtMTFkYS1hZDMxLWQzM2Q3NTE4MmYxYiIgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iPjx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+PC9yZGY6RGVzY3JpcHRpb24+PC9yZGY6UkRGPjwveDp4bXBtZXRhPg0KPD94cGFja2V0IGVuZD0ndyc/PiyUmAsAAAANSURBVBhXY3grk/YfAAXYAm/HQierAAAAAElFTkSuQmCC", + "challengeType": + { + "challengeTypeId": 1, + "name": "email", + }, + "oneTimePassword": "H5Iiz3JTaQeIV8p", + }, + "ovPayToken": + { + "customerProfileId": 1, + "ovPayTokenId": 1, + "xTat": "32089cc8-d187-47ff-a3a9-5c2558def811", + "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, + }, + }, + }, + ], + "orderAccountingStatuses": [], + "validationResult": "invalid", + "additionalRemarks": + [ + { + "code": "MANDATE_REQUIRED", + "parameter": "directDebitMandateId", + }, + ], + "validationErrors": + [ + { + "detail": "Startdate of this product should be at most 60 days in the future.", + "pointer": "#/0/startDate", + }, + ], + }, + ], + "payments": [], + "orderCustomer": null, + } + Add externalDeviceId: + value: + { + "validContents": false, + "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", + "externalOrderId": null, + "orderNumber": "ORD-123456", + "customerProfileId": 1337, + "devices": { + "externalDeviceId": "f7f0c608-aa9c-4812-bbb6-b1e700d21da0", + "alias": null }, + "vouchers":[], + "totalAmount": 121, + "touchPoint": + { + "salesTouchpointId": 3, + "name": "Website (Perplex)", + "isActive": true, + "retailerId": 1001, + }, + "language": + { + "languageId": 1, + "name": "Nederlands", + "iso639Code": "nl-NL", + "ietfCode": "nl", + }, + "createdOn": "2024-03-22T09:00:00", + "lastUpdatedOn": "2024-03-22T09:00:00", + "order_OrderStatuses": + [ + { + "order_orderStatusId": "f1d0e1a7-a3cf-4876-b8f2-073add10667f", + "orderStatus": + { "orderStatusId": 1, "name": "concept" }, + "createdOn": "2024-03-22T09:00:00", + "description": "Order is aangemaakt", + }, + ], + "orderLines": + [ + { + "orderLineId": "cccada2c-d5ea-48ab-b4be-f590e16b5468", + "externalOrderLineId": null, + "productId": 1, + "productName": "HTM Maandkorting 20%", + "fikoArticleNumber": "6609", + "productDescription": "HTM Maandkorting 20%", + "taxCode": "V21", + "taxPercentage": 21.0000, + "taxAmount": null, + "amountExclTax": null, + "amountInclTax": 121, + "vouchers":[], "quantity": 1, "orderLineTerms": [ @@ -1639,6 +1870,7 @@ paths: { "externalOrderLineId": null, "productId": 2, + "vouchers":[], "quantity": 1, "validFrom": "2024-03-22T09:00:00", "validUntil": null, @@ -1662,6 +1894,7 @@ paths: value: { "productId": 2, + "vouchers":[], "quantity": 1, "createdOn": "2024-03-22T09:00:00", } @@ -1682,7 +1915,9 @@ paths: "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", "externalOrderId": null, "orderNumber": "ORD-123456", - "customerProfileId": 1337, + "customerProfileId": 1337, + "devices": null, + "vouchers":[], "totalAmount": 121, "touchPoint": { @@ -1724,6 +1959,7 @@ paths: "taxAmount": null, "amountExclTax": null, "amountInclTax": 121, + "vouchers":[], "quantity": 1, "orderLineTerms": [ @@ -1856,7 +2092,11 @@ paths: "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", "externalOrderId": null, "orderNumber": "ORD-123456", - "customerProfileId": 1337, + "customerProfileId": 1337, + "devices":{ + "externalDeviceId": "8fe1e754-0070-478c-bdba-4ebd89c994f0", + "alias": "Mijn Android" }, + "vouchers":[], "totalAmount": 121, "touchPoint": { @@ -1898,6 +2138,7 @@ paths: "taxAmount": null, "amountExclTax": null, "amountInclTax": 121, + "vouchers":[], "quantity": 1, "orderLineTerms": [ @@ -2076,7 +2317,7 @@ paths: description: The JWT of the logged in customer (in case of a web shop). patch: tags: - - Order Creation Flow + - OrderLine summary: Update an existing order line. description: Update an existing order line. requestBody: @@ -2091,6 +2332,7 @@ paths: value: { "productId": 21, + "vouchers":[], "quantity": 1, "validFrom": "2024-03-25T09:00:00", "validUntil": null, @@ -2110,7 +2352,11 @@ paths: "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", "externalOrderId": null, "orderNumber": "ORD-123456", - "customerProfileId": 1337, + "customerProfileId": 1337, + "devices":{ + "externalDeviceId": "8fe1e754-0070-478c-bdba-4ebd89c994f0", + "alias": "Mijn Android" }, + "vouchers":[], "totalAmount": 121, "touchPoint": { @@ -2152,6 +2398,7 @@ paths: "taxAmount": null, "amountExclTax": null, "amountInclTax": 5900, + "vouchers":[], "quantity": 1, "orderLineTerms": [ @@ -2217,7 +2464,7 @@ paths: } delete: tags: - - Order Creation Flow + - OrderLine summary: Delete an existing order line. description: Delete an existing order line. responses: @@ -2235,7 +2482,11 @@ paths: "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", "externalOrderId": null, "orderNumber": "ORD-123456", - "customerProfileId": 1337, + "customerProfileId": 1337, + "devices":{ + "externalDeviceId": "8fe1e754-0070-478c-bdba-4ebd89c994f0", + "alias": "Mijn Android" }, + "vouchers":[], "totalAmount": 0, "touchPoint": { @@ -2308,7 +2559,7 @@ paths: description: The JWT of the logged in customer (in case of a web shop). post: tags: - - Order Creation Flow + - OrderLine summary: Add a customer token to an orderLine. description: Add a customer token to an orderLine. requestBody: @@ -2354,7 +2605,11 @@ paths: "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", "externalOrderId": null, "orderNumber": "ORD-123456", - "customerProfileId": 1337, + "customerProfileId": 1337, + "devices":{ + "externalDeviceId": "8fe1e754-0070-478c-bdba-4ebd89c994f0", + "alias": "Mijn Android" }, + "vouchers":[], "totalAmount": 121, "touchPoint": { @@ -2396,6 +2651,7 @@ paths: "taxAmount": null, "amountExclTax": null, "amountInclTax": 121, + "vouchers":[], "quantity": 1, "orderLineTerms": [ @@ -2519,10 +2775,10 @@ paths: "payments": [], "orderCustomer": null, } - /customertokens/{customerTokenId}: + /orderlines/{orderLineId}/vouchers: parameters: - in: path - name: customerTokenId + name: orderLineId required: true style: simple explode: false @@ -2536,26 +2792,23 @@ paths: type: string example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c description: The JWT of the logged in customer (in case of a web shop). - patch: + post: tags: - - Order Creation Flow - summary: Update a customer token. - description: Update a customer token. + - OrderLine + summary: Add a new voucher to an existing orderLine. + description: Add a new voucher to an existing orderLine. requestBody: content: application/json: schema: $ref: "#/components/schemas/unavailable" examples: - Update a customer token: - summary: Update a customer token - description: Update a customer token + Add voucher to orderLine: + summary: Add voucher to orderLine to receive voucher benefits for a specific product + description: Add voucher to orderLine to receive voucher benefits for a specific product value: { - "tokenTypeId": 1, - "ovPayTokenId": null, - "serviceReferenceId": "NLOV1234567ABCDEFG", - "amount": 34, + "voucherCode": "VOUCHER786" } responses: "200": @@ -2565,14 +2818,19 @@ paths: schema: $ref: "#/components/schemas/unavailable" examples: - Order with updated customer token: + Add voucher to orderLine: + summary: Add voucher to orderLine + description: Add voucher to orderLine value: { - "validContents": true, + "validContents": false, "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", "externalOrderId": null, "orderNumber": "ORD-123456", - "customerProfileId": 1337, + "customerProfileId": 1337, + "devices": null, + "vouchers":[ + ], "totalAmount": 121, "touchPoint": { @@ -2614,6 +2872,780 @@ paths: "taxAmount": null, "amountExclTax": null, "amountInclTax": 121, + "vouchers":[ + { + "orderVoucherId": "d271c79d-2d3f-477b-8e29-73c9b409a758", + "issuedVoucherId": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90", + "voucherCode": "VOUCHER786", + "fromInclusive": "2024-10-04T00:00:00.000", + "untilInclusive": "2024-11-04T00:00:00.000", + "voucherStatus": + { "voucherStatusId": 1, "name": "New" }, + "product": + { + "productId": 263, + "productName": "HTM-80001", + "productDescription": "10 euro korting op HTM maandkorting 20%", + "productCategory": + { + "productCategoryId": 9, + "isTravelProduct": false, + "name": "Voucher", + }, + "amountInclTax": -1000, + "requiredProducts": + [ + { + "productId": 1, + "productName": "HTM-30001", + "productDescription": "HTM Maandkorting 20%", + "_links": + { + "get_details": + { + "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/products/1", + "method": "GET", + }, + }, + }, + ], + "_links": + { + "get_details": + { + "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/products/263", + "method": "GET", + }, + }, + }, + "mandatoryCustomerDataItems": + [ + { + "mandatoryCustomerDataItemId": 8, + "customerDataItem": "padBirthDate" + }, + { + "mandatoryCustomerDataItemId": 4, + "customerDataItem": "emailAddress" + }, + ], + } + ], + "quantity": 1, + "orderLineTerms": + [ + { + "orderLineTermsId": "cccada2c-d5ea-48ab-b4be-f590e16b5468", + "termsUrl": "generalTermsAndConditions.pdf", + }, + { + "orderLineTermsId": "bd76f723-9308-4629-a291-4c4fafd7ed87", + "termsUrl": "productTermsAndConditions.pdf", + }, + ], + "createdOn": "2024-03-22T09:00:00", + "validFrom": "2024-03-22T09:00:00", + "validUntil": null, + "orderLineStatus": + { "orderLineStatusId": 1, "name": "pending" }, + "customerTokens": + [ + { + "customerTokenId": "878ad7c1-cd8f-4bcf-a983-1bd8c6e6975e", + "tokenType": + { "tokenTypeId": 1, "name": "EMV" }, + "ovPayTokenId": 12, + "serviceReferenceId": null, + "amount": null, + "ovpasNumber": null, + "verificationCode": null, + "personalAccountData": null, + "ovPayToken": + { + "customerProfileId": 1, + "ovPayTokenId": 1, + "xTat": "32089cc8-d187-47ff-a3a9-5c2558def811", + "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, + }, + }, + }, + ], + "orderAccountingStatuses": [], + "validationResult": "preliminary", + "additionalRemarks": + [ + { + "code": "PRODUCT_CHOICE_REQUIRED", + "parameter": "orderline.productId", + }, + ], + "validationErrors": [], + }, + ], + "payments": [], + "orderCustomer": null, + } + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "type": "https://htm.nl/api/v1/probs/validationerror", + "title": "Your request is not valid.", + "detail": "The combination of tokens and/or products chosen is not valid. See errors for more details.", + "instance": "urn:uuid:4017fabc-1b28-11e8-accf-0ed5f89f718b", + "errors": + [ + { + "detail": "Startdate of this product should be at most 60 days in the future.", + "pointer": "#/0/startDate", + "ovPayTokenId": 123, + "productId": 2, + }, + { + "detail": "Combination of product and token type is not valid.", + "pointer": "#/1/ovPayTokenId", + "ovPayTokenId": 123, + "productId": 3, + }, + ], + } + /orders/{orderId}/vouchers: + parameters: + - in: path + name: orderId + required: true + style: simple + explode: false + schema: + type: string + format: uuid + example: a0ef57fa-395c-4a03-96e9-234c26dccea9 + - in: header + name: X-HTM-JWT-AUTH-HEADER + schema: + type: string + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + description: The JWT of the logged in customer (in case of a web shop). + post: + tags: + - Order Creation Flow + summary: Add a new voucher to an existing order. + description: Add a new voucher to an existing order. + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + examples: + Add voucher to concept order: + summary: Add voucher to orderLine to receive voucher benefits for a whole order + description: Add voucher to orderLine to receive voucher benefits for a whole order + value: + { + "voucherCode": "VOUCHER123" + } + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + examples: + Add voucher to concept order: + summary: Add voucher to concept order + description: Add voucher to concept order + value: + { + "validContents": false, + "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", + "externalOrderId": null, + "orderNumber": "ORD-123456", + "customerProfileId": 1337, + "devices": null, + "vouchers":[ + { + "orderVoucherId": "d271c79d-2d3f-477b-8e29-73c9b409a758", + "issuedVoucherId": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90", + "voucherCode": "VOUCHER123", + "fromInclusive": "2024-10-04T00:00:00.000", + "untilInclusive": "2024-11-04T00:00:00.000", + "voucherStatus": + { "voucherStatusId": 1, "name": "New" }, + "product": + { + "productId": 269, + "productName": "HTM-80001", + "productDescription": "10 euro korting op je gehel order", + "productCategory": + { + "productCategoryId": 9, + "isTravelProduct": false, + "name": "Voucher", + }, + "amountInclTax": -1000, + "requiredProducts": + [ + ], + }, + "mandatoryCustomerDataItems": + [ + ], + } + ], + "totalAmount": 21, + "touchPoint": + { + "salesTouchpointId": 3, + "name": "Website (Perplex)", + "isActive": true, + "retailerId": 1001, + }, + "language": + { + "languageId": 1, + "name": "Nederlands", + "iso639Code": "nl-NL", + "ietfCode": "nl", + }, + "createdOn": "2024-03-22T09:00:00", + "lastUpdatedOn": "2024-03-22T09:00:00", + "order_OrderStatuses": + [ + { + "order_orderStatusId": "f1d0e1a7-a3cf-4876-b8f2-073add10667f", + "orderStatus": + { "orderStatusId": 1, "name": "concept" }, + "createdOn": "2024-03-22T09:00:00", + "description": "Order is aangemaakt", + }, + ], + "orderLines": + [ + { + "orderLineId": "cccada2c-d5ea-48ab-b4be-f590e16b5468", + "externalOrderLineId": null, + "productId": 1, + "productName": "HTM Maandkorting 20%", + "fikoArticleNumber": "6609", + "productDescription": "HTM Maandkorting 20%", + "taxCode": "V21", + "taxPercentage": 21.0000, + "taxAmount": null, + "amountExclTax": null, + "amountInclTax": 121, + "vouchers":[], + "quantity": 1, + "orderLineTerms": + [ + { + "orderLineTermsId": "cccada2c-d5ea-48ab-b4be-f590e16b5468", + "termsUrl": "generalTermsAndConditions.pdf", + }, + { + "orderLineTermsId": "bd76f723-9308-4629-a291-4c4fafd7ed87", + "termsUrl": "productTermsAndConditions.pdf", + }, + ], + "createdOn": "2024-03-22T09:00:00", + "validFrom": "2024-03-22T09:00:00", + "validUntil": null, + "orderLineStatus": + { "orderLineStatusId": 1, "name": "pending" }, + "customerTokens": + [ + { + "customerTokenId": "878ad7c1-cd8f-4bcf-a983-1bd8c6e6975e", + "tokenType": + { "tokenTypeId": 1, "name": "EMV" }, + "ovPayTokenId": 12, + "serviceReferenceId": null, + "amount": null, + "ovpasNumber": null, + "verificationCode": null, + "personalAccountData": null, + "ovPayToken": + { + "customerProfileId": 1, + "ovPayTokenId": 1, + "xTat": "32089cc8-d187-47ff-a3a9-5c2558def811", + "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, + }, + }, + }, + ], + "orderAccountingStatuses": [], + "validationResult": "preliminary", + "additionalRemarks": + [ + { + "code": "PRODUCT_CHOICE_REQUIRED", + "parameter": "orderline.productId", + }, + ], + "validationErrors": [], + }, + ], + "payments": [], + "orderCustomer": null, + } + Create order line with minimum requirements: + summary: Create order line with minimum requirements + description: AddRemark for case where chosen product requires personal account data birthdate + value: + { + "validContents": false, + "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", + "externalOrderId": null, + "orderNumber": "ORD-123456", + "customerProfileId": 1337, + "devices":{ + "externalDeviceId": "8fe1e754-0070-478c-bdba-4ebd89c994f0", + "alias": "Mijn Android" }, + "vouchers":[], + "totalAmount": 121, + "touchPoint": + { + "salesTouchpointId": 3, + "name": "Website (Perplex)", + "isActive": true, + "retailerId": 1001, + }, + "language": + { + "languageId": 1, + "name": "Nederlands", + "iso639Code": "nl-NL", + "ietfCode": "nl", + }, + "createdOn": "2024-03-22T09:00:00", + "lastUpdatedOn": "2024-03-22T09:00:00", + "order_OrderStatuses": + [ + { + "order_orderStatusId": "f1d0e1a7-a3cf-4876-b8f2-073add10667f", + "orderStatus": + { "orderStatusId": 1, "name": "concept" }, + "createdOn": "2024-03-22T09:00:00", + "description": "Order is aangemaakt", + }, + ], + "orderLines": + [ + { + "orderLineId": "cccada2c-d5ea-48ab-b4be-f590e16b5468", + "externalOrderLineId": null, + "productId": 1, + "productName": "HTM Maandkorting 20%", + "fikoArticleNumber": "6609", + "productDescription": "HTM Maandkorting 20%", + "taxCode": "V21", + "taxPercentage": 21.0000, + "taxAmount": null, + "amountExclTax": null, + "amountInclTax": 121, + "vouchers":[], + "quantity": 1, + "orderLineTerms": + [ + { + "orderLineTermsId": "cccada2c-d5ea-48ab-b4be-f590e16b5468", + "termsUrl": "generalTermsAndConditions.pdf", + }, + { + "orderLineTermsId": "bd76f723-9308-4629-a291-4c4fafd7ed87", + "termsUrl": "productTermsAndConditions.pdf", + }, + ], + "createdOn": "2024-03-22T09:00:00", + "validFrom": "2024-03-22T09:00:00", + "validUntil": null, + "orderLineStatus": + { "orderLineStatusId": 1, "name": "pending" }, + "customerTokens": + [ + { + "customerTokenId": "878ad7c1-cd8f-4bcf-a983-1bd8c6e6975e", + "tokenType": + { "tokenTypeId": 1, "name": "EMV" }, + "ovPayTokenId": 12, + "serviceReferenceId": null, + "amount": null, + "ovpasNumber": null, + "verificationCode": null, + "personalAccountData": null, + "ovPayToken": + { + "customerProfileId": 1, + "ovPayTokenId": 4, + "xTat": "32089cc8-d187-47ff-a3a9-5c2558def811", + "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, + }, + }, + }, + ], + "orderAccountingStatuses": [], + "validationResult": "preliminary", + "additionalRemarks": + [ + { + "code": "PERSONALACCOUNTDATA_BIRTHDATE_REQUIRED", + "parameter": "personalaccountdata.birthdate", + }, + { + "code": "TOKEN_REQUIRED", + "parameter": "customerToken", + }, + { + "code": "VALIDFROM_REQUIRED", + "parameter": "orderline.validFrom", + }, + ], + "validationErrors": [], + }, + ], + "payments": [], + "orderCustomer": null, + } + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "type": "https://htm.nl/api/v1/probs/validationerror", + "title": "Your request is not valid.", + "detail": "The combination of tokens and/or products chosen is not valid. See errors for more details.", + "instance": "urn:uuid:4017fabc-1b28-11e8-accf-0ed5f89f718b", + "errors": + [ + { + "detail": "Startdate of this product should be at most 60 days in the future.", + "pointer": "#/0/startDate", + "ovPayTokenId": 123, + "productId": 2, + }, + { + "detail": "Combination of product and token type is not valid.", + "pointer": "#/1/ovPayTokenId", + "ovPayTokenId": 123, + "productId": 3, + }, + ], + } + /customertokens/{customerTokenId}: + parameters: + - in: path + name: customerTokenId + required: true + style: simple + explode: false + schema: + type: string + format: uuid + example: a0ef57fa-395c-4a03-96e9-234c26dccea9 + - in: header + name: X-HTM-JWT-AUTH-HEADER + schema: + type: string + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + description: The JWT of the logged in customer (in case of a web shop). + patch: + tags: + - OrderLine + summary: Update a customer token. + description: Update a customer token. + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + examples: + Update a customer token: + summary: Update a customer token + description: Update a customer token + value: + { + "tokenTypeId": 1, + "ovPayTokenId": null, + "serviceReferenceId": "NLOV1234567ABCDEFG", + "amount": 34, + } + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + examples: + Order with updated customer token: + value: + { + "validContents": true, + "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", + "externalOrderId": null, + "orderNumber": "ORD-123456", + "customerProfileId": 1337, + "devices":{ + "externalDeviceId": "8fe1e754-0070-478c-bdba-4ebd89c994f0", + "alias": "Mijn Android" }, + "vouchers":[], + "totalAmount": 121, + "touchPoint": + { + "salesTouchpointId": 3, + "name": "Website (Perplex)", + "isActive": true, + "retailerId": 1001, + }, + "language": + { + "languageId": 1, + "name": "Nederlands", + "iso639Code": "nl-NL", + "ietfCode": "nl", + }, + "createdOn": "2024-03-22T09:00:00", + "lastUpdatedOn": "2024-03-22T09:00:00", + "order_OrderStatuses": + [ + { + "order_orderStatusId": "f1d0e1a7-a3cf-4876-b8f2-073add10667f", + "orderStatus": + { "orderStatusId": 1, "name": "concept" }, + "createdOn": "2024-03-22T09:00:00", + "description": "Order is aangemaakt", + }, + ], + "orderLines": + [ + { + "orderLineId": "cccada2c-d5ea-48ab-b4be-f590e16b5468", + "externalOrderLineId": null, + "productId": 1, + "productName": "HTM Maandkorting 20%", + "fikoArticleNumber": "6609", + "productDescription": "HTM Maandkorting 20%", + "taxCode": "V21", + "taxPercentage": 21.0000, + "taxAmount": null, + "amountExclTax": null, + "amountInclTax": 121, + "vouchers":[], "quantity": 1, "orderLineTerms": [ @@ -2730,7 +3762,7 @@ paths: } delete: tags: - - Order Creation Flow + - OrderLine summary: Delete a customer token from an orderline. description: Delete a customer token from an orderline. responses: @@ -2748,7 +3780,11 @@ paths: "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", "externalOrderId": null, "orderNumber": "ORD-123456", - "customerProfileId": 1337, + "customerProfileId": 1337, + "devices":{ + "externalDeviceId": "8fe1e754-0070-478c-bdba-4ebd89c994f0", + "alias": "Mijn Android" }, + "vouchers":[], "totalAmount": 121, "touchPoint": { @@ -2790,6 +3826,7 @@ paths: "taxAmount": null, "amountExclTax": null, "amountInclTax": 121, + "vouchers":[], "quantity": 1, "orderLineTerms": [ @@ -2842,7 +3879,7 @@ paths: description: The JWT of the logged in customer (in case of a web shop). post: tags: - - Order Creation Flow + - OrderLine summary: Add personal account data to a customer token. description: Add personal account data to a customer token. requestBody: @@ -2877,7 +3914,11 @@ paths: "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", "externalOrderId": null, "orderNumber": "ORD-123456", - "customerProfileId": 1337, + "customerProfileId": 1337, + "devices":{ + "externalDeviceId": "8fe1e754-0070-478c-bdba-4ebd89c994f0", + "alias": "Mijn Android" }, + "vouchers":[], "totalAmount": 121, "touchPoint": { @@ -2919,6 +3960,7 @@ paths: "taxAmount": null, "amountExclTax": null, "amountInclTax": 121, + "vouchers":[], "quantity": 1, "orderLineTerms": [ @@ -3063,7 +4105,7 @@ paths: description: The JWT of the logged in customer (in case of a web shop). patch: tags: - - Order Creation Flow + - OrderLine summary: Update personal account data. description: Update personal account data. requestBody: @@ -3091,7 +4133,11 @@ paths: "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", "externalOrderId": null, "orderNumber": "ORD-123456", - "customerProfileId": 1337, + "customerProfileId": 1337, + "devices":{ + "externalDeviceId": "8fe1e754-0070-478c-bdba-4ebd89c994f0", + "alias": null }, + "vouchers":[], "totalAmount": 121, "touchPoint": { @@ -3133,6 +4179,7 @@ paths: "taxAmount": null, "amountExclTax": null, "amountInclTax": 121, + "vouchers":[], "quantity": 1, "orderLineTerms": [ @@ -3266,7 +4313,7 @@ paths: } delete: tags: - - Order Creation Flow + - OrderLine summary: Delete personal account data. description: Delete personal account data. responses: @@ -3284,7 +4331,11 @@ paths: "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", "externalOrderId": null, "orderNumber": "ORD-123456", - "customerProfileId": 1337, + "customerProfileId": 1337, + "devices":{ + "externalDeviceId": "8fe1e754-0070-478c-bdba-4ebd89c994f0", + "alias": "Mijn Android" }, + "vouchers":[], "totalAmount": 121, "touchPoint": { @@ -3326,6 +4377,7 @@ paths: "taxAmount": null, "amountExclTax": null, "amountInclTax": 121, + "vouchers":[], "quantity": 1, "orderLineTerms": [ @@ -3501,7 +4553,11 @@ paths: "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", "externalOrderId": null, "orderNumber": "ORD-123456", - "customerProfileId": 1337, + "customerProfileId": 1337, + "devices":{ + "externalDeviceId": "8fe1e754-0070-478c-bdba-4ebd89c994f0", + "alias": "Mijn Android" }, + "vouchers":[], "totalAmount": 121, "touchPoint": { @@ -3550,6 +4606,7 @@ paths: "taxAmount": null, "amountExclTax": null, "amountInclTax": 121, + "vouchers":[], "quantity": 1, "orderLineTerms": [ @@ -3611,6 +4668,7 @@ paths: "taxAmount": null, "amountExclTax": null, "amountInclTax": 242, + "vouchers":[], "quantity": 1, "orderLineTerms": [ @@ -3688,7 +4746,7 @@ paths: { "orderCustomerAddressId": "94270188-4cf6-447e-bd49-e8186bcec073", "addressType": - { "addressTypeId": 2, "name": "Billing" }, + { "addressTypeId": 3, "name": "Billing" }, "street": "Kon. Julianaplein", "houseNumber": 10, "houseNumberSuffix": "a", @@ -3781,7 +4839,11 @@ paths: "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", "externalOrderId": null, "orderNumber": "ORD-123456", - "customerProfileId": 1337, + "customerProfileId": 1337, + "devices":{ + "externalDeviceId": "8fe1e754-0070-478c-bdba-4ebd89c994f0", + "alias": "Mijn Android" }, + "vouchers":[], "totalAmount": 121, "touchPoint": { @@ -3837,6 +4899,7 @@ paths: "taxAmount": null, "amountExclTax": null, "amountInclTax": 121, + "vouchers":[], "quantity": 1, "orderLineTerms": [ @@ -3965,7 +5028,7 @@ paths: { "orderCustomerAddressId": "94270188-4cf6-447e-bd49-e8186bcec073", "addressTypeId": - { "addressTypeId": 2, "name": "Billing" }, + { "addressTypeId": 3, "name": "Billing" }, "street": "Kon. Julianaplein", "houseNumber": 10, "houseNumberSuffix": "a", @@ -3983,7 +5046,11 @@ paths: "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", "externalOrderId": "be8160b3-a7f7-4a63-ad63-09503b2fc4a3", "orderNumber": "ORD-123456", - "customerProfileId": 1337, + "customerProfileId": 1337, + "devices":{ + "externalDeviceId": "8fe1e754-0070-478c-bdba-4ebd89c994f0", + "alias": "Mijn Android" }, + "vouchers":[], "totalAmount": 121, "touchPoint": { @@ -4025,6 +5092,7 @@ paths: "taxAmount": null, "amountExclTax": null, "amountInclTax": 121, + "vouchers":[], "quantity": 1, "orderLineTerms": [ @@ -4174,7 +5242,7 @@ paths: { "orderCustomerAddressId": "94270188-4cf6-447e-bd49-e8186bcec073", "addressTypeId": - { "addressTypeId": 2, "name": "Billing" }, + { "addressTypeId": 3, "name": "Billing" }, "street": "Kon. Julianaplein", "houseNumber": 10, "houseNumberSuffix": "a", @@ -4226,7 +5294,7 @@ paths: "orderCustomerAddresses": [ { - "addressTypeId": 2, + "addressTypeId": 3, "street": "Kon. Julianaplein", "houseNumber": 10, "houseNumberSuffix": "a", @@ -4251,7 +5319,11 @@ paths: "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", "externalOrderId": null, "orderNumber": "ORD-123456", - "customerProfileId": 1337, + "customerProfileId": 1337, + "devices":{ + "externalDeviceId": "8fe1e754-0070-478c-bdba-4ebd89c994f0", + "alias": "Mijn Android" }, + "vouchers":[], "totalAmount": 121, "touchPoint": { @@ -4293,6 +5365,7 @@ paths: "taxAmount": null, "amountExclTax": null, "amountInclTax": 121, + "vouchers":[], "quantity": 1, "orderLineTerms": [ @@ -4433,7 +5506,7 @@ paths: { "orderCustomerAddressId": "94270188-4cf6-447e-bd49-e8186bcec073", "addressType": - { "addressTypeId": 2, "name": "Billing" }, + { "addressTypeId": 3, "name": "Billing" }, "street": "Kon. Julianaplein", "houseNumber": 10, "houseNumberSuffix": "a", @@ -4498,7 +5571,11 @@ paths: "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", "externalOrderId": null, "orderNumber": "ORD-123456", - "customerProfileId": 1337, + "customerProfileId": 1337, + "devices":{ + "externalDeviceId": "8fe1e754-0070-478c-bdba-4ebd89c994f0", + "alias": "Mijn Android" }, + "vouchers":[], "totalAmount": 121, "touchPoint": { @@ -4540,6 +5617,7 @@ paths: "taxAmount": null, "amountExclTax": null, "amountInclTax": 121, + "vouchers":[], "quantity": 1, "orderLineTerms": [ @@ -4680,7 +5758,7 @@ paths: { "orderCustomerAddressId": "94270188-4cf6-447e-bd49-e8186bcec073", "addressType": - { "addressTypeId": 2, "name": "Billing" }, + { "addressTypeId": 3, "name": "Billing" }, "street": "Kon. Julianaplein", "houseNumber": 10, "houseNumberSuffix": "a", @@ -4724,7 +5802,7 @@ paths: description: Add an address to a customer on an order value: { - "addressTypeId": 2, + "addressTypeId": 3, "street": "Kon. Julianaplein", "houseNumber": 10, "houseNumberSuffix": "a", @@ -4747,7 +5825,11 @@ paths: "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", "externalOrderId": null, "orderNumber": "ORD-123456", - "customerProfileId": 1337, + "customerProfileId": 1337, + "devices":{ + "externalDeviceId": "8fe1e754-0070-478c-bdba-4ebd89c994f0", + "alias": "Mijn Android" }, + "vouchers":[], "totalAmount": 121, "touchPoint": { @@ -4789,6 +5871,7 @@ paths: "taxAmount": null, "amountExclTax": null, "amountInclTax": 121, + "vouchers":[], "quantity": 1, "orderLineTerms": [ @@ -4935,7 +6018,7 @@ paths: { "orderCustomerAddressId": "a0ef57fa-395c-4a03-96e9-234c26dccea9", "addressType": - { "addressTypeId": 2, "name": "Billing" }, + { "addressTypeId": 3, "name": "Billing" }, "street": "Kon. Julianaplein", "houseNumber": 10, "houseNumberSuffix": "a", @@ -4979,7 +6062,7 @@ paths: description: Update order customer address value: { - "addressTypeId": 2, + "addressTypeId": 3, "street": "Kon. Julianaplein", "houseNumber": 101, "houseNumberSuffix": "a", @@ -5002,7 +6085,11 @@ paths: "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", "externalOrderId": null, "orderNumber": "ORD-123456", - "customerProfileId": 1337, + "customerProfileId": 1337, + "devices":{ + "externalDeviceId": "8fe1e754-0070-478c-bdba-4ebd89c994f0", + "alias": "Mijn Android" }, + "vouchers":[], "totalAmount": 121, "touchPoint": { @@ -5044,6 +6131,7 @@ paths: "taxAmount": null, "amountExclTax": null, "amountInclTax": 121, + "vouchers":[], "quantity": 1, "orderLineTerms": [ @@ -5190,7 +6278,7 @@ paths: { "orderCustomerAddressId": "94270188-4cf6-447e-bd49-e8186bcec073", "addressType": - { "addressTypeId": 2, "name": "Billing" }, + { "addressTypeId": 3, "name": "Billing" }, "street": "Kon. Julianaplein", "houseNumber": 101, "houseNumberSuffix": "a", @@ -5237,7 +6325,11 @@ paths: "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", "externalOrderId": null, "orderNumber": "ORD-123456", - "customerProfileId": 1337, + "customerProfileId": 1337, + "devices":{ + "externalDeviceId": "8fe1e754-0070-478c-bdba-4ebd89c994f0", + "alias": "Mijn Android" }, + "vouchers":[], "totalAmount": 0, "touchPoint": { @@ -5300,6 +6392,207 @@ paths: }, ], } + /orderVoucher/{orderVoucherId}: + parameters: + - in: path + name: orderVoucherId + required: true + style: simple + explode: false + schema: + type: string + format: uuid + example: d9021fdd-6e83-45c0-9aef-71680f0b4e74 + - in: header + name: X-HTM-JWT-AUTH-HEADER + schema: + type: string + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + description: The JWT of the logged in customer (in case of a web shop). + delete: + tags: + - OrderVoucher + summary: Delete voucher from order or orderLine + description: Deletevoucher from order or orderLine + responses: + "200": + description: Ok + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + examples: + Order with deleted voucher: + value: + { + "validContents": true, + "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", + "externalOrderId": null, + "orderNumber": "ORD-123456", + "customerProfileId": 1337, + "devices":{ + "externalDeviceId": "8fe1e754-0070-478c-bdba-4ebd89c994f0", + "alias": "Mijn Android" }, + "vouchers":[], + "totalAmount": 121, + "touchPoint": + { + "salesTouchpointId": 3, + "name": "Website (Perplex)", + "isActive": true, + "retailerId": 1001, + }, + "language": + { + "languageId": 1, + "name": "Nederlands", + "iso639Code": "nl-NL", + "ietfCode": "nl", + }, + "createdOn": "2024-03-22T09:00:00", + "lastUpdatedOn": "2024-03-22T09:00:00", + "order_OrderStatuses": + [ + { + "order_orderStatusId": "f1d0e1a7-a3cf-4876-b8f2-073add10667f", + "orderStatus": + { "orderStatusId": 1, "name": "concept" }, + "createdOn": "2024-03-22T09:00:00", + "description": "Order is aangemaakt", + }, + ], + "orderLines": + [ + { + "orderLineId": "cccada2c-d5ea-48ab-b4be-f590e16b5468", + "externalOrderLineId": null, + "productId": 1, + "productName": "HTM Maandkorting 20%", + "fikoArticleNumber": "6609", + "productDescription": "HTM Maandkorting 20%", + "taxCode": "V21", + "taxPercentage": 21.0000, + "taxAmount": null, + "amountExclTax": null, + "amountInclTax": 121, + "vouchers":[], + "quantity": 1, + "orderLineTerms": + [ + { + "orderLineTermsId": "cccada2c-d5ea-48ab-b4be-f590e16b5468", + "termsUrl": "generalTermsAndConditions.pdf", + }, + { + "orderLineTermsId": "bd76f723-9308-4629-a291-4c4fafd7ed87", + "termsUrl": "productTermsAndConditions.pdf", + }, + ], + "createdOn": "2024-03-22T09:00:00", + "validFrom": "2024-03-22T09:00:00", + "validUntil": null, + "orderLineStatus": + { "orderLineStatusId": 1, "name": "pending" }, + "customerTokens": + [ + { + "customerTokenId": "878ad7c1-cd8f-4bcf-a983-1bd8c6e6975e", + "tokenType": + { "tokenTypeId": 1, "name": "EMV" }, + "ovPayTokenId": 12, + "serviceReferenceId": null, + "amount": null, + "ovpasNumber": null, + "verificationCode": null, + "personalAccountData": null, + "ovPayToken": + { + "customerProfileId": 1, + "ovPayTokenId": 1, + "xTat": "32089cc8-d187-47ff-a3a9-5c2558def811", + "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, + }, + }, + }, + ], + "orderAccountingStatuses": [], + "validationResult": "valid", + "additionalRemarks": [], + "validationErrors": [], + }, + ], + "payments": [], + "orderCustomer": null, + } /orders/{orderId}/fulfill: parameters: - in: path diff --git a/src/openapi/products/productreference-crud.yaml b/src/openapi/products/productreference-crud.yaml index b8b7526..2867779 100644 --- a/src/openapi/products/productreference-crud.yaml +++ b/src/openapi/products/productreference-crud.yaml @@ -1820,6 +1820,8 @@ components: customerDataItem: shippingAddress - mandatoryCustomerDataItemId: 10 customerDataItem: billingAddress + - mandatoryCustomerDataItemId: 11 + customerDataItem: startDate items: $ref: '#/components/schemas/mandatoryCustomerDataItemGetEntity' type: array diff --git a/src/openapi/products/purchased_products-crud.yaml b/src/openapi/products/purchased_products-crud.yaml index 478cc54..628a83b 100644 --- a/src/openapi/products/purchased_products-crud.yaml +++ b/src/openapi/products/purchased_products-crud.yaml @@ -128,7 +128,7 @@ paths: "createdOn": "2024-10-04T12:34:56.000", "lastUpdatedOn": "2024-10-04T12:34:56.000", "createdBy": "someuser", - "lastUpdatedBy": null, + "lastUpdatedBy": null }, ], "purchasedTapconnectTickets": [], @@ -154,7 +154,7 @@ paths: "purchasedProductResourceId": "06dae996-cdfe-45f1-833a-720201c35114", "resourceName": { "resourceNameId": 2, "name": "orders" }, - "resourceIdentifier": "f809a6e1-1c8d-4f8e-8a6e-0d0b1e1e1e1e", + "resourceIdentifier": "f809a6e1-1c8d-4f8e-8a6e-0d0b1e1e1e1e" }, ], "purchasedGboProducts": [], @@ -170,6 +170,8 @@ paths: "lastUpdatedOn": "2024-10-04T12:34:56.000", "createdBy": "user", "lastUpdatedBy": "user", + "externalDeviceId": "c5545584-04af-4c60-a955-d6a70baab848", + "serviceId": "HTM-1234-7654-8945" }, ], "issuedVouchers": [], @@ -341,6 +343,8 @@ paths: "lastUpdatedOn": "2024-10-04T12:34:56.000", "createdBy": "user", "lastUpdatedBy": "user", + "externalDeviceId": "c5545584-04af-4c60-a955-d6a70baab848", + "serviceId": "HTM-1234-7654-8945" }, ], "issuedVouchers": [], @@ -775,18 +779,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "issuedAt": "2024-10-04T12:34:56.000", - "activatedAt": "2024-10-04T12:34:56.000", - "cancelledAt": null, - "ticketReference": "KJj43nejhbTxhr897287", - "createdOn": "2024-10-04T12:34:56.000", - "lastUpdatedOn": "2024-10-04T12:34:56.000", - "createdBy": "user", - "lastUpdatedBy": "user", - } + $ref: "#/components/schemas/PostPurchasedTapConnectTicketRequest" responses: "201": description: Created @@ -907,6 +900,18 @@ paths: type: string example: user description: The user that last updated the purchased Tapconnect ticket. + - in: query + name: externalDeviceId + schema: + type: string + example: c5545584-04af-4c60-a955-d6a70baab848 + description: The external id of the device. + - in: query + name: serviceId + schema: + type: string + example: HTM-1234-7654-8945 + description: A printable id that needs to be next to the printed barcode on the ticket, which is used when the customer contacts the service desk. responses: "200": description: OK @@ -929,6 +934,8 @@ paths: "lastUpdatedOn": "2024-10-04T12:34:56.000", "createdBy": "user", "lastUpdatedBy": "user", + "externalDeviceId": "c5545584-04af-4c60-a955-d6a70baab848", + "serviceId": "HTM-1234-7654-8945" }, ], } @@ -968,7 +975,7 @@ paths: $ref: "#/components/schemas/unavailable" example: { - "purchasedTapconnectTicketId": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90", + "purchasedTapconnectTicketId": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90" } /purchasedproducts/{purchasedProductId}/issuedvouchers: parameters: @@ -1178,6 +1185,51 @@ components: schemas: unavailable: type: object + PostPurchasedTapConnectTicketRequest: + type: object + required: + - issuedAt + - ticketReference + - createdOn + - lastUpdatedOn + - createdBy + - serviceId + properties: + issuedAt: + type: string + format: date-time + example: 2024-10-04T12:34:56.000 + activatedAt: + type: string + format: date-time + example: 2024-10-04T12:34:56.000 + cancelledAt: + type: string + format: date-time + example: 2024-10-04T12:34:56.000 + ticketReference: + type: string + example: KJj43nejhbTxhr897287 + createdOn: + type: string + format: date-time + example: 2024-10-04T12:34:56.000 + lastUpdatedOn: + type: string + format: date-time + example: 2024-10-04T12:34:56.000 + createdBy: + type: string + example: John Doe + lastUpdatedBy: + type: string + example: John Doe + externalDeviceId: + type: string + example: c5545584-04af-4c60-a955-d6a70baab848 + serviceId: + type: string + example: HTM-1234-7654-8945 BulkResponseBody: type: object properties: