From caf927cae5b33b4aed8fedf96789a4b5fc51277d Mon Sep 17 00:00:00 2001 From: Mirjam Herald Date: Mon, 24 Feb 2025 12:16:41 +0100 Subject: [PATCH] creating orderv2.3 --- src/openapi/orders/service_engine_orders.yaml | 1375 +++++++++++++---- 1 file changed, 1048 insertions(+), 327 deletions(-) diff --git a/src/openapi/orders/service_engine_orders.yaml b/src/openapi/orders/service_engine_orders.yaml index 058a3dc..0c8ce0a 100644 --- a/src/openapi/orders/service_engine_orders.yaml +++ b/src/openapi/orders/service_engine_orders.yaml @@ -35,30 +35,6 @@ paths: schema: $ref: "#/components/schemas/unavailable" examples: - v1: - summary: Order validation v1 - description: Order validation v1 - value: - [ - { - "ovPayTokenId": 2, - "serviceReferenceId": "NLOV1234567ABCDEFG", - "amount": 34, - "ovpasNumber": "OV34567", - "productId": 2, - "startDate": "2024-03-22T09:00:00z", - "quantity": 1, - }, - { - "ovPayTokenId": 3, - "serviceReferenceId": "NLOV1234567ABCDEFG", - "amount": 89, - "ovpasNumber": "OV34567", - "productId": 4, - "startDate": "2024-03-22T09:00:00z", - "quantity": 4, - }, - ] v2: summary: Order validation v2 description: Order validation v2 @@ -125,6 +101,30 @@ paths: ], }, } + v1: + summary: Order validation v1 + description: Order validation v1 + value: + [ + { + "ovPayTokenId": 2, + "serviceReferenceId": "NLOV1234567ABCDEFG", + "amount": 34, + "ovpasNumber": "OV34567", + "productId": 2, + "startDate": "2024-03-22T09:00:00z", + "quantity": 1, + }, + { + "ovPayTokenId": 3, + "serviceReferenceId": "NLOV1234567ABCDEFG", + "amount": 89, + "ovpasNumber": "OV34567", + "productId": 4, + "startDate": "2024-03-22T09:00:00z", + "quantity": 4, + }, + ] responses: "200": description: OK @@ -322,44 +322,98 @@ paths: schema: $ref: "#/components/schemas/unavailable" examples: - v1: - summary: Order fulfillment v1 - description: Order fulfillment v1 + v2.2: + summary: Order fulfillment v2.2 + description: Order fulfillment v2.2 value: { - "customerProfileID": 123415, - "customerProfileData": { "dateOfBirth": "09-03-1989" }, - "personalAccountData": { "birthdate": "09-03-1989" }, - "directDebitMandate": - { - "consumerName": "J. de Tèster", - "consumerBic": "RABONL2U", - "consumerIban": "NL44RABO0123456789", - }, - "orderContents": + "externalOrderId": "a0ef57fa-395c-4a03-96e9-234c26dccea9", + "languageId": 1, + "billingAddressId": 1, + "shippingAddressId": 1, + "createdOn": "2024-03-22T09:00:00", + "orderStatusId": 4, + "orderLines": [ { - "ovPayTokenId": 123, - "serviceReferenceId": "NLOV1234567ABCDEFG", - "amount": 450, - "ovpasNumber": "63AW974", - "productId": 2, - "startDate": "2024-03-22T09:00:00Z", + "externalOrderLineId": "2ba39cae-c401-446b-ae5c-2d6d85b3df1f", + "productId": 1, "quantity": 1, - "orderlineId": "2d7fadc9-b64b-4516-9a7d-cf550f201372", - }, - { - "ovPayTokenId": 123, - "serviceReferenceId": "NLOV1234567ABCDEFG", - "amount": 450, - "ovpasNumber": "63AW974", - "productId": 3, - "startDate": "2024-03-16T09:00:00Z", - "quantity": 1, - "orderlineId": "9d7fadc9-b64b-4516-9a7d-cf550f201378", + "createdOn": "2024-03-22T09:00:00", + "validFrom": "2024-03-22T09:00:00", + "validUntil": null, + "orderLineStatusId": 4, + "tokens": + [ + { + "tokenTypeId": 1, + "ovPayTokenId": 1, + "serviceReferenceId": "NLOV1234567ABCDEFG", + "amount": 34, + "ovpasNumber": "OV34567", + "verificationCode": "A7H6", + "personalAccountData": + { + "name": "Jan de Vries", + "dateOfBirth": "01-01-1970", + "photoReference": "DSC_0502.JPG", + "fileType": "image/jpg", + "challengeTypeId": 1, + "oneTimePassword": "H5Iiz3JTaQeIV8p", + }, + }, + ], }, ], - "orderStatus": "succeededPayment", + "payments": + [ + { + "createdOn": "2024-03-22T09:00:00", + "amountDebit": 121, + "paymentMethodId": 1, + "isRefund": false, + "htmPaymentReference": "HTM-1234", + "pspPaymentReference": "Buckaroo-1234", + "paymentStatuses": + [ + { + "createdOn": "2024-03-22T09:00:00", + "statusCode": "190", + "statusDescription": "Success", + "statusSubCode": "S001", + "statusSubDescription": "PaymentSuccessFul", + }, + ], + "payPush": + { + "consumerIssuer": "ABN AMRO", + "transactionId": "0000000000000001", + "consumerName": "J. de Vries", + "consumerIBAN": "NL44RABO0123456789", + "consumerBIC": "RABONL2U", + }, + }, + ], + "customer": + { + "birthname": "Jan", + "surname": "Vries", + "prefix": "de", + "emailAddress": "jandevries@outlook.com", + "dateOfBirth": "1970-01-01", + "addresses": + [ + { + "addressTypeId": 1, + "street": "Kon. Julianaplein", + "houseNumber": 10, + "houseNumberSuffix": "a", + "postalCode": "2595 AA", + "city": "Den Haag", + "country": "NL", + }, + ], + }, } v2: summary: Order fulfillment v2 @@ -469,98 +523,44 @@ paths: ], }, } - v2.2: - summary: Order fulfillment v2.2 - description: Order fulfillment v2.2 + v1: + summary: Order fulfillment v1 + description: Order fulfillment v1 value: { - "externalOrderId": "a0ef57fa-395c-4a03-96e9-234c26dccea9", - "languageId": 1, - "billingAddressId": 1, - "shippingAddressId": 1, - "createdOn": "2024-03-22T09:00:00", - "orderStatusId": 4, - "orderLines": - [ - { - "externalOrderLineId": "2ba39cae-c401-446b-ae5c-2d6d85b3df1f", - "productId": 1, - "quantity": 1, - "createdOn": "2024-03-22T09:00:00", - "validFrom": "2024-03-22T09:00:00", - "validUntil": null, - "orderLineStatusId": 4, - "tokens": - [ - { - "tokenTypeId": 1, - "ovPayTokenId": 1, - "serviceReferenceId": "NLOV1234567ABCDEFG", - "amount": 34, - "ovpasNumber": "OV34567", - "verificationCode": "A7H6", - "personalAccountData": - { - "name": "Jan de Vries", - "dateOfBirth": "01-01-1970", - "photoReference": "DSC_0502.JPG", - "fileType": "image/jpg", - "challengeTypeId": 1, - "oneTimePassword": "H5Iiz3JTaQeIV8p", - }, - }, - ], - }, - ], - "payments": - [ - { - "createdOn": "2024-03-22T09:00:00", - "amountDebit": 121, - "paymentMethodId": 1, - "isRefund": false, - "htmPaymentReference": "HTM-1234", - "pspPaymentReference": "Buckaroo-1234", - "paymentStatuses": - [ - { - "createdOn": "2024-03-22T09:00:00", - "statusCode": "190", - "statusDescription": "Success", - "statusSubCode": "S001", - "statusSubDescription": "PaymentSuccessFul", - }, - ], - "payPush": - { - "consumerIssuer": "ABN AMRO", - "transactionId": "0000000000000001", - "consumerName": "J. de Vries", - "consumerIBAN": "NL44RABO0123456789", - "consumerBIC": "RABONL2U", - }, - }, - ], - "customer": + "customerProfileID": 123415, + "customerProfileData": { "dateOfBirth": "09-03-1989" }, + "personalAccountData": { "birthdate": "09-03-1989" }, + "directDebitMandate": { - "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", - }, - ], + "consumerName": "J. de Tèster", + "consumerBic": "RABONL2U", + "consumerIban": "NL44RABO0123456789", }, + "orderContents": + [ + { + "ovPayTokenId": 123, + "serviceReferenceId": "NLOV1234567ABCDEFG", + "amount": 450, + "ovpasNumber": "63AW974", + "productId": 2, + "startDate": "2024-03-22T09:00:00Z", + "quantity": 1, + "orderlineId": "2d7fadc9-b64b-4516-9a7d-cf550f201372", + }, + { + "ovPayTokenId": 123, + "serviceReferenceId": "NLOV1234567ABCDEFG", + "amount": 450, + "ovpasNumber": "63AW974", + "productId": 3, + "startDate": "2024-03-16T09:00:00Z", + "quantity": 1, + "orderlineId": "9d7fadc9-b64b-4516-9a7d-cf550f201378", + }, + ], + "orderStatus": "succeededPayment", } responses: "201": @@ -954,6 +954,209 @@ paths: schema: $ref: "#/components/schemas/unavailable" examples: + v2.3: + summary: Order creation v2.3 + description: Order creation v2.3 + value: + { + "externalOrderId": null, + "languageId": 1, + "billingAddressId": 1, + "shippingAddressId": 1, + "createdOn": "2024-03-22T09:00:00", + "orderStatusId": 1, + "orderLines": + [ + { + "externalOrderLineId": null, + "productId": 1, + "quantity": 1, + "validFrom": "2024-03-22T09:00:00", + "validUntil": null, + "orderLineStatusId": 1, + "createdOn": "2024-03-22T09:00:00", + "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", + } + ] + } + } + v2.2: + summary: Order creation v2.2 + description: Order creation v2.2 + value: + { + "externalOrderId": null, + "languageId": 1, + "billingAddressId": 1, + "shippingAddressId": 1, + "createdOn": "2024-03-22T09:00:00", + "order_OrderStatus": + [ + { + "orderStatusId": 1, + "createdOn": "2024-03-22T09:00:00", + "description": "Concept order", + }, + ], + "orderLines": + [ + { + "externalOrderLineId": null, + "productId": 1, + "quantity": 1, + "validFrom": "2024-03-22T09:00:00", + "validUntil": "2025-03-22T09:00:00", + "orderLineStatusId": 4, + "createdOn": "2024-03-22T09:00:00", + "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", + }, + }, + ], + "orderAccountingStatuses": + [ + { + "accountingStatusId": 1, + "createdOn": "2024-03-22T09:00:00", + "description": "Financiele transactie voor de FIKO.", + }, + ], + }, + ], + "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", + }, + ], + }, + } v2: summary: Order creation v2.1 description: Order creation v2.1 @@ -1082,126 +1285,166 @@ paths: ], }, } - v2.2: - summary: Order creation v2.2 - description: Order creation v2.2 - value: - { - "externalOrderId": null, - "languageId": 1, - "billingAddressId": 1, - "shippingAddressId": 1, - "createdOn": "2024-03-22T09:00:00", - "order_OrderStatus": - [ - { - "orderStatusId": 1, - "createdOn": "2024-03-22T09:00:00", - "description": "Concept order", - }, - ], - "orderLines": - [ - { - "externalOrderLineId": null, - "productId": 1, - "quantity": 1, - "validFrom": "2024-03-22T09:00:00", - "validUntil": "2025-03-22T09:00:00", - "orderLineStatusId": 4, - "createdOn": "2024-03-22T09:00:00", - "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", - }, - }, - ], - "orderAccountingStatuses": - [ - { - "accountingStatusId": 1, - "createdOn": "2024-03-22T09:00:00", - "description": "Financiele transactie voor de FIKO.", - }, - ], - }, - ], - "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", - }, - ], - }, - } responses: "201": description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + examples: + v2.3: + value: + { + "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", + "externalOrderId": null, + "orderNumber": "ORD-123456", + "customerProfileId": 1337, + "totalAmount": 121, + "languageId": 1, + "billingAddressId": 1, + "shippingAddressId": 1, + "touchpointId": 3, + "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", + }, + }, + ], + }, + ], + "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", + } + ] + } + } + v2.2: + value: + { + "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", + "orderNumber": "ORD-123456", + } + "400": + description: Bad request content: application/json: schema: $ref: "#/components/schemas/unavailable" example: - { - "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", - "orderNumber": "ORD-123456", + { + "type": "https://htm.nl/api/v1/probs/validationerror", + "title": "Your request is not valid.", + "detail": "The combination of tokens and/or products chosen is not valid. See errors for more details.", + "instance": "urn:uuid:4017fabc-1b28-11e8-accf-0ed5f89f718b", + "errors": [ + { + "detail": "Startdate of this product should be at most 60 days in the future.", + "pointer": "#/0/startDate", + "ovPayTokenId": 123, + "productId": 2 + }, + { + "detail": "Combination of product and token type is not valid.", + "pointer": "#/1/ovPayTokenId", + "ovPayTokenId": 123, + "productId": 3 + } + ] } /orders/{orderId}: parameters: @@ -1249,6 +1492,7 @@ paths: }, "billingAddressId": 1, "shippingAddressId": 1, + "touchpointId": 3, "createdOn": "2024-03-22T09:00:00", "lastUpdatedOn": "2024-03-22T09:00:00", "order_OrderStatus": @@ -1413,15 +1657,27 @@ paths: application/json: schema: $ref: "#/components/schemas/unavailable" - example: - { - "customerProfileId": 1337, - "totalAmount": 121, - "languageId": 1, - "billingAddressId": 1, - "shippingAddressId": 1, - "lastUpdatedOn": "2024-03-22T09:00:00", - } + examples: + v2.3: + summary: Order update v2.3 + description: Order update v2.3 + value: { + "languageId": 1, + "billingAddressId": 2, + "shippingAddressId": 1, + "lastUpdatedOn": "2024-03-22T09:00:00", + } + v2.2: + summary: Order update v2.2 + description: Order update v2.2 + value: { + "customerProfileId": 1337, + "totalAmount": 121, + "languageId": 1, + "billingAddressId": 1, + "shippingAddressId": 1, + "lastUpdatedOn": "2024-03-22T09:00:00", + } responses: "200": description: OK @@ -1429,11 +1685,133 @@ paths: application/json: schema: $ref: "#/components/schemas/unavailable" - example: - { - "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", - "orderNumber": "ORD-123456", - } + examples: + v2.3: + value: + { + "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", + "externalOrderId": null, + "orderNumber": "ORD-123456", + "customerProfileId": 1337, + "totalAmount": 121, + "languageId": 1, + "billingAddressId": 2, + "shippingAddressId": 1, + "touchpointId": 3, + "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", + }, + }, + ], + }, + ], + "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", + } + ] + } + } + v2.2: + value: + { + "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", + "orderNumber": "ORD-123456", + } delete: tags: - Order Creation v2.1 @@ -1469,53 +1847,82 @@ paths: application/json: schema: $ref: "#/components/schemas/unavailable" - example: - { - "externalOrderLineId": null, - "productId": 1, - "productName": "HTM Maandkorting 20%", - "productCode": "HTM-MND-20", - "productDescription": "HTM Maandkorting 20%", - "taxAmount": 21, - "taxMetadataId": "1d6f1725-1072-4f08-982c-3df51dd854a1", - "amountExclTax": 100, - "amountInclTax": 121, - "quantity": 1, - "orderLineTerms": - [{ "termsUrl": "generalTermsAndConditions.pdf" }], - "validFrom": "2024-03-22T09:00:00", - "validUntil": "2025-03-22T09:00:00", - "orderLineStatusId": 4, - "createdOn": "2024-03-22T09:00:00", - "customerTokens": - [ - { - "tokenTypeId": 1, - "ovPayTokenId": 1, - "serviceReferenceId": "NLOV1234567ABCDEFG", - "amount": 34, - "ovpasNumber": "OV34567", - "verificationCode": "A7H6", - "personalAccountData": + examples: + v2.3: + summary: Create orderLine v2.3 + description: Create orderLine v2.3 + value: + { + "externalOrderLineId": null, + "productId": 2, + "quantity": 1, + "validFrom": "2024-03-22T09:00:00", + "validUntil": null, + "orderLineStatusId": 1, + "createdOn": "2024-03-22T09:00:00", + "customerTokens": + [ { - "name": "Jan de Vries", - "dateOfBirth": "01-01-1970", - "photoReference": "DSC_0502.JPG", - "fileType": "image/jpg", - "challengeTypeId": 1, - "oneTimePassword": "H5Iiz3JTaQeIV8p", + "tokenTypeId": 1, + "ovPayTokenId": 4, + "serviceReferenceId": null, + "amount": null , + "ovpasNumber": null , + "verificationCode": null , + "personalAccountData": null }, - }, - ], - "orderAccountingStatuses": - [ - { - "accountingStatusId": 1, - "createdOn": "2024-03-22T09:00:00", - "description": "Financiele transactie voor de FIKO.", - }, - ], - } + ] + } + v2.2: + summary: Create orderLine v2.2 + description: Create orderLine v2.2 + value: + { + "externalOrderLineId": null, + "productId": 1, + "productName": "HTM Maandkorting 20%", + "productCode": "HTM-MND-20", + "productDescription": "HTM Maandkorting 20%", + "taxAmount": 21, + "taxMetadataId": "1d6f1725-1072-4f08-982c-3df51dd854a1", + "amountExclTax": 100, + "amountInclTax": 121, + "quantity": 1, + "orderLineTerms": + [{ "termsUrl": "generalTermsAndConditions.pdf" }], + "validFrom": "2024-03-22T09:00:00", + "validUntil": "2025-03-22T09:00:00", + "orderLineStatusId": 4, + "createdOn": "2024-03-22T09:00:00", + "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", + }, + }, + ], + "orderAccountingStatuses": + [ + { + "accountingStatusId": 1, + "createdOn": "2024-03-22T09:00:00", + "description": "Financiele transactie voor de FIKO.", + }, + ], + } responses: "200": description: OK @@ -1523,7 +1930,164 @@ paths: application/json: schema: $ref: "#/components/schemas/unavailable" - example: { "orderLineId": "e78b78d9-4fb0-4a9c-8dc0-6d100c9f1b3f" } + examples: + v2.3: + value: + { + "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", + "externalOrderId": null, + "orderNumber": "ORD-123456", + "customerProfileId": 1337, + "totalAmount": 121, + "languageId": 1, + "billingAddressId": 2, + "shippingAddressId": 1, + "touchpointId": 3, + "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", + }, + }, + ], + }, + { + "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 + } + ] + } + ], + "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", + } + ] + } + } + v2.2: + value: { "orderLineId": "e78b78d9-4fb0-4a9c-8dc0-6d100c9f1b3f" } /orderlines/{orderLineId}: parameters: - in: path @@ -1551,17 +2115,30 @@ paths: application/json: schema: $ref: "#/components/schemas/unavailable" - example: - { - "taxAmount": 21, - "taxMetadataId": "0574440e-7fa0-401f-b907-539c91633a5d", - "amountExclTax": 100, - "amountInclTax": 121, - "quantity": 1, - "validFrom": "2024-03-22T09:00:00", - "validUntil": "2025-03-22T09:00:00", - "orderLineStatusId": 4, - } + examples: + v2.3: + summary: Order creation v2.3 + description: Order creation v2.3 + value: + { + "quantity": 1, + "validFrom": "2024-03-25T09:00:00", + "validUntil": null + } + v2.2: + summary: Order creation v2.2 + description: Order creation v2.2 + value: + { + "taxAmount": 21, + "taxMetadataId": "0574440e-7fa0-401f-b907-539c91633a5d", + "amountExclTax": 100, + "amountInclTax": 121, + "quantity": 1, + "validFrom": "2024-03-22T09:00:00", + "validUntil": "2025-03-22T09:00:00", + "orderLineStatusId": 4, + } responses: "200": description: OK @@ -1569,7 +2146,130 @@ paths: application/json: schema: $ref: "#/components/schemas/unavailable" - example: { "orderLineId": "e78b78d9-4fb0-4a9c-8dc0-6d100c9f1b3f" } + examples: + v2.3: + value: + { + "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", + "externalOrderId": null, + "orderNumber": "ORD-123456", + "customerProfileId": 1337, + "totalAmount": 121, + "languageId": 1, + "billingAddressId": 1, + "shippingAddressId": 1, + "touchpointId": 3, + "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-25T09: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", + } + } + ] + }, + ], + "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", + } + ] + } + } + v2.2: + value: + { "orderLineId": "e78b78d9-4fb0-4a9c-8dc0-6d100c9f1b3f" } delete: tags: - Order Creation v2.1 @@ -1578,6 +2278,27 @@ paths: responses: "200": description: OK + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "type": "https://htm.nl/api/v1/probs/validationerror", + "title": "Your request is not valid.", + "detail": "The combination of tokens and/or products chosen is not valid. See errors for more details.", + "instance": "urn:uuid:4017fabc-1b28-11e8-accf-0ed5f89f718b", + "errors": [ + { + "detail": "Product requires product with productId=2", + "pointer": "#/1/orderLine", + "orderLineId": "0574440e-7fa0-401f-b907-539c91633a5d", + "productId": 3 + } + ] + } /orders/{orderId}/payments: parameters: - in: path