Create a model ticket
/v1/products/{id}/ticketsReturns 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.
Path Parameters
The product's id.
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
view for the page that will show the model; ar for Android's Scene Viewer, minted when
the shopper taps the AR button (it lives 30 seconds). With a secret key, origin names the page
that will fetch the file; it must be one of your allowed domains. A publishable key does not
send it: its ticket is bound to the request's own origin.
Response Body
application/json
application/json
curl -X POST "https://example.com/v1/products/497f6eca-6276-4993-bfeb-53cbbbba6f08/tickets" \ -H "Content-Type: application/json" \ -d '{ "kind": "view" }'{ "url": "string", "kind": "view", "expires_at": "2019-08-24T14:15:22Z"}{ "error": { "code": "string", "message": "string", "details": null }}Rescale the 3D model POST
Scales 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.
Get a product's QR code GET
The product's QR code as a square PNG, `size` pixels on a side (256-2048, default 1024). It encodes the product's hosted viewer page (`viewer_url`). - `guide=false` (default): "View in your room" above the code, "Powered by Viewrium" below it. - `guide=true`: the whole "View in your room" card, with the three steps beside the code. Answered for every product, published or not, so a code can be printed before launch; the link opens once the product is published, which the `Viewrium-Published` header states. `404` for a product you cannot see; `503` when QR rendering is unavailable.