Add examples for productdetails tree with one and two-layer depth

This commit is contained in:
Max Martens 2025-02-05 14:17:03 +01:00
parent 024e14f31c
commit 30bf97ba7a

View File

@ -269,12 +269,518 @@ paths:
schema: schema:
$ref: '#/components/schemas/ProductPayloadResponse' $ref: '#/components/schemas/ProductPayloadResponse'
examples: examples:
getDetails90DiscountPilotProductTouchpointId3:
summary: 90% Discount F&F pilot product (called by touchpointId 3)
description: |-
All details (that the calling touchpoint is allowed to see) for the 90% Discount F&F pilot product.\
Even though this product has sellingPeriods for multiple touchpoints, only the currently active sellingPeriod and price for touchpointId 3 are returned.
This product has no child products, so its `productVariants` tree only has one layer of depth.
value:
{
"productId": 24,
"parentProductId": null,
"productCode": "HTM-30901-WL",
"gboPackageTemplateId": "30901",
"tapConnectProductCode": null,
"productGroupMetadata": {
"productGroupMetadataId": "WIP",
"productGroupCode": "WIP",
"department": "WIP",
"costCenter": "WIP",
"costType": "WIP",
"description": "Work in Progress - will follow later, when FIKO is implemented",
"user": "WIP",
"documentCode": "WIP",
"timestampUpdated": "2024-09-03T15:07:53.470+00:00",
"validFrom": "2024-08-01T00:00:00.000+00:00",
"validUntil": "2025-08-01T00:00:00.000+00:00"
},
"productName": "HTM 90% Korting",
"productDescription": "Reis je regelmatig met HTM? Activeer dan HTM 90% Korting op je betaalpas of credit card en reis een week lang met korting!",
"validityPeriod": {
"validityPeriodId": 144,
"fromInclusive": "2023-12-31T23:00:00.000+00:00",
"toInclusive": "2028-11-25T04:00:00.000+00:00"
},
"productTranslations": [
{
"language": "en",
"name": "HTM 90% Discount",
"description": "Are you a regular traveler? Activate HTM 90% discount on your EMV card!"
}
],
"productOwner": {
"productOwnerId": 17,
"name": "Corneel Verstoep",
"organization": "HTM"
},
"marketSegments": [
{
"marketSegmentId": 1,
"name": "B2C"
}
],
"customerSegments": null,
"productCategory": {
"productCategoryId": 1,
"isTravelProduct": true,
"name": "Kortingsabonnement"
},
"requiredCustomerLevel": {
"requiredCustomerLevelId": 1,
"name": "guest"
},
"requiredProducts": null,
"incompatibleProducts": null,
"mandatoryCustomerDataItems": null,
"requiredGboPersonalAttributes": null,
"tokenTypes": [
{
"tokenTypeId": 1,
"name": "EMV"
}
],
"paymentMoment": {
"paymentMomentId": 1,
"name": "prepaid"
},
"serviceOptions": null,
"validityDuration": "P7D",
"maxStartInFutureDuration": "P6W",
"isRenewable": false,
"sendInvoice": false,
"imageReference": "https://www.htm.nl/media/leif2leu/htm-logo-mobile.svg",
"productPageUrl": "https://web.acc.cloud.htm.nl/webshop/htm-90-korting",
"termsUrl": "https://web.acc.cloud.htm.nl/media/hkfak1dj/pv-pilotproduct.pdf",
"isSellableAtHtm": true,
"needsSolvencyCheckConsumer": false,
"needsSolvencyCheckBusiness": false,
"sellingPeriods": [
{
"sellingPeriodId": 78,
"fromInclusive": "2024-09-30T23:00:00.000+00:00",
"toInclusive": "2028-11-17T23:00:00.000+00:00",
"salesTouchpoint": {
"salesTouchpointId": 3,
"name": "Website (Perplex)",
"isActive": true,
"retailer": {
"retailerId": 1001,
"name": "HTM externe touchpoints",
"street": "Koningin Julianaplein",
"number": 10,
"numberAddition": null,
"postalCode": "2595 AA",
"city": "Den Haag",
"country": "Nederland",
"emailAddress": "info@htm.nl",
"phoneNumber": "070 374 9002",
"taxId": 572309345923,
"imageReference": "https://www.htm.nl/media/leif2leu/htm-logo-mobile.svg"
}
},
"forbiddenPaymentMethods": null,
"sellingPrices": [
{
"sellingPriceId": 78,
"amountExclTax": 92,
"amountInclTax": 100,
"fromInclusive": "2024-09-30T23:00:00.000+00:00",
"toInclusive": "2028-11-17T23:00:00.000+00:00",
"internalPrice": 0.0000,
"taxMetadata": {
"taxMetadataId": "47C8972E-A730-4032-9BDA-AF0A5BCB2C85",
"taxCode": "V09",
"taxPercentageAmount": 9,
"description": "BTW VERKOOP LAAG 9%"
}
}
]
}
],
"purchasePrices": null,
"productVariants": null
}
getDetails20DiscountPilotProductTouchpointId3:
summary: 20% Discount product (called by touchpointId 4)
description: |-
All details (that the calling touchpoint is allowed to see) for the 20% Discount product.\
Even though this product has sellingPeriods for multiple touchpoints (3 and 4), only the currently active sellingPeriod and price for touchpointId 4 are returned.
This product has two `productVariants`: a single month variant and a subscription variant.
value:
{
"productId": 126,
"parentProductId": null,
"productCode": "HTM-30001",
"gboPackageTemplateId": "30001",
"tapConnectProductCode": null,
"productGroupMetadata": null,
"productName": "HTM 20% Korting",
"productDescription": "Reis met 20% korting op je betaalpas bij HTM.",
"validityPeriod": {
"validityPeriodId": 236,
"fromInclusive": "2025-01-19T23:00:00.000+00:00",
"toInclusive": "2028-11-25T04:00:00.000+00:00"
},
"productTranslations": [
{
"language": "en",
"name": "HTM 20% Discount",
"description": "Travel with 20% discount using your bank card with HTM."
}
],
"productOwner": {
"productOwnerId": 17,
"name": "Corneel Verstoep",
"organization": "HTM"
},
"marketSegments": [
{
"marketSegmentId": 1,
"name": "B2C"
}
],
"customerSegments": null,
"productCategory": {
"productCategoryId": 1,
"isTravelProduct": true,
"name": "Kortingsabonnement"
},
"requiredCustomerLevel": {
"requiredCustomerLevelId": 1,
"name": "guest"
},
"requiredProducts": null,
"incompatibleProducts": null,
"mandatoryCustomerDataItems": [
{
"mandatoryCustomerDataItemId": 4,
"customerDataItem": "emailAddress"
},
{
"mandatoryCustomerDataItemId": 7,
"customerDataItem": "ovPayToken"
}
],
"requiredGboPersonalAttributes": null,
"tokenTypes": [
{
"tokenTypeId": 1,
"name": "EMV"
}
],
"paymentMoment": {
"paymentMomentId": 1,
"name": "prepaid"
},
"serviceOptions": null,
"validityDuration": "P1M",
"maxStartInFutureDuration": "P6W",
"isRenewable": null,
"sendInvoice": null,
"imageReference": "https://www.htm.nl/media/leif2leu/htm-logo-mobile.svg",
"productPageUrl": "https://www.htm.nl/webshop/htm-20-korting",
"termsUrl": "https://www.htm.nl/reisproducten/productvoorwaarden/htm-20-korting",
"isSellableAtHtm": true,
"needsSolvencyCheckConsumer": false,
"needsSolvencyCheckBusiness": false,
"sellingPeriods": [
{
"sellingPeriodId": 172,
"fromInclusive": "2025-01-19T23:00:00.000+00:00",
"toInclusive": "2028-11-17T23:00:00.000+00:00",
"salesTouchpoint": {
"salesTouchpointId": 4,
"name": "App (Infoplaza)",
"isActive": true,
"retailer": {
"retailerId": 1001,
"name": "HTM externe touchpoints",
"street": "Koningin Julianaplein",
"number": 10,
"numberAddition": null,
"postalCode": "2595 AA",
"city": "Den Haag",
"country": "Nederland",
"emailAddress": "info@htm.nl",
"phoneNumber": "070 374 9002",
"taxId": 572309345923,
"imageReference": "https://www.htm.nl/media/leif2leu/htm-logo-mobile.svg"
}
},
"forbiddenPaymentMethods": null,
"sellingPrices": null
}
],
"purchasePrices": null,
"productVariants": [
{
"productId": 119,
"parentProductId": null,
"productCode": "HTM-30001-ML",
"gboPackageTemplateId": "30001",
"tapConnectProductCode": null,
"productGroupMetadata": null,
"productName": "HTM 20% Korting (losse maand)",
"productDescription": "Reis een maand lang met 20% korting op je betaalpas bij HTM.",
"validityPeriod": {
"validityPeriodId": 229,
"fromInclusive": "2025-01-19T23:00:00.000+00:00",
"toInclusive": "2028-11-25T04:00:00.000+00:00"
},
"productTranslations": [
{
"language": "en",
"name": "HTM 20% Discount (single month)",
"description": "Travel with 20% discount for a month using your bank card with HTM."
}
],
"productOwner": {
"productOwnerId": 17,
"name": "Corneel Verstoep",
"organization": "HTM"
},
"marketSegments": [
{
"marketSegmentId": 1,
"name": "B2C"
}
],
"customerSegments": null,
"productCategory": {
"productCategoryId": 1,
"isTravelProduct": true,
"name": "Kortingsabonnement"
},
"requiredCustomerLevel": {
"requiredCustomerLevelId": 1,
"name": "guest"
},
"requiredProducts": null,
"incompatibleProducts": null,
"mandatoryCustomerDataItems": [
{
"mandatoryCustomerDataItemId": 4,
"customerDataItem": "emailAddress"
},
{
"mandatoryCustomerDataItemId": 7,
"customerDataItem": "ovPayToken"
}
],
"requiredGboPersonalAttributes": null,
"tokenTypes": [
{
"tokenTypeId": 1,
"name": "EMV"
}
],
"paymentMoment": {
"paymentMomentId": 1,
"name": "prepaid"
},
"serviceOptions": null,
"validityDuration": "P1M",
"maxStartInFutureDuration": "P6W",
"isRenewable": false,
"sendInvoice": false,
"imageReference": "https://www.htm.nl/media/leif2leu/htm-logo-mobile.svg",
"productPageUrl": "https://www.htm.nl/webshop/htm-20-korting",
"termsUrl": "https://www.htm.nl/reisproducten/productvoorwaarden/htm-20-korting",
"isSellableAtHtm": true,
"needsSolvencyCheckConsumer": false,
"needsSolvencyCheckBusiness": false,
"sellingPeriods": [
{
"sellingPeriodId": 160,
"fromInclusive": "2025-01-19T23:00:00.000+00:00",
"toInclusive": "2028-11-17T23:00:00.000+00:00",
"salesTouchpoint": {
"salesTouchpointId": 4,
"name": "App (Infoplaza)",
"isActive": true,
"retailer": {
"retailerId": 1001,
"name": "HTM externe touchpoints",
"street": "Koningin Julianaplein",
"number": 10,
"numberAddition": null,
"postalCode": "2595 AA",
"city": "Den Haag",
"country": "Nederland",
"emailAddress": "info@htm.nl",
"phoneNumber": "070 374 9002",
"taxId": 572309345923,
"imageReference": "https://www.htm.nl/media/leif2leu/htm-logo-mobile.svg"
}
},
"forbiddenPaymentMethods": null,
"sellingPrices": [
{
"sellingPriceId": 149,
"amountExclTax": 276,
"amountInclTax": 300,
"fromInclusive": "2025-01-19T23:00:00.000+00:00",
"toInclusive": "2028-11-17T23:00:00.000+00:00",
"internalPrice": 0.0000,
"taxMetadata": {
"taxMetadataId": "47C8972E-A730-4032-9BDA-AF0A5BCB2C85",
"taxCode": "V09",
"taxPercentageAmount": 9,
"description": "BTW VERKOOP LAAG 9%"
}
}
]
}
],
"purchasePrices": null,
"productVariants": null
},
{
"productId": 120,
"parentProductId": null,
"productCode": "HTM-30001-MA",
"gboPackageTemplateId": "30001",
"tapConnectProductCode": null,
"productGroupMetadata": {
"productGroupMetadataId": "501B17EF-36C4-4039-B92C-6517969B464E",
"productGroupCode": "PG001",
"department": "Electronics",
"costCenter": "CC101",
"costType": "TypeA",
"description": "Group for electronic products",
"user": "2024-09-03T15:07:53.470+00:00",
"documentCode": "DOC001",
"timestampUpdated": "2024-09-03T15:07:53.470+00:00",
"validFrom": "2024-08-01T00:00:00.000+00:00",
"validUntil": "2025-08-01T00:00:00.000+00:00"
},
"productName": "HTM 20% Korting (doorlopend abonnement)",
"productDescription": "Reis gedurende je abonnement met 20% korting op je betaalpas bij HTM.",
"validityPeriod": {
"validityPeriodId": 230,
"fromInclusive": "2025-01-19T23:00:00.000+00:00",
"toInclusive": "2028-11-25T04:00:00.000+00:00"
},
"productTranslations": [
{
"language": "en",
"name": "HTM 20% Discount (subscription)",
"description": "Travel with 20% discount for the duration of your subscription using your bank card with HTM."
}
],
"productOwner": {
"productOwnerId": 17,
"name": "Corneel Verstoep",
"organization": "HTM"
},
"marketSegments": [
{
"marketSegmentId": 1,
"name": "B2C"
}
],
"customerSegments": null,
"productCategory": {
"productCategoryId": 1,
"isTravelProduct": true,
"name": "Kortingsabonnement"
},
"requiredCustomerLevel": {
"requiredCustomerLevelId": 1,
"name": "guest"
},
"requiredProducts": null,
"incompatibleProducts": null,
"mandatoryCustomerDataItems": [
{
"mandatoryCustomerDataItemId": 4,
"customerDataItem": "emailAddress"
},
{
"mandatoryCustomerDataItemId": 7,
"customerDataItem": "ovPayToken"
}
],
"requiredGboPersonalAttributes": null,
"tokenTypes": [
{
"tokenTypeId": 1,
"name": "EMV"
}
],
"paymentMoment": {
"paymentMomentId": 1,
"name": "prepaid"
},
"serviceOptions": null,
"validityDuration": "P1M",
"maxStartInFutureDuration": "P6W",
"isRenewable": true,
"sendInvoice": true,
"imageReference": "https://www.htm.nl/media/leif2leu/htm-logo-mobile.svg",
"productPageUrl": "https://www.htm.nl/webshop/htm-20-korting",
"termsUrl": "https://www.htm.nl/reisproducten/productvoorwaarden/htm-20-korting",
"isSellableAtHtm": true,
"needsSolvencyCheckConsumer": false,
"needsSolvencyCheckBusiness": false,
"sellingPeriods": [
{
"sellingPeriodId": 159,
"fromInclusive": "2025-01-19T23:00:00.000+00:00",
"toInclusive": "2028-11-17T23:00:00.000+00:00",
"salesTouchpoint": {
"salesTouchpointId": 4,
"name": "App (Infoplaza)",
"isActive": true,
"retailer": {
"retailerId": 1001,
"name": "HTM externe touchpoints",
"street": "Koningin Julianaplein",
"number": 10,
"numberAddition": null,
"postalCode": "2595 AA",
"city": "Den Haag",
"country": "Nederland",
"emailAddress": "info@htm.nl",
"phoneNumber": "070 374 9002",
"taxId": 572309345923,
"imageReference": "https://www.htm.nl/media/leif2leu/htm-logo-mobile.svg"
}
},
"forbiddenPaymentMethods": null,
"sellingPrices": [
{
"sellingPriceId": 148,
"amountExclTax": 276,
"amountInclTax": 300,
"fromInclusive": "2025-01-19T23:00:00.000+00:00",
"toInclusive": "2028-11-17T23:00:00.000+00:00",
"internalPrice": 0.0000,
"taxMetadata": {
"taxMetadataId": "47C8972E-A730-4032-9BDA-AF0A5BCB2C85",
"taxCode": "V09",
"taxPercentageAmount": 9,
"description": "BTW VERKOOP LAAG 9%"
}
}
]
}
],
"purchasePrices": null,
"productVariants": null
}
]
}
getDetailsTreeRegioVrijTouchpointId3: getDetailsTreeRegioVrijTouchpointId3:
summary: Details of Regio Vrij product and (part of) its productVariants (called by touchpointId 3) summary: Regio Vrij product and (part of) its productVariants (called by touchpointId 3)
description: |- description: |-
All details (that the calling touchpoint is allowed to see) for the parent Regio Vrij product All details (that the calling touchpoint is allowed to see) for the parent Regio Vrij product
and (part of) its productVariants; the full tree would be too huge to be useful as an example. and (7 out of 84 of) its productVariants; the full tree would be too huge to be useful as an example.
The full depth of the tree is included for the HL62 Reduced Fare Variant.
The full depth of the tree is included in the example for the HL62 Reduced Fare Variant.
value: value:
{ {
"productId": 49, "productId": 49,
@ -382,8 +888,8 @@ paths:
"serviceOptions": null, "serviceOptions": null,
"validityDuration": "P1M", "validityDuration": "P1M",
"maxStartInFutureDuration": "P6W", "maxStartInFutureDuration": "P6W",
"isRenewable": false, "isRenewable": null,
"sendInvoice": false, "sendInvoice": null,
"imageReference": "https://www.htm.nl/media/leif2leu/htm-logo-mobile.svg", "imageReference": "https://www.htm.nl/media/leif2leu/htm-logo-mobile.svg",
"productPageUrl": "https://www.htm.nl/webshop/htm-regio-vrij", "productPageUrl": "https://www.htm.nl/webshop/htm-regio-vrij",
"termsUrl": "https://www.htm.nl/reisproducten/productvoorwaarden/htm-regio-vrij/", "termsUrl": "https://www.htm.nl/reisproducten/productvoorwaarden/htm-regio-vrij/",
@ -525,8 +1031,8 @@ paths:
"serviceOptions": null, "serviceOptions": null,
"validityDuration": "P1M", "validityDuration": "P1M",
"maxStartInFutureDuration": "P6W", "maxStartInFutureDuration": "P6W",
"isRenewable": false, "isRenewable": null,
"sendInvoice": false, "sendInvoice": null,
"imageReference": "https://www.htm.nl/media/leif2leu/htm-logo-mobile.svg", "imageReference": "https://www.htm.nl/media/leif2leu/htm-logo-mobile.svg",
"productPageUrl": "https://www.htm.nl/webshop/htm-regio-vrij", "productPageUrl": "https://www.htm.nl/webshop/htm-regio-vrij",
"termsUrl": "https://www.htm.nl/reisproducten/productvoorwaarden/htm-regio-vrij/", "termsUrl": "https://www.htm.nl/reisproducten/productvoorwaarden/htm-regio-vrij/",
@ -668,8 +1174,8 @@ paths:
"serviceOptions": null, "serviceOptions": null,
"validityDuration": "P1M", "validityDuration": "P1M",
"maxStartInFutureDuration": "P6W", "maxStartInFutureDuration": "P6W",
"isRenewable": false, "isRenewable": null,
"sendInvoice": false, "sendInvoice": null,
"imageReference": "https://web.acc.cloud.htm.nl/media/leif2leu/htm-logo-mobile.svg", "imageReference": "https://web.acc.cloud.htm.nl/media/leif2leu/htm-logo-mobile.svg",
"productPageUrl": "https://web.acc.cloud.htm.nl/webshop/htm-regio-vrij", "productPageUrl": "https://web.acc.cloud.htm.nl/webshop/htm-regio-vrij",
"termsUrl": "https://web.acc.cloud.htm.nl/reisproducten/productvoorwaarden/htm-regio-vrij/", "termsUrl": "https://web.acc.cloud.htm.nl/reisproducten/productvoorwaarden/htm-regio-vrij/",
@ -819,8 +1325,8 @@ paths:
"serviceOptions": null, "serviceOptions": null,
"validityDuration": "P1M", "validityDuration": "P1M",
"maxStartInFutureDuration": "P6W", "maxStartInFutureDuration": "P6W",
"isRenewable": false, "isRenewable": null,
"sendInvoice": false, "sendInvoice": null,
"imageReference": "https://www.htm.nl/media/leif2leu/htm-logo-mobile.svg", "imageReference": "https://www.htm.nl/media/leif2leu/htm-logo-mobile.svg",
"productPageUrl": "https://www.htm.nl/webshop/htm-regio-vrij", "productPageUrl": "https://www.htm.nl/webshop/htm-regio-vrij",
"termsUrl": "https://www.htm.nl/reisproducten/productvoorwaarden/htm-regio-vrij/", "termsUrl": "https://www.htm.nl/reisproducten/productvoorwaarden/htm-regio-vrij/",
@ -1307,8 +1813,8 @@ paths:
"serviceOptions": null, "serviceOptions": null,
"validityDuration": "P1M", "validityDuration": "P1M",
"maxStartInFutureDuration": "P6W", "maxStartInFutureDuration": "P6W",
"isRenewable": false, "isRenewable": null,
"sendInvoice": false, "sendInvoice": null,
"imageReference": "https://web.acc.cloud.htm.nl/media/leif2leu/htm-logo-mobile.svg", "imageReference": "https://web.acc.cloud.htm.nl/media/leif2leu/htm-logo-mobile.svg",
"productPageUrl": "https://web.acc.cloud.htm.nl/webshop/htm-regio-vrij", "productPageUrl": "https://web.acc.cloud.htm.nl/webshop/htm-regio-vrij",
"termsUrl": "https://web.acc.cloud.htm.nl/reisproducten/productvoorwaarden/htm-regio-vrij/", "termsUrl": "https://web.acc.cloud.htm.nl/reisproducten/productvoorwaarden/htm-regio-vrij/",
@ -2065,10 +2571,10 @@ components:
example: "Forbidden" example: "Forbidden"
message: message:
type: string type: string
example: Retailer not authorized to access product details example: Touchpoint not authorized to see product details
description: description:
type: string type: string
example: The touchpoint is not part of a retailer that isallowed to access product details for this productId example: The touchpoint is currently not allowed to sell this product and thus can not see its details
apiErrorCode: apiErrorCode:
type: string type: string
example: htm.api.err.40xxx example: htm.api.err.40xxx