From c645d9195ec1ff40e465b9e89c9be04b6d6b397a Mon Sep 17 00:00:00 2001 From: Mirjam Herald Date: Thu, 31 Jul 2025 16:27:44 +0200 Subject: [PATCH] Updated TP endpoints orders --- .../orders/SE-orders-gboAgeProfile.yaml | 180 ---- src/openapi/orders/service_engine_orders.yaml | 899 ++++-------------- 2 files changed, 162 insertions(+), 917 deletions(-) delete mode 100644 src/openapi/orders/SE-orders-gboAgeProfile.yaml diff --git a/src/openapi/orders/SE-orders-gboAgeProfile.yaml b/src/openapi/orders/SE-orders-gboAgeProfile.yaml deleted file mode 100644 index 939ef57..0000000 --- a/src/openapi/orders/SE-orders-gboAgeProfile.yaml +++ /dev/null @@ -1,180 +0,0 @@ -openapi: 3.0.1 -info: - title: ABT Service Engine Order APIs - version: "1.0" - description: Order APIs available in the Service Engine for order validation and fulfillment. -servers: - - url: https://services.acc.api.htm.nl/abt/touchpoint/2.0 -paths: - /orders/validation/gboAgeProfile: - get: - tags: - - ServiceEngine Order validation - summary: Get GBO age profile that is valid for the given input - description: |- - Only one age profile can be valid at any one time, so only one profile is returned. - parameters: - - name: productStartDate - in: query - required: true - description: Start date of product validity - schema: - type: string - format: date - example: 2025-03-20 - - name: birthDate - in: query - required: false - description: Birthdate of the OVpay-token holder - schema: - type: string - format: date - example: 2000-01-01 - - name: ovPayTokenId - in: query - required: false - description: ovPayTokenId of the customer's selected token - schema: - type: integer - example: 1 - - name: customerTokenId - in: query - required: false - description: customerTokenId of the customer's selected token - schema: - type: string - format: uuid - example: "4a2d2c9c-1e5d-4d8a-9c0a-6c0a6c0a6c0a" - - name: serviceReferenceId - in: query - required: false - description: serviceReferenceId of the customer's selected token - schema: - type: string - example: "NLOV1234567ABCDEFG" - - name: amount - in: query - required: false - description: amount belonging to the serviceReferenceId - schema: - type: integer - example: 100 - - name: ovpasNumber - in: query - required: false - description: OVpas number of the customer's selected token - schema: - type: string - example: "63AW974" - - name: verificationCode - in: query - required: false - description: verification code belonging to the OVpas number - schema: - type: string - example: 1A3C7D - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/GboAgeProfileResponse" - - "400": - description: Bad request - content: - application/json: - schema: - $ref: "#/components/schemas/rfc9457Response" - examples: - Missing parameter(s): - summary: Missing parameter(s) - value: - { - "type": "https://www.htm.nl/api/v1/400Error", - "title": "Missing parameter(s)", - "detail": "At least one of the following parameters must be present: birthDate, ovPayTokenId, customerTokenId, (serviceReferenceId and amount), (ovpasNumber and verificationCode)", - "instance": "urn:uuid:13c8416f-7632-4c8b-8a16-2132197be60c", - "apiErrorCode": "htm.api.err.400.2", - } - Invalid date format: - summary: Invalid date format - value: - { - "type": "https://www.htm.nl/api/v1/400Error", - "title": "Invalid input", - "detail": "The given birthDate is not a valid Date format", - "instance": "urn:uuid:13c8416f-7632-4c8b-8a16-2132197be60c", - "apiErrorCode": "htm.api.err.400.3", - } - "404": - description: Not found - content: - application/json: - schema: - $ref: "#/components/schemas/rfc9457Response" - examples: - No birthdate present in PAD of OVpay token: - summary: No birthdate present in PAD of OVpay token - value: - { - "type": "https://www.htm.nl/api/v1/404Error", - "title": "Missing birthdate in PAD", - "detail": "There is no birthdate present in the PAD of the OVpay token, or there is no PAD present at all", - "instance": "urn:uuid:13c8416f-7632-4c8b-8a16-2132197be60c", - "apiErrorCode": "htm.api.err.404.1", - } -components: - schemas: - GboAgeProfileResponse: - type: object - required: - - gboAgeProfileId - - name - - ageFromInclusive - - ageToInclusive - properties: - gboAgeProfileId: - type: integer - example: 1 - name: - type: string - example: Kind (4 t/m 11 jaar) - ageFromInclusive: - type: integer - example: 4 - ageToInclusive: - type: integer - example: 11 - rfc9457Response: - type: object - properties: - type: - type: string - format: url - example: "https://www.htm.nl/api/v1/rfc9457Error" - title: - type: string - description: "Short summary of the error." - example: "The request is not valid." - detail: - type: string - description: "More detailed descriptionof the error." - example: "Some required parameters are missing." - instance: - type: string - description: "Unique identifier to correlate this specific error with logging in other applications." - example: "urn:uuid:13c8416f-7632-4c8b-8a16-2132197be60c" - additionalProperty1: - type: string - description: "Example of an additional property value to be used for error reporting." - example: "additionalValue1" - additionalProperty2: - type: array - description: "Example of an additional property array to be used for error reporting." - items: - type: string - example: - - "additionalValue2-1" - - "additionalValue2-2" diff --git a/src/openapi/orders/service_engine_orders.yaml b/src/openapi/orders/service_engine_orders.yaml index 3546a4c..a642258 100644 --- a/src/openapi/orders/service_engine_orders.yaml +++ b/src/openapi/orders/service_engine_orders.yaml @@ -1,729 +1,11 @@ openapi: 3.0.1 info: title: ABT Service Engine Order APIs - version: "1.0" - description: Order APIs available in the Service Engine for order validation and fulfillment. + version: "2.0" + description: Order APIs available in the Service Engine for order creation, validation and fulfillment servers: - url: https://services.acc.api.htm.nl/abt/touchpoint/2.0 paths: - /orders/validation: - post: - tags: - - Order Validation v1 & v2 - summary: Validate order. - description: Validate order. - parameters: - - in: header - name: X-HTM-JWT-AUTH-HEADER - required: false - style: simple - explode: false - schema: - type: string - - in: header - name: Accept-version - required: false - style: simple - explode: false - schema: - type: string - example: "2.0" - description: The version of the API. - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/unavailable" - examples: - v2: - summary: Order validation v2 - description: Order validation v2 - value: - { - "purchaseDate": "2024-03-22", - "customerProfileId": 1337, - "languageId": 1, - "billingAddressId": 1, - "shippingAddressId": 1, - "contents": - [ - { - "productId": 1, - "quantity": 5, - "validFrom": "2024-03-22T09:00:00", - "validUntil": null, - "tokens": - [ - { - "tokenTypeId": 1, - "ovPayTokenId": 1, - "serviceReferenceId": "NLOV1234567ABCDEFG", - "amount": 34, - "ovpasNumber": "OV34567", - "verificationCode": "A7H6", - "personalAccountData": - { - "name": "Jan de Vries", - "dateOfBirth": "01-01-1970", - "photoReference": "DSC_0502.JPG", - "fileType": "image/jpg", - "challengeTypeId": 1, - "oneTimePassword": "H5Iiz3JTaQeIV8p", - }, - }, - ], - }, - { - "productId": 2, - "quantity": 3, - "validFrom": "2024-03-22T09:00:00", - "validUntil": null, - }, - ], - "customer": - { - "birthname": "Jan", - "surname": "Vries", - "prefix": "de", - "emailAddress": "jandevries@outlook.com", - "dateOfBirth": "1970-01-01", - "addresses": - [ - { - "addressTypeId": 1, - "street": "Kon. Julianaplein", - "houseNumber": 10, - "houseNumberSuffix": "a", - "postalCode": "2595 AA", - "city": "Den Haag", - "country": "NL", - }, - ], - }, - } - v1: - summary: Order validation v1 - description: Order validation v1 - value: - [ - { - "ovPayTokenId": 2, - "serviceReferenceId": "NLOV1234567ABCDEFG", - "amount": 34, - "ovpasNumber": "OV34567", - "productId": 2, - "startDate": "2024-03-22T09:00:00z", - "quantity": 1, - }, - { - "ovPayTokenId": 3, - "serviceReferenceId": "NLOV1234567ABCDEFG", - "amount": 89, - "ovpasNumber": "OV34567", - "productId": 4, - "startDate": "2024-03-22T09:00:00z", - "quantity": 4, - }, - ] - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/unavailable" - examples: - v2: - summary: Order validation v2 - description: Order validation v2 - value: - { - "validContents": true, - "amountExclTax": 0, - "taxPercentage": 0, - "amountInclTax": 0, - "contents": - [ - { - "ovPayTokenId": 0, - "serviceReferenceId": "string", - "ovpasNumber": "string", - "productId": 0, - "quantity": 0, - "amountExclTax": 0, - "taxPercentage": 0, - "amountInclTax": 0, - "startDate": "string", - "endDate": "string", - "isRenewable": true, - "nextDebitDate": "string", - "termAmountExclTax": 0, - "termAmountInclTax": 0, - "additionalRemarks": - [{ "code": "string", "parameter": "string" }], - "validationErrors": - [{ "detail": "string", "pointer": "string" }], - }, - ], - } - v1: - summary: Order validation v1 - description: Order validation v1 - value: - { - "validContents": true, - "purchaseDate": "2024-03-22", - "customerProfileId": 1337, - "languageId": 1, - "billingAddressId": 1, - "shippingAddressId": 1, - "totalAmount": 121, - "contents": - [ - { - "productId": 1, - "quantity": 5, - "validFrom": "2024-03-22T09:00:00", - "validUntil": null, - "taxAmount": 21, - "taxCode": "V21", - "amountExclTax": 100, - "amountInclTax": 121, - "isRenewable": true, - "nextDebitDate": "2024-04-22", - "termAmountExclTax": 100, - "termAmountInclTax": 121, - "tokens": - [ - { - "tokenTypeId": 1, - "ovPayTokenId": 1, - "serviceReferenceId": "NLOV1234567ABCDEFG", - "amount": 34, - "ovpasNumber": "OV34567", - "verificationCode": "A7H6", - "personalAccountData": - { - "name": "Jan de Vries", - "dateOfBirth": "01-01-1970", - "photoReference": "DSC_0502.JPG", - "fileType": "image/jpg", - "challengeTypeId": 1, - "oneTimePassword": "H5Iiz3JTaQeIV8p", - }, - }, - ], - "additionalRemarks": [], - "validationErrors": - [ - { - "detail": "Startdate of this product should be at most 60 days in the future.", - "pointer": "#/contents[0]/validFrom", - }, - { - "detail": "Combination of product and token type is not valid.", - "pointer": "#/contents[0]/tokens[0]/ovPayTokenId", - }, - ], - }, - { - "productId": 2, - "quantity": 3, - "validFrom": "2024-03-22T09:00:00", - "validUntil": null, - "taxAmount": 21, - "taxCode": "V21", - "amountExclTax": 100, - "amountInclTax": 121, - "isRenewable": true, - "nextDebitDate": "2024-04-22", - "termAmountExclTax": 100, - "termAmountInclTax": 121, - }, - ], - "customer": - { - "birthname": "Jan", - "surname": "Vries", - "prefix": "de", - "emailAddress": "jandevries@outlook.com", - "dateOfBirth": "1970-01-01", - "addresses": - [ - { - "addressTypeId": 1, - "street": "Kon. Julianaplein", - "houseNumber": 10, - "houseNumberSuffix": "a", - "postalCode": "2595 AA", - "city": "Den Haag", - "country": "NL", - }, - ], - "additionalRemarks": - [ - { - "code": "PERSONAL_DATA_NEEDED", - "parameter": "dateOfBirth", - }, - { - "code": "PERSONAL_DATA_NEEDED", - "parameter": "photo", - }, - { - "code": "MANDATE_REQUIRED", - "parameter": "directDebitMandateId", - }, - ], - "validationErrors": - [ - { - "detail": "Startdate of this product should be at most 60 days in the future.", - "pointer": "#/contents[1]/validFrom", - }, - ], - }, - } - /orders/{orderId}/fulfillment: - post: - tags: - - Order Fulfillment v1 & v2 - summary: Fulfill an order. - description: Fulfill an order. - parameters: - - in: header - name: X-HTM-JWT-AUTH-HEADER - required: false - style: simple - explode: false - schema: - type: string - - in: path - name: orderId - required: true - style: simple - explode: false - schema: - type: string - format: uuid - example: a0ef57fa-395c-4a03-96e9-234c26dccea9 - - in: header - name: Accept-version - required: false - style: simple - explode: false - schema: - type: string - example: "2.0" - description: The version of the API. - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/unavailable" - examples: - v2.2: - summary: Order fulfillment v2.2 - description: Order fulfillment v2.2 - value: - { - "externalOrderId": "a0ef57fa-395c-4a03-96e9-234c26dccea9", - "languageId": 1, - "billingAddressId": 1, - "shippingAddressId": 1, - "createdOn": "2024-03-22T09:00:00", - "orderStatusId": 4, - "orderLines": - [ - { - "externalOrderLineId": "2ba39cae-c401-446b-ae5c-2d6d85b3df1f", - "productId": 1, - "quantity": 1, - "createdOn": "2024-03-22T09:00:00", - "validFrom": "2024-03-22T09:00:00", - "validUntil": null, - "orderLineStatusId": 4, - "tokens": - [ - { - "tokenTypeId": 1, - "ovPayTokenId": 1, - "serviceReferenceId": "NLOV1234567ABCDEFG", - "amount": 34, - "ovpasNumber": "OV34567", - "verificationCode": "A7H6", - "personalAccountData": - { - "name": "Jan de Vries", - "dateOfBirth": "01-01-1970", - "photoReference": "DSC_0502.JPG", - "fileType": "image/jpg", - "challengeTypeId": 1, - "oneTimePassword": "H5Iiz3JTaQeIV8p", - }, - }, - ], - }, - ], - "payments": - [ - { - "createdOn": "2024-03-22T09:00:00", - "amountDebit": 121, - "paymentMethodId": 1, - "isRefund": false, - "htmPaymentReference": "HTM-1234", - "pspPaymentReference": "Buckaroo-1234", - "paymentStatuses": - [ - { - "createdOn": "2024-03-22T09:00:00", - "statusCode": "190", - "statusDescription": "Success", - "statusSubCode": "S001", - "statusSubDescription": "PaymentSuccessful", - }, - ], - "payPush": - { - "consumerIssuer": "ABN AMRO", - "transactionId": "0000000000000001", - "consumerName": "J. de Vries", - "consumerIBAN": "NL44RABO0123456789", - "consumerBIC": "RABONL2U", - }, - }, - ], - "customer": - { - "birthname": "Jan", - "surname": "Vries", - "prefix": "de", - "emailAddress": "jandevries@outlook.com", - "dateOfBirth": "1970-01-01", - "addresses": - [ - { - "addressTypeId": 1, - "street": "Kon. Julianaplein", - "houseNumber": 10, - "houseNumberSuffix": "a", - "postalCode": "2595 AA", - "city": "Den Haag", - "country": "NL", - }, - ], - }, - } - v2: - summary: Order fulfillment v2 - description: Order fulfillment v2 - value: - { - "orderId": "a0ef57fa-395c-4a03-96e9-234c26dccea9", - "customerProfileId": 1337, - "totalAmount": 121, - "languageId": 1, - "billingAddressId": 1, - "shippingAddressId": 1, - "createdOn": "2024-03-22T09:00:00", - "orderStatusId": 4, - "orderLines": - [ - { - "orderLineId": "2ba39cae-c401-446b-ae5c-2d6d85b3df1f", - "productId": 1, - "productName": "HTM Maandkorting 20%", - "productCode": "HTM-MND-20", - "productDescription": "HTM Maandkorting 20%", - "taxAmount": 21, - "taxCode": "V21", - "amountExclTax": 100, - "amountInclTax": 121, - "quantity": 1, - "terms": - [ - "generalTermsAndConditions.pdf", - "productTermsAndConditions.pdf", - ], - "createdOn": "2024-03-22T09:00:00", - "validFrom": "2024-03-22T09:00:00", - "validUntil": null, - "orderLineStatusId": 4, - "tokens": - [ - { - "tokenTypeId": 1, - "ovPayTokenId": 1, - "serviceReferenceId": "NLOV1234567ABCDEFG", - "amount": 34, - "ovpasNumber": "OV34567", - "verificationCode": "A7H6", - "personalAccountData": - { - "name": "Jan de Vries", - "dateOfBirth": "01-01-1970", - "photoReference": "DSC_0502.JPG", - "fileType": "image/jpg", - "challengeTypeId": 1, - "oneTimePassword": "H5Iiz3JTaQeIV8p", - }, - }, - ], - }, - ], - "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", - }, - ], - "payPush": - { - "consumerIssuer": "ABN AMRO", - "transactionId": "0000000000000001", - "consumerName": "J. de Vries", - "consumerIBAN": "NL44RABO0123456789", - "consumerBIC": "RABONL2U", - }, - }, - ], - "customer": - { - "birthname": "Jan", - "surname": "Vries", - "prefix": "de", - "emailAddress": "jandevries@outlook.com", - "dateOfBirth": "1970-01-01", - "addresses": - [ - { - "addressTypeId": 1, - "street": "Kon. Julianaplein", - "houseNumber": 10, - "houseNumberSuffix": "a", - "postalCode": "2595 AA", - "city": "Den Haag", - "country": "NL", - }, - ], - }, - } - v1: - summary: Order fulfillment v1 - description: Order fulfillment v1 - value: - { - "customerProfileID": 123415, - "customerProfileData": { "dateOfBirth": "09-03-1989" }, - "personalAccountData": { "birthdate": "09-03-1989" }, - "directDebitMandate": - { - "consumerName": "J. de Tèster", - "consumerBic": "RABONL2U", - "consumerIban": "NL44RABO0123456789", - }, - "orderContents": - [ - { - "ovPayTokenId": 123, - "serviceReferenceId": "NLOV1234567ABCDEFG", - "amount": 450, - "ovpasNumber": "63AW974", - "productId": 2, - "startDate": "2024-03-22T09:00:00Z", - "quantity": 1, - "orderlineId": "2d7fadc9-b64b-4516-9a7d-cf550f201372", - }, - { - "ovPayTokenId": 123, - "serviceReferenceId": "NLOV1234567ABCDEFG", - "amount": 450, - "ovpasNumber": "63AW974", - "productId": 3, - "startDate": "2024-03-16T09:00:00Z", - "quantity": 1, - "orderlineId": "9d7fadc9-b64b-4516-9a7d-cf550f201378", - }, - ], - "orderStatus": "succeededPayment", - } - responses: - "201": - description: Created - content: - application/json: - schema: - $ref: "#/components/schemas/unavailable" - examples: - v1: - summary: Order fulfillment v1 - description: Order fulfillment v1 - value: {} - v2.2: - summary: Order fulfillment v2 - description: Order fulfillment v2 - value: - { - "orderId": "c73ff153-72e0-403f-a276-e86f544406f9", - "externalOrderId": "a0ef57fa-395c-4a03-96e9-234c26dccea9", - "orderNumber": "123456", - "customerProfileId": 1337, - "totalAmount": 121, - "languageId": 1, - "billingAddressId": 1, - "shippingAddressId": 1, - "createdOn": "2024-03-22T09:00:00", - "orderStatusId": 4, - "orderLines": - [ - { - "orderLineId": "cccada2c-d5ea-48ab-b4be-f590e16b5468", - "externalOrderLineId": "2ba39cae-c401-446b-ae5c-2d6d85b3df1f", - "productId": 1, - "productName": "HTM Maandkorting 20%", - "productCode": "HTM-MND-20", - "productDescription": "HTM Maandkorting 20%", - "taxAmount": 21, - "taxCode": "V21", - "amountExclTax": 100, - "amountInclTax": 121, - "quantity": 1, - "terms": - [ - "generalTermsAndConditions.pdf", - "productTermsAndConditions.pdf", - ], - "createdOn": "2024-03-22T09:00:00", - "validFrom": "2024-03-22T09:00:00", - "validUntil": null, - "orderLineStatusId": 4, - "tokens": - [ - { - "tokenTypeId": 1, - "ovPayTokenId": 1, - "serviceReferenceId": "NLOV1234567ABCDEFG", - "amount": 34, - "ovpasNumber": "OV34567", - "verificationCode": "A7H6", - "personalAccountData": - { - "name": "Jan de Vries", - "dateOfBirth": "01-01-1970", - "photoReference": "DSC_0502.JPG", - "fileType": "image/jpg", - "challengeTypeId": 1, - "oneTimePassword": "H5Iiz3JTaQeIV8p", - }, - }, - ], - }, - ], - "payments": - [ - { - "createdOn": "2024-03-22T09:00:00", - "amountDebit": 121, - "paymentMethod": - { - "paymentMethodId": 1, - "name": "ideal", - "provider": "Buckaroo", - }, - "touchPoint": - { - "salesTouchpointId": 3, - "name": "Website (Perplex)", - "isActive": true, - "retailerId": 1001, - }, - "isRefund": false, - "htmPaymentReference": "HTM-1234", - "pspPaymentReference": "Buckaroo-1234", - "paymentStatuses": - [ - { - "createdOn": "2024-03-22T09:00:00", - "statusCode": "190", - "statusDescription": "Success", - "statusSubCode": "S001", - "statusSubDescription": "PaymentSuccessful", - }, - ], - "payPush": - { - "consumerIssuer": "ABN AMRO", - "transactionId": "0000000000000001", - "consumerName": "J. de Vries", - "consumerIBAN": "NL44RABO0123456789", - "consumerBIC": "RABONL2U", - }, - }, - ], - "customer": - { - "birthname": "Jan", - "surname": "Vries", - "prefix": "de", - "emailAddress": "jandevries@outlook.com", - "dateOfBirth": "1970-01-01", - "addresses": - [ - { - "addressTypeId": 1, - "street": "Kon. Julianaplein", - "houseNumber": 10, - "houseNumberSuffix": "a", - "postalCode": "2595 AA", - "city": "Den Haag", - "country": "NL", - }, - ], - }, - } - "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: parameters: - in: header @@ -1499,8 +781,8 @@ paths: description: The JWT of the logged in customer (in case of a web shop). get: tags: - - Order Retrieval v1 & v2 - summary: Get a single order. P1 + - Order Retrieval v2 + summary: Get a single order. description: Get a single order. responses: "200": @@ -2241,6 +1523,7 @@ paths: description: Update order line v2.2 value: { + "productId": 41, "quantity": 1, "validFrom": "2024-03-25T09:00:00", "validUntil": null, @@ -2583,7 +1866,7 @@ paths: post: tags: - Order Creation v2 - summary: Add a customer token to an orderLine. P1 + summary: Add a customer token to an orderLine. description: Add a customer token to an orderLine requestBody: content: @@ -2736,7 +2019,7 @@ paths: patch: tags: - Order Creation v2 - summary: Update a customer token. P1 + summary: Update a customer token. description: Update a customer token requestBody: content: @@ -3102,7 +2385,7 @@ paths: patch: tags: - Order Creation v2 - summary: Update personal account data. P2 + summary: Update personal account data. description: Update personal account data requestBody: content: @@ -3229,7 +2512,7 @@ paths: delete: tags: - Order Creation v2 - summary: Delete personal account data. P2 + summary: Delete personal account data. description: Delete personal account data responses: "200": @@ -4971,6 +4254,125 @@ paths: responses: "200": description: OK + /orders/validation/gboAgeProfile: + get: + tags: + - ServiceEngine Order validation + summary: Get GBO age profile that is valid for the given input + description: |- + Only one age profile can be valid at any one time, so only one profile is returned. + parameters: + - name: productStartDate + in: query + required: true + description: Start date of product validity + schema: + type: string + format: date + example: 2025-03-20 + - name: birthDate + in: query + required: false + description: Birthdate of the OVpay-token holder + schema: + type: string + format: date + example: 2000-01-01 + - name: ovPayTokenId + in: query + required: false + description: ovPayTokenId of the customer's selected token + schema: + type: integer + example: 1 + - name: customerTokenId + in: query + required: false + description: customerTokenId of the customer's selected token + schema: + type: string + format: uuid + example: "4a2d2c9c-1e5d-4d8a-9c0a-6c0a6c0a6c0a" + - name: serviceReferenceId + in: query + required: false + description: serviceReferenceId of the customer's selected token + schema: + type: string + example: "NLOV1234567ABCDEFG" + - name: amount + in: query + required: false + description: amount belonging to the serviceReferenceId + schema: + type: integer + example: 100 + - name: ovpasNumber + in: query + required: false + description: OVpas number of the customer's selected token + schema: + type: string + example: "63AW974" + - name: verificationCode + in: query + required: false + description: verification code belonging to the OVpas number + schema: + type: string + example: 1A3C7D + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/GboAgeProfileResponse" + + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/rfc9457Response" + examples: + Missing parameter(s): + summary: Missing parameter(s) + value: + { + "type": "https://www.htm.nl/api/v1/400Error", + "title": "Missing parameter(s)", + "detail": "At least one of the following parameters must be present: birthDate, ovPayTokenId, customerTokenId, (serviceReferenceId and amount), (ovpasNumber and verificationCode)", + "instance": "urn:uuid:13c8416f-7632-4c8b-8a16-2132197be60c", + "apiErrorCode": "htm.api.err.400.2", + } + Invalid date format: + summary: Invalid date format + value: + { + "type": "https://www.htm.nl/api/v1/400Error", + "title": "Invalid input", + "detail": "The given birthDate is not a valid Date format", + "instance": "urn:uuid:13c8416f-7632-4c8b-8a16-2132197be60c", + "apiErrorCode": "htm.api.err.400.3", + } + "404": + description: Not found + content: + application/json: + schema: + $ref: "#/components/schemas/rfc9457Response" + examples: + No birthdate present in PAD of OVpay token: + summary: No birthdate present in PAD of OVpay token + value: + { + "type": "https://www.htm.nl/api/v1/404Error", + "title": "Missing birthdate in PAD", + "detail": "There is no birthdate present in the PAD of the OVpay token, or there is no PAD present at all", + "instance": "urn:uuid:13c8416f-7632-4c8b-8a16-2132197be60c", + "apiErrorCode": "htm.api.err.404.1", + } components: securitySchemes: bearerToken: @@ -4978,31 +4380,54 @@ components: scheme: bearer bearerFormat: JWT schemas: - unavailable: + GboAgeProfileResponse: type: object - rfc9457: + required: + - gboAgeProfileId + - name + - ageFromInclusive + - ageToInclusive + properties: + gboAgeProfileId: + type: integer + example: 1 + name: + type: string + example: Kind (4 t/m 11 jaar) + ageFromInclusive: + type: integer + example: 4 + ageToInclusive: + type: integer + example: 11 + rfc9457Response: type: object properties: type: type: string format: url - example: "https://example.com/probs/out-of-credit" + example: "https://www.htm.nl/api/v1/rfc9457Error" title: type: string - example: "You do not have enough credit." + description: "Short summary of the error." + example: "The request is not valid." detail: type: string - example: "Your current balance is 30, but that costs 50." + description: "More detailed descriptionof the error." + example: "Some required parameters are missing." instance: type: string - example: "/account/12345/msgs/abc" - balance: + description: "Unique identifier to correlate this specific error with logging in other applications." + example: "urn:uuid:13c8416f-7632-4c8b-8a16-2132197be60c" + additionalProperty1: type: string - example: "30" - accounts: + description: "Example of an additional property value to be used for error reporting." + example: "additionalValue1" + additionalProperty2: type: array + description: "Example of an additional property array to be used for error reporting." items: type: string example: - - "/account/12345" - - "/account/67890" + - "additionalValue2-1" + - "additionalValue2-2"