From 76c5fd1804c613ea4df840de923ddbb9183e8c42 Mon Sep 17 00:00:00 2001 From: Mirjam Herald Date: Mon, 24 Feb 2025 13:59:28 +0100 Subject: [PATCH] v3.0 orders --- src/openapi/orders/service_engine_orders.yaml | 1205 +++++++++++++++-- 1 file changed, 1110 insertions(+), 95 deletions(-) diff --git a/src/openapi/orders/service_engine_orders.yaml b/src/openapi/orders/service_engine_orders.yaml index 0c8ce0a..fc587a2 100644 --- a/src/openapi/orders/service_engine_orders.yaml +++ b/src/openapi/orders/service_engine_orders.yaml @@ -685,6 +685,33 @@ paths: ], }, } + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "type": "https://htm.nl/api/v1/probs/validationerror", + "title": "Your request is not valid.", + "detail": "The combination of tokens and/or products chosen is not valid. See errors for more details.", + "instance": "urn:uuid:4017fabc-1b28-11e8-accf-0ed5f89f718b", + "errors": [ + { + "detail": "Startdate of this product should be at most 60 days in the future.", + "pointer": "#/0/startDate", + "ovPayTokenId": 123, + "productId": 2 + }, + { + "detail": "Combination of product and token type is not valid.", + "pointer": "#/1/ovPayTokenId", + "ovPayTokenId": 123, + "productId": 3 + } + ] + } /customers/{customerProfileId}/orders: parameters: - in: path @@ -945,25 +972,24 @@ paths: } post: tags: - - Order Creation v2.1 - summary: Create a new order. - description: Create a new order. + - Order Creation v3.0 + summary: Create a new order v3.0. + description: Create a new order v3.0. requestBody: content: application/json: schema: $ref: "#/components/schemas/unavailable" examples: - v2.3: - summary: Order creation v2.3 - description: Order creation v2.3 + v3.0: + summary: Order creation v3.0 + description: Order creation v3.0 value: { "externalOrderId": null, "languageId": 1, "billingAddressId": 1, "shippingAddressId": 1, - "createdOn": "2024-03-22T09:00:00", "orderStatusId": 1, "orderLines": [ @@ -974,7 +1000,6 @@ paths: "validFrom": "2024-03-22T09:00:00", "validUntil": null, "orderLineStatusId": 1, - "createdOn": "2024-03-22T09:00:00", "customerTokens": [ { @@ -1293,7 +1318,7 @@ paths: schema: $ref: "#/components/schemas/unavailable" examples: - v2.3: + v3.0: value: { "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", @@ -1649,7 +1674,7 @@ paths: } patch: tags: - - Order Creation v2.1 + - Order Creation v3.0 summary: Update an existing order. description: Update an existing order. requestBody: @@ -1658,9 +1683,9 @@ paths: schema: $ref: "#/components/schemas/unavailable" examples: - v2.3: - summary: Order update v2.3 - description: Order update v2.3 + v3.0: + summary: Order update v3.0 + description: Order update v3.0 value: { "languageId": 1, "billingAddressId": 2, @@ -1686,7 +1711,7 @@ paths: schema: $ref: "#/components/schemas/unavailable" examples: - v2.3: + v3.0: value: { "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", @@ -1812,9 +1837,36 @@ paths: "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", "orderNumber": "ORD-123456", } + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "type": "https://htm.nl/api/v1/probs/validationerror", + "title": "Your request is not valid.", + "detail": "The combination of tokens and/or products chosen is not valid. See errors for more details.", + "instance": "urn:uuid:4017fabc-1b28-11e8-accf-0ed5f89f718b", + "errors": [ + { + "detail": "Startdate of this product should be at most 60 days in the future.", + "pointer": "#/0/startDate", + "ovPayTokenId": 123, + "productId": 2 + }, + { + "detail": "Combination of product and token type is not valid.", + "pointer": "#/1/ovPayTokenId", + "ovPayTokenId": 123, + "productId": 3 + } + ] + } delete: tags: - - Order Creation v2.1 + - Order Creation v3.0 summary: Delete an existing order. description: Delete an existing order. responses: @@ -1839,7 +1891,7 @@ paths: description: The JWT of the logged in customer (in case of a web shop). post: tags: - - Order Creation v2.1 + - Order Creation v3.0 summary: Add a new order line to an existing order. description: Add a new order line to an existing order. requestBody: @@ -1848,9 +1900,9 @@ paths: schema: $ref: "#/components/schemas/unavailable" examples: - v2.3: - summary: Create orderLine v2.3 - description: Create orderLine v2.3 + v3.0: + summary: Create orderLine v3.0 + description: Create orderLine v3.0 value: { "externalOrderLineId": null, @@ -1931,7 +1983,7 @@ paths: schema: $ref: "#/components/schemas/unavailable" examples: - v2.3: + v3.0: value: { "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", @@ -2088,6 +2140,33 @@ paths: } v2.2: 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.", + "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 + } + ] + } /orderlines/{orderLineId}: parameters: - in: path @@ -2107,7 +2186,7 @@ paths: description: The JWT of the logged in customer (in case of a web shop). patch: tags: - - Order Creation v2.1 + - Order Creation v3.0 summary: Update an existing order line. description: Update an existing order line. requestBody: @@ -2116,9 +2195,9 @@ paths: schema: $ref: "#/components/schemas/unavailable" examples: - v2.3: - summary: Order creation v2.3 - description: Order creation v2.3 + v3.0: + summary: Order creation v3.0 + description: Order creation v3.0 value: { "quantity": 1, @@ -2147,7 +2226,7 @@ paths: schema: $ref: "#/components/schemas/unavailable" examples: - v2.3: + v3.0: value: { "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", @@ -2270,14 +2349,86 @@ paths: v2.2: 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.", + "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 + } + ] + } delete: tags: - - Order Creation v2.1 + - Order Creation v3.0 summary: Delete an existing order line. description: Delete an existing order line. responses: "200": description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + v3.0: + value: + { + "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", + "externalOrderId": null, + "orderNumber": "ORD-123456", + "customerProfileId": 1337, + "totalAmount": 0, + "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": 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", + } + ] + } + } "400": description: Bad request content: @@ -2318,7 +2469,7 @@ paths: description: The JWT of the logged in customer (in case of a web shop). post: tags: - - Order Creation v2.1 + - Order Creation v3.0 summary: Add a payment to an existing order. description: Add a payment to an existing order. requestBody: @@ -2326,35 +2477,70 @@ paths: application/json: schema: $ref: "#/components/schemas/unavailable" - example: - { - "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": + examples: + v3.0: + summary: Order creation v3.0 + description: Order creation v3.0 + value: { - "directDebitMandateTypeId": 1, "createdOn": "2024-03-22T09:00:00", - "bic": "RABONL2U", - "iban": "NL44RABO0123456789", - "ascription": "J. de Vries", - "place": "Den Haag", - }, - } + "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", + }, + } + v2.2: + summary: Order creation v2.2 + description: Order creation v2.2 + value: + { + "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", + }, + } responses: "201": description: Created @@ -2362,7 +2548,165 @@ paths: application/json: schema: $ref: "#/components/schemas/unavailable" - example: { "paymentId": "94270188-4cf6-447e-bd49-e8186bcec073" } + examples: + v3.0: + 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: + { "paymentId": "94270188-4cf6-447e-bd49-e8186bcec073" } /payments/{paymentId}: parameters: - in: path @@ -2382,7 +2726,7 @@ paths: description: The JWT of the logged in customer (in case of a web shop). patch: tags: - - Order Creation v2.1 + - Order Creation v3.0 summary: Update a payment on an existing order. description: Update a payment on an existing order. requestBody: @@ -2390,11 +2734,42 @@ paths: application/json: schema: $ref: "#/components/schemas/unavailable" - example: - { - "htmPaymentReference": "HTM-1234", - "pspPaymentReference": "Buckaroo-1234", - } + examples: + v3.0: + summary: Order payment update v3.0 + description: Order payment update v3.0 + value: + { + "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", + } + } + v2.2: + summary: Order payment update v2.2 + description: Order payment update v2.2 + value: + { + "htmPaymentReference": "HTM-1234", + "pspPaymentReference": "Buckaroo-1234", + } responses: "200": description: OK @@ -2402,7 +2777,137 @@ paths: application/json: schema: $ref: "#/components/schemas/unavailable" - example: { "paymentId": "94270188-4cf6-447e-bd49-e8186bcec073" } + examples: + v3.0: + 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": "791", + "statusDescription": "Pending processing", + "statusSubCode": "S001", + "statusSubDescription": "PendingProcessing", + }, + { + "createdOn": "2024-03-22T09:01: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: + { "paymentId": "94270188-4cf6-447e-bd49-e8186bcec073" } /orders/{orderId}/ordercustomers: parameters: - in: path @@ -2422,7 +2927,7 @@ paths: description: The JWT of the logged in customer (in case of a web shop). post: tags: - - Order Creation v2.1 + - Order Creation v3.0 summary: Add a customer to an existing order. description: Add a customer to an existing order. requestBody: @@ -2430,26 +2935,53 @@ paths: application/json: schema: $ref: "#/components/schemas/unavailable" - example: - { - "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", - }, - ], - } + examples: + v3.0: + summary: Order payment update v3.0 + description: Order payment update v3.0 + value: + { + "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 payment update v2.2 + description: Order payment update v2.2 + value: + { + "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 @@ -2457,8 +2989,101 @@ paths: application/json: schema: $ref: "#/components/schemas/unavailable" - example: - { "orderCustomerId": "94270188-4cf6-447e-bd49-e8186bcec073" } + examples: + v3.0: + 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": 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", + } + ] + } + } + v2.2: + value: + { "orderCustomerId": "94270188-4cf6-447e-bd49-e8186bcec073" } /ordercustomers/{orderCustomerId}: patch: parameters: @@ -2478,7 +3103,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.1 + - Order Creation v3.0 summary: Update a customer on an existing order. description: Update a customer on an existing order. requestBody: @@ -2487,13 +3112,28 @@ paths: schema: $ref: "#/components/schemas/unavailable" example: - { - "birthname": "Jan", - "surname": "Vries", - "prefix": "de", - "emailAddress": "jandevries@outlook.com", - "dateOfBirth": "1970-01-01", - } + v3.0: + summary: Order customer update v2.2 + description: Order customer update v2.2 + value: + { + "birthname": "Jan", + "surname": "Vries", + "prefix": "de", + "emailAddress": "jandevries@outlook.com", + "dateOfBirth": "1970-01-01", + } + v2.2: + summary: Order customer update v2.2 + description: Order customer update v2.2 + value: + { + "birthname": "Jan", + "surname": "Vries", + "prefix": "de", + "emailAddress": "jandevries@outlook.com", + "dateOfBirth": "1970-01-01", + } responses: "200": description: OK @@ -2501,8 +3141,383 @@ paths: application/json: schema: $ref: "#/components/schemas/unavailable" - example: - { "orderCustomerId": "94270188-4cf6-447e-bd49-e8186bcec073" } + examples: + v3.0: + 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": 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", + } + ] + } + } + v2.2: + value: + { "orderCustomerId": "94270188-4cf6-447e-bd49-e8186bcec073" } + /ordercustomers/{orderCustomerId}/orderCustomerAddress: + post: + parameters: + - in: path + name: orderCustomerId + required: true + style: simple + explode: false + schema: + type: string + format: uuid + example: a0ef57fa-395c-4a03-96e9-234c26dccea9 + - in: header + name: X-HM-JWT-AUTH-HEADER + schema: + type: string + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + description: The JWT of the logged in customer (in case of a web shop). + tags: + - Order Creation v3.0 + summary: Create a customer address for an existing order. + description: Create a customer address for an existing order. + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + v3.0: + summary: Order customer address create v2.2 + description: Order customer address create v2.2 + value: + { + "addressTypeId": 1, + "street": "Kon. Julianaplein", + "houseNumber": 10, + "houseNumberSuffix": "a", + "postalCode": "2595 AA", + "city": "Den Haag", + "country": "NL", + } + + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + examples: + v3.0: + 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": 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", + } + ] + } + } + /orderCustomerAddress/{orderCustomerAddressId}: + patch: + parameters: + - in: path + name: orderCustomerAddressId + required: true + style: simple + explode: false + schema: + type: string + format: uuid + example: a0ef57fa-395c-4a03-96e9-234c26dccea9 + - in: header + name: X-HM-JWT-AUTH-HEADER + schema: + type: string + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + description: The JWT of the logged in customer (in case of a web shop). + tags: + - Order Creation v3.0 + summary: Update a customer address for an existing order. + description: Update a customer address for an existing order. + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + v3.0: + summary: Order customer address create v2.2 + description: Order customer address create v2.2 + value: + { + "addressTypeId": 1, + "street": "Kon. Julianaplein", + "houseNumber": 101, + "houseNumberSuffix": "a", + "postalCode": "2595 AA", + "city": "Den Haag", + "country": "NL", + } + + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + examples: + v3.0: + 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": null, + "customer": + { + "birthname": "Jan", + "surname": "Vries", + "prefix": "de", + "emailAddress": "jandevries@outlook.com", + "dateOfBirth": "1970-01-01", + "addresses": + [ + { + "addressTypeId": 1, + "street": "Kon. Julianaplein", + "houseNumber": 101, + "houseNumberSuffix": "a", + "postalCode": "2595 AA", + "city": "Den Haag", + "country": "NL", + } + ] + } + } /orders/{orderId}/fulfill: parameters: - in: path