diff --git a/src/openapi/products/SE-products-SE.yaml b/src/openapi/products/SE-products-SE.yaml index 943c2ee..eb40747 100644 --- a/src/openapi/products/SE-products-SE.yaml +++ b/src/openapi/products/SE-products-SE.yaml @@ -6,7 +6,7 @@ info: To be used by touchpoints to get information about HTM products they are allowed to see and/or sell. version: "1.0" servers: - - url: https://services.acc.api.htm.nl/abt/touchpoint/1.0 + - url: https://services.acc.api.htm.nl/abt/abtserviceengine/1.0 tags: - name: ServiceEngine Products description: |- @@ -90,7 +90,7 @@ paths: "productDescription": "Reis een dag met het openbaar vervoer bij HTM", "productCategory": { - "productCategoryId": 6, + "productCategoryId": 5, "isTravelProduct": false, "name": "Barcode", }, @@ -123,7 +123,7 @@ paths: "productDescription": "Reis een dag met het openbaar vervoer bij HTM", "productCategory": { - "productCategoryId": 6, + "productCategoryId": 5, "isTravelProduct": false, "name": "Barcode", }, @@ -156,7 +156,7 @@ paths: "productDescription": "Voor een vast bedrag onbeperkt reizen met EBS, HTM en RET in het gekozen gebied in de regio Rotterdam Den Haag.", "productCategory": { - "productCategoryId": 3, + "productCategoryId": 2, "isTravelProduct": true, "name": "Afgekocht reisrecht", }, @@ -222,7 +222,7 @@ paths: "productDescription": "Reis een dag met het openbaar vervoer bij HTM", "productCategory": { - "productCategoryId": 6, + "productCategoryId": 5, "isTravelProduct": false, "name": "Barcode", }, @@ -313,6 +313,7 @@ paths: { "productId": 24, "parentProductId": null, + "layerInfo": null, "fikoArticleNumber": "1234", "gboPackageTemplateId": "30901", "tapConnectProductCode": null, @@ -425,6 +426,7 @@ paths: { "productId": 126, "parentProductId": null, + "layerInfo": null, "fikoArticleNumber": "1234", "gboPackageTemplateId": "30001", "tapConnectProductCode": null, @@ -527,6 +529,12 @@ paths: { "productId": 119, "parentProductId": 126, + "layerInfo": { + "layerInfoId": 1, + "choiceKey": "isRenewable", + "choiceLabel": "Kies voor een doorlopend abonnement of een enkele termijn", + "isCustomChoice": false, + }, "fikoArticleNumber": "1234", "gboPackageTemplateId": "30001", "tapConnectProductCode": null, @@ -641,6 +649,12 @@ paths: { "productId": 120, "parentProductId": 126, + "layerInfo": { + "layerInfoId": 1, + "choiceKey": "isRenewable", + "choiceLabel": "Kies voor een doorlopend abonnement of een enkele termijn", + "isCustomChoice": false, + }, "fikoArticleNumber": "1234", "gboPackageTemplateId": "30001", "tapConnectProductCode": null, @@ -765,6 +779,7 @@ paths: { "productId": 49, "parentProductId": null, + "layerInfo": null, "fikoArticleNumber": "1234", "gboPackageTemplateId": null, "tapConnectProductCode": null, @@ -794,12 +809,6 @@ paths: "customerSegments": [], "allowedGboAgeProfiles": [ - { - "gboAgeProfileId": 1, - "name": "Baby/peuter (0 t/m 3 jaar)", - "ageFromInclusive": 0, - "ageToInclusive": 3, - }, { "gboAgeProfileId": 2, "name": "Kind (4 t/m 11 jaar)", @@ -827,7 +836,7 @@ paths: ], "productCategory": { - "productCategoryId": 3, + "productCategoryId": 2, "isTravelProduct": true, "name": "Afgekocht reisrecht", }, @@ -837,26 +846,10 @@ paths: "incompatibleProducts": [], "mandatoryCustomerDataItems": [ - { - "mandatoryCustomerDataItemId": 1, - "customerDataItem": "birthname", - }, - { - "mandatoryCustomerDataItemId": 2, - "customerDataItem": "surname", - }, - { - "mandatoryCustomerDataItemId": 3, - "customerDataItem": "dateOfBirth", - }, { "mandatoryCustomerDataItemId": 4, "customerDataItem": "emailAddress", }, - { - "mandatoryCustomerDataItemId": 7, - "customerDataItem": "ovPayToken", - }, { "mandatoryCustomerDataItemId": 8, "customerDataItem": "padBirthDate", @@ -928,6 +921,12 @@ paths: { "productId": 109, "parentProductId": 49, + "layerInfo": { + "layerInfoId": 2, + "choiceKey": "regio", + "choiceLabel": "Kies de gewenste regio", + "isCustomChoice": true, + }, "fikoArticleNumber": "1234", "gboPackageTemplateId": "33615", "tapConnectProductCode": null, @@ -957,12 +956,6 @@ paths: "customerSegments": [], "allowedGboAgeProfiles": [ - { - "gboAgeProfileId": 1, - "name": "Baby/peuter (0 t/m 3 jaar)", - "ageFromInclusive": 0, - "ageToInclusive": 3, - }, { "gboAgeProfileId": 2, "name": "Kind (4 t/m 11 jaar)", @@ -990,7 +983,7 @@ paths: ], "productCategory": { - "productCategoryId": 3, + "productCategoryId": 2, "isTravelProduct": true, "name": "Afgekocht reisrecht", }, @@ -1003,26 +996,10 @@ paths: "incompatibleProducts": [], "mandatoryCustomerDataItems": [ - { - "mandatoryCustomerDataItemId": 1, - "customerDataItem": "birthname", - }, - { - "mandatoryCustomerDataItemId": 2, - "customerDataItem": "surname", - }, - { - "mandatoryCustomerDataItemId": 3, - "customerDataItem": "dateOfBirth", - }, { "mandatoryCustomerDataItemId": 4, "customerDataItem": "emailAddress", }, - { - "mandatoryCustomerDataItemId": 7, - "customerDataItem": "ovPayToken", - }, { "mandatoryCustomerDataItemId": 8, "customerDataItem": "padBirthDate", @@ -1094,6 +1071,12 @@ paths: { "productId": 114, "parentProductId": 109, + "layerInfo": { + "layerInfoId": 3, + "choiceKey": "allowedGboAgeProfiles", + "choiceLabel": "Wat is uw geboortedatum?", + "isCustomChoice": false, + }, "fikoArticleNumber": "1234", "gboPackageTemplateId": "33615", "tapConnectProductCode": null, @@ -1123,12 +1106,6 @@ paths: "customerSegments": [], "allowedGboAgeProfiles": [ - { - "gboAgeProfileId": 1, - "name": "Baby/peuter (0 t/m 3 jaar)", - "ageFromInclusive": 0, - "ageToInclusive": 3, - }, { "gboAgeProfileId": 4, "name": "Volwassene (19 t/m 64 jaar)", @@ -1144,7 +1121,7 @@ paths: ], "productCategory": { - "productCategoryId": 3, + "productCategoryId": 2, "isTravelProduct": true, "name": "Afgekocht reisrecht", }, @@ -1156,27 +1133,11 @@ paths: "requiredProducts": [], "incompatibleProducts": [], "mandatoryCustomerDataItems": - [ - { - "mandatoryCustomerDataItemId": 1, - "customerDataItem": "birthname", - }, - { - "mandatoryCustomerDataItemId": 2, - "customerDataItem": "surname", - }, - { - "mandatoryCustomerDataItemId": 3, - "customerDataItem": "dateOfBirth", - }, + [ { "mandatoryCustomerDataItemId": 4, "customerDataItem": "emailAddress", }, - { - "mandatoryCustomerDataItemId": 7, - "customerDataItem": "ovPayToken", - }, { "mandatoryCustomerDataItemId": 8, "customerDataItem": "padBirthDate", @@ -1260,6 +1221,12 @@ paths: { "productId": 115, "parentProductId": 109, + "layerInfo": { + "layerInfoId": 3, + "choiceKey": "allowedGboAgeProfiles", + "choiceLabel": "Wat is uw geboortedatum?", + "isCustomChoice": false, + }, "fikoArticleNumber": "1234", "gboPackageTemplateId": "33615", "tapConnectProductCode": null, @@ -1304,7 +1271,7 @@ paths: ], "productCategory": { - "productCategoryId": 3, + "productCategoryId": 2, "isTravelProduct": true, "name": "Afgekocht reisrecht", }, @@ -1316,27 +1283,11 @@ paths: "requiredProducts": [], "incompatibleProducts": [], "mandatoryCustomerDataItems": - [ - { - "mandatoryCustomerDataItemId": 1, - "customerDataItem": "birthname", - }, - { - "mandatoryCustomerDataItemId": 2, - "customerDataItem": "surname", - }, - { - "mandatoryCustomerDataItemId": 3, - "customerDataItem": "dateOfBirth", - }, + [ { "mandatoryCustomerDataItemId": 4, "customerDataItem": "emailAddress", }, - { - "mandatoryCustomerDataItemId": 7, - "customerDataItem": "ovPayToken", - }, { "mandatoryCustomerDataItemId": 8, "customerDataItem": "padBirthDate", @@ -1421,6 +1372,12 @@ paths: { "productId": 116, "parentProductId": 115, + "layerInfo": { + "layerInfoId": 1, + "choiceKey": "isRenewable", + "choiceLabel": "Kies voor een doorlopend abonnement of een enkele termijn", + "isCustomChoice": false, + }, "fikoArticleNumber": "1234", "gboPackageTemplateId": "33615", "tapConnectProductCode": null, @@ -1465,7 +1422,7 @@ paths: ], "productCategory": { - "productCategoryId": 3, + "productCategoryId": 2, "isTravelProduct": true, "name": "Afgekocht reisrecht", }, @@ -1478,26 +1435,10 @@ paths: "incompatibleProducts": [], "mandatoryCustomerDataItems": [ - { - "mandatoryCustomerDataItemId": 1, - "customerDataItem": "birthname", - }, - { - "mandatoryCustomerDataItemId": 2, - "customerDataItem": "surname", - }, - { - "mandatoryCustomerDataItemId": 3, - "customerDataItem": "dateOfBirth", - }, { "mandatoryCustomerDataItemId": 4, "customerDataItem": "emailAddress", }, - { - "mandatoryCustomerDataItemId": 7, - "customerDataItem": "ovPayToken", - }, { "mandatoryCustomerDataItemId": 8, "customerDataItem": "padBirthDate", @@ -1585,6 +1526,12 @@ paths: { "productId": 117, "parentProductId": 115, + "layerInfo": { + "layerInfoId": 1, + "choiceKey": "isRenewable", + "choiceLabel": "Kies voor een doorlopend abonnement of een enkele termijn", + "isCustomChoice": false, + }, "fikoArticleNumber": "1234", "gboPackageTemplateId": "33615", "tapConnectProductCode": null, @@ -1629,7 +1576,7 @@ paths: ], "productCategory": { - "productCategoryId": 3, + "productCategoryId": 2, "isTravelProduct": true, "name": "Afgekocht reisrecht", }, @@ -1642,26 +1589,10 @@ paths: "incompatibleProducts": [], "mandatoryCustomerDataItems": [ - { - "mandatoryCustomerDataItemId": 1, - "customerDataItem": "birthname", - }, - { - "mandatoryCustomerDataItemId": 2, - "customerDataItem": "surname", - }, - { - "mandatoryCustomerDataItemId": 3, - "customerDataItem": "dateOfBirth", - }, { "mandatoryCustomerDataItemId": 4, "customerDataItem": "emailAddress", }, - { - "mandatoryCustomerDataItemId": 7, - "customerDataItem": "ovPayToken", - }, { "mandatoryCustomerDataItemId": 8, "customerDataItem": "padBirthDate", @@ -1753,6 +1684,12 @@ paths: { "productId": 112, "parentProductId": 49, + "layerInfo": { + "layerInfoId": 2, + "choiceKey": "regio", + "choiceLabel": "Kies de gewenste regio", + "isCustomChoice": true, + }, "fikoArticleNumber": "1234", "gboPackageTemplateId": "33618", "tapConnectProductCode": null, @@ -1782,12 +1719,6 @@ paths: "customerSegments": [], "allowedGboAgeProfiles": [ - { - "gboAgeProfileId": 1, - "name": "Baby/peuter (0 t/m 3 jaar)", - "ageFromInclusive": 0, - "ageToInclusive": 3, - }, { "gboAgeProfileId": 2, "name": "Kind (4 t/m 11 jaar)", @@ -1815,7 +1746,7 @@ paths: ], "productCategory": { - "productCategoryId": 3, + "productCategoryId": 2, "isTravelProduct": true, "name": "Afgekocht reisrecht", }, @@ -1828,26 +1759,11 @@ paths: "incompatibleProducts": [], "mandatoryCustomerDataItems": [ - { - "mandatoryCustomerDataItemId": 1, - "customerDataItem": "birthname", - }, - { - "mandatoryCustomerDataItemId": 2, - "customerDataItem": "surname", - }, - { - "mandatoryCustomerDataItemId": 3, - "customerDataItem": "dateOfBirth", - }, + { "mandatoryCustomerDataItemId": 4, "customerDataItem": "emailAddress", }, - { - "mandatoryCustomerDataItemId": 7, - "customerDataItem": "ovPayToken", - }, { "mandatoryCustomerDataItemId": 8, "customerDataItem": "padBirthDate", @@ -1937,6 +1853,53 @@ paths: } components: schemas: + LayerInfoResponse: + type: object + description: >- + Gives information on the choice that the customer has to make, to enable the touchpoint + to proceed further "down the product-tree" by selecting (PATCH-ing) the correct product-variant. + LayerInfo is not a mandatory product-attribute, but it should always be present on all product for which + `parentProductId != null`. (LayerInfo makes no sense for top-level parents as there is always a single starting point). \ + + **PMT should ensure that all products in the same "product-branch" (same `parentProductId`) have the same `layerInfoId` + referenced. If a product is found to be in violation of this rule, its attribtue `isValid` should be set to `false`.** + required: + - layerInfoId + - choiceKey + - choiceLabel + - isCustomChoice + properties: + layerInfoId: + example: 1 + type: integer + choiceKey: + example: isRenewable + type: string + description: >- + Contains the JSON Key of the product-attribute that the customer has to make some + choice on (determined by PMT), so that te correct product-variant can be selected by the touchpoint. For some + decisions (like region), there is no product attribute, and thus `isCustomChoice` will be set + to `true`, and `choiceKey` can then be set to any string on which touchpoints can also trigger + behaviour if desired (think "region picker tool"). Therefore, reuse of choiceKeys should be + the goal, so touchoints can keep their triggers simple and prevent duplication of + similar choiceKeys to trigger the same behaviour. + choiceLabel: + example: Kies voor een doorlopend abonnement of een enkele termijn + type: string + description: >- + Contains a human-readable label for the choice that the customer has to make - this label + should be something that is easy to understand for the customer. Only one label (and thus, one language) + is supported; label translations should be handled by the touchpoint. + isCustomChoice: + example: false + type: boolean + description: >- + Indicates if the choice is a custom choice. If `false`, the PMT should fill `choiceKey` with the + "differing attribute for this product-layer" and the user should not be able to override this. When + no single attribute can be pinpointed by PMT, the product will become invalid (`isValid == false`) until either + a situation with a single differing attribute is created, or if `isCustomChoice` is set to `true` - this would, + however, also mean that touchpoints should be notified of this, especially if the configured LayerInfo contains + a new, not previously used, `choiceKey`. GboAgeProfileResponse: type: object required: @@ -2199,6 +2162,8 @@ components: parentProductId: type: integer example: 1 + layerInfo: + $ref: '#/components/schemas/LayerInfoResponse' fikoArticleNumber: type: string description: The article number of the product in FIKO diff --git a/src/openapi/products/SE-products-TP.yaml b/src/openapi/products/SE-products-TP.yaml index a8bf64b..7be3d25 100644 --- a/src/openapi/products/SE-products-TP.yaml +++ b/src/openapi/products/SE-products-TP.yaml @@ -90,7 +90,7 @@ paths: "productDescription": "Reis een dag met het openbaar vervoer bij HTM", "productCategory": { - "productCategoryId": 6, + "productCategoryId": 5, "isTravelProduct": false, "name": "Barcode", }, @@ -123,7 +123,7 @@ paths: "productDescription": "Reis een dag met het openbaar vervoer bij HTM", "productCategory": { - "productCategoryId": 6, + "productCategoryId": 5, "isTravelProduct": false, "name": "Barcode", }, @@ -156,7 +156,7 @@ paths: "productDescription": "Voor een vast bedrag onbeperkt reizen met EBS, HTM en RET in het gekozen gebied in de regio Rotterdam Den Haag.", "productCategory": { - "productCategoryId": 3, + "productCategoryId": 2, "isTravelProduct": true, "name": "Afgekocht reisrecht", }, @@ -222,7 +222,7 @@ paths: "productDescription": "Reis een dag met het openbaar vervoer bij HTM", "productCategory": { - "productCategoryId": 6, + "productCategoryId": 5, "isTravelProduct": false, "name": "Barcode", }, @@ -313,6 +313,7 @@ paths: { "productId": 24, "parentProductId": null, + "layerInfo": null, "fikoArticleNumber": "1234", "gboPackageTemplateId": "30901", "tapConnectProductCode": null, @@ -425,6 +426,7 @@ paths: { "productId": 126, "parentProductId": null, + "layerInfo": null, "fikoArticleNumber": "1234", "gboPackageTemplateId": "30001", "tapConnectProductCode": null, @@ -527,6 +529,12 @@ paths: { "productId": 119, "parentProductId": 126, + "layerInfo": { + "layerInfoId": 1, + "choiceKey": "isRenewable", + "choiceLabel": "Kies voor een doorlopend abonnement of een enkele termijn", + "isCustomChoice": false, + }, "fikoArticleNumber": "1234", "gboPackageTemplateId": "30001", "tapConnectProductCode": null, @@ -641,6 +649,12 @@ paths: { "productId": 120, "parentProductId": 126, + "layerInfo": { + "layerInfoId": 1, + "choiceKey": "isRenewable", + "choiceLabel": "Kies voor een doorlopend abonnement of een enkele termijn", + "isCustomChoice": false, + }, "fikoArticleNumber": "1234", "gboPackageTemplateId": "30001", "tapConnectProductCode": null, @@ -765,6 +779,7 @@ paths: { "productId": 49, "parentProductId": null, + "layerInfo": null, "fikoArticleNumber": "1234", "gboPackageTemplateId": null, "tapConnectProductCode": null, @@ -794,12 +809,6 @@ paths: "customerSegments": [], "allowedGboAgeProfiles": [ - { - "gboAgeProfileId": 1, - "name": "Baby/peuter (0 t/m 3 jaar)", - "ageFromInclusive": 0, - "ageToInclusive": 3, - }, { "gboAgeProfileId": 2, "name": "Kind (4 t/m 11 jaar)", @@ -827,7 +836,7 @@ paths: ], "productCategory": { - "productCategoryId": 3, + "productCategoryId": 2, "isTravelProduct": true, "name": "Afgekocht reisrecht", }, @@ -837,26 +846,10 @@ paths: "incompatibleProducts": [], "mandatoryCustomerDataItems": [ - { - "mandatoryCustomerDataItemId": 1, - "customerDataItem": "birthname", - }, - { - "mandatoryCustomerDataItemId": 2, - "customerDataItem": "surname", - }, - { - "mandatoryCustomerDataItemId": 3, - "customerDataItem": "dateOfBirth", - }, { "mandatoryCustomerDataItemId": 4, "customerDataItem": "emailAddress", }, - { - "mandatoryCustomerDataItemId": 7, - "customerDataItem": "ovPayToken", - }, { "mandatoryCustomerDataItemId": 8, "customerDataItem": "padBirthDate", @@ -928,6 +921,12 @@ paths: { "productId": 109, "parentProductId": 49, + "layerInfo": { + "layerInfoId": 2, + "choiceKey": "regio", + "choiceLabel": "Kies de gewenste regio", + "isCustomChoice": true, + }, "fikoArticleNumber": "1234", "gboPackageTemplateId": "33615", "tapConnectProductCode": null, @@ -957,12 +956,6 @@ paths: "customerSegments": [], "allowedGboAgeProfiles": [ - { - "gboAgeProfileId": 1, - "name": "Baby/peuter (0 t/m 3 jaar)", - "ageFromInclusive": 0, - "ageToInclusive": 3, - }, { "gboAgeProfileId": 2, "name": "Kind (4 t/m 11 jaar)", @@ -990,7 +983,7 @@ paths: ], "productCategory": { - "productCategoryId": 3, + "productCategoryId": 2, "isTravelProduct": true, "name": "Afgekocht reisrecht", }, @@ -1003,26 +996,10 @@ paths: "incompatibleProducts": [], "mandatoryCustomerDataItems": [ - { - "mandatoryCustomerDataItemId": 1, - "customerDataItem": "birthname", - }, - { - "mandatoryCustomerDataItemId": 2, - "customerDataItem": "surname", - }, - { - "mandatoryCustomerDataItemId": 3, - "customerDataItem": "dateOfBirth", - }, { "mandatoryCustomerDataItemId": 4, "customerDataItem": "emailAddress", }, - { - "mandatoryCustomerDataItemId": 7, - "customerDataItem": "ovPayToken", - }, { "mandatoryCustomerDataItemId": 8, "customerDataItem": "padBirthDate", @@ -1094,6 +1071,12 @@ paths: { "productId": 114, "parentProductId": 109, + "layerInfo": { + "layerInfoId": 3, + "choiceKey": "allowedGboAgeProfiles", + "choiceLabel": "Wat is uw geboortedatum?", + "isCustomChoice": false, + }, "fikoArticleNumber": "1234", "gboPackageTemplateId": "33615", "tapConnectProductCode": null, @@ -1123,12 +1106,6 @@ paths: "customerSegments": [], "allowedGboAgeProfiles": [ - { - "gboAgeProfileId": 1, - "name": "Baby/peuter (0 t/m 3 jaar)", - "ageFromInclusive": 0, - "ageToInclusive": 3, - }, { "gboAgeProfileId": 4, "name": "Volwassene (19 t/m 64 jaar)", @@ -1144,7 +1121,7 @@ paths: ], "productCategory": { - "productCategoryId": 3, + "productCategoryId": 2, "isTravelProduct": true, "name": "Afgekocht reisrecht", }, @@ -1156,27 +1133,11 @@ paths: "requiredProducts": [], "incompatibleProducts": [], "mandatoryCustomerDataItems": - [ - { - "mandatoryCustomerDataItemId": 1, - "customerDataItem": "birthname", - }, - { - "mandatoryCustomerDataItemId": 2, - "customerDataItem": "surname", - }, - { - "mandatoryCustomerDataItemId": 3, - "customerDataItem": "dateOfBirth", - }, + [ { "mandatoryCustomerDataItemId": 4, "customerDataItem": "emailAddress", }, - { - "mandatoryCustomerDataItemId": 7, - "customerDataItem": "ovPayToken", - }, { "mandatoryCustomerDataItemId": 8, "customerDataItem": "padBirthDate", @@ -1260,6 +1221,12 @@ paths: { "productId": 115, "parentProductId": 109, + "layerInfo": { + "layerInfoId": 3, + "choiceKey": "allowedGboAgeProfiles", + "choiceLabel": "Wat is uw geboortedatum?", + "isCustomChoice": false, + }, "fikoArticleNumber": "1234", "gboPackageTemplateId": "33615", "tapConnectProductCode": null, @@ -1304,7 +1271,7 @@ paths: ], "productCategory": { - "productCategoryId": 3, + "productCategoryId": 2, "isTravelProduct": true, "name": "Afgekocht reisrecht", }, @@ -1316,27 +1283,11 @@ paths: "requiredProducts": [], "incompatibleProducts": [], "mandatoryCustomerDataItems": - [ - { - "mandatoryCustomerDataItemId": 1, - "customerDataItem": "birthname", - }, - { - "mandatoryCustomerDataItemId": 2, - "customerDataItem": "surname", - }, - { - "mandatoryCustomerDataItemId": 3, - "customerDataItem": "dateOfBirth", - }, + [ { "mandatoryCustomerDataItemId": 4, "customerDataItem": "emailAddress", }, - { - "mandatoryCustomerDataItemId": 7, - "customerDataItem": "ovPayToken", - }, { "mandatoryCustomerDataItemId": 8, "customerDataItem": "padBirthDate", @@ -1421,6 +1372,12 @@ paths: { "productId": 116, "parentProductId": 115, + "layerInfo": { + "layerInfoId": 1, + "choiceKey": "isRenewable", + "choiceLabel": "Kies voor een doorlopend abonnement of een enkele termijn", + "isCustomChoice": false, + }, "fikoArticleNumber": "1234", "gboPackageTemplateId": "33615", "tapConnectProductCode": null, @@ -1465,7 +1422,7 @@ paths: ], "productCategory": { - "productCategoryId": 3, + "productCategoryId": 2, "isTravelProduct": true, "name": "Afgekocht reisrecht", }, @@ -1478,26 +1435,10 @@ paths: "incompatibleProducts": [], "mandatoryCustomerDataItems": [ - { - "mandatoryCustomerDataItemId": 1, - "customerDataItem": "birthname", - }, - { - "mandatoryCustomerDataItemId": 2, - "customerDataItem": "surname", - }, - { - "mandatoryCustomerDataItemId": 3, - "customerDataItem": "dateOfBirth", - }, { "mandatoryCustomerDataItemId": 4, "customerDataItem": "emailAddress", }, - { - "mandatoryCustomerDataItemId": 7, - "customerDataItem": "ovPayToken", - }, { "mandatoryCustomerDataItemId": 8, "customerDataItem": "padBirthDate", @@ -1585,6 +1526,12 @@ paths: { "productId": 117, "parentProductId": 115, + "layerInfo": { + "layerInfoId": 1, + "choiceKey": "isRenewable", + "choiceLabel": "Kies voor een doorlopend abonnement of een enkele termijn", + "isCustomChoice": false, + }, "fikoArticleNumber": "1234", "gboPackageTemplateId": "33615", "tapConnectProductCode": null, @@ -1629,7 +1576,7 @@ paths: ], "productCategory": { - "productCategoryId": 3, + "productCategoryId": 2, "isTravelProduct": true, "name": "Afgekocht reisrecht", }, @@ -1642,26 +1589,10 @@ paths: "incompatibleProducts": [], "mandatoryCustomerDataItems": [ - { - "mandatoryCustomerDataItemId": 1, - "customerDataItem": "birthname", - }, - { - "mandatoryCustomerDataItemId": 2, - "customerDataItem": "surname", - }, - { - "mandatoryCustomerDataItemId": 3, - "customerDataItem": "dateOfBirth", - }, { "mandatoryCustomerDataItemId": 4, "customerDataItem": "emailAddress", }, - { - "mandatoryCustomerDataItemId": 7, - "customerDataItem": "ovPayToken", - }, { "mandatoryCustomerDataItemId": 8, "customerDataItem": "padBirthDate", @@ -1723,7 +1654,7 @@ paths: "country": "Nederland", "emailAddress": "info@htm.nl", "phoneNumber": "070 374 9002", - "taxId": "572309345923", + "taxId": 572309345923, "imageReference": "https://www.htm.nl/media/leif2leu/htm-logo-mobile.svg", }, }, @@ -1753,6 +1684,12 @@ paths: { "productId": 112, "parentProductId": 49, + "layerInfo": { + "layerInfoId": 2, + "choiceKey": "regio", + "choiceLabel": "Kies de gewenste regio", + "isCustomChoice": true, + }, "fikoArticleNumber": "1234", "gboPackageTemplateId": "33618", "tapConnectProductCode": null, @@ -1782,12 +1719,6 @@ paths: "customerSegments": [], "allowedGboAgeProfiles": [ - { - "gboAgeProfileId": 1, - "name": "Baby/peuter (0 t/m 3 jaar)", - "ageFromInclusive": 0, - "ageToInclusive": 3, - }, { "gboAgeProfileId": 2, "name": "Kind (4 t/m 11 jaar)", @@ -1815,7 +1746,7 @@ paths: ], "productCategory": { - "productCategoryId": 3, + "productCategoryId": 2, "isTravelProduct": true, "name": "Afgekocht reisrecht", }, @@ -1828,26 +1759,11 @@ paths: "incompatibleProducts": [], "mandatoryCustomerDataItems": [ - { - "mandatoryCustomerDataItemId": 1, - "customerDataItem": "birthname", - }, - { - "mandatoryCustomerDataItemId": 2, - "customerDataItem": "surname", - }, - { - "mandatoryCustomerDataItemId": 3, - "customerDataItem": "dateOfBirth", - }, + { "mandatoryCustomerDataItemId": 4, "customerDataItem": "emailAddress", }, - { - "mandatoryCustomerDataItemId": 7, - "customerDataItem": "ovPayToken", - }, { "mandatoryCustomerDataItemId": 8, "customerDataItem": "padBirthDate", @@ -1905,7 +1821,7 @@ paths: "country": "Nederland", "emailAddress": "info@htm.nl", "phoneNumber": "070 374 9002", - "taxId": "572309345923", + "taxId": 572309345923, "imageReference": "https://www.htm.nl/media/leif2leu/htm-logo-mobile.svg", }, }, @@ -1937,6 +1853,53 @@ paths: } components: schemas: + LayerInfoResponse: + type: object + description: >- + Gives information on the choice that the customer has to make, to enable the touchpoint + to proceed further "down the product-tree" by selecting (PATCH-ing) the correct product-variant. + LayerInfo is not a mandatory product-attribute, but it should always be present on all product for which + `parentProductId != null`. (LayerInfo makes no sense for top-level parents as there is always a single starting point). \ + + **PMT should ensure that all products in the same "product-branch" (same `parentProductId`) have the same `layerInfoId` + referenced. If a product is found to be in violation of this rule, its attribtue `isValid` should be set to `false`.** + required: + - layerInfoId + - choiceKey + - choiceLabel + - isCustomChoice + properties: + layerInfoId: + example: 1 + type: integer + choiceKey: + example: isRenewable + type: string + description: >- + Contains the JSON Key of the product-attribute that the customer has to make some + choice on (determined by PMT), so that te correct product-variant can be selected by the touchpoint. For some + decisions (like region), there is no product attribute, and thus `isCustomChoice` will be set + to `true`, and `choiceKey` can then be set to any string on which touchpoints can also trigger + behaviour if desired (think "region picker tool"). Therefore, reuse of choiceKeys should be + the goal, so touchoints can keep their triggers simple and prevent duplication of + similar choiceKeys to trigger the same behaviour. + choiceLabel: + example: Kies voor een doorlopend abonnement of een enkele termijn + type: string + description: >- + Contains a human-readable label for the choice that the customer has to make - this label + should be something that is easy to understand for the customer. Only one label (and thus, one language) + is supported; label translations should be handled by the touchpoint. + isCustomChoice: + example: false + type: boolean + description: >- + Indicates if the choice is a custom choice. If `false`, the PMT should fill `choiceKey` with the + "differing attribute for this product-layer" and the user should not be able to override this. When + no single attribute can be pinpointed by PMT, the product will become invalid (`isValid == false`) until either + a situation with a single differing attribute is created, or if `isCustomChoice` is set to `true` - this would, + however, also mean that touchpoints should be notified of this, especially if the configured LayerInfo contains + a new, not previously used, `choiceKey`. GboAgeProfileResponse: type: object required: @@ -2199,6 +2162,8 @@ components: parentProductId: type: integer example: 1 + layerInfo: + $ref: '#/components/schemas/LayerInfoResponse' fikoArticleNumber: type: string description: The article number of the product in FIKO