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..3fac0ec 100644 --- a/src/openapi/orders/service_engine_orders.yaml +++ b/src/openapi/orders/service_engine_orders.yaml @@ -6,724 +6,6 @@ info: 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 @@ -807,7 +89,7 @@ paths: example: 7208e73e-87a6-46d9-bb6d-867ffc460c9b description: xTat used in order fulfillment. Note that this is a joined parameter via PurchasedProduct. tags: - - Order Retrieval v1 & v2 + - Order Retrieval summary: Find orders. P1 description: Find orders. responses: @@ -1044,7 +326,7 @@ paths: } post: tags: - - Order Creation v2 + - Order Creation summary: Create a new order description: | Create a new order. This order can only contain the order itself, @@ -1499,7 +781,7 @@ paths: description: The JWT of the logged in customer (in case of a web shop). get: tags: - - Order Retrieval v1 & v2 + - Order Retrieval summary: Get a single order. P1 description: Get a single order. responses: @@ -1708,7 +990,7 @@ paths: } patch: tags: - - Order Creation v2 + - Order Creation summary: Update an existing order. description: Update an existing order. requestBody: @@ -1887,7 +1169,7 @@ paths: } delete: tags: - - Order Creation v2 + - Order Creation summary: Delete an existing order. description: Delete an existing order. responses: @@ -1933,8 +1215,8 @@ paths: description: The JWT of the logged in customer (in case of a web shop). post: tags: - - Order Creation v2 - summary: Add a new order line to an existing order. + - Order Creation + summary: Add a new order line to an existing order. P1 description: Add a new order line to an existing order. requestBody: content: @@ -1942,9 +1224,9 @@ paths: schema: $ref: "#/components/schemas/unavailable" examples: - v2.2: - summary: Create order line v2.2 - description: Create order line v2.2 + v2.2.2: + summary: Create order line v2.2.2 product with childeren + description: Create order line v2.2.2 product with childeren value: { "externalOrderLineId": null, @@ -1966,6 +1248,15 @@ paths: }, ], } + v2.2.1: + summary: Create order line v2.2.1 with minimum requirements + description: Create order line v2.2.1 with minimum requirements + value: + { + "productId": 2, + "quantity": 1, + "createdOn": "2024-03-22T09:00:00" + } v1.2: summary: Create orderLine v1.2 description: Create orderLine v1.2 @@ -2024,7 +1315,206 @@ paths: schema: $ref: "#/components/schemas/unavailable" examples: - v2.2: + v2.2.2: + summary: AddRemark chosen product is not a leaf node product + description: AddRemark for case where chosen product is not a leaf node product + value: + { + "validContents": false, + "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", + }, + ], + "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": 21, + "amountExclTax": 100, + "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": 12, + "serviceReferenceId": null, + "amount": null, + "ovpasNumber": null, + "verificationCode": null, + "personalAccountData": null + }, + ], + "orderAccountingStatuses": [], + "validationResult": "preliminary", + "additionalRemarks": [ + { + "code": "PRODUCT_CHOICE_REQUIRED", + "parameter": "orderline.productId", + } + ], + "validationErrors": [], + }, + ], + "payments": [], + "orderCustomers": null + } + v2.2.1: + summary: Create order line v2.2.1 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, + "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": 21, + "amountExclTax": 100, + "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": 12, + "serviceReferenceId": null, + "amount": null, + "ovpasNumber": null, + "verificationCode": null, + "personalAccountData": null + }, + ], + "orderAccountingStatuses": [], + "validationResult": "preliminary", + "additionalRemarks": [ + { + "code": "PERSONALACCOUNTDATA_BIRTHDATE_REQUIRED", + "parameter": "personalaccountdata.birthdate", + }, + { + "code": "TOKEN_REQUIRED", + "parameter": "customerToken", + }, + { + "code": "VALIDFROM_REQUIRED", + "parameter": "orderline.validFrom", + } + ], + "validationErrors": [], + }, + ], + "payments": [], + "orderCustomers": null + } value: { "validContents": false, @@ -2227,15 +1717,25 @@ paths: description: The JWT of the logged in customer (in case of a web shop). patch: tags: - - Order Creation v2 - summary: Update an existing order line. - description: Update an existing order line. + - Order Creation + summary: Update an existing order line. P1 + description: Update an existing order line. P1 requestBody: content: application/json: schema: $ref: "#/components/schemas/unavailable" examples: + v2.3: + summary: Update order line v2.3 + description: Update order line v2.3 + value: + { + "productId": 21, + "quantity": 1, + "validFrom": "2024-03-25T09:00:00", + "validUntil": null, + } v2.2: summary: Update order line v2.2 description: Update order line v2.2 @@ -2307,7 +1807,7 @@ paths: { "orderLineId": "cccada2c-d5ea-48ab-b4be-f590e16b5468", "externalOrderLineId": null, - "productId": 112, + "productId": 21, "productName": "HTM Regio Vrij - HL65 - Voltarief", "fikoArticleNumber": "6609", "productDescription": "Voor een vast bedrag onbeperkt reizen met EBS, HTM en RET in gebied HL65", @@ -2491,7 +1991,7 @@ paths: } delete: tags: - - Order Creation v2 + - Order Creation summary: Delete an existing order line. description: Delete an existing order line. responses: @@ -2582,8 +2082,8 @@ paths: description: The JWT of the logged in customer (in case of a web shop). post: tags: - - Order Creation v2 - summary: Add a customer token to an orderLine. P1 + - Order Creation + summary: Add a customer token to an orderLine. description: Add a customer token to an orderLine requestBody: content: @@ -2621,7 +2121,7 @@ paths: application/json: schema: $ref: "#/components/schemas/unavailable" - examples: + examples: v2.2: value: { @@ -2735,8 +2235,8 @@ paths: description: The JWT of the logged in customer (in case of a web shop). patch: tags: - - Order Creation v2 - summary: Update a customer token. P1 + - Order Creation + summary: Update a customer token. description: Update a customer token requestBody: content: @@ -2746,7 +2246,7 @@ paths: examples: v2.2: summary: Update a customer token v2.2 - description: Update a customer tokenv2.2 + description: Update a customer token v2.2 value: { "tokenTypeId": 1, @@ -2847,8 +2347,8 @@ paths: } delete: tags: - - Order Creation v2 - summary: Delete a customer token from an orderline. P1 + - Order Creation + summary: Delete a customer token from an orderline. description: Delete a customer token from an orderline responses: "200": @@ -2958,8 +2458,8 @@ paths: description: The JWT of the logged in customer (in case of a web shop). post: tags: - - Order Creation v2 - summary: Add personal account data to a customer token. P1 + - Order Creation + summary: Add personal account data to a customer token. description: Add personal account data to a customer token requestBody: content: @@ -3101,8 +2601,8 @@ paths: description: The JWT of the logged in customer (in case of a web shop). patch: tags: - - Order Creation v2 - summary: Update personal account data. P2 + - Order Creation + summary: Update personal account data. description: Update personal account data requestBody: content: @@ -3228,8 +2728,8 @@ paths: } delete: tags: - - Order Creation v2 - summary: Delete personal account data. P2 + - Order Creation + summary: Delete personal account data. description: Delete personal account data responses: "200": @@ -3347,7 +2847,7 @@ paths: description: The JWT of the logged in customer (in case of a web shop). post: tags: - - Order Creation v2 + - Order Creation summary: Add a payment to an existing order. description: Add a payment to an existing order. requestBody: @@ -3633,9 +3133,9 @@ paths: description: The JWT of the logged in customer (in case of a web shop). patch: tags: - - Order Creation v2 - summary: Update a payment on an existing order. - description: Update a payment on an existing order. + - Order Creation + summary: Update a payment on an existing order. P2 + description: Update a payment on an existing order. P2 requestBody: content: application/json: @@ -3655,8 +3155,8 @@ paths: "createdOn": "2024-03-22T09:00:00", "statusCode": "190", "statusDescription": "Success", - "statusSubCode": "S001", - "statusSubDescription": "PaymentSuccessful", + "statusSubCode": null, + "statusSubDescription": null, }, ], "mandateInput": @@ -4101,7 +3601,7 @@ paths: description: The JWT of the logged in customer (in case of a web shop). post: tags: - - Order Creation v2 + - Order Creation summary: Add a customer to an existing order. description: Add a customer to an existing order. requestBody: @@ -4311,7 +3811,7 @@ paths: example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c description: The JWT of the logged in customer (in case of a web shop). tags: - - Order Creation v2 + - Order Creation summary: Update a customer on an existing order. description: Update a customer on an existing order. requestBody: @@ -4497,7 +3997,7 @@ paths: example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c description: The JWT of the logged in customer (in case of a web shop). tags: - - Order Creation v2 + - Order Creation summary: Create a customer address for an existing order. description: Create a customer address for an existing order. requestBody: @@ -4688,7 +4188,7 @@ paths: example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c description: The JWT of the logged in customer (in case of a web shop). tags: - - Order Creation v2 + - Order Creation summary: Update a customer address for an existing order. description: Update a customer address for an existing order. requestBody: @@ -4849,7 +4349,7 @@ paths: } delete: tags: - - Order Creation v2 + - Order Creation summary: Delete an existing order address. description: Delete an existing order address. parameters: @@ -4965,12 +4465,130 @@ paths: description: The JWT of the logged in customer (in case of a web shop). post: tags: - - Order Fulfill v2 + - Order Fulfill summary: Fulfill an order without creating or updating the order as a resource. description: Fulfill an order without creating or updating the order as a resource. responses: "200": description: OK + /orders/validation/gboAgeProfile: + get: + tags: + - Order validation + summary: Get GBO age profile that is valid for the given input. P2 + 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/rfc9457" + 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/rfc9457" + 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: @@ -5006,3 +4624,23 @@ components: example: - "/account/12345" - "/account/67890" + 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 \ No newline at end of file