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: diff --git a/src/openapi/orders/service_engine_orders.yaml b/src/openapi/orders/service_engine_orders.yaml index 214836a..13c9d5a 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 @@ -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": @@ -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", @@ -651,7 +662,7 @@ paths: "statusCode": "190", "statusDescription": "Success", "statusSubCode": "S001", - "statusSubDescription": "PaymentSuccessFul", + "statusSubDescription": "PaymentSuccessful", }, ], "payPush": @@ -685,32 +696,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: @@ -730,7 +742,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: @@ -740,95 +752,119 @@ 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.0: + summary: Order list for customer v2.0 + description: Order list for customer v2.0 + 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_OrderStatuses": + { + "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, + "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": "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", + "directDebitMandateType": + { + "directDebitMandateTypeId": 1, + "name": "import", + }, + "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 @@ -871,7 +907,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: @@ -881,100 +917,128 @@ 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_OrderStatuses": + { + "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, + "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": "190", + "statusDescription": "Success", + "statusSubCode": "S001", + "statusSubDescription": "PaymentSuccessful", + }, + ], + "mandateInput": + { + "mandateInputId": "5397f2d7-eefa-4e82-a086-1e0e3ad38bdb", + "directDebitMandateType": + { + "directDebitMandateTypeId": 1, + "name": "import", + }, + "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. - description: Create a new order v2.0. + - Order Creation v2 + summary: Create a new order + description: | + 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". requestBody: content: application/json: @@ -990,7 +1054,6 @@ paths: "languageId": 1, "billingAddressId": 1, "shippingAddressId": 1, - "orderStatusId": 1, "orderLines": [ { @@ -999,7 +1062,6 @@ paths: "quantity": 1, "validFrom": "2024-03-22T09:00:00", "validUntil": null, - "orderLineStatusId": 1, "customerTokens": [ { @@ -1017,61 +1079,11 @@ paths: "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 @@ -1147,7 +1159,7 @@ paths: "statusCode": "190", "statusDescription": "Success", "statusSubCode": "S001", - "statusSubDescription": "PaymentSuccessFul", + "statusSubDescription": "PaymentSuccessful", }, ], "mandateInput": @@ -1190,13 +1202,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, @@ -1275,7 +1281,7 @@ paths: "statusCode": "190", "statusDescription": "Success", "statusSubCode": "S001", - "statusSubDescription": "PaymentSuccessFul", + "statusSubDescription": "PaymentSuccessful", }, ], "mandateInput": @@ -1319,137 +1325,115 @@ 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, + "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": [ { - "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" }, + "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": 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": [], + "orderCustomer": null, } v1.2: value: @@ -1457,32 +1441,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: @@ -1503,7 +1488,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: @@ -1513,186 +1498,225 @@ 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.0: + summary: Order details v2.0 + description: Order details v2.0 + 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, + }, + "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": [ { - "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", + }, + "touchPoint": + { + "salesTouchpointId": 3, + "name": "Website (Perplex)", + "isActive": true, + "retailerId": 1001, + }, + "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: @@ -1704,23 +1728,24 @@ 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, + } 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,21 +1755,13 @@ 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, @@ -1752,16 +1769,26 @@ paths: "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_OrderStatuses": [ { "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": [ @@ -1787,10 +1814,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, @@ -1798,74 +1827,34 @@ 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", }, }, - ], - "additionalRemarks" : - [ - { - "code": "MANDATE_REQUIRED", - "parameter": "directDebitMandateId" - } - ] - }, - ], - "payments": - [ - { - "createdOn": "2024-03-22T09:00:00", - "amountDebit": 121, - "paymentMethodId": 1, - "touchPointId": 1, - "isRefund": false, - "htmPaymentReference": "HTM-1234", - "pspPaymentReference": "Buckaroo-1234", - "paymentStatuses": + ], + "orderAccountingStatuses": [], + "validationResult": true, + "additionalRemarks": [ { - "createdOn": "2024-03-22T09:00:00", - "statusCode": "190", - "statusDescription": "Success", - "statusSubCode": "S001", - "statusSubDescription": "PaymentSuccessFul", + "code": "MANDATE_REQUIRED", + "parameter": "directDebitMandateId", }, ], - "payPush": - { - "consumerIssuer": "ABN AMRO", - "transactionId": "0000000000000001", - "consumerName": "J. de Vries", - "consumerIBAN": "NL44RABO0123456789", - "consumerBIC": "RABONL2U", - }, + "validationErrors": [], }, ], - "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: @@ -1873,60 +1862,62 @@ 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: - - Order Creation v2.0 + - Order Creation v2 summary: Delete an existing order. description: Delete an existing order. 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: @@ -1947,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: @@ -1957,16 +1948,15 @@ 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, - "productId": 2, + "productId": 2, "quantity": 1, "validFrom": "2024-03-22T09:00:00", "validUntil": null, - "orderLineStatusId": 1, "createdOn": "2024-03-22T09:00:00", "customerTokens": [ @@ -1974,16 +1964,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, @@ -2002,7 +1992,7 @@ paths: "validUntil": "2025-03-22T09:00:00", "orderLineStatusId": 4, "createdOn": "2024-03-22T09:00:00", - "customerTokens": + "tokens": [ { "tokenTypeId": 1, @@ -2040,207 +2030,179 @@ 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": + "order": { - "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, + "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": [ { - "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" }, + "customerTokens": + [ + { + "customerTokenId": "878ad7c1-cd8f-4bcf-a983-1bd8c6e6975e", + "tokenTypeId": 1, + "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, + "additionalRemarks": + [ + { + "code": "MANDATE_REQUIRED", + "parameter": "directDebitMandateId", + }, + ], + "validationErrors": [], + }, + { + "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" }, + "customerTokens": + [ + { + "customerTokenId": "878ad7c1-cd8f-4bcf-a983-1bd8c6e6975e", + "tokenTypeId": 1, + "ovPayTokenId": 4, + "serviceReferenceId": null, + "amount": null, + "ovpasNumber": null, + "verificationCode": null, + "personalAccountData": null, + }, + ], + "orderAccountingStatuses": [], + "validationResult": true, + "additionalRemarks": [], + "validationErrors": [], + }, + ], + "payments": [], + "orderCustomer": null, + }, } 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: @@ -2261,7 +2223,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: @@ -2271,17 +2233,17 @@ 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, "validFrom": "2024-03-25T09:00:00", - "validUntil": null + "validUntil": null, } v1.2: - summary: Orderline updatev1.2 - description: Orderline update v1.2 + summary: Orderline update v1.2 + description: Orderline update v1.2 value: { "taxAmount": 21, @@ -2300,7 +2262,7 @@ paths: application/json: schema: $ref: "#/components/schemas/unavailable" - examples: + examples: v2.0: value: { @@ -2309,14 +2271,6 @@ paths: "orderNumber": "ORD-123456", "customerProfileId": 1337, "totalAmount": 121, - "language": { - "languageId": 1, - "name": "Nederlands", - "iso639Code": "nl-NL", - "ietfCode": "nl" - }, - "billingAddressId": 1, - "shippingAddressId": 1, "touchPoint": { "salesTouchpointId": 3, @@ -2324,16 +2278,26 @@ paths: "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_OrderStatuses": [ { "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": [ @@ -2359,10 +2323,12 @@ 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, @@ -2370,102 +2336,63 @@ 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", - } - } - ], - "additionalRemarks" : - [ - { - "code": "MANDATE_REQUIRED", - "parameter": "directDebitMandateId" - } - ] - }, - ], - "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", - }, + "orderAccountingStatuses": [], + "validationResult": true, + "additionalRemarks": + [ + { + "code": "MANDATE_REQUIRED", + "parameter": "directDebitMandateId", + }, + ], + "validationErrors": [], }, ], - "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: { "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: - - Order Creation v2.0 + - Order Creation v2 summary: Delete an existing order line. description: Delete an existing order line. responses: @@ -2475,7 +2402,7 @@ paths: application/json: schema: $ref: "#/components/schemas/unavailable" - example: + examples: v2.0: value: { @@ -2484,14 +2411,6 @@ paths: "orderNumber": "ORD-123456", "customerProfileId": 1337, "totalAmount": 0, - "language": { - "languageId": 1, - "name": "Nederlands", - "iso639Code": "nl-NL", - "ietfCode": "nl" - }, - "billingAddressId": 1, - "shippingAddressId": 1, "touchPoint": { "salesTouchpointId": 3, @@ -2499,60 +2418,52 @@ paths: "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_OrderStatuses": [ { "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, - "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": + "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: @@ -2573,7 +2484,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: @@ -2582,9 +2493,9 @@ paths: schema: $ref: "#/components/schemas/unavailable" examples: - v2.0: - summary: Order creation v2.0 - description: Order creation v2.0 + v2.0: + summary: Add a payment v2.0 + description: Add a payment v2.0 value: { "createdOn": "2024-03-22T09:00:00", @@ -2592,30 +2503,13 @@ 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: + v1.2: summary: Order creation v1.2 - description: Order creation v1.2 + description: Order creation v1.2 value: { "createdOn": "2024-03-22T09:00:00", @@ -2632,7 +2526,7 @@ paths: "statusCode": "190", "statusDescription": "Success", "statusSubCode": "S001", - "statusSubDescription": "PaymentSuccessFul", + "statusSubDescription": "PaymentSuccessful", }, ], "mandateInput": @@ -2661,14 +2555,6 @@ paths: "orderNumber": "ORD-123456", "customerProfileId": 1337, "totalAmount": 121, - "language": { - "languageId": 1, - "name": "Nederlands", - "iso639Code": "nl-NL", - "ietfCode": "nl" - }, - "billingAddressId": 1, - "shippingAddressId": 1, "touchPoint": { "salesTouchpointId": 3, @@ -2676,16 +2562,33 @@ paths: "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_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": { "orderStatusId": 1, "name": "concept" }, + "orderStatus": + { "orderStatusId": 1, "name": "concept" }, "createdOn": "2024-03-22T09:00:00", "description": "Order is aangemaakt", - } + }, ], "orderLines": [ @@ -2711,10 +2614,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, @@ -2722,16 +2627,25 @@ 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, + "additionalRemarks": [], + "validationErrors": [], + }, { "orderLineId": "2cb04b38-e9a8-465a-a273-261c55a21b71", "externalOrderLineId": null, @@ -2754,74 +2668,88 @@ 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 , - "ovpasNumber": null , - "verificationCode": null , - "personalAccountData": null - } - ] - } - ], + "amount": null, + "ovpasNumber": null, + "verificationCode": null, + "personalAccountData": null, + }, + ], + "orderAccountingStatuses": [], + "validationResult": true, + "additionalRemarks": [], + "validationErrors": [], + }, + ], "payments": [ { + "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", + "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", "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 @@ -2841,7 +2769,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: @@ -2851,8 +2779,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", @@ -2864,7 +2792,7 @@ paths: "statusCode": "190", "statusDescription": "Success", "statusSubCode": "S001", - "statusSubDescription": "PaymentSuccessFul", + "statusSubDescription": "PaymentSuccessful", }, ], "mandateInput": @@ -2875,11 +2803,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,25 +2829,33 @@ paths: "orderNumber": "ORD-123456", "customerProfileId": 1337, "totalAmount": 121, - "language": { + "touchPoint": + { + "salesTouchpointId": 3, + "name": "Website (Perplex)", + "isActive": true, + "retailerId": 1001, + }, + "language": + { "languageId": 1, "name": "Nederlands", "iso639Code": "nl-NL", - "ietfCode": "nl" - }, + "ietfCode": "nl", + }, "billingAddressId": 1, "shippingAddressId": 1, - "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", - "orderStatus": { "orderStatusId": 1, "name": "concept" }, + "orderStatus": + { "orderStatusId": 1, "name": "concept" }, "createdOn": "2024-03-22T09:00:00", "description": "Order is aangemaakt", - } + }, ], "orderLines": [ @@ -2945,10 +2881,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, @@ -2956,30 +2894,60 @@ 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, + "additionalRemarks": [], + "validationErrors": [], + }, + ], "payments": [ { + "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", "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", @@ -2987,15 +2955,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", @@ -3004,30 +2974,230 @@ 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", "postalCode": "2595 AA", "city": "Den Haag", "country": "NL", - } - ] - } + }, + ], + }, } v1.2: + value: { "paymentId": "94270188-4cf6-447e-bd49-e8186bcec073" } + v9.9 (Nick Pows): value: - { "paymentId": "94270188-4cf6-447e-bd49-e8186bcec073" } + { + "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": "0211f11b-270e-43f2-8ecc-3fe85773a0a2", + "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": "2024-03-22T09:00:00", + "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": + [ + { + "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": + [ + { + "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 @@ -3047,7 +3217,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: @@ -3057,8 +3227,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", @@ -3080,8 +3250,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", @@ -3118,14 +3288,6 @@ paths: "orderNumber": "ORD-123456", "customerProfileId": 1337, "totalAmount": 121, - "language": { - "languageId": 1, - "name": "Nederlands", - "iso639Code": "nl-NL", - "ietfCode": "nl" - }, - "billingAddressId": 1, - "shippingAddressId": 1, "touchPoint": { "salesTouchpointId": 3, @@ -3133,16 +3295,26 @@ paths: "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_OrderStatuses": [ { "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": [ @@ -3168,10 +3340,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, @@ -3179,42 +3353,56 @@ 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", }, }, ], - } - ], - "payments": null, - "customer": + "orderAccountingStatuses": [], + "validationResult": true, + "additionalRemarks": [], + "validationErrors": [], + }, + ], + "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", "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: @@ -3234,7 +3422,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: @@ -3244,9 +3432,9 @@ paths: $ref: "#/components/schemas/unavailable" examples: v2.0: - summary: Order customer update v2.0 - description: Order customer update v2.0 - value: + summary: Update order customer v2.0 + description: Update order customer v2.0 + value: { "birthname": "Jan", "surname": "Vries", @@ -3255,9 +3443,9 @@ paths: "dateOfBirth": "1970-01-01", } v1.2: - summary: Order customer update v1.2 - description: Order customer update v1.2 - value: + summary: Update order customer v1.2 + description: Update order customer v1.2 + value: { "birthname": "Jan", "surname": "Vries", @@ -3281,14 +3469,6 @@ paths: "orderNumber": "ORD-123456", "customerProfileId": 1337, "totalAmount": 121, - "language": { - "languageId": 1, - "name": "Nederlands", - "iso639Code": "nl-NL", - "ietfCode": "nl" - }, - "billingAddressId": 1, - "shippingAddressId": 1, "touchPoint": { "salesTouchpointId": 3, @@ -3296,16 +3476,26 @@ paths: "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_OrderStatuses": [ { "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": [ @@ -3331,10 +3521,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, @@ -3342,43 +3534,56 @@ 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", }, }, - ], - "additionalRemarks" : [] - } + ], + "orderAccountingStatuses": [], + "validationResult": true, + "additionalRemarks": [], + "validationErrors": [], + }, ], - "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", "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: @@ -3398,7 +3603,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: @@ -3408,9 +3613,22 @@ 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: + description: Order customer address create v1.2 + value: { "addressTypeId": 1, "street": "Kon. Julianaplein", @@ -3436,14 +3654,6 @@ paths: "orderNumber": "ORD-123456", "customerProfileId": 1337, "totalAmount": 121, - "language": { - "languageId": 1, - "name": "Nederlands", - "iso639Code": "nl-NL", - "ietfCode": "nl" - }, - "billingAddressId": 2, - "shippingAddressId": 1, "touchPoint": { "salesTouchpointId": 3, @@ -3451,16 +3661,26 @@ paths: "isActive": true, "retailerId": 1001, }, + "language": + { + "languageId": 1, + "name": "Nederlands", + "iso639Code": "nl-NL", + "ietfCode": "nl", + }, + "billingAddressId": 2, + "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": { "orderStatusId": 1, "name": "concept" }, + "orderStatus": + { "orderStatusId": 1, "name": "concept" }, "createdOn": "2024-03-22T09:00:00", "description": "Order is aangemaakt", - } + }, ], "orderLines": [ @@ -3486,10 +3706,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, @@ -3497,46 +3719,57 @@ 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", }, }, - ], - "additionalRemarks" : + ], + "orderAccountingStatuses": [], + "validationResult": false, + "additionalRemarks": [ - { + { "code": "MANDATE_REQUIRED", - "parameter": "directDebitMandateId" - } - ] - } + "parameter": "directDebitMandateId", + }, + ], + "validationErrors": [], + }, ], - "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", "postalCode": "2595 AA", "city": "Den Haag", "country": "NL", - } - ] - } - } + }, + ], + }, + } /orderCustomerAddress/{orderCustomerAddressId}: patch: parameters: @@ -3556,7 +3789,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: @@ -3566,9 +3799,9 @@ paths: $ref: "#/components/schemas/unavailable" examples: v2.0: - summary: Order customer address create v1.2 - description: Order customer address create v1.2 - value: + summary: Update order customer address v2.0 + description: Update order customer address v2.0 + value: { "addressTypeId": 1, "street": "Kon. Julianaplein", @@ -3594,14 +3827,6 @@ paths: "orderNumber": "ORD-123456", "customerProfileId": 1337, "totalAmount": 121, - "language": { - "languageId": 1, - "name": "Nederlands", - "iso639Code": "nl-NL", - "ietfCode": "nl" - }, - "billingAddressId": 1, - "shippingAddressId": 1, "touchPoint": { "salesTouchpointId": 3, @@ -3609,16 +3834,26 @@ paths: "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_OrderStatuses": [ { "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": [ @@ -3644,10 +3879,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, @@ -3655,51 +3892,62 @@ 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", }, }, - ], - "additionalRemarks" : + ], + "orderAccountingStatuses": [], + "validationResult": false, + "additionalRemarks": [ - { + { "code": "MANDATE_REQUIRED", - "parameter": "directDebitMandateId" - } - ] - } + "parameter": "directDebitMandateId", + }, + ], + "validationErrors": [], + }, ], - "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": 101, "houseNumberSuffix": "a", "postalCode": "2595 AA", "city": "Den Haag", "country": "NL", - } - ] - } - } + }, + ], + }, + } delete: tags: - - Order Creation v2.0 - summary: Delete an existing order address - description: Delete an existing order address + - Order Creation v2 + summary: Delete an existing order address. + description: Delete an existing order address. parameters: - in: path name: orderCustomerAddressId @@ -3732,14 +3980,6 @@ paths: "orderNumber": "ORD-123456", "customerProfileId": 1337, "totalAmount": 0, - "language": { - "languageId": 1, - "name": "Nederlands", - "iso639Code": "nl-NL", - "ietfCode": "nl" - }, - "billingAddressId": 1, - "shippingAddressId": 1, "touchPoint": { "salesTouchpointId": 3, @@ -3747,49 +3987,61 @@ paths: "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_OrderStatuses": [ { "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, - "customer": + "orderLines": [], + "payments": [], + "orderCustomer": { + "orderCustomerId": "94270188-4cf6-447e-bd49-e8186bcec073", "birthname": "Jan", "surname": "Vries", "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: