OVPAY-2442 - Changed all bulk endpoints to single inserts and patches (yarr).

This commit is contained in:
Bas Boterman 2026-02-23 17:03:24 +01:00
parent bf0ebee435
commit 5d307d9808

View File

@ -316,19 +316,17 @@ paths:
"mandatoryCustomerDataItem": "mandatoryCustomerDataItem":
{ {
"mandatoryCustomerDataItemId": 8, "mandatoryCustomerDataItemId": 8,
"customerDataItem": "padBirthDate" "customerDataItem": "padBirthDate",
}, },
"value": "1980-06-31" "value": "1980-06-31",
}, },
{ {
"mandatoryCustomerDataItem": "mandatoryCustomerDataItem":
{ {
"mandatoryCustomerDataItemId": 4, "mandatoryCustomerDataItemId": 4,
"customerDataItem": "emailAddress" "customerDataItem": "emailAddress",
}, },
"value": "harry@griffindor.co.uk" "value": "harry@griffindor.co.uk",
}, },
], ],
}, },
@ -422,10 +420,10 @@ paths:
"instance": "/issuedvouchers", "instance": "/issuedvouchers",
} }
post: post:
summary: Issue one or more vouchers for a specific product summary: Issue a voucher for a specific product
description: | description: |
Issue one ore more vouchers for a specific product. The vouchers will be issued for the touch point that is associated with the access token used in the request. Issue a voucher for a specific product. The voucher will be issued for the touch point that is associated with the access token used in the request.
The product for which the vouchers should be issued must have active selling periods for touch points within the same retailer as the calling touch point. The product for which the voucher should be issued must have active selling periods for touch points within the same retailer as the calling touch point.
tags: tags:
- Vouchers - Vouchers
requestBody: requestBody:
@ -435,12 +433,9 @@ paths:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
examples: examples:
Issue a single voucher: Issue a voucher with prefilled voucher code:
summary: Issue a single voucher summary: Issue a voucher with prefilled voucher code
value: value:
{
"issuedVouchers":
[
{ {
"voucherCode": "VOUCHER123", "voucherCode": "VOUCHER123",
"fromInclusive": "2024-10-04T00:00:00.000", "fromInclusive": "2024-10-04T00:00:00.000",
@ -457,17 +452,11 @@ paths:
"value": "stasjo@html.nl", "value": "stasjo@html.nl",
}, },
], ],
},
],
} }
Issue multiple vouchers: Issue a voucher without prefilled voucher code:
summary: Issue multiple vouchers summary: Issue a voucher without prefilled voucher code
value: value:
{ {
"issuedVouchers":
[
{
"voucherCode": "VOUCHER123",
"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",
"productId": 263, "productId": 263,
@ -482,25 +471,6 @@ paths:
"value": "stasjo@html.nl", "value": "stasjo@html.nl",
}, },
], ],
},
{
"voucherCode": "VOUCHER456",
"fromInclusive": "2024-10-04T00:00:00.000",
"untilInclusive": "2024-11-04T00:00:00.000",
"productId": 263,
"voucherClaims":
[
{
"mandatoryCustomerDataItemId": 8,
"value": "1970-01-01",
},
{
"mandatoryCustomerDataItemId": 4,
"value": "joey@htm.nl",
},
],
},
],
} }
responses: responses:
"201": "201":
@ -510,26 +480,51 @@ paths:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
examples: examples:
Successfully issued a single voucher: Successfully issued a voucher:
summary: Successfully issued a single voucher summary: Successfully issued a voucher
value: value:
{ {
"issuedVoucherIds": "issuedVoucherId": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
["d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90"], "voucherCode": "HKV-A7J-128-PYT",
} "fromInclusive": "2024-10-04T00:00:00.000",
Successfully issued multiple vouchers: "untilInclusive": "2024-11-04T00:00:00.000",
summary: Successfully issued multiple vouchers "voucherStatus": { "voucherStatusId": 1, "name": "New" },
value: "product":
{ {
"issuedVoucherIds": "productId": 263,
[ "productName": "HTM-80002",
"d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90", "productDescription": "10 euro korting op je gehele winkelmand.",
"a1b2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d", "productCategory":
], {
"productCategoryId": 9,
"isTravelProduct": false,
"name": "Voucher",
},
"amountInclTax": -1000,
"requiredProducts": [],
"_links":
{
"get_details":
{
"href": "https://api.integratielaag.nl/abt/touchpoint/1.0/products/263",
"method": "GET",
},
},
},
} }
/issuedvouchers/{issuedVoucherId}:
parameters:
- name: issuedVoucherId
in: path
required: true
description: The unique identifier of the issued voucher instance to update the status for.
schema:
type: string
format: uuid
example: d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90
patch: patch:
summary: Update the status of one ore more issued vouchers summary: Update the status of an issued voucher
description: Update the status of one ore more issued vouchers. This can be used to mark a voucher as redeemed, revoked or expired. description: Update the status of an issued voucher. This can be used to mark a voucher as redeemed, revoked or expired.
tags: tags:
- Vouchers - Vouchers
requestBody: requestBody:
@ -540,32 +535,10 @@ paths:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
examples: examples:
Mark a voucher as expired: Mark a voucher as expired:
summary: Mark a single voucher as expired summary: Mark a voucher as expired
value: value:
{ {
"issuedVouchers":
[
{
"issuedVoucherId": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
"voucherStatusId": 5, "voucherStatusId": 5,
},
],
}
Mark multiple vouchers as revoked:
summary: Mark multiple vouchers as revoked
value:
{
"issuedVouchers":
[
{
"issuedVoucherId": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
"voucherStatusId": 4,
},
{
"issuedVoucherId": "a1b2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d",
"voucherStatusId": 4,
},
],
} }
responses: responses:
"200": "200":
@ -575,22 +548,37 @@ paths:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
examples: examples:
Successfully updated the status of a single voucher: Successfully updated the status of a voucher:
summary: Successfully updated the status of a single voucher summary: Successfully updated the status of a voucher
value: value:
{ {
"issuedVoucherIds": "issuedVoucherId": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
["d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90"], "voucherCode": "HKV-A7J-128-PYT",
} "fromInclusive": "2024-10-04T00:00:00.000",
Successfully updated the status of multiple vouchers: "untilInclusive": "2024-11-04T00:00:00.000",
summary: Successfully updated the status of multiple vouchers "voucherStatus": { "voucherStatusId": 5, "name": "Expired" },
value: "product":
{ {
"issuedVoucherIds": "productId": 263,
[ "productName": "HTM-80002",
"d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90", "productDescription": "10 euro korting op je gehele winkelmand.",
"a1b2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d", "productCategory":
], {
"productCategoryId": 9,
"isTravelProduct": false,
"name": "Voucher",
},
"amountInclTax": -1000,
"requiredProducts": [],
"_links":
{
"get_details":
{
"href": "https://api.integratielaag.nl/abt/touchpoint/1.0/products/263",
"method": "GET",
},
},
},
} }
components: components:
securitySchemes: securitySchemes: