OVPAY-681 - Mijn abonnementen. OVPAY-677 - Mijn facturen.
This commit is contained in:
parent
d27f03c892
commit
6113f2ad89
272
src/openapi/contracts/contracts-se.yaml
Normal file
272
src/openapi/contracts/contracts-se.yaml
Normal file
@ -0,0 +1,272 @@
|
||||
openapi: "3.0.3"
|
||||
info:
|
||||
title: ABT Contracts Service Engine APIs v2
|
||||
version: "1.0"
|
||||
description: Service Engine APIs for ABT Contracts v2. These are NOT the CRUD APIs to the data hub.
|
||||
servers:
|
||||
- url: https://api.integratielaag.nl/v1
|
||||
paths:
|
||||
/customers/contracts:
|
||||
parameters:
|
||||
- in: path
|
||||
name: X-HTM-JWT-AUTH-HEADER
|
||||
schema:
|
||||
type: string
|
||||
example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
|
||||
required: true
|
||||
description: The JWT of the logged in customer.
|
||||
get:
|
||||
summary: List all contracts for a certain customer profile.
|
||||
description: List all contracts for a certain customer profile.
|
||||
tags:
|
||||
- SE Contracts v2
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/unavailable"
|
||||
example:
|
||||
[
|
||||
{
|
||||
"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,
|
||||
"xSpit": "1c345237-4d84-47f0-93c2-7b94338e3355",
|
||||
"created": "2024-08-01 15:01:00.000",
|
||||
},
|
||||
{
|
||||
"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,
|
||||
"xSpit": "1c345237-4d84-47f0-93c2-7b94338e3355",
|
||||
"created": "2024-08-01 15:01:00.000",
|
||||
},
|
||||
]
|
||||
/customers/contracts/{contractId}:
|
||||
parameters:
|
||||
- in: path
|
||||
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.
|
||||
get:
|
||||
summary: Get contract details for a certain customer profile.
|
||||
description: Get contract details for a certain customer profile.
|
||||
tags:
|
||||
- SE Contracts v2
|
||||
parameters:
|
||||
- in: query
|
||||
name: versionLimit
|
||||
schema:
|
||||
type: integer
|
||||
example: 2
|
||||
required: false
|
||||
description: Limit the number of contract versions in the response body to this number. Contract versions are ordered by start date (descending).
|
||||
- in: query
|
||||
name: invoiceLimit
|
||||
schema:
|
||||
type: integer
|
||||
example: 2
|
||||
required: false
|
||||
description: Limit the number of invoices in the response body to this number. Invoices are ordered by created date (descending).
|
||||
- in: query
|
||||
name: actionLimit
|
||||
schema:
|
||||
type: integer
|
||||
example: 2
|
||||
required: false
|
||||
description: Limit the number of actions in the response body to this number. Actions are ordered by created date (descending).
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/unavailable"
|
||||
example:
|
||||
{
|
||||
"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,
|
||||
"xSpit": "1c345237-4d84-47f0-93c2-7b94338e3355",
|
||||
"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}",
|
||||
},
|
||||
],
|
||||
}
|
||||
/customers/contracts/{contractId}/invoices:
|
||||
parameters:
|
||||
- in: path
|
||||
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.
|
||||
get:
|
||||
summary: Get all invoices for a given contract.
|
||||
description: Get all invoices for a given contract.
|
||||
tags:
|
||||
- SE Contracts v2
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/unavailable"
|
||||
example:
|
||||
[
|
||||
{
|
||||
"contractInvoiceId": "8699d72a-cf4d-4e6b-9e9c-549d837ca51f",
|
||||
"contractId": "9e224750-3065-471d-af57-85b9cffa7c89",
|
||||
"externalReference": "F2024-0001",
|
||||
"term": 1,
|
||||
"created": "2024-07-02 15:01:34.000",
|
||||
"updated": "2024-07-04 00:04:56.000",
|
||||
"state": "invoice_created",
|
||||
"public_link": "http://mijnfactuurinzien.nl/F2024-0001",
|
||||
},
|
||||
{
|
||||
"contractInvoiceId": "0e729101-2c84-44db-8b18-d8f759e968e0",
|
||||
"contractId": "9e224750-3065-471d-af57-85b9cffa7c89",
|
||||
"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",
|
||||
},
|
||||
]
|
||||
components:
|
||||
securitySchemes:
|
||||
bearerToken:
|
||||
type: http
|
||||
scheme: bearer
|
||||
bearerFormat: JWT
|
||||
schemas:
|
||||
unavailable:
|
||||
type: object
|
||||
rfc9457:
|
||||
type: object
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
format: url
|
||||
example: https://example.com/probs/out-of-credit
|
||||
title:
|
||||
type: string
|
||||
example: You do not have enough credit.
|
||||
detail:
|
||||
type: string
|
||||
example: Your current balance is 30, but that costs 50.
|
||||
instance:
|
||||
type: string
|
||||
example: /account/12345/msgs/abc
|
||||
balance:
|
||||
type: string
|
||||
example: 30
|
||||
accounts:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
example:
|
||||
- /account/12345
|
||||
- /account/67890
|
||||
Loading…
Reference in New Issue
Block a user