From bb917c3635a31bb2317e2be5d3734da1c605f3ee Mon Sep 17 00:00:00 2001 From: Mirjam Herald Date: Mon, 1 Dec 2025 13:35:41 +0100 Subject: [PATCH 1/8] updated CRUD order swaggers for vouchers --- src/openapi/orders/orders-crud.yaml | 102 ++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) diff --git a/src/openapi/orders/orders-crud.yaml b/src/openapi/orders/orders-crud.yaml index 96866d3..8534ece 100644 --- a/src/openapi/orders/orders-crud.yaml +++ b/src/openapi/orders/orders-crud.yaml @@ -5,6 +5,12 @@ info: description: CRUD APIs for ABT Orders database. These are NOT the functional APIs from Service Engine. servers: - url: https://services.acc.api.htm.nl/abt/abtorder/1.0 +tags: + - name: Order + - name: Order Line + - name: Payment + - name: Customer + - name: Order Voucher paths: /orders: get: @@ -98,6 +104,14 @@ paths: explode: false required: false description: Filter on most recent order status. 1 = concept, 2 = awaitingPayment, 3 = pendingPayment, 4 = paid, 5 = delivered, 6 = cancelled. + - in: query + name: issuedVoucherId + schema: + type: string + format: uuid + example: "b0a9f3c9-9b92-4f8c-b78d-6129be7218a6" + required: false + description: Filter on applied issuedVoucherId for the order. responses: "200": description: OK @@ -678,6 +692,7 @@ paths: responses: "200": description: OK + /orders/{orderId}/statuses: parameters: - in: path @@ -715,6 +730,93 @@ paths: { "order_orderStatusId": "b9cf0096-4211-4be6-ac21-7bc34bc8e066", } + /orders/{orderId}/ordervouchers: + parameters: + - in: path + name: orderId + schema: + type: string + format: uuid + example: d1dd439b-6072-4b97-89c9-724268865b93 + required: true + description: The id of the order to process. + post: + summary: Add an order voucher. + description: Add an order voucher. + tags: + - Order Voucher + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "issuedVoucherId": "eec6af41-1a60-49f6-a92e-440054a92f13", + "orderLineId": "7a9d6e15-7c5c-421d-9ea9-00b9bb6dbe67" + } + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "order_orderVoucherId": "b9cf0096-4211-4be6-ac21-7bc34bc8e066", + } + /ordervouchers/{order_ordervoucherId}: + parameters: + - in: path + name: order_ordervoucherId + schema: + type: string + format: uuid + example: d1dd439b-6072-4b97-89c9-724268865b93 + required: true + description: The id of the order to process. + patch: + summary: Update an order voucher. + description: Update an order voucher. + tags: + - Order Voucher + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "issuedVoucherId": "eec6af41-1a60-49f6-a92e-440054a92f13", + "orderLineId": "7a9d6e15-7c5c-421d-9ea9-00b9bb6dbe67" + } + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "order_orderVoucherId": "b9cf0096-4211-4be6-ac21-7bc34bc8e066", + } + delete: + summary: Delete an order voucher. + description: Delete an order voucher. + tags: + - Order Voucher + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + } /orders/{orderId}/orderlines: parameters: - in: path -- 2.45.2 From 01aa8a9f1a0328fedb7fd75f8dce9267d49f65fe Mon Sep 17 00:00:00 2001 From: Mirjam Herald Date: Mon, 1 Dec 2025 14:48:17 +0100 Subject: [PATCH 2/8] Added get vouchers and voucher in response body's --- src/openapi/orders/orders-crud.yaml | 135 +++++++++++++++------------- 1 file changed, 75 insertions(+), 60 deletions(-) diff --git a/src/openapi/orders/orders-crud.yaml b/src/openapi/orders/orders-crud.yaml index 8534ece..3e2ab07 100644 --- a/src/openapi/orders/orders-crud.yaml +++ b/src/openapi/orders/orders-crud.yaml @@ -162,6 +162,26 @@ paths: "description": "Betaling in behandeling", }, ], + "order_OrderVouchers": [ + { + "order_OrderVoucherId": "399bd3b3-9721-4f09-a936-d64637de1621", + "issuedVoucher":{ + "issuedVoucherId": "a0996218-bc5e-4826-9020-cda98a32838d", + "voucherCode": "Voucher1234", + "productId": 31 + }, + "orderLineId": null + }, + { + "order_OrderVoucherId": "f6c7ac42-1811-4e4d-82af-53e18fe16110", + "issuedVoucher":{ + "issuedVoucherId": "54668baf-4905-4e9a-af02-09c170f295ed", + "voucherCode": "Voucher124", + "productId": 35 + }, + "orderLineId": "7a7a9d1a-3fc8-4058-a28b-082860aaa311" + } + ], "orderLines": [ { @@ -346,16 +366,18 @@ paths: "order_OrderStatus": [ { - "orderStatusId": 4, - "createdOn": "2024-03-22T09:00:00", - "description": "Order succesvol betaald", - }, - { - "orderStatusId": 3, + "orderStatusId": 1, "createdOn": "2024-03-22T08:55:00", - "description": "Betaling in behandeling", + "description": "Concept order", }, ], + "order_OrderVouchers": + [ + { + "issuedVoucherId": "e81b2197-a6c2-45b6-9560-8ce8442e8604", + "orderLineId": "97824d2e-5189-456d-b6da-4cca511a7685" + }, + ], "orderLines": [ { @@ -404,57 +426,6 @@ paths: ], }, ], - "payments": - [ - { - "createdOn": "2024-03-22T09:00:00", - "amountDebit": 121, - "paymentMethodId": 1, - "touchPointId": 1, - "isRefund": false, - "htmPaymentReference": "HTM-1234", - "pspPaymentReference": "Buckaroo-1234", - "paymentStatuses": - [ - { - "createdOn": "2024-03-22T09:00:00", - "statusCode": "190", - "statusDescription": "Success", - "statusSubCode": "S001", - "statusSubDescription": "PaymentSuccessFul", - }, - ], - "mandateInput": - { - "directDebitMandateTypeId": 1, - "createdOn": "2024-03-22T09:00:00", - "bic": "RABONL2U", - "iban": "NL44RABO0123456789", - "ascription": "J. de Vries", - "place": "Den Haag", - }, - }, - ], - "orderCustomer": - { - "birthname": "Jan", - "surname": "Vries", - "prefix": "de", - "emailAddress": "jandevries@outlook.com", - "dateOfBirth": "1970-01-01", - "orderCustomerAddresses": - [ - { - "addressTypeId": 1, - "street": "Kon. Julianaplein", - "houseNumber": 10, - "houseNumberSuffix": "a", - "postalCode": "2595 AA", - "city": "Den Haag", - "country": "NL", - }, - ], - }, } responses: "201": @@ -526,6 +497,7 @@ paths: "description": "Betaling in behandeling", }, ], + "order_OrderVouchers": null, "orderLines": [ { @@ -766,6 +738,50 @@ paths: { "order_orderVoucherId": "b9cf0096-4211-4be6-ac21-7bc34bc8e066", } + /ordervouchers: + parameters: + - in: query + name: order_OrderVoucherId + schema: + type: string + format: uuid + example: d1dd439b-6072-4b97-89c9-724268865b93 + required: false + description: The id of the orderVoucher you are looking for. + - in: query + name: orderId + schema: + type: string + example: 90c926b9-3178-4757-acca-34cff66b980c + required: false + description: The id of the order + - in: query + name: orderLineId + schema: + type: string + example: 9e3363c8-e776-4675-b108-99b8c2e38eb6 + required: false + description: The id of the orderLine + get: + summary: Find vouchers on the order + description: Find vouchers on the order + tags: + - Order Voucher + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + [ + { + "order_OrderVoucherId": "19ef6882-8eda-43bf-b48e-9b4ff8745a50", + "orderId": "f59e4769-53a0-4156-8991-6f9119ba629f", + "orderLineId": "eeb86071-4f59-405d-b2be-7d7a77044bfa" + } + ] /ordervouchers/{order_ordervoucherId}: parameters: - in: path @@ -815,8 +831,7 @@ paths: schema: $ref: "#/components/schemas/unavailable" example: - { - } + {} /orders/{orderId}/orderlines: parameters: - in: path -- 2.45.2 From e4b3ab4ccfaadf83a3c09c5f3f5be130732acef9 Mon Sep 17 00:00:00 2001 From: Mirjam Herald Date: Mon, 1 Dec 2025 16:54:10 +0100 Subject: [PATCH 3/8] added post voucher in SE orders --- src/openapi/orders/service_engine_orders.yaml | 255 ++++++++++++++++++ 1 file changed, 255 insertions(+) diff --git a/src/openapi/orders/service_engine_orders.yaml b/src/openapi/orders/service_engine_orders.yaml index adaebe9..09cb658 100644 --- a/src/openapi/orders/service_engine_orders.yaml +++ b/src/openapi/orders/service_engine_orders.yaml @@ -5300,6 +5300,261 @@ paths: }, ], } + /orders/{orderId}/ordervouchers: + 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 voucher to an existing orders. + description: Add a voucher to an existing order. + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + examples: + Add a voucher to an existing order: + summary: Add a voucher to an existing order + description: Add a voucher to an existing order + value: + { + "voucherCode": "Voucher1234", + "orderLineId": "6bb3d8a1-474f-4bdb-9cbc-31bf4ed0482e" + } + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + examples: + Order with added voucher: + value: + { + "validContents": true, + "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", + "externalOrderId": null, + "orderNumber": "ORD-123456", + "customerProfileId": 1337, + "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", + }, + ], + "order_OrderVouchers": + [ + { + "order_orderVoucherId": "a66f224f-347b-47e7-b480-0b84b8ef5177", + "issuedVoucher": + { "voucherCode": "HTM1234", + "productName": "Ooievaarspas voucher", + "productDescription": "Ontvang de ooievaarspas om gratis te reizen bij de HTM", + "voucherStatus": { + "voucherStatusId": 2, + "name": "Issued" + } + }, + "orderLineId": "cccada2c-d5ea-48ab-b4be-f590e16b5468", + "validations": [ + { + "code": "VOUCHER_CLAIM_GBO_BIRTHDATE", + "detail": "Birthdate does not match the claim", + "path": "#/orderLines[cccada2c-d5ea-48ab-b4be-f590e16b5468]/customerToken[878ad7c1-cd8f-4bcf-a983-1bd8c6e6975e]/personalAccountData", + "parameter": "dateOfBirth", + "type": "ERROR" + }, + { + "code": "VOUCHER_CLAIM_EMAIL", + "detail": "Email on the order needs to be filled", + "path": "#/orderCustomer", + "parameter": "emailAddress", + "type": "REMARK" + } + ], + + }, + ], + "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, + "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": "valid", + "additionalRemarks": [], + "validationErrors": [], + }, + ], + "payments": [], + "orderCustomer": null + } /orders/{orderId}/fulfill: parameters: - in: path -- 2.45.2 From 1f3e2289dc1770da2e72c46ad444aa947cbfc6b6 Mon Sep 17 00:00:00 2001 From: Mirjam Herald Date: Mon, 15 Dec 2025 11:40:42 +0100 Subject: [PATCH 4/8] finished CRUD endpoints --- src/openapi/orders/orders-crud.yaml | 35 +++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/src/openapi/orders/orders-crud.yaml b/src/openapi/orders/orders-crud.yaml index 3e2ab07..96d6f79 100644 --- a/src/openapi/orders/orders-crud.yaml +++ b/src/openapi/orders/orders-crud.yaml @@ -133,6 +133,7 @@ paths: "touchPointId": 1, "name": "Perplex" }, + "deviceId": "42e77532-d831-41da-b07a-7edb9bb7f004", "language": { "languageId": 1, @@ -168,7 +169,20 @@ paths: "issuedVoucher":{ "issuedVoucherId": "a0996218-bc5e-4826-9020-cda98a32838d", "voucherCode": "Voucher1234", - "productId": 31 + "voucherStatusInstances": + [ + { + "voucherStatus": + { + "voucherStatusId": 2, + "name": "issued" + }, + "createdOn": "2025-11-22T13:00:00" + } + ], + "productId": 31, + "fromInclusive": "2025-03-22T08:55:00", + "untillInclusive": "2026-03-22T08:55:00" }, "orderLineId": null }, @@ -177,7 +191,20 @@ paths: "issuedVoucher":{ "issuedVoucherId": "54668baf-4905-4e9a-af02-09c170f295ed", "voucherCode": "Voucher124", - "productId": 35 + "voucherStatusInstances": + [ + { + "voucherStatus": + { + "voucherStatusId": 2, + "name": "issued" + }, + "createdOn": "2025-11-22T13:00:00" + } + ], + "productId": 35, + "fromInclusive": "2025-03-22T08:55:00", + "untillInclusive": "2026-03-22T08:55:00" }, "orderLineId": "7a7a9d1a-3fc8-4058-a28b-082860aaa311" } @@ -361,6 +388,7 @@ paths: "customerProfileId": 1337, "totalAmount": 121, "touchPointId": 1, + "deviceId": "b8ca9fdf-0bb9-4e49-b48d-41e395563377", "languageId": 1, "createdOn": "2024-03-22T09:00:00", "order_OrderStatus": @@ -472,6 +500,7 @@ paths: "touchPointId": 1, "name": "Perplex" }, + "deviceId": null, "language": { "languageId": 1, @@ -644,6 +673,7 @@ paths: example: { "customerProfileId": 1337, + "deviceId": "fe68e624-b75f-48ca-a179-d5f86a8ab7d5", "totalAmount": 121, "languageId": 1, "lastUpdatedOn": "2024-03-22T09:00:00", @@ -1961,6 +1991,7 @@ paths: "touchPointId": 1, "name": "Perplex" }, + "deviceId": null, "isRefund": false, "htmPaymentReference": "HTM-1234", "pspPaymentReference": "Buckaroo-1234", -- 2.45.2 From 22cb3ddd92efbe9cddf069ed6c0d26a12b8e4717 Mon Sep 17 00:00:00 2001 From: Mirjam Herald Date: Mon, 15 Dec 2025 11:43:03 +0100 Subject: [PATCH 5/8] added query param deviceId --- src/openapi/orders/orders-crud.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/openapi/orders/orders-crud.yaml b/src/openapi/orders/orders-crud.yaml index 96d6f79..58340ef 100644 --- a/src/openapi/orders/orders-crud.yaml +++ b/src/openapi/orders/orders-crud.yaml @@ -56,6 +56,13 @@ paths: example: 1 required: false description: The id of the touch point where the order was initiated. + - in: query + name: deviceId + schema: + type: string + example: "7a28bd54-7ca9-499a-a722-d15ab858ab99" + required: false + description: The id of the device used to place the order. - in: query name: languageId schema: -- 2.45.2 From b4f20a975808477871909429b23b78bf7a0960da Mon Sep 17 00:00:00 2001 From: Mirjam Herald Date: Mon, 15 Dec 2025 11:50:39 +0100 Subject: [PATCH 6/8] moved changes to TP orders to another branch and made equal to develop in this branch --- src/openapi/orders/service_engine_orders.yaml | 255 ------------------ 1 file changed, 255 deletions(-) diff --git a/src/openapi/orders/service_engine_orders.yaml b/src/openapi/orders/service_engine_orders.yaml index 09cb658..adaebe9 100644 --- a/src/openapi/orders/service_engine_orders.yaml +++ b/src/openapi/orders/service_engine_orders.yaml @@ -5300,261 +5300,6 @@ paths: }, ], } - /orders/{orderId}/ordervouchers: - 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 voucher to an existing orders. - description: Add a voucher to an existing order. - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/unavailable" - examples: - Add a voucher to an existing order: - summary: Add a voucher to an existing order - description: Add a voucher to an existing order - value: - { - "voucherCode": "Voucher1234", - "orderLineId": "6bb3d8a1-474f-4bdb-9cbc-31bf4ed0482e" - } - responses: - "201": - description: Created - content: - application/json: - schema: - $ref: "#/components/schemas/unavailable" - examples: - Order with added voucher: - value: - { - "validContents": true, - "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", - "externalOrderId": null, - "orderNumber": "ORD-123456", - "customerProfileId": 1337, - "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", - }, - ], - "order_OrderVouchers": - [ - { - "order_orderVoucherId": "a66f224f-347b-47e7-b480-0b84b8ef5177", - "issuedVoucher": - { "voucherCode": "HTM1234", - "productName": "Ooievaarspas voucher", - "productDescription": "Ontvang de ooievaarspas om gratis te reizen bij de HTM", - "voucherStatus": { - "voucherStatusId": 2, - "name": "Issued" - } - }, - "orderLineId": "cccada2c-d5ea-48ab-b4be-f590e16b5468", - "validations": [ - { - "code": "VOUCHER_CLAIM_GBO_BIRTHDATE", - "detail": "Birthdate does not match the claim", - "path": "#/orderLines[cccada2c-d5ea-48ab-b4be-f590e16b5468]/customerToken[878ad7c1-cd8f-4bcf-a983-1bd8c6e6975e]/personalAccountData", - "parameter": "dateOfBirth", - "type": "ERROR" - }, - { - "code": "VOUCHER_CLAIM_EMAIL", - "detail": "Email on the order needs to be filled", - "path": "#/orderCustomer", - "parameter": "emailAddress", - "type": "REMARK" - } - ], - - }, - ], - "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, - "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": "valid", - "additionalRemarks": [], - "validationErrors": [], - }, - ], - "payments": [], - "orderCustomer": null - } /orders/{orderId}/fulfill: parameters: - in: path -- 2.45.2 From 55bac2756173140e7aa6c47ece454dddc601c54e Mon Sep 17 00:00:00 2001 From: Mirjam Herald Date: Mon, 15 Dec 2025 15:36:51 +0100 Subject: [PATCH 7/8] simplified order_orderVoucherId --- src/openapi/orders/orders-crud.yaml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/openapi/orders/orders-crud.yaml b/src/openapi/orders/orders-crud.yaml index 58340ef..8000525 100644 --- a/src/openapi/orders/orders-crud.yaml +++ b/src/openapi/orders/orders-crud.yaml @@ -170,9 +170,9 @@ paths: "description": "Betaling in behandeling", }, ], - "order_OrderVouchers": [ + "orderVouchers": [ { - "order_OrderVoucherId": "399bd3b3-9721-4f09-a936-d64637de1621", + "orderVoucherId": "399bd3b3-9721-4f09-a936-d64637de1621", "issuedVoucher":{ "issuedVoucherId": "a0996218-bc5e-4826-9020-cda98a32838d", "voucherCode": "Voucher1234", @@ -194,7 +194,7 @@ paths: "orderLineId": null }, { - "order_OrderVoucherId": "f6c7ac42-1811-4e4d-82af-53e18fe16110", + "orderVoucherId": "f6c7ac42-1811-4e4d-82af-53e18fe16110", "issuedVoucher":{ "issuedVoucherId": "54668baf-4905-4e9a-af02-09c170f295ed", "voucherCode": "Voucher124", @@ -406,7 +406,7 @@ paths: "description": "Concept order", }, ], - "order_OrderVouchers": + "orderVouchers": [ { "issuedVoucherId": "e81b2197-a6c2-45b6-9560-8ce8442e8604", @@ -533,7 +533,7 @@ paths: "description": "Betaling in behandeling", }, ], - "order_OrderVouchers": null, + "orderVouchers": null, "orderLines": [ { @@ -773,12 +773,12 @@ paths: $ref: "#/components/schemas/unavailable" example: { - "order_orderVoucherId": "b9cf0096-4211-4be6-ac21-7bc34bc8e066", + "orderVoucherId": "b9cf0096-4211-4be6-ac21-7bc34bc8e066", } /ordervouchers: parameters: - in: query - name: order_OrderVoucherId + name: orderVoucherId schema: type: string format: uuid @@ -814,15 +814,15 @@ paths: example: [ { - "order_OrderVoucherId": "19ef6882-8eda-43bf-b48e-9b4ff8745a50", + "orderVoucherId": "19ef6882-8eda-43bf-b48e-9b4ff8745a50", "orderId": "f59e4769-53a0-4156-8991-6f9119ba629f", "orderLineId": "eeb86071-4f59-405d-b2be-7d7a77044bfa" } ] - /ordervouchers/{order_ordervoucherId}: + /ordervouchers/{ordervoucherId}: parameters: - in: path - name: order_ordervoucherId + name: ordervoucherId schema: type: string format: uuid @@ -853,7 +853,7 @@ paths: $ref: "#/components/schemas/unavailable" example: { - "order_orderVoucherId": "b9cf0096-4211-4be6-ac21-7bc34bc8e066", + "orderVoucherId": "b9cf0096-4211-4be6-ac21-7bc34bc8e066", } delete: summary: Delete an order voucher. -- 2.45.2 From bfaa1ddcb1eff012b4fc02044b44efe0587d59a7 Mon Sep 17 00:00:00 2001 From: Mirjam Herald Date: Tue, 16 Dec 2025 14:52:23 +0100 Subject: [PATCH 8/8] fixed comments --- src/openapi/orders/orders-crud.yaml | 34 +++++++++-------------------- 1 file changed, 10 insertions(+), 24 deletions(-) diff --git a/src/openapi/orders/orders-crud.yaml b/src/openapi/orders/orders-crud.yaml index 8000525..1258704 100644 --- a/src/openapi/orders/orders-crud.yaml +++ b/src/openapi/orders/orders-crud.yaml @@ -60,6 +60,7 @@ paths: name: deviceId schema: type: string + format: uuid example: "7a28bd54-7ca9-499a-a722-d15ab858ab99" required: false description: The id of the device used to place the order. @@ -176,18 +177,7 @@ paths: "issuedVoucher":{ "issuedVoucherId": "a0996218-bc5e-4826-9020-cda98a32838d", "voucherCode": "Voucher1234", - "voucherStatusInstances": - [ - { - "voucherStatus": - { - "voucherStatusId": 2, - "name": "issued" - }, - "createdOn": "2025-11-22T13:00:00" - } - ], - "productId": 31, + "purchasedProductId": 31, "fromInclusive": "2025-03-22T08:55:00", "untillInclusive": "2026-03-22T08:55:00" }, @@ -198,18 +188,7 @@ paths: "issuedVoucher":{ "issuedVoucherId": "54668baf-4905-4e9a-af02-09c170f295ed", "voucherCode": "Voucher124", - "voucherStatusInstances": - [ - { - "voucherStatus": - { - "voucherStatusId": 2, - "name": "issued" - }, - "createdOn": "2025-11-22T13:00:00" - } - ], - "productId": 35, + "purchasedProductId": 35, "fromInclusive": "2025-03-22T08:55:00", "untillInclusive": "2026-03-22T08:55:00" }, @@ -815,6 +794,13 @@ paths: [ { "orderVoucherId": "19ef6882-8eda-43bf-b48e-9b4ff8745a50", + "issuedVoucher":{ + "issuedVoucherId": "54668baf-4905-4e9a-af02-09c170f295ed", + "voucherCode": "Voucher124", + "purchasedProductId": 35, + "fromInclusive": "2025-03-22T08:55:00", + "untillInclusive": "2026-03-22T08:55:00" + }, "orderId": "f59e4769-53a0-4156-8991-6f9119ba629f", "orderLineId": "eeb86071-4f59-405d-b2be-7d7a77044bfa" } -- 2.45.2