Rescale the 3D model
/v1/products/{id}/model/rescaleScales the 3D model to the real-world dimensions given and stores them on the product. 409 without a ready model, or for one whose size cannot be measured; 502 when the resize fails.
Path Parameters
The product's id.
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Real-world dimensions to scale the model to; at least one. unit covers the values (default
cm) and becomes the product's display unit. width_axis says which of the model's horizontal
axes is its width.
Response Body
application/json
application/json
curl -X POST "https://example.com/v1/products/497f6eca-6276-4993-bfeb-53cbbbba6f08/model/rescale" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b", "title": "string", "custom_id": "string", "tags": [ "string" ], "status": "awaiting_review", "display_status": "published", "published": false, "form": "string", "source_type": "image", "price": 0, "currency": "string", "height": 0, "width": 0, "depth": 0, "display_unit": "mm", "images_ordered": false, "thumbnail_url": "string", "has_warnings": false, "warning_count": 0, "comment_count": 0, "image_count": 0, "model_status": "planned", "owner": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "display_name": "string", "email": "string" }, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "viewer_url": "string", "description": "string", "wall_mounted": false, "product_type": "string", "material_words": "string", "transparent": false, "metadata": {}, "sources": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "kind": "photo", "url": "string", "original_name": "string", "position": 0, "azimuth": "string", "tilt": "string", "clean": true, "created_at": "2019-08-24T14:15:22Z" } ], "images": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "view": "string", "kind": "wanted", "stands_for": "string", "status": "planned", "skip_reason": "string", "route": "reuse", "source": "photograph", "evidence": "string", "azimuth": "string", "tilt": "string", "source_photo_id": "a7f5490c-d09d-4c87-9733-d1cad32c6e5a", "attempts": 0, "flagged": false, "cut_flagged": false, "cut_problems": "string", "review_status": "pending", "filename": "string", "alt_text": "string", "filename_override": "string", "alt_override": "string", "shadow_override": { "mode": "silhouette", "tone": [ 0, 0, 0 ], "silhouette": { "length": 0, "lean": 0, "blurNear": 0, "blurFar": 0, "opacity": 0, "distanceFade": 0 }, "contact": { "trailPx": 0, "dark": 0, "end": 0, "midpoint": 0, "regionHeight": 0 }, "ground": { "nudge": 0, "tilt": 0 } }, "background_override": [ 0, 0, 0 ], "frame_scale": 0, "contact_regions": [ [ 0 ] ], "raw_url": "string", "cutout_url": "string", "warnings": [ { "kind": "cut", "scope": "image", "title": "string", "detail": "string", "view": "string" } ], "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" } ], "model": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "status": "planned", "review_status": "pending", "thumbnail_url": "string", "scale_factor": 0, "width_axis": "x", "flags": { "transparent": false, "geometry_risk": false, "texture_risk": false, "source_quality": "ok", "reasons": [ { "code": "string", "sentence": "string" } ] }, "warnings": [ { "kind": "cut", "scope": "image", "title": "string", "detail": "string", "view": "string" } ], "created_at": "2019-08-24T14:15:22Z", "completed_at": "2019-08-24T14:15:22Z" }, "warnings": [ { "kind": "cut", "scope": "image", "title": "string", "detail": "string", "view": "string" } ], "open_request_count": 0, "painting": { "edge": "frame", "edge_color": "string", "dimensions_of": "canvas", "canvas_width_cm": 0, "canvas_height_cm": 0, "depth_cm": 0, "has_frame": false, "rebuild": { "status": "running", "requested": { "edge": "frame", "edge_color": "string", "dimensions_of": "canvas", "canvas_width_cm": 0, "canvas_height_cm": 0, "depth_cm": 0, "frame_width_cm": 0, "frame_height_cm": 0 }, "requested_at": "2019-08-24T14:15:22Z", "error": "string" } }, "viewer_desktop": "viewer", "viewer_mobile": "viewer"}{ "error": { "code": "string", "message": "string", "details": null }}Update an image PATCH
Changes one image: its review decision, shadow and background, filename and alt text. Send `null` to clear an override. Answers the image as it now reads. `400` for a decision back to `pending`; `404` for an image not on the product.
Create a model ticket POST
Returns a single-use URL for the product's 3D file - the only way to its bytes, since no response carries a model file URL. The URL serves `model/gltf-binary` once, until `expires_at` (60 seconds for `view`, 30 for `ar`). Mint it right before the viewer loads; never store it. - Publishable key: published products only; the ticket is bound to the requesting page's origin, which must be one of your allowed domains. - Secret key: any of your products; the ticket is bound to `origin` (the page that will load the file). `400` for an origin outside your allowed domains; `404` for a product you cannot see; `409` without a ready model; `429` past the rate limits.