Add touchpointId/metadata1tm5/statusChangedAfter in CRUD and TP spec

POST purchasedProduct is missing in CRUD? Try to find it later (and add new changes to request body there as well)
This commit is contained in:
Max Martens 2026-08-13 17:13:52 +02:00
parent 3c4ca6e00c
commit 7953e035bb
2 changed files with 58 additions and 9 deletions

View File

@ -228,6 +228,14 @@ paths:
schema: schema:
type: integer type: integer
example: 321 example: 321
- name: statusChangedAfter
in: query
required: false
description: Return only issued vouchers that have had their status changed after the given date and time.
schema:
type: string
format: date-time-offset
example: "2024-10-04T00:00:00.000Z"
- name: voucherStatusId - name: voucherStatusId
in: query in: query
required: false required: false
@ -271,7 +279,7 @@ paths:
"voucherCode": "HTM-A7J-128-PYT", "voucherCode": "HTM-A7J-128-PYT",
"fromInclusive": "2024-10-04T00:00:00.000", "fromInclusive": "2024-10-04T00:00:00.000",
"untilInclusive": "2024-11-04T00:00:00.000", "untilInclusive": "2024-11-04T00:00:00.000",
"voucherStatus": { "voucherStatusId": 2, "name": "issued" }, "voucherStatus": { "voucherStatusId": 2, "name": "issued", "reason": "Test reason" },
"product": "product":
{ {
"productId": 263, "productId": 263,
@ -333,7 +341,7 @@ paths:
"voucherCode": "HTM-A7J-128-PYT", "voucherCode": "HTM-A7J-128-PYT",
"fromInclusive": "2024-10-04T00:00:00.000", "fromInclusive": "2024-10-04T00:00:00.000",
"untilInclusive": "2024-11-04T00:00:00.000", "untilInclusive": "2024-11-04T00:00:00.000",
"voucherStatus": { "voucherStatusId": 2, "name": "issued" }, "voucherStatus": { "voucherStatusId": 2, "name": "issued", "reason": "Test reason" },
"product": "product":
{ {
"productId": 264, "productId": 264,
@ -383,7 +391,7 @@ paths:
"voucherCode": "HTM-A7J-128-PYT", "voucherCode": "HTM-A7J-128-PYT",
"fromInclusive": "2024-10-04T00:00:00.000", "fromInclusive": "2024-10-04T00:00:00.000",
"untilInclusive": "2024-11-04T00:00:00.000", "untilInclusive": "2024-11-04T00:00:00.000",
"voucherStatus": { "voucherStatusId": 2, "name": "issued" }, "voucherStatus": { "voucherStatusId": 2, "name": "issued", "reason": "Test reason" },
"product": "product":
{ {
"productId": 265, "productId": 265,
@ -546,7 +554,7 @@ paths:
"voucherCode": "HTM-A7J-128-PYT", "voucherCode": "HTM-A7J-128-PYT",
"fromInclusive": "2024-10-04T00:00:00.000", "fromInclusive": "2024-10-04T00:00:00.000",
"untilInclusive": "2024-11-04T00:00:00.000", "untilInclusive": "2024-11-04T00:00:00.000",
"voucherStatus": { "voucherStatusId": 1, "name": "new" }, "voucherStatus": { "voucherStatusId": 1, "name": "new", "reason": null },
"product": "product":
{ {
"productId": 263, "productId": 263,
@ -665,12 +673,13 @@ paths:
{ {
"voucherStatusId": 2 "voucherStatusId": 2
} }
Mark a voucher as revoked: Mark a voucher as revoked (with reason):
summary: Mark a voucher as revoked summary: Mark a voucher as revoked
description: Mark a voucher as revoked. This may also impact any active travel products that have been acquired using this voucher. This depends on specific business rules that are agreed upon with HTM. description: Mark a voucher as revoked. This may also impact any active travel products that have been acquired using this voucher. This depends on specific business rules that are agreed upon with HTM.
value: value:
{ {
"voucherStatusId": 4 "voucherStatusId": 4,
"reason": "Voucher was redeemed by an unauthorized person"
} }
responses: responses:
"200": "200":
@ -688,7 +697,7 @@ paths:
"voucherCode": "HTM-A7J-128-PYT", "voucherCode": "HTM-A7J-128-PYT",
"fromInclusive": "2024-10-04T00:00:00.000", "fromInclusive": "2024-10-04T00:00:00.000",
"untilInclusive": "2024-11-04T00:00:00.000", "untilInclusive": "2024-11-04T00:00:00.000",
"voucherStatus": { "voucherStatusId": 4, "name": "revoked" }, "voucherStatus": { "voucherStatusId": 4, "name": "revoked", "reason": "Voucher was redeemed by an unauthorized person" },
"product": "product":
{ {
"productId": 263, "productId": 263,
@ -1021,6 +1030,10 @@ components:
type: integer type: integer
description: The new status of the voucher. description: The new status of the voucher.
example: 4 example: 4
reason:
type: string
description: The reason for the change of the voucher status.
example: "Voucher was redeemed by an unauthorized person"
supplierTouchpointIssuedVouchersListResponse: supplierTouchpointIssuedVouchersListResponse:
type: object type: object
properties: properties:
@ -1077,10 +1090,14 @@ components:
properties: properties:
voucherStatusId: voucherStatusId:
type: integer type: integer
example: 2 example: 4
name: name:
type: string type: string
example: "issued" example: "revoked"
reason:
type: string
description: The reason for the change of the voucher status.
example: "Voucher was redeemed by an unauthorized person"
product: product:
type: object type: object
description: The "product" referencing the voucher definition that this voucher instance is based on description: The "product" referencing the voucher definition that this voucher instance is based on

View File

@ -209,6 +209,12 @@ paths:
{ {
"issuedVoucherId": "e1f2g3h4-i5j6-k7l8-m9n0-o1p2q3r4s5t6", "issuedVoucherId": "e1f2g3h4-i5j6-k7l8-m9n0-o1p2q3r4s5t6",
"voucherCode": "VOUCHER12345", "voucherCode": "VOUCHER12345",
"touchpointId": 23,
"metadata1": null,
"metadata2": null,
"metadata3": null,
"metadata4": null,
"metadata5": null,
"voucherStatusInstances": "voucherStatusInstances":
[ [
{ {
@ -384,6 +390,12 @@ paths:
{ {
"issuedVoucherId": "e1f2g3h4-i5j6-k7l8-m9n0-o1p2q3r4s5t6", "issuedVoucherId": "e1f2g3h4-i5j6-k7l8-m9n0-o1p2q3r4s5t6",
"voucherCode": "VOUCHER12345", "voucherCode": "VOUCHER12345",
"touchpointId": 23,
"metadata1": null,
"metadata2": null,
"metadata3": null,
"metadata4": null,
"metadata5": null,
"voucherStatusInstances": "voucherStatusInstances":
[ [
{ {
@ -1058,6 +1070,12 @@ paths:
example: example:
{ {
"voucherCode": "VOUCHER123", "voucherCode": "VOUCHER123",
"touchpointId": 23,
"metadata1": null,
"metadata2": null,
"metadata3": null,
"metadata4": null,
"metadata5": null,
"voucherStatusInstances": "voucherStatusInstances":
[ [
{ {
@ -1107,6 +1125,14 @@ paths:
format: uuid format: uuid
example: 058a1af7-897f-45d5-b691-9cc9161e387f example: 058a1af7-897f-45d5-b691-9cc9161e387f
description: The id of the purchased product. description: The id of the purchased product.
- in: query
name: statusChangedAfter
required: false
description: Return only issued vouchers that have had their status changed after the given date and time.
schema:
type: string
format: date-time-offset
example: "2024-10-04T00:00:00.000Z"
- in: query - in: query
name: productId name: productId
schema: schema:
@ -1151,6 +1177,12 @@ paths:
"issuedVoucherId": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90", "issuedVoucherId": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
"purchasedProductId": "058a1af7-897f-45d5-b691-9cc9161e387f", "purchasedProductId": "058a1af7-897f-45d5-b691-9cc9161e387f",
"voucherCode": "VOUCHER123", "voucherCode": "VOUCHER123",
"touchpointId": 23,
"metadata1": null,
"metadata2": null,
"metadata3": null,
"metadata4": null,
"metadata5": null,
"voucherStatusInstances": "voucherStatusInstances":
[ [
{ {