features/OVPAY2294-vouchers-in-orders #45

Merged
MirjamHTM merged 10 commits from features/OVPAY2294-vouchers-in-orders into develop 2025-12-16 13:57:40 +00:00

View File

@ -5,6 +5,12 @@ info:
description: CRUD APIs for ABT Orders database. These are NOT the functional APIs from Service Engine.
servers:
- url: https://services.acc.api.htm.nl/abt/abtorder/1.0
tags:
- name: Order
- name: Order Line
- name: Payment
- name: Customer
- name: Order Voucher
paths:
/orders:
get:
@ -50,6 +56,14 @@ paths:
example: 1
required: false
description: The id of the touch point where the order was initiated.
- in: query
name: deviceId
schema:
type: string
format: uuid
example: "7a28bd54-7ca9-499a-a722-d15ab858ab99"
required: false
description: The id of the device used to place the order.
- in: query
name: languageId
schema:
@ -98,6 +112,14 @@ paths:
explode: false
required: false
description: Filter on most recent order status. 1 = concept, 2 = awaitingPayment, 3 = pendingPayment, 4 = paid, 5 = delivered, 6 = cancelled.
- in: query
name: issuedVoucherId
schema:
type: string
format: uuid
example: "b0a9f3c9-9b92-4f8c-b78d-6129be7218a6"
required: false
description: Filter on applied issuedVoucherId for the order.
responses:
"200":
description: OK
@ -119,6 +141,7 @@ paths:
"touchPointId": 1,
"name": "Perplex"
},
"deviceId": "42e77532-d831-41da-b07a-7edb9bb7f004",
"language":
{
"languageId": 1,
@ -148,6 +171,30 @@ paths:
"description": "Betaling in behandeling",
},
],
"orderVouchers": [
{
"orderVoucherId": "399bd3b3-9721-4f09-a936-d64637de1621",
"issuedVoucher":{
Review

Even een checkvraag: kan DHIL zonder moeite tabellen uit een ander datamodel joinen in een CRUD?

Even een checkvraag: kan DHIL zonder moeite tabellen uit een ander datamodel joinen in een CRUD?
Review

Nou dat doen we natuurlijk al voor touchpoint onder andere, dus ik dacht misschien handig om dat hier gelijk te doen, maar ik zat te twijfelen of ik ook de status en claims moet meegeven, misschien alleen het issuedVoucher object.

Nou dat doen we natuurlijk al voor touchpoint onder andere, dus ik dacht misschien handig om dat hier gelijk te doen, maar ik zat te twijfelen of ik ook de status en claims moet meegeven, misschien alleen het issuedVoucher object.
Review

Ik zou de status en de claims weglaten idd.

Ik zou de status en de claims weglaten idd.
"issuedVoucherId": "a0996218-bc5e-4826-9020-cda98a32838d",
"voucherCode": "Voucher1234",
"purchasedProductId": 31,
"fromInclusive": "2025-03-22T08:55:00",
"untillInclusive": "2026-03-22T08:55:00"
},
"orderLineId": null
},
{
"orderVoucherId": "f6c7ac42-1811-4e4d-82af-53e18fe16110",
"issuedVoucher":{
"issuedVoucherId": "54668baf-4905-4e9a-af02-09c170f295ed",
"voucherCode": "Voucher124",
"purchasedProductId": 35,
"fromInclusive": "2025-03-22T08:55:00",
"untillInclusive": "2026-03-22T08:55:00"
},
"orderLineId": "7a7a9d1a-3fc8-4058-a28b-082860aaa311"
}
],
"orderLines":
[
{
@ -327,21 +374,24 @@ paths:
"customerProfileId": 1337,
"totalAmount": 121,
"touchPointId": 1,
"deviceId": "b8ca9fdf-0bb9-4e49-b48d-41e395563377",
"languageId": 1,
"createdOn": "2024-03-22T09:00:00",
"order_OrderStatus":
[
{
"orderStatusId": 4,
"createdOn": "2024-03-22T09:00:00",
"description": "Order succesvol betaald",
},
{
"orderStatusId": 3,
"orderStatusId": 1,
"createdOn": "2024-03-22T08:55:00",
"description": "Betaling in behandeling",
"description": "Concept order",
},
],
"orderVouchers":
[
{
"issuedVoucherId": "e81b2197-a6c2-45b6-9560-8ce8442e8604",
"orderLineId": "97824d2e-5189-456d-b6da-4cca511a7685"
},
],
"orderLines":
[
{
@ -390,57 +440,6 @@ paths:
],
},
],
"payments":
[
{
"createdOn": "2024-03-22T09:00:00",
"amountDebit": 121,
"paymentMethodId": 1,
"touchPointId": 1,
"isRefund": false,
"htmPaymentReference": "HTM-1234",
"pspPaymentReference": "Buckaroo-1234",
"paymentStatuses":
[
{
"createdOn": "2024-03-22T09:00:00",
"statusCode": "190",
"statusDescription": "Success",
"statusSubCode": "S001",
"statusSubDescription": "PaymentSuccessFul",
},
],
"mandateInput":
{
"directDebitMandateTypeId": 1,
"createdOn": "2024-03-22T09:00:00",
"bic": "RABONL2U",
"iban": "NL44RABO0123456789",
"ascription": "J. de Vries",
"place": "Den Haag",
},
},
],
"orderCustomer":
{
"birthname": "Jan",
"surname": "Vries",
"prefix": "de",
"emailAddress": "jandevries@outlook.com",
"dateOfBirth": "1970-01-01",
"orderCustomerAddresses":
[
{
"addressTypeId": 1,
"street": "Kon. Julianaplein",
"houseNumber": 10,
"houseNumberSuffix": "a",
"postalCode": "2595 AA",
"city": "Den Haag",
"country": "NL",
},
],
},
}
responses:
"201":
@ -487,6 +486,7 @@ paths:
"touchPointId": 1,
"name": "Perplex"
},
"deviceId": null,
"language":
{
"languageId": 1,
@ -512,6 +512,7 @@ paths:
"description": "Betaling in behandeling",
},
],
"orderVouchers": null,
"orderLines":
[
{
@ -658,6 +659,7 @@ paths:
example:
{
"customerProfileId": 1337,
"deviceId": "fe68e624-b75f-48ca-a179-d5f86a8ab7d5",
"totalAmount": 121,
"languageId": 1,
"lastUpdatedOn": "2024-03-22T09:00:00",
@ -678,6 +680,7 @@ paths:
responses:
"200":
description: OK
/orders/{orderId}/statuses:
parameters:
- in: path
@ -715,6 +718,143 @@ paths:
{
"order_orderStatusId": "b9cf0096-4211-4be6-ac21-7bc34bc8e066",
}
/orders/{orderId}/ordervouchers:
parameters:
- in: path
name: orderId
schema:
type: string
format: uuid
example: d1dd439b-6072-4b97-89c9-724268865b93
required: true
description: The id of the order to process.
post:
summary: Add an order voucher.
description: Add an order voucher.
tags:
- Order Voucher
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/unavailable"
example:
{
"issuedVoucherId": "eec6af41-1a60-49f6-a92e-440054a92f13",
"orderLineId": "7a9d6e15-7c5c-421d-9ea9-00b9bb6dbe67"
}
responses:
"201":
description: Created
content:
application/json:
schema:
$ref: "#/components/schemas/unavailable"
example:
{
"orderVoucherId": "b9cf0096-4211-4be6-ac21-7bc34bc8e066",
}
/ordervouchers:
parameters:
- in: query
name: orderVoucherId
schema:
type: string
format: uuid
example: d1dd439b-6072-4b97-89c9-724268865b93
required: false
description: The id of the orderVoucher you are looking for.
- in: query
name: orderId
schema:
type: string
example: 90c926b9-3178-4757-acca-34cff66b980c
required: false
description: The id of the order
- in: query
name: orderLineId
schema:
type: string
example: 9e3363c8-e776-4675-b108-99b8c2e38eb6
required: false
description: The id of the orderLine
get:
summary: Find vouchers on the order
description: Find vouchers on the order
tags:
- Order Voucher
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/unavailable"
example:
[
{
"orderVoucherId": "19ef6882-8eda-43bf-b48e-9b4ff8745a50",
"issuedVoucher":{
"issuedVoucherId": "54668baf-4905-4e9a-af02-09c170f295ed",
"voucherCode": "Voucher124",
"purchasedProductId": 35,
"fromInclusive": "2025-03-22T08:55:00",
"untillInclusive": "2026-03-22T08:55:00"
},
"orderId": "f59e4769-53a0-4156-8991-6f9119ba629f",
"orderLineId": "eeb86071-4f59-405d-b2be-7d7a77044bfa"
}
]
/ordervouchers/{ordervoucherId}:
parameters:
- in: path
name: ordervoucherId
schema:
type: string
format: uuid
example: d1dd439b-6072-4b97-89c9-724268865b93
required: true
description: The id of the order to process.
patch:
summary: Update an order voucher.
description: Update an order voucher.
tags:
- Order Voucher
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/unavailable"
example:
{
"issuedVoucherId": "eec6af41-1a60-49f6-a92e-440054a92f13",
"orderLineId": "7a9d6e15-7c5c-421d-9ea9-00b9bb6dbe67"
}
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/unavailable"
example:
{
"orderVoucherId": "b9cf0096-4211-4be6-ac21-7bc34bc8e066",
}
delete:
summary: Delete an order voucher.
description: Delete an order voucher.
tags:
- Order Voucher
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/unavailable"
example:
{}
/orders/{orderId}/orderlines:
parameters:
- in: path
@ -1844,6 +1984,7 @@ paths:
"touchPointId": 1,
"name": "Perplex"
},
"deviceId": null,
"isRefund": false,
"htmPaymentReference": "HTM-1234",
"pspPaymentReference": "Buckaroo-1234",