diff --git a/src/openapi/fiko/fiko-crud.yaml b/src/openapi/fiko/fiko-crud.yaml index 59068c9..1fdd3fe 100644 --- a/src/openapi/fiko/fiko-crud.yaml +++ b/src/openapi/fiko/fiko-crud.yaml @@ -278,7 +278,7 @@ paths: { "processingFailureId": "afce35b2-1dff-4ace-98d0-4b9ac405c87d", } - /transactionitems/{transactionItemId}/transactionaudittrail: + /transactionitems/{transactionItemId}/transactionaudittrails: parameters: - in: path name: transactionItemId @@ -288,30 +288,6 @@ paths: 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 v2 - 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. @@ -342,6 +318,86 @@ paths: { "transactionAuditTrailId": "afce35b2-1dff-4ace-98d0-4b9ac405c87d", } + /transactionaudittrails: + get: + summary: Find audit trail entries. + description: Find audit trail entries. + tags: + - Audit Trail v2 + parameters: + - in: query + name: transactionAuditTrailId + schema: + type: string + format: uuid + example: 498e11fd-86c7-4e26-8ca9-c5ed9049da9e + required: true + description: The id of the audit trail. + - in: query + name: transactionItemId + schema: + type: string + format: uuid + example: 9834b346-d68c-438d-9bd5-6716422c2657 + required: true + description: The id of the transaction item. + - in: query + name: user + schema: + type: string + example: fiko + description: The user who created the audit trail. + - in: query + name: timestampBefore + schema: + type: string + example: 2022-01-01 00:00:00 + description: The timestamp before the event occured. + - in: query + name: timestampAfter + schema: + type: string + example: 2022-01-01 00:00:00 + description: The timestamp after the event occured. + - in: query + name: action + schema: + type: array + items: + type: string + example: [created, succeeded, failed] + description: The action of the event. + - in: query + name: description + schema: + type: string + example: Transaction created. + description: The description of the event. + - in: query + name: correlationId + schema: + type: string + example: a3891560-3084-42cb-867c-f289e7cda47d + description: The correlation id of the event. + 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", + }, + ] /processingfailures: get: summary: Find processing failures. @@ -509,8 +565,8 @@ paths: { "productMetadataId": "39a87c2a-9011-4dfd-b35e-1245a98c2e61" } /contraaccountmetadata: get: - summary: Get contra account metadata. - description: Get contra account metadata. + summary: Find contra account metadata. + description: Find contra account metadata. tags: - Metadata v2 parameters: @@ -618,8 +674,8 @@ paths: } /taxmetadata: get: - summary: Get tax metadata. - description: Get tax metadata. + summary: Find tax metadata. + description: Find tax metadata. tags: - Metadata v2 parameters: @@ -757,8 +813,8 @@ paths: { "taxMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf" } /sourcemetadata: get: - summary: Get source metadata. - description: Get source metadata. + summary: Find source metadata. + description: Find source metadata. tags: - Metadata v2 parameters: @@ -907,8 +963,8 @@ paths: { "sourceMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf" } /accountingperiodmetadata: get: - summary: Get accounting period metadata. - description: Get accounting period metadata. + summary: Find accounting period metadata. + description: Find accounting period metadata. tags: - Metadata v2 parameters: @@ -1004,8 +1060,8 @@ paths: } /concessionmetadata: get: - summary: Get concession metadata. - description: Get concession metadata. + summary: Find concession metadata. + description: Find concession metadata. tags: - Metadata v2 parameters: @@ -1020,8 +1076,10 @@ paths: - in: query name: concessionId schema: - type: integer - example: 1 + type: array + items: + type: integer + example: [1, 2] description: The id of the concession. - in: query name: percentage @@ -1046,14 +1104,14 @@ paths: [ { "concessionMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf", - "concession": { "concessionId": 1, "name": "RAIL" }, + "concession": { "concessionId": 1, "name": "rail" }, "percentage": 84.021, "validFrom": "2024-01-01T00:00:00.000", "validUntil": null, }, { "concessionMetadataId": "5ac3a5a8-4b9b-4a6a-9b1f-86ae8d6d4a9b", - "concession": { "concessionId": 2, "name": "BUS" }, + "concession": { "concessionId": 2, "name": "bus" }, "percentage": 15.979, "validFrom": "2024-01-01T00:00:00.000", "validUntil": null, @@ -1127,6 +1185,60 @@ paths: { "concessionMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf", } + /concessions: + get: + summary: Get all concessions. + description: Get all concessions. + tags: + - References v2 + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + [ + { + "concessionId": 1, + "name": "rail", + }, + { + "concessionId": 2, + "name": "bus", + }, + { + "concessionId": 3, + "name": "not_applicable", + }, + ] + /failurereasons: + get: + summary: Get all failure reasons. + description: Get all failure reasons. + tags: + - References v2 + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + [ + { + "failureReasonId": 1, + "reasonCode": "002", + "reasonDesc": "Contra account does not exist" + }, + { + "failureReasonId": 2, + "reasonCode": "003", + "reasonDesc": "Accouting period closed" + }, + ] components: securitySchemes: bearerToken: