OVPAY-1110 - Added endpoint to undo pending contract cancellation.

This commit is contained in:
Bas Boterman 2025-09-15 12:03:11 +02:00
parent 17d7b77541
commit 1413cbd01d

View File

@ -453,6 +453,123 @@ paths:
"refundAmount": 2489, "refundAmount": 2489,
"refundMethod": "creditInvoice", "refundMethod": "creditInvoice",
} }
/contracts/{contractId}/undocancellation:
parameters:
- in: header
name: X-HTM-JWT-AUTH-HEADER
schema:
type: string
example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
required: true
description: The JWT of the logged in customer.
- in: path
name: contractId
schema:
type: string
format: uuid
example: 9e224750-3065-471d-af57-85b9cffa7c89
required: true
description: The id of the contract to process.
post:
summary: Undo a pending cancellation of a contract.
description: Undo a pending cancellation of a contract.
tags:
- SE Contract Cancellation v2
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/unavailable"
examples:
Successfully undid cancellation of contract:
summary: Successfully undid pending cancellation
description: |
Successfully undid a pending cancellation of a contract. The contract
is active again.
value:
{
"contractId": "9e224750-3065-471d-af57-85b9cffa7c89",
"contractNumber": "D123456",
"customerProfileId": 42,
"orderId": "eb3d08f7-7feb-4f31-9f5b-daa634e51f48",
"orderLineId": "52efbbfc-8c28-4016-9ece-dc3ef9a70bd8",
"touchpointId": 2,
"contractStatus":
{ "contractStatusId": 2, "name": "active" },
"productId": 1,
"productName": "HTM Maand 20% korting",
"termDuration": "P0Y1M0D",
"billingDay": 15,
"highestInvoiceTerm": 1,
"ovPayTokenId": 1337,
"contractVersions":
[
{
"contractVersionId": 1,
"termsAndConditions": "https://www.htm.nl/reisproducten/productvoorwaarden/htm-maandkorting/",
"termAmountExclTax": 1200,
"taxCode": "V21",
"taxAmount": 108,
"termAmountInclTax": 1308,
"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,
"start": "2025-01-01 15:01:00.000",
},
],
"contractActions":
[
{
"contractActionId": "67687851-59dd-4bbc-aa74-0f7abd26c883",
"actionType":
{ "actionTypeId": 1, "name": "create" },
"user": "subid123456",
"timestamp": "2024-07-02 15:01:00.000",
"details": "Contract created",
"correlationId": "976e7a4c-bf24-43d2-b444-55817556e7ee",
},
{
"contractActionId": "ea9ad287-9cd3-4e76-bcb9-d71db551cf55",
"actionType":
{ "actionTypeId": 2, "name": "change" },
"user": "subid123456",
"timestamp": "2024-07-03 15:01:00.000",
"details": "Contract changed",
"correlationId": "e2462347-6749-4841-b42a-cf8de19ec727",
},
],
"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_created",
"data": "{json}",
"isCredit": false,
},
],
"_links":
{
"get_token":
{
"href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens?ovPayTokenId=1337",
"method": "GET",
},
},
}
/contractpayments: /contractpayments:
parameters: parameters:
- in: header - in: header