From 1c8183632aa873fcf90a7d73a1ca7dd22efbeac9 Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Wed, 1 Oct 2025 14:01:43 +0200 Subject: [PATCH 1/9] OVPAY-2186 - Updated examples. --- src/openapi/contracts/contracts-crud.yaml | 86 +++++++++++------------ 1 file changed, 40 insertions(+), 46 deletions(-) diff --git a/src/openapi/contracts/contracts-crud.yaml b/src/openapi/contracts/contracts-crud.yaml index 63bd2ef..2f755cb 100644 --- a/src/openapi/contracts/contracts-crud.yaml +++ b/src/openapi/contracts/contracts-crud.yaml @@ -48,8 +48,6 @@ paths: "touchpointId": 2, "contractStatus": { "contractStatusId": 2, "name": "active" }, - "productId": 1, - "productName": "HTM Maand 20% korting", "termDuration": "P0Y1M0D", "billingDay": 15, "highestInvoiceTerm": 1, @@ -64,8 +62,6 @@ paths: "touchpointId": 2, "contractStatus": { "contractStatusId": 1, "name": "new" }, - "productId": 1, - "productName": "HTM Maand 20% korting", "termDuration": "P0Y1M0D", "billingDay": 15, "highestInvoiceTerm": 1, @@ -91,8 +87,6 @@ paths: "orderLineId": "52efbbfc-8c28-4016-9ece-dc3ef9a70bd8", "touchpointId": 2, "contractStatusId": 1, - "productId": 1, - "productName": "HTM Maand 20% korting", "termDuration": "P0Y1M0D", "billingDay": 15, "highestInvoiceTerm": 0, @@ -100,10 +94,11 @@ paths: [ { "termsAndConditions": "https://www.htm.nl/reisproducten/productvoorwaarden/htm-maandkorting/", - "termAmountExclTax": 1200, - "taxCode": "V21", - "taxAmount": 108, - "termAmountInclTax": 1308, + "productId": 1, + "productName": "HTM Maand 20% korting", + "taxCode": "V9", + "taxPercentage": 9.0, + "termAmountInclTax": 400, "start": "2024-07-04 15:01:00.000", "end": "", }, @@ -198,8 +193,6 @@ paths: "touchpointId": 2, "contractStatus": { "contractStatusId": 2, "name": "active" }, - "productId": 1, - "productName": "HTM Maand 20% korting", "termDuration": "P0Y1M0D", "billingDay": 15, "highestInvoiceTerm": 1, @@ -257,20 +250,22 @@ paths: { "contractVersionId": 1, "termsAndConditions": "https://www.htm.nl/reisproducten/productvoorwaarden/htm-maandkorting/", - "termAmountExclTax": 1200, - "taxCode": "V21", - "taxAmount": 108, - "termAmountInclTax": 1308, + "productId": 1, + "productName": "HTM Maand 20% korting", + "taxCode": "V9", + "taxPercentage": 9.0, + "termAmountInclTax": 400, "start": "2024-07-04 15:01:00.000", "end": "2024-12-31 15:01:00.000", }, { "contractVersionId": 2, "termsAndConditions": "https://www.htm.nl/reisproducten/productvoorwaarden/htm-maandkorting/", - "termAmountExclTax": 1300, - "taxCode": "V21", - "taxAmount": 117, - "termAmountInclTax": 1417, + "productId": 1, + "productName": "HTM Maand 20% korting", + "taxCode": "V9", + "taxPercentage": 9.0, + "termAmountInclTax": 400, "start": "2025-01-01 15:01:00.000", }, ], @@ -284,8 +279,6 @@ paths: "touchpointId": 2, "contractStatus": { "contractStatusId": 1, "name": "new" }, - "productId": 1, - "productName": "HTM Maand 20% korting", "termDuration": "P0Y1M0D", "billingDay": 15, "highestInvoiceTerm": 1, @@ -343,20 +336,22 @@ paths: { "contractVersionId": 1, "termsAndConditions": "https://www.htm.nl/reisproducten/productvoorwaarden/htm-maandkorting/", - "termAmountExclTax": 1200, - "taxCode": "V21", - "taxAmount": 108, - "termAmountInclTax": 1308, + "productId": 1, + "productName": "HTM Maand 20% korting", + "taxCode": "V9", + "taxPercentage": 9.0, + "termAmountInclTax": 400, "start": "2024-07-04 15:01:00.000", "end": "2024-12-31 15:01:00.000", }, { "contractVersionId": 2, "termsAndConditions": "https://www.htm.nl/reisproducten/productvoorwaarden/htm-maandkorting/", - "termAmountExclTax": 1300, - "taxCode": "V21", - "taxAmount": 117, - "termAmountInclTax": 1417, + "productId": 1, + "productName": "HTM Maand 20% korting", + "taxCode": "V9", + "taxPercentage": 9.0, + "termAmountInclTax": 400, "start": "2025-01-01 15:01:00.000", }, ], @@ -397,8 +392,6 @@ paths: "touchpointId": 2, "contractStatus": { "contractStatusId": 2, "name": "active" }, - "productId": 1, - "productName": "HTM Maand 20% korting", "termDuration": "P0Y1M0D", "billingDay": 15, "highestInvoiceTerm": 1, @@ -407,20 +400,22 @@ paths: { "contractVersionId": 1, "termsAndConditions": "https://www.htm.nl/reisproducten/productvoorwaarden/htm-maandkorting/", - "termAmountExclTax": 1200, - "taxCode": "V21", - "taxAmount": 108, - "termAmountInclTax": 1308, + "productId": 1, + "productName": "HTM Maand 20% korting", + "taxCode": "V9", + "taxPercentage": 9.0, + "termAmountInclTax": 400, "start": "2024-07-04 15:01:00.000", "end": "2024-12-31 15:01:00.000", }, { "contractVersionId": 2, "termsAndConditions": "https://www.htm.nl/reisproducten/productvoorwaarden/htm-maandkorting/", - "termAmountExclTax": 1300, - "taxCode": "V21", - "taxAmount": 117, - "termAmountInclTax": 1417, + "productId": 1, + "productName": "HTM Maand 20% korting", + "taxCode": "V9", + "taxPercentage": 9.0, + "termAmountInclTax": 400, "start": "2025-01-01 15:01:00.000", }, ], @@ -486,8 +481,6 @@ paths: "contract": { "contractStatusId": 2, - "productId": 1, - "productName": "HTM 20% korting 2024", "billingDay": 15, "highestInvoiceTerm": 2, }, @@ -532,10 +525,11 @@ paths: "contractVersion": { "termsAndConditions": "https://www.htm.nl/reisproducten/productvoorwaarden/htm-maandkorting/", - "termAmountExclTax": 1200, - "taxCode": "V21", - "taxAmount": 108, - "termAmountInclTax": 1308, + "productId": 1, + "productName": "HTM Maand 20% korting", + "taxCode": "V9", + "taxPercentage": 9.0, + "termAmountInclTax": 400, "start": "2024-07-08 15:01:00.000", "end": "", }, From 966602d8b0423d603bdc9ded3260ba8fdefabefa Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Wed, 1 Oct 2025 14:15:57 +0200 Subject: [PATCH 2/9] OVPAY-2186 - Updated schema. --- src/openapi/contracts/contracts-crud.yaml | 24 +++++++++++------------ 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/src/openapi/contracts/contracts-crud.yaml b/src/openapi/contracts/contracts-crud.yaml index 2f755cb..e363b19 100644 --- a/src/openapi/contracts/contracts-crud.yaml +++ b/src/openapi/contracts/contracts-crud.yaml @@ -1111,12 +1111,6 @@ components: contractStatus: type: object $ref: "#/components/schemas/ContractStatus" - productId: - type: integer - example: 1 - productName: - type: string - example: HTM Maand 20% korting termDuration: type: string format: ISO8601 @@ -1184,18 +1178,22 @@ components: type: string format: url example: https://www.htm.nl/reisproducten/productvoorwaarden/htm-maandkorting/ - termAmountExclTax: + productId: type: integer - example: 1200 + example: 1 + productName: + type: string + example: HTM Maand 20% korting taxCode: type: string - example: V21 - taxAmount: - type: integer - example: 108 + example: V9 + taxPercentage: + type: number + format: float + example: 9.0 termAmountInclTax: type: integer - example: 1308 + example: 400 start: type: string format: date-time From 9950cadcf377d35cb5fe6ad732047f3aec1ac43e Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Wed, 1 Oct 2025 14:23:44 +0200 Subject: [PATCH 3/9] OVPAY-2186 - Updated SE examples. --- src/openapi/contracts/contracts-se.yaml | 44 +++++++++++-------------- 1 file changed, 20 insertions(+), 24 deletions(-) diff --git a/src/openapi/contracts/contracts-se.yaml b/src/openapi/contracts/contracts-se.yaml index 5b03035..471f7e0 100644 --- a/src/openapi/contracts/contracts-se.yaml +++ b/src/openapi/contracts/contracts-se.yaml @@ -44,8 +44,6 @@ paths: "touchpointId": 2, "contractStatus": { "contractStatusId": 2, "name": "active" }, - "productId": 1, - "productName": "HTM Maand 20% korting", "termDuration": "P0Y1M0D", "billingDay": 15, "highestInvoiceTerm": 1, @@ -69,8 +67,6 @@ paths: "touchpointId": 2, "contractStatus": { "contractStatusId": 1, "name": "new" }, - "productId": 1, - "productName": "HTM Maand 20% korting", "termDuration": "P0Y1M0D", "billingDay": 15, "highestInvoiceTerm": 1, @@ -153,8 +149,6 @@ paths: "touchpointId": 2, "contractStatus": { "contractStatusId": 2, "name": "active" }, - "productId": 1, - "productName": "HTM Maand 20% korting", "termDuration": "P0Y1M0D", "billingDay": 15, "highestInvoiceTerm": 1, @@ -164,20 +158,22 @@ paths: { "contractVersionId": 1, "termsAndConditions": "https://www.htm.nl/reisproducten/productvoorwaarden/htm-maandkorting/", - "termAmountExclTax": 1200, - "taxCode": "V21", - "taxAmount": 108, - "termAmountInclTax": 1308, + "productId": 1, + "productName": "HTM Maand 20% korting", + "taxCode": "V9", + "taxPercentage": 9.0, + "termAmountInclTax": 400, "start": "2024-07-04 15:01:00.000", "end": "2024-12-31 15:01:00.000", }, { "contractVersionId": 2, "termsAndConditions": "https://www.htm.nl/reisproducten/productvoorwaarden/htm-maandkorting/", - "termAmountExclTax": 1300, - "taxCode": "V21", - "taxAmount": 117, - "termAmountInclTax": 1417, + "productId": 1, + "productName": "HTM Maand 20% korting", + "taxCode": "V9", + "taxPercentage": 9.0, + "termAmountInclTax": 400, "start": "2025-01-01 15:01:00.000", }, ], @@ -498,8 +494,6 @@ paths: "touchpointId": 2, "contractStatus": { "contractStatusId": 2, "name": "active" }, - "productId": 1, - "productName": "HTM Maand 20% korting", "termDuration": "P0Y1M0D", "billingDay": 15, "highestInvoiceTerm": 1, @@ -509,20 +503,22 @@ paths: { "contractVersionId": 1, "termsAndConditions": "https://www.htm.nl/reisproducten/productvoorwaarden/htm-maandkorting/", - "termAmountExclTax": 1200, - "taxCode": "V21", - "taxAmount": 108, - "termAmountInclTax": 1308, + "productId": 1, + "productName": "HTM Maand 20% korting", + "taxCode": "V9", + "taxPercentage": 9.0, + "termAmountInclTax": 400, "start": "2024-07-04 15:01:00.000", "end": "2024-12-31 15:01:00.000", }, { "contractVersionId": 2, "termsAndConditions": "https://www.htm.nl/reisproducten/productvoorwaarden/htm-maandkorting/", - "termAmountExclTax": 1300, - "taxCode": "V21", - "taxAmount": 117, - "termAmountInclTax": 1417, + "productId": 1, + "productName": "HTM Maand 20% korting", + "taxCode": "V9", + "taxPercentage": 9.0, + "termAmountInclTax": 400, "start": "2025-01-01 15:01:00.000", }, ], From 90559cd633e32fb884ddde986d0e3ed5d0d23246 Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Wed, 1 Oct 2025 15:37:42 +0200 Subject: [PATCH 4/9] OVPAY-2186 - Re-added product (as joined field) on contract-level. --- src/openapi/contracts/contracts-se.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/openapi/contracts/contracts-se.yaml b/src/openapi/contracts/contracts-se.yaml index 471f7e0..1a7fd29 100644 --- a/src/openapi/contracts/contracts-se.yaml +++ b/src/openapi/contracts/contracts-se.yaml @@ -44,6 +44,8 @@ paths: "touchpointId": 2, "contractStatus": { "contractStatusId": 2, "name": "active" }, + "productId": 1, + "productName": "HTM Maand 20% korting", "termDuration": "P0Y1M0D", "billingDay": 15, "highestInvoiceTerm": 1, @@ -67,6 +69,8 @@ paths: "touchpointId": 2, "contractStatus": { "contractStatusId": 1, "name": "new" }, + "productId": 1, + "productName": "HTM Maand 20% korting", "termDuration": "P0Y1M0D", "billingDay": 15, "highestInvoiceTerm": 1, @@ -149,6 +153,8 @@ paths: "touchpointId": 2, "contractStatus": { "contractStatusId": 2, "name": "active" }, + "productId": 1, + "productName": "HTM Maand 20% korting", "termDuration": "P0Y1M0D", "billingDay": 15, "highestInvoiceTerm": 1, @@ -494,6 +500,8 @@ paths: "touchpointId": 2, "contractStatus": { "contractStatusId": 2, "name": "active" }, + "productId": 1, + "productName": "HTM Maand 20% korting", "termDuration": "P0Y1M0D", "billingDay": 15, "highestInvoiceTerm": 1, From 581d9a065837ce3bfe50d7f462130b0817ea02ab Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Wed, 1 Oct 2025 15:46:28 +0200 Subject: [PATCH 5/9] OVPAY-2186 - Added contractversion to /customers/{customerProfileId}/contracts. --- src/openapi/contracts/contracts-crud.yaml | 27 +++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/openapi/contracts/contracts-crud.yaml b/src/openapi/contracts/contracts-crud.yaml index e363b19..a3043c2 100644 --- a/src/openapi/contracts/contracts-crud.yaml +++ b/src/openapi/contracts/contracts-crud.yaml @@ -52,6 +52,19 @@ paths: "billingDay": 15, "highestInvoiceTerm": 1, "created": "2024-08-01 15:01:00.000", + "contractVersions": + [ + { + "contractVersionId": 1, + "termsAndConditions": "https://www.htm.nl/reisproducten/productvoorwaarden/htm-maandkorting/", + "productId": 1, + "productName": "HTM Maand 20% korting", + "taxCode": "V9", + "taxPercentage": 9.0, + "termAmountInclTax": 400, + "start": "2024-08-01 15:01:00.000", + }, + ], }, { "contractId": "f07253e6-c364-474c-a342-a10a4a7cf305", @@ -66,8 +79,22 @@ paths: "billingDay": 15, "highestInvoiceTerm": 1, "created": "2024-08-01 15:01:00.000", + "contractVersions": + [ + { + "contractVersionId": 1, + "termsAndConditions": "https://www.htm.nl/reisproducten/productvoorwaarden/htm-maandkorting/", + "productId": 1, + "productName": "HTM Maand 20% korting", + "taxCode": "V9", + "taxPercentage": 9.0, + "termAmountInclTax": 400, + "start": "2024-08-01 15:01:00.000", + }, + ], }, ], + "href": null, } post: summary: Create a contract for an existing customer profile. From b666f333cc377c382d6796b891190f2af066df7d Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Wed, 1 Oct 2025 15:58:20 +0200 Subject: [PATCH 6/9] OVPAY-2186 - Endpoint naming fix. --- src/openapi/contracts/contracts-crud.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/openapi/contracts/contracts-crud.yaml b/src/openapi/contracts/contracts-crud.yaml index a3043c2..46e2f79 100644 --- a/src/openapi/contracts/contracts-crud.yaml +++ b/src/openapi/contracts/contracts-crud.yaml @@ -6,13 +6,13 @@ info: servers: - url: https://services.acc.api.htm.nl/abt/abtcontracts/1.0 paths: - /customers/{customerNumber}/contracts: + /customers/{customerProfileId}/contracts: parameters: - in: path - name: customerNumber + name: customerProfileId schema: type: integer - example: 1001337 + example: 1337 required: true description: The customerNumber. get: From 7a2ecec13376994dd923a931796bdee69616cf6a Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Wed, 1 Oct 2025 16:11:00 +0200 Subject: [PATCH 7/9] OVPAY-2186 - Added proper schema for POST contracts. --- src/openapi/contracts/contracts-crud.yaml | 103 +++++++++++++++++++++- 1 file changed, 100 insertions(+), 3 deletions(-) diff --git a/src/openapi/contracts/contracts-crud.yaml b/src/openapi/contracts/contracts-crud.yaml index 46e2f79..8560cec 100644 --- a/src/openapi/contracts/contracts-crud.yaml +++ b/src/openapi/contracts/contracts-crud.yaml @@ -34,7 +34,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Contract" + $ref: "#/components/schemas/Contracts" example: { "contracts": @@ -105,7 +105,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Contract" + $ref: "#/components/schemas/PostContractsRequestBody" example: { "contract": @@ -147,7 +147,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Contract" + $ref: "#/components/schemas/PostContractsResponseBody" example: { "contract": @@ -1110,6 +1110,103 @@ components: scheme: bearer bearerFormat: JWT schemas: + PostContractsRequestBody: + type: object + properties: + contract: + type: object + properties: + orderId: + type: string + format: uuid + example: eb3d08f7-7feb-4f31-9f5b-daa634e51f48 + orderLineId: + type: string + format: uuid + example: 52efbbfc-8c28-4016-9ece-dc3ef9a70bd8 + touchpointId: + type: integer + example: 2 + termDuration: + type: string + format: ISO8601 + example: P0Y1M0D + billingDay: + type: integer + example: 15 + highestInvoiceTerm: + type: integer + example: 0 + contractVersions: + type: array + items: + type: object + properties: + termsAndConditions: + type: string + format: url + example: https://www.htm.nl/reisproducten/productvoorwaarden/htm-maandkorting/ + productId: + type: integer + example: 1 + productName: + type: string + example: HTM Maand 20% korting + taxCode: + type: string + example: V9 + taxPercentage: + type: number + format: float + example: 9.0 + termAmountInclTax: + type: integer + example: 400 + start: + type: string + format: date-time + example: 2024-07-04 15:01:00.000 + end: + type: string + format: date-time + example: 2024-12-31 15:01:00.000 + required: + - termsAndConditions + - productId + - productName + - taxCode + - taxPercentage + - termAmountInclTax + - start + required: + - orderId + - orderLineId + - touchpointId + - termDuration + - billingDay + - highestInvoiceTerm + - contractVersions + required: + - contract + PostContractsResponseBody: + type: object + properties: + contract: + type: object + properties: + contractId: + type: string + format: uuid + example: 5a3876a1-e9a1-4278-8983-4679a8d583c2 + contractNumber: + type: string + pattern: '^D\d{6}$' + example: D123456 + required: + - contractId + - contractNumber + required: + - contract Contract: type: object properties: From 5bd56be57800257316b860a1d44ae72ba468f88d Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Thu, 2 Oct 2025 09:42:59 +0200 Subject: [PATCH 8/9] OVPAY-2186 - Added proper schema for other endpoints. Added DELETE /contractversions. --- src/openapi/contracts/contracts-crud.yaml | 436 ++++++++++++++++++---- 1 file changed, 356 insertions(+), 80 deletions(-) diff --git a/src/openapi/contracts/contracts-crud.yaml b/src/openapi/contracts/contracts-crud.yaml index 8560cec..25205ff 100644 --- a/src/openapi/contracts/contracts-crud.yaml +++ b/src/openapi/contracts/contracts-crud.yaml @@ -206,7 +206,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Contract" + $ref: "#/components/schemas/Contracts" example: { "contracts": @@ -502,7 +502,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Contract" + $ref: "#/components/schemas/PatchContractsRequestBody" example: { "contract": @@ -518,7 +518,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Contract" + $ref: "#/components/schemas/PatchContractsResponseBody" example: { "contract": @@ -546,7 +546,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/InvoiceAccountingStatus" + $ref: "#/components/schemas/PostContractVersionsRequestBody" example: { "contractVersion": @@ -567,7 +567,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ContractVersion" + $ref: "#/components/schemas/PostContractVersionsResponseBody" example: { "contractVersion": @@ -602,7 +602,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ContractVersion" + $ref: "#/components/schemas/PatchContractVersionsRequestBody" example: { "contractVersion": { "end": "2024-07-03 15:01:00.000" } } responses: "200": @@ -610,7 +610,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ContractVersion" + $ref: "#/components/schemas/PatchContractVersionsResponseBody" example: { "contractVersion": @@ -619,6 +619,14 @@ paths: "contractVersionId": 1, }, } + delete: + summary: Delete an existing contract version. + description: Delete an existing contract version. + tags: + - ContractVersion + responses: + "200": + description: OK /contracts/{contractId}/contractinvoices: parameters: - in: path @@ -629,67 +637,6 @@ paths: example: d1dd439b-6072-4b97-89c9-724268865b93 required: true description: The contractId of the Contract, formatted as UUID. - get: - summary: Get invoices of a single contract. DEPRECATED. - description: Get invoices of a single contract. WARNING; This method is deprecated. Please use GET /contractinvoices instead. - deprecated: true - tags: - - ContractInvoice - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/ContractInvoice" - example: - { - "contractInvoices": - [ - { - "contractInvoiceId": "8699d72a-cf4d-4e6b-9e9c-549d837ca51f", - "externalReference": "F2024-0001", - "term": 1, - "invoiceDate": "2024-07-02", - "created": "2024-07-02 15:01:00.000", - "updated": "2024-07-02 15:01:00.000", - "state": "invoice_sent", - "data": "{json}", - "isCredit": false, - "invoiceAccountingStatuses": - [ - { - "invoiceAccountingStatusId": "32785417-1fb8-42c7-bda1-533f5868809f", - "accountingStatus": - { "accountingStatusId": 1, "name": "open" }, - "createdOn": "2024-06-02 15:01:00.000", - "description": null, - }, - ], - }, - { - "contractInvoiceId": "dadff658-4ff5-4eb8-b516-492f1f6c6245", - "externalReference": "F2024-0002", - "term": 2, - "invoiceDate": "2024-08-02", - "created": "2024-08-02 15:01:00.000", - "updated": "2024-08-02 15:01:00.000", - "state": "invoice_created", - "data": "{json}", - "isCredit": false, - "invoiceAccountingStatuses": - [ - { - "invoiceAccountingStatusId": "84af0f01-0416-4860-851a-a0d4b3cf674a", - "accountingStatus": - { "accountingStatusId": 1, "name": "open" }, - "createdOn": "2024-06-02 15:01:00.000", - "description": null, - }, - ], - }, - ], - } post: summary: Add an invoice to an existing contract. description: Add an invoice to an existing contract. @@ -699,7 +646,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ContractInvoice" + $ref: "#/components/schemas/PostContractInvoicesRequestBody" example: { "contractInvoice": @@ -728,7 +675,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ContractInvoice" + $ref: "#/components/schemas/PostContractInvoicesResponseBody" example: { "contractInvoice": @@ -841,7 +788,12 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Contract" + type: object + properties: + contractInvoices: + type: array + items: + $ref: "#/components/schemas/ContractInvoice" example: { "contractInvoices": @@ -911,7 +863,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ContractInvoice" + $ref: "#/components/schemas/PatchContractInvoicesRequestBody" example: { "contractInvoice": @@ -927,7 +879,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ContractInvoice" + $ref: "#/components/schemas/PatchContractInvoicesResponseBody" example: { "contractInvoice": @@ -954,7 +906,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ContractInvoice" + $ref: "#/components/schemas/PostInvoiceAccountingStatusesRequestBody" example: { "accountingStatusId": 1, @@ -967,7 +919,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ContractInvoice" + $ref: "#/components/schemas/PostInvoiceAccountingStatusesResponseBody" example: { "invoiceAccountingStatusId": "a6836364-4812-4960-9226-69deb2e2b903", @@ -993,7 +945,12 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Contract" + type: object + properties: + contractActions: + type: array + items: + $ref: "#/components/schemas/ContractAction" example: { "contractActions": @@ -1025,7 +982,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ContractAction" + $ref: "#/components/schemas/PostContractActionsRequestBody" example: { "contractAction": @@ -1043,7 +1000,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ContractAction" + $ref: "#/components/schemas/PostContractActionsResponseBody" example: { "contractAction": @@ -1063,7 +1020,12 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ContractStatus" + type: object + properties: + contractStatuses: + type: array + items: + $ref: "#/components/schemas/ContractStatus" example: { "contractStatuses": @@ -1089,7 +1051,12 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ActionType" + type: object + properties: + actionTypes: + type: array + items: + $ref: "#/components/schemas/ActionType" example: { "actionTypes": @@ -1207,6 +1174,315 @@ components: - contractNumber required: - contract + PatchContractsRequestBody: + type: object + properties: + contract: + type: object + properties: + contractStatusId: + type: integer + example: 2 + billingDay: + type: integer + example: 15 + highestInvoiceTerm: + type: integer + example: 2 + required: + - contract + PatchContractsResponseBody: + type: object + properties: + contract: + type: object + properties: + contractId: + type: string + format: uuid + example: 5a3876a1-e9a1-4278-8983-4679a8d583c2 + contractNumber: + type: string + pattern: '^D\d{6}$' + example: D123456 + required: + - contractId + - contractNumber + required: + - contract + PostContractVersionsRequestBody: + type: object + properties: + contractVersion: + type: object + properties: + termsAndConditions: + type: string + format: url + example: https://www.htm.nl/reisproducten/productvoorwaarden/htm-maandkorting/ + productId: + type: integer + example: 1 + productName: + type: string + example: HTM Maand 20% korting + taxCode: + type: string + example: V9 + taxPercentage: + type: number + format: float + example: 9.0 + termAmountInclTax: + type: integer + example: 400 + start: + type: string + format: date-time + example: 2024-07-04 15:01:00.000 + end: + type: string + format: date-time + example: 2024-12-31 15:01:00.000 + required: + - termsAndConditions + - productId + - productName + - taxCode + - taxPercentage + - termAmountInclTax + - start + required: + - contractVersion + PostContractVersionsResponseBody: + type: object + properties: + contractVersion: + type: object + properties: + contractId: + type: string + format: uuid + example: 5a3876a1-e9a1-4278-8983-4679a8d583c2 + contractVersionId: + type: integer + example: 1 + required: + - contractId + - contractVersionId + required: + - contractVersion + PatchContractVersionsRequestBody: + type: object + properties: + contractVersion: + type: object + properties: + end: + type: string + format: date-time + example: 2024-12-31 15:01:00.000 + required: + - contractVersion + PatchContractVersionsResponseBody: + type: object + properties: + contractVersion: + type: object + properties: + contractId: + type: string + format: uuid + example: 5a3876a1-e9a1-4278-8983-4679a8d583c2 + contractVersionId: + type: integer + example: 1 + required: + - contractId + - contractVersionId + required: + - contractVersion + PostContractInvoicesRequestBody: + type: object + properties: + contractInvoice: + type: object + properties: + externalReference: + type: string + example: F2024-0001 + term: + type: integer + example: 1 + invoiceDate: + type: string + format: date + example: 2024-07-02 + created: + type: string + format: date-time + example: 2024-07-02 15:01:00.000 + updated: + type: string + format: date-time + example: 2024-07-02 15:01:00.000 + state: + type: string + example: invoice_created + data: + type: string + format: json + example: "{json}" + isCredit: + type: boolean + example: false + invoiceAccountingStatuses: + type: array + items: + type: object + properties: + accountingStatusId: + type: integer + example: 1 + createdOn: + type: string + format: date-time + example: 2024-07-02 15:01:00.000 + description: + type: string + example: null + required: + - accountingStatusId + - createdOn + required: + - externalReference + - term + - invoiceDate + - created + - updated + - state + - data + - isCredit + - invoiceAccountingStatuses + required: + - contractInvoice + PostContractInvoicesResponseBody: + type: object + properties: + contractInvoice: + type: object + properties: + contractInvoiceId: + type: string + format: uuid + example: 8699d72a-cf4d-4e6b-9e9c-549d837ca51f + required: + - contractInvoiceId + required: + - contractInvoice + PatchContractInvoicesRequestBody: + type: object + properties: + contractInvoice: + type: object + properties: + updated: + type: string + format: date-time + example: 2024-07-02 15:01:00.000 + state: + type: string + example: invoice_reopened + data: + type: string + format: json + example: "{json}" + required: + - contractInvoice + PatchContractInvoicesResponseBody: + type: object + properties: + contractInvoice: + type: object + properties: + contractInvoiceId: + type: string + format: uuid + example: 8699d72a-cf4d-4e6b-9e9c-549d837ca51f + required: + - contractInvoiceId + required: + - contractInvoice + PostInvoiceAccountingStatusesRequestBody: + type: object + properties: + accountingStatusId: + type: integer + example: 1 + createdOn: + type: string + format: date-time + example: 2024-07-02 15:01:00.000 + description: + type: string + example: null + required: + - accountingStatusId + - createdOn + PostInvoiceAccountingStatusesResponseBody: + type: object + properties: + invoiceAccountingStatusId: + type: string + format: uuid + example: a6836364-4812-4960-9226-69deb2e2b903 + required: + - invoiceAccountingStatusId + PostContractActionsRequestBody: + type: object + properties: + contractAction: + type: object + properties: + actionType: + type: integer + example: 2 + user: + type: string + example: subid123456 + timestamp: + type: string + format: date-time + example: 2024-07-02 15:01:00.000 + details: + type: string + example: Contract changed xyz + correlationId: + type: string + format: uuid + example: 976e7a4c-bf24-43d2-b444-55817556e7ee + required: + - actionType + - user + - timestamp + - details + - correlationId + required: + - contractAction + PostContractActionsResponseBody: + type: object + properties: + contractAction: + type: object + properties: + contractActionId: + type: string + format: uuid + example: 8699d72a-cf4d-4e6b-9e9c-549d837ca51f + required: + - contractActionId + required: + - contractAction Contract: type: object properties: From 79faa8ab3d9f35190f9013ea57afffce46c2064d Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Thu, 2 Oct 2025 09:58:24 +0200 Subject: [PATCH 9/9] OVPAY-2186 - Added contractStatusId = 8. --- src/openapi/contracts/contracts-crud.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/openapi/contracts/contracts-crud.yaml b/src/openapi/contracts/contracts-crud.yaml index 25205ff..d5f36f2 100644 --- a/src/openapi/contracts/contracts-crud.yaml +++ b/src/openapi/contracts/contracts-crud.yaml @@ -1037,6 +1037,7 @@ paths: { "contractStatusId": 5, "name": "terminated" }, { "contractStatusId": 6, "name": "pending cancellation" }, { "contractStatusId": 7, "name": "pending termination" }, + { "contractStatusId": 8, "name": "pending change" }, ], } /actiontypes: