added bulk endpoints to purchased product CRUD #42

Merged
MirjamHTM merged 3 commits from features/OVPAY2294-vouchers into develop 2025-12-08 09:35:27 +00:00
Showing only changes of commit 3ebdf0090f - Show all commits

View File

@ -243,298 +243,6 @@ paths:
], ],
"href": null, "href": null,
} }
post:
tags:
- Purchased Product
summary: Create one or more purchased product(s) in bulk.
description: Create a new purchased product.
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/unavailable"
examples:
Create Single Purchased GBO Product:
value:
{
"purchasedProducts":[
{
"productId": 11,
"createdOn": "2024-10-04T12:34:56.000",
"lastUpdatedOn": "2024-10-04T12:34:56.000",
"purchasedProductResources":
[
{
"resourceNameId": 1,
"resourceIdentifier": "408eefa9-b393-4bb3-8439-b2e51833abc7",
},
{
"resourceNameId": 2,
"resourceIdentifier": "f809a6e1-1c8d-4f8e-8a6e-0d0b1e1e1e1e",
},
],
"purchasedGboProducts":
[
{
"salesTimestamp": "2024-10-04T12:34:56.000",
"refundTimestamp": "2024-10-04T12:34:56.000",
"fromInclusive": "2024-10-04T12:34:56.000",
"untilInclusive": "2024-10-04T12:34:56.000",
"packageTemplateId": "30003",
"xBot": "f15efe6f-7353-4968-b134-60ba6fc2da8b",
"xTat": "42efebf7-132e-4ee0-9cbb-4037a9a54ad8",
"xSpit": "d67b2f72-918a-4e6c-957d-a39ed9c9e16b",
"customerTokenId": "b6492322-c458-4857-9ac3-a109c1887b9f",
"ovPayTokenId": 13,
"createdOn": "2024-10-04T12:34:56.000",
"lastUpdatedOn": "2024-10-04T12:34:56.000",
"createdBy": "someuser",
"lastUpdatedBy": null,
},
],
"purchasedTapconnectTickets": [],
"issuedVouchers": [],
}
]
}
Create Single Purchased TapConnet Ticket:
value:
{
"purchasedProducts":[
{
"productId": 11,
"createdOn": "2024-10-04T12:34:56.000",
"lastUpdatedOn": "2024-10-04T12:34:56.000",
"purchasedProductResources":
[
{
"resourceNameId": 1,
"resourceIdentifier": "408eefa9-b393-4bb3-8439-b2e51833abc7",
},
{
"resourceNameId": 2,
"resourceIdentifier": "f809a6e1-1c8d-4f8e-8a6e-0d0b1e1e1e1e",
},
],
"purchasedGboProducts": [],
"purchasedTapconnectTickets":
[
{
"issuedAt": "2024-10-04T12:34:56.000",
"activatedAt": "2024-10-04T12:34:56.000",
"cancelledAt": null,
"ticketReference": "KJj43nejhbTxhr897287",
"createdOn": "2024-10-04T12:34:56.000",
"lastUpdatedOn": "2024-10-04T12:34:56.000",
"createdBy": "user",
"lastUpdatedBy": "user",
},
],
"issuedVouchers": [],
}
]
}
Create Single Issued Voucher:
value:
{
"purchasedProducts":[
{
"productId": 11,
"createdOn": "2024-10-04T12:34:56.000",
"lastUpdatedOn": "2024-10-04T12:34:56.000",
"purchasedProductResources":
[
{
"resourceNameId": 1,
"resourceIdentifier": "408eefa9-b393-4bb3-8439-b2e51833abc7",
},
{
"resourceNameId": 2,
"resourceIdentifier": "f809a6e1-1c8d-4f8e-8a6e-0d0b1e1e1e1e",
},
],
"purchasedGboProducts": [],
"purchasedTapconnectTickets": [],
"issuedVouchers":
[
{
"voucherCode": "VOUCHER123",
"voucherStatusInstances":
[
{
"voucherStatusId": 1,
"createdOn": "2024-10-04T12:34:56.000",
},
],
"voucherClaims":
[
{
"mandatoryCustomerDataItemId": 8,
"value": "1999-12-31",
},
{
"mandatoryCustomerDataItemId": 4,
"value": "vlad.harkonnen@househarkonnen.net",
},
],
},
],
}
]
}
Create Multiple Issued Vouchers:
value:
{
"purchasedProducts":[
{
"productId": 11,
"createdOn": "2024-10-04T12:34:56.000",
"lastUpdatedOn": "2024-10-04T12:34:56.000",
"purchasedProductResources":
[
{
"resourceNameId": 1,
"resourceIdentifier": "408eefa9-b393-4bb3-8439-b2e51833abc7",
},
{
"resourceNameId": 2,
"resourceIdentifier": "f809a6e1-1c8d-4f8e-8a6e-0d0b1e1e1e1e",
},
],
"purchasedGboProducts": [],
"purchasedTapconnectTickets": [],
"issuedVouchers":
[
{
"voucherCode": "VOUCHER123",
"voucherStatusInstances":
[
{
"voucherStatusId": 1,
"createdOn": "2024-10-04T12:34:56.000",
},
],
"voucherClaims":
[
{
"mandatoryCustomerDataItemId": 8,
"value": "1999-12-31",
},
{
"mandatoryCustomerDataItemId": 4,
"value": "vlad.harkonnen@househarkonnen.net",
},
],
},
],
},
{
"productId": 11,
"createdOn": "2024-10-04T12:34:56.000",
"lastUpdatedOn": "2024-10-04T12:34:56.000",
"purchasedProductResources":
[
{
"resourceNameId": 1,
"resourceIdentifier": "7ce32f9b-52f0-4e80-a527-0c6184b57f52",
},
{
"resourceNameId": 2,
"resourceIdentifier": "02047745-f03e-4c00-8e1b-8dc5c86a786e",
},
],
"purchasedGboProducts": [],
"purchasedTapconnectTickets": [],
"issuedVouchers":
[
{
"voucherCode": "VOUCHER123",
"voucherStatusInstances":
[
{
"voucherStatusId": 1,
"createdOn": "2024-10-04T12:34:56.000",
},
],
"voucherClaims":
[
{
"mandatoryCustomerDataItemId": 8,
"value": "1940-01-18",
},
{
"mandatoryCustomerDataItemId": 4,
"value": "valdemar.hoskanner@househarkonnen.net",
},
],
},
],
},
{
"productId": 11,
"createdOn": "2024-10-04T12:34:56.000",
"lastUpdatedOn": "2024-10-04T12:34:56.000",
"purchasedProductResources":
[
{
"resourceNameId": 1,
"resourceIdentifier": "7c71ec8a-3326-451f-9464-3e36d10260e3",
},
{
"resourceNameId": 2,
"resourceIdentifier": "73c7a805-2edf-4616-a04c-267e88e0931c",
},
],
"purchasedGboProducts": [],
"purchasedTapconnectTickets": [],
"issuedVouchers":
[
{
"voucherCode": "VOUCHER123",
"voucherStatusInstances":
[
{
"voucherStatusId": 1,
"createdOn": "2024-10-04T12:34:56.000",
},
],
"voucherClaims":
[
{
"mandatoryCustomerDataItemId": 8,
"value": "2016-06-08",
},
{
"mandatoryCustomerDataItemId": 4,
"value": "alia.artreides@housearteides.net",
},
],
},
],
}
]
}
responses:
"202":
description: Accepted
content:
application/json:
schema:
$ref: "#/components/schemas/BulkResponseBody"
examples:
Array of purchased products accepted:
summary: Array of purchased products accepted
description: |
The array of purchased products was accepted successfully.
The purchased products will be processed asynchronously.
In the response body the consumer will find information on how to retrieve the processing status.
value:
startTime: 2025-02-14T05:32:47.0672237Z
status: Running
clientTrackingId: 08584620957189579629541919368CU00
callbackurl: https://api.integratielaag.nl/purchasedproducts/responsestatus/runtime/webhooks/workflow/scaleUnits/prod-00/workflows/6fd466916c
retryAfter: 10
/purchasedproducts/{purchasedProductId}: /purchasedproducts/{purchasedProductId}:
parameters: parameters:
- in: path - in: path
@ -1457,6 +1165,451 @@ paths:
{ "voucherStatusId": 5, "name": "Expired" }, { "voucherStatusId": 5, "name": "Expired" },
], ],
} }
/purchasedproducts/bulk:
post:
tags:
- Bulk processing
summary: Create one or more purchased product(s) in bulk.
description: Create a new purchased product.
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/unavailable"
examples:
Create Single Purchased GBO Product:
value:
{
"purchasedProducts":[
{
"productId": 11,
"createdOn": "2024-10-04T12:34:56.000",
"lastUpdatedOn": "2024-10-04T12:34:56.000",
"purchasedProductResources":
[
{
"resourceNameId": 1,
"resourceIdentifier": "408eefa9-b393-4bb3-8439-b2e51833abc7",
},
{
"resourceNameId": 2,
"resourceIdentifier": "f809a6e1-1c8d-4f8e-8a6e-0d0b1e1e1e1e",
},
],
"purchasedGboProducts":
[
{
"salesTimestamp": "2024-10-04T12:34:56.000",
"refundTimestamp": "2024-10-04T12:34:56.000",
"fromInclusive": "2024-10-04T12:34:56.000",
"untilInclusive": "2024-10-04T12:34:56.000",
"packageTemplateId": "30003",
"xBot": "f15efe6f-7353-4968-b134-60ba6fc2da8b",
"xTat": "42efebf7-132e-4ee0-9cbb-4037a9a54ad8",
"xSpit": "d67b2f72-918a-4e6c-957d-a39ed9c9e16b",
"customerTokenId": "b6492322-c458-4857-9ac3-a109c1887b9f",
"ovPayTokenId": 13,
"createdOn": "2024-10-04T12:34:56.000",
"lastUpdatedOn": "2024-10-04T12:34:56.000",
"createdBy": "someuser",
"lastUpdatedBy": null,
},
],
"purchasedTapconnectTickets": [],
"issuedVouchers": [],
}
]
}
Create Single Purchased TapConnet Ticket:
value:
{
"purchasedProducts":[
{
"productId": 11,
"createdOn": "2024-10-04T12:34:56.000",
"lastUpdatedOn": "2024-10-04T12:34:56.000",
"purchasedProductResources":
[
{
"resourceNameId": 1,
"resourceIdentifier": "408eefa9-b393-4bb3-8439-b2e51833abc7",
},
{
"resourceNameId": 2,
"resourceIdentifier": "f809a6e1-1c8d-4f8e-8a6e-0d0b1e1e1e1e",
},
],
"purchasedGboProducts": [],
"purchasedTapconnectTickets":
[
{
"issuedAt": "2024-10-04T12:34:56.000",
"activatedAt": "2024-10-04T12:34:56.000",
"cancelledAt": null,
"ticketReference": "KJj43nejhbTxhr897287",
"createdOn": "2024-10-04T12:34:56.000",
"lastUpdatedOn": "2024-10-04T12:34:56.000",
"createdBy": "user",
"lastUpdatedBy": "user",
},
],
"issuedVouchers": [],
}
]
}
Create Single Issued Voucher:
value:
{
"purchasedProducts":[
{
"productId": 11,
"createdOn": "2024-10-04T12:34:56.000",
"lastUpdatedOn": "2024-10-04T12:34:56.000",
"purchasedProductResources":
[
{
"resourceNameId": 1,
"resourceIdentifier": "408eefa9-b393-4bb3-8439-b2e51833abc7",
},
{
"resourceNameId": 2,
"resourceIdentifier": "f809a6e1-1c8d-4f8e-8a6e-0d0b1e1e1e1e",
},
],
"purchasedGboProducts": [],
"purchasedTapconnectTickets": [],
"issuedVouchers":
[
{
"voucherCode": "VOUCHER123",
"voucherStatusInstances":
[
{
"voucherStatusId": 1,
"createdOn": "2024-10-04T12:34:56.000",
},
],
"voucherClaims":
[
{
"mandatoryCustomerDataItemId": 8,
"value": "1999-12-31",
},
{
"mandatoryCustomerDataItemId": 4,
"value": "vlad.harkonnen@househarkonnen.net",
},
],
},
],
}
]
}
Create Multiple Issued Vouchers:
value:
{
"purchasedProducts":[
{
"productId": 11,
"createdOn": "2024-10-04T12:34:56.000",
"lastUpdatedOn": "2024-10-04T12:34:56.000",
"purchasedProductResources":
[
{
"resourceNameId": 1,
"resourceIdentifier": "408eefa9-b393-4bb3-8439-b2e51833abc7",
},
{
"resourceNameId": 2,
"resourceIdentifier": "f809a6e1-1c8d-4f8e-8a6e-0d0b1e1e1e1e",
},
],
"purchasedGboProducts": [],
"purchasedTapconnectTickets": [],
"issuedVouchers":
[
{
"voucherCode": "VOUCHER123",
"voucherStatusInstances":
[
{
"voucherStatusId": 1,
"createdOn": "2024-10-04T12:34:56.000",
},
],
"voucherClaims":
[
{
"mandatoryCustomerDataItemId": 8,
"value": "1999-12-31",
},
{
"mandatoryCustomerDataItemId": 4,
"value": "vlad.harkonnen@househarkonnen.net",
},
],
},
],
},
{
"productId": 11,
"createdOn": "2024-10-04T12:34:56.000",
"lastUpdatedOn": "2024-10-04T12:34:56.000",
"purchasedProductResources":
[
{
"resourceNameId": 1,
"resourceIdentifier": "7ce32f9b-52f0-4e80-a527-0c6184b57f52",
},
{
"resourceNameId": 2,
"resourceIdentifier": "02047745-f03e-4c00-8e1b-8dc5c86a786e",
},
],
"purchasedGboProducts": [],
"purchasedTapconnectTickets": [],
"issuedVouchers":
[
{
"voucherCode": "VOUCHER123",
"voucherStatusInstances":
[
{
"voucherStatusId": 1,
"createdOn": "2024-10-04T12:34:56.000",
},
],
"voucherClaims":
[
{
"mandatoryCustomerDataItemId": 8,
"value": "1940-01-18",
},
{
"mandatoryCustomerDataItemId": 4,
"value": "valdemar.hoskanner@househarkonnen.net",
},
],
},
],
},
{
"productId": 11,
"createdOn": "2024-10-04T12:34:56.000",
"lastUpdatedOn": "2024-10-04T12:34:56.000",
"purchasedProductResources":
[
{
"resourceNameId": 1,
"resourceIdentifier": "7c71ec8a-3326-451f-9464-3e36d10260e3",
},
{
"resourceNameId": 2,
"resourceIdentifier": "73c7a805-2edf-4616-a04c-267e88e0931c",
},
],
"purchasedGboProducts": [],
"purchasedTapconnectTickets": [],
"issuedVouchers":
[
{
"voucherCode": "VOUCHER123",
"voucherStatusInstances":
[
{
"voucherStatusId": 1,
"createdOn": "2024-10-04T12:34:56.000",
},
],
"voucherClaims":
[
{
"mandatoryCustomerDataItemId": 8,
"value": "2016-06-08",
},
{
"mandatoryCustomerDataItemId": 4,
"value": "alia.artreides@housearteides.net",
},
],
},
],
}
]
}
responses:
"202":
description: Accepted
content:
application/json:
schema:
$ref: "#/components/schemas/BulkResponseBody"
examples:
Array of purchased products accepted:
summary: Array of purchased products accepted
description: |
The array of purchased products was accepted successfully.
The purchased products will be processed asynchronously.
In the response body the consumer will find information on how to retrieve the processing status.
value:
startTime: 2025-02-14T05:32:47.0672237Z
status: Running
clientTrackingId: 08584620957189579629541919368CU00
callbackurl: https://api.integratielaag.nl/purchasedproducts/responsestatus/runtime/webhooks/workflow/scaleUnits/prod-00/workflows/6fd466916c
retryAfter: 10
summary: null
/purchasedproducts/bulk/{clientTrackingId}:
get:
tags:
- Bulk processing
summary: Get the status of the purchased products bulk post.
description: Get the status of the asynchronous purchased products bulk post.
parameters:
- in: path
name: clientTrackingId
schema:
type: string
required: true
description: The clientTrackingId of the purchased products bulk post.
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/BulkResponseBody"
examples:
Batch successfully processed:
summary: Batch successfully processed
description: |
Body of a batch of purchased products that was successfully created.
A number of purchased products were created.
value:
startTime: "2025-02-14T05:32:47.067Z"
status: "Finished"
clientTrackingId: "08584620957189579629541919368CU00"
callbackurl: https://api.integratielaag.nl/purchasedproducts/bulk/responsestatus/webhooks/workflow/scaleUnits/prod-00/workflows/6fd466916c
retryAfter: 0
summary:
created: 13
updated: 0
total: 13
security:
- default: []
x-auth-type: Application & Application User
x-throttling-tier: Unlimited
/voucherstatusinstances/bulk:
post:
summary: Post voucher status instances in bulk.
description: Post voucher status instances in bulk.
tags:
- Bulk processing
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/unavailable"
examples:
List of issued vouchers to set status to revoked:
summary: List of issued vouchers to set status to revoked
description: List of issued vouchers to set status to revoked
value:
{
"voucherStatusInstances":[
{
"issuedVoucherId": "8a63552f-faf5-43f3-b22d-bebc976a8a5e",
"voucherStatusId": 4,
"createdOn": "2024-10-04T12:34:56.000"
},
{
"issuedVoucherId": "a9ff40ec-2940-413a-9957-dfd471c4caf3",
"voucherStatusId": 4,
"createdOn": "2024-10-04T12:34:56.000"
},
{
"issuedVoucherId": "9e7363e6-beaa-4c38-9ed6-c8afed459bd5",
"voucherStatusId": 4,
"createdOn": "2024-10-04T12:34:56.000"
},
{
"issuedVoucherId": "9d7332d6-1949-4c20-aa99-d87096b035fa",
"voucherStatusId": 4,
"createdOn": "2024-10-04T12:34:56.000"
},
{
"issuedVoucherId": "43ca757b-8370-4cb0-92b9-717948383d5e",
"voucherStatusId": 4,
"createdOn": "2024-10-04T12:34:56.000"
},
]
}
responses:
"202":
description: Accepted
content:
application/json:
schema:
$ref: "#/components/schemas/BulkResponseBody"
examples:
Array of issued vouchers accepted:
summary: Array of issued vouchers status instances accepted
description: |
The array of issued vouchers status instances was accepted successfully.
The issued vouchers status instances will be processed asynchronously.
In the response body the consumer will find information on how to retrieve the processing status.
value:
startTime: 2025-02-14T05:32:47.0672237Z
status: Running
clientTrackingId: 08584620957189579629541919368CU00
callbackurl: https://api.integratielaag.nl/voucherstatusinstances/bulk/responsestatus/webhooks/workflow/scaleUnits/prod-00/workflows/6fd466916c
retryAfter: 10
summary: null
security:
- default: []
x-auth-type: Application & Application User
x-throttling-tier: Unlimited
/voucherstatusinstances/bulk/responsestatus/{clientTrackingId}:
get:
tags:
- Bulk processing
summary: Get the status of the voucher status instances bulk post.
description: Get the status of the asynchronous voucher status instances bulk post.
parameters:
- in: path
name: clientTrackingId
schema:
type: string
required: true
description: The clientTrackingId of the voucher status instances bulk post.
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/BulkResponseBody"
examples:
Batch successfully processed:
summary: Batch successfully processed
description: |
Body of a batch of voucher status instances that was successfully created.
A number of voucher status instances were created.
value:
startTime: "2025-02-14T05:32:47.067Z"
status: "Finished"
clientTrackingId: "08584620957189579629541919368CU00"
callbackurl: https://api.integratielaag.nl/voucherstatusinstances/bulk/responsestatus/webhooks/workflow/scaleUnits/prod-00/workflows/6fd466916c
retryAfter: 0
summary:
created: 5
updated: 0
total: 5
security:
- default: []
x-auth-type: Application & Application User
x-throttling-tier: Unlimited
components: components:
securitySchemes: securitySchemes:
bearerToken: bearerToken:
@ -1486,12 +1639,36 @@ components:
retryAfter: retryAfter:
type: integer type: integer
example: 10 example: 10
summary:
$ref: "#/components/schemas/summaryBody"
required: required:
- startTime - startTime
- status - status
- clientTrackingId - clientTrackingId
- callbackurl - callbackurl
- retryAfter - retryAfter
- summary
summaryBody:
type: object
properties:
summary:
type: object
properties:
created:
type: integer
example: 15
updated:
type: integer
example: 2
total:
type: integer
example: 17
required:
- created
- total
- updated
required:
- summary
rfc9457: rfc9457:
type: object type: object
properties: properties: