Skip to main content

Get Product Configuration

This is needed for creating a configured product on backend because we need to save user's configuration. The configuration is generated from the configuration viewer after user finishes to configure the given product.

Please follow these steps in order to get a valid product configuration:

  1. Configure a product.

Get configuration

  1. Open the browser's console and execute:
save-configuration.js
await expivi.saveConfiguration();
  1. Copy the response object. If everything was properly configured you should find the print_ready_file_id and media_id attached accordingly to an attribute:
response.json
{
"bundle_uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx",
"configured_products": [
{
"version": "2.0",
"catalogue_id": 2649,
"configuration": {
"attributes": [
{
"attribute_id": 143408,
"attribute_name": "svg_canvas",
"attribute_value": {
"media_id": 149549,
"print_ready_file_id": 24,
"svg_element": "image52",
"canvas": {
"objects": [],
"type": "",
"version": 0
}
},
"attribute_value_name": ""
}
],
"materials": {
}
},
"attributes": [
{
"attribute_id": 143408,
"attribute_name": "svg_canvas",
"attribute_value": {
"media_id": 149549,
"print_ready_file_id": 24,
"svg_element": "image52",
"canvas": {
"objects": [],
"type": "",
"version": 0
}
},
"attribute_value_name": ""
}
],
"thumbnail": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/...",
"articles": [],
"type": "root",
"scene_object_id": null,
"uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx",
"bundle_uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx",
"view_position": [
0,
0,
0
],
"view_rotation": [
0,
0,
0
],
"view_quaternion": [
0,
0,
0,
1
],
"view_scale": [
1,
1,
1
],
"price": {
"base": 354
},
"replication_type": "ORIGINAL"
}
]
}