Compare commits

...

7 Commits

7 changed files with 2047 additions and 839 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1960,7 +1960,7 @@ paths:
type: integer type: integer
example: 1 example: 1
required: true required: true
summary: Replace an OVpay token with another (+ transfer products) - V2 (for Integratielaag) summary: "**INTERNAL USE ONLY** Replace an OVpay token with another (+ transfer products) - V2"
description: | description: |
Transfer products from one OVpay token to another, and replace the tokens in the database. Transfer products from one OVpay token to another, and replace the tokens in the database.
This endpoint is for usage by integratielaag only. Touch points should use This endpoint is for usage by integratielaag only. Touch points should use
@ -2220,7 +2220,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/ProductInstancesResponse" $ref: "#/components/schemas/OvPayTokenProductInstancesResponse"
examples: examples:
getEmptyProductInstances: getEmptyProductInstances:
summary: No product-instances found on token summary: No product-instances found on token
@ -2233,7 +2233,6 @@ paths:
"productInstances": "productInstances":
[ [
{ {
"productInstanceId": "26d41861-f77e-4666-9cde-2c5c66ace0a2",
"productId": 1, "productId": 1,
"name": "HTM 90% Korting", "name": "HTM 90% Korting",
"status": "Active", "status": "Active",
@ -3404,377 +3403,6 @@ paths:
responses: responses:
"200": "200":
description: OK description: OK
/productinstances:
parameters:
- name: X-HTM-JWT-AUTH-HEADER
in: header
schema:
type: string
example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
required: false
description: The JWT of a customer in case of touchpoint were customer logs in themselves
- name: X-HTM-CUSTOMER-PROFILE-ID-HEADER
in: header
schema:
type: string
example: feaaef83-a551-4283-8419-340b1ada3b55
required: false
description: The customerProfileId of a customer in the case of the SMP
- name: X-HTM-ROLE-HEADER
in: header
schema:
type: string
example: Customer
required: false
- name: deviceId
in: query
description: Id of the device you want to get the instantiated HTM products for.
schema:
type: string
format: uuid
- name: externalDeviceId
in: query
description: Id of the device you want to get the instantiated HTM products for.
schema:
type: string
- name: ovpayTokenId
in: query
description: Id of the ovpay token you want to get the instantiated HTM products for.
schema:
type: string
format: uuid
get:
summary: Get a list of all HTM products for a specific customer, device or token, at least one should be filled in
description: |-
Get a list of all HTM products instantiated for a specific customer, device or token, at least one of the query params should be filled in.
Only HTM products are returned.
Where relevant, operations to be performed are returned as HATEOAS links per product-instance.
tags:
- ProductInstances
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/ProductInstancesResponse"
examples:
getEmptyProductInstances:
summary: No product-instances found
value:
productInstances: {
"ovPayProducts":[],
"barcodeTickets": [],
"vouchers":[]
}
getSingleBarcodeProductInstanceForDevice:
summary: One BarcodeTicket product-instance
value:
{
"productInstances":{
"ovPayProducts":[],
"barcodeTickets":[
{
"productInstanceId": "0f0981bf-6d60-4b06-bc55-de1ba325f366",
"productId": 13,
"name": "HTM dagkaart",
"productCategory":
{
"productCategoryId": 5,
"name": "Barcode",
},
"orderId": "501B17EF-36C4-4039-B92C-6517969B464E",
"orderLineId": "38B17EF-36C4-4039-B92C-4817969B464E",
"status": "Active",
"ticketReference": "KJj43nejhbTxhr897287",
"issuedAt": "2020-03-21T00:00:00",
"activatedAt": null,
"blocked": false,
"cancelledAt": null,
"fraudDetected": false,
"barcode": "barcodeBytes",
"deviceId": "e2be51ae-2701-4803-a2d7-97d4b714482d",
"_links":
{
"get_order":
{
"href": "https://api.integratielaag.nl/abt/touchpoint/1.0/orders/501B17EF-36C4-4039-B92C-6517969B464E",
"method": "GET",
},
"patch_productinstance":
{
"href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/productinstances/0f0981bf-6d60-4b06-bc55-de1ba325f366",
"method": "PATCH",
},
},
},
],
"vouchers":[]
}
}
getSingleOvpayProductInstanceForSpecificOvPayToken:
summary: One Ovpay product-instance
value:
{
"productInstances":{
"ovPayProducts":[ {
"productInstanceId": "26d41861-f77e-4666-9cde-2c5c66ace0a2",
"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",
"ovPayTokenId": 42,
"deviceId": null,
"_links":
{
"get_order":
{
"href": "https://api.integratielaag.nl/abt/touchpoint/1.0/orders/501B17EF-36C4-4039-B92C-6517969B464E",
"method": "GET",
},
"get_contract":
{
"href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/contracts/56B17EF-C436-9043-B76C-481797WEB464F",
"method": "GET",
},
},
},
],
"barcodeTickets":[],
"vouchers":[]
}
}
getMultipleProductInstancesForCustomer:
summary: Multiple product-instances for a customer
value:
{
"productInstances":{
"ovPayProducts":[ {
"productInstanceId": "26d41861-f77e-4666-9cde-2c5c66ace0a2",
"productId": 1,
"name": "HTM 90% Korting",
"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",
"ovPayTokenId": 42,
"deviceId": null,
"_links":
{
"get_order":
{
"href": "https://api.integratielaag.nl/abt/touchpoint/1.0/orders/501B17EF-36C4-4039-B92C-6517969B464E",
"method": "GET",
},
"get_contract":
{
"href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/contracts/56B17EF-C436-9043-B76C-481797WEB464F",
"method": "GET",
},
},
},
],
"barcodeTickets":
[
{
"productInstanceId": "0f0981bf-6d60-4b06-bc55-de1ba325f366",
"productId": 13,
"name": "HTM dagkaart",
"productCategory":
{
"productCategoryId": 5,
"name": "Barcode",
},
"orderId": "501B17EF-36C4-4039-B92C-6517969B464E",
"orderLineId": "38B17EF-36C4-4039-B92C-4817969B464E",
"status": "Active",
"ticketReference": "KJj43nejhbTxhr897287",
"issuedAt": "2020-03-21T00:00:00",
"activatedAt": null,
"blocked": false,
"cancelledAt": null,
"fraudDetected": false,
"barcode": "barcodeBytes",
"deviceId": "e2be51ae-2701-4803-a2d7-97d4b714482d",
"_links":
{
"get_order":
{
"href": "https://api.integratielaag.nl/abt/touchpoint/1.0/orders/501B17EF-36C4-4039-B92C-6517969B464E",
"method": "GET",
},
"patch_productinstance":
{
"href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/productinstances/0f0981bf-6d60-4b06-bc55-de1ba325f366",
"method": "PATCH",
},
},
},
],
"vouchers":[]
}
}
getSingleVoucherProductInstanceForCustomer:
summary: One voucher product-instance
value:
{
"productInstances":{
"ovPayProducts":[],
"barcodeTickets":[],
"vouchers":[
{
"productInstanceId": "07a55d42-ea42-4f5c-896a-b340ab084309",
"productId": 81,
"name": "HTM ooivaarspas voucher ",
"productCategory":
{
"productCategoryId": 9,
"name": "Voucher",
},
"voucherCode": "HTM45253",
"fromInclusive": "2026-01-01T00:00:00",
"untillInclusive": "2026-12-31T23:59:99",
"voucherStatus": {
"voucherStatusId": 2,
"name": "issued"
},
"mandatoryCustomerDataItems":
[
{
"mandatoryCustomerDataItemId": 8,
"customerDataItem": "padBirthDate",
},
{
"mandatoryCustomerDataItemId": 4,
"customerDataItem": "emailAddress",
},
]
}
]
}
}
/productinstances/{productInstanceId}:
parameters:
- name: X-HTM-JWT-AUTH-HEADER
in: header
schema:
type: string
example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
required: false
description: The JWT of a customer in case of touchpoint were customer logs in themselves
- name: X-HTM-CUSTOMER-PROFILE-ID-HEADER
in: header
schema:
type: string
example: feaaef83-a551-4283-8419-340b1ada3b55
required: false
description: The customerProfileId of a customer in the case of the SMP
- name: X-HTM-ROLE-HEADER
in: header
schema:
type: string
example: Customer
required: false
- name: productInstanceId
in: path
required: true
style: simple
description: Id of the product instance you want to change
schema:
type: string
format: uuid
example: 0f0981bf-6d60-4b06-bc55-de1ba325f366
patch:
summary: Update a productInstance
description: |-
Update the status of the give productInstance.
tags:
- ProductInstances
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/unavailable"
examples:
Update a productInstance status to active:
value:
{
"status": "Active"
}
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/unavailable"
examples:
Update a productInstance status to active:
summary: Update a productInstance status to active
value:
{
"productInstances":
[
{
"productInstanceId": "0f0981bf-6d60-4b06-bc55-de1ba325f366",
"productId": 13,
"name": "HTM dagkaart",
"purchasedProductType": "TapConnect",
"status": "Active",
"isRenewable": false,
"productCategory":
{
"productCategoryId": 2,
"name": "Afgekocht reisrecht",
},
"fromInclusive": "2024-11-25T13:25:00+01:00",
"untilInclusive": null,
"orderId": "501B17EF-36C4-4039-B92C-6517969B464E",
"orderLineId": "38B17EF-36C4-4039-B92C-4817969B464E",
"contractId": null,
"content": {
"ticketReference": "KJj43nejhbTxhr897287",
"issuedAt": "2020-03-21T00:00:00",
"activatedAt": "2020-03-21T00:00:00",
"blocked": false,
"cancelledAt": null,
"fraudDetected": false,
"barcode": "barcodeBytes"
},
"_links":
{
"get_order":
{
"href": "https://api.integratielaag.nl/abt/touchpoint/1.0/orders/501B17EF-36C4-4039-B92C-6517969B464E",
"method": "GET",
},
"patch_productinstance":
{
"href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/productinstances/0f0981bf-6d60-4b06-bc55-de1ba325f366",
"method": "PATCH",
},
},
},
],
}
components: components:
schemas: schemas:
unavailable: unavailable:
@ -4163,7 +3791,7 @@ components:
method: method:
type: string type: string
example: GET example: GET
ProductInstancesResponse: OvPayTokenProductInstancesResponse:
type: object type: object
required: required:
- productInstances - productInstances
@ -4173,29 +3801,22 @@ components:
items: items:
type: object type: object
required: required:
- productInstanceId
- productId - productId
- name - name
- status - status
- purchasedProductType
- isRenewable - isRenewable
- productCategory - productCategory
- fromInclusive
- orderId
- orderLineId
- _links - _links
properties: properties:
productInstanceId:
type: string
format: uuid
example: 0f0981bf-6d60-4b06-bc55-de1ba325f366
productId: productId:
type: integer type: integer
example: 1 example: 1
name: name:
type: string type: string
example: HTM 90% Korting example: HTM 90% Korting
purchasedProductType:
type: string
description: The type of product instance (e.g. GBO, TapConnect, physical, etc.)
example: GBO
status: status:
type: string type: string
enum: ["Active", "Ended", "Refunded"] enum: ["Active", "Ended", "Refunded"]
@ -4236,10 +3857,6 @@ components:
format: uuid format: uuid
example: 56B17EF-C436-9043-B76C-481797WEB464F example: 56B17EF-C436-9043-B76C-481797WEB464F
description: Only present for subscriptions/contracts description: Only present for subscriptions/contracts
content:
type: object
description: Custom data for the product-instance, depending on the purchasedProductType
example: null
_links: _links:
type: object type: object
properties: properties:
@ -4272,13 +3889,3 @@ components:
method: method:
type: string type: string
example: GET example: GET
patch_productinstance:
type: object
description: Only present for TapConnect product-instances that need to be activated
properties:
href:
type: string
example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/productinstances/0f0981bf-6d60-4b06-bc55-de1ba325f366
method:
type: string
example: PATCH

View File

@ -1303,7 +1303,6 @@ paths:
name: externalDeviceId name: externalDeviceId
schema: schema:
type: string type: string
format: uuid
example: c5545584-04af-4c60-a955-d6a70baab848 example: c5545584-04af-4c60-a955-d6a70baab848
required: false required: false
description: The external id of the device. description: The external id of the device.
@ -2480,7 +2479,6 @@ components:
format: uuid format: uuid
externalDeviceId: externalDeviceId:
type: string type: string
format: uuid
alias: alias:
type: string type: string
required: required:
@ -2599,7 +2597,6 @@ components:
properties: properties:
externalDeviceId: externalDeviceId:
type: string type: string
format: uuid
alias: alias:
type: string type: string
defaultCustomerProfileResponse: defaultCustomerProfileResponse:
@ -2870,7 +2867,6 @@ components:
type: integer type: integer
externalDeviceId: externalDeviceId:
type: string type: string
format: uuid
alias: alias:
type: string type: string
required: required:

View File

@ -57,13 +57,12 @@ paths:
required: false required: false
description: The id of the touch point where the order was initiated. description: The id of the touch point where the order was initiated.
- in: query - in: query
name: deviceId name: externalDeviceId
schema: schema:
type: string type: string
format: uuid
example: "7a28bd54-7ca9-499a-a722-d15ab858ab99" example: "7a28bd54-7ca9-499a-a722-d15ab858ab99"
required: false required: false
description: The id of the device used to place the order. description: The external id of the device used to place the order.
- in: query - in: query
name: languageId name: languageId
schema: schema:
@ -141,7 +140,7 @@ paths:
"touchPointId": 1, "touchPointId": 1,
"name": "Perplex" "name": "Perplex"
}, },
"deviceId": "42e77532-d831-41da-b07a-7edb9bb7f004", "externalDeviceId": "42e77532-d831-41da-b07a-7edb9bb7f004",
"language": "language":
{ {
"languageId": 1, "languageId": 1,
@ -374,7 +373,7 @@ paths:
"customerProfileId": 1337, "customerProfileId": 1337,
"totalAmount": 121, "totalAmount": 121,
"touchPointId": 1, "touchPointId": 1,
"deviceId": "b8ca9fdf-0bb9-4e49-b48d-41e395563377", "externalDeviceId": "b8ca9fdf-0bb9-4e49-b48d-41e395563377",
"languageId": 1, "languageId": 1,
"createdOn": "2024-03-22T09:00:00", "createdOn": "2024-03-22T09:00:00",
"order_OrderStatus": "order_OrderStatus":
@ -486,7 +485,7 @@ paths:
"touchPointId": 1, "touchPointId": 1,
"name": "Perplex" "name": "Perplex"
}, },
"deviceId": null, "externalDeviceId": null,
"language": "language":
{ {
"languageId": 1, "languageId": 1,
@ -659,7 +658,7 @@ paths:
example: example:
{ {
"customerProfileId": 1337, "customerProfileId": 1337,
"deviceId": "fe68e624-b75f-48ca-a179-d5f86a8ab7d5", "externalDeviceId": "fe68e624-b75f-48ca-a179-d5f86a8ab7d5",
"totalAmount": 121, "totalAmount": 121,
"languageId": 1, "languageId": 1,
"lastUpdatedOn": "2024-03-22T09:00:00", "lastUpdatedOn": "2024-03-22T09:00:00",

File diff suppressed because it is too large Load Diff

View File

@ -1820,6 +1820,8 @@ components:
customerDataItem: shippingAddress customerDataItem: shippingAddress
- mandatoryCustomerDataItemId: 10 - mandatoryCustomerDataItemId: 10
customerDataItem: billingAddress customerDataItem: billingAddress
- mandatoryCustomerDataItemId: 11
customerDataItem: startDate
items: items:
$ref: '#/components/schemas/mandatoryCustomerDataItemGetEntity' $ref: '#/components/schemas/mandatoryCustomerDataItemGetEntity'
type: array type: array

View File

@ -128,7 +128,7 @@ paths:
"createdOn": "2024-10-04T12:34:56.000", "createdOn": "2024-10-04T12:34:56.000",
"lastUpdatedOn": "2024-10-04T12:34:56.000", "lastUpdatedOn": "2024-10-04T12:34:56.000",
"createdBy": "someuser", "createdBy": "someuser",
"lastUpdatedBy": null, "lastUpdatedBy": null
}, },
], ],
"purchasedTapconnectTickets": [], "purchasedTapconnectTickets": [],
@ -154,7 +154,7 @@ paths:
"purchasedProductResourceId": "06dae996-cdfe-45f1-833a-720201c35114", "purchasedProductResourceId": "06dae996-cdfe-45f1-833a-720201c35114",
"resourceName": "resourceName":
{ "resourceNameId": 2, "name": "orders" }, { "resourceNameId": 2, "name": "orders" },
"resourceIdentifier": "f809a6e1-1c8d-4f8e-8a6e-0d0b1e1e1e1e", "resourceIdentifier": "f809a6e1-1c8d-4f8e-8a6e-0d0b1e1e1e1e"
}, },
], ],
"purchasedGboProducts": [], "purchasedGboProducts": [],
@ -170,6 +170,8 @@ paths:
"lastUpdatedOn": "2024-10-04T12:34:56.000", "lastUpdatedOn": "2024-10-04T12:34:56.000",
"createdBy": "user", "createdBy": "user",
"lastUpdatedBy": "user", "lastUpdatedBy": "user",
"externalDeviceId": "c5545584-04af-4c60-a955-d6a70baab848",
"serviceId": "HTM-1234-7654-8945"
}, },
], ],
"issuedVouchers": [], "issuedVouchers": [],
@ -341,6 +343,8 @@ paths:
"lastUpdatedOn": "2024-10-04T12:34:56.000", "lastUpdatedOn": "2024-10-04T12:34:56.000",
"createdBy": "user", "createdBy": "user",
"lastUpdatedBy": "user", "lastUpdatedBy": "user",
"externalDeviceId": "c5545584-04af-4c60-a955-d6a70baab848",
"serviceId": "HTM-1234-7654-8945"
}, },
], ],
"issuedVouchers": [], "issuedVouchers": [],
@ -775,18 +779,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/PostPurchasedTapConnectTicketRequest"
example:
{
"issuedAt": "2024-10-04T12:34:56.000",
"activatedAt": "2024-10-04T12:34:56.000",
"cancelledAt": null,
"ticketReference": "KJj43nejhbTxhr897287",
"createdOn": "2024-10-04T12:34:56.000",
"lastUpdatedOn": "2024-10-04T12:34:56.000",
"createdBy": "user",
"lastUpdatedBy": "user",
}
responses: responses:
"201": "201":
description: Created description: Created
@ -907,6 +900,18 @@ paths:
type: string type: string
example: user example: user
description: The user that last updated the purchased Tapconnect ticket. description: The user that last updated the purchased Tapconnect ticket.
- in: query
name: externalDeviceId
schema:
type: string
example: c5545584-04af-4c60-a955-d6a70baab848
description: The external id of the device.
- in: query
name: serviceId
schema:
type: string
example: HTM-1234-7654-8945
description: A printable id that needs to be next to the printed barcode on the ticket, which is used when the customer contacts the service desk.
responses: responses:
"200": "200":
description: OK description: OK
@ -929,6 +934,8 @@ paths:
"lastUpdatedOn": "2024-10-04T12:34:56.000", "lastUpdatedOn": "2024-10-04T12:34:56.000",
"createdBy": "user", "createdBy": "user",
"lastUpdatedBy": "user", "lastUpdatedBy": "user",
"externalDeviceId": "c5545584-04af-4c60-a955-d6a70baab848",
"serviceId": "HTM-1234-7654-8945"
}, },
], ],
} }
@ -968,7 +975,7 @@ paths:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
example: example:
{ {
"purchasedTapconnectTicketId": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90", "purchasedTapconnectTicketId": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90"
} }
/purchasedproducts/{purchasedProductId}/issuedvouchers: /purchasedproducts/{purchasedProductId}/issuedvouchers:
parameters: parameters:
@ -1178,6 +1185,51 @@ components:
schemas: schemas:
unavailable: unavailable:
type: object type: object
PostPurchasedTapConnectTicketRequest:
type: object
required:
- issuedAt
- ticketReference
- createdOn
- lastUpdatedOn
- createdBy
- serviceId
properties:
issuedAt:
type: string
format: date-time
example: 2024-10-04T12:34:56.000
activatedAt:
type: string
format: date-time
example: 2024-10-04T12:34:56.000
cancelledAt:
type: string
format: date-time
example: 2024-10-04T12:34:56.000
ticketReference:
type: string
example: KJj43nejhbTxhr897287
createdOn:
type: string
format: date-time
example: 2024-10-04T12:34:56.000
lastUpdatedOn:
type: string
format: date-time
example: 2024-10-04T12:34:56.000
createdBy:
type: string
example: John Doe
lastUpdatedBy:
type: string
example: John Doe
externalDeviceId:
type: string
example: c5545584-04af-4c60-a955-d6a70baab848
serviceId:
type: string
example: HTM-1234-7654-8945
BulkResponseBody: BulkResponseBody:
type: object type: object
properties: properties: