From 383ea04bcc16073c36a2179515a33921e60a7cf1 Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Fri, 14 Mar 2025 18:01:05 +0100 Subject: [PATCH 1/9] OVPAY-1564 - Changes in POST /orders. --- src/openapi/orders/service_engine_orders.yaml | 951 ++++++++---------- 1 file changed, 428 insertions(+), 523 deletions(-) diff --git a/src/openapi/orders/service_engine_orders.yaml b/src/openapi/orders/service_engine_orders.yaml index 214836a..4565ca9 100644 --- a/src/openapi/orders/service_engine_orders.yaml +++ b/src/openapi/orders/service_engine_orders.yaml @@ -124,7 +124,7 @@ paths: "startDate": "2024-03-22T09:00:00z", "quantity": 4, }, - ] + ] responses: "200": description: OK @@ -685,32 +685,33 @@ paths: ], }, } - "400": + "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.", + { + "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 - } - ] + "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, + }, + ], } /customers/{customerProfileId}/orders: parameters: @@ -882,7 +883,7 @@ paths: schema: $ref: "#/components/schemas/unavailable" example: - { + { "orders": [ { @@ -973,7 +974,7 @@ paths: post: tags: - Order Creation v2.0 - summary: Create a new order v2.0. + summary: Create a new order v2.0. description: Create a new order v2.0. requestBody: content: @@ -990,7 +991,6 @@ paths: "languageId": 1, "billingAddressId": 1, "shippingAddressId": 1, - "orderStatusId": 1, "orderLines": [ { @@ -1000,78 +1000,8 @@ paths: "validFrom": "2024-03-22T09:00:00", "validUntil": null, "orderLineStatusId": 1, - "customerTokens": - [ - { - "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", - }, - ], - "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", - } - ] - } } v1.2: summary: Order creation v1.2 @@ -1319,137 +1249,78 @@ paths: $ref: "#/components/schemas/unavailable" examples: v2.0: - value: + value: { - "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", - "externalOrderId": null, - "orderNumber": "ORD-123456", - "customerProfileId": 1337, - "totalAmount": 121, - "language": - { - "languageId": 1, - "name": "Nederlands", - "iso639Code": "nl-NL", - "ietfCode": "nl", - }, - "billingAddressId": 1, - "shippingAddressId": 1, - "touchPoint": - { - "salesTouchpointId": 3, - "name": "Website (Perplex)", - "isActive": true, - "retailerId": 1001, - }, - "createdOn": "2024-03-22T09:00:00", - "lastUpdatedOn": "2024-03-22T09:00:00", - "order_OrderStatus": - [ - { - "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%", - "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, - "orderLineStatus": - { "orderLineStatusId": 1, "name": "pending" }, - "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" : [] - }, - ], - "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": + "order": { - "birthname": "Jan", - "surname": "Vries", - "prefix": "de", - "emailAddress": "jandevries@outlook.com", - "dateOfBirth": "1970-01-01", - "addresses": + "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", + "externalOrderId": null, + "orderNumber": "ORD-123456", + "customerProfileId": 1337, + "totalAmount": 121, + "language": + { + "languageId": 1, + "name": "Nederlands", + "iso639Code": "nl-NL", + "ietfCode": "nl", + }, + "billingAddressId": 1, + "shippingAddressId": 1, + "touchPoint": + { + "salesTouchpointId": 3, + "name": "Website (Perplex)", + "isActive": true, + "retailerId": 1001, + }, + "createdOn": "2024-03-22T09:00:00", + "lastUpdatedOn": "2024-03-22T09:00:00", + "order_OrderStatus": [ { - "addressTypeId": 1, - "street": "Kon. Julianaplein", - "houseNumber": 10, - "houseNumberSuffix": "a", - "postalCode": "2595 AA", - "city": "Den Haag", - "country": "NL", - } - ] - } + "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%", + "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, + "orderLineStatus": + { "orderLineStatusId": 1, "name": "pending" }, + }, + ], + }, + "orderValidation": + { + "validationResult": true, + "additionalRemarks": + [{ "code": "string", "parameter": "string" }], + "validationErrors": + [{ "detail": "string", "pointer": "string" }], + }, } v1.2: value: @@ -1457,32 +1328,33 @@ paths: "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", "orderNumber": "ORD-123456", } - "400": + "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.", + { + "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 - } - ] + "errors": + [ + { + "detail": "Startdate of this product should be at most 60 days in the future.", + "pointer": "#/0/startDate", + "ovPayTokenId": 123, + "productId": 2, + }, + { + "detail": "Combination of product and token type is not valid.", + "pointer": "#/1/ovPayTokenId", + "ovPayTokenId": 123, + "productId": 3, + }, + ], } /orders/{orderId}: parameters: @@ -1704,23 +1576,25 @@ paths: v2.0: summary: Order update v2.0 description: Order update v2.0 - value: { - "languageId": 1, - "billingAddressId": 2, - "shippingAddressId": 1, - "lastUpdatedOn": "2024-03-22T09:00:00", - } + value: + { + "languageId": 1, + "billingAddressId": 2, + "shippingAddressId": 1, + "lastUpdatedOn": "2024-03-22T09:00:00", + } v1.2: summary: Order update v1.2 description: Order update v1.2 - value: { - "customerProfileId": 1337, - "totalAmount": 121, - "languageId": 1, - "billingAddressId": 1, - "shippingAddressId": 1, - "lastUpdatedOn": "2024-03-22T09:00:00", - } + value: + { + "customerProfileId": 1337, + "totalAmount": 121, + "languageId": 1, + "billingAddressId": 1, + "shippingAddressId": 1, + "lastUpdatedOn": "2024-03-22T09:00:00", + } responses: "200": description: OK @@ -1730,19 +1604,20 @@ paths: $ref: "#/components/schemas/unavailable" examples: v2.0: - value: + value: { "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", "externalOrderId": null, "orderNumber": "ORD-123456", "customerProfileId": 1337, "totalAmount": 121, - "language": { + "language": + { "languageId": 1, "name": "Nederlands", "iso639Code": "nl-NL", - "ietfCode": "nl" - }, + "ietfCode": "nl", + }, "billingAddressId": 1, "shippingAddressId": 1, "touchPoint": @@ -1758,10 +1633,11 @@ paths: [ { "order_orderStatusId": "f1d0e1a7-a3cf-4876-b8f2-073add10667f", - "orderStatus": { "orderStatusId": 1, "name": "concept" }, + "orderStatus": + { "orderStatusId": 1, "name": "concept" }, "createdOn": "2024-03-22T09:00:00", "description": "Order is aangemaakt", - } + }, ], "orderLines": [ @@ -1806,14 +1682,14 @@ paths: "oneTimePassword": "H5Iiz3JTaQeIV8p", }, }, - ], - "additionalRemarks" : + ], + "additionalRemarks": [ - { + { "code": "MANDATE_REQUIRED", - "parameter": "directDebitMandateId" - } - ] + "parameter": "directDebitMandateId", + }, + ], }, ], "payments": @@ -1863,9 +1739,9 @@ paths: "postalCode": "2595 AA", "city": "Den Haag", "country": "NL", - } - ] - } + }, + ], + }, } v1.2: value: @@ -1873,32 +1749,33 @@ paths: "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", "orderNumber": "ORD-123456", } - "400": + "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.", + { + "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 - } - ] + "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, + }, + ], } delete: tags: @@ -1908,25 +1785,26 @@ paths: responses: "200": description: OK - "400": + "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.", + { + "type": "https://htm.nl/api/v1/probs/validationerror", + "title": "Your request is not valid.", "detail": "The order can not be deleted.", "instance": "urn:uuid:4017fabc-1b28-11e8-accf-0ed5f89f718b", - "errors": [ - { - "detail": "Order status is paid", - "pointer": "#/order_OrderStatus/1/orderStatus/orderStatusId", - "orderStatusId": 4 - } - ] + "errors": + [ + { + "detail": "Order status is paid", + "pointer": "#/order_OrderStatus/1/orderStatus/orderStatusId", + "orderStatusId": 4, + }, + ], } /orders/{orderId}/orderlines: parameters: @@ -1958,11 +1836,11 @@ paths: examples: v2.0: summary: Create orderLine v2.0 - description: Create orderLine v2.0 + description: Create orderLine v2.0 value: { "externalOrderLineId": null, - "productId": 2, + "productId": 2, "quantity": 1, "validFrom": "2024-03-22T09:00:00", "validUntil": null, @@ -1974,16 +1852,16 @@ paths: "tokenTypeId": 1, "ovPayTokenId": 4, "serviceReferenceId": null, - "amount": null , - "ovpasNumber": null , - "verificationCode": null , - "personalAccountData": null + "amount": null, + "ovpasNumber": null, + "verificationCode": null, + "personalAccountData": null, }, - ] + ], } v1.2: summary: Create orderLine v1.2 - description: Create orderLine v1.2 + description: Create orderLine v1.2 value: { "externalOrderLineId": null, @@ -2040,19 +1918,20 @@ paths: $ref: "#/components/schemas/unavailable" examples: v2.0: - value: + value: { "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", "externalOrderId": null, "orderNumber": "ORD-123456", "customerProfileId": 1337, "totalAmount": 121, - "language": { + "language": + { "languageId": 1, "name": "Nederlands", "iso639Code": "nl-NL", - "ietfCode": "nl" - }, + "ietfCode": "nl", + }, "billingAddressId": 1, "shippingAddressId": 1, "touchPoint": @@ -2068,10 +1947,11 @@ paths: [ { "order_orderStatusId": "f1d0e1a7-a3cf-4876-b8f2-073add10667f", - "orderStatus": { "orderStatusId": 1, "name": "concept" }, + "orderStatus": + { "orderStatusId": 1, "name": "concept" }, "createdOn": "2024-03-22T09:00:00", "description": "Order is aangemaakt", - } + }, ], "orderLines": [ @@ -2116,15 +1996,15 @@ paths: "oneTimePassword": "H5Iiz3JTaQeIV8p", }, }, - ], - "additionalRemarks" : + ], + "additionalRemarks": [ - { + { "code": "MANDATE_REQUIRED", - "parameter": "directDebitMandateId" - } - ] - }, + "parameter": "directDebitMandateId", + }, + ], + }, { "orderLineId": "2cb04b38-e9a8-465a-a273-261c55a21b71", "externalOrderLineId": null, @@ -2153,14 +2033,14 @@ paths: "tokenTypeId": 1, "ovPayTokenId": 4, "serviceReferenceId": null, - "amount": null , - "ovpasNumber": null , - "verificationCode": null , - "personalAccountData": null - } - ], - "additionalRemarks" : [] - } + "amount": null, + "ovpasNumber": null, + "verificationCode": null, + "personalAccountData": null, + }, + ], + "additionalRemarks": [], + }, ], "payments": [ @@ -2209,38 +2089,40 @@ paths: "postalCode": "2595 AA", "city": "Den Haag", "country": "NL", - } - ] - } + }, + ], + }, } v1.2: - value: { "orderLineId": "e78b78d9-4fb0-4a9c-8dc0-6d100c9f1b3f" } - "400": + value: + { "orderLineId": "e78b78d9-4fb0-4a9c-8dc0-6d100c9f1b3f" } + "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.", + { + "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 - } - ] + "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, + }, + ], } /orderlines/{orderLineId}: parameters: @@ -2272,16 +2154,16 @@ paths: examples: v2.0: summary: Orderline update v2.0 - description: Orderline update v2.0 + description: Orderline update v2.0 value: - { + { "quantity": 1, "validFrom": "2024-03-25T09:00:00", - "validUntil": null + "validUntil": null, } v1.2: - summary: Orderline updatev1.2 - description: Orderline update v1.2 + summary: Orderline updatev1.2 + description: Orderline update v1.2 value: { "taxAmount": 21, @@ -2300,7 +2182,7 @@ paths: application/json: schema: $ref: "#/components/schemas/unavailable" - examples: + examples: v2.0: value: { @@ -2309,12 +2191,13 @@ paths: "orderNumber": "ORD-123456", "customerProfileId": 1337, "totalAmount": 121, - "language": { + "language": + { "languageId": 1, "name": "Nederlands", "iso639Code": "nl-NL", - "ietfCode": "nl" - }, + "ietfCode": "nl", + }, "billingAddressId": 1, "shippingAddressId": 1, "touchPoint": @@ -2330,10 +2213,11 @@ paths: [ { "order_orderStatusId": "f1d0e1a7-a3cf-4876-b8f2-073add10667f", - "orderStatus": { "orderStatusId": 1, "name": "concept" }, + "orderStatus": + { "orderStatusId": 1, "name": "concept" }, "createdOn": "2024-03-22T09:00:00", "description": "Order is aangemaakt", - } + }, ], "orderLines": [ @@ -2376,16 +2260,16 @@ paths: "fileType": "image/jpg", "challengeTypeId": 1, "oneTimePassword": "H5Iiz3JTaQeIV8p", - } - } - ], - "additionalRemarks" : + }, + }, + ], + "additionalRemarks": [ - { + { "code": "MANDATE_REQUIRED", - "parameter": "directDebitMandateId" - } - ] + "parameter": "directDebitMandateId", + }, + ], }, ], "payments": @@ -2435,33 +2319,34 @@ paths: "postalCode": "2595 AA", "city": "Den Haag", "country": "NL", - } - ] - } + }, + ], + }, } v1.2: value: { "orderLineId": "e78b78d9-4fb0-4a9c-8dc0-6d100c9f1b3f" } - "400": + "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.", + { + "type": "https://htm.nl/api/v1/probs/validationerror", + "title": "Your request is not valid.", "detail": "The start date of the product is not allowed. 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 - } - ] + "errors": + [ + { + "detail": "Startdate of this product should be at most 60 days in the future.", + "pointer": "#/0/startDate", + "ovPayTokenId": 123, + "productId": 2, + }, + ], } delete: tags: @@ -2484,12 +2369,13 @@ paths: "orderNumber": "ORD-123456", "customerProfileId": 1337, "totalAmount": 0, - "language": { + "language": + { "languageId": 1, "name": "Nederlands", "iso639Code": "nl-NL", - "ietfCode": "nl" - }, + "ietfCode": "nl", + }, "billingAddressId": 1, "shippingAddressId": 1, "touchPoint": @@ -2505,10 +2391,11 @@ paths: [ { "order_orderStatusId": "f1d0e1a7-a3cf-4876-b8f2-073add10667f", - "orderStatus": { "orderStatusId": 1, "name": "concept" }, + "orderStatus": + { "orderStatusId": 1, "name": "concept" }, "createdOn": "2024-03-22T09:00:00", "description": "Order is aangemaakt", - } + }, ], "orderLines": null, "payments": null, @@ -2529,30 +2416,31 @@ paths: "postalCode": "2595 AA", "city": "Den Haag", "country": "NL", - } - ] - } + }, + ], + }, } - "400": + "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.", + { + "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": "Product requires product with productId=2", - "pointer": "#/1/orderLine", - "orderLineId": "0574440e-7fa0-401f-b907-539c91633a5d", - "productId": 3 - } - ] + "errors": + [ + { + "detail": "Product requires product with productId=2", + "pointer": "#/1/orderLine", + "orderLineId": "0574440e-7fa0-401f-b907-539c91633a5d", + "productId": 3, + }, + ], } /orders/{orderId}/payments: parameters: @@ -2582,9 +2470,9 @@ paths: schema: $ref: "#/components/schemas/unavailable" examples: - v2.0: + v2.0: summary: Order creation v2.0 - description: Order creation v2.0 + description: Order creation v2.0 value: { "createdOn": "2024-03-22T09:00:00", @@ -2613,9 +2501,9 @@ paths: "place": "Den Haag", }, } - v1.2: + v1.2: summary: Order creation v1.2 - description: Order creation v1.2 + description: Order creation v1.2 value: { "createdOn": "2024-03-22T09:00:00", @@ -2661,12 +2549,13 @@ paths: "orderNumber": "ORD-123456", "customerProfileId": 1337, "totalAmount": 121, - "language": { + "language": + { "languageId": 1, "name": "Nederlands", "iso639Code": "nl-NL", - "ietfCode": "nl" - }, + "ietfCode": "nl", + }, "billingAddressId": 1, "shippingAddressId": 1, "touchPoint": @@ -2682,10 +2571,11 @@ paths: [ { "order_orderStatusId": "f1d0e1a7-a3cf-4876-b8f2-073add10667f", - "orderStatus": { "orderStatusId": 1, "name": "concept" }, + "orderStatus": + { "orderStatusId": 1, "name": "concept" }, "createdOn": "2024-03-22T09:00:00", "description": "Order is aangemaakt", - } + }, ], "orderLines": [ @@ -2731,7 +2621,7 @@ paths: }, }, ], - }, + }, { "orderLineId": "2cb04b38-e9a8-465a-a273-261c55a21b71", "externalOrderLineId": null, @@ -2760,14 +2650,14 @@ paths: "tokenTypeId": 1, "ovPayTokenId": 4, "serviceReferenceId": null, - "amount": null , - "ovpasNumber": null , - "verificationCode": null , - "personalAccountData": null - } - ] - } - ], + "amount": null, + "ovpasNumber": null, + "verificationCode": null, + "personalAccountData": null, + }, + ], + }, + ], "payments": [ { @@ -2815,13 +2705,12 @@ paths: "postalCode": "2595 AA", "city": "Den Haag", "country": "NL", - } - ] - } + }, + ], + }, } v1.2: - value: - { "paymentId": "94270188-4cf6-447e-bd49-e8186bcec073" } + value: { "paymentId": "94270188-4cf6-447e-bd49-e8186bcec073" } /payments/{paymentId}: parameters: - in: path @@ -2852,7 +2741,7 @@ paths: examples: v2.0: summary: Order payment update v2.0 - description: Order payment update v2.0 + description: Order payment update v2.0 value: { "htmPaymentReference": "HTM-1234", @@ -2875,11 +2764,11 @@ paths: "iban": "NL44RABO0123456789", "ascription": "J. de Vries", "place": "Den Haag", - } + }, } v1.2: summary: Order payment update v1.2 - description: Order payment update v1.2 + description: Order payment update v1.2 value: { "htmPaymentReference": "HTM-1234", @@ -2901,12 +2790,13 @@ paths: "orderNumber": "ORD-123456", "customerProfileId": 1337, "totalAmount": 121, - "language": { + "language": + { "languageId": 1, "name": "Nederlands", "iso639Code": "nl-NL", - "ietfCode": "nl" - }, + "ietfCode": "nl", + }, "billingAddressId": 1, "shippingAddressId": 1, "touchpointId": 3, @@ -2916,10 +2806,11 @@ paths: [ { "order_orderStatusId": "f1d0e1a7-a3cf-4876-b8f2-073add10667f", - "orderStatus": { "orderStatusId": 1, "name": "concept" }, + "orderStatus": + { "orderStatusId": 1, "name": "concept" }, "createdOn": "2024-03-22T09:00:00", "description": "Order is aangemaakt", - } + }, ], "orderLines": [ @@ -2965,8 +2856,8 @@ paths: }, }, ], - } - ], + }, + ], "payments": [ { @@ -3021,13 +2912,12 @@ paths: "postalCode": "2595 AA", "city": "Den Haag", "country": "NL", - } - ] - } + }, + ], + }, } v1.2: - value: - { "paymentId": "94270188-4cf6-447e-bd49-e8186bcec073" } + value: { "paymentId": "94270188-4cf6-447e-bd49-e8186bcec073" } /orders/{orderId}/ordercustomers: parameters: - in: path @@ -3058,7 +2948,7 @@ paths: examples: v2.0: summary: Order payment update v2.0 - description: Order payment update v2.0 + description: Order payment update v2.0 value: { "birthname": "Jan", @@ -3081,7 +2971,7 @@ paths: } v1.2: summary: Order payment update v1.2 - description: Order payment update v1.2 + description: Order payment update v1.2 value: { "birthname": "Jan", @@ -3118,12 +3008,13 @@ paths: "orderNumber": "ORD-123456", "customerProfileId": 1337, "totalAmount": 121, - "language": { + "language": + { "languageId": 1, "name": "Nederlands", "iso639Code": "nl-NL", - "ietfCode": "nl" - }, + "ietfCode": "nl", + }, "billingAddressId": 1, "shippingAddressId": 1, "touchPoint": @@ -3139,10 +3030,11 @@ paths: [ { "order_orderStatusId": "f1d0e1a7-a3cf-4876-b8f2-073add10667f", - "orderStatus": { "orderStatusId": 1, "name": "concept" }, + "orderStatus": + { "orderStatusId": 1, "name": "concept" }, "createdOn": "2024-03-22T09:00:00", "description": "Order is aangemaakt", - } + }, ], "orderLines": [ @@ -3188,8 +3080,8 @@ paths: }, }, ], - } - ], + }, + ], "payments": null, "customer": { @@ -3208,13 +3100,15 @@ paths: "postalCode": "2595 AA", "city": "Den Haag", "country": "NL", - } - ] - } + }, + ], + }, } v1.2: value: - { "orderCustomerId": "94270188-4cf6-447e-bd49-e8186bcec073" } + { + "orderCustomerId": "94270188-4cf6-447e-bd49-e8186bcec073", + } /ordercustomers/{orderCustomerId}: patch: parameters: @@ -3245,8 +3139,8 @@ paths: examples: v2.0: summary: Order customer update v2.0 - description: Order customer update v2.0 - value: + description: Order customer update v2.0 + value: { "birthname": "Jan", "surname": "Vries", @@ -3256,8 +3150,8 @@ paths: } v1.2: summary: Order customer update v1.2 - description: Order customer update v1.2 - value: + description: Order customer update v1.2 + value: { "birthname": "Jan", "surname": "Vries", @@ -3281,12 +3175,13 @@ paths: "orderNumber": "ORD-123456", "customerProfileId": 1337, "totalAmount": 121, - "language": { + "language": + { "languageId": 1, "name": "Nederlands", "iso639Code": "nl-NL", - "ietfCode": "nl" - }, + "ietfCode": "nl", + }, "billingAddressId": 1, "shippingAddressId": 1, "touchPoint": @@ -3302,10 +3197,11 @@ paths: [ { "order_orderStatusId": "f1d0e1a7-a3cf-4876-b8f2-073add10667f", - "orderStatus": { "orderStatusId": 1, "name": "concept" }, + "orderStatus": + { "orderStatusId": 1, "name": "concept" }, "createdOn": "2024-03-22T09:00:00", "description": "Order is aangemaakt", - } + }, ], "orderLines": [ @@ -3350,9 +3246,9 @@ paths: "oneTimePassword": "H5Iiz3JTaQeIV8p", }, }, - ], - "additionalRemarks" : [] - } + ], + "additionalRemarks": [], + }, ], "payments": null, "customer": @@ -3372,13 +3268,15 @@ paths: "postalCode": "2595 AA", "city": "Den Haag", "country": "NL", - } - ] - } + }, + ], + }, } v1.2: - value: - { "orderCustomerId": "94270188-4cf6-447e-bd49-e8186bcec073" } + value: + { + "orderCustomerId": "94270188-4cf6-447e-bd49-e8186bcec073", + } /ordercustomers/{orderCustomerId}/orderCustomerAddress: post: parameters: @@ -3409,8 +3307,8 @@ paths: examples: v2.0: summary: Order customer address create v1.2 - description: Order customer address create v1.2 - value: + description: Order customer address create v1.2 + value: { "addressTypeId": 1, "street": "Kon. Julianaplein", @@ -3436,12 +3334,13 @@ paths: "orderNumber": "ORD-123456", "customerProfileId": 1337, "totalAmount": 121, - "language": { + "language": + { "languageId": 1, "name": "Nederlands", "iso639Code": "nl-NL", - "ietfCode": "nl" - }, + "ietfCode": "nl", + }, "billingAddressId": 2, "shippingAddressId": 1, "touchPoint": @@ -3457,10 +3356,11 @@ paths: [ { "order_orderStatusId": "f1d0e1a7-a3cf-4876-b8f2-073add10667f", - "orderStatus": { "orderStatusId": 1, "name": "concept" }, + "orderStatus": + { "orderStatusId": 1, "name": "concept" }, "createdOn": "2024-03-22T09:00:00", "description": "Order is aangemaakt", - } + }, ], "orderLines": [ @@ -3505,15 +3405,15 @@ paths: "oneTimePassword": "H5Iiz3JTaQeIV8p", }, }, - ], - "additionalRemarks" : + ], + "additionalRemarks": [ - { + { "code": "MANDATE_REQUIRED", - "parameter": "directDebitMandateId" - } - ] - } + "parameter": "directDebitMandateId", + }, + ], + }, ], "payments": null, "customer": @@ -3533,10 +3433,10 @@ paths: "postalCode": "2595 AA", "city": "Den Haag", "country": "NL", - } - ] - } - } + }, + ], + }, + } /orderCustomerAddress/{orderCustomerAddressId}: patch: parameters: @@ -3567,8 +3467,8 @@ paths: examples: v2.0: summary: Order customer address create v1.2 - description: Order customer address create v1.2 - value: + description: Order customer address create v1.2 + value: { "addressTypeId": 1, "street": "Kon. Julianaplein", @@ -3594,12 +3494,13 @@ paths: "orderNumber": "ORD-123456", "customerProfileId": 1337, "totalAmount": 121, - "language": { + "language": + { "languageId": 1, "name": "Nederlands", "iso639Code": "nl-NL", - "ietfCode": "nl" - }, + "ietfCode": "nl", + }, "billingAddressId": 1, "shippingAddressId": 1, "touchPoint": @@ -3615,10 +3516,11 @@ paths: [ { "order_orderStatusId": "f1d0e1a7-a3cf-4876-b8f2-073add10667f", - "orderStatus": { "orderStatusId": 1, "name": "concept" }, + "orderStatus": + { "orderStatusId": 1, "name": "concept" }, "createdOn": "2024-03-22T09:00:00", "description": "Order is aangemaakt", - } + }, ], "orderLines": [ @@ -3663,15 +3565,15 @@ paths: "oneTimePassword": "H5Iiz3JTaQeIV8p", }, }, - ], - "additionalRemarks" : + ], + "additionalRemarks": [ - { + { "code": "MANDATE_REQUIRED", - "parameter": "directDebitMandateId" - } - ] - } + "parameter": "directDebitMandateId", + }, + ], + }, ], "payments": null, "customer": @@ -3691,10 +3593,10 @@ paths: "postalCode": "2595 AA", "city": "Den Haag", "country": "NL", - } - ] - } - } + }, + ], + }, + } delete: tags: - Order Creation v2.0 @@ -3732,12 +3634,13 @@ paths: "orderNumber": "ORD-123456", "customerProfileId": 1337, "totalAmount": 0, - "language": { + "language": + { "languageId": 1, "name": "Nederlands", "iso639Code": "nl-NL", - "ietfCode": "nl" - }, + "ietfCode": "nl", + }, "billingAddressId": 1, "shippingAddressId": 1, "touchPoint": @@ -3753,10 +3656,11 @@ paths: [ { "order_orderStatusId": "f1d0e1a7-a3cf-4876-b8f2-073add10667f", - "orderStatus": { "orderStatusId": 1, "name": "concept" }, + "orderStatus": + { "orderStatusId": 1, "name": "concept" }, "createdOn": "2024-03-22T09:00:00", "description": "Order is aangemaakt", - } + }, ], "orderLines": null, "payments": null, @@ -3767,29 +3671,30 @@ paths: "prefix": "de", "emailAddress": "jandevries@outlook.com", "dateOfBirth": "1970-01-01", - "addresses": null - } + "addresses": null, + }, } - "400": + "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.", + { + "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": "Product requires product with productId=2", - "pointer": "#/1/orderLine", - "orderLineId": "0574440e-7fa0-401f-b907-539c91633a5d", - "productId": 3 - } - ] + "errors": + [ + { + "detail": "Product requires product with productId=2", + "pointer": "#/1/orderLine", + "orderLineId": "0574440e-7fa0-401f-b907-539c91633a5d", + "productId": 3, + }, + ], } /orders/{orderId}/fulfill: parameters: From 79dbbe14ff6c58f7f338c585977ac82e80775c3c Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Mon, 17 Mar 2025 13:37:45 +0100 Subject: [PATCH 2/9] OVPAY-1564 - Added token information to POST orders. --- src/openapi/orders/service_engine_orders.yaml | 46 ++++++++++++++++++- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/src/openapi/orders/service_engine_orders.yaml b/src/openapi/orders/service_engine_orders.yaml index 4565ca9..bffeb33 100644 --- a/src/openapi/orders/service_engine_orders.yaml +++ b/src/openapi/orders/service_engine_orders.yaml @@ -975,7 +975,11 @@ paths: tags: - Order Creation v2.0 summary: Create a new order v2.0. - description: Create a new order v2.0. + description: | + Create a new order v2.0. This order can only contain the order itself, + one ore more order lines and optionally a customer token per order line. + All orders created via this endpoint are created with the status "concept". + Order lines are created with status "pending". requestBody: content: application/json: @@ -999,7 +1003,24 @@ paths: "quantity": 1, "validFrom": "2024-03-22T09:00:00", "validUntil": null, - "orderLineStatusId": 1, + "customerTokens": + [ + { + "tokenTypeId": 1, + "ovPayTokenId": 1, + "serviceReferenceId": "NLOV1234567ABCDEFG", + "amount": 34, + "ovpasNumber": "OV34567", + "verificationCode": "A7H6", + "personalAccountData": + { + "name": "John Doe", + "dateOfBirth": "1980-01-01", + "gender": "male", + "countryOfResidence": "NL", + }, + }, + ], }, ], } @@ -1310,6 +1331,27 @@ paths: "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": "John Doe", + "dateOfBirth": "1980-01-01", + "gender": "male", + "countryOfResidence": "NL", + }, + }, + ], }, ], }, From a6005c6f2f7bca9de9ef4eb37a1316c78c49515c Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Thu, 20 Mar 2025 17:12:01 +0100 Subject: [PATCH 3/9] OVPAY-1564 - Improvements in validation objects, part 1. --- src/openapi/orders/service_engine_orders.yaml | 1132 +++++++++-------- 1 file changed, 588 insertions(+), 544 deletions(-) diff --git a/src/openapi/orders/service_engine_orders.yaml b/src/openapi/orders/service_engine_orders.yaml index bffeb33..fe75e54 100644 --- a/src/openapi/orders/service_engine_orders.yaml +++ b/src/openapi/orders/service_engine_orders.yaml @@ -731,7 +731,7 @@ paths: description: The JWT of the logged in customer (in case of a web shop). get: tags: - - Order Retrieval v2.1 + - Order Retrieval v1 & v2 summary: Get all orders for a specific customer. description: Get all orders for a specific customer. responses: @@ -741,95 +741,104 @@ paths: application/json: schema: $ref: "#/components/schemas/unavailable" - example: - { - "orders": - [ - { - "orderId": "afce35b2-1dff-4ace-98d0-4b9ac405c87d", - "externalOrderId": "bac3958b-804a-43e3-b5f7-0b0fffaae5b7", - "orderNumber": "123456", - "customerProfileId": 42, - "totalAmount": 121, - "touchPoint": + examples: + v2: + summary: Order list for customer v2 + description: Order list for customer v2 + value: + { + "orders": + [ { - "salesTouchpointId": 3, - "name": "Website (Perplex)", - "isActive": true, - "retailerId": 1001, - }, - "language": - { - "languageId": 1, - "name": "Nederlands", - "iso639Code": "nl-NL", - "ietfCode": "nl", - }, - "billingAddressId": 1, - "shippingAddressId": 1, - "createdOn": "2024-03-22T09:00:00", - "lastUpdatedOn": "2024-03-22T09:00:00", - "order_OrderStatus": - { - "order_orderStatusId": "f1d0e1a7-a3cf-4876-b8f2-073add10667f", - "orderStatus": - { "orderStatusId": 4, "name": "paid" }, - "createdOn": "2024-03-22T09:00:00", - "description": "Order succesvol betaald", - }, - "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", - }, - }, - ], - "_links": - { - "self": + "orderId": "afce35b2-1dff-4ace-98d0-4b9ac405c87d", + "externalOrderId": "bac3958b-804a-43e3-b5f7-0b0fffaae5b7", + "orderNumber": "123456", + "customerProfileId": 42, + "totalAmount": 121, + "touchPoint": { - "href": "https://api.example.com/items/1", - "method": "GET", - "templated": true, + "salesTouchpointId": 3, + "name": "Website (Perplex)", + "isActive": true, + "retailerId": 1001, + }, + "language": + { + "languageId": 1, + "name": "Nederlands", + "iso639Code": "nl-NL", + "ietfCode": "nl", + }, + "billingAddressId": 1, + "shippingAddressId": 1, + "createdOn": "2024-03-22T09:00:00", + "lastUpdatedOn": "2024-03-22T09:00:00", + "order_OrderStatus": + { + "order_orderStatusId": "f1d0e1a7-a3cf-4876-b8f2-073add10667f", + "orderStatus": + { "orderStatusId": 4, "name": "paid" }, + "createdOn": "2024-03-22T09:00:00", + "description": "Order succesvol betaald", + }, + "orderLines": [], + "payments": + [ + { + "paymentId": "c772868c-5cce-46a3-8821-be6811332252", + "createdOn": "2024-03-22T09:00:00", + "amountDebit": 121, + "paymentMethodId": 1, + "touchPointId": 1, + "isRefund": false, + "htmPaymentReference": "HTM-1234", + "pspPaymentReference": "Buckaroo-1234", + "paymentStatuses": + [ + { + "paymentStatusId": "ff9f2365-efc8-4f97-a6c1-e01fcddad917", + "createdOn": "2024-03-22T09:00:00", + "statusCode": "190", + "statusDescription": "Success", + "statusSubCode": "S001", + "statusSubDescription": "PaymentSuccessFul", + }, + ], + "mandateInput": + { + "mandateInputId": "1d6626cd-b93b-4ea6-85d5-a8e3a24a2725", + "directDebitMandateTypeId": 1, + "createdOn": "2024-03-22T09:00:00", + "bic": "RABONL2U", + "iban": "NL44RABO0123456789", + "ascription": "J. de Vries", + "place": "Den Haag", + }, + }, + ], + "orderCustomer": null, + "_links": + { + "self": + { + "href": "https://api.example.com/items/1", + "method": "GET", + "templated": true, + }, }, }, - }, - ], - "_links": - { - "self": + ], + "_links": { - "href": "https://api.example.com/items", - "method": "GET", - "templated": true, + "self": + { + "href": "https://api.example.com/items", + "method": "GET", + "templated": true, + }, }, - }, - "href": "string", - } + "href": "string", + } /orders: parameters: - in: header @@ -872,7 +881,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 v2.1 + - Order Retrieval v1 & v2 summary: Find orders. description: Find orders. responses: @@ -882,101 +891,110 @@ paths: application/json: schema: $ref: "#/components/schemas/unavailable" - example: - { - "orders": - [ - { - "orderId": "afce35b2-1dff-4ace-98d0-4b9ac405c87d", - "externalOrderId": "bac3958b-804a-43e3-b5f7-0b0fffaae5b7", - "orderNumber": "123456", - "customerProfileId": 42, - "totalAmount": 121, - "touchPoint": + examples: + v2: + summary: Find orders v2 + description: Find orders v2 + value: + { + "orders": + [ { - "salesTouchpointId": 3, - "name": "Website (Perplex)", - "isActive": true, - "retailerId": 1001, - }, - "language": - { - "languageId": 1, - "name": "Nederlands", - "iso639Code": "nl-NL", - "ietfCode": "nl", - }, - "billingAddressId": 1, - "shippingAddressId": 1, - "createdOn": "2024-03-22T09:00:00", - "lastUpdatedOn": "2024-03-22T09:00:00", - "order_OrderStatus": - { - "order_orderStatusId": "f1d0e1a7-a3cf-4876-b8f2-073add10667f", - "orderStatus": - { "orderStatusId": 4, "name": "paid" }, - "createdOn": "2024-03-22T09:00:00", - "description": "Order succesvol betaald", - }, - "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", - }, - }, - ], - "_links": - { - "self": + "orderId": "afce35b2-1dff-4ace-98d0-4b9ac405c87d", + "externalOrderId": "bac3958b-804a-43e3-b5f7-0b0fffaae5b7", + "orderNumber": "123456", + "customerProfileId": 42, + "totalAmount": 121, + "touchPoint": { - "href": "https://api.example.com/items/1", - "method": "GET", - "templated": true, + "salesTouchpointId": 3, + "name": "Website (Perplex)", + "isActive": true, + "retailerId": 1001, + }, + "language": + { + "languageId": 1, + "name": "Nederlands", + "iso639Code": "nl-NL", + "ietfCode": "nl", + }, + "billingAddressId": 1, + "shippingAddressId": 1, + "createdOn": "2024-03-22T09:00:00", + "lastUpdatedOn": "2024-03-22T09:00:00", + "order_OrderStatus": + { + "order_orderStatusId": "f1d0e1a7-a3cf-4876-b8f2-073add10667f", + "orderStatus": + { "orderStatusId": 4, "name": "paid" }, + "createdOn": "2024-03-22T09:00:00", + "description": "Order succesvol betaald", + }, + "orderLines": [], + "payments": + [ + { + "paymentId": "1a973c85-7a96-41b5-bbf2-7919d6a6db15", + "createdOn": "2024-03-22T09:00:00", + "amountDebit": 121, + "paymentMethodId": 1, + "touchPointId": 1, + "isRefund": false, + "htmPaymentReference": "HTM-1234", + "pspPaymentReference": "Buckaroo-1234", + "paymentStatuses": + [ + { + "paymentStatusId": "42eee610-1a17-4f02-be14-7e25d69d35f3", + "createdOn": "2024-03-22T09:00:00", + "statusCode": "190", + "statusDescription": "Success", + "statusSubCode": "S001", + "statusSubDescription": "PaymentSuccessFul", + }, + ], + "mandateInput": + { + "mandateInputId": "5397f2d7-eefa-4e82-a086-1e0e3ad38bdb", + "directDebitMandateTypeId": 1, + "createdOn": "2024-03-22T09:00:00", + "bic": "RABONL2U", + "iban": "NL44RABO0123456789", + "ascription": "J. de Vries", + "place": "Den Haag", + }, + }, + ], + "orderCustomer": null, + "_links": + { + "self": + { + "href": "https://api.example.com/items/1", + "method": "GET", + "templated": true, + }, }, }, - }, - ], - "_links": - { - "self": + ], + "_links": { - "href": "https://api.example.com/items", - "method": "GET", - "templated": true, + "self": + { + "href": "https://api.example.com/items", + "method": "GET", + "templated": true, + }, }, - }, - "href": "string", - } + "href": "string", + } post: tags: - - Order Creation v2.0 - summary: Create a new order v2.0. + - Order Creation v2 + summary: Create a new order description: | - Create a new order v2.0. This order can only contain the order itself, + Create a new order. This order can only contain the order itself, one ore more order lines and optionally a customer token per order line. All orders created via this endpoint are created with the status "concept". Order lines are created with status "pending". @@ -1352,17 +1370,27 @@ paths: }, }, ], + "orderAccountingStatuses": [], + "validationResult": false, + "additionalRemarks": + [ + { + "code": "MANDATE_REQUIRED", + "parameter": "directDebitMandateId", + }, + ], + "validationErrors": + [ + { + "detail": "Startdate of this product should be at most 60 days in the future.", + "pointer": "#/0/startDate", + }, + ], }, ], }, - "orderValidation": - { - "validationResult": true, - "additionalRemarks": - [{ "code": "string", "parameter": "string" }], - "validationErrors": - [{ "detail": "string", "pointer": "string" }], - }, + "payments": [], + "orderCustomer": null, } v1.2: value: @@ -1417,7 +1445,7 @@ paths: description: The JWT of the logged in customer (in case of a web shop). get: tags: - - Order Retrieval v1.1 + - Order Retrieval v1 & v2 summary: Get a single order. description: Get a single order. responses: @@ -1427,186 +1455,219 @@ paths: application/json: schema: $ref: "#/components/schemas/unavailable" - example: - { - "orderId": "afce35b2-1dff-4ace-98d0-4b9ac405c87d", - "externalOrderId": "bac3958b-804a-43e3-b5f7-0b0fffaae5b7", - "orderNumber": "123456", - "customerProfileId": 42, - "totalAmount": 121, - "touchPoint": + examples: + v2: + summary: Order details v2 + description: Order details v2 + value: { - "salesTouchpointId": 3, - "name": "Website (Perplex)", - "isActive": true, - "retailerId": 1001, - }, - "billingAddressId": 1, - "shippingAddressId": 1, - "language": - { - "languageId": 1, - "name": "Nederlands", - "iso639Code": "nl-NL", - "ietfCode": "nl", - }, - "createdOn": "2024-03-22T09:00:00", - "lastUpdatedOn": "2024-03-22T09:00:00", - "order_OrderStatus": - [ - { - "order_orderStatusId": "f1d0e1a7-a3cf-4876-b8f2-073add10667f", - "orderStatus": { "orderStatusId": 4, "name": "paid" }, - "createdOn": "2024-03-22T09:00:00", - "description": "Order succesvol betaald", - }, - { - "order_orderStatusId": "2b9b7943-3a74-4f2e-ad65-012b62c80821", - "orderStatus": - { "orderStatusId": 3, "name": "pendingPayment" }, - "createdOn": "2024-03-22T08:55:00", - "description": "Betaling in behandeling", - }, - ], - "orderLines": - [ - { - "orderLineId": "7a7a9d1a-3fc8-4058-a28b-082860aaa311", - "externalOrderLineId": "f5fddff0-7fbd-4285-bccb-e584f431ea69", - "productId": 1, - "productName": "HTM Maandkorting 20%", - "productCode": "HTM-MND-20", - "productDescription": "HTM Maandkorting 20%", - "taxAmount": 21, - "taxMetadata": - { - "taxMetadataId": "06270769-a263-4325-82d6-f49396f39d03", - "taxCode": "V21", - "taxPercentageAmount": 21, - "description": "21% BTW", - }, - "amountExclTax": 100, - "amountInclTax": 121, - "quantity": 1, - "orderLineTerms": - [ - { - "orderLineTermsId": "fe354db7-12ad-4fc1-bc63-a704c4e0d91e", - "termsUrl": "generalTermsAndConditions.pdf", - }, - ], - "validFrom": "2024-03-22T09:00:00", - "validUntil": "2025-03-22T09:00:00", - "orderLineStatus": - { "orderLineStatusId": 4, "name": "delivered" }, - "createdOn": "2024-03-22T09:00:00", - "lastUpdatedOn": "2024-03-22T09:00:00", - "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", - "dateOfBirth": "01-01-1970", - "photoReference": "DSC_0502.JPG", - "fileType": "image/jpg", - "challengeType": - { "challengeTypeId": 1, "name": "email" }, - "oneTimePassword": "H5Iiz3JTaQeIV8p", - }, - }, - ], - "orderAccountingStatuses": - [ - { - "orderAccountingStatusId": "7c5118d0-8535-4464-9239-83a7ba8fd2db", - "accountingStatus": - { "accountingStatusId": 1, "name": "open" }, - "createdOn": "2024-03-22T09:00:00", - "description": "Financiele transactie voor de FIKO.", - }, - ], - }, - ], - "payments": - [ - { - "paymentId": "3ba4a3c7-0803-4214-800b-365851b8903d", - "createdOn": "2024-03-22T09:00:00", - "amountDebit": 121, - "paymentMethod": - { - "paymentMethodId": 1, - "name": "ideal", - "provider": "Buckaroo", - }, - "touchPointId": 1, - "isRefund": false, - "htmPaymentReference": "HTM-1234", - "pspPaymentReference": "Buckaroo-1234", - "paymentStatuses": - [ - { - "paymentStatusId": 1, - "createdOn": "2024-03-22T09:00:00", - "statusCode": "190", - "statusDescription": "Success", - "statusSubCode": "S001", - "statusSubDescription": "PaymentSuccessFul", - }, - ], - "mandateInput": - { - "mandateInputId": "0a875e67-dc9f-4825-a030-d732a2adbfbc", - "directDebitMandateType": - { - "directDebitMandateTypeId": 1, - "name": "import", - }, - "createdOn": "2024-03-22T09:00:00", - "bic": "RABONL2U", - "iban": "NL44RABO0123456789", - "ascription": "J. de Vries", - "place": "Den Haag", - }, - }, - ], - "orderCustomer": - { - "orderCustomerId": "19ef6882-8eda-43bf-b48e-9b4ff8745a50", - "birthname": "Jan", - "surname": "Vries", - "prefix": "de", - "emailAddress": "jandevries@outlook.com", - "dateOfBirth": "1970-01-01", - "orderCustomerAddresses": + "orderId": "afce35b2-1dff-4ace-98d0-4b9ac405c87d", + "externalOrderId": "bac3958b-804a-43e3-b5f7-0b0fffaae5b7", + "orderNumber": "123456", + "customerProfileId": 42, + "totalAmount": 121, + "touchPoint": + { + "salesTouchpointId": 3, + "name": "Website (Perplex)", + "isActive": true, + "retailerId": 1001, + }, + "billingAddressId": 1, + "shippingAddressId": 1, + "language": + { + "languageId": 1, + "name": "Nederlands", + "iso639Code": "nl-NL", + "ietfCode": "nl", + }, + "createdOn": "2024-03-22T09:00:00", + "lastUpdatedOn": "2024-03-22T09:00:00", + "order_OrderStatus": [ { - "orderCustomerAddressId": "aa50047c-58ac-4f15-9448-ee000dfc6893", - "addressType": - { "addressTypeId": 1, "name": "Billing" }, - "street": "Kon. Julianaplein", - "houseNumber": 10, - "houseNumberSuffix": "a", - "postalCode": "2595 AA", - "city": "Den Haag", - "country": "NL", + "order_orderStatusId": "f1d0e1a7-a3cf-4876-b8f2-073add10667f", + "orderStatus": + { "orderStatusId": 4, "name": "paid" }, + "createdOn": "2024-03-22T09:00:00", + "description": "Order succesvol betaald", + }, + { + "order_orderStatusId": "2b9b7943-3a74-4f2e-ad65-012b62c80821", + "orderStatus": + { "orderStatusId": 3, "name": "pendingPayment" }, + "createdOn": "2024-03-22T08:55:00", + "description": "Betaling in behandeling", }, ], - }, - } + "orderLines": + [ + { + "orderLineId": "7a7a9d1a-3fc8-4058-a28b-082860aaa311", + "externalOrderLineId": "f5fddff0-7fbd-4285-bccb-e584f431ea69", + "productId": 1, + "productName": "HTM Maandkorting 20%", + "productCode": "HTM-MND-20", + "productDescription": "HTM Maandkorting 20%", + "taxAmount": 21, + "taxMetadata": + { + "taxMetadataId": "06270769-a263-4325-82d6-f49396f39d03", + "taxCode": "V21", + "taxPercentageAmount": 21, + "description": "21% BTW", + }, + "amountExclTax": 100, + "amountInclTax": 121, + "quantity": 1, + "orderLineTerms": + [ + { + "orderLineTermsId": "fe354db7-12ad-4fc1-bc63-a704c4e0d91e", + "termsUrl": "generalTermsAndConditions.pdf", + }, + ], + "validFrom": "2024-03-22T09:00:00", + "validUntil": "2025-03-22T09:00:00", + "orderLineStatus": + { "orderLineStatusId": 4, "name": "delivered" }, + "createdOn": "2024-03-22T09:00:00", + "lastUpdatedOn": "2024-03-22T09:00:00", + "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", + "dateOfBirth": "01-01-1970", + "photoReference": "DSC_0502.JPG", + "fileType": "image/jpg", + "challengeType": + { + "challengeTypeId": 1, + "name": "email", + }, + "oneTimePassword": "H5Iiz3JTaQeIV8p", + }, + }, + ], + "orderAccountingStatuses": + [ + { + "orderAccountingStatusId": "7c5118d0-8535-4464-9239-83a7ba8fd2db", + "accountingStatus": + { "accountingStatusId": 1, "name": "open" }, + "createdOn": "2024-03-22T09:00:00", + "description": "Financiele transactie voor de FIKO.", + }, + ], + "validationResult": false, + "additionalRemarks": + [ + { + "code": "MANDATE_REQUIRED", + "parameter": "directDebitMandateId", + }, + ], + "validationErrors": + [ + { + "detail": "Startdate of this product should be at most 60 days in the future.", + "pointer": "#/0/startDate", + }, + ], + }, + ], + "payments": + [ + { + "paymentId": "3ba4a3c7-0803-4214-800b-365851b8903d", + "createdOn": "2024-03-22T09:00:00", + "amountDebit": 121, + "paymentMethod": + { + "paymentMethodId": 1, + "name": "ideal", + "provider": "Buckaroo", + }, + "touchPointId": 1, + "isRefund": false, + "htmPaymentReference": "HTM-1234", + "pspPaymentReference": "Buckaroo-1234", + "paymentStatuses": + [ + { + "paymentStatusId": 1, + "createdOn": "2024-03-22T09:00:00", + "statusCode": "190", + "statusDescription": "Success", + "statusSubCode": "S001", + "statusSubDescription": "PaymentSuccessFul", + }, + ], + "mandateInput": + { + "mandateInputId": "0a875e67-dc9f-4825-a030-d732a2adbfbc", + "directDebitMandateType": + { + "directDebitMandateTypeId": 1, + "name": "import", + }, + "createdOn": "2024-03-22T09:00:00", + "bic": "RABONL2U", + "iban": "NL44RABO0123456789", + "ascription": "J. de Vries", + "place": "Den Haag", + }, + }, + ], + "orderCustomer": + { + "orderCustomerId": "19ef6882-8eda-43bf-b48e-9b4ff8745a50", + "birthname": "Jan", + "surname": "Vries", + "prefix": "de", + "emailAddress": "jandevries@outlook.com", + "dateOfBirth": "1970-01-01", + "orderCustomerAddresses": + [ + { + "orderCustomerAddressId": "aa50047c-58ac-4f15-9448-ee000dfc6893", + "addressType": + { "addressTypeId": 1, "name": "Billing" }, + "street": "Kon. Julianaplein", + "houseNumber": 10, + "houseNumberSuffix": "a", + "postalCode": "2595 AA", + "city": "Den Haag", + "country": "NL", + }, + ], + }, + "_links": + { + "self": + { + "href": "https://api.example.com/items/1", + "method": "GET", + "templated": true, + }, + }, + } patch: tags: - - Order Creation v2.0 + - Order Creation v2 summary: Update an existing order. description: Update an existing order. requestBody: @@ -1705,9 +1766,10 @@ paths: "validUntil": null, "orderLineStatus": { "orderLineStatusId": 1, "name": "pending" }, - "tokens": + "customerTokens": [ { + "customerTokenId": "878ad7c1-cd8f-4bcf-a983-1bd8c6e6975e", "tokenTypeId": 1, "ovPayTokenId": 1, "serviceReferenceId": "NLOV1234567ABCDEFG", @@ -1716,6 +1778,7 @@ paths: "verificationCode": "A7H6", "personalAccountData": { + "personalAccountDataId": "47db8a40-3238-4bf5-9284-759e3888bd47", "name": "Jan de Vries", "dateOfBirth": "01-01-1970", "photoReference": "DSC_0502.JPG", @@ -1725,6 +1788,7 @@ paths: }, }, ], + "validationResult": true, "additionalRemarks": [ { @@ -1732,11 +1796,13 @@ paths: "parameter": "directDebitMandateId", }, ], + "validationErrors": [], }, ], "payments": [ { + "paymentId": "94270188-4cf6-447e-bd49-e8186bcec073", "createdOn": "2024-03-22T09:00:00", "amountDebit": 121, "paymentMethodId": 1, @@ -1747,6 +1813,7 @@ paths: "paymentStatuses": [ { + "paymentStatusId": "42eee610-1a17-4f02-be14-7e25d69d35f3", "createdOn": "2024-03-22T09:00:00", "statusCode": "190", "statusDescription": "Success", @@ -1754,26 +1821,30 @@ paths: "statusSubDescription": "PaymentSuccessFul", }, ], - "payPush": + "mandateInput": { - "consumerIssuer": "ABN AMRO", - "transactionId": "0000000000000001", - "consumerName": "J. de Vries", - "consumerIBAN": "NL44RABO0123456789", - "consumerBIC": "RABONL2U", + "mandateInputId": "1d6626cd-b93b-4ea6-85d5-a8e3a24a2725", + "directDebitMandateTypeId": 1, + "createdOn": "2024-03-22T09:00:00", + "bic": "RABONL2U", + "iban": "NL44RABO0123456789", + "ascription": "J. de Vries", + "place": "Den Haag", }, }, ], - "customer": + "orderCustomer": { + "orderCustomerId": "94270188-4cf6-447e-bd49-e8186bcec073", "birthname": "Jan", "surname": "Vries", "prefix": "de", "emailAddress": "jandevries@outlook.com", "dateOfBirth": "1970-01-01", - "addresses": + "orderCustomerAddresses": [ { + "orderCustomerAddressId": "94270188-4cf6-447e-bd49-e8186bcec073", "addressTypeId": 1, "street": "Kon. Julianaplein", "houseNumber": 10, @@ -1821,7 +1892,7 @@ paths: } delete: tags: - - Order Creation v2.0 + - Order Creation v2 summary: Delete an existing order. description: Delete an existing order. responses: @@ -1867,7 +1938,7 @@ paths: description: The JWT of the logged in customer (in case of a web shop). post: tags: - - Order Creation v2.0 + - Order Creation v2 summary: Add a new order line to an existing order. description: Add a new order line to an existing order. requestBody: @@ -1886,9 +1957,8 @@ paths: "quantity": 1, "validFrom": "2024-03-22T09:00:00", "validUntil": null, - "orderLineStatusId": 1, "createdOn": "2024-03-22T09:00:00", - "customerTokens": + "tokens": [ { "tokenTypeId": 1, @@ -1922,7 +1992,7 @@ paths: "validUntil": "2025-03-22T09:00:00", "orderLineStatusId": 4, "createdOn": "2024-03-22T09:00:00", - "customerTokens": + "tokens": [ { "tokenTypeId": 1, @@ -1962,177 +2032,151 @@ paths: v2.0: value: { - "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", - "externalOrderId": null, - "orderNumber": "ORD-123456", - "customerProfileId": 1337, - "totalAmount": 121, - "language": + "order": { - "languageId": 1, - "name": "Nederlands", - "iso639Code": "nl-NL", - "ietfCode": "nl", - }, - "billingAddressId": 1, - "shippingAddressId": 1, - "touchPoint": - { - "salesTouchpointId": 3, - "name": "Website (Perplex)", - "isActive": true, - "retailerId": 1001, - }, - "createdOn": "2024-03-22T09:00:00", - "lastUpdatedOn": "2024-03-22T09:00:00", - "order_OrderStatus": - [ - { - "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%", - "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, - "orderLineStatus": - { "orderLineStatusId": 1, "name": "pending" }, - "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": - [ - { - "code": "MANDATE_REQUIRED", - "parameter": "directDebitMandateId", - }, - ], - }, - { - "orderLineId": "2cb04b38-e9a8-465a-a273-261c55a21b71", - "externalOrderLineId": null, - "productId": 2, - "productName": "HTM Maandkorting 40%", - "productCode": "HTM-MND-40", - "productDescription": "HTM Maandkorting 40%", - "taxAmount": 42, - "taxCode": "V21", - "amountExclTax": 200, - "amountInclTax": 242, - "quantity": 1, - "terms": - [ - "generalTermsAndConditions.pdf", - "productTermsAndConditions.pdf", - ], - "createdOn": "2024-03-22T09:00:00", - "validFrom": "2024-03-22T09:00:00", - "validUntil": null, - "orderLineStatus": - { "orderLineStatusId": 1, "name": "pending" }, - "tokens": - [ - { - "tokenTypeId": 1, - "ovPayTokenId": 4, - "serviceReferenceId": null, - "amount": null, - "ovpasNumber": null, - "verificationCode": null, - "personalAccountData": null, - }, - ], - "additionalRemarks": [], - }, - ], - "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": + "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", + "externalOrderId": null, + "orderNumber": "ORD-123456", + "customerProfileId": 1337, + "totalAmount": 121, + "language": + { + "languageId": 1, + "name": "Nederlands", + "iso639Code": "nl-NL", + "ietfCode": "nl", + }, + "billingAddressId": 1, + "shippingAddressId": 1, + "touchPoint": + { + "salesTouchpointId": 3, + "name": "Website (Perplex)", + "isActive": true, + "retailerId": 1001, + }, + "createdOn": "2024-03-22T09:00:00", + "lastUpdatedOn": "2024-03-22T09:00:00", + "order_OrderStatus": [ { - "addressTypeId": 1, - "street": "Kon. Julianaplein", - "houseNumber": 10, - "houseNumberSuffix": "a", - "postalCode": "2595 AA", - "city": "Den Haag", - "country": "NL", + "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%", + "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, + "orderLineStatus": + { "orderLineStatusId": 1, "name": "pending" }, + "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": + [ + { + "code": "MANDATE_REQUIRED", + "parameter": "directDebitMandateId", + }, + ], + }, + { + "orderLineId": "2cb04b38-e9a8-465a-a273-261c55a21b71", + "externalOrderLineId": null, + "productId": 2, + "productName": "HTM Maandkorting 40%", + "productCode": "HTM-MND-40", + "productDescription": "HTM Maandkorting 40%", + "taxAmount": 42, + "taxCode": "V21", + "amountExclTax": 200, + "amountInclTax": 242, + "quantity": 1, + "terms": + [ + "generalTermsAndConditions.pdf", + "productTermsAndConditions.pdf", + ], + "createdOn": "2024-03-22T09:00:00", + "validFrom": "2024-03-22T09:00:00", + "validUntil": null, + "orderLineStatus": + { "orderLineStatusId": 1, "name": "pending" }, + "tokens": + [ + { + "tokenTypeId": 1, + "ovPayTokenId": 4, + "serviceReferenceId": null, + "amount": null, + "ovpasNumber": null, + "verificationCode": null, + "personalAccountData": null, + }, + ], + "additionalRemarks": [], + }, + ], + "payments": [], + "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.2: @@ -2185,7 +2229,7 @@ paths: description: The JWT of the logged in customer (in case of a web shop). patch: tags: - - Order Creation v2.0 + - Order Creation v2 summary: Update an existing order line. description: Update an existing order line. requestBody: @@ -2392,7 +2436,7 @@ paths: } delete: tags: - - Order Creation v2.0 + - Order Creation v2 summary: Delete an existing order line. description: Delete an existing order line. responses: @@ -2503,7 +2547,7 @@ paths: description: The JWT of the logged in customer (in case of a web shop). post: tags: - - Order Creation v2.0 + - Order Creation v2 summary: Add a payment to an existing order. description: Add a payment to an existing order. requestBody: @@ -2513,8 +2557,8 @@ paths: $ref: "#/components/schemas/unavailable" examples: v2.0: - summary: Order creation v2.0 - description: Order creation v2.0 + summary: Order Creation v2 + description: Order Creation v2 value: { "createdOn": "2024-03-22T09:00:00", @@ -2772,7 +2816,7 @@ paths: description: The JWT of the logged in customer (in case of a web shop). patch: tags: - - Order Creation v2.0 + - Order Creation v2 summary: Update a payment on an existing order. description: Update a payment on an existing order. requestBody: @@ -2979,7 +3023,7 @@ paths: description: The JWT of the logged in customer (in case of a web shop). post: tags: - - Order Creation v2.0 + - Order Creation v2 summary: Add a customer to an existing order. description: Add a customer to an existing order. requestBody: @@ -3170,7 +3214,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.0 + - Order Creation v2 summary: Update a customer on an existing order. description: Update a customer on an existing order. requestBody: @@ -3338,7 +3382,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.0 + - Order Creation v2 summary: Create a customer address for an existing order. description: Create a customer address for an existing order. requestBody: @@ -3498,7 +3542,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.0 + - Order Creation v2 summary: Update a customer address for an existing order. description: Update a customer address for an existing order. requestBody: @@ -3641,7 +3685,7 @@ paths: } delete: tags: - - Order Creation v2.0 + - Order Creation v2 summary: Delete an existing order address description: Delete an existing order address parameters: From ceb0137aca8034d373ad003dce63d5305b66b38c Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Mon, 24 Mar 2025 15:35:30 +0100 Subject: [PATCH 4/9] OVPAY-1564 - Improvements in validation objects, part 2. --- src/openapi/orders/service_engine_orders.yaml | 302 ++++++------------ 1 file changed, 89 insertions(+), 213 deletions(-) diff --git a/src/openapi/orders/service_engine_orders.yaml b/src/openapi/orders/service_engine_orders.yaml index fe75e54..640c4f2 100644 --- a/src/openapi/orders/service_engine_orders.yaml +++ b/src/openapi/orders/service_engine_orders.yaml @@ -742,9 +742,9 @@ paths: schema: $ref: "#/components/schemas/unavailable" examples: - v2: - summary: Order list for customer v2 - description: Order list for customer v2 + v2.0: + summary: Order list for customer v2.0 + description: Order list for customer v2.0 value: { "orders": @@ -773,7 +773,7 @@ paths: "shippingAddressId": 1, "createdOn": "2024-03-22T09:00:00", "lastUpdatedOn": "2024-03-22T09:00:00", - "order_OrderStatus": + "order_OrderStatuses": { "order_orderStatusId": "f1d0e1a7-a3cf-4876-b8f2-073add10667f", "orderStatus": @@ -923,7 +923,7 @@ paths: "shippingAddressId": 1, "createdOn": "2024-03-22T09:00:00", "lastUpdatedOn": "2024-03-22T09:00:00", - "order_OrderStatus": + "order_OrderStatuses": { "order_orderStatusId": "f1d0e1a7-a3cf-4876-b8f2-073add10667f", "orderStatus": @@ -1032,10 +1032,12 @@ paths: "verificationCode": "A7H6", "personalAccountData": { - "name": "John Doe", - "dateOfBirth": "1980-01-01", - "gender": "male", - "countryOfResidence": "NL", + "name": "Jan de Vries", + "dateOfBirth": "01-01-1970", + "photoReference": "DSC_0502.JPG", + "fileType": "image/jpg", + "challengeTypeId": 1, + "oneTimePassword": "H5Iiz3JTaQeIV8p", }, }, ], @@ -1315,7 +1317,7 @@ paths: }, "createdOn": "2024-03-22T09:00:00", "lastUpdatedOn": "2024-03-22T09:00:00", - "order_OrderStatus": + "order_OrderStatuses": [ { "order_orderStatusId": "f1d0e1a7-a3cf-4876-b8f2-073add10667f", @@ -1363,10 +1365,15 @@ paths: "personalAccountData": { "personalAccountDataId": "47db8a40-3238-4bf5-9284-759e3888bd47", - "name": "John Doe", - "dateOfBirth": "1980-01-01", - "gender": "male", - "countryOfResidence": "NL", + "name": "Jan de Vries", + "dateOfBirth": "01-01-1970", + "photoReference": "DSC_0502.JPG", + "fileType": "image/jpg", + { + "challengeTypeId": 1, + "name": "email", + }, + "oneTimePassword": "H5Iiz3JTaQeIV8p", }, }, ], @@ -1456,9 +1463,9 @@ paths: schema: $ref: "#/components/schemas/unavailable" examples: - v2: - summary: Order details v2 - description: Order details v2 + v2.0: + summary: Order details v2.0 + description: Order details v2.0 value: { "orderId": "afce35b2-1dff-4ace-98d0-4b9ac405c87d", @@ -1484,7 +1491,7 @@ paths: }, "createdOn": "2024-03-22T09:00:00", "lastUpdatedOn": "2024-03-22T09:00:00", - "order_OrderStatus": + "order_OrderStatuses": [ { "order_orderStatusId": "f1d0e1a7-a3cf-4876-b8f2-073add10667f", @@ -1732,7 +1739,7 @@ paths: }, "createdOn": "2024-03-22T09:00:00", "lastUpdatedOn": "2024-03-22T09:00:00", - "order_OrderStatus": + "order_OrderStatuses": [ { "order_orderStatusId": "f1d0e1a7-a3cf-4876-b8f2-073add10667f", @@ -1770,7 +1777,7 @@ paths: [ { "customerTokenId": "878ad7c1-cd8f-4bcf-a983-1bd8c6e6975e", - "tokenTypeId": 1, + "tokenTypeId": { "tokenTypeId": 1, "name": "EMV" }, "ovPayTokenId": 1, "serviceReferenceId": "NLOV1234567ABCDEFG", "amount": 34, @@ -1788,7 +1795,9 @@ paths: }, }, ], + "orderAccountingStatuses": [], "validationResult": true, + "validationErrors": [], "additionalRemarks": [ { @@ -1796,65 +1805,10 @@ paths: "parameter": "directDebitMandateId", }, ], - "validationErrors": [], }, ], - "payments": - [ - { - "paymentId": "94270188-4cf6-447e-bd49-e8186bcec073", - "createdOn": "2024-03-22T09:00:00", - "amountDebit": 121, - "paymentMethodId": 1, - "touchPointId": 1, - "isRefund": false, - "htmPaymentReference": "HTM-1234", - "pspPaymentReference": "Buckaroo-1234", - "paymentStatuses": - [ - { - "paymentStatusId": "42eee610-1a17-4f02-be14-7e25d69d35f3", - "createdOn": "2024-03-22T09:00:00", - "statusCode": "190", - "statusDescription": "Success", - "statusSubCode": "S001", - "statusSubDescription": "PaymentSuccessFul", - }, - ], - "mandateInput": - { - "mandateInputId": "1d6626cd-b93b-4ea6-85d5-a8e3a24a2725", - "directDebitMandateTypeId": 1, - "createdOn": "2024-03-22T09:00:00", - "bic": "RABONL2U", - "iban": "NL44RABO0123456789", - "ascription": "J. de Vries", - "place": "Den Haag", - }, - }, - ], - "orderCustomer": - { - "orderCustomerId": "94270188-4cf6-447e-bd49-e8186bcec073", - "birthname": "Jan", - "surname": "Vries", - "prefix": "de", - "emailAddress": "jandevries@outlook.com", - "dateOfBirth": "1970-01-01", - "orderCustomerAddresses": - [ - { - "orderCustomerAddressId": "94270188-4cf6-447e-bd49-e8186bcec073", - "addressTypeId": 1, - "street": "Kon. Julianaplein", - "houseNumber": 10, - "houseNumberSuffix": "a", - "postalCode": "2595 AA", - "city": "Den Haag", - "country": "NL", - }, - ], - }, + "payments": [], + "orderCustomer": null, } v1.2: value: @@ -1948,8 +1902,8 @@ paths: $ref: "#/components/schemas/unavailable" examples: v2.0: - summary: Create orderLine v2.0 - description: Create orderLine v2.0 + summary: Create order line v2.0 + description: Create order line v2.0 value: { "externalOrderLineId": null, @@ -1958,7 +1912,7 @@ paths: "validFrom": "2024-03-22T09:00:00", "validUntil": null, "createdOn": "2024-03-22T09:00:00", - "tokens": + "customerTokens": [ { "tokenTypeId": 1, @@ -2057,7 +2011,7 @@ paths: }, "createdOn": "2024-03-22T09:00:00", "lastUpdatedOn": "2024-03-22T09:00:00", - "order_OrderStatus": + "order_OrderStatuses": [ { "order_orderStatusId": "f1d0e1a7-a3cf-4876-b8f2-073add10667f", @@ -2091,9 +2045,10 @@ paths: "validUntil": null, "orderLineStatus": { "orderLineStatusId": 1, "name": "pending" }, - "tokens": + "customerTokens": [ { + "customerTokenId": "878ad7c1-cd8f-4bcf-a983-1bd8c6e6975e", "tokenTypeId": 1, "ovPayTokenId": 1, "serviceReferenceId": "NLOV1234567ABCDEFG", @@ -2102,6 +2057,7 @@ paths: "verificationCode": "A7H6", "personalAccountData": { + "personalAccountDataId": "47db8a40-3238-4bf5-9284-759e3888bd47", "name": "Jan de Vries", "dateOfBirth": "01-01-1970", "photoReference": "DSC_0502.JPG", @@ -2111,6 +2067,9 @@ paths: }, }, ], + "orderAccountingStatuses": [], + "validationResult": true, + "validationErrors": [], "additionalRemarks": [ { @@ -2141,9 +2100,10 @@ paths: "validUntil": null, "orderLineStatus": { "orderLineStatusId": 1, "name": "pending" }, - "tokens": + "customerTokens": [ { + "customerTokenId": "878ad7c1-cd8f-4bcf-a983-1bd8c6e6975e", "tokenTypeId": 1, "ovPayTokenId": 4, "serviceReferenceId": null, @@ -2153,30 +2113,14 @@ paths: "personalAccountData": null, }, ], + "orderAccountingStatuses": [], + "validationResult": true, + "validationErrors": [], "additionalRemarks": [], }, ], "payments": [], - "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", - }, - ], - }, + "orderCustomer": null, }, } v1.2: @@ -2295,7 +2239,7 @@ paths: }, "createdOn": "2024-03-22T09:00:00", "lastUpdatedOn": "2024-03-22T09:00:00", - "order_OrderStatus": + "order_OrderStatuses": [ { "order_orderStatusId": "f1d0e1a7-a3cf-4876-b8f2-073add10667f", @@ -2329,10 +2273,11 @@ paths: "validUntil": null, "orderLineStatus": { "orderLineStatusId": 1, "name": "pending" }, - "tokens": + "customerTokens": [ { - "tokenTypeId": 1, + "customerTokenId": "ca15ccfb-ff5c-4c3b-b7c5-d65fc39f499d", + "tokenType": { "tokenTypeId": 1, "name": "EMV" }, "ovPayTokenId": 1, "serviceReferenceId": "NLOV1234567ABCDEFG", "amount": 34, @@ -2340,6 +2285,7 @@ paths: "verificationCode": "A7H6", "personalAccountData": { + "personalAccountDataId": "47db8a40-3238-4bf5-9284-759e3888bd47", "name": "Jan de Vries", "dateOfBirth": "01-01-1970", "photoReference": "DSC_0502.JPG", @@ -2349,6 +2295,9 @@ paths: }, }, ], + "orderAccountingStatuses": [], + "validationResult": true, + "validationErrors": [], "additionalRemarks": [ { @@ -2358,56 +2307,8 @@ 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", - }, - ], - "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", - }, - ], - }, + "payments": [], + "orderCustomer": null, } v1.2: value: @@ -2446,7 +2347,7 @@ paths: application/json: schema: $ref: "#/components/schemas/unavailable" - example: + examples: v2.0: value: { @@ -2473,7 +2374,7 @@ paths: }, "createdOn": "2024-03-22T09:00:00", "lastUpdatedOn": "2024-03-22T09:00:00", - "order_OrderStatus": + "order_OrderStatuses": [ { "order_orderStatusId": "f1d0e1a7-a3cf-4876-b8f2-073add10667f", @@ -2483,28 +2384,9 @@ paths: "description": "Order is aangemaakt", }, ], - "orderLines": null, - "payments": 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", - }, - ], - }, + "orderLines": [], + "payments": [], + "orderCustomer": null, } "400": description: Bad request @@ -2557,8 +2439,8 @@ paths: $ref: "#/components/schemas/unavailable" examples: v2.0: - summary: Order Creation v2 - description: Order Creation v2 + summary: Add a payment v2.0 + description: Add a payment v2.0 value: { "createdOn": "2024-03-22T09:00:00", @@ -2566,26 +2448,9 @@ paths: "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", - }, - ], - "mandateInput": - { - "directDebitMandateTypeId": 1, - "createdOn": "2024-03-22T09:00:00", - "bic": "RABONL2U", - "iban": "NL44RABO0123456789", - "ascription": "J. de Vries", - "place": "Den Haag", - }, + "pspPaymentReference": null, + "paymentStatuses": [], + "mandateInput": null, } v1.2: summary: Order creation v1.2 @@ -2653,8 +2518,15 @@ paths: }, "createdOn": "2024-03-22T09:00:00", "lastUpdatedOn": "2024-03-22T09:00:00", - "order_OrderStatus": + "order_OrderStatuses": [ + { + "order_orderStatusId": "99137e30-2bf5-4c9b-95f0-ca432adcae5f", + "orderStatus": + { "orderStatusId": 2, "name": "awaitingPayment" }, + "createdOn": "2024-03-22T09:05:00", + "description": "Betaling is geinitieerd", + }, { "order_orderStatusId": "f1d0e1a7-a3cf-4876-b8f2-073add10667f", "orderStatus": @@ -2687,10 +2559,12 @@ paths: "validUntil": null, "orderLineStatus": { "orderLineStatusId": 1, "name": "pending" }, - "tokens": + "customerTokens": [ { - "tokenTypeId": 1, + "customerTokenId": "878ad7c1-cd8f-4bcf-a983-1bd8c6e6975e", + "tokenType": + { "tokenTypeId": 1, "name": "EMV" }, "ovPayTokenId": 1, "serviceReferenceId": "NLOV1234567ABCDEFG", "amount": 34, @@ -2698,6 +2572,7 @@ paths: "verificationCode": "A7H6", "personalAccountData": { + "personalAccountDataId": "47db8a40-3238-4bf5-9284-759e3888bd47", "name": "Jan de Vries", "dateOfBirth": "01-01-1970", "photoReference": "DSC_0502.JPG", @@ -2730,10 +2605,11 @@ paths: "validUntil": null, "orderLineStatus": { "orderLineStatusId": 1, "name": "pending" }, - "tokens": + "customerTokens": [ { - "tokenTypeId": 1, + "customerTokenId": "878ad7c1-cd8f-4bcf-a983-1bd8c6e6975e", + "tokenType": { "tokenTypeId": 1, "name": "EMV" }, "ovPayTokenId": 4, "serviceReferenceId": null, "amount": null, @@ -2888,7 +2764,7 @@ paths: "touchpointId": 3, "createdOn": "2024-03-22T09:00:00", "lastUpdatedOn": "2024-03-22T09:00:00", - "order_OrderStatus": + "order_OrderStatuses": [ { "order_orderStatusId": "f1d0e1a7-a3cf-4876-b8f2-073add10667f", @@ -3112,7 +2988,7 @@ paths: }, "createdOn": "2024-03-22T09:00:00", "lastUpdatedOn": "2024-03-22T09:00:00", - "order_OrderStatus": + "order_OrderStatuses": [ { "order_orderStatusId": "f1d0e1a7-a3cf-4876-b8f2-073add10667f", @@ -3279,7 +3155,7 @@ paths: }, "createdOn": "2024-03-22T09:00:00", "lastUpdatedOn": "2024-03-22T09:00:00", - "order_OrderStatus": + "order_OrderStatuses": [ { "order_orderStatusId": "f1d0e1a7-a3cf-4876-b8f2-073add10667f", @@ -3438,7 +3314,7 @@ paths: }, "createdOn": "2024-03-22T09:00:00", "lastUpdatedOn": "2024-03-22T09:00:00", - "order_OrderStatus": + "order_OrderStatuses": [ { "order_orderStatusId": "f1d0e1a7-a3cf-4876-b8f2-073add10667f", @@ -3598,7 +3474,7 @@ paths: }, "createdOn": "2024-03-22T09:00:00", "lastUpdatedOn": "2024-03-22T09:00:00", - "order_OrderStatus": + "order_OrderStatuses": [ { "order_orderStatusId": "f1d0e1a7-a3cf-4876-b8f2-073add10667f", @@ -3738,7 +3614,7 @@ paths: }, "createdOn": "2024-03-22T09:00:00", "lastUpdatedOn": "2024-03-22T09:00:00", - "order_OrderStatus": + "order_OrderStatuses": [ { "order_orderStatusId": "f1d0e1a7-a3cf-4876-b8f2-073add10667f", From 8ac15a7b093fcaaa308725711d9b714e9375ee45 Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Tue, 25 Mar 2025 16:02:05 +0100 Subject: [PATCH 5/9] OVPAY-1564 - Improvements in validation objects, part 3. --- src/openapi/orders/service_engine_orders.yaml | 305 ++++++++++++------ 1 file changed, 212 insertions(+), 93 deletions(-) diff --git a/src/openapi/orders/service_engine_orders.yaml b/src/openapi/orders/service_engine_orders.yaml index 640c4f2..a0c37d1 100644 --- a/src/openapi/orders/service_engine_orders.yaml +++ b/src/openapi/orders/service_engine_orders.yaml @@ -381,7 +381,7 @@ paths: "statusCode": "190", "statusDescription": "Success", "statusSubCode": "S001", - "statusSubDescription": "PaymentSuccessFul", + "statusSubDescription": "PaymentSuccessful", }, ], "payPush": @@ -489,7 +489,7 @@ paths: "statusCode": "190", "statusDescription": "Success", "statusSubCode": "S001", - "statusSubDescription": "PaymentSuccessFul", + "statusSubDescription": "PaymentSuccessful", }, ], "payPush": @@ -651,7 +651,7 @@ paths: "statusCode": "190", "statusDescription": "Success", "statusSubCode": "S001", - "statusSubDescription": "PaymentSuccessFul", + "statusSubDescription": "PaymentSuccessful", }, ], "payPush": @@ -801,7 +801,7 @@ paths: "statusCode": "190", "statusDescription": "Success", "statusSubCode": "S001", - "statusSubDescription": "PaymentSuccessFul", + "statusSubDescription": "PaymentSuccessful", }, ], "mandateInput": @@ -951,7 +951,7 @@ paths: "statusCode": "190", "statusDescription": "Success", "statusSubCode": "S001", - "statusSubDescription": "PaymentSuccessFul", + "statusSubDescription": "PaymentSuccessful", }, ], "mandateInput": @@ -1118,7 +1118,7 @@ paths: "statusCode": "190", "statusDescription": "Success", "statusSubCode": "S001", - "statusSubDescription": "PaymentSuccessFul", + "statusSubDescription": "PaymentSuccessful", }, ], "mandateInput": @@ -1246,7 +1246,7 @@ paths: "statusCode": "190", "statusDescription": "Success", "statusSubCode": "S001", - "statusSubDescription": "PaymentSuccessFul", + "statusSubDescription": "PaymentSuccessful", }, ], "mandateInput": @@ -1369,10 +1369,11 @@ paths: "dateOfBirth": "01-01-1970", "photoReference": "DSC_0502.JPG", "fileType": "image/jpg", - { - "challengeTypeId": 1, - "name": "email", - }, + "challengeType": + { + "challengeTypeId": 1, + "name": "email", + }, "oneTimePassword": "H5Iiz3JTaQeIV8p", }, }, @@ -1620,7 +1621,7 @@ paths: "statusCode": "190", "statusDescription": "Success", "statusSubCode": "S001", - "statusSubDescription": "PaymentSuccessFul", + "statusSubDescription": "PaymentSuccessful", }, ], "mandateInput": @@ -1777,7 +1778,8 @@ paths: [ { "customerTokenId": "878ad7c1-cd8f-4bcf-a983-1bd8c6e6975e", - "tokenTypeId": { "tokenTypeId": 1, "name": "EMV" }, + "tokenTypeId": + { "tokenTypeId": 1, "name": "EMV" }, "ovPayTokenId": 1, "serviceReferenceId": "NLOV1234567ABCDEFG", "amount": 34, @@ -1790,7 +1792,11 @@ paths: "dateOfBirth": "01-01-1970", "photoReference": "DSC_0502.JPG", "fileType": "image/jpg", - "challengeTypeId": 1, + "challengeType": + { + "challengeTypeId": 1, + "name": "email", + }, "oneTimePassword": "H5Iiz3JTaQeIV8p", }, }, @@ -2062,7 +2068,11 @@ paths: "dateOfBirth": "01-01-1970", "photoReference": "DSC_0502.JPG", "fileType": "image/jpg", - "challengeTypeId": 1, + "challengeType": + { + "challengeTypeId": 1, + "name": "email", + }, "oneTimePassword": "H5Iiz3JTaQeIV8p", }, }, @@ -2183,8 +2193,8 @@ paths: $ref: "#/components/schemas/unavailable" examples: v2.0: - summary: Orderline update v2.0 - description: Orderline update v2.0 + summary: Update order line v2.0 + description: Update order line v2.0 value: { "quantity": 1, @@ -2192,7 +2202,7 @@ paths: "validUntil": null, } v1.2: - summary: Orderline updatev1.2 + summary: Orderline update v1.2 description: Orderline update v1.2 value: { @@ -2277,7 +2287,8 @@ paths: [ { "customerTokenId": "ca15ccfb-ff5c-4c3b-b7c5-d65fc39f499d", - "tokenType": { "tokenTypeId": 1, "name": "EMV" }, + "tokenType": + { "tokenTypeId": 1, "name": "EMV" }, "ovPayTokenId": 1, "serviceReferenceId": "NLOV1234567ABCDEFG", "amount": 34, @@ -2290,7 +2301,11 @@ paths: "dateOfBirth": "01-01-1970", "photoReference": "DSC_0502.JPG", "fileType": "image/jpg", - "challengeTypeId": 1, + "challengeType": + { + "challengeTypeId": 1, + "name": "email", + }, "oneTimePassword": "H5Iiz3JTaQeIV8p", }, }, @@ -2471,7 +2486,7 @@ paths: "statusCode": "190", "statusDescription": "Success", "statusSubCode": "S001", - "statusSubDescription": "PaymentSuccessFul", + "statusSubDescription": "PaymentSuccessful", }, ], "mandateInput": @@ -2577,11 +2592,19 @@ paths: "dateOfBirth": "01-01-1970", "photoReference": "DSC_0502.JPG", "fileType": "image/jpg", - "challengeTypeId": 1, + "challengeType": + { + "challengeTypeId": 1, + "name": "email", + }, "oneTimePassword": "H5Iiz3JTaQeIV8p", }, }, ], + "orderAccountingStatuses": [], + "validationResult": true, + "validationErrors": [], + "additionalRemarks": [], }, { "orderLineId": "2cb04b38-e9a8-465a-a273-261c55a21b71", @@ -2609,7 +2632,8 @@ paths: [ { "customerTokenId": "878ad7c1-cd8f-4bcf-a983-1bd8c6e6975e", - "tokenType": { "tokenTypeId": 1, "name": "EMV" }, + "tokenType": + { "tokenTypeId": 1, "name": "EMV" }, "ovPayTokenId": 4, "serviceReferenceId": null, "amount": null, @@ -2618,49 +2642,51 @@ paths: "personalAccountData": null, }, ], + "orderAccountingStatuses": [], + "validationResult": true, + "validationErrors": [], + "additionalRemarks": [], }, ], "payments": [ { + "paymentId": "1a973c85-7a96-41b5-bbf2-7919d6a6db15", "createdOn": "2024-03-22T09:00:00", "amountDebit": 121, "paymentMethodId": 1, "touchPointId": 1, "isRefund": false, "htmPaymentReference": "HTM-1234", - "pspPaymentReference": "Buckaroo-1234", + "pspPaymentReference": null, "paymentStatuses": [ { + "paymentStatusId": "42eee610-1a17-4f02-be14-7e25d69d35f3", "createdOn": "2024-03-22T09:00:00", - "statusCode": "190", - "statusDescription": "Success", - "statusSubCode": "S001", - "statusSubDescription": "PaymentSuccessFul", + "statusCode": "?", + "statusDescription": "Initiated", + "statusSubCode": "?", + "statusSubDescription": "PaymentInitiated", }, ], - "payPush": - { - "consumerIssuer": "ABN AMRO", - "transactionId": "0000000000000001", - "consumerName": "J. de Vries", - "consumerIBAN": "NL44RABO0123456789", - "consumerBIC": "RABONL2U", - }, + "mandateInput": null, }, ], - "customer": + "orderCustomer": { + "orderCustomerId": "94270188-4cf6-447e-bd49-e8186bcec073", "birthname": "Jan", "surname": "Vries", "prefix": "de", "emailAddress": "jandevries@outlook.com", "dateOfBirth": "1970-01-01", - "addresses": + "orderCustomerAddresses": [ { - "addressTypeId": 1, + "orderCustomerAddressId": "94270188-4cf6-447e-bd49-e8186bcec073", + "addressType": + { "addressTypeId": 1, "name": "Billing" }, "street": "Kon. Julianaplein", "houseNumber": 10, "houseNumberSuffix": "a", @@ -2702,8 +2728,8 @@ paths: $ref: "#/components/schemas/unavailable" examples: v2.0: - summary: Order payment update v2.0 - description: Order payment update v2.0 + summary: Update payment v2.0 + description: Update payment v2.0 value: { "htmPaymentReference": "HTM-1234", @@ -2715,7 +2741,7 @@ paths: "statusCode": "190", "statusDescription": "Success", "statusSubCode": "S001", - "statusSubDescription": "PaymentSuccessFul", + "statusSubDescription": "PaymentSuccessful", }, ], "mandateInput": @@ -2798,10 +2824,12 @@ paths: "validUntil": null, "orderLineStatus": { "orderLineStatusId": 1, "name": "pending" }, - "tokens": + "customerTokens": [ { - "tokenTypeId": 1, + "customerTokenId": "878ad7c1-cd8f-4bcf-a983-1bd8c6e6975e", + "tokenType": + { "tokenTypeId": 1, "name": "EMV" }, "ovPayTokenId": 1, "serviceReferenceId": "NLOV1234567ABCDEFG", "amount": 34, @@ -2809,20 +2837,30 @@ paths: "verificationCode": "A7H6", "personalAccountData": { + "personalAccountDataId": "47db8a40-3238-4bf5-9284-759e3888bd47", "name": "Jan de Vries", "dateOfBirth": "01-01-1970", "photoReference": "DSC_0502.JPG", "fileType": "image/jpg", - "challengeTypeId": 1, + "challengeType": + { + "challengeTypeId": 1, + "name": "email", + }, "oneTimePassword": "H5Iiz3JTaQeIV8p", }, }, ], + "orderAccountingStatuses": [], + "validationResult": true, + "validationErrors": [], + "additionalRemarks": [], }, ], "payments": [ { + "paymentId": "1a973c85-7a96-41b5-bbf2-7919d6a6db15", "createdOn": "2024-03-22T09:00:00", "amountDebit": 121, "paymentMethodId": 1, @@ -2833,6 +2871,15 @@ paths: "paymentStatuses": [ { + "paymentStatusId": "42eee610-1a17-4f02-be14-7e25d69d35f3", + "createdOn": "2024-03-22T09:00:00", + "statusCode": "?", + "statusDescription": "Initiated", + "statusSubCode": "?", + "statusSubDescription": "PaymentInitiated", + }, + { + "paymentStatusId": "b9893367-0cab-45a8-89f9-03a14d6cd138", "createdOn": "2024-03-22T09:00:00", "statusCode": "791", "statusDescription": "Pending processing", @@ -2840,15 +2887,17 @@ paths: "statusSubDescription": "PendingProcessing", }, { + "paymentStatusId": "9edfb9ad-f5b3-4edc-8216-7cd0070b03f3", "createdOn": "2024-03-22T09:01:00", "statusCode": "190", "statusDescription": "Success", "statusSubCode": "S001", - "statusSubDescription": "PaymentSuccessFul", + "statusSubDescription": "PaymentSuccessful", }, ], - "payPush": + "mandateInput": { + "mandateInputId": "7e3c7b4e-2b4d-4e0b-8f8b-0e8d9f0a2c3b", "consumerIssuer": "ABN AMRO", "transactionId": "0000000000000001", "consumerName": "J. de Vries", @@ -2857,17 +2906,20 @@ paths: }, }, ], - "customer": + "orderCustomers": { + "orderCustomerId": "94270188-4cf6-447e-bd49-e8186bcec073", "birthname": "Jan", "surname": "Vries", "prefix": "de", "emailAddress": "jandevries@outlook.com", "dateOfBirth": "1970-01-01", - "addresses": + "orderCustomerAddresses": [ { - "addressTypeId": 1, + "orderCustomerAddressId": "94270188-4cf6-447e-bd49-e8186bcec073", + "addressTypeId": + { "addressTypeId": 1, "name": "Billing" }, "street": "Kon. Julianaplein", "houseNumber": 10, "houseNumberSuffix": "a", @@ -2909,8 +2961,8 @@ paths: $ref: "#/components/schemas/unavailable" examples: v2.0: - summary: Order payment update v2.0 - description: Order payment update v2.0 + summary: Add order customer v2.0 + description: Add order customer v2.0 value: { "birthname": "Jan", @@ -2932,8 +2984,8 @@ paths: ], } v1.2: - summary: Order payment update v1.2 - description: Order payment update v1.2 + summary: Add order customer v1.2 + description: Add order customer v1.2 value: { "birthname": "Jan", @@ -3022,10 +3074,12 @@ paths: "validUntil": null, "orderLineStatus": { "orderLineStatusId": 1, "name": "pending" }, - "tokens": + "customerTokens": [ { - "tokenTypeId": 1, + "customerTokenId": "878ad7c1-cd8f-4bcf-a983-1bd8c6e6975e", + "tokenTypeId": + { "tokenTypeId": 1, "name": "EMV" }, "ovPayTokenId": 1, "serviceReferenceId": "NLOV1234567ABCDEFG", "amount": 34, @@ -3033,29 +3087,41 @@ paths: "verificationCode": "A7H6", "personalAccountData": { + "personalAccountDataId": "47db8a40-3238-4bf5-9284-759e3888bd47", "name": "Jan de Vries", "dateOfBirth": "01-01-1970", "photoReference": "DSC_0502.JPG", "fileType": "image/jpg", - "challengeTypeId": 1, + "challengeType": + { + "challengeTypeId": 1, + "name": "email", + }, "oneTimePassword": "H5Iiz3JTaQeIV8p", }, }, ], + "orderAccountingStatuses": [], + "validationResult": true, + "validationErrors": [], + "additionalRemarks": [], }, ], - "payments": null, - "customer": + "payments": [], + "orderCustomer": { + "orderCustomerId": "94270188-4cf6-447e-bd49-e8186bcec073", "birthname": "Jan", "surname": "Vries", "prefix": "de", "emailAddress": "jandevries@outlook.com", "dateOfBirth": "1970-01-01", - "addresses": + "orderCustomerAddresses": [ { - "addressTypeId": 1, + "orderCustomerAddressId": "94270188-4cf6-447e-bd49-e8186bcec073", + "addressType": + { "addressTypeId": 1, "name": "Billing" }, "street": "Kon. Julianaplein", "houseNumber": 10, "houseNumberSuffix": "a", @@ -3100,8 +3166,8 @@ paths: $ref: "#/components/schemas/unavailable" examples: v2.0: - summary: Order customer update v2.0 - description: Order customer update v2.0 + summary: Update order customer v2.0 + description: Update order customer v2.0 value: { "birthname": "Jan", @@ -3111,8 +3177,8 @@ paths: "dateOfBirth": "1970-01-01", } v1.2: - summary: Order customer update v1.2 - description: Order customer update v1.2 + summary: Update order customer v1.2 + description: Update order customer v1.2 value: { "birthname": "Jan", @@ -3189,10 +3255,12 @@ paths: "validUntil": null, "orderLineStatus": { "orderLineStatusId": 1, "name": "pending" }, - "tokens": + "customerTokens": [ { - "tokenTypeId": 1, + "customerTokenId": "878ad7c1-cd8f-4bcf-a983-1bd8c6e6975e", + "tokenTypeId": + { "tokenTypeId": 1, "name": "EMV" }, "ovPayTokenId": 1, "serviceReferenceId": "NLOV1234567ABCDEFG", "amount": 34, @@ -3200,30 +3268,41 @@ paths: "verificationCode": "A7H6", "personalAccountData": { + "personalAccountDataId": "47db8a40-3238-4bf5-9284-759e3888bd47", "name": "Jan de Vries", "dateOfBirth": "01-01-1970", "photoReference": "DSC_0502.JPG", "fileType": "image/jpg", - "challengeTypeId": 1, + "challengeType": + { + "challengeTypeId": 1, + "name": "email", + }, "oneTimePassword": "H5Iiz3JTaQeIV8p", }, }, ], + "orderAccountingStatuses": [], + "validationResult": true, + "validationErrors": [], "additionalRemarks": [], }, ], - "payments": null, - "customer": + "payments": [], + "orderCustomer": { + "orderCustomerId": "94270188-4cf6-447e-bd49-e8186bcec073", "birthname": "Jan", "surname": "Vries", "prefix": "de", "emailAddress": "jandevries@outlook.com", "dateOfBirth": "1970-01-01", - "addresses": + "orderCustomerAddresses": [ { - "addressTypeId": 1, + "orderCustomerAddressId": "94270188-4cf6-447e-bd49-e8186bcec073", + "addressType": + { "addressTypeId": 1, "name": "Billing" }, "street": "Kon. Julianaplein", "houseNumber": 10, "houseNumberSuffix": "a", @@ -3268,6 +3347,19 @@ paths: $ref: "#/components/schemas/unavailable" examples: v2.0: + summary: Add order customer address v2.0 + description: Add order customer address v2.0 + value: + { + "addressTypeId": 1, + "street": "Kon. Julianaplein", + "houseNumber": 10, + "houseNumberSuffix": "a", + "postalCode": "2595 AA", + "city": "Den Haag", + "country": "NL", + } + v1.2: summary: Order customer address create v1.2 description: Order customer address create v1.2 value: @@ -3348,10 +3440,12 @@ paths: "validUntil": null, "orderLineStatus": { "orderLineStatusId": 1, "name": "pending" }, - "tokens": + "customerTokens": [ { - "tokenTypeId": 1, + "customerTokenId": "878ad7c1-cd8f-4bcf-a983-1bd8c6e6975e", + "tokenType": + { "tokenTypeId": 1, "name": "EMV" }, "ovPayTokenId": 1, "serviceReferenceId": "NLOV1234567ABCDEFG", "amount": 34, @@ -3359,15 +3453,23 @@ paths: "verificationCode": "A7H6", "personalAccountData": { + "personalAccountDataId": "47db8a40-3238-4bf5-9284-759e3888bd47", "name": "Jan de Vries", "dateOfBirth": "01-01-1970", "photoReference": "DSC_0502.JPG", "fileType": "image/jpg", - "challengeTypeId": 1, + "challengeType": + { + "challengeTypeId": 1, + "name": "email", + }, "oneTimePassword": "H5Iiz3JTaQeIV8p", }, }, ], + "orderAccountingStatuses": [], + "validationResult": false, + "validationErrors": [], "additionalRemarks": [ { @@ -3377,18 +3479,21 @@ paths: ], }, ], - "payments": null, - "customer": + "payments": [], + "orderCustomer": { + "orderCustomerId": "94270188-4cf6-447e-bd49-e8186bcec073", "birthname": "Jan", "surname": "Vries", "prefix": "de", "emailAddress": "jandevries@outlook.com", "dateOfBirth": "1970-01-01", - "addresses": + "orderCustomerAddresses": [ { - "addressTypeId": 1, + "orderCustomerAddressId": "a0ef57fa-395c-4a03-96e9-234c26dccea9", + "addressType": + { "addressTypeId": 1, "name": "Billing" }, "street": "Kon. Julianaplein", "houseNumber": 10, "houseNumberSuffix": "a", @@ -3428,8 +3533,8 @@ paths: $ref: "#/components/schemas/unavailable" examples: v2.0: - summary: Order customer address create v1.2 - description: Order customer address create v1.2 + summary: Update order customer address v2.0 + description: Update order customer address v2.0 value: { "addressTypeId": 1, @@ -3508,10 +3613,12 @@ paths: "validUntil": null, "orderLineStatus": { "orderLineStatusId": 1, "name": "pending" }, - "tokens": + "customerTokens": [ { - "tokenTypeId": 1, + "customerTokenId": "53a23772-0631-4eb8-b06a-8b4b74d120d5", + "tokenType": + { "tokenTypeId": 1, "name": "EMV" }, "ovPayTokenId": 1, "serviceReferenceId": "NLOV1234567ABCDEFG", "amount": 34, @@ -3519,15 +3626,23 @@ paths: "verificationCode": "A7H6", "personalAccountData": { + "personalAccountDataId": "47db8a40-3238-4bf5-9284-759e3888bd47", "name": "Jan de Vries", "dateOfBirth": "01-01-1970", "photoReference": "DSC_0502.JPG", "fileType": "image/jpg", - "challengeTypeId": 1, + "challengeType": + { + "challengeTypeId": 1, + "name": "email", + }, "oneTimePassword": "H5Iiz3JTaQeIV8p", }, }, ], + "orderAccountingStatuses": [], + "validationResult": false, + "validationErrors": [], "additionalRemarks": [ { @@ -3537,18 +3652,21 @@ paths: ], }, ], - "payments": null, - "customer": + "payments": [], + "orderCustomer": { + "orderCustomerId": "94270188-4cf6-447e-bd49-e8186bcec073", "birthname": "Jan", "surname": "Vries", "prefix": "de", "emailAddress": "jandevries@outlook.com", "dateOfBirth": "1970-01-01", - "addresses": + "orderCusotmerAddresses": [ { - "addressTypeId": 1, + "orderCustomerAddressId": "94270188-4cf6-447e-bd49-e8186bcec073", + "addressType": + { "addressTypeId": 1, "name": "Billing" }, "street": "Kon. Julianaplein", "houseNumber": 101, "houseNumberSuffix": "a", @@ -3562,8 +3680,8 @@ paths: delete: tags: - Order Creation v2 - summary: Delete an existing order address - description: Delete an existing order address + summary: Delete an existing order address. + description: Delete an existing order address. parameters: - in: path name: orderCustomerAddressId @@ -3624,10 +3742,11 @@ paths: "description": "Order is aangemaakt", }, ], - "orderLines": null, - "payments": null, - "customer": + "orderLines": [], + "payments": [], + "orderCustomer": { + "orderCustomerId": "94270188-4cf6-447e-bd49-e8186bcec073", "birthname": "Jan", "surname": "Vries", "prefix": "de", From 985fdce7bbed8d15ee3844f7ee6a72bcbe2cc319 Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Tue, 25 Mar 2025 16:39:07 +0100 Subject: [PATCH 6/9] OVPAY-1564 - Improvements in validation objects, part 4. --- src/openapi/orders/service_engine_orders.yaml | 444 ++++++++++++++---- 1 file changed, 344 insertions(+), 100 deletions(-) diff --git a/src/openapi/orders/service_engine_orders.yaml b/src/openapi/orders/service_engine_orders.yaml index a0c37d1..2a25552 100644 --- a/src/openapi/orders/service_engine_orders.yaml +++ b/src/openapi/orders/service_engine_orders.yaml @@ -639,8 +639,19 @@ paths: { "createdOn": "2024-03-22T09:00:00", "amountDebit": 121, - "paymentMethodId": 1, - "touchPointId": 1, + "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", @@ -788,8 +799,19 @@ paths: "paymentId": "c772868c-5cce-46a3-8821-be6811332252", "createdOn": "2024-03-22T09:00:00", "amountDebit": 121, - "paymentMethodId": 1, - "touchPointId": 1, + "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", @@ -807,7 +829,10 @@ paths: "mandateInput": { "mandateInputId": "1d6626cd-b93b-4ea6-85d5-a8e3a24a2725", - "directDebitMandateTypeId": 1, + "directDebitMandateType": { + "directDebitMandateTypeId": 1, + "name": "import", + }, "createdOn": "2024-03-22T09:00:00", "bic": "RABONL2U", "iban": "NL44RABO0123456789", @@ -938,8 +963,19 @@ paths: "paymentId": "1a973c85-7a96-41b5-bbf2-7919d6a6db15", "createdOn": "2024-03-22T09:00:00", "amountDebit": 121, - "paymentMethodId": 1, - "touchPointId": 1, + "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", @@ -957,7 +993,10 @@ paths: "mandateInput": { "mandateInputId": "5397f2d7-eefa-4e82-a086-1e0e3ad38bdb", - "directDebitMandateTypeId": 1, + "directDebitMandateType": { + "directDebitMandateTypeId": 1, + "name": "import", + }, "createdOn": "2024-03-22T09:00:00", "bic": "RABONL2U", "iban": "NL44RABO0123456789", @@ -1161,13 +1200,7 @@ paths: "externalOrderId": null, "customerProfileId": 1337, "totalAmount": 121, - "touchPoint": - { - "salesTouchpointId": 3, - "name": "Website (Perplex)", - "isActive": true, - "retailerId": 1001, - }, + "touchPointId": 3, "languageId": 1, "billingAddressId": 1, "shippingAddressId": 1, @@ -1299,6 +1332,13 @@ paths: "orderNumber": "ORD-123456", "customerProfileId": 1337, "totalAmount": 121, + "touchPoint": + { + "salesTouchpointId": 3, + "name": "Website (Perplex)", + "isActive": true, + "retailerId": 1001, + }, "language": { "languageId": 1, @@ -1308,13 +1348,6 @@ paths: }, "billingAddressId": 1, "shippingAddressId": 1, - "touchPoint": - { - "salesTouchpointId": 3, - "name": "Website (Perplex)", - "isActive": true, - "retailerId": 1001, - }, "createdOn": "2024-03-22T09:00:00", "lastUpdatedOn": "2024-03-22T09:00:00", "order_OrderStatuses": @@ -1481,8 +1514,6 @@ paths: "isActive": true, "retailerId": 1001, }, - "billingAddressId": 1, - "shippingAddressId": 1, "language": { "languageId": 1, @@ -1490,6 +1521,8 @@ paths: "iso639Code": "nl-NL", "ietfCode": "nl", }, + "billingAddressId": 1, + "shippingAddressId": 1, "createdOn": "2024-03-22T09:00:00", "lastUpdatedOn": "2024-03-22T09:00:00", "order_OrderStatuses": @@ -1609,7 +1642,13 @@ paths: "name": "ideal", "provider": "Buckaroo", }, - "touchPointId": 1, + "touchPoint": + { + "salesTouchpointId": 3, + "name": "Website (Perplex)", + "isActive": true, + "retailerId": 1001, + }, "isRefund": false, "htmPaymentReference": "HTM-1234", "pspPaymentReference": "Buckaroo-1234", @@ -1722,6 +1761,13 @@ paths: "orderNumber": "ORD-123456", "customerProfileId": 1337, "totalAmount": 121, + "touchPoint": + { + "salesTouchpointId": 3, + "name": "Website (Perplex)", + "isActive": true, + "retailerId": 1001, + }, "language": { "languageId": 1, @@ -1731,13 +1777,6 @@ paths: }, "billingAddressId": 1, "shippingAddressId": 1, - "touchPoint": - { - "salesTouchpointId": 3, - "name": "Website (Perplex)", - "isActive": true, - "retailerId": 1001, - }, "createdOn": "2024-03-22T09:00:00", "lastUpdatedOn": "2024-03-22T09:00:00", "order_OrderStatuses": @@ -1999,6 +2038,13 @@ paths: "orderNumber": "ORD-123456", "customerProfileId": 1337, "totalAmount": 121, + "touchPoint": + { + "salesTouchpointId": 3, + "name": "Website (Perplex)", + "isActive": true, + "retailerId": 1001, + }, "language": { "languageId": 1, @@ -2008,13 +2054,6 @@ paths: }, "billingAddressId": 1, "shippingAddressId": 1, - "touchPoint": - { - "salesTouchpointId": 3, - "name": "Website (Perplex)", - "isActive": true, - "retailerId": 1001, - }, "createdOn": "2024-03-22T09:00:00", "lastUpdatedOn": "2024-03-22T09:00:00", "order_OrderStatuses": @@ -2231,6 +2270,13 @@ paths: "orderNumber": "ORD-123456", "customerProfileId": 1337, "totalAmount": 121, + "touchPoint": + { + "salesTouchpointId": 3, + "name": "Website (Perplex)", + "isActive": true, + "retailerId": 1001, + }, "language": { "languageId": 1, @@ -2240,13 +2286,6 @@ paths: }, "billingAddressId": 1, "shippingAddressId": 1, - "touchPoint": - { - "salesTouchpointId": 3, - "name": "Website (Perplex)", - "isActive": true, - "retailerId": 1001, - }, "createdOn": "2024-03-22T09:00:00", "lastUpdatedOn": "2024-03-22T09:00:00", "order_OrderStatuses": @@ -2371,6 +2410,13 @@ paths: "orderNumber": "ORD-123456", "customerProfileId": 1337, "totalAmount": 0, + "touchPoint": + { + "salesTouchpointId": 3, + "name": "Website (Perplex)", + "isActive": true, + "retailerId": 1001, + }, "language": { "languageId": 1, @@ -2380,13 +2426,6 @@ paths: }, "billingAddressId": 1, "shippingAddressId": 1, - "touchPoint": - { - "salesTouchpointId": 3, - "name": "Website (Perplex)", - "isActive": true, - "retailerId": 1001, - }, "createdOn": "2024-03-22T09:00:00", "lastUpdatedOn": "2024-03-22T09:00:00", "order_OrderStatuses": @@ -2515,6 +2554,13 @@ paths: "orderNumber": "ORD-123456", "customerProfileId": 1337, "totalAmount": 121, + "touchPoint": + { + "salesTouchpointId": 3, + "name": "Website (Perplex)", + "isActive": true, + "retailerId": 1001, + }, "language": { "languageId": 1, @@ -2524,13 +2570,6 @@ paths: }, "billingAddressId": 1, "shippingAddressId": 1, - "touchPoint": - { - "salesTouchpointId": 3, - "name": "Website (Perplex)", - "isActive": true, - "retailerId": 1001, - }, "createdOn": "2024-03-22T09:00:00", "lastUpdatedOn": "2024-03-22T09:00:00", "order_OrderStatuses": @@ -2654,8 +2693,19 @@ paths: "paymentId": "1a973c85-7a96-41b5-bbf2-7919d6a6db15", "createdOn": "2024-03-22T09:00:00", "amountDebit": 121, - "paymentMethodId": 1, - "touchPointId": 1, + "paymentMethod": + { + "paymentMethodId": 1, + "name": "ideal", + "provider": "Buckaroo", + }, + "touchPoint": + { + "salesTouchpointId": 3, + "name": "Website (Perplex)", + "isActive": true, + "retailerId": 1001, + }, "isRefund": false, "htmPaymentReference": "HTM-1234", "pspPaymentReference": null, @@ -2778,6 +2828,13 @@ paths: "orderNumber": "ORD-123456", "customerProfileId": 1337, "totalAmount": 121, + "touchPoint": + { + "salesTouchpointId": 3, + "name": "Website (Perplex)", + "isActive": true, + "retailerId": 1001, + }, "language": { "languageId": 1, @@ -2787,7 +2844,6 @@ paths: }, "billingAddressId": 1, "shippingAddressId": 1, - "touchpointId": 3, "createdOn": "2024-03-22T09:00:00", "lastUpdatedOn": "2024-03-22T09:00:00", "order_OrderStatuses": @@ -2863,8 +2919,19 @@ paths: "paymentId": "1a973c85-7a96-41b5-bbf2-7919d6a6db15", "createdOn": "2024-03-22T09:00:00", "amountDebit": 121, - "paymentMethodId": 1, - "touchPointId": 1, + "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", @@ -2932,6 +2999,183 @@ paths: } v1.2: value: { "paymentId": "94270188-4cf6-447e-bd49-e8186bcec073" } + v9.9 (Nick Pows): + value: + { + "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", + "externalOrderId": "be8160b3-a7f7-4a63-ad63-09503b2fc4a3", + "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", + }, + "billingAddressId": 1, + "shippingAddressId": 1, + "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%", + "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, + "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", + "dateOfBirth": "01-01-1970", + "photoReference": "DSC_0502.JPG", + "fileType": "image/jpg", + "challengeType": + { + "challengeTypeId": 1, + "name": "email", + }, + "oneTimePassword": "H5Iiz3JTaQeIV8p", + }, + }, + ], + "orderAccountingStatuses": [], + "validationResult": true, + "validationErrors": [], + "additionalRemarks": [], + }, + ], + "payments": + [ + { + "paymentId": "1a973c85-7a96-41b5-bbf2-7919d6a6db15", + "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": + [ + { + "paymentStatusId": "42eee610-1a17-4f02-be14-7e25d69d35f3", + "createdOn": "2024-03-22T09:00:00", + "statusCode": "?", + "statusDescription": "Initiated", + "statusSubCode": "?", + "statusSubDescription": "PaymentInitiated", + }, + { + "paymentStatusId": "b9893367-0cab-45a8-89f9-03a14d6cd138", + "createdOn": "2024-03-22T09:00:00", + "statusCode": "791", + "statusDescription": "Pending processing", + "statusSubCode": "S001", + "statusSubDescription": "PendingProcessing", + }, + { + "paymentStatusId": "9edfb9ad-f5b3-4edc-8216-7cd0070b03f3", + "createdOn": "2024-03-22T09:01:00", + "statusCode": "190", + "statusDescription": "Success", + "statusSubCode": "S001", + "statusSubDescription": "PaymentSuccessful", + }, + ], + "mandateInput": + { + "mandateInputId": "7e3c7b4e-2b4d-4e0b-8f8b-0e8d9f0a2c3b", + "consumerIssuer": "ABN AMRO", + "transactionId": "0000000000000001", + "consumerName": "J. de Vries", + "consumerIBAN": "NL44RABO0123456789", + "consumerBIC": "RABONL2U", + }, + }, + ], + "orderCustomers": + { + "orderCustomerId": "94270188-4cf6-447e-bd49-e8186bcec073", + "birthname": "Jan", + "surname": "Vries", + "prefix": "de", + "emailAddress": "jandevries@outlook.com", + "dateOfBirth": "1970-01-01", + "orderCustomerAddresses": + [ + { + "orderCustomerAddressId": "94270188-4cf6-447e-bd49-e8186bcec073", + "addressTypeId": + { "addressTypeId": 1, "name": "Billing" }, + "street": "Kon. Julianaplein", + "houseNumber": 10, + "houseNumberSuffix": "a", + "postalCode": "2595 AA", + "city": "Den Haag", + "country": "NL", + }, + ], + }, + } /orders/{orderId}/ordercustomers: parameters: - in: path @@ -3022,6 +3266,13 @@ paths: "orderNumber": "ORD-123456", "customerProfileId": 1337, "totalAmount": 121, + "touchPoint": + { + "salesTouchpointId": 3, + "name": "Website (Perplex)", + "isActive": true, + "retailerId": 1001, + }, "language": { "languageId": 1, @@ -3031,13 +3282,6 @@ paths: }, "billingAddressId": 1, "shippingAddressId": 1, - "touchPoint": - { - "salesTouchpointId": 3, - "name": "Website (Perplex)", - "isActive": true, - "retailerId": 1001, - }, "createdOn": "2024-03-22T09:00:00", "lastUpdatedOn": "2024-03-22T09:00:00", "order_OrderStatuses": @@ -3203,6 +3447,13 @@ paths: "orderNumber": "ORD-123456", "customerProfileId": 1337, "totalAmount": 121, + "touchPoint": + { + "salesTouchpointId": 3, + "name": "Website (Perplex)", + "isActive": true, + "retailerId": 1001, + }, "language": { "languageId": 1, @@ -3212,13 +3463,6 @@ paths: }, "billingAddressId": 1, "shippingAddressId": 1, - "touchPoint": - { - "salesTouchpointId": 3, - "name": "Website (Perplex)", - "isActive": true, - "retailerId": 1001, - }, "createdOn": "2024-03-22T09:00:00", "lastUpdatedOn": "2024-03-22T09:00:00", "order_OrderStatuses": @@ -3388,6 +3632,13 @@ paths: "orderNumber": "ORD-123456", "customerProfileId": 1337, "totalAmount": 121, + "touchPoint": + { + "salesTouchpointId": 3, + "name": "Website (Perplex)", + "isActive": true, + "retailerId": 1001, + }, "language": { "languageId": 1, @@ -3397,13 +3648,6 @@ paths: }, "billingAddressId": 2, "shippingAddressId": 1, - "touchPoint": - { - "salesTouchpointId": 3, - "name": "Website (Perplex)", - "isActive": true, - "retailerId": 1001, - }, "createdOn": "2024-03-22T09:00:00", "lastUpdatedOn": "2024-03-22T09:00:00", "order_OrderStatuses": @@ -3561,6 +3805,13 @@ paths: "orderNumber": "ORD-123456", "customerProfileId": 1337, "totalAmount": 121, + "touchPoint": + { + "salesTouchpointId": 3, + "name": "Website (Perplex)", + "isActive": true, + "retailerId": 1001, + }, "language": { "languageId": 1, @@ -3570,13 +3821,6 @@ paths: }, "billingAddressId": 1, "shippingAddressId": 1, - "touchPoint": - { - "salesTouchpointId": 3, - "name": "Website (Perplex)", - "isActive": true, - "retailerId": 1001, - }, "createdOn": "2024-03-22T09:00:00", "lastUpdatedOn": "2024-03-22T09:00:00", "order_OrderStatuses": @@ -3714,6 +3958,13 @@ paths: "orderNumber": "ORD-123456", "customerProfileId": 1337, "totalAmount": 0, + "touchPoint": + { + "salesTouchpointId": 3, + "name": "Website (Perplex)", + "isActive": true, + "retailerId": 1001, + }, "language": { "languageId": 1, @@ -3723,13 +3974,6 @@ paths: }, "billingAddressId": 1, "shippingAddressId": 1, - "touchPoint": - { - "salesTouchpointId": 3, - "name": "Website (Perplex)", - "isActive": true, - "retailerId": 1001, - }, "createdOn": "2024-03-22T09:00:00", "lastUpdatedOn": "2024-03-22T09:00:00", "order_OrderStatuses": From 6518d83c1b4d715b513ac6a340d677993aa648a7 Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Tue, 25 Mar 2025 16:44:49 +0100 Subject: [PATCH 7/9] OVPAY-1564 - Improvements in validation objects, part 5. --- src/openapi/orders/service_engine_orders.yaml | 85 ++++++++++++------- 1 file changed, 54 insertions(+), 31 deletions(-) diff --git a/src/openapi/orders/service_engine_orders.yaml b/src/openapi/orders/service_engine_orders.yaml index 2a25552..b1c46dd 100644 --- a/src/openapi/orders/service_engine_orders.yaml +++ b/src/openapi/orders/service_engine_orders.yaml @@ -829,10 +829,11 @@ paths: "mandateInput": { "mandateInputId": "1d6626cd-b93b-4ea6-85d5-a8e3a24a2725", - "directDebitMandateType": { - "directDebitMandateTypeId": 1, - "name": "import", - }, + "directDebitMandateType": + { + "directDebitMandateTypeId": 1, + "name": "import", + }, "createdOn": "2024-03-22T09:00:00", "bic": "RABONL2U", "iban": "NL44RABO0123456789", @@ -970,12 +971,12 @@ paths: "provider": "Buckaroo", }, "touchPoint": - { - "salesTouchpointId": 3, - "name": "Website (Perplex)", - "isActive": true, - "retailerId": 1001, - }, + { + "salesTouchpointId": 3, + "name": "Website (Perplex)", + "isActive": true, + "retailerId": 1001, + }, "isRefund": false, "htmPaymentReference": "HTM-1234", "pspPaymentReference": "Buckaroo-1234", @@ -993,10 +994,11 @@ paths: "mandateInput": { "mandateInputId": "5397f2d7-eefa-4e82-a086-1e0e3ad38bdb", - "directDebitMandateType": { - "directDebitMandateTypeId": 1, - "name": "import", - }, + "directDebitMandateType": + { + "directDebitMandateTypeId": 1, + "name": "import", + }, "createdOn": "2024-03-22T09:00:00", "bic": "RABONL2U", "iban": "NL44RABO0123456789", @@ -1842,7 +1844,6 @@ paths: ], "orderAccountingStatuses": [], "validationResult": true, - "validationErrors": [], "additionalRemarks": [ { @@ -1850,6 +1851,7 @@ paths: "parameter": "directDebitMandateId", }, ], + "validationErrors": [], }, ], "payments": [], @@ -2118,7 +2120,6 @@ paths: ], "orderAccountingStatuses": [], "validationResult": true, - "validationErrors": [], "additionalRemarks": [ { @@ -2126,6 +2127,7 @@ paths: "parameter": "directDebitMandateId", }, ], + "validationErrors": [], }, { "orderLineId": "2cb04b38-e9a8-465a-a273-261c55a21b71", @@ -2164,8 +2166,8 @@ paths: ], "orderAccountingStatuses": [], "validationResult": true, - "validationErrors": [], "additionalRemarks": [], + "validationErrors": [], }, ], "payments": [], @@ -2351,7 +2353,6 @@ paths: ], "orderAccountingStatuses": [], "validationResult": true, - "validationErrors": [], "additionalRemarks": [ { @@ -2359,6 +2360,7 @@ paths: "parameter": "directDebitMandateId", }, ], + "validationErrors": [], }, ], "payments": [], @@ -2642,8 +2644,8 @@ paths: ], "orderAccountingStatuses": [], "validationResult": true, - "validationErrors": [], "additionalRemarks": [], + "validationErrors": [], }, { "orderLineId": "2cb04b38-e9a8-465a-a273-261c55a21b71", @@ -2683,8 +2685,8 @@ paths: ], "orderAccountingStatuses": [], "validationResult": true, - "validationErrors": [], "additionalRemarks": [], + "validationErrors": [], }, ], "payments": @@ -2909,8 +2911,8 @@ paths: ], "orderAccountingStatuses": [], "validationResult": true, - "validationErrors": [], "additionalRemarks": [], + "validationErrors": [], }, ], "payments": @@ -3039,7 +3041,7 @@ paths: [ { "orderLineId": "cccada2c-d5ea-48ab-b4be-f590e16b5468", - "externalOrderLineId": null, + "externalOrderLineId": "0211f11b-270e-43f2-8ecc-3fe85773a0a2", "productId": 1, "productName": "HTM Maandkorting 20%", "productCode": "HTM-MND-20", @@ -3056,7 +3058,7 @@ paths: ], "createdOn": "2024-03-22T09:00:00", "validFrom": "2024-03-22T09:00:00", - "validUntil": null, + "validUntil": "2024-03-22T09:00:00", "orderLineStatus": { "orderLineStatusId": 1, "name": "pending" }, "customerTokens": @@ -3086,10 +3088,31 @@ paths: }, }, ], - "orderAccountingStatuses": [], - "validationResult": true, - "validationErrors": [], - "additionalRemarks": [], + "orderAccountingStatuses": + [ + { + "orderAccountingStatusId": "f1d0e1a7-a3cf-4876-b8f2-073add10667f", + "accountingStatus": + { "accountingStatusId": 1, "name": "open" }, + "createdOn": "2024-03-22T09:00:00", + "description": "Order is aangemaakt", + }, + ], + "validationResult": false, + "additionalRemarks": + [ + { + "code": "MANDATE_REQUIRED", + "parameter": "directDebitMandateId", + }, + ], + "validationErrors": + [ + { + "detail": "Startdate of this product should be at most 60 days in the future.", + "pointer": "#/0/startDate", + }, + ], }, ], "payments": @@ -3347,8 +3370,8 @@ paths: ], "orderAccountingStatuses": [], "validationResult": true, - "validationErrors": [], "additionalRemarks": [], + "validationErrors": [], }, ], "payments": [], @@ -3528,8 +3551,8 @@ paths: ], "orderAccountingStatuses": [], "validationResult": true, - "validationErrors": [], "additionalRemarks": [], + "validationErrors": [], }, ], "payments": [], @@ -3713,7 +3736,6 @@ paths: ], "orderAccountingStatuses": [], "validationResult": false, - "validationErrors": [], "additionalRemarks": [ { @@ -3721,6 +3743,7 @@ paths: "parameter": "directDebitMandateId", }, ], + "validationErrors": [], }, ], "payments": [], @@ -3886,7 +3909,6 @@ paths: ], "orderAccountingStatuses": [], "validationResult": false, - "validationErrors": [], "additionalRemarks": [ { @@ -3894,6 +3916,7 @@ paths: "parameter": "directDebitMandateId", }, ], + "validationErrors": [], }, ], "payments": [], From bd08005a464e5ea0aa6228c5c27082005c59bbad Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Fri, 28 Mar 2025 12:21:47 +0100 Subject: [PATCH 8/9] OVPAY-1564 - Processed review remarks. --- src/openapi/orders/service_engine_orders.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/openapi/orders/service_engine_orders.yaml b/src/openapi/orders/service_engine_orders.yaml index b1c46dd..13c9d5a 100644 --- a/src/openapi/orders/service_engine_orders.yaml +++ b/src/openapi/orders/service_engine_orders.yaml @@ -1733,7 +1733,6 @@ paths: "languageId": 1, "billingAddressId": 2, "shippingAddressId": 1, - "lastUpdatedOn": "2024-03-22T09:00:00", } v1.2: summary: Order update v1.2 @@ -3928,7 +3927,7 @@ paths: "prefix": "de", "emailAddress": "jandevries@outlook.com", "dateOfBirth": "1970-01-01", - "orderCusotmerAddresses": + "orderCustomerAddresses": [ { "orderCustomerAddressId": "94270188-4cf6-447e-bd49-e8186bcec073", From afb46f8f848e11a4a5036c1882f1f402660dbd2a Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Fri, 28 Mar 2025 19:10:02 +0100 Subject: [PATCH 9/9] Added examples needed for stub. --- src/openapi/contracts/contracts-se.yaml | 399 ++++++++++++++---------- 1 file changed, 230 insertions(+), 169 deletions(-) diff --git a/src/openapi/contracts/contracts-se.yaml b/src/openapi/contracts/contracts-se.yaml index b6d636d..424821d 100644 --- a/src/openapi/contracts/contracts-se.yaml +++ b/src/openapi/contracts/contracts-se.yaml @@ -27,58 +27,65 @@ paths: application/json: schema: $ref: "#/components/schemas/unavailable" - example: - [ - { - "contractId": "5a3876a1-e9a1-4278-8983-4679a8d583c2", - "contractNumber": "D123456", - "customerProfileId": 42, - "orderId": "eb3d08f7-7feb-4f31-9f5b-daa634e51f48", - "orderLineId": "52efbbfc-8c28-4016-9ece-dc3ef9a70bd8", - "touchpointId": 2, - "contractStatus": - { "contractStatusId": 2, "name": "active" }, - "productId": 1, - "productName": "HTM Maand 20% korting", - "termDuration": "P0Y1M0D", - "billingDay": 15, - "highestInvoiceTerm": 1, - "created": "2024-08-01 15:01:00.000", - "ovPayTokenId": 1337, - "_links": + examples: + List all contracts for a single customer profile: + summary: List all contracts for a single customer profile + description: | + List all contracts for single customer profile with customer + number 'D123456'. + value: + [ { - "get_token": + "contractId": "5a3876a1-e9a1-4278-8983-4679a8d583c2", + "contractNumber": "D123456", + "customerProfileId": 42, + "orderId": "eb3d08f7-7feb-4f31-9f5b-daa634e51f48", + "orderLineId": "52efbbfc-8c28-4016-9ece-dc3ef9a70bd8", + "touchpointId": 2, + "contractStatus": + { "contractStatusId": 2, "name": "active" }, + "productId": 1, + "productName": "HTM Maand 20% korting", + "termDuration": "P0Y1M0D", + "billingDay": 15, + "highestInvoiceTerm": 1, + "created": "2024-08-01 15:01:00.000", + "ovPayTokenId": 1337, + "_links": { - "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/tokens?ovPayTokenId=1337", - "method": "GET", + "get_token": + { + "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens?ovPayTokenId=1337", + "method": "GET", + }, }, }, - }, - { - "contractId": "f07253e6-c364-474c-a342-a10a4a7cf305", - "contractNumber": "D123456", - "customerProfileId": 42, - "orderId": "945d43e6-516e-425b-8847-9aba41289acd", - "orderLineId": "42f68042-908f-41f4-9d9b-4cab843ff0e8", - "touchpointId": 2, - "contractStatus": { "contractStatusId": 1, "name": "new" }, - "productId": 1, - "productName": "HTM Maand 20% korting", - "termDuration": "P0Y1M0D", - "billingDay": 15, - "highestInvoiceTerm": 1, - "created": "2024-08-01 15:01:00.000", - "ovPayTokenId": 1338, - "_links": { - "get_token": + "contractId": "f07253e6-c364-474c-a342-a10a4a7cf305", + "contractNumber": "D123456", + "customerProfileId": 42, + "orderId": "945d43e6-516e-425b-8847-9aba41289acd", + "orderLineId": "42f68042-908f-41f4-9d9b-4cab843ff0e8", + "touchpointId": 2, + "contractStatus": + { "contractStatusId": 1, "name": "new" }, + "productId": 1, + "productName": "HTM Maand 20% korting", + "termDuration": "P0Y1M0D", + "billingDay": 15, + "highestInvoiceTerm": 1, + "created": "2024-08-01 15:01:00.000", + "ovPayTokenId": 1338, + "_links": { - "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/tokens?ovPayTokenId=1338", - "method": "GET", + "get_token": + { + "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens?ovPayTokenId=1338", + "method": "GET", + }, }, }, - }, - ] + ] /customers/contracts/{contractId}: parameters: - in: header @@ -130,84 +137,93 @@ paths: application/json: schema: $ref: "#/components/schemas/unavailable" - example: - { - "contractId": "5a3876a1-e9a1-4278-8983-4679a8d583c2", - "contractNumber": "D123456", - "customerProfileId": 42, - "orderId": "eb3d08f7-7feb-4f31-9f5b-daa634e51f48", - "orderLineId": "52efbbfc-8c28-4016-9ece-dc3ef9a70bd8", - "touchpointId": 2, - "contractStatus": { "contractStatusId": 2, "name": "active" }, - "productId": 1, - "productName": "HTM Maand 20% korting", - "termDuration": "P0Y1M0D", - "billingDay": 15, - "highestInvoiceTerm": 1, - "ovPayTokenId": 1337, - "contractVersions": - [ - { - "contractVersionId": 1, - "termsAndConditions": "https://www.htm.nl/reisproducten/productvoorwaarden/htm-maandkorting/", - "termAmountExclTax": 1200, - "taxCode": "V21", - "taxAmount": 108, - "termAmountInclTax": 1308, - "start": "2024-07-04 15:01:00.000", - "end": "2024-12-31 15:01:00.000", - }, - { - "contractVersionId": 2, - "termsAndConditions": "https://www.htm.nl/reisproducten/productvoorwaarden/htm-maandkorting/", - "termAmountExclTax": 1300, - "taxCode": "V21", - "taxAmount": 117, - "termAmountInclTax": 1417, - "start": "2025-01-01 15:01:00.000", - }, - ], - "contractActions": - [ - { - "contractActionId": "67687851-59dd-4bbc-aa74-0f7abd26c883", - "actionType": { "actionTypeId": 1, "name": "create" }, - "user": "subid123456", - "timestamp": "2024-07-02 15:01:00.000", - "details": "Contract created", - "correlationId": "976e7a4c-bf24-43d2-b444-55817556e7ee", - }, - { - "contractActionId": "ea9ad287-9cd3-4e76-bcb9-d71db551cf55", - "actionType": { "actionTypeId": 2, "name": "change" }, - "user": "subid123456", - "timestamp": "2024-07-03 15:01:00.000", - "details": "Contract changed", - "correlationId": "e2462347-6749-4841-b42a-cf8de19ec727", - }, - ], - "contractInvoices": - [ - { - "contractInvoiceId": "8699d72a-cf4d-4e6b-9e9c-549d837ca51f", - "externalReference": "F2024-0001", - "term": 1, - "created": "2024-07-02 15:01:00.000", - "updated": "2024-07-02 15:01:00.000", - "state": "invoice_created", - "data": "{json}", - "isCredit": false, - }, - ], - "_links": + examples: + Full contract details of a single contract: + summary: Full contract details of a single contract + description: | + Full contract details of a single contract with contract + number 'D123456'. + value: { - "get_token": + "contractId": "5a3876a1-e9a1-4278-8983-4679a8d583c2", + "contractNumber": "D123456", + "customerProfileId": 42, + "orderId": "eb3d08f7-7feb-4f31-9f5b-daa634e51f48", + "orderLineId": "52efbbfc-8c28-4016-9ece-dc3ef9a70bd8", + "touchpointId": 2, + "contractStatus": + { "contractStatusId": 2, "name": "active" }, + "productId": 1, + "productName": "HTM Maand 20% korting", + "termDuration": "P0Y1M0D", + "billingDay": 15, + "highestInvoiceTerm": 1, + "ovPayTokenId": 1337, + "contractVersions": + [ + { + "contractVersionId": 1, + "termsAndConditions": "https://www.htm.nl/reisproducten/productvoorwaarden/htm-maandkorting/", + "termAmountExclTax": 1200, + "taxCode": "V21", + "taxAmount": 108, + "termAmountInclTax": 1308, + "start": "2024-07-04 15:01:00.000", + "end": "2024-12-31 15:01:00.000", + }, + { + "contractVersionId": 2, + "termsAndConditions": "https://www.htm.nl/reisproducten/productvoorwaarden/htm-maandkorting/", + "termAmountExclTax": 1300, + "taxCode": "V21", + "taxAmount": 117, + "termAmountInclTax": 1417, + "start": "2025-01-01 15:01:00.000", + }, + ], + "contractActions": + [ + { + "contractActionId": "67687851-59dd-4bbc-aa74-0f7abd26c883", + "actionType": + { "actionTypeId": 1, "name": "create" }, + "user": "subid123456", + "timestamp": "2024-07-02 15:01:00.000", + "details": "Contract created", + "correlationId": "976e7a4c-bf24-43d2-b444-55817556e7ee", + }, + { + "contractActionId": "ea9ad287-9cd3-4e76-bcb9-d71db551cf55", + "actionType": + { "actionTypeId": 2, "name": "change" }, + "user": "subid123456", + "timestamp": "2024-07-03 15:01:00.000", + "details": "Contract changed", + "correlationId": "e2462347-6749-4841-b42a-cf8de19ec727", + }, + ], + "contractInvoices": + [ + { + "contractInvoiceId": "8699d72a-cf4d-4e6b-9e9c-549d837ca51f", + "externalReference": "F2024-0001", + "term": 1, + "created": "2024-07-02 15:01:00.000", + "updated": "2024-07-02 15:01:00.000", + "state": "invoice_created", + "data": "{json}", + "isCredit": false, + }, + ], + "_links": { - "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/tokens?ovPayTokenId=1337", - "method": "GET", + "get_token": + { + "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens?ovPayTokenId=1337", + "method": "GET", + }, }, - }, - } + } /customers/contracts/{contractId}/invoices: parameters: - in: header @@ -237,31 +253,37 @@ paths: application/json: schema: $ref: "#/components/schemas/unavailable" - example: - [ - { - "contractInvoiceId": "8699d72a-cf4d-4e6b-9e9c-549d837ca51f", - "contractId": "9e224750-3065-471d-af57-85b9cffa7c89", - "externalReference": "F2024-0001", - "term": 1, - "created": "2024-07-02 15:01:34.000", - "updated": "2024-07-04 00:04:56.000", - "state": "invoice_created", - "public_link": "http://mijnfactuurinzien.nl/F2024-0001", - "isCredit": false, - }, - { - "contractInvoiceId": "0e729101-2c84-44db-8b18-d8f759e968e0", - "contractId": "9e224750-3065-471d-af57-85b9cffa7c89", - "externalReference": "F2024-0002", - "term": 2, - "created": "2024-08-02 15:01:34.000", - "updated": "2024-08-04 00:04:56.000", - "state": "invoice_created", - "public_link": "http://mijnfactuurinzien.nl/F2024-0002", - "isCredit": false, - }, - ] + examples: + Get all invoices of a single contract: + summary: Get all invoices of a single contract + description: | + Get all invoices of a single contract with contract number + 'D123456'. + value: + [ + { + "contractInvoiceId": "8699d72a-cf4d-4e6b-9e9c-549d837ca51f", + "contractId": "9e224750-3065-471d-af57-85b9cffa7c89", + "externalReference": "F2024-0001", + "term": 1, + "created": "2024-07-02 15:01:34.000", + "updated": "2024-07-04 00:04:56.000", + "state": "invoice_created", + "public_link": "http://mijnfactuurinzien.nl/F2024-0001", + "isCredit": false, + }, + { + "contractInvoiceId": "0e729101-2c84-44db-8b18-d8f759e968e0", + "contractId": "9e224750-3065-471d-af57-85b9cffa7c89", + "externalReference": "F2024-0002", + "term": 2, + "created": "2024-08-02 15:01:34.000", + "updated": "2024-08-04 00:04:56.000", + "state": "invoice_created", + "public_link": "http://mijnfactuurinzien.nl/F2024-0002", + "isCredit": false, + }, + ] /contracts/{contractId}/cancellationmoments: parameters: - in: header @@ -291,14 +313,19 @@ paths: application/json: schema: $ref: "#/components/schemas/unavailable" - example: - { - "cancellationMoment": "termBound", - "termDuration": "P1M", - "billingDay": 18, - "cancellationFrom": "2024-08-10T00:00:00", - "cancellationUntil": "2026-08-10T00:00:00", - } + examples: + All cancellation moments of a term bound contract: + summary: All cancellation moments of a term bound contract + description: | + All cancellation moments of a term bound contract. + value: + { + "cancellationMoment": "termBound", + "termDuration": "P1M", + "billingDay": 18, + "cancellationFrom": "2024-08-10T00:00:00", + "cancellationUntil": "2026-08-10T00:00:00", + } /contracts/{contractId}/cancellationvalidation: parameters: - in: header @@ -327,7 +354,12 @@ paths: application/json: schema: $ref: "#/components/schemas/unavailable" - example: { "end": "2024-08-10T00:00:00" } + examples: + Validate a cancellation of a given end date: + summary: Validate a cancellation of a given end date + description: | + Validate a cancellation of a given end date. + value: { "end": "2024-08-10T00:00:00" } responses: "200": description: OK @@ -335,14 +367,32 @@ paths: application/json: schema: $ref: "#/components/schemas/unavailable" - example: - { - "validationResult": "true", - "validationMessage": "", - "end": "2024-08-10T03:59:59", - "refundAmount": "2489", - "refundMethods": ["creditInvoice", "iDeal"], - } + examples: + Successfully validated cancellation: + summary: Successfully validated cancellation + description: | + Successfully validated a cancellation. The response contains + the refund amount and refund methods. + value: + { + "validationResult": true, + "validationMessage": "", + "end": "2024-08-10T03:59:59", + "refundAmount": 2489, + "refundMethods": ["creditInvoice", "iDeal"], + } + Unsuccesful validation: + summary: Unsuccesful validation + description: | + Unsuccesful validation. The response contains the error message. + value: + { + "validationResult": false, + "validationMessage": "Cancellation end date not allowed", + "end": null, + "refundAmount": null, + "refundMethods": [], + } /contracts/{contractId}/cancellation: parameters: - in: header @@ -371,8 +421,13 @@ paths: application/json: schema: $ref: "#/components/schemas/unavailable" - example: - { "end": "2024-08-10T00:00:00", "refundMethod": "creditInvoice" } + examples: + Cancellation request for credit invoice: + summary: Cancellation request for credit invoice + description: | + Cancellation request for credit invoice. + value: + { "end": "2024-08-10T00:00:00", "refundMethod": "creditInvoice" } responses: "200": description: OK @@ -380,12 +435,18 @@ paths: application/json: schema: $ref: "#/components/schemas/unavailable" - example: - { - "end": "2024-08-10T03:59:59", - "refundAmount": "2489", - "refundMethod": "creditInvoice", - } + examples: + Successfully cancelled contract: + summary: Successfully cancelled contract + description: | + Successfully cancelled a contract. The response contains + the refund amount and refund method. + value: + { + "end": "2024-08-10T03:59:59", + "refundAmount": 2489, + "refundMethod": "creditInvoice", + } components: securitySchemes: bearerToken: