feature/OVPAY-2442 #53
@ -72,7 +72,8 @@ paths:
|
||||
"isTravelProduct": false,
|
||||
"name": "Voucher",
|
||||
},
|
||||
"requiredProducts": [
|
||||
"requiredProducts":
|
||||
[
|
||||
{
|
||||
"productId": 126,
|
||||
"productName": "HTM-30001",
|
||||
@ -392,6 +393,112 @@ paths:
|
||||
"detail": "An unexpected error occurred while processing your request.",
|
||||
"instance": "/issuedvouchers",
|
||||
}
|
||||
post:
|
||||
summary: Issue a voucher for a specific product to a customer
|
||||
description: |
|
||||
Issue a voucher for a specific product to a customer. 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 voucher should be issued must have active selling periods for touch points within the same retailer as the calling touch point.
|
||||
tags:
|
||||
- Vouchers
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/unavailable"
|
||||
examples:
|
||||
Issue a single voucher:
|
||||
summary: Issue a single voucher
|
||||
value:
|
||||
{
|
||||
"issuedVouchers":
|
||||
[
|
||||
{
|
||||
"voucherCode": "VOUCHER123",
|
||||
"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": "stasjo@html.nl",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
Issue multiple vouchers:
|
||||
summary: Issue multiple vouchers
|
||||
value:
|
||||
{
|
||||
"issuedVouchers":
|
||||
[
|
||||
{
|
||||
"voucherCode": "VOUCHER123",
|
||||
"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": "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:
|
||||
"201":
|
||||
description: Created
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/unavailable"
|
||||
examples:
|
||||
Successfully issued a single voucher:
|
||||
summary: Successfully issued a single voucher
|
||||
value:
|
||||
{
|
||||
"issuedVoucherIds":
|
||||
["d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90"],
|
||||
}
|
||||
Successfully issued multiple vouchers:
|
||||
summary: Successfully issued multiple vouchers
|
||||
value:
|
||||
{
|
||||
"issuedVoucherIds":
|
||||
[
|
||||
"d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
|
||||
"a1b2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d",
|
||||
],
|
||||
}
|
||||
components:
|
||||
securitySchemes:
|
||||
bearerToken:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user