diff --git a/src/openapi/claims/claims-forms.yaml b/src/openapi/claims/claims-forms.yaml new file mode 100644 index 0000000..f2017dc --- /dev/null +++ b/src/openapi/claims/claims-forms.yaml @@ -0,0 +1,268 @@ +openapi: 3.0.1 +info: + title: ClaimsAPI + version: '1.0' +servers: + - url: https://services.acc.api.htm.nl/chipkaart/1.0 + - url: http://services.acc.api.htm.nl/chipkaart/1.0 +security: + - default: [] +tags: + - name: Claims +paths: + /claims: + post: + tags: + - Claims + summary: Create a claim + description: > + Create a claim by sending a JSON as specified in the schema. By + specifying the chipcardnumber under 'chipkaart', + + a claim for OV chipcard will be send to the OVC API. If no + chipcardnumber is specified under 'chipkaart', a claim for EMV is send + to mendix. + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/claimsEntity' + examples: + OVCK: + value: + aankomsthalte: '1' + instapdatum: '2024-03-06T15:20:44.549Z' + instaptijd: '2024-03-06T15:20:44.549Z' + ingecheckt: true + uitgecheckt: true + chipkaart: '1234123412341234' + afgeschrevenbedrag: 0 + vertrekhalte: string + korting: true + iban: '1234123412341234' + naam: string + emailadres: user@example.com + uitstaptijd: '2024-03-06T15:20:44.549Z' + verwachtbedrag: 0 + toelichting: string + lijn: '1' + vervoertype: '1' + serviceRefId: '1' + Totaalbedrag: 0 + EMV: + value: + aankomsthalte: '1' + instapdatum: '2024-03-06T15:20:44.549Z' + instaptijd: '2024-03-06T15:20:44.549Z' + ingecheckt: true + uitgecheckt: true + afgeschrevenbedrag: 0 + vertrekhalte: string + korting: true + iban: '1234123412341234' + naam: string + emailadres: user@example.com + uitstaptijd: '2024-03-06T15:20:44.549Z' + verwachtbedrag: 0 + toelichting: string + lijn: '1' + vervoertype: '1' + serviceRefId: '1' + Totaalbedrag: 0 + responses: + '200': + description: ok + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/401Response' + '500': + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/500Response' + security: + - default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited + /refunds: + post: + tags: + - Claims + summary: Create a refund request + description: Create a refund request by sending a JSON as specified in the schema. Either a serviceReferenceId or ovPasNumber should be present in order to fulfill the refund request. + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/refundsEntity' + examples: + EMV: + value: + emailAddress: 'j.beek@htm.nl' + orderNumber: 'ORD1000046' + serviceReferenceId: 'NLOVA5BCD124H3Z21X' + amount: 2305 + iban: 'NL98INGB0003856625' + orderDate: '2025-01-13' + productName: 'HTM 20% korting' + OVpas: + value: + emailAddress: 'j.beek@htm.nl' + orderNumber: 'ORD1000046' + ovpasNumber: '63AW974' + iban: 'NL98INGB0003856625' + orderDate: '2025-01-13' + productName: 'HTM 20% korting' + responses: + '201': + description: Created + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/401Response' + '500': + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/500Response' + security: + - default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited +components: + schemas: + claimsEntity: + required: + - Totaalbedrag + - aankomsthalte + - afgeschrevenbedrag + - emailadres + - instapdatum + - instaptijd + - korting + - lijn + - serviceRefId + - toelichting + - uitgecheckt + - vertrekhalte + - vervoertype + - verwachtbedrag + type: object + properties: + aankomsthalte: + type: string + instapdatum: + type: string + format: date-time + instaptijd: + type: string + format: date-time + ingecheckt: + type: boolean + uitgecheckt: + type: boolean + chipkaart: + type: string + afgeschrevenbedrag: + type: number + format: float + vertrekhalte: + type: string + korting: + type: boolean + iban: + type: string + description: String of length between 15 en 32 characters + example: '1234123412341234' + naam: + type: string + emailadres: + type: string + format: email + uitstaptijd: + type: string + format: date-time + verwachtbedrag: + type: number + format: float + toelichting: + type: string + lijn: + type: string + vervoertype: + type: string + serviceRefId: + type: string + Totaalbedrag: + type: number + format: float + refundsEntity: + required: + - emailAddress + - iban + type: object + properties: + emailAddress: + type: string + format: email + example: j.beek@htm.nl + orderNumber: + type: string + example: ORD1000046 + serviceReferenceId: + type: string + example: NLOVA5BCD124H3Z21X + amount: + type: integer + example: 12305 + ovpasNumber: + type: string + example: 63AW974 + iban: + type: string + example: NL00RABO000001337 + orderDate: + type: string + format: date + example: 2025-01-13 + productName: + type: string + example: HTM 20% korting + 401Response: + type: object + properties: + code: + type: string + example: '900901' + type: + type: string + message: + type: string + example: Invalid Credentials + description: + type: string + example: >- + Invalid Credentials. Make sure you have provided the correct + security credentials + 500Response: + type: object + properties: + error: + type: string + example: error while connecting to backend + securitySchemes: + default: + type: oauth2 + flows: + implicit: + authorizationUrl: https://services.acc.api.htm.nl/authorize + scopes: {} diff --git a/src/openapi/customers/SE-customers.yaml b/src/openapi/customers/SE-customers.yaml new file mode 100644 index 0000000..7238481 --- /dev/null +++ b/src/openapi/customers/SE-customers.yaml @@ -0,0 +1,649 @@ +openapi: 3.0.1 +info: + title: Service Engine APIs for Customers + description: >- + Service Engine APIs for HTM Customers. These are NOT the CRUD APIs to access raw data in the database. + To be used by touchpoints to get information about HTM customers. + version: 'x.x' +servers: + - url: https://api.integratielaag.nl/abt/serviceengine/customers/x.x +tags: + - name: ServiceEngine Customers + description: >- + Service Engine APIs for HTM Customers. These are NOT the CRUD APIs to access raw data in the database. + To be used by touchpoints to get information about HTM customers. +paths: + /customers: + get: + tags: + - ServiceEngine Customers + summary: Get a single customer profile based on search parameters + description: Get a single customer profile based on search parameters. Only returns a profile if a single result matches the parameters; when multiple results are found, additional seach parameters are required to disambiguate. + parameters: + - name: customerProfileId + in: query + schema: + type: integer + example: 1 + - name: customerNumber + in: query + schema: + type: integer + example: 1000001 + - name: customerStatusId + in: query + schema: + type: integer + example: 1 + - name: debtorNumber + in: query + schema: + type: integer + example: 100001 + - name: debtorStatusId + in: query + schema: + type: integer + example: 1 + - name: birthname + in: query + schema: + type: string + example: John + - name: surname + in: query + schema: + type: string + example: Doe + - name: emailAddress + in: query + schema: + type: string + format: email + example: john.doe@mymailprovider.com + - name: dateOfBirth + in: query + schema: + type: string + format: date + example: "2000-01-01" + - name: addressStreet + in: query + schema: + type: string + example: Sesamestreet + - name: addressHouseNumber + in: query + schema: + type: integer + example: 1 + - name: addressHouseNumberSuffix + in: query + schema: + type: string + example: A + - name: addressPostalCode + in: query + schema: + type: string + example: 1234 AB + - name: addressCity + in: query + schema: + type: string + example: The Hague + - name: addressCountry + in: query + schema: + type: string + example: The Netherlands + - name: phoneNumber + in: query + schema: + type: string + example: "0123456789" + - name: ovChipcardNumber + in: query + schema: + type: integer + example: 0123456789 + - name: ovChipcardAlias + in: query + schema: + type: string + example: My ovchipcard + - name: ovPayTokenNumber + in: query + schema: + type: integer + example: 0123456789 + - name: ovPayTokenAlias + in: query + schema: + type: string + example: My Ov Pay Token + - name: ovPayTokenXTat + in: query + schema: + type: string + example: 180d04e0-a721-447e-a1d9-b416937b43bc + - name: ovPayTokenXBot + in: query + schema: + type: string + example: e1307c73-676a-4d07-967b-6141276f7c7c + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/CustomersResponse' + '404': + description: No customer found + content: + application/json: + example: + { + "type": "https://api.integratielaag.nl/abt/serviceengine/x.x/customers", + "apiErrorCode": "400.1", + "title": "Niet gevonden", + "detail": "Klant niet gevonden", + "instance": "555d00b5-bc3f-4591-949b-479e76d49ea7", + "errors": [ + { + "subApiErrorCode": "0017" + } + ] + } + '409': + description: Multiple customers found + content: + application/json: + example: + { + "type": "https://api.integratielaag.nl/abt/serviceengine/x.x/customers", + "apiErrorCode": "409.1", + "title": "Meer dan 1 klantprofiel gevonden", + "detail": "Meer dan 1 klantprofiel gevonden. Verfijn je zoekcriteria.", + "instance": "555d00b5-bc3f-4591-949b-479e76d49ea7" + } + /customers/tokens: + get: + tags: + - ServiceEngine Customers + summary: Get a list of all OvPayTokens for a certain customer + description: Get a list of all OvPayTokens for a certain customer. + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/OvPayTokensResponse' + /customers/tokens/{ovPayTokenId}/productinstances: + get: + tags: + - ServiceEngine Customers + summary: Get a list of all HTM products instantiated on the given OvPayToken + description: |- + Get a list of all HTM products instantiated on the given OvPayToken. + Only HTM products are returned; GBO does not allow HTM to get information on non-HTM product-instances. + Where relevant, operations to be performed are returned as HATEOAS links per product-instance. + parameters: + - name: ovPayTokenId + in: path + required: true + style: simple + description: Id of the OvPayToken to get product-instances for. + schema: + type: integer + example: 1 + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/OvPayTokenProductInstancesResponse' + examples: + getEmptyProductInstances: + summary: No product-instances found on token + value: + productInstances: [] + getSingleProductInstance: + summary: One non-renewable product-instance + value: + { + "productInstances": [ + { + "productId": 1, + "name": "HTM 90% Korting", + "status": "Active", + "isRenewable": true, + "productCategory": { + "productCategoryId": 1, + "name": "Kortingsabonnement" + }, + "fromInclusive": "2024-11-25T13:25:00+01:00", + "untilInclusive": "2024-12-25T03:59:59+01:00", + "orderId": "501B17EF-36C4-4039-B92C-6517969B464E", + "orderLineId": "38B17EF-36C4-4039-B92C-4817969B464E", + "contractId": "56B17EF-C436-9043-B76C-481797WEB464F", + "_links": { + "self": { + "href": "https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens/1/productinstances/1", + "method": "GET" + }, + "get_order": { + "href": "https://api.integratielaag.nl/abt/serviceengine/x.x/orders/501B17EF-36C4-4039-B92C-6517969B464E", + "method": "GET" + }, + "get_contract": { + "href": "https://api.integratielaag.nl/abt/serviceengine/x.x/customers/contracts/56B17EF-C436-9043-B76C-481797WEB464F", + "method": "GET" + } + } + } + ] + } +components: + schemas: + CustomersResponse: + type: object + properties: + customerProfileId: + type: integer + example: 1 + customerNumber: + type: integer + example: 1000001 + customerStatus: + type: object + properties: + customerStatusId: + type: integer + example: 1 + name: + type: string + example: Active + debtorNumber: + type: string + example: DB100001 + debtorStatus: + type: object + properties: + debtorStatusId: + type: integer + example: 1 + name: + type: string + example: Active + person: + type: object + properties: + prefix: + type: string + example: Mr + birthname: + type: string + example: John + surname: + type: string + example: Doe + suffix: + type: string + example: Jr. + dateOfBirth: + type: string + format: date + example: '2023-02-01' + emailAddress: + type: string + format: email + example: 4j2dD@example.com + addresses: + type: array + items: + type: object + properties: + addressId: + type: integer + example: 1 + isPreferred: + type: boolean + example: true + addressType: + type: object + properties: + addressTypeId: + type: integer + example: 1 + name: + type: string + example: Home + street: + type: string + example: Appelstraat + houseNumber: + type: integer + example: 1 + houseNumberSuffix: + type: string + example: BS + postalCode: + type: string + example: 1234AB + city: + type: string + example: Den Haag + country: + type: string + example: Nederland + _links: + type: object + properties: + self: + type: object + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/addresses/1 + method: + type: string + example: GET + delete_address: + type: object + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/addresses/1 + method: + type: string + example: DELETE + phones: + type: array + items: + type: object + properties: + phoneId: + type: integer + example: 1 + isPreferred: + type: boolean + example: true + phoneType: + type: object + properties: + phoneTypeId: + type: integer + example: 1 + name: + type: string + example: Home + number: + type: string + example: "0123456789" + countryCode: + type: string + example: "0031" + _links: + type: object + properties: + self: + type: object + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/phones/1 + method: + type: string + example: GET + delete_phone: + type: object + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/phones/1 + method: + type: string + example: DELETE + _links: + type: object + properties: + self: + type: object + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers + method: + type: string + example: GET + create_customer_status: + type: object + description: ONLY ALLOWED FOR SMP - Create a new customer status + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/statuses + method: + type: string + example: POST + partial_edit: + type: object + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers + method: + type: string + example: PATCH + get_tokens: + type: object + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens + method: + type: string + example: GET + create_token: + type: object + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens + method: + type: string + example: POST + OvPayTokensResponse: + type: object + required: + - ovPayTokens + properties: + ovPayTokens: + type: array + items: + type: object + properties: + ovPayTokenId: + type: integer + example: 1 + tokenType: + type: object + properties: + tokenTypeId: + type: integer + example: 1 + name: + type: string + example: EMV + alias: + type: string + example: MyToken + tokenStatus: + type: object + properties: + tokenStatusId: + type: integer + example: 1 + name: + type: string + example: Active + expirationDate: + type: string + format: date + example: '2023-02-01' + replacedByTokenId: + type: integer + example: 1 + _links: + type: object + properties: + self: + type: object + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens/1 + method: + type: string + example: GET + partial_edit: + type: object + description: External touchpoints are only allowed to change alias - SMP can also change tokenStatus + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens/1 + method: + type: string + example: PATCH + replace_token: + type: object + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens/1/replace + method: + type: string + example: POST + delete_token: + type: object + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens/1 + method: + type: string + example: DELETE + get_productinstances: + type: object + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens/1/productinstances + method: + type: string + example: GET + get_trips: + type: object + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens/1/trips + method: + type: string + example: GET + OvPayTokenProductInstancesResponse: + type: object + properties: + productInstances: + type: array + items: + type: object + properties: + productId: + type: integer + example: 1 + name: + type: string + example: HTM 90% Korting + status: + type: string + enum: [ "Active", "Ended", "Refunded" ] + example: Active + isRenewable: + type: boolean + example: true + productCategory: + type: object + description: The category of the originating HTM product definition + properties: + productCategoryId: + type: integer + example: 1 + name: + type: string + example: Kortingsabonnement + fromInclusive: + type: string + format: date-time-offset + example: "2024-11-25T13:25:00+01:00" + untilInclusive: + type: string + format: date-time-offset + description: >- + If not present, this product-instance represents a subscription/contract without a real end date. If present, it can be either the natural end date or the refund timestamp. + example: "2024-12-25T03:59:59+01:00" + orderId: + type: string + format: uuid + example: 501B17EF-36C4-4039-B92C-6517969B464E + orderLineId: + type: string + format: uuid + example: 38B17EF-36C4-4039-B92C-4817969B464E + contractId: + type: string + format: uuid + example: 56B17EF-C436-9043-B76C-481797WEB464F + description: Only present for subscriptions/contracts + _links: + type: object + properties: + self: + type: object + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens/1/productinstances + method: + type: string + example: GET + get_order: + type: object + properties: + href: + type: string + description: Always present for any HTM product-instance + example: https://api.integratielaag.nl/abt/serviceengine/x.x/orders/501B17EF-36C4-4039-B92C-6517969B464E + method: + type: string + example: GET + get_contract: + type: object + properties: + href: + type: string + description: Only present for subscriptions/contracts + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/contracts/56B17EF-C436-9043-B76C-481797WEB464F + method: + type: string + example: GET + + + + + diff --git a/src/openapi/fiko/fiko-crud.yaml b/src/openapi/fiko/fiko-crud.yaml index fe786a7..46a74ce 100644 --- a/src/openapi/fiko/fiko-crud.yaml +++ b/src/openapi/fiko/fiko-crud.yaml @@ -6,6 +6,45 @@ info: servers: - url: https://api.integratielaag.nl/v1 paths: + /fiko/transactionitems: + post: + summary: DEPRECATED. Add a finanicial transaction item. + description: DEPRECATED. This API is deprecated. Use bulk-insert instead. + deprecated: true + tags: + - External FIKO endpoints v2 + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/TransactionItemsPostRequestBody" + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/TransactionItemsPostResponseBody" + /fiko/transactionitems/bulk: + post: + summary: Add one ore more finanicial transaction items in bulk. + description: Add one ore more finanicial transaction items in bulk. + tags: + - External FIKO endpoints v2 + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/TransactionItemsBulkPostRequestBody" + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/TransactionItemsBulkPostResponseBody" /transactionitems: get: summary: Find transaction items. @@ -130,48 +169,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "transactionItems": - [ - { - "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", - }, - { - "transactionItemId": "e63cc37b-4d87-4278-8eb5-1477e07edf3d", - "sourceName": "Verkoopengine", - "transactionId": "1001237", - "transactionLineId": "1", - "name": "HTM Maandkorting 20%", - "quantity": 1, - "taxCode": "V21", - "amountExclTax": 100, - "amountInclTax": 121, - "amountTax": 21, - "occurredOn": "2024-10-04T00:05:00Z", - "type": "debit", - "productCode": "HTM-MND-20", - "aggregationReference": "FIKO-123456", - "accountingSystemReference": "U4F-123456", - }, - ], - "href": null, - } + $ref: "#/components/schemas/TransactionItemsGetResponseBody" post: summary: Add a finanicial transaction item. description: Add a finanicial transaction item. @@ -182,96 +180,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "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", - } + $ref: "#/components/schemas/TransactionItemsPostRequestBody" responses: "201": description: Created content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { "transactionItemId": "afce35b2-1dff-4ace-98d0-4b9ac405c87d" } - /transactionitems/bulk: - post: - summary: Add one ore more finanicial transaction items in bulk. - description: Add one ore more finanicial transaction items in bulk. - tags: - - Transactions v2 - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/unavailable" - example: - [ - { - "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": null, - "accountingSystemReference": null, - }, - { - "sourceName": "Verkoopengine", - "transactionId": "1001237", - "transactionLineId": "1", - "name": "HTM Maandkorting 20%", - "quantity": 1, - "taxCode": "V21", - "amountExclTax": 100, - "amountInclTax": 121, - "amountTax": 21, - "occurredOn": "2024-10-04T00:05:00Z", - "type": "debit", - "productCode": "HTM-MND-20", - "aggregationReference": null, - "accountingSystemReference": null, - }, - ] - responses: - "201": - description: Created - content: - application/json: - schema: - $ref: "#/components/schemas/unavailable" - example: - [ - { - "transactionItemId": "afce35b2-1dff-4ace-98d0-4b9ac405c87d", - }, - { - "transactionItemId": "e63cc37b-4d87-4278-8eb5-1477e07edf3d", - }, - ] + $ref: "#/components/schemas/TransactionItemsPostResponseBody" /transactionitems/{transactionItemId}: parameters: - in: path @@ -292,21 +208,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "aggregationReference": "FIKO-123456", - "accountingSystemReference": "U4F-123456", - } + $ref: "#/components/schemas/TransactionItemsPatchRequestBody" responses: "200": description: OK content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { "transactionItemId": "d667d293-aa82-4c9e-9b10-77cffc9058a1" } + $ref: "#/components/schemas/TransactionItemsPatchResponseBody" /transactionitems/{transactionItemId}/processingfailures: parameters: - in: path @@ -327,43 +236,14 @@ paths: 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", - "contraAccountNumber": "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", - }, - ], - } + $ref: "#/components/schemas/ProcessingFailuresPostRequestBody" responses: "201": description: Created content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "processingFailureId": "afce35b2-1dff-4ace-98d0-4b9ac405c87d", - } + $ref: "#/components/schemas/ProcessingFailuresPostResponseBody" /transactionitems/{transactionItemId}/transactionaudittrails: parameters: - in: path @@ -384,26 +264,14 @@ paths: 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", - } + $ref: "#/components/schemas/TransactionAuditTrailsPostRequestBody" responses: "201": description: Created content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "transactionAuditTrailId": "afce35b2-1dff-4ace-98d0-4b9ac405c87d", - } + $ref: "#/components/schemas/TransactionAuditTrailsPostResponseBody" /transactionaudittrails: get: summary: Find audit trail entries. @@ -470,32 +338,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "transactionAuditTrails": - [ - { - "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", - }, - { - "transactionAuditTrailId": "e63cc37b-4d87-4278-8eb5-1477e07edf3d", - "transactionItemId": "d667d293-aa82-4c9e-9b10-77cffc9058a1", - "user": "fiko", - "timestamp": "2022-01-01 00:01:00", - "action": "processed", - "description": "Transaction processed.", - "correlationId": "3e9d7d4b-8adf-4e7f-8251-be308f16d3de", - }, - ], - "href": null, - } + $ref: "#/components/schemas/TransactionAuditTrailsGetResponseBody" /processingfailures: get: summary: Find processing failures. @@ -593,45 +436,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "processingFailures": - [ - { - "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", - "contraAccountNumber": "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": 12, - "reasonCode": "1234ABCD", - "reasonDesc": "description", - }, - "element": "costCenter", - "occurence": 1, - "change": "Adapt config", - }, - ], - }, - ], - "href": null, - } + $ref: "#/components/schemas/ProcessingFailuresGetResponseBody" /processingfailures/{processingFailureId}: parameters: - in: path @@ -651,19 +456,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: { "status": "open", "occurence": 2 } + $ref: "#/components/schemas/ProcessingFailuresPatchRequestBody" responses: "200": description: OK content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "processingFailureId": "37a8095b-19db-498f-9349-5f37d21c5bdf", - } + $ref: "#/components/schemas/ProcessingFailuresPatchResponseBody" /processingfailures/{processingFailureId}/processingfailureinstances: parameters: - in: path @@ -683,26 +483,14 @@ paths: 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", - } + $ref: "#/components/schemas/ProcessingFailureInstancesPostRequestBody" responses: "201": description: Created content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "processingFailureInstanceId": "9afa9a6b-5b6a-4b0a-9c9e-4b0a5b6a4b0a", - } + $ref: "#/components/schemas/ProcessingFailureInstancesPostResponseBody" /processingfailureinstances/{processingFailureInstanceId}: parameters: - in: path @@ -722,24 +510,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "timestamp": "2022-01-01 00:00:00", - "occurence": 2, - "change": "Adapt config", - } + $ref: "#/components/schemas/ProcessingFailureInstancesPatchRequestBody" responses: "200": description: OK content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "processingFailureInstanceId": "37a8095b-19db-498f-9349-5f37d21c5bdf", - } + $ref: "#/components/schemas/ProcessingFailureInstancesPatchResponseBody" /productmetadata: get: summary: Find product metadata. @@ -837,81 +615,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "productMetadata": - [ - { - "productMetadataId": "39a87c2a-9011-4dfd-b35e-1245a98c2e61", - "productCode": "4031", - "department": "900", - "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", - "contraAccountCode": "123456", - "contraAccountNumber": "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, - }, - "costCenter": "84955", - "validFrom": "2024-03-22T09:00:00", - "validUntil": null, - }, - { - "contraAccountMetadata": - { - "contraAccountMetadataId": "69c562ca-5299-4585-ac92-46fb54aeb99e", - "contraAccountCode": "123456", - "contraAccountNumber": "220.10419", - "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, - }, - ], - }, - ], - "href": null, - } + $ref: "#/components/schemas/ProductMetadataGetResponseBody" + post: summary: Add product metadata. description: Add product metadata. @@ -922,47 +627,14 @@ paths: 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, - "productContraAccounts": - [ - { - "contraAccountMetadataId": "e0af8c8f-d421-4567-a14e-48e2a1bb86fb", - "concessionId": 1, - "sourceMetadataId": "08d96f94-f468-467e-9068-c86c34f43097", - "costCenter": "84955", - "validFrom": "2024-03-22T09:00:00", - "validUntil": null, - }, - { - "contraAccountMetadataId": "02e458ce-f77a-4262-8b38-490e54f52856", - "concessionId": 2, - "sourceMetadataId": "08d96f94-f468-467e-9068-c86c34f43097", - "costCenter": "84955", - "validFrom": "2024-03-22T09:00:00", - "validUntil": null, - }, - ], - } + $ref: "#/components/schemas/ProductMetadataPostRequestBody" responses: "201": description: Created content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { "productMetadataId": "39a87c2a-9011-4dfd-b35e-1245a98c2e61" } + $ref: "#/components/schemas/ProductMetadataPostResponseBody" /productmetadata/{productMetadataId}: parameters: - in: path @@ -983,27 +655,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "productCode": "4031", - "department": "900", - "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, - } + $ref: "#/components/schemas/ProductMetadataPatchRequestBody" responses: "200": description: OK content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { "productMetadataId": "39a87c2a-9011-4dfd-b35e-1245a98c2e61" } + $ref: "#/components/schemas/ProductMetadataPatchResponseBody" /productmetadata/{productMetadataId}/productcontraaccounts: parameters: - in: path @@ -1024,27 +683,77 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "contraAccountMetadataId": "e0af8c8f-d421-4567-a14e-48e2a1bb86fb", - "concessionId": 1, - "sourceMetadataId": "08d96f94-f468-467e-9068-c86c34f43097", - "costCenter": "84955", - "validFrom": "2024-03-22T09:00:00", - "validUntil": null, - } + $ref: "#/components/schemas/ProductContraAccountsPostRequestBody" responses: "201": description: Created content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "productContraAccountId": "39a87c2a-9011-4dfd-b35e-1245a98c2e61", - } + $ref: "#/components/schemas/ProductContraAccountsPostResponseBody" + /productcontraaccounts: + get: + summary: Find product contra accounts. + description: Find product contra accounts. + tags: + - Metadata v2 + parameters: + - in: query + name: productContraAccountId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + description: The id of the product contra account. + - 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: contraAccountMetadataId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + description: The id of the contra account metadata. + - in: query + name: concessionId + schema: + type: array + items: + type: integer + example: [1, 2] + explode: false + 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. + - in: query + name: costCenter + schema: + type: string + example: 84955 + description: Find product metadata that is linked to this cost center. + - in: query + name: validAt + schema: + type: string + example: 2024-03-22T09:00:00 + description: Timestamp that the metadata is valid. + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/ProductContraAccountsGetResponseBody" /productcontraaccounts/{productContraAccountId}: parameters: - in: path @@ -1065,69 +774,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "contraAccountMetadataId": "e0af8c8f-d421-4567-a14e-48e2a1bb86fb", - "concessionId": 1, - "sourceMetadataId": "08d96f94-f468-467e-9068-c86c34f43097", - "costCenter": "84955", - "validFrom": "2024-03-22T09:00:00", - "validUntil": null, - } + $ref: "#/components/schemas/ProductContraAccountsPatchRequestBody" 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" + $ref: "#/components/schemas/ProductContraAccountsPatchResponseBody" /contraaccountmetadata: get: summary: Find contra account metadata. @@ -1167,21 +821,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "contraAccountMetadata": - [ - { - "contraAccountMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf", - "contraAccountCode": "123456", - "contraAccountNumber": "220.10419", - "validFrom": "2024-03-22T09:00:00", - "validUntil": null, - }, - ], - "href": null, - } + $ref: "#/components/schemas/ContraAccountMetadataGetResponseBody" post: summary: Add contra account metadata. description: Add contra account metadata. @@ -1192,25 +832,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "contraAccountCode": "123456", - "contraAccountNumber": "220.10419", - "validFrom": "2024-03-22T09:00:00", - "validUntil": null, - } + $ref: "#/components/schemas/ContraAccountMetadataPostRequestBody" responses: "201": description: Created content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "contraAccountMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf", - } + $ref: "#/components/schemas/ContraAccountMetadataPostResponseBody" /contraaccountmetadata/{contraAccountMetadataId}: parameters: - in: path @@ -1231,66 +860,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "contraAccountNumber": "220.10419", - "validFrom": "2024-03-22T09:00:00", - "validUntil": null, - } + $ref: "#/components/schemas/ContraAccountMetadataPatchRequestBody" responses: "200": description: OK content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "contraAccountMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf", - } - /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" + $ref: "#/components/schemas/ContraAccountMetadataPatchResponseBody" /taxmetadata: get: summary: Find tax metadata. @@ -1336,38 +913,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "taxMetadata": - [ - { - "taxMetadataId": "bc4ea24a-27a5-40e8-bbbc-57a105afaaa0", - "taxCode": "V21", - "taxPercentageAmount": 21, - "description": "BTW VERKOOP HOOG 21%", - "validFrom": "2024-01-01T00:00:00.000", - "validUntil": null, - }, - { - "taxMetadataId": "73c47af3-7c8b-44d3-b599-9b6f5a587a82", - "taxCode": "V09", - "taxPercentageAmount": 9, - "description": "BTW VERKOOP LAAG 9%", - "validFrom": "2024-01-01T00:00:00.000", - "validUntil": null, - }, - { - "taxMetadataId": "423b879c-e8db-4ba2-a2b4-0adfe037043d", - "taxCode": "V0", - "taxPercentageAmount": 0, - "description": "BTW VERKOOP NUL", - "validFrom": "2024-01-01T00:00:00.000", - "validUntil": null, - }, - ], - "href": null, - } + $ref: "#/components/schemas/TaxMetadataGetResponseBody" post: summary: Add tax metadata. description: Add tax metadata. @@ -1378,24 +924,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "taxCode": "V21", - "taxPercentageAmount": 21, - "description": "BTW VERKOOP HOOG 21%", - "validFrom": "2024-03-22T09:00:00", - "validUntil": null, - } + $ref: "#/components/schemas/TaxMetadataPostRequestBody" responses: "201": description: Created content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { "taxMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf" } + $ref: "#/components/schemas/TaxMetadataPostResponseBody" /taxmetadata/{taxMetadataId}: parameters: - in: path @@ -1416,66 +952,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "taxCode": "V21", - "taxPercentageAmount": 21, - "description": "BTW VERKOOP HOOG 21%", - "validFrom": "2024-03-22T09:00:00", - "validUntil": "2025-12-31T23:59:59", - } + $ref: "#/components/schemas/TaxMetadataPatchRequestBody" responses: "200": description: OK content: application/json: schema: - $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" + $ref: "#/components/schemas/TaxMetadataPatchResponseBody" /sourcemetadata: get: summary: Find source metadata. @@ -1541,25 +1025,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "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, - }, - ], - "href": null, - } + $ref: "#/components/schemas/SourceMetadataGetResponseBody" post: summary: Add source metadata. description: Add source metadata. @@ -1570,27 +1036,14 @@ paths: 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, - } + $ref: "#/components/schemas/SourceMetadataPostRequestBody" responses: "201": description: Created content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { "sourceMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf" } + $ref: "#/components/schemas/SourceMetadataPostResponseBody" /sourcemetadata/{sourceMetadataId}: parameters: - in: path @@ -1611,69 +1064,14 @@ paths: 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, - } + $ref: "#/components/schemas/SourceMetadataPatchRequestBody" 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" + $ref: "#/components/schemas/SourceMetadataPatchResponseBody" /accountingperiodmetadata: get: summary: Find accounting period metadata. @@ -1706,24 +1104,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "accountingPeriodMetadata": - [ - { - "accountingPeriodMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf", - "accountingPeriod": "2024-01", - "isOpen": false, - }, - { - "accountingPeriodMetadataId": "0302c651-f040-4cbc-8a4d-90dc82f29a32", - "accountingPeriod": "2024-02", - "isOpen": true, - }, - ], - "href": null, - } + $ref: "#/components/schemas/AccountingPeriodMetadataGetResponseBody" post: summary: Add accounting period metadata. description: Add accounting period metadata. @@ -1734,19 +1115,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: { "accountingPeriod": "2024-01", "isOpen": true } + $ref: "#/components/schemas/AccountingPeriodMetadataPostRequestBody" responses: "201": description: Created content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "accountingPeriodMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf", - } + $ref: "#/components/schemas/AccountingPeriodMetadataPostResponseBody" /accountingperiodmetadata/{accountingPeriodMetadataId}: parameters: - in: path @@ -1767,61 +1143,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: { "accountingPeriod": "2024-01", "isOpen": true } + $ref: "#/components/schemas/AccountingPeriodMetadataPatchRequestBody" 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" + $ref: "#/components/schemas/AccountingPeriodMetadataPatchResponseBody" /concessionmetadata: get: summary: Find concession metadata. @@ -1863,28 +1192,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "concessionMetadata": - [ - { - "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, - }, - ], - "href": null, - } + $ref: "#/components/schemas/ConcessionMetadataGetResponseBody" post: summary: Add concession metadata. description: Add concession metadata. @@ -1895,25 +1203,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "concessionId": 2, - "percentage": 15.979, - "validFrom": "2024-01-01T00:00:00.000", - "validUntil": null, - } + $ref: "#/components/schemas/ConcessionMetadataPostRequestBody" responses: "201": description: Created content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "concessionMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf", - } + $ref: "#/components/schemas/ConcessionMetadataPostResponseBody" /concessionmetadata/{concessionMetadataId}: parameters: - in: path @@ -1934,67 +1231,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "concessionId": 2, - "percentage": 15.979, - "validFrom": "2024-01-01T00:00:00.000", - "validUntil": null, - } + $ref: "#/components/schemas/ConcessionMetadataPatchRequestBody" 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" + $ref: "#/components/schemas/ConcessionMetadataPatchResponseBody" /metadataaudittrails: get: summary: Find metadata audit trails. @@ -2010,106 +1254,103 @@ paths: example: 37a8095b-19db-498f-9349-5f37d21c5bdf description: The id of the metadata audit trail. - in: query - name: productMetadataId + name: source schema: type: string - format: uuid - example: 37a8095b-19db-498f-9349-5f37d21c5bdf - description: The id of the product metadata. + example: FMT + description: The source of the metadata change. - in: query - name: concessionMetadataId + name: endpoint schema: type: string - format: uuid - example: 37a8095b-19db-498f-9349-5f37d21c5bdf - description: The id of the concession metadata. + format: url + example: https://dev.api.htm.nl/v2/productmetadata + description: The endpoint of the metadata change. - in: query - name: contraAccountMetadataId + name: operation schema: - type: string - format: uuid - example: 37a8095b-19db-498f-9349-5f37d21c5bdf - description: The id of the contra account metadata. + type: array + items: + type: string + enum: + - GET + - POST + - PATCH + - DELETE + example: POST + explode: false + description: The operation of the metadata change. - in: query - name: taxMetadataId + name: responseCode schema: - type: string - format: uuid - example: 37a8095b-19db-498f-9349-5f37d21c5bdf - description: The id of the tax metadata. + type: integer + example: 200 + description: The HTTP response code of the metadata change. - in: query - name: sourceMetadataId + name: requestBody schema: type: string - format: uuid - example: 37a8095b-19db-498f-9349-5f37d21c5bdf - description: The id of the source metadata. + format: json + example: { "json": "data" } + description: The request body of the metadata change. - in: query - name: accountingPeriodMetadataId + name: responseBody schema: type: string - format: uuid - example: 37a8095b-19db-498f-9349-5f37d21c5bdf - description: The id of the accounting period metadata. + format: json + example: { "json": "data" } + description: The response body of the metadata change. - in: query name: user schema: type: string - example: rmeeuws - description: The username of the user. + example: r.meeuws + description: The id of the user who performed the metadata change. - in: query name: timestampBefore schema: type: string - example: 2022-01-01 00:00:00 - description: The timestamp before the event occured. + format: date-time + example: 2024-01-01T00:00:00.000 + description: The timestamp before the metadata change was made. - in: query name: timestampAfter schema: type: string - example: 2022-01-01 00:00:00 - description: The timestamp after the event occured. + format: date-time + example: 2024-01-01T00:00:00.000 + description: The timestamp after the metadata change was made. - in: query name: correlationId schema: type: string - example: a3891560-3084-42cb-867c-f289e7cda47d - description: The correlation id of the event. + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + description: The correlation id of the metadata change. responses: "200": description: OK content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "metadataAuditTrails": - [ - { - "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", - }, - ], - }, - ], - "href": null, - } + $ref: "#/components/schemas/MetadataAuditTrailsGetResponseBody" + 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/MetadataAuditTrailsPostRequestBody" + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/MetadataAuditTrailsPostResponseBody" /concessions: get: summary: Get all concessions. @@ -2122,17 +1363,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "concessions": - [ - { "concessionId": 1, "name": "rail" }, - { "concessionId": 2, "name": "bus" }, - { "concessionId": 3, "name": "not_applicable" }, - ], - "href": null, - } + $ref: "#/components/schemas/ConcessionsGetResponseBody" /failurereasons: get: summary: Get all failure reasons. @@ -2145,24 +1376,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "failureReasons": - [ - { - "failureReasonId": 1, - "reasonCode": "002", - "reasonDesc": "Contra account does not exist", - }, - { - "failureReasonId": 2, - "reasonCode": "003", - "reasonDesc": "Accouting period closed", - }, - ], - "href": null, - } + $ref: "#/components/schemas/FailureReasonsGetResponseBody" components: securitySchemes: bearerToken: @@ -2172,6 +1386,1553 @@ components: schemas: unavailable: type: object + TransactionItemsGetResponseBody: + type: object + properties: + transactionItems: + type: array + items: + type: object + properties: + transactionItemId: + type: string + example: afce35b2-1dff-4ace-98d0-4b9ac405c87d + sourceName: + type: string + example: Verkoopengine + transactionId: + type: string + example: 1001236 + transactionLineId: + type: string + nullable: true + example: 1 + name: + type: string + example: HTM Maandkorting 20% + quantity: + type: integer + example: 1 + taxCode: + type: string + example: V21 + amountExclTax: + type: integer + example: 100 + amountInclTax: + type: integer + example: 121 + amountTax: + type: integer + example: 21 + occurredOn: + type: string + format: date-time + example: 2024-10-04T00:00:00Z + type: + type: string + enum: + - debit + - credit + example: debit + productCode: + type: string + example: HTM-MND-20 + aggregationReference: + type: string + nullable: true + example: FIKO-123456 + accountingSystemReference: + type: string + nullable: true + example: U4F-123456 + required: + - transactionItemId + - sourceName + - transactionId + - name + - quantity + - taxCode + - amountExclTax + - amountInclTax + - amountTax + - occurredOn + - type + - productCode + href: + type: string + nullable: true + description: URI for pagination. + example: null + TransactionItemsPostRequestBody: + type: object + properties: + sourceName: + type: string + example: Verkoopengine + transactionId: + type: string + example: 1001236 + transactionLineId: + type: string + nullable: true + example: 1 + name: + type: string + example: HTM Maandkorting 20% + quantity: + type: integer + example: 1 + taxCode: + type: string + example: V21 + amountExclTax: + type: integer + example: 100 + amountInclTax: + type: integer + example: 121 + amountTax: + type: integer + example: 21 + occurredOn: + type: string + format: date-time + example: 2024-10-04T00:00:00Z + type: + type: string + enum: + - debit + - credit + example: debit + productCode: + type: string + example: HTM-MND-20 + required: + - sourceName + - transactionId + - name + - quantity + - taxCode + - amountExclTax + - amountInclTax + - amountTax + - occurredOn + - type + - productCode + TransactionItemsPostResponseBody: + type: object + properties: + transactionItemId: + type: string + format: uuid + example: afce35b2-1dff-4ace-98d0-4b9ac405c87d + required: + - transactionItemId + TransactionItemsBulkPostRequestBody: + type: object + properties: + transactionItems: + type: array + items: + type: object + properties: + sourceName: + type: string + example: Verkoopengine + transactionId: + type: string + example: 1001236 + transactionLineId: + type: string + nullable: true + example: 1 + name: + type: string + example: HTM Maandkorting 20% + quantity: + type: integer + example: 1 + taxCode: + type: string + example: V21 + amountExclTax: + type: integer + example: 100 + amountInclTax: + type: integer + example: 121 + amountTax: + type: integer + example: 21 + occurredOn: + type: string + format: date-time + example: 2024-10-04T00:00:00Z + type: + type: string + enum: + - debit + - credit + example: debit + productCode: + type: string + example: HTM-MND-20 + required: + - sourceName + - transactionId + - name + - quantity + - taxCode + - amountExclTax + - amountInclTax + - amountTax + - occurredOn + - type + - productCode + TransactionItemsBulkPostResponseBody: + type: array + items: + type: object + properties: + transactionItemId: + type: string + format: uuid + example: afce35b2-1dff-4ace-98d0-4b9ac405c87d + required: + - transactionItemId + TransactionItemsPatchRequestBody: + type: object + properties: + aggregationReference: + type: string + nullable: true + example: FIKO-123456 + accountingSystemReference: + type: string + nullable: true + example: U4F-123456 + TransactionItemsPatchResponseBody: + type: object + properties: + transactionItemId: + type: string + format: uuid + example: afce35b2-1dff-4ace-98d0-4b9ac405c87d + required: + - transactionItemId + ProcessingFailuresPostRequestBody: + type: object + properties: + department: + type: string + nullable: true + example: 900 + costCenter: + type: string + nullable: true + example: 84955 + costType: + type: string + nullable: true + example: 619031 + documentDate: + type: string + format: date + nullable: true + example: 2022-01-01 + documentCode: + type: string + nullable: true + example: VERK_FACTUUR + accountingPeriod: + type: string + nullable: true + example: 2024/10 + transactionDescription: + type: string + nullable: true + example: Dagkaart + contraAccountNumber: + type: string + nullable: true + example: 220.10419 + status: + type: string + enum: + - open + - returned to trx-db + - returned to src + example: open + occurence: + type: integer + example: 1 + processingFailureInstances: + type: array + items: + $ref: "#/components/schemas/ProcessingFailureInstancesPostRequestBody" + required: + - status + - occurence + - processingFailureInstances + ProcessingFailuresPostResponseBody: + type: object + properties: + processingFailureId: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: + - processingFailureId + ProcessingFailuresGetResponseBody: + type: object + properties: + processingFailures: + type: array + items: + type: object + properties: + processingFailureId: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + transactionItemId: + type: string + format: uuid + example: 2d77d978-7141-499a-84ad-93fad8ee03ce + department: + type: string + nullable: true + example: 900 + costCenter: + type: string + nullable: true + example: 84955 + costType: + type: string + nullable: true + example: 619031 + documentDate: + type: string + format: date + nullable: true + example: 2022-01-01 + documentCode: + type: string + nullable: true + example: VERK_FACTUUR + accountingPeriod: + type: string + nullable: true + example: 2024/10 + transactionDescription: + type: string + nullable: true + example: Dagkaart + contraAccountNumber: + type: string + nullable: true + example: 220.10419 + status: + type: string + enum: + - open + - returned to trx-db + - returned to src + example: open + occurence: + type: integer + example: 1 + processingFailureInstances: + type: array + items: + type: object + properties: + processingFailureInstanceId: + type: string + format: uuid + example: 9afa9a6b-5b6a-4b0a-9c9e-4b0a5b6a4b0a + timestamp: + type: string + format: date-time + example: 2022-01-01 00:00:00 + failureReason: + $ref: "#/components/schemas/FailureReason" + element: + type: string + example: costCenter + occurence: + type: integer + example: 1 + change: + type: string + nullable: true + example: Adapt config + required: + - processingFailureInstanceId + - timestamp + - failureReason + - element + - occurence + required: + - processingFailureId + - transactionItemId + - status + - occurence + - processingFailureInstances + href: + type: string + nullable: true + description: URI for pagination. + example: null + ProcessingFailuresPatchRequestBody: + type: object + properties: + status: + type: string + enum: + - open + - returned to trx-db + - returned to src + nullable: true + example: returned to trx-db + occurence: + type: integer + nullable: true + example: 2 + ProcessingFailuresPatchResponseBody: + type: object + properties: + processingFailureId: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: + - processingFailureId + ProcessingFailureInstancesPostRequestBody: + type: object + properties: + timestamp: + type: string + format: date-time + example: 2022-01-01 00:00:00 + failureReasonId: + type: integer + example: 1 + element: + type: string + example: costCenter + occurence: + type: integer + example: 1 + change: + type: string + nullable: true + example: Adapt config + required: + - timestamp + - failureReason + - element + - occurence + ProcessingFailureInstancesPostResponseBody: + type: object + properties: + processingFailureInstanceId: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: + - processingFailureInstanceId + ProcessingFailureInstancesPatchRequestBody: + type: object + properties: + timestamp: + type: string + format: date-time + nullable: true + example: 2022-01-01 00:00:00 + occurence: + type: integer + nullable: true + example: 1 + change: + type: string + nullable: true + example: Adapt config + ProcessingFailureInstancesPatchResponseBody: + type: object + properties: + processingFailureInstanceId: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: + - processingFailureInstanceId + TransactionAuditTrailsPostRequestBody: + type: object + properties: + user: + type: string + example: fiko + timestamp: + type: string + format: date-time + example: 2022-01-01 00:00:00 + action: + type: string + enum: + - created + - succeeded + - failed + - returned to trx-db + - returned to src + example: created + description: + type: string + nullable: true + example: Transaction created. + correlationId: + type: string + format: uuid + nullable: true + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: + - user + - timestamp + - action + TransactionAuditTrailsPostResponseBody: + type: object + properties: + transactionAuditTrailId: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: + - transactionAuditTrailId + TransactionAuditTrailsGetResponseBody: + type: object + properties: + transactionAuditTrails: + type: array + items: + type: object + properties: + transactionAuditTrailId: + type: string + format: uuid + example: afce35b2-1dff-4ace-98d0-4b9ac405c87d + transactionItemId: + type: string + format: uuid + example: d667d293-aa82-4c9e-9b10-77cffc9058a1 + user: + type: string + example: fiko + timestamp: + type: string + format: date-time + example: 2022-01-01 00:00:00 + action: + type: string + enum: + - created + - succeeded + - failed + - returned to trx-db + - returned to src + example: created + description: + type: string + nullable: true + example: Transaction created. + correlationId: + type: string + format: uuid + nullable: true + example: a3891560-3084-42cb-867c-f289e7cda47d + required: + - transactionAuditTrailId + - transactionItemId + - user + - timestamp + - action + href: + type: string + nullable: true + example: null + required: + - transactionAuditTrails + MetadataAuditTrailsGetResponseBody: + type: object + properties: + metadataAuditTrails: + type: array + items: + type: object + properties: + metadataAuditTrailId: + type: string + format: uuid + example: b6161270-eb08-4242-90ec-967d5db62070 + source: + type: string + example: FMT + endpoint: + type: string + format: url + example: https://dev.api.htm.nl/v2/productmetadata + operation: + type: string + enum: + - GET + - POST + - PATCH + - DELETE + example: POST + requestBody: + type: string + format: json + example: { "json": "data" } + responseCode: + type: integer + example: 200 + responseBody: + type: string + format: json + example: { "json": "data" } + user: + type: string + example: r.meeuws + timestamp: + type: string + format: date-time + example: 2022-01-01 00:00:00 + correlationId: + type: string + format: uuid + nullable: true + example: 662de47c-d809-41bd-b3f6-5c7e1dc5c030 + required: + - metadataAuditTrailId + - source + - endpoint + - operation + - requestBody + - responseCode + - responseBody + - user + - timestamp + href: + type: string + nullable: true + example: null + required: + - metadataAuditTrails + MetadataAuditTrailsPostRequestBody: + type: object + properties: + source: + type: string + example: FMT + endpoint: + type: string + format: url + example: https://dev.api.htm.nl/v2/productmetadata + operation: + type: string + enum: + - GET + - POST + - PATCH + - DELETE + example: POST + requestBody: + type: string + format: json + example: { "json": "data" } + responseCode: + type: integer + example: 200 + responseBody: + type: string + format: json + example: { "json": "data" } + user: + type: string + example: r.meeuws + timestamp: + type: string + format: date-time + example: 2022-01-01 00:00:00 + correlationId: + type: string + format: uuid + nullable: true + example: 662de47c-d809-41bd-b3f6-5c7e1dc5c030 + required: + - source + - endpoint + - operation + - requestBody + - responseCode + - responseBody + - user + - timestamp + MetadataAuditTrailsPostResponseBody: + type: object + properties: + metadataAuditTrailId: + type: string + format: uuid + example: b6161270-eb08-4242-90ec-967d5db62070 + required: + - metadataAuditTrailId + ProductMetadataGetResponseBody: + type: object + properties: + productMetadata: + type: array + items: + type: object + properties: + productMetadataId: + type: string + format: uuid + example: 39a87c2a-9011-4dfd-b35e-1245a98c2e61 + productCode: + type: string + example: 4031 + department: + type: string + example: 900 + costType: + type: string + example: 619031 + description: + type: string + example: O4031_Reisproduct HTM 1 dag Anoniem + documentCode: + type: string + example: VERK_FACTUUR + timestampUpdated: + type: string + format: date-time + example: 2022-01-01T00:00:00 + validFrom: + type: string + format: date-time + example: 2024-03-22T09:00:00 + validUntil: + type: string + format: date-time + nullable: true + example: null + productContraAccounts: + type: array + items: + type: object + properties: + contraAccountMetadata: + $ref: "#/components/schemas/ContraAccountMetadata" + concession: + $ref: "#/components/schemas/Concession" + sourceMetadata: + $ref: "#/components/schemas/SourceMetadata" + costCenter: + type: string + example: 84955 + validFrom: + type: string + format: date-time + example: 2024-03-22T09:00:00 + validUntil: + type: string + format: date-time + nullable: true + example: null + required: + - contraAccountMetadata + - concession + - sourceMetadata + - costCenter + - validFrom + required: + - productMetadataId + - productCode + - department + - costType + - description + - documentCode + - timestampUpdated + - validFrom + - productContraAccounts + href: + type: string + nullable: true + description: URI for pagination. + example: null + ProductMetadataPostRequestBody: + type: object + properties: + productCode: + type: string + example: 4031 + department: + type: string + example: 900 + costType: + type: string + example: 619031 + description: + type: string + example: O4031_Reisproduct HTM 1 dag Anoniem + documentCode: + type: string + example: VERK_FACTUUR + timestampUpdated: + type: string + format: date-time + example: 2022-01-01T00:00:00 + validFrom: + type: string + format: date-time + example: 2024-03-22T09:00:00 + validUntil: + type: string + format: date-time + nullable: true + example: null + required: + - productCode + - department + - costType + - description + - documentCode + - timestampUpdated + - validFrom + ProductMetadataPostResponseBody: + type: object + properties: + productMetadataId: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: + - productMetadataId + ProductMetadataPatchRequestBody: + type: object + properties: + productCode: + type: string + example: 4031 + department: + type: string + example: 900 + costType: + type: string + example: 619031 + description: + type: string + example: O4031_Reisproduct HTM 1 dag Anoniem + documentCode: + type: string + example: VERK_FACTUUR + timestampUpdated: + type: string + format: date-time + example: 2022-01-01T00:00:00 + validFrom: + type: string + format: date-time + example: 2024-03-22T09:00:00 + validUntil: + type: string + format: date-time + nullable: true + example: 2024-06-22T09:00:00 + ProductMetadataPatchResponseBody: + type: object + properties: + productMetadataId: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: + - productMetadataId + ProductContraAccountsPostRequestBody: + type: object + properties: + contraAccountMetadataId: + type: string + format: uuid + example: e0af8c8f-d421-4567-a14e-48e2a1bb86fb + concessionId: + type: integer + example: 1 + sourceMetadataId: + type: string + format: uuid + example: 08d96f94-f468-467e-9068-c86c34f43097 + costCenter: + type: string + example: 84955 + validFrom: + type: string + format: date-time + example: 2024-03-22T09:00:00 + validUntil: + type: string + format: date-time + nullable: true + example: null + required: + - contraAccountMetadataId + - concessionId + - sourceMetadataId + - costCenter + - validFrom + ProductContraAccountsPostResponseBody: + type: object + properties: + productContraAccountId: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: + - productContraAccountId + ProductContraAccountsGetResponseBody: + type: object + properties: + productContraAccounts: + type: array + items: + type: object + properties: + productContraAccountId: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + contraAccountMetadata: + $ref: "#/components/schemas/ContraAccountMetadata" + concession: + $ref: "#/components/schemas/Concession" + sourceMetadata: + $ref: "#/components/schemas/SourceMetadata" + costCenter: + type: string + example: 84955 + validFrom: + type: string + format: date-time + example: 2024-03-22T09:00:00 + validUntil: + type: string + format: date-time + nullable: true + example: null + required: + - productContraAccountId + - contraAccountMetadataId + - concessionId + - sourceMetadataId + - costCenter + - validFrom + href: + type: string + nullable: true + description: URI for pagination. + example: null + ProductContraAccountsPatchRequestBody: + type: object + properties: + contraAccountMetadataId: + type: string + format: uuid + example: e0af8c8f-d421-4567-a14e-48e2a1bb86fb + concessionId: + type: integer + example: 1 + sourceMetadataId: + type: string + format: uuid + example: 08d96f94-f468-467e-9068-c86c34f43097 + costCenter: + type: string + example: 84955 + validFrom: + type: string + format: date-time + example: 2024-03-22T09:00:00 + validUntil: + type: string + format: date-time + nullable: true + example: null + ProductContraAccountsPatchResponseBody: + type: object + properties: + productContraAccountId: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: + - productContraAccountId + ContraAccountMetadataGetResponseBody: + type: object + properties: + contraAccountMetadata: + type: array + items: + $ref: "#/components/schemas/ContraAccountMetadata" + href: + type: string + nullable: true + description: URI for pagination. + example: null + ContraAccountMetadataPostRequestBody: + type: object + properties: + contraAccountCode: + type: string + example: 123456 + contraAccountNumber: + type: string + example: 220.10419 + validFrom: + type: string + format: date-time + example: 2024-03-22T09:00:00 + validUntil: + type: string + format: date-time + nullable: true + example: null + required: + - contraAccountCode + - contraAccountNumber + - validFrom + ContraAccountMetadataPostResponseBody: + type: object + properties: + contraAccountMetadataId: + type: string + format: uuid + example: e0af8c8f-d421-4567-a14e-48e2a1bb86fb + required: + - contraAccountMetadataId + ContraAccountMetadataPatchRequestBody: + type: object + properties: + contraAccountCode: + type: string + example: 123456 + contraAccountNumber: + type: string + example: 220.10419 + validFrom: + type: string + format: date-time + example: 2024-03-22T09:00:00 + validUntil: + type: string + format: date-time + nullable: true + example: null + ContraAccountMetadataPatchResponseBody: + type: object + properties: + contraAccountMetadataId: + type: string + format: uuid + example: e0af8c8f-d421-4567-a14e-48e2a1bb86fb + required: + - contraAccountMetadataId + TaxMetadataGetResponseBody: + type: object + properties: + taxMetadata: + type: array + items: + type: object + properties: + taxMetadataId: + type: string + format: uuid + example: 192882fe-3f51-46bb-bfdb-2e4cb31ef925 + taxCode: + type: string + example: V21 + taxPercentageAmount: + type: integer + example: 21 + description: + type: string + example: BTW VERKOOP HOOG 21% + validFrom: + type: string + format: date-time + example: 2024-03-22T09:00:00 + validUntil: + type: string + format: date-time + nullable: true + example: null + required: + - taxMetadataId + - taxCode + - taxPercentageAmount + - description + - validFrom + href: + type: string + nullable: true + description: URI for pagination. + example: null + TaxMetadataPostRequestBody: + type: object + properties: + taxCode: + type: string + example: V21 + taxPercentageAmount: + type: integer + example: 21 + description: + type: string + example: BTW VERKOOP HOOG 21% + validFrom: + type: string + format: date-time + example: 2024-03-22T09:00:00 + validUntil: + type: string + format: date-time + nullable: true + example: null + required: + - taxCode + - taxPercentageAmount + - description + - validFrom + TaxMetadataPostResponseBody: + type: object + properties: + taxMetadataId: + type: string + format: uuid + example: 192882fe-3f51-46bb-bfdb-2e4cb31ef925 + required: + - taxMetadataId + TaxMetadataPatchRequestBody: + type: object + properties: + taxCode: + type: string + example: V21 + taxPercentageAmount: + type: integer + example: 21 + description: + type: string + example: BTW VERKOOP HOOG 21% + validFrom: + type: string + format: date-time + example: 2024-03-22T09:00:00 + validUntil: + type: string + format: date-time + nullable: true + example: null + TaxMetadataPatchResponseBody: + type: object + properties: + taxMetadataId: + type: string + format: uuid + example: 192882fe-3f51-46bb-bfdb-2e4cb31ef925 + required: + - taxMetadataId + SourceMetadataGetResponseBody: + type: object + properties: + sourceMetadata: + type: array + items: + $ref: '#/components/schemas/SourceMetadata' + href: + type: string + nullable: true + description: URI for pagination. + example: null + SourceMetadataPostRequestBody: + type: object + properties: + incomingName: + type: string + example: VerkoopEngine + incomingEntity: + type: string + example: OrderLine + outgoingName: + type: string + example: Website Verkopen + businessOwner: + type: string + example: Corneel Verstoep + rejectionProcessing: + type: string + example: system + rejectionInfo: + type: string + example: api.htm.nl/v2/account/12345/msgs/abc + validFrom: + type: string + format: date-time + example: 2024-01-01T00:00:00.000 + validUntil: + type: string + format: date-time + nullable: true + example: null + required: + - sourceMetadataId + - incomingName + - incomingEntity + - outgoingName + - businessOwner + - rejectionProcessing + - rejectionInfo + - validFrom + SourceMetadataPostResponseBody: + type: object + properties: + sourceMetadataId: + type: string + format: uuid + example: e0af8c8f-d421-4567-a14e-48e2a1bb86fb + required: + - sourceMetadataId + SourceMetadataPatchRequestBody: + type: object + properties: + incomingName: + type: string + example: VerkoopEngine + incomingEntity: + type: string + example: OrderLine + outgoingName: + type: string + example: Website Verkopen + businessOwner: + type: string + example: Corneel Verstoep + rejectionProcessing: + type: string + example: system + rejectionInfo: + type: string + example: api.htm.nl/v2/account/12345/msgs/abc + validFrom: + type: string + format: date-time + example: 2024-01-01T00:00:00.000 + validUntil: + type: string + format: date-time + nullable: true + example: null + SourceMetadataPatchResponseBody: + type: object + properties: + sourceMetadataId: + type: string + format: uuid + example: e0af8c8f-d421-4567-a14e-48e2a1bb86fb + required: + - sourceMetadataId + AccountingPeriodMetadataGetResponseBody: + type: object + properties: + accountingPeriodMetadata: + type: array + items: + type: object + properties: + accountingPeriodMetadataId: + type: string + format: uuid + example: e0af8c8f-d421-4567-a14e-48e2a1bb86fb + accountingPeriod: + type: string + example: 2024-01 + isOpen: + type: boolean + example: true + required: + - accountingPeriodMetadataId + - accountingPeriod + - isOpen + href: + type: string + nullable: true + description: URI for pagination. + example: null + AccountingPeriodMetadataPostRequestBody: + type: object + properties: + accountingPeriod: + type: string + example: 2024-01 + isOpen: + type: boolean + example: true + required: + - accountingPeriod + - isOpen + AccountingPeriodMetadataPostResponseBody: + type: object + properties: + accountingPeriodMetadataId: + type: string + format: uuid + example: e0af8c8f-d421-4567-a14e-48e2a1bb86fb + required: + - accountingPeriodMetadataId + AccountingPeriodMetadataPatchRequestBody: + type: object + properties: + accountingPeriod: + type: string + example: 2024-01 + isOpen: + type: boolean + example: true + AccountingPeriodMetadataPatchResponseBody: + type: object + properties: + accountingPeriodMetadataId: + type: string + format: uuid + example: e0af8c8f-d421-4567-a14e-48e2a1bb86fb + required: + - accountingPeriodMetadataId + ConcessionMetadataGetResponseBody: + type: object + properties: + concessionMetadata: + type: array + items: + type: object + properties: + concessionMetadataId: + type: string + format: uuid + example: e0af8c8f-d421-4567-a14e-48e2a1bb86fb + concession: + $ref: '#/components/schemas/Concession' + percentage: + type: number + example: 84.021 + validFrom: + type: string + format: date-time + example: 2024-01-01T00:00:00.000 + validUntil: + type: string + format: date-time + nullable: true + example: null + required: + - concessionMetadataId + - concession + - percentage + - validFrom + href: + type: string + nullable: true + description: URI for pagination. + example: null + ConcessionMetadataPostRequestBody: + type: object + properties: + concessionId: + type: integer + example: 1 + percentage: + type: number + example: 84.021 + validFrom: + type: string + format: date-time + example: 2024-01-01T00:00:00.000 + validUntil: + type: string + format: date-time + nullable: true + example: null + required: + - concessionId + - percentage + - validFrom + ConcessionMetadataPostResponseBody: + type: object + properties: + concessionMetadataId: + type: string + format: uuid + example: e0af8c8f-d421-4567-a14e-48e2a1bb86fb + required: + - concessionMetadataId + ConcessionMetadataPatchRequestBody: + type: object + properties: + concessionId: + type: integer + example: 1 + percentage: + type: number + example: 84.021 + validFrom: + type: string + format: date-time + example: 2024-01-01T00:00:00.000 + validUntil: + type: string + format: date-time + nullable: true + example: null + ConcessionMetadataPatchResponseBody: + type: object + properties: + concessionMetadataId: + type: string + format: uuid + example: e0af8c8f-d421-4567-a14e-48e2a1bb86fb + required: + - concessionMetadataId + ConcessionsGetResponseBody: + type: object + properties: + concessions: + type: array + items: + $ref: '#/components/schemas/Concession' + href: + type: string + nullable: true + description: URI for pagination. + example: null + FailureReasonsGetResponseBody: + type: object + properties: + failureReasons: + type: array + items: + $ref: '#/components/schemas/FailureReason' + href: + type: string + nullable: true + description: URI for pagination. + example: null + ContraAccountMetadata: + type: object + properties: + contraAccountMetadataId: + type: string + format: uuid + example: e0af8c8f-d421-4567-a14e-48e2a1bb86fb + contraAccountCode: + type: string + example: 123456 + contraAccountNumber: + type: string + example: 220.10419 + validFrom: + type: string + format: date-time + example: 2024-03-22T09:00:00 + validUntil: + type: string + format: date-time + nullable: true + example: null + required: + - contraAccountMetadataId + - contraAccountCode + - contraAccountNumber + - validFrom + Concession: + type: object + properties: + concessionId: + type: integer + example: 1 + name: + type: string + example: bus + required: + - concessionId + SourceMetadata: + type: object + properties: + sourceMetadataId: + type: string + format: uuid + example: bc4ea24a-27a5-40e8-bbbc-57a105afaaa0 + incomingName: + type: string + example: VerkoopEngine + incomingEntity: + type: string + example: OrderLine + outgoingName: + type: string + example: Website Verkopen + businessOwner: + type: string + example: Corneel Verstoep + rejectionProcessing: + type: string + example: system + rejectionInfo: + type: string + example: api.htm.nl/v2/account/12345/msgs/abc + validFrom: + type: string + format: date-time + example: 2024-01-01T00:00:00.000 + validUntil: + type: string + format: date-time + nullable: true + example: null + required: + - sourceMetadataId + - incomingName + - incomingEntity + - outgoingName + - businessOwner + - rejectionProcessing + - rejectionInfo + - validFrom + FailureReason: + type: object + properties: + failureReasonId: + type: integer + example: 2 + reasonCode: + type: string + example: "002" + reasonDesc: + type: string + example: Contra account does not exist + required: + - failureReasonId + - reasonCode + - reasonDesc rfc9457: type: object properties: @@ -2198,10 +2959,3 @@ 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/plugins/gitea-add-swagger-button.user.js b/src/plugins/gitea-add-swagger-button.user.js new file mode 100644 index 0000000..e702cc3 --- /dev/null +++ b/src/plugins/gitea-add-swagger-button.user.js @@ -0,0 +1,52 @@ +// ==UserScript== +// @name gitea-add-swagger-button +// @namespace https://integratielaag.nl/ +// @version 0.1.1 +// @description Creates a button in Gitea to view Swagger +// @author bboterm +// @match https://git.integratielaag.nl/*.yaml +// @match https://git.integratielaag.nl/*.json +// @icon https://www.google.com/s2/favicons?sz=64&domain=gitea.com +// @grant none +// @updateURL https://git.integratielaag.nl/HTM/ovpay/raw/branch/develop/src/plugins/gitea-add-swagger-button.user.js +// @downloadURL https://git.integratielaag.nl/HTM/ovpay/raw/branch/develop/src/plugins/gitea-add-swagger-button.user.js +// ==/UserScript== +// @history 0.1.0 Initial release +// @history 0.1.1 Added support for YAML and JSON files + +(function() { + 'use strict'; + + // Set the base URL for the Swagger instance + const swaggerBaseURL = 'https://swagger.integratielaag.nl/?url='; + // Get the base URL from the current webpage + const gitBaseURL = window.location.origin; + + // Replace 'parent-class-name' with the class name of the parent div + const parentClassName = 'file-actions'; + // Replace 'child-class-name' with the class name of the child div + const childClassName = 'buttons'; + + const parentDiv = document.querySelector('div.file-actions'); + if (parentDiv) { + const childDiv = parentDiv.querySelector('div.buttons'); + if (childDiv) { + const firstATag = childDiv.querySelector('a'); + if (firstATag) { + // Get the URL of the raw file + const hrefValue = firstATag.getAttribute('href'); + // Create a string literal for the new Swagger button + const swaggerButton = `Swagger`; + // Add the Swagger button to the HTML + childDiv.innerHTML = swaggerButton + childDiv.innerHTML; + } else { + console.log('No tag found inside the child div.'); + } + } else { + console.log(`Child div with class '${childClassName}' not found.`); + } + } else { + console.log(`Parent div with class '${parentClassName}' not found.`); + } +})(); +