Asset
An asset is a binary file stored in Bookable. Photos, floor plans, documents and any other file referenced by a resource is registered as an asset.
Shape
| Field | Purpose |
|---|---|
name | Identifier shown to users and used as the default download filename |
description | Free text rationale |
mime_type | Content type, validated on upload |
index | Ordering hint when several assets sit under the same parent |
status | Lifecycle state, populated as the binary is uploaded and validated |
owner_id | Owning organization |
How Assets Work
Assets can be created in one step or two.
Single step — send a multipart form to POST /asset with the file in a file field and the metadata (name, mime_type, description, owner_id) as additional form fields. Include object_type and object_id in the same request to attach the asset to a resource immediately.
Two steps — post JSON to POST /asset with just the metadata to create the row first, then upload the binary with POST /asset/{id}.
The binary is retrieved through GET /asset/{id}/data.
Object Association
An asset can be attached to any resource on the platform by providing object_type and object_id on create or through the asset sub resource endpoints exposed on owning objects.
API
The Asset tag of the Bookable API covers asset metadata, binary upload and download, and the asset audit log.