Guides
Flat tree validation
Besides the recommended `/products/configure` endpoint it is also possible to get a flat interpretation of all the possible options in the `/products/product/:api_code`. This article has more information on the usage of this endpoint.
When to use
You can use the flat tree option if you want a more direct interaction to customize Probo Products. Because you have the whole configuration from the start, you do not need to have round trips with the Probo API if you use the configure endpoint. The configure handles every possible configuration option.
When using this endpoint you need to validate every combination yourself, there are validation rules regarding sizes and if an option is available for a certain option.
Below are the most important pointers. We want to emphasize that you are responsible for the correct product configuration at the end.
Disabled for options
Disabled_for_options
is a conditional check to determine if an option is visible based on a customer's selection.
This option should not be selectable when a customer selects one of the options matching the API code of that option in previous steps. For example if "3mm" is selected before it is not possible to choose the option "aquaseal-gloss-dz"
Option configuration demonstrates disabling logic
[
{
code: "aquaseal-gloss-dz",
disabled_for_options: [
"single-sided", // Disable if this option was previously selected
"3mm", // Disable if thickness 3mm was chosen
"4mm", // Disable if thickness 4mm was chosen
"blank", // Disable for blank configuration
"dibond-3mm", // Disable for specific material/thickness combos
"dibond-4mm",
"dibond-6mm",
"dibond-xl",
],
},
];
Reversible
In some cases, the property reversible
might be true. This means that the height and width restrictions are interchangeable. As long as the height or width does not exceed one of the limitations, this is possible.
If the maximal height is 120 cm and the width is maximal 100 cm's. It is possible -when reversible is true- to apply to configure a product with a width of max 120 cm's as long as the width remains below 100 cm.
Calculated options
Sometimes you will get an option with the "type_code": "calculated"
. This means you still need to hit the configure endpoint. You might find this in the product stickers-on-a-roll
.