Added examples needed for stub.

This commit is contained in:
Bas Boterman 2025-03-28 19:10:02 +01:00
parent 73b982d35f
commit afb46f8f84

View File

@ -27,58 +27,65 @@ paths:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
example: examples:
[ List all contracts for a single customer profile:
{ summary: List all contracts for a single customer profile
"contractId": "5a3876a1-e9a1-4278-8983-4679a8d583c2", description: |
"contractNumber": "D123456", List all contracts for single customer profile with customer
"customerProfileId": 42, number 'D123456'.
"orderId": "eb3d08f7-7feb-4f31-9f5b-daa634e51f48", value:
"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,
"created": "2024-08-01 15:01:00.000",
"ovPayTokenId": 1337,
"_links":
{ {
"get_token": "contractId": "5a3876a1-e9a1-4278-8983-4679a8d583c2",
"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,
"created": "2024-08-01 15:01:00.000",
"ovPayTokenId": 1337,
"_links":
{ {
"href": "https://api.integratielaag.nl/abt/touchpoint/1.0/tokens?ovPayTokenId=1337", "get_token":
"method": "GET", {
"href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens?ovPayTokenId=1337",
"method": "GET",
},
}, },
}, },
},
{
"contractId": "f07253e6-c364-474c-a342-a10a4a7cf305",
"contractNumber": "D123456",
"customerProfileId": 42,
"orderId": "945d43e6-516e-425b-8847-9aba41289acd",
"orderLineId": "42f68042-908f-41f4-9d9b-4cab843ff0e8",
"touchpointId": 2,
"contractStatus": { "contractStatusId": 1, "name": "new" },
"productId": 1,
"productName": "HTM Maand 20% korting",
"termDuration": "P0Y1M0D",
"billingDay": 15,
"highestInvoiceTerm": 1,
"created": "2024-08-01 15:01:00.000",
"ovPayTokenId": 1338,
"_links":
{ {
"get_token": "contractId": "f07253e6-c364-474c-a342-a10a4a7cf305",
"contractNumber": "D123456",
"customerProfileId": 42,
"orderId": "945d43e6-516e-425b-8847-9aba41289acd",
"orderLineId": "42f68042-908f-41f4-9d9b-4cab843ff0e8",
"touchpointId": 2,
"contractStatus":
{ "contractStatusId": 1, "name": "new" },
"productId": 1,
"productName": "HTM Maand 20% korting",
"termDuration": "P0Y1M0D",
"billingDay": 15,
"highestInvoiceTerm": 1,
"created": "2024-08-01 15:01:00.000",
"ovPayTokenId": 1338,
"_links":
{ {
"href": "https://api.integratielaag.nl/abt/touchpoint/1.0/tokens?ovPayTokenId=1338", "get_token":
"method": "GET", {
"href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens?ovPayTokenId=1338",
"method": "GET",
},
}, },
}, },
}, ]
]
/customers/contracts/{contractId}: /customers/contracts/{contractId}:
parameters: parameters:
- in: header - in: header
@ -130,84 +137,93 @@ paths:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
example: examples:
{ Full contract details of a single contract:
"contractId": "5a3876a1-e9a1-4278-8983-4679a8d583c2", summary: Full contract details of a single contract
"contractNumber": "D123456", description: |
"customerProfileId": 42, Full contract details of a single contract with contract
"orderId": "eb3d08f7-7feb-4f31-9f5b-daa634e51f48", number 'D123456'.
"orderLineId": "52efbbfc-8c28-4016-9ece-dc3ef9a70bd8", value:
"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,
"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": "contractId": "5a3876a1-e9a1-4278-8983-4679a8d583c2",
"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,
"created": "2024-07-02 15:01:00.000",
"updated": "2024-07-02 15:01:00.000",
"state": "invoice_created",
"data": "{json}",
"isCredit": false,
},
],
"_links":
{ {
"href": "https://api.integratielaag.nl/abt/touchpoint/1.0/tokens?ovPayTokenId=1337", "get_token":
"method": "GET", {
"href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens?ovPayTokenId=1337",
"method": "GET",
},
}, },
}, }
}
/customers/contracts/{contractId}/invoices: /customers/contracts/{contractId}/invoices:
parameters: parameters:
- in: header - in: header
@ -237,31 +253,37 @@ paths:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
example: examples:
[ Get all invoices of a single contract:
{ summary: Get all invoices of a single contract
"contractInvoiceId": "8699d72a-cf4d-4e6b-9e9c-549d837ca51f", description: |
"contractId": "9e224750-3065-471d-af57-85b9cffa7c89", Get all invoices of a single contract with contract number
"externalReference": "F2024-0001", 'D123456'.
"term": 1, value:
"created": "2024-07-02 15:01:34.000", [
"updated": "2024-07-04 00:04:56.000", {
"state": "invoice_created", "contractInvoiceId": "8699d72a-cf4d-4e6b-9e9c-549d837ca51f",
"public_link": "http://mijnfactuurinzien.nl/F2024-0001", "contractId": "9e224750-3065-471d-af57-85b9cffa7c89",
"isCredit": false, "externalReference": "F2024-0001",
}, "term": 1,
{ "created": "2024-07-02 15:01:34.000",
"contractInvoiceId": "0e729101-2c84-44db-8b18-d8f759e968e0", "updated": "2024-07-04 00:04:56.000",
"contractId": "9e224750-3065-471d-af57-85b9cffa7c89", "state": "invoice_created",
"externalReference": "F2024-0002", "public_link": "http://mijnfactuurinzien.nl/F2024-0001",
"term": 2, "isCredit": false,
"created": "2024-08-02 15:01:34.000", },
"updated": "2024-08-04 00:04:56.000", {
"state": "invoice_created", "contractInvoiceId": "0e729101-2c84-44db-8b18-d8f759e968e0",
"public_link": "http://mijnfactuurinzien.nl/F2024-0002", "contractId": "9e224750-3065-471d-af57-85b9cffa7c89",
"isCredit": false, "externalReference": "F2024-0002",
}, "term": 2,
] "created": "2024-08-02 15:01:34.000",
"updated": "2024-08-04 00:04:56.000",
"state": "invoice_created",
"public_link": "http://mijnfactuurinzien.nl/F2024-0002",
"isCredit": false,
},
]
/contracts/{contractId}/cancellationmoments: /contracts/{contractId}/cancellationmoments:
parameters: parameters:
- in: header - in: header
@ -291,14 +313,19 @@ paths:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
example: examples:
{ All cancellation moments of a term bound contract:
"cancellationMoment": "termBound", summary: All cancellation moments of a term bound contract
"termDuration": "P1M", description: |
"billingDay": 18, All cancellation moments of a term bound contract.
"cancellationFrom": "2024-08-10T00:00:00", value:
"cancellationUntil": "2026-08-10T00:00:00", {
} "cancellationMoment": "termBound",
"termDuration": "P1M",
"billingDay": 18,
"cancellationFrom": "2024-08-10T00:00:00",
"cancellationUntil": "2026-08-10T00:00:00",
}
/contracts/{contractId}/cancellationvalidation: /contracts/{contractId}/cancellationvalidation:
parameters: parameters:
- in: header - in: header
@ -327,7 +354,12 @@ paths:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
example: { "end": "2024-08-10T00:00:00" } examples:
Validate a cancellation of a given end date:
summary: Validate a cancellation of a given end date
description: |
Validate a cancellation of a given end date.
value: { "end": "2024-08-10T00:00:00" }
responses: responses:
"200": "200":
description: OK description: OK
@ -335,14 +367,32 @@ paths:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
example: examples:
{ Successfully validated cancellation:
"validationResult": "true", summary: Successfully validated cancellation
"validationMessage": "", description: |
"end": "2024-08-10T03:59:59", Successfully validated a cancellation. The response contains
"refundAmount": "2489", the refund amount and refund methods.
"refundMethods": ["creditInvoice", "iDeal"], value:
} {
"validationResult": true,
"validationMessage": "",
"end": "2024-08-10T03:59:59",
"refundAmount": 2489,
"refundMethods": ["creditInvoice", "iDeal"],
}
Unsuccesful validation:
summary: Unsuccesful validation
description: |
Unsuccesful validation. The response contains the error message.
value:
{
"validationResult": false,
"validationMessage": "Cancellation end date not allowed",
"end": null,
"refundAmount": null,
"refundMethods": [],
}
/contracts/{contractId}/cancellation: /contracts/{contractId}/cancellation:
parameters: parameters:
- in: header - in: header
@ -371,8 +421,13 @@ paths:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
example: examples:
{ "end": "2024-08-10T00:00:00", "refundMethod": "creditInvoice" } Cancellation request for credit invoice:
summary: Cancellation request for credit invoice
description: |
Cancellation request for credit invoice.
value:
{ "end": "2024-08-10T00:00:00", "refundMethod": "creditInvoice" }
responses: responses:
"200": "200":
description: OK description: OK
@ -380,12 +435,18 @@ paths:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
example: examples:
{ Successfully cancelled contract:
"end": "2024-08-10T03:59:59", summary: Successfully cancelled contract
"refundAmount": "2489", description: |
"refundMethod": "creditInvoice", Successfully cancelled a contract. The response contains
} the refund amount and refund method.
value:
{
"end": "2024-08-10T03:59:59",
"refundAmount": 2489,
"refundMethod": "creditInvoice",
}
components: components:
securitySchemes: securitySchemes:
bearerToken: bearerToken: