diff --git a/src/openapi/orders/orders-crud.yaml b/src/openapi/orders/orders-crud.yaml index fba9e39..a095c3c 100644 --- a/src/openapi/orders/orders-crud.yaml +++ b/src/openapi/orders/orders-crud.yaml @@ -616,6 +616,44 @@ paths: schema: $ref: "#/components/schemas/unavailable" example: { "orderId": "afce35b2-1dff-4ace-98d0-4b9ac405c87d" } + /orders/{orderId}/statuses: + parameters: + - in: path + name: orderId + schema: + type: string + format: uuid + example: d1dd439b-6072-4b97-89c9-724268865b93 + required: true + description: The id of the order to process. + post: + summary: Add an order status. + description: Add an order status. + tags: + - Order + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "orderStatusId": 1, + "createdOn": "2024-03-22T09:00:00", + "description": "Order verzonden", + } + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "order_orderStatusId": "b9cf0096-4211-4be6-ac21-7bc34bc8e066", + } + /orders/{orderId}/orderlines: parameters: - in: path @@ -694,6 +732,64 @@ paths: schema: $ref: "#/components/schemas/unavailable" example: { "orderLineId": "1e441d7d-50d6-4006-aca7-5e87e2f218df" } + /orders/{orderId}/payments: + parameters: + - in: path + name: orderId + schema: + type: string + format: uuid + example: d1dd439b-6072-4b97-89c9-724268865b93 + required: true + description: The id of the order to process. + post: + summary: Add one or more payments to an order. + description: Add one or more payments to an order. + tags: + - Payment + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + [ + { + "createdOn": "2024-03-22T09:00:00", + "amountDebit": 121, + "paymentMethodId": 1, + "touchPointId": 1, + "isRefund": false, + "htmPaymentReference": "HTM-1234", + "pspPaymentReference": "Buckaroo-1234", + "paymentStatuses": + [ + { + "createdOn": "2024-03-22T09:00:00", + "statusCode": "190", + "statusDescription": "Success", + "statusSubCode": "S001", + "statusSubDescription": "PaymentSuccessFul", + }, + ], + "mandateInput": + { + "mandateTypeId": 1, + "createdOn": "2024-03-22T09:00:00", + "bic": "RABONL2U", + "iban": "NL44RABO0123456789", + "ascription": "J. de Vries", + }, + }, + ] + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: { "paymentId": "dfae0f6f-95f0-4eac-ab1a-36ffe1f31aac" } /orderlines: get: summary: Find order lines. @@ -848,6 +944,7 @@ paths: [ { "orderLineId": "7a7a9d1a-3fc8-4058-a28b-082860aaa311", + "orderId": "7ec1c3ae-0112-4aaf-adb9-c2436234fec6", "externalOrderLineId": "2ba39cae-c401-446b-ae5c-2d6d85b3df1f", "productId": 1, "productName": "HTM Maandkorting 20%", @@ -934,6 +1031,188 @@ paths: schema: $ref: "#/components/schemas/unavailable" example: { "orderLineId": "ee82686a-a9f6-4888-b336-8e2aab6f4e13" } + /payments: + get: + summary: Find payments. + description: Find payments. + tags: + - Payment + parameters: + - in: query + name: paymentId + schema: + type: string + format: uuid + example: 4ea492ff-8ffc-4a4e-901e-59f05e854285 + required: false + description: The id of the payment. + - in: query + name: orderId + schema: + type: string + format: uuid + example: 292e5f86-cefc-4224-9506-d204ed3a426f + required: false + description: The id of the order where the payment belongs to. + - in: query + name: createdBefore + schema: + type: string + format: date-time + example: 2024-03-22T09:00:00 + required: false + description: Timestamp before which the payment should have been created. + - in: query + name: createdAfter + schema: + type: string + format: date-time + example: 2024-03-22T09:00:00 + required: false + description: Timestamp after which the payment should have been created. + - in: query + name: amountDebit + schema: + type: integer + example: 100 + required: false + description: The amount of debit to pay. + - in: query + name: paymentMethodId + schema: + type: integer + example: 1 + required: false + description: The technical id of the payment method used to pay. + - in: query + name: touchPointId + schema: + type: integer + example: 1 + required: false + description: The id of the touch point where the payment was initiated. + - in: query + name: isRefund + schema: + type: boolean + example: false + required: false + description: If the payment concerns a refund or not. + - in: query + name: htmPaymentReference + schema: + type: string + example: HTM-1234 + required: false + description: The payment reference on HTM side. + - in: query + name: pspPaymentReference + schema: + type: string + example: Buckaroo-1234 + required: false + description: The payment reference on PSP side. + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + [ + { + "paymentId": "3ba4a3c7-0803-4214-800b-365851b8903d", + "orderId": "afa89108-3e40-44ac-8bea-7c7f0f2d4006", + "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", + "mandateType": { "mandateTypeId": 1, "name": "import" }, + "createdOn": "2024-03-22T09:00:00", + "bic": "RABONL2U", + "iban": "NL44RABO0123456789", + "ascription": "J. de Vries", + }, + }, + ] + /payments/{paymentId}: + patch: + summary: Update a payment. + description: Update a payment. + tags: + - Payment + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "htmPaymentReference": "HTM-1234", + "pspPaymentReference": "Buckaroo-1234", + } + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: { "paymentId": "dbbc3913-414e-4528-9c95-6c11a11e04ac" } + /payments/{paymentId}/paymentstatuses: + post: + summary: Add a payment status. + description: Add a payment status. + tags: + - Payment + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "createdOn": "2024-03-22T09:00:00", + "statusCode": "190", + "statusDescription": "Success", + "statusSubCode": "S001", + "statusSubDescription": "PaymentSuccessFul", + } + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "paymentId": "f3919c07-8fa1-4ff4-a4a6-8f99106b9129", + "paymentStatusId": 2, + } components: securitySchemes: bearerToken: