From a7793e7da6163a691ce059ec58570d77a6b44e3d Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Fri, 11 Oct 2024 13:58:05 +0200 Subject: [PATCH] DHIL-3364 - Added externalOrderId and externalOrderLineId. --- src/openapi/fiko/fiko-crud.yaml | 410 +++++++++++++++++++++++++++- src/openapi/orders/orders-crud.yaml | 24 ++ 2 files changed, 432 insertions(+), 2 deletions(-) diff --git a/src/openapi/fiko/fiko-crud.yaml b/src/openapi/fiko/fiko-crud.yaml index 69b8e1c..3b807a8 100644 --- a/src/openapi/fiko/fiko-crud.yaml +++ b/src/openapi/fiko/fiko-crud.yaml @@ -1,8 +1,8 @@ openapi: "3.0.3" info: - title: ABT Contracts CRUD APIs + title: ABT FIKO CRUD APIs version: "1.0" - description: CRUD APIs for ABT Contract database. These are NOT the functional APIs from Service Engine. + description: CRUD APIs for ABT FIKO database. servers: - url: https://api.integratielaag.nl/v1 paths: @@ -221,6 +221,412 @@ paths: $ref: "#/components/schemas/unavailable" example: { "transactionItemId": "d667d293-aa82-4c9e-9b10-77cffc9058a1" } + /transactionItems/{transactionItemId}/processingfailures: + parameters: + - in: path + name: transactionItemId + schema: + type: string + format: uuid + example: 9834b346-d68c-438d-9bd5-6716422c2657 + required: true + description: The id of the transaction item to process. + post: + summary: Add a processing failure. + description: Add a processing failure. + tags: + - Failures + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "department": "900", + "costCenter": "84955", + "costType": "619031", + "documentDate": "2022-01-01", + "documentCode": "VERK_FACTUUR", + "accountingPeriod": "2024/10", + "transactionDescription": "Dagkaart", + "contraAccount": "220.10419", + "status": "open", + "occurence": 1, + "processingFailureInstances": + [ + { + "processingFailureInstanceId": "9afa9a6b-5b6a-4b0a-9c9e-4b0a5b6a4b0a", + "processingFailureId": "c93a5b6a-5b6a-4b0a-9c9e-4b0a5b6a4b0a", + "timestamp": "2022-01-01 00:00:00", + "failureReason": "122be602-139d-49f5-b34f-1e3e2de29408", + "element": "costCenter", + "occurence": 1, + "change": "Adapt config", + }, + ], + } + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "processingFailureId": "afce35b2-1dff-4ace-98d0-4b9ac405c87d", + } + /transactionItems/{transactionItemId}/transactionAuditTrail: + parameters: + - in: path + name: transactionItemId + schema: + type: string + format: uuid + example: 9834b346-d68c-438d-9bd5-6716422c2657 + required: true + description: The id of the transaction item to process. + get: + summary: Get all audit trail entries for a transaction. + description: Get all audit trail entries for a transaction. + tags: + - Audit Trail + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + [ + { + "transactionAuditTrailId": "afce35b2-1dff-4ace-98d0-4b9ac405c87d", + "transactionItemId": "d667d293-aa82-4c9e-9b10-77cffc9058a1", + "user": "fiko", + "timestamp": "2022-01-01 00:00:00", + "action": "created", + "description": "Transaction created.", + "correlationId": "a3891560-3084-42cb-867c-f289e7cda47d", + }, + ] + post: + summary: Add an audit trail entry. + description: Add an audit trail entry. + tags: + - Audit Trail + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "user": "fiko", + "timestamp": "2022-01-01 00:00:00", + "action": "created", + "description": "Transaction created.", + "correlationId": "a3891560-3084-42cb-867c-f289e7cda47d", + } + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "transactionAuditTrailId": "afce35b2-1dff-4ace-98d0-4b9ac405c87d", + } + /processingfailures: + get: + summary: Find processing failures. + description: Find processing failures. + tags: + - Failures + parameters: + - in: query + name: processingFailureId + schema: + type: string + format: uuid + example: 9834b346-d68c-438d-9bd5-6716422c2657 + description: The id of the processing failure. + - in: query + name: transactionItemId + schema: + type: string + format: uuid + example: 9834b346-d68c-438d-9bd5-6716422c2657 + description: The id of the transaction item. + - in: query + name: department + schema: + type: string + example: 900 + description: The department (element 1) of the processing failure. + - in: query + name: costCenter + schema: + type: string + example: 84955 + description: The cost center (element 3) of the processing failure. + - in: query + name: costType + schema: + type: string + example: 619031 + description: The cost type (element 2) of the processing failure. + - in: query + name: documentDate + schema: + type: string + format: date + example: 2024-10-04 + description: The document date of the processing failure. + - in: query + name: documentCode + schema: + type: string + example: VERK_FACTUUR + description: The document code of the processing failure. + - in: query + name: accountingPeriod + schema: + type: string + example: 2024/10 + description: The accounting period of the processing failure. + - in: query + name: transactionDescription + schema: + type: string + example: Dagkaart + description: The transaction description of the processing failure. + - in: query + name: contraAccount + schema: + type: string + example: 220.10419 + description: The contra account of the processing failure. + - in: query + name: status + schema: + type: array + items: + type: string + example: [open, rejected] + explode: false + description: The status of the processing failure. + - in: query + name: minOccurences + schema: + type: integer + example: 1 + description: Minimum number of occurences. + - in: query + name: maxOccurences + schema: + type: integer + example: 3 + description: Maximum number of occurences. + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + [ + { + "processingFailureId": "37a8095b-19db-498f-9349-5f37d21c5bdf", + "transactionItemId": "000dd413-2d19-47c0-a9db-9efbb6bc39a2", + "department": "900", + "costCenter": "84955", + "costType": "619031", + "documentDate": "2022-01-01", + "documentCode": "VERK_FACTUUR", + "accountingPeriod": "2024/10", + "transactionDescription": "Dagkaart", + "contraAccount": "220.10419", + "status": "open", + "occurence": 1, + "processingFailureInstances": + [ + { + "processingFailureInstanceId": "9afa9a6b-5b6a-4b0a-9c9e-4b0a5b6a4b0a", + "processingFailureId": "c93a5b6a-5b6a-4b0a-9c9e-4b0a5b6a4b0a", + "timestamp": "2022-01-01 00:00:00", + "failureReason": + { + "failureReasonId": "122be602-139d-49f5-b34f-1e3e2de29408", + "reasonCode": "1234ABCD", + "reasonDesc": "description", + }, + "element": "costCenter", + "occurence": 1, + "change": "Adapt config", + }, + ], + }, + ] + /productMetadata: + post: + summary: Add product metadata. + description: Add product metadata. + tags: + - Metadata + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "productCode": "4031", + "department": "900", + "costCenter": "84955", + "costType": "619031", + "description": "O4031_Reisproduct HTM 1 dag Anoniem", + "documentCode": "VERK_FACTUUR", + "timestampUpdated": "2022-01-01 00:00:00", + "validFrom": "2024-03-22T09:00:00", + "validUntil": null, + } + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "productMetadataId": "39a87c2a-9011-4dfd-b35e-1245a98c2e61", + } + /contraAccountMetadata: + get: + summary: Get contra account metadata. + description: Get contra account metadata. + tags: + - Metadata + parameters: + - in: query + name: contraAccountMetadataId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + description: The id of the contra account metadata. + - in: query + name: contraAccount + schema: + type: string + example: 220.10419 + description: The contra account. + - in: query + name: validFrom + schema: + type: string + format: date-time + example: 2024-03-22T09:00:00 + description: The valid from date of the metadata. + - in: query + name: validUntil + schema: + type: string + format: date-time + example: 2024-03-22T09:00:00 + description: The valid until date of the metadata. + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + [ + { + "contraAccountMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf", + "contraAccount": "220.10419", + "validFrom": "2024-03-22T09:00:00", + "validUntil": null, + } + ] + post: + summary: Add contra account metadata. + description: Add contra account metadata. + tags: + - Metadata + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "contraAccount": "220.10419", + "validFrom": "2024-03-22T09:00:00", + "validUntil": null, + } + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "contraAccountMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf", + } + /contraAccountMetadata/{contraAccountMetadataId}: + parameters: + - in: path + name: contraAccountMetadataId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: true + description: The id of the contra account metadata. + patch: + summary: Update contra account metadata. + description: Update contra account metadata. + tags: + - Metadata + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "contraAccount": "220.10419", + "validFrom": "2024-03-22T09:00:00", + "validUntil": null, + } + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "contraAccountMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf", + } + /taxMetadata: + components: securitySchemes: bearerToken: diff --git a/src/openapi/orders/orders-crud.yaml b/src/openapi/orders/orders-crud.yaml index 8e6e734..3861a5e 100644 --- a/src/openapi/orders/orders-crud.yaml +++ b/src/openapi/orders/orders-crud.yaml @@ -13,6 +13,14 @@ paths: summary: P1. Find orders. description: Find orders. parameters: + - in: query + name: externalOrderId + schema: + type: string + format: uuid + example: 26ce08bc-0443-465f-9cd2-a7143f33eed0 + required: false + description: The order id in the external system. - in: query name: orderNumber schema: @@ -116,6 +124,7 @@ paths: [ { "orderId": "afce35b2-1dff-4ace-98d0-4b9ac405c87d", + "externalOrderId": "bac3958b-804a-43e3-b5f7-0b0fffaae5b7", "orderNumber": "123456", "customerProfileId": 1337, "totalAmount": 121, @@ -143,6 +152,7 @@ paths: [ { "orderLineId": "7a7a9d1a-3fc8-4058-a28b-082860aaa311", + "externalOrderLineId": "f5fddff0-7fbd-4285-bccb-e584f431ea69", "productId": 1, "productName": "HTM Maandkorting 20%", "productCode": "HTM-MND-20", @@ -295,6 +305,7 @@ paths: $ref: "#/components/schemas/unavailable" example: { + "externalOrderId": "bac3958b-804a-43e3-b5f7-0b0fffaae5b7", "orderNumber": "123456", "customerProfileId": 1337, "totalAmount": 121, @@ -312,6 +323,7 @@ paths: "orderLines": [ { + "externalOrderLineId": "f5fddff0-7fbd-4285-bccb-e584f431ea69", "productId": 1, "productName": "HTM Maandkorting 20%", "productCode": "HTM-MND-20", @@ -441,6 +453,7 @@ paths: example: { "orderId": "afce35b2-1dff-4ace-98d0-4b9ac405c87d", + "externalOrderId": "f5fddff0-7fbd-4285-bccb-e584f431ea69", "orderNumber": "123456", "customerProfileId": 1337, "totalAmount": 121, @@ -467,6 +480,7 @@ paths: [ { "orderLineId": "7a7a9d1a-3fc8-4058-a28b-082860aaa311", + "externalOrderLineId": "f5fddff0-7fbd-4285-bccb-e584f431ea69", "productId": 1, "productName": "HTM Maandkorting 20%", "productCode": "HTM-MND-20", @@ -683,6 +697,7 @@ paths: $ref: "#/components/schemas/unavailable" example: { + "externalOrderLineId": "f5fddff0-7fbd-4285-bccb-e584f431ea69", "productId": 1, "productName": "HTM Maandkorting 20%", "productCode": "HTM-MND-20", @@ -857,6 +872,14 @@ paths: example: 4ea492ff-8ffc-4a4e-901e-59f05e854285 required: false description: The id of the order line. + - in: query + name: externalOrderLineId + schema: + type: string + format: uuid + example: 4e333615-6ecd-4b68-a4f8-4f66f6af9be1 + required: false + description: The id of the order line in the external system. - in: query name: productId schema: @@ -999,6 +1022,7 @@ paths: { "orderLineId": "7a7a9d1a-3fc8-4058-a28b-082860aaa311", "orderId": "7ec1c3ae-0112-4aaf-adb9-c2436234fec6", + "externalOrderLineId": "4e333615-6ecd-4b68-a4f8-4f66f6af9be1", "productId": 1, "productName": "HTM Maandkorting 20%", "productCode": "HTM-MND-20",