diff --git a/src/openapi/contracts/contracts-crud.yaml b/src/openapi/contracts/contracts-crud.yaml index ac961e4..09e1de6 100644 --- a/src/openapi/contracts/contracts-crud.yaml +++ b/src/openapi/contracts/contracts-crud.yaml @@ -216,6 +216,7 @@ paths: "created": "2024-06-02 15:01:00.000", "updated": "2024-06-02 15:01:00.000", "state": "invoice_created", + "isCredit": false, }, { "contractInvoiceId": "1c345237-4d84-47f0-93c2-7b94338e3355", @@ -224,6 +225,7 @@ paths: "created": "2024-07-02 15:01:00.000", "updated": "2024-07-02 15:01:00.000", "state": "invoice_created", + "isCredit": false, }, ], "contractVersions": @@ -273,6 +275,7 @@ paths: "created": "2024-06-02 15:01:00.000", "updated": "2024-06-02 15:01:00.000", "state": "invoice_created", + "isCredit": false, }, { "contractInvoiceId": "1c345237-4d84-47f0-93c2-7b94338e3355", @@ -281,6 +284,7 @@ paths: "created": "2024-07-02 15:01:00.000", "updated": "2024-07-02 15:01:00.000", "state": "invoice_created", + "isCredit": false, }, ], "contractVersions": @@ -401,6 +405,7 @@ paths: "updated": "2024-07-02 15:01:00.000", "state": "invoice_created", "data": "{json}", + "isCredit": false, }, ], }, @@ -568,6 +573,7 @@ paths: "updated": "2024-07-02 15:01:00.000", "state": "invoice_sent", "data": "{json}", + "isCredit": false, }, { "contractInvoiceId": "dadff658-4ff5-4eb8-b516-492f1f6c6245", @@ -577,6 +583,7 @@ paths: "updated": "2024-08-02 15:01:00.000", "state": "invoice_created", "data": "{json}", + "isCredit": false, }, ], } @@ -600,6 +607,7 @@ paths: "updated": "2024-07-02 15:01:00.000", "state": "invoice_created", "data": "{json}", + "isCredit": false, }, } responses: @@ -684,6 +692,13 @@ paths: example: created required: false description: Invoice state. + - in: query + name: isCredit + schema: + type: boolean + example: false + required: false + description: Whether the invoice is a credit invoice. responses: "200": description: OK @@ -704,6 +719,7 @@ paths: "updated": "2024-06-02 15:01:00.000", "state": "invoice_created", "data": "{json}", + "isCredit": false, }, { "contractId": "a7452e22-3894-40cc-87d6-869370a92277", @@ -714,6 +730,7 @@ paths: "updated": "2024-08-02 15:01:00.000", "state": "invoice_created", "data": "{json}", + "isCredit": false, }, ], } @@ -1049,6 +1066,9 @@ components: type: string format: json example: { json } + isCredit: + type: boolean + example: false ContractStatus: type: object properties: diff --git a/src/openapi/fiko/fiko-crud.yaml b/src/openapi/fiko/fiko-crud.yaml index 74a019d..a821dcb 100644 --- a/src/openapi/fiko/fiko-crud.yaml +++ b/src/openapi/fiko/fiko-crud.yaml @@ -13,6 +13,13 @@ paths: tags: - Transactions v2 parameters: + - in: query + name: transactionItemId + schema: + type: string + format: uuid + example: 75174a9d-fff4-4682-b66b-ebd93cbe7ea3 + description: The id of the transaction item. - in: query name: sourceName schema: @@ -166,36 +173,6 @@ paths: example: 9834b346-d68c-438d-9bd5-6716422c2657 required: true description: The id of the transaction item. - get: - summary: Get a single transaction item. - description: Get a single transaction item. - tags: - - Transactions v2 - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/unavailable" - example: - { - "transactionItemId": "afce35b2-1dff-4ace-98d0-4b9ac405c87d", - "sourceName": "Verkoopengine", - "transactionId": "1001236", - "transactionLineId": "1", - "name": "HTM Maandkorting 20%", - "quantity": 1, - "taxCode": "V21", - "amountExclTax": 100, - "amountInclTax": 121, - "amountTax": 21, - "occurredOn": "2024-10-04T00:00:00Z", - "type": "debit", - "productCode": "HTM-MND-20", - "aggregationReference": "FIKO-123456", - "accountingSystemReference": "U4F-123456", - } patch: summary: Update a transaction item. description: Update a transaction item. @@ -221,7 +198,7 @@ paths: $ref: "#/components/schemas/unavailable" example: { "transactionItemId": "d667d293-aa82-4c9e-9b10-77cffc9058a1" } - /transactionItems/{transactionItemId}/processingfailures: + /transactionitems/{transactionItemId}/processingfailures: parameters: - in: path name: transactionItemId @@ -278,7 +255,7 @@ paths: { "processingFailureId": "afce35b2-1dff-4ace-98d0-4b9ac405c87d", } - /transactionItems/{transactionItemId}/transactionAuditTrail: + /transactionitems/{transactionItemId}/transactionaudittrails: parameters: - in: path name: transactionItemId @@ -288,30 +265,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 +295,84 @@ 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 + description: The id of the audit trail. + - 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: 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. @@ -463,7 +494,7 @@ paths: "timestamp": "2022-01-01 00:00:00", "failureReason": { - "failureReasonId": "122be602-139d-49f5-b34f-1e3e2de29408", + "failureReasonId": 12, "reasonCode": "1234ABCD", "reasonDesc": "description", }, @@ -474,7 +505,273 @@ paths: ], }, ] - /productMetadata: + /processingfailures/{processingFailureId}: + parameters: + - in: path + name: processingFailureId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: true + description: The id of the processing failure. + patch: + summary: Update processing failure. + description: Update processing failure. + tags: + - Failures v2 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: { "status": "open", "occurence": 2 } + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "processingFailureId": "37a8095b-19db-498f-9349-5f37d21c5bdf", + } + /processingfailures/{processingFailureId}/processingfailureinstances: + parameters: + - in: path + name: processingFailureId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: true + description: The id of the processing failure. + post: + summary: Add a processing failure instance to a processing failure. + description: Add a processing failure instance to a processing failure. + tags: + - Failures v2 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "timestamp": "2022-01-01 00:00:00", + "failureReasonId": 12, + "element": "costCenter", + "occurence": 1, + "change": "Adapt config", + } + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "processingFailureInstanceId": "9afa9a6b-5b6a-4b0a-9c9e-4b0a5b6a4b0a", + } + /processingfailureinstances/{processingFailureInstanceId}: + parameters: + - in: path + name: processingFailureInstanceId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: true + description: The id of the processing failure instance. + patch: + summary: Update processing failure instance. + description: Update processing failure instance. + tags: + - Failures v2 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "timestamp": "2022-01-01 00:00:00", + "occurence": 2, + "change": "Adapt config", + } + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "processingFailureInstanceId": "37a8095b-19db-498f-9349-5f37d21c5bdf", + } + /productmetadata: + get: + summary: Find product metadata. + description: Find product metadata. + tags: + - Metadata v2 + parameters: + - in: query + name: productMetadataId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + description: The id of the product metadata. + - in: query + name: productCode + schema: + type: string + example: 4031 + description: The product code. + - in: query + name: department + schema: + type: string + example: 900 + description: The department. + - in: query + name: costCenter + schema: + type: string + example: 84955 + description: The cost center. + - in: query + name: costType + schema: + type: string + example: 619031 + description: The cost type. + - in: query + name: description + schema: + type: string + example: O4031_Reisproduct HTM 1 dag Anoniem + description: The description. + - in: query + name: documentCode + schema: + type: string + example: VERK_FACTUUR + description: The document code. + - in: query + name: updatedBefore + schema: + type: string + example: 2022-01-01 00:00:00 + description: Timestamp that the metadata was updated before. + - in: query + name: updatedAfter + schema: + type: string + example: 2022-01-01 00:00:00 + description: Timestamp that the metadata was updated after. + - in: query + name: validAt + schema: + type: string + example: 2024-03-22T09:00:00 + description: Timestamp that the metadata is valid. + - in: query + name: contraAccountMetadataId + schema: + type: string + format: uuid + example: e0af8c8f-d421-4567-a14e-48e2a1bb86fb + description: Find product metadata that is linked to this contra account. + - in: query + name: concessionId + schema: + type: integer + example: 1 + description: Find product metadata that is linked to this concession. + - in: query + name: sourceMetadataId + schema: + type: string + format: uuid + example: 08d96f94-f468-467e-9068-c86c34f43097 + description: Find product metadata that is linked to this source metadata. + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "productMetadataId": "39a87c2a-9011-4dfd-b35e-1245a98c2e61", + "productCode": "4031", + "department": "900", + "costCenter": "84955", + "costType": "619031", + "description": "O4031_Reisproduct HTM 1 dag Anoniem", + "documentCode": "VERK_FACTUUR", + "timestampUpdated": "2022-01-01T00:00:00", + "validFrom": "2024-03-22T09:00:00", + "validUntil": null, + "productContraAccounts": + [ + { + "contraAccountMetadata": + { + "contraAccountMetadataId": "e0af8c8f-d421-4567-a14e-48e2a1bb86fb", + "contraAccount": "220.10419", + "validFrom": "2024-03-22T09:00:00", + "validUntil": null, + }, + "concession": { "concessionId": 2, "name": "bus" }, + "sourceMetadata": + { + "sourceMetadataId": "bc4ea24a-27a5-40e8-bbbc-57a105afaaa0", + "incomingName": "VerkoopEngine", + "incomingEntity": "OrderLine", + "outgoingName": "Website Verkopen", + "businessOwner": "Corneel Verstoep", + "rejectionProcessing": "system", + "rejectionInfo": "api.htm.nl/v2/account/12345/msgs/abc", + "validFrom": "2024-01-01T00:00:00.000", + "validUntil": null, + }, + "validFrom": "2024-03-22T09:00:00", + "validUntil": null, + }, + { + "contraAccountMetadata": + { + "contraAccountMetadataId": "69c562ca-5299-4585-ac92-46fb54aeb99e", + "contraAccount": "220.10538", + "validFrom": "2024-03-22T09:00:00", + "validUntil": null, + }, + "concession": { "concessionId": 1, "name": "bus" }, + "sourceMetadata": + { + "sourceMetadataId": "bc4ea24a-27a5-40e8-bbbc-57a105afaaa0", + "incomingName": "VerkoopEngine", + "incomingEntity": "OrderLine", + "outgoingName": "Website Verkopen", + "businessOwner": "Corneel Verstoep", + "rejectionProcessing": "system", + "rejectionInfo": "api.htm.nl/v2/account/12345/msgs/abc", + "validFrom": "2024-01-01T00:00:00.000", + "validUntil": null, + }, + "validFrom": "2024-03-22T09:00:00", + "validUntil": null, + }, + ], + } post: summary: Add product metadata. description: Add product metadata. @@ -497,6 +794,23 @@ paths: "timestampUpdated": "2022-01-01 00:00:00", "validFrom": "2024-03-22T09:00:00", "validUntil": null, + "productContraAccounts": + [ + { + "contraAccountMetadataId": "e0af8c8f-d421-4567-a14e-48e2a1bb86fb", + "concessionId": 1, + "sourceMetadataId": "08d96f94-f468-467e-9068-c86c34f43097", + "validFrom": "2024-03-22T09:00:00", + "validUntil": null, + }, + { + "contraAccountMetadataId": "02e458ce-f77a-4262-8b38-490e54f52856", + "concessionId": 2, + "sourceMetadataId": "08d96f94-f468-467e-9068-c86c34f43097", + "validFrom": "2024-03-22T09:00:00", + "validUntil": null, + }, + ], } responses: "201": @@ -507,10 +821,133 @@ paths: $ref: "#/components/schemas/unavailable" example: { "productMetadataId": "39a87c2a-9011-4dfd-b35e-1245a98c2e61" } - /contraAccountMetadata: + /productmetadata/{productMetadataId}: + parameters: + - in: path + name: productMetadataId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: true + description: The id of the product metadata. + patch: + summary: Update product metadata. + description: Update product metadata. + tags: + - Metadata v2 + 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: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { "productMetadataId": "39a87c2a-9011-4dfd-b35e-1245a98c2e61" } + /productcontraaccounts/{productContraAccountId}: + parameters: + - in: path + name: productContraAccountId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: true + description: The id of the product contra account. + patch: + summary: Update product contra account. + description: Update product contra account. + tags: + - Metadata v2 + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "contraAccountMetadataId": "e0af8c8f-d421-4567-a14e-48e2a1bb86fb", + "concessionId": 1, + "sourceMetadataId": "08d96f94-f468-467e-9068-c86c34f43097", + "validFrom": "2024-03-22T09:00:00", + "validUntil": null, + } + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "productContraAccountId": "39a87c2a-9011-4dfd-b35e-1245a98c2e61", + } + /productmetadata/{productMetadataId}/metadataaudittrails: + parameters: + - in: path + name: productMetadataId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: true + description: The id of the product metadata. + post: + summary: Add metadata audit trail. + description: Add metadata audit trail. + tags: + - Audit Trail v2 + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "user": "rmeeuws", + "timestamp": "2024-10-04T00:00:00", + "correlationId": "a03cd0c2-38b5-4619-b9e3-d6e5b842e127", + "metadataChanges": [ + { + "fieldName": "department", + "oldValue": "900", + "newValue": "999", + } + ] + } + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/postMetadataAuditTrailResponse" + /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: @@ -533,14 +970,7 @@ paths: 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. + description: Timestamp that the metadata is valid. responses: "200": description: OK @@ -585,7 +1015,7 @@ paths: { "contraAccountMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf", } - /contraAccountMetadata/{contraAccountMetadataId}: + /contraaccountmetadata/{contraAccountMetadataId}: parameters: - in: path name: contraAccountMetadataId @@ -623,10 +1053,51 @@ paths: { "contraAccountMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf", } - /taxMetadata: + /contraaccountmetadata/{contraAccountMetadataId}/metadataaudittrails: + 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. + post: + summary: Add metadata audit trail. + description: Add metadata audit trail. + tags: + - Audit Trail v2 + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "user": "rmeeuws", + "timestamp": "2024-10-04T00:00:00", + "correlationId": "a03cd0c2-38b5-4619-b9e3-d6e5b842e127", + "metadataChanges": [ + { + "fieldName": "contraAccountMetadataId", + "oldValue": "873810a3-a11a-4d4d-9af7-395520fa207c", + "newValue": "9a8eb116-5270-4ef9-81ef-fdc2e72c281a", + } + ] + } + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/postMetadataAuditTrailResponse" + /taxmetadata: get: - summary: Get tax metadata. - description: Get tax metadata. + summary: Find tax metadata. + description: Find tax metadata. tags: - Metadata v2 parameters: @@ -661,7 +1132,7 @@ paths: type: string format: date-time example: 2024-03-22T09:00:00 - description: Date that the tax metadata is valid. + description: Timestamp that the metadata is valid. responses: "200": description: OK @@ -724,7 +1195,7 @@ paths: $ref: "#/components/schemas/unavailable" example: { "taxMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf" } - /taxMetadata/{taxMetadataId}: + /taxmetadata/{taxMetadataId}: parameters: - in: path name: taxMetadataId @@ -762,6 +1233,696 @@ paths: $ref: "#/components/schemas/unavailable" example: { "taxMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf" } + /taxmetadata/{taxMetadataId}/metadataaudittrails: + parameters: + - in: path + name: taxMetadataId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: true + description: The id of the contra account metadata. + post: + summary: Add metadata audit trail. + description: Add metadata audit trail. + tags: + - Audit Trail v2 + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "user": "rmeeuws", + "timestamp": "2024-10-04T00:00:00", + "correlationId": "a03cd0c2-38b5-4619-b9e3-d6e5b842e127", + "metadataChanges": [ + { + "fieldName": "taxCode", + "oldValue": null, + "newValue": "V21", + } + ] + } + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/postMetadataAuditTrailResponse" + /sourcemetadata: + get: + summary: Find source metadata. + description: Find source metadata. + tags: + - Metadata v2 + parameters: + - in: query + name: sourceMetadataId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + description: The id of the source metadata. + - in: query + name: incomingName + schema: + type: string + example: VerkoopEngine + description: The name of the source. + - in: query + name: incomingEntity + schema: + type: string + example: OrderLine + description: The entity of the source. + - in: query + name: outgoingName + schema: + type: string + example: Website Verkopen + description: The name of the destination. + - in: query + name: businessOwner + schema: + type: string + example: Corneel Verstoep + description: The business owner of the source. + - in: query + name: rejectionProcessing + schema: + type: string + example: system + description: The rejection processing of the source. + - in: query + name: rejectionInfo + schema: + type: string + example: api.htm.nl/v2/account/12345/msgs/abc + description: The rejection info of the source. + - in: query + name: validAt + schema: + type: string + example: 2024-01-01T00:00:00.000 + description: Timestamp that the metadata is valid. + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + [ + { + "sourceMetadataId": "bc4ea24a-27a5-40e8-bbbc-57a105afaaa0", + "incomingName": "VerkoopEngine", + "incomingEntity": "OrderLine", + "outgoingName": "Website Verkopen", + "businessOwner": "Corneel Verstoep", + "rejectionProcessing": "system", + "rejectionInfo": "api.htm.nl/v2/account/12345/msgs/abc", + "validFrom": "2024-01-01T00:00:00.000", + "validUntil": null, + }, + ] + post: + summary: Add source metadata. + description: Add source metadata. + tags: + - Metadata v2 + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "incomingName": "VerkoopEngine", + "incomingEntity": "OrderLine", + "outgoingName": "Website Verkopen", + "businessOwner": "Corneel Verstoep", + "rejectionProcessing": "system", + "rejectionInfo": "api.htm.nl/v2/account/12345/msgs/abc", + "validFrom": "2024-03-22T09:00:00", + "validUntil": null, + } + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { "sourceMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf" } + /sourcemetadata/{sourceMetadataId}: + parameters: + - in: path + name: sourceMetadataId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: true + description: The id of the source metadata. + patch: + summary: Update source metadata. + description: Update source metadata. + tags: + - Metadata v2 + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "incomingName": "VerkoopEngine", + "incomingEntity": "OrderLine", + "outgoingName": "Website Verkopen", + "businessOwner": "Corneel Verstoep", + "rejectionProcessing": "system", + "rejectionInfo": "api.htm.nl/v2/account/12345/msgs/abc", + "validFrom": "2024-03-22T09:00:00", + "validUntil": null, + } + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { "sourceMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf" } + /sourcemetadata/{sourceMetadataId}/metadataaudittrails: + parameters: + - in: path + name: sourceMetadataId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: true + description: The id of the contra account metadata. + post: + summary: Add metadata audit trail. + description: Add metadata audit trail. + tags: + - Audit Trail v2 + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "user": "rmeeuws", + "timestamp": "2024-10-04T00:00:00", + "correlationId": "a03cd0c2-38b5-4619-b9e3-d6e5b842e127", + "metadataChanges": [ + { + "fieldName": "businessOwner", + "oldValue": "Corneel Verstoep", + "newValue": "Mark Verheij", + } + ] + } + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/postMetadataAuditTrailResponse" + /accountingperiodmetadata: + get: + summary: Find accounting period metadata. + description: Find accounting period metadata. + tags: + - Metadata v2 + parameters: + - in: query + name: accountingPeriodMetadataId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + description: The id of the accounting period metadata. + - in: query + name: accountingPeriod + schema: + type: string + example: 2024-01 + description: The accounting period. + - in: query + name: isOpen + schema: + type: boolean + example: true + description: Whether the accounting period is open. + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + [ + { + "accountingPeriodMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf", + "accountingPeriod": "2024-01", + "isOpen": true, + }, + ] + post: + summary: Add accounting period metadata. + description: Add accounting period metadata. + tags: + - Metadata v2 + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: { "accountingPeriod": "2024-01", "isOpen": true } + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "accountingPeriodMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf", + } + /accountingperiodmetadata/{accountingPeriodMetadataId}: + parameters: + - in: path + name: accountingPeriodMetadataId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: true + description: The id of the accounting period metadata. + patch: + summary: Update accounting period metadata. + description: Update accounting period metadata. + tags: + - Metadata v2 + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: { "accountingPeriod": "2024-01", "isOpen": true } + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "accountingPeriodMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf", + } + /accountingperiodmetadata/{accountingPeriodMetadataId}/metadataaudittrails: + parameters: + - in: path + name: accountingPeriodMetadataId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: true + description: The id of the contra account metadata. + post: + summary: Add metadata audit trail. + description: Add metadata audit trail. + tags: + - Audit Trail v2 + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "user": "rmeeuws", + "timestamp": "2024-10-04T00:00:00", + "correlationId": "a03cd0c2-38b5-4619-b9e3-d6e5b842e127", + "metadataChanges": [ + { + "fieldName": "isOpen", + "oldValue": "true", + "newValue": "false", + } + ] + } + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/postMetadataAuditTrailResponse" + /concessionmetadata: + get: + summary: Find concession metadata. + description: Find concession metadata. + tags: + - Metadata v2 + parameters: + - in: query + name: concessionMetadataId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + description: The id of the concession metadata. + - in: query + name: concessionId + schema: + type: array + items: + type: integer + example: [1, 2] + description: The id of the concession. + - in: query + name: percentage + schema: + type: number + example: 84.021 + description: The percentage of the concession. + - in: query + name: validAt + schema: + type: string + example: 2024-01-01T00:00:00.000 + description: Timestamp that the metadata is valid. + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + [ + { + "concessionMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf", + "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" }, + "percentage": 15.979, + "validFrom": "2024-01-01T00:00:00.000", + "validUntil": null, + }, + ] + post: + summary: Add concession metadata. + description: Add concession metadata. + tags: + - Metadata v2 + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "concessionId": 2, + "percentage": 15.979, + "validFrom": "2024-01-01T00:00:00.000", + "validUntil": null, + } + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "concessionMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf", + } + /concessionmetadata/{concessionMetadataId}: + parameters: + - in: path + name: concessionMetadataId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: true + description: The id of the concession metadata. + patch: + summary: Update concession metadata. + description: Update concession metadata. + tags: + - Metadata v2 + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "concessionId": 2, + "percentage": 15.979, + "validFrom": "2024-01-01T00:00:00.000", + "validUntil": null, + } + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "concessionMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf", + } + /concessionmetadata/{concessionMetadataId}/metadataaudittrails: + parameters: + - in: path + name: concessionMetadataId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: true + description: The id of the product metadata. + post: + summary: Add metadata audit trail. + description: Add metadata audit trail. + tags: + - Audit Trail v2 + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "user": "rmeeuws", + "timestamp": "2024-10-04T00:00:00", + "correlationId": "a03cd0c2-38b5-4619-b9e3-d6e5b842e127", + "metadataChanges": [ + { + "fieldName": "percentage", + "oldValue": null, + "newValue": "23.456", + }, + ], + } + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/postMetadataAuditTrailResponse" + /metadataaudittrails: + get: + summary: Find metadata audit trails. + description: Find metadata audit trails. + tags: + - Audit Trail v2 + parameters: + - in: query + name: metadataAuditTrailId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + description: The id of the metadata audit trail. + - in: query + name: productMetadataId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + description: The id of the product metadata. + - in: query + name: concessionMetadataId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + description: The id of the concession metadata. + - 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: taxMetadataId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + description: The id of the tax metadata. + - in: query + name: sourceMetadataId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + description: The id of the source metadata. + - in: query + name: accountingPeriodMetadataId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + description: The id of the accounting period metadata. + - in: query + name: user + schema: + type: string + example: rmeeuws + description: The username of the user. + - 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: 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: + { + "metadataAuditTrailId": "37a8095b-19db-498f-9349-5f37d21c5bdf", + "productMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf", + "concessionMetadataId": null, + "contraAccountMetadataId": null, + "taxMetadataId": null, + "sourceMetadataId": null, + "accountingPeriodMetadataId": null, + "user": "rmeeuws", + "timestamp": "2022-01-01 00:00:00", + "correlationId": "a3891560-3084-42cb-867c-f289e7cda47d", + "metadataChanges": + [ + { + "metadataChangesId": "43a481a7-0845-460f-b44a-b4112cc2e193", + "fieldName": "businessOwner", + "oldValue": "Corneel Verstoep", + "newValue": "Jan-Willem Vermeij", + }, + ], + } + /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: @@ -797,3 +1958,10 @@ components: example: - "/account/12345" - "/account/67890" + postMetadataAuditTrailResponse: + type: object + properties: + metadataAuditTrailId: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf diff --git a/src/openapi/orders/orders-crud.yaml b/src/openapi/orders/orders-crud.yaml index 69ecd1c..8ae1a81 100644 --- a/src/openapi/orders/orders-crud.yaml +++ b/src/openapi/orders/orders-crud.yaml @@ -17,8 +17,7 @@ paths: name: externalOrderId schema: type: string - format: uuid - example: 26ce08bc-0443-465f-9cd2-a7143f33eed0 + example: EXT001 required: false description: The order id in the external system. - in: query @@ -110,7 +109,7 @@ paths: type: integer explode: false required: false - description: Filter on possible order statuses. 1 = concept, 2 = awaitingPayment, 3 = pendingPayment, 4 = paid, 5 = delivered, 6 = cancelled. + description: Filter on most recent order status. 1 = concept, 2 = awaitingPayment, 3 = pendingPayment, 4 = paid, 5 = delivered, 6 = cancelled. responses: "200": description: OK @@ -141,13 +140,25 @@ paths: "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": "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": [ { @@ -315,11 +326,18 @@ paths: "shippingAddressId": 1, "createdOn": "2024-03-22T09:00:00", "order_OrderStatus": - { - "orderStatusId": 4, - "createdOn": "2024-03-22T09:00:00", - "description": "Order succesvol betaald", - }, + [ + { + "orderStatusId": 4, + "createdOn": "2024-03-22T09:00:00", + "description": "Order succesvol betaald", + }, + { + "orderStatusId": 3, + "createdOn": "2024-03-22T08:55:00", + "description": "Betaling in behandeling", + }, + ], "orderLines": [ { @@ -475,12 +493,21 @@ paths: "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": "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": [ { @@ -644,6 +671,14 @@ paths: schema: $ref: "#/components/schemas/unavailable" example: { "orderId": "afce35b2-1dff-4ace-98d0-4b9ac405c87d" } + delete: + summary: RFU. Delete an order. + description: Delete an order. + tags: + - Order + responses: + "200": + description: OK /orders/{orderId}/statuses: parameters: - in: path @@ -767,8 +802,8 @@ paths: required: true description: The id of the order to process. post: - summary: P2. Add one or more payments to an order. - description: Add one or more payments to an order. + summary: P2. Add a payment to an order. + description: Add a payment to an order. tags: - Payment requestBody: @@ -777,36 +812,34 @@ paths: 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": + { + "createdOn": "2024-03-22T09:00:00", + "amountDebit": 121, + "paymentMethodId": 1, + "touchPointId": 1, + "isRefund": false, + "htmPaymentReference": "HTM-1234", + "pspPaymentReference": "Buckaroo-1234", + "paymentStatuses": + [ { - "directDebitMandateTypeId": 1, "createdOn": "2024-03-22T09:00:00", - "bic": "RABONL2U", - "iban": "NL44RABO0123456789", - "ascription": "J. de Vries", - "place": "Den Haag", + "statusCode": "190", + "statusDescription": "Success", + "statusSubCode": "S001", + "statusSubDescription": "PaymentSuccessFul", }, - }, - ] + ], + "mandateInput": + { + "directDebitMandateTypeId": 1, + "createdOn": "2024-03-22T09:00:00", + "bic": "RABONL2U", + "iban": "NL44RABO0123456789", + "ascription": "J. de Vries", + "place": "Den Haag", + }, + } responses: "201": description: Created @@ -1133,6 +1166,14 @@ paths: schema: $ref: "#/components/schemas/unavailable" example: { "orderLineId": "ee82686a-a9f6-4888-b336-8e2aab6f4e13" } + delete: + summary: RFU. Delete an order line. + description: Delete an order line. + tags: + - Order Line + responses: + "200": + description: OK /orderlines/{orderLineId}/accountingstatuses: parameters: - in: path @@ -1963,8 +2004,8 @@ paths: required: true description: The id of the customer on the order. post: - summary: P3. Add one or more addresses to a customer of the order. - description: Add one or more addresses to a customer of the order. + summary: P3. Add an addresses to a customer of the order. + description: Add an addresses to a customer of the order. tags: - Customer requestBody: @@ -1973,17 +2014,15 @@ paths: schema: $ref: "#/components/schemas/unavailable" example: - [ - { - "addressTypeId": 1, - "street": "Kon. Julianaplein", - "houseNumber": 10, - "houseNumberSuffix": "a", - "postalCode": "2595 AA", - "city": "Den Haag", - "country": "NL", - }, - ] + { + "addressTypeId": 1, + "street": "Kon. Julianaplein", + "houseNumber": 10, + "houseNumberSuffix": "a", + "postalCode": "2595 AA", + "city": "Den Haag", + "country": "NL", + } responses: "201": description: Created diff --git a/src/openapi/orders/service_engine_orders.yaml b/src/openapi/orders/service_engine_orders.yaml index 70d34d4..ffa2f38 100644 --- a/src/openapi/orders/service_engine_orders.yaml +++ b/src/openapi/orders/service_engine_orders.yaml @@ -13,8 +13,8 @@ paths: summary: Validate order. description: Validate order. parameters: - - name: X-HTM-JWT-AUTH-HEADER - in: header + - in: header + name: X-HTM-JWT-AUTH-HEADER required: true style: simple explode: false @@ -217,20 +217,21 @@ paths: summary: Fulfill an order. description: Fulfill an order. parameters: - - name: X-HTM-JWT-AUTH-HEADER - in: header + - in: header + name: X-HTM-JWT-AUTH-HEADER required: true style: simple explode: false schema: type: string - - name: orderId - in: path + - in: path + name: orderId required: true style: simple explode: false schema: type: string + format: uuid example: a0ef57fa-395c-4a03-96e9-234c26dccea9 requestBody: content: @@ -353,11 +354,185 @@ paths: { "orderId": "a0ef57fa-395c-4a03-96e9-234c26dccea9", "orderNumber": "123456", + "customerProfileId": 1337, + "totalAmount": 121, + "languageId": 1, + "billingAddressId": 1, + "shippingAddressId": 1, + "createdOn": "2024-03-22T09:00:00", + "orderStatusId": 4, + "orderLines": + [ + { + "orderLineId": "2ba39cae-c401-446b-ae5c-2d6d85b3df1f", + "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, + "orderLineStatusId": 4, + "tokens": + [ + { + "tokenTypeId": 1, + "ovPayTokenId": 1, + "serviceReferenceId": "NLOV1234567ABCDEFG", + "amount": 34, + "ovpasNumber": "OV34567", + "verificationCode": "A7H6", + "personalAccountData": + { + "name": "Jan de Vries", + "dateOfBirth": "01-01-1970", + "photoReference": "DSC_0502.JPG", + "fileType": "image/jpg", + "challengeTypeId": 1, + "oneTimePassword": "H5Iiz3JTaQeIV8p", + }, + }, + ], + }, + ], + "payments": + [ + { + "createdOn": "2024-03-22T09:00:00", + "amountDebit": 121, + "paymentMethodId": 1, + "touchPointId": 1, + "isRefund": false, + "htmPaymentReference": "HTM-1234", + "pspPaymentReference": "Buckaroo-1234", + "paymentStatuses": + [ + { + "createdOn": "2024-03-22T09:00:00", + "statusCode": "190", + "statusDescription": "Success", + "statusSubCode": "S001", + "statusSubDescription": "PaymentSuccessFul", + }, + ], + "payPush": + { + "consumerIssuer": "ABN AMRO", + "transactionId": "0000000000000001", + "consumerName": "J. de Vries", + "consumerIBAN": "NL44RABO0123456789", + "consumerBIC": "RABONL2U", + }, + }, + ], + "customer": + { + "birthname": "Jan", + "surname": "Vries", + "prefix": "de", + "emailAddress": "jandevries@outlook.com", + "dateOfBirth": "1970-01-01", + "addresses": + [ + { + "addressTypeId": 1, + "street": "Kon. Julianaplein", + "houseNumber": 10, + "houseNumberSuffix": "a", + "postalCode": "2595 AA", + "city": "Den Haag", + "country": "NL", + }, + ], + }, } - /orders/: + /customers/{customerProfileId}/orders: + parameters: + - in: path + name: customerProfileId + required: true + style: simple + explode: false + schema: + type: integer + example: 42 + - in: header + name: X-HTM-JWT-AUTH-HEADER + schema: + type: string + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + description: The JWT of the logged in customer (in case of a web shop). + get: + tags: + - Order Retrieval v2.1 + summary: Get all orders for a specific customer. + description: Get all orders for a specific customer. + responses: + "200": + description: OK + content: + 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, + "touchPointId": 1, + "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", + }, + { + "order_orderStatusId": "2b9b7943-3a74-4f2e-ad65-012b62c80821", + "orderStatus": + { "orderStatusId": 3, "name": "pendingPayment" }, + "createdOn": "2024-03-22T08:55:00", + "description": "Betaling in behandeling", + }, + ], + }, + ] + /orders: + parameters: + - in: header + name: X-HTM-JWT-AUTH-HEADER + schema: + type: string + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + description: The JWT of the logged in customer (in case of a web shop). post: tags: - - Order Creation v2 (RFU) + - Order Creation v2.1 summary: Create a new order. description: Create a new order. requestBody: @@ -365,151 +540,738 @@ paths: application/json: schema: $ref: "#/components/schemas/unavailable" - example: null + example: + { + "externalOrderId": null, + "customerProfileId": 1337, + "totalAmount": 121, + "touchPointId": 1, + "languageId": 1, + "billingAddressId": 1, + "shippingAddressId": 1, + "createdOn": "2024-03-22T09:00:00", + "order_OrderStatus": + [ + { + "orderStatusId": 1, + "createdOn": "2024-03-22T09:00:00", + "description": "Concept order", + }, + ], + "orderLines": + [ + { + "externalOrderLineId": null, + "productId": 1, + "productName": "HTM Maandkorting 20%", + "productCode": "HTM-MND-20", + "productDescription": "HTM Maandkorting 20%", + "taxAmount": 21, + "taxMetadataId": "7275b910-37d9-40c1-aaac-80d8ceb62ff9", + "amountExclTax": 100, + "amountInclTax": 121, + "quantity": 1, + "orderLineTerms": + [{ "termsUrl": "generalTermsAndConditions.pdf" }], + "validFrom": "2024-03-22T09:00:00", + "validUntil": "2025-03-22T09:00:00", + "orderLineStatusId": 4, + "createdOn": "2024-03-22T09:00:00", + "customerTokens": + [ + { + "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", + }, + }, + ], + "orderAccountingStatuses": + [ + { + "accountingStatusId": 1, + "createdOn": "2024-03-22T09:00:00", + "description": "Financiele transactie voor de FIKO.", + }, + ], + }, + ], + "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", + }, + }, + ], + "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", + }, + ], + }, + } responses: "201": description: Created - /orders/{uuid}: - patch: + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", + "orderNumber": "ORD-123456", + } + /orders/{orderId}: + parameters: + - in: path + name: orderId + required: true + style: simple + explode: false + schema: + type: string + format: uuid + example: a0ef57fa-395c-4a03-96e9-234c26dccea9 + - in: header + name: X-HTM-JWT-AUTH-HEADER + schema: + type: string + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + description: The JWT of the logged in customer (in case of a web shop). + get: tags: - - Order Creation v2 (RFU) - summary: Update an existing orderline. - description: Update an existing orderline. - parameters: - - name: uuid - in: path - required: true - style: simple - explode: false - schema: - type: string - example: a0ef57fa-395c-4a03-96e9-234c26dccea9 - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/unavailable" - example: null + - Order Retrieval v2.1 + summary: Get a single order. + description: Get a single order. responses: "200": description: OK - /orderlines/{uuid}: + content: + 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, + "touchPointId": 1, + "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", + }, + { + "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": + [ + { + "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", + }, + ], + }, + } patch: tags: - - Order Creation v2 (RFU) + - Order Creation v2.1 summary: Update an existing order. description: Update an existing order. - parameters: - - name: uuid - in: path - required: true - style: simple - explode: false - schema: - type: string - example: a0ef57fa-395c-4a03-96e9-234c26dccea9 requestBody: content: application/json: schema: $ref: "#/components/schemas/unavailable" - example: null + example: + { + "customerProfileId": 1337, + "totalAmount": 121, + "languageId": 1, + "billingAddressId": 1, + "shippingAddressId": 1, + "lastUpdatedOn": "2024-03-22T09:00:00", + } responses: "200": description: OK - /orders/{uuid}/payments: + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", + "orderNumber": "ORD-123456" + } + delete: + tags: + - Order Creation v2.1 + summary: Delete an existing order. + description: Delete an existing order. + responses: + "200": + description: OK + /orders/{orderId}/orderlines: + parameters: + - in: path + name: orderId + required: true + style: simple + explode: false + schema: + type: string + format: uuid + example: a0ef57fa-395c-4a03-96e9-234c26dccea9 + - in: header + name: X-HTM-JWT-AUTH-HEADER + schema: + type: string + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + description: The JWT of the logged in customer (in case of a web shop). post: tags: - - Order Creation v2 (RFU) + - Order Creation v2.1 + summary: Add a new order line to an existing order. + description: Add a new order line to an existing order. + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "externalOrderLineId": null, + "productId": 1, + "productName": "HTM Maandkorting 20%", + "productCode": "HTM-MND-20", + "productDescription": "HTM Maandkorting 20%", + "taxAmount": 21, + "taxMetadataId": "1d6f1725-1072-4f08-982c-3df51dd854a1", + "amountExclTax": 100, + "amountInclTax": 121, + "quantity": 1, + "orderLineTerms": + [{ "termsUrl": "generalTermsAndConditions.pdf" }], + "validFrom": "2024-03-22T09:00:00", + "validUntil": "2025-03-22T09:00:00", + "orderLineStatusId": 4, + "createdOn": "2024-03-22T09:00:00", + "customerTokens": + [ + { + "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", + }, + }, + ], + "orderAccountingStatuses": + [ + { + "accountingStatusId": 1, + "createdOn": "2024-03-22T09:00:00", + "description": "Financiele transactie voor de FIKO.", + }, + ], + } + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: { "orderLineId": "e78b78d9-4fb0-4a9c-8dc0-6d100c9f1b3f" } + /orderlines/{orderLineId}: + parameters: + - in: path + name: orderLineId + required: true + style: simple + explode: false + schema: + type: string + format: uuid + example: a0ef57fa-395c-4a03-96e9-234c26dccea9 + - in: header + name: X-HTM-JWT-AUTH-HEADER + schema: + type: string + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + description: The JWT of the logged in customer (in case of a web shop). + patch: + tags: + - Order Creation v2.1 + summary: Update an existing order line. + description: Update an existing order line. + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "taxAmount": 21, + "taxMetadataId": "0574440e-7fa0-401f-b907-539c91633a5d", + "amountExclTax": 100, + "amountInclTax": 121, + "quantity": 1, + "validFrom": "2024-03-22T09:00:00", + "validUntil": "2025-03-22T09:00:00", + "orderLineStatusId": 4, + } + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: { "orderLineId": "e78b78d9-4fb0-4a9c-8dc0-6d100c9f1b3f" } + delete: + tags: + - Order Creation v2.1 + summary: Delete an existing order line. + description: Delete an existing order line. + responses: + "200": + description: OK + /orders/{orderId}/payments: + parameters: + - in: path + name: orderId + required: true + style: simple + explode: false + schema: + type: string + format: uuid + example: a0ef57fa-395c-4a03-96e9-234c26dccea9 + - in: header + name: X-HM-JWT-AUTH-HEADER + schema: + type: string + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + description: The JWT of the logged in customer (in case of a web shop). + post: + tags: + - Order Creation v2.1 summary: Add a payment to an existing order. description: Add a payment to an existing order. - parameters: - - name: uuid - in: path - required: true - style: simple - explode: false - schema: - type: string - example: a0ef57fa-395c-4a03-96e9-234c26dccea9 requestBody: content: application/json: schema: $ref: "#/components/schemas/unavailable" - example: null + 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": + { + "directDebitMandateTypeId": 1, + "createdOn": "2024-03-22T09:00:00", + "bic": "RABONL2U", + "iban": "NL44RABO0123456789", + "ascription": "J. de Vries", + "place": "Den Haag", + }, + } responses: "201": description: Created - /payments/{uuid}: + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: { "paymentId": "94270188-4cf6-447e-bd49-e8186bcec073" } + /payments/{paymentId}: + parameters: + - in: path + name: paymentId + required: true + style: simple + explode: false + schema: + type: string + format: uuid + example: a0ef57fa-395c-4a03-96e9-234c26dccea9 + - in: header + name: X-HM-JWT-AUTH-HEADER + schema: + type: string + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + description: The JWT of the logged in customer (in case of a web shop). patch: tags: - - Order Creation v2 (RFU) + - Order Creation v2.1 summary: Update a payment on an existing order. description: Update a payment on an existing order. - parameters: - - name: uuid - in: path - required: true - style: simple - explode: false - schema: - type: string - example: a0ef57fa-395c-4a03-96e9-234c26dccea9 requestBody: content: application/json: schema: $ref: "#/components/schemas/unavailable" - example: null + example: + { + "htmPaymentReference": "HTM-1234", + "pspPaymentReference": "Buckaroo-1234", + } responses: "200": description: OK - /orders/{uuid}/customers: + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: { "paymentId": "94270188-4cf6-447e-bd49-e8186bcec073" } + /orders/{orderId}/ordercustomers: + parameters: + - in: path + name: orderId + required: true + style: simple + explode: false + schema: + type: string + format: uuid + example: a0ef57fa-395c-4a03-96e9-234c26dccea9 + - in: header + name: X-HM-JWT-AUTH-HEADER + schema: + type: string + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + description: The JWT of the logged in customer (in case of a web shop). post: tags: - - Order Creation v2 (RFU) + - Order Creation v2.1 summary: Add a customer to an existing order. description: Add a customer to an existing order. - parameters: - - name: uuid - in: path - required: true - style: simple - explode: false - schema: - type: string - example: a0ef57fa-395c-4a03-96e9-234c26dccea9 requestBody: content: application/json: schema: $ref: "#/components/schemas/unavailable" - example: null + example: + { + "birthname": "Jan", + "surname": "Vries", + "prefix": "de", + "emailAddress": "jandevries@outlook.com", + "dateOfBirth": "1970-01-01", + "orderCustomerAddresses": + [ + { + "addressTypeId": 1, + "street": "Kon. Julianaplein", + "houseNumber": 10, + "houseNumberSuffix": "a", + "postalCode": "2595 AA", + "city": "Den Haag", + "country": "NL", + }, + ], + } responses: "201": description: Created - /customers/{uuid}: + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { "orderCustomerId": "94270188-4cf6-447e-bd49-e8186bcec073" } + /ordercustomers/{orderCustomerId}: patch: - tags: - - Order Creation v2 (RFU) - summary: Update a customer on an existing order. - description: Update a customer on an existing order. parameters: - - name: uuid - in: path + - in: path + name: orderCustomerId required: true style: simple explode: false schema: type: string + format: uuid example: a0ef57fa-395c-4a03-96e9-234c26dccea9 + - in: header + name: X-HM-JWT-AUTH-HEADER + schema: + type: string + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + description: The JWT of the logged in customer (in case of a web shop). + tags: + - Order Creation v2.1 + summary: Update a customer on an existing order. + description: Update a customer on an existing order. requestBody: content: application/json: schema: $ref: "#/components/schemas/unavailable" - example: null + example: + { + "birthname": "Jan", + "surname": "Vries", + "prefix": "de", + "emailAddress": "jandevries@outlook.com", + "dateOfBirth": "1970-01-01", + } + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { "orderCustomerId": "94270188-4cf6-447e-bd49-e8186bcec073" } + /orders/{orderId}/fulfill: + parameters: + - in: path + name: orderId + required: true + style: simple + explode: false + schema: + type: string + format: uuid + example: a0ef57fa-395c-4a03-96e9-234c26dccea9 + - in: header + name: X-HM-JWT-AUTH-HEADER + schema: + type: string + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + description: The JWT of the logged in customer (in case of a web shop). + post: + tags: + - Order Fulfillment v2.1 + summary: Fulfill an order without creating or updating the order as a resource. + description: Fulfill an order without creating or updating the order as a resource. responses: "200": description: OK diff --git a/src/openapi/util/util-crud.yaml b/src/openapi/util/util-crud.yaml index bb881b2..ddf015c 100644 --- a/src/openapi/util/util-crud.yaml +++ b/src/openapi/util/util-crud.yaml @@ -86,6 +86,20 @@ paths: example: 65ad5520-4e62-41b7-89dd-a01be6cb78bf required: false description: Pointer to executor of this action (e.g. the batch job). + - in: query + name: role + schema: + type: string + example: customer + required: false + description: Role of the user or process that initiated the action. + - in: query + name: user + schema: + type: string + example: 1255ab39-2f10-409a-bf61-38c07e1b8a9e + required: false + description: User that initiated the action. In case of a customer this is the customer id. - in: query name: resourceName schema: @@ -123,6 +137,8 @@ paths: "created": "2024-07-02 15:01:00.000", "updated": "2024-07-02 15:01:00.000", "correlationId": "fb4443c6-5a6a-47a3-adf0-db3dfc183399", + "role": "customer", + "user": "1255ab39-2f10-409a-bf61-38c07e1b8a9e", "scheduledActionResources": [ { @@ -157,6 +173,8 @@ paths: "created": "2024-07-02 15:01:00.000", "updated": "2024-07-02 15:01:00.000", "correlationId": "fb4443c6-5a6a-47a3-adf0-db3dfc183399", + "role": "customer", + "user": "1255ab39-2f10-409a-bf61-38c07e1b8a9e", "scheduledActionResources": [ { @@ -217,6 +235,8 @@ paths: "created": "2024-07-02 15:01:00.000", "updated": "2024-07-02 15:01:00.000", "correlationId": "fb4443c6-5a6a-47a3-adf0-db3dfc183399", + "role": "customer", + "user": "1255ab39-2f10-409a-bf61-38c07e1b8a9e", "scheduledActionResources": [ { @@ -390,6 +410,12 @@ components: type: string format: uuid example: 8699d72a-cf4d-4e6b-9e9c-549d837ca51f + role: + type: string + example: customer + user: + type: string + example: 1255ab39-2f10-409a-bf61-38c07e1b8a9e ScheduledActionType: type: object properties: