# PlanSnapshotController
# Overview
# Description
Path /v2/planSnapshots
Handles all requests regarding planSnapshots: getting and creating. Updating and deleting is not possible.
A PlanSnapshot is a saved version of a current state of a plan. It stores everything that is needed to use this data standalone in a webshop context.
It can be seen like Configurations which are a snapshot of the current state within a configurator.
It is important to understand that a PlanSnapshot can have a plan as parentId (the planning started with this plan) but has no further connection to plans.
# PlanSnapshot JSON Object
An example for a planSnapshot JSON object.
{
"planSnapshot":
{
"id":"ps_planSnapshotId",
"parentId":"ps_planSnapshotIdOfParent",
"created":"2023-05-01T05:22:25.000Z",
"updated":"2023-05-01T05:22:25.000Z",
"planObjects":[
{
"combinedId": "catalogExtId:itemExtId",
"location": "locationString"
},
{ "combinedId": "catalogExtId:itemExtId:configuration",
"location": "aLocationString"
},
{ "combinedId": "catalogExtId:itemExtId:configuration",
"location": "anotherLocationString"
}],
"combinedIds" [
"catalogExtId:itemExtId",
"catalogExtId:itemExtId:configuration"
],
"embedId":"configuratorId",
"perspectiveImage":"https://roomle.com/ps_planSnapshotId/perspectiveImage.jpg",
"topImage":"https://roomle.com/ps_planSnapshotId/topImage.jpg",
"plan":"thePlanXmlString",
}
}
# fields
- id - String - uniqueId of a planSnapshot
- parentId - String - uniqueId of a planSnapshot that is previous version of the current one or of a plan which the snapshot originates from
- created - Long - unix timestamp
- updated - Long - unix timestamp
- planObjects - List of Jsons - each json is an object in the plan, composed of two fields - combinedId and location
- combinedIds - List of Strings - the list of unique combinedIds in the planSnapshot
- embedId - String - the id of the configurator where the planSnapshot was created
- perspectiveImage - String - link to the perspective image of the planSnapshot
- topImage - String - link to the top image of the planSnapshot
- plan - String - the plan XML generated by the core
# API Reference
# POST /
Accepts: json
Generates: json
standard way to create a new planSnapshot with the given content.
The post should contain:
- parentId
- planObjects
- plan
Other fields will either generate an error or be overridden.
Returns a PlanSnapshotContainer json with the created planSnapshot.
# GET /:id
Accepts: json
Generates: json
Returns a PlanSnapshotContainer json with the planSnapshot whose id is specified.
# PUT /:id
Accepts: multipart-formdata
Generates: json
Path :
- id - String - id of the PlanSnapshot to update Content:
- file - body - the data to be uploaded (image, ...)
- type - String - the type of asset
Possible types:
- perspectiveImage - returned as a link in the json field "perspectiveImage"
- topImage - returned as a link in the json field "topImage"
Returns a PlanSnapshotContainer json with the updated planSnapshot object.