features/OVPAY2294-vouchers-in-orders #45
@ -5300,261 +5300,6 @@ paths:
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
/orders/{orderId}/ordervouchers:
|
|
||||||
parameters:
|
|
||||||
- in: path
|
|
||||||
name: orderId
|
|
||||||
required: true
|
|
||||||
style: simple
|
|
||||||
explode: false
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
format: uuid
|
|
||||||
example: a0ef57fa-395c-4a03-96e9-234c26dccea9
|
|
||||||
- in: header
|
|
||||||
name: X-HTM-JWT-AUTH-HEADER
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
|
|
||||||
description: The JWT of the logged in customer (in case of a web shop).
|
|
||||||
post:
|
|
||||||
tags:
|
|
||||||
- Order Creation Flow
|
|
||||||
summary: Add a voucher to an existing orders.
|
|
||||||
description: Add a voucher to an existing order.
|
|
||||||
requestBody:
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: "#/components/schemas/unavailable"
|
|
||||||
examples:
|
|
||||||
Add a voucher to an existing order:
|
|
||||||
summary: Add a voucher to an existing order
|
|
||||||
description: Add a voucher to an existing order
|
|
||||||
value:
|
|
||||||
{
|
|
||||||
"voucherCode": "Voucher1234",
|
|
||||||
"orderLineId": "6bb3d8a1-474f-4bdb-9cbc-31bf4ed0482e"
|
|
||||||
}
|
|
||||||
responses:
|
|
||||||
"201":
|
|
||||||
description: Created
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: "#/components/schemas/unavailable"
|
|
||||||
examples:
|
|
||||||
Order with added voucher:
|
|
||||||
value:
|
|
||||||
{
|
|
||||||
"validContents": true,
|
|
||||||
"orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df",
|
|
||||||
"externalOrderId": null,
|
|
||||||
"orderNumber": "ORD-123456",
|
|
||||||
"customerProfileId": 1337,
|
|
||||||
"totalAmount": 121,
|
|
||||||
"touchPoint":
|
|
||||||
{
|
|
||||||
"salesTouchpointId": 3,
|
|
||||||
"name": "Website (Perplex)",
|
|
||||||
"isActive": true,
|
|
||||||
"retailerId": 1001,
|
|
||||||
},
|
|
||||||
"language":
|
|
||||||
{
|
|
||||||
"languageId": 1,
|
|
||||||
"name": "Nederlands",
|
|
||||||
"iso639Code": "nl-NL",
|
|
||||||
"ietfCode": "nl",
|
|
||||||
},
|
|
||||||
"createdOn": "2024-03-22T09:00:00",
|
|
||||||
"lastUpdatedOn": "2024-03-22T09:00:00",
|
|
||||||
"order_OrderStatuses":
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"order_orderStatusId": "f1d0e1a7-a3cf-4876-b8f2-073add10667f",
|
|
||||||
"orderStatus":
|
|
||||||
{ "orderStatusId": 1, "name": "concept" },
|
|
||||||
"createdOn": "2024-03-22T09:00:00",
|
|
||||||
"description": "Order is aangemaakt",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"order_OrderVouchers":
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"order_orderVoucherId": "a66f224f-347b-47e7-b480-0b84b8ef5177",
|
|
||||||
"issuedVoucher":
|
|
||||||
{ "voucherCode": "HTM1234",
|
|
||||||
"productName": "Ooievaarspas voucher",
|
|
||||||
"productDescription": "Ontvang de ooievaarspas om gratis te reizen bij de HTM",
|
|
||||||
"voucherStatus": {
|
|
||||||
"voucherStatusId": 2,
|
|
||||||
"name": "Issued"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"orderLineId": "cccada2c-d5ea-48ab-b4be-f590e16b5468",
|
|
||||||
"validations": [
|
|
||||||
{
|
|
||||||
"code": "VOUCHER_CLAIM_GBO_BIRTHDATE",
|
|
||||||
"detail": "Birthdate does not match the claim",
|
|
||||||
"path": "#/orderLines[cccada2c-d5ea-48ab-b4be-f590e16b5468]/customerToken[878ad7c1-cd8f-4bcf-a983-1bd8c6e6975e]/personalAccountData",
|
|
||||||
"parameter": "dateOfBirth",
|
|
||||||
"type": "ERROR"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"code": "VOUCHER_CLAIM_EMAIL",
|
|
||||||
"detail": "Email on the order needs to be filled",
|
|
||||||
"path": "#/orderCustomer",
|
|
||||||
"parameter": "emailAddress",
|
|
||||||
"type": "REMARK"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"orderLines":
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"orderLineId": "cccada2c-d5ea-48ab-b4be-f590e16b5468",
|
|
||||||
"externalOrderLineId": null,
|
|
||||||
"productId": 1,
|
|
||||||
"productName": "HTM Maandkorting 20%",
|
|
||||||
"fikoArticleNumber": "6609",
|
|
||||||
"productDescription": "HTM Maandkorting 20%",
|
|
||||||
"taxCode": "V21",
|
|
||||||
"taxPercentage": 21.0000,
|
|
||||||
"taxAmount": null,
|
|
||||||
"amountExclTax": null,
|
|
||||||
"amountInclTax": 121,
|
|
||||||
"quantity": 1,
|
|
||||||
"orderLineTerms":
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"orderLineTermsId": "cccada2c-d5ea-48ab-b4be-f590e16b5468",
|
|
||||||
"termsUrl": "generalTermsAndConditions.pdf",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"orderLineTermsId": "bd76f723-9308-4629-a291-4c4fafd7ed87",
|
|
||||||
"termsUrl": "productTermsAndConditions.pdf",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"createdOn": "2024-03-22T09:00:00",
|
|
||||||
"validFrom": "2024-03-22T09:00:00",
|
|
||||||
"validUntil": null,
|
|
||||||
"orderLineStatus":
|
|
||||||
{ "orderLineStatusId": 1, "name": "pending" },
|
|
||||||
"customerTokens":
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"customerTokenId": "878ad7c1-cd8f-4bcf-a983-1bd8c6e6975e",
|
|
||||||
"tokenType":
|
|
||||||
{ "tokenTypeId": 1, "name": "EMV" },
|
|
||||||
"ovPayTokenId": 1,
|
|
||||||
"serviceReferenceId": "NLOV1234567ABCDEFG",
|
|
||||||
"amount": 34,
|
|
||||||
"ovpasNumber": "OV34567",
|
|
||||||
"verificationCode": "A7H6",
|
|
||||||
"personalAccountData":
|
|
||||||
{
|
|
||||||
"personalAccountDataId": "47db8a40-3238-4bf5-9284-759e3888bd47",
|
|
||||||
"name": "Jan de Vries",
|
|
||||||
"birthdate": "1970-01-01",
|
|
||||||
"photo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAWJLR0Q+SWQA4wAAAAd0SU1FB+YCBAwmK58TFQgAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjItMDItMDRUMTI6Mzg6NDMrMDA6MDBAjYOrAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIyLTAyLTA0VDEyOjM4OjQzKzAwOjAwMdA7FwAAAFd6VFh0UmF3IHByb2ZpbGUgdHlwZSBpcHRjAAB4nOPyDAhxVigoyk/LzEnlUgADIwsuYwsTIxNLkxQDEyBEgDTDZAMjs1Qgy9jUyMTMxBzEB8uASKBKLgDqFxF08kI1lQAAAYdpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0n77u/JyBpZD0nVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkJz8+DQo8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIj48cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPjxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSJ1dWlkOmZhZjViZGQ1LWJhM2QtMTFkYS1hZDMxLWQzM2Q3NTE4MmYxYiIgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iPjx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+PC9yZGY6RGVzY3JpcHRpb24+PC9yZGY6UkRGPjwveDp4bXBtZXRhPg0KPD94cGFja2V0IGVuZD0ndyc/PiyUmAsAAAANSURBVBhXY3grk/YfAAXYAm/HQierAAAAAElFTkSuQmCC",
|
|
||||||
"challengeType":
|
|
||||||
{
|
|
||||||
"challengeTypeId": 1,
|
|
||||||
"name": "email",
|
|
||||||
},
|
|
||||||
"oneTimePassword": "H5Iiz3JTaQeIV8p",
|
|
||||||
},
|
|
||||||
"ovPayToken":
|
|
||||||
{
|
|
||||||
"customerProfileId": 1,
|
|
||||||
"ovPayTokenId": 1,
|
|
||||||
"xTat": "32089cc8-d187-47ff-a3a9-5c2558def811",
|
|
||||||
"tokenType":
|
|
||||||
{
|
|
||||||
"tokenTypeId": 2,
|
|
||||||
"name": "OV-pas physical",
|
|
||||||
},
|
|
||||||
"alias": "MyToken",
|
|
||||||
"tokenStatus":
|
|
||||||
{
|
|
||||||
"tokenStatusId": 2,
|
|
||||||
"name": "Active",
|
|
||||||
},
|
|
||||||
"expirationDate": "2028-02-01",
|
|
||||||
"replacedByTokenId": null,
|
|
||||||
"autoReloadRegistration":
|
|
||||||
{
|
|
||||||
"autoReloadAmount": 500,
|
|
||||||
"retailerReferenceId": "abc",
|
|
||||||
"arrit": "425f7fc2-1103-4822-9c79-7c4aaa2fb6aa",
|
|
||||||
"autoReloadRegistrationStatus": "ACTIVE",
|
|
||||||
"autoReloadRegistrationStartDateTime": "2024-06-02T15:03:46Z",
|
|
||||||
},
|
|
||||||
"ePurse":
|
|
||||||
{
|
|
||||||
"e-PurseBalance":
|
|
||||||
{
|
|
||||||
"currency": "EUR",
|
|
||||||
"amount": 350,
|
|
||||||
},
|
|
||||||
"status": "ACTIVE",
|
|
||||||
"originDate": "2019-07-16T11:00:00+02:00",
|
|
||||||
},
|
|
||||||
"personalAccountData":
|
|
||||||
{
|
|
||||||
"name":
|
|
||||||
{
|
|
||||||
"inaccuracyFlag": false,
|
|
||||||
"inaccuracyFlagReason": null,
|
|
||||||
"inaccuracyFlagSetCounter": 0,
|
|
||||||
"isValidated": false,
|
|
||||||
"changeCounter": 0,
|
|
||||||
"maxUpdatesVerificationCount": 0,
|
|
||||||
"lastChangeDate": "2024-08-24T14:15:22Z",
|
|
||||||
},
|
|
||||||
"birthdate":
|
|
||||||
{
|
|
||||||
"inaccuracyFlag": false,
|
|
||||||
"inaccuracyFlagReason": null,
|
|
||||||
"inaccuracyFlagSetCounter": 0,
|
|
||||||
"isValidated": false,
|
|
||||||
"changeCounter": 0,
|
|
||||||
"maxUpdatesVerificationCount": 0,
|
|
||||||
"lastChangeDate": "2024-08-24T14:15:22Z",
|
|
||||||
},
|
|
||||||
"photo":
|
|
||||||
{
|
|
||||||
"inaccuracyFlag": false,
|
|
||||||
"inaccuracyFlagReason": null,
|
|
||||||
"inaccuracyFlagSetCounter": 0,
|
|
||||||
"isValidated": false,
|
|
||||||
"changeCounter": 0,
|
|
||||||
"maxUpdatesVerificationCount": 0,
|
|
||||||
"lastChangeDate": "2024-08-24T14:15:22Z",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"gboAgeProfile":
|
|
||||||
{
|
|
||||||
"gboAgeProfileId": 1,
|
|
||||||
"name": "Kind (4 t/m 11 jaar)",
|
|
||||||
"ageFromInclusive": 4,
|
|
||||||
"ageToInclusive": 11,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"orderAccountingStatuses": [],
|
|
||||||
"validationResult": "valid",
|
|
||||||
"additionalRemarks": [],
|
|
||||||
"validationErrors": [],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"payments": [],
|
|
||||||
"orderCustomer": null
|
|
||||||
}
|
|
||||||
/orders/{orderId}/fulfill:
|
/orders/{orderId}/fulfill:
|
||||||
parameters:
|
parameters:
|
||||||
- in: path
|
- in: path
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user