Bazarazzi API
Everything the app does is also an HTTP API under /api/v1: read and change things, places, photos, documents, people and access, from a script or another tool.
Authenticate
Make a personal token in Settings, People, Developer, and send it as Authorization: Bearer inv_pat_... An organisation can also make service accounts, whose keys start with inv_sa_ and act with the role they are given.
Pick the workspace
Send the workspace id in X-Tenant-Id. A token belongs to one workspace, so with a token the header may be left out. GET /workspaces works without it.
Pages
Lists answer { data, next_cursor }. Pass next_cursor back as cursor until it is null. limit goes up to 200.
Errors
Errors are problem details (RFC 9457): a JSON body with title, status, detail and, for a refused field, errors. 401 is a missing or dead token, 403 a permission you lack, 404 also what you may not read.
Limits
600 requests a minute per token and 60 uploads, announced in the RateLimit headers. Past it, 429 with Retry-After.
Search
GET /items?q=... finds things by words in their name, case ignored, or by the start of their serial number (as typed or in capitals). serial_number=... asks for one serial number exactly. Both read an index, so they stay fast on a large workspace.
Safe retries
Send an Idempotency-Key with a POST: the same key within 24 hours replays the first answer instead of doing it twice.
Concurrent changes
A single thing answers with an ETag. Send it back in If-Match with PATCH or DELETE: if someone changed it since, you get 412 instead of overwriting their change.
Versions
Breaking changes go to /api/v2. /api/v1 then keeps working for at least 12 months, and its answers carry a Deprecation header.
Webhooks
An organisation can have up to 10 HTTPS endpoints told of changes within a minute. Each POST carries Inventaire-Signature: t=<seconds>,v1=<hex>, the HMAC-SHA256 of <t>.<raw body> with the webhook's secret: check it, and refuse a t older than 5 minutes. Failed deliveries are retried for 24 hours; deduplicate on the event id.
Workspaces
- get
/workspacesList my workspaces
- Needs:
any member- No X-Tenant-Id
- post
/workspacesCreate a workspace
- Needs:
any member- Body:
{ name, currency, kind }- No X-Tenant-Id
- get
/workspaces/{id}Get a workspace
- Needs:
any member
- patch
/workspaces/{id}Change a workspace
- Needs:
settings.manage- Body:
{ name, currency, kind, lostContact, org }
- get
/settingsGet the shared settings
- Needs:
any member
- patch
/settingsChange the shared settings
- Needs:
the edit permission of what is written- Body:
Settings
Items
- get
/itemsList items
- Needs:
items.read- Query:
cursorThe `next_cursor` of the page before.limit1 to 200, 50 by default.updated_sinceOnly what changed since this ISO 8601 time.deleted`false` (default), `true` to include the bin, `only` for the bin alone.item_idOnly the ones about this item.parent_idOnly the direct contents of this item, `root` for the top level.typeOne of place, room, furniture, container, library, object, book.statusOne of owned, lent, forSale, sold, given, moved, broken, repair, lost, stolen, thrown, wanted.tag_idOnly things with this tag.asset_numberThe asset number, exactly.serial_numberThe serial number, exactly as written.barcodeA barcode the thing carries.qWords in the name, or the start of the serial number.
- post
/itemsCreate a item
Requires `type`, `name`. An `id` may be given.
- Needs:
the edit permission of what is written- Body:
Item
- get
/items/{id}Get a item
Answers with an `ETag`.
- Needs:
items.read
- patch
/items/{id}Change a item
Only the fields given change. With `If-Match`, fails with 412 when it changed since.
- Needs:
the edit permission of what is written- Body:
Item
- delete
/items/{id}Delete a item
Puts it in the bin.
- Needs:
the edit permission of what is written
- get
/items/treeThe tree of places and containers
- Needs:
items.read- Query:
rootStart from this item instead of the top.
- get
/items/{id}/pathWhere a thing is, from the top
- Needs:
items.read
- get
/items/{id}/contentsWhat a thing holds, at every depth
- Needs:
items.read
- post
/items/{id}/moveMove a thing
- Needs:
the edit permission of what is written- Body:
{ parentId }
- post
/items/{id}/restoreTake a thing out of the bin
- Needs:
the edit permission of what is written
- post
/items/{id}/purgeDelete a binned thing for good
- Needs:
items.purge
- post
/items/{id}/splitSplit a quantity into a new thing
- Needs:
the edit permission of what is written- Body:
{ quantity }
- post
/items/{id}/duplicateDuplicate a thing
- Needs:
the edit permission of what is written- Body:
{ suffix }
Views
- get
/viewsList views
- Needs:
any member- Query:
cursorThe `next_cursor` of the page before.limit1 to 200, 50 by default.updated_sinceOnly what changed since this ISO 8601 time.deleted`false` (default), `true` to include the bin, `only` for the bin alone.item_idOnly the ones about this item.
- post
/viewsCreate a view
Requires `name`, `filter`, `display`. An `id` may be given.
- Needs:
the edit permission of what is written- Body:
View
- get
/views/{id}Get a view
Answers with an `ETag`.
- Needs:
any member
- patch
/views/{id}Change a view
Only the fields given change. With `If-Match`, fails with 412 when it changed since.
- Needs:
the edit permission of what is written- Body:
View
- delete
/views/{id}Delete a view
Puts it in the bin.
- Needs:
the edit permission of what is written
People
- get
/peopleList people
- Needs:
any member- Query:
cursorThe `next_cursor` of the page before.limit1 to 200, 50 by default.updated_sinceOnly what changed since this ISO 8601 time.deleted`false` (default), `true` to include the bin, `only` for the bin alone.item_idOnly the ones about this item.
- post
/peopleCreate a person
Requires `name`. An `id` may be given.
- Needs:
the edit permission of what is written- Body:
Person
- get
/people/{id}Get a person
Answers with an `ETag`.
- Needs:
any member
- patch
/people/{id}Change a person
Only the fields given change. With `If-Match`, fails with 412 when it changed since.
- Needs:
the edit permission of what is written- Body:
Person
- delete
/people/{id}Delete a person
Puts it in the bin.
- Needs:
the edit permission of what is written
- get
/membersList members
- Needs:
any member- Query:
format`csv` to download the list (managers only).
- get
/members/{id}Get a member
- Needs:
any member
- patch
/members/{id}Change a member's role or suspend them
- Needs:
members.manage- Body:
{ role, status }
- delete
/members/{id}Remove a member, or leave
A member may remove themselves; removing someone else needs `members.manage`.
- Needs:
any member
- get
/members/{id}/accessWhat a member may do, and why
- Needs:
any member- Query:
itemExplain the access to this item.
- get
/invitesList open invitations
- Needs:
members.manage
- post
/invitesInvite people
One invitation, or up to 200 in `invites`.
- Needs:
members.manage- Body:
{ email, role, scopeId, invites }
- post
/invites/{id}/renewRenew an invitation
- Needs:
members.manage
- delete
/invites/{id}Revoke an invitation
- Needs:
members.manage
- get
/groupsList groups
- Needs:
any member
- post
/groupsCreate a group
- Needs:
members.manage- Body:
{ name, memberIds }
- get
/groups/{id}Get a group
- Needs:
any member
- patch
/groups/{id}Change a group
- Needs:
members.manage- Body:
{ name, memberIds }
- delete
/groups/{id}Delete a group
- Needs:
members.manage
- get
/rolesList roles, built in and custom
- Needs:
any member
- post
/rolesCreate a custom role
- Needs:
roles.manage- Body:
{ name, permissions }
- get
/roles/{id}Get a role
- Needs:
any member
- patch
/roles/{id}Change a custom role
- Needs:
roles.manage- Body:
{ name, permissions }
- delete
/roles/{id}Delete a custom role
- Needs:
roles.manage
- get
/grantsList grants
- Needs:
members.manage
- post
/grantsGive a role, on everything or on a place
- Needs:
members.manage- Body:
{ subject, roleId, scopeId }
- delete
/grants/{id}Take a grant back
- Needs:
members.manage
- get
/auditThe audit log, newest first
- Needs:
audit.read- Query:
actorA member or service account id.actionAn action, or a prefix ending in `*`.targetA target id.fromFrom this ISO time.toUp to this ISO time.cursorThe `next_cursor` of the page before.limit1 to 1000.format`csv` or `jsonl` to download up to 1000 events.
Files
- get
/photosList photos
- Needs:
items.read- Query:
cursorThe `next_cursor` of the page before.limit1 to 200, 50 by default.updated_sinceOnly what changed since this ISO 8601 time.deleted`false` (default), `true` to include the bin, `only` for the bin alone.item_idOnly the ones about this item.
- get
/photos/{id}Get a photo
Answers with an `ETag`.
- Needs:
items.read
- patch
/photos/{id}Change a photo
Only the fields given change. With `If-Match`, fails with 412 when it changed since.
- Needs:
the edit permission of what is written- Body:
Photo
- delete
/photos/{id}Delete a photo
Puts it in the bin.
- Needs:
the edit permission of what is written
- post
/photosUpload a photo
Multipart. Send the SHA-256 of the file in `x-sha256`; the upload fails when it does not match.
- Needs:
items.edit- Body:
multipart: file, itemId, proof- Upload, 60 a minute
- get
/photos/{id}/fileDownload a photo
- Needs:
items.read- Query:
size`thumb` for the thumbnail.
- get
/documentsList documents
- Needs:
documents.read- Query:
cursorThe `next_cursor` of the page before.limit1 to 200, 50 by default.updated_sinceOnly what changed since this ISO 8601 time.deleted`false` (default), `true` to include the bin, `only` for the bin alone.item_idOnly the ones about this item.
- get
/documents/{id}Get a document
Answers with an `ETag`.
- Needs:
documents.read
- patch
/documents/{id}Change a document
Only the fields given change. With `If-Match`, fails with 412 when it changed since.
- Needs:
the edit permission of what is written- Body:
Document
- delete
/documents/{id}Delete a document
Puts it in the bin.
- Needs:
the edit permission of what is written
- post
/documentsUpload a document
Multipart. Send the SHA-256 of the file in `x-sha256`; the upload fails when it does not match.
- Needs:
documents.edit- Body:
multipart: file, itemId, kind, title, expiresOn- Upload, 60 a minute
- get
/documents/{id}/fileDownload a document
- Needs:
documents.read
Life
- get
/status-changesList status changes
- Needs:
items.read- Query:
cursorThe `next_cursor` of the page before.limit1 to 200, 50 by default.updated_sinceOnly what changed since this ISO 8601 time.deleted`false` (default), `true` to include the bin, `only` for the bin alone.item_idOnly the ones about this item.
- post
/status-changesCreate a status change
Requires `itemId`, `status`. An `id` may be given.
- Needs:
the edit permission of what is written- Body:
StatusChange
- get
/status-changes/{id}Get a status change
Answers with an `ETag`.
- Needs:
items.read
- patch
/status-changes/{id}Change a status change
Only the fields given change. With `If-Match`, fails with 412 when it changed since.
- Needs:
the edit permission of what is written- Body:
StatusChange
- delete
/status-changes/{id}Delete a status change
Puts it in the bin.
- Needs:
the edit permission of what is written
- get
/loansWhat is lent, and to whom
- Needs:
items.read
- get
/usesList uses
- Needs:
items.read- Query:
cursorThe `next_cursor` of the page before.limit1 to 200, 50 by default.updated_sinceOnly what changed since this ISO 8601 time.deleted`false` (default), `true` to include the bin, `only` for the bin alone.item_idOnly the ones about this item.
- post
/usesCreate a use
Requires `itemId`. An `id` may be given.
- Needs:
the edit permission of what is written- Body:
Use
- get
/uses/{id}Get a use
Answers with an `ETag`.
- Needs:
items.read
- patch
/uses/{id}Change a use
Only the fields given change. With `If-Match`, fails with 412 when it changed since.
- Needs:
the edit permission of what is written- Body:
Use
- delete
/uses/{id}Delete a use
Puts it in the bin.
- Needs:
the edit permission of what is written
- get
/care-tasksList caretasks
- Needs:
items.read- Query:
cursorThe `next_cursor` of the page before.limit1 to 200, 50 by default.updated_sinceOnly what changed since this ISO 8601 time.deleted`false` (default), `true` to include the bin, `only` for the bin alone.item_idOnly the ones about this item.
- post
/care-tasksCreate a caretask
Requires `itemId`, `name`, `every`. An `id` may be given.
- Needs:
the edit permission of what is written- Body:
CareTask
- get
/care-tasks/{id}Get a caretask
Answers with an `ETag`.
- Needs:
items.read
- patch
/care-tasks/{id}Change a caretask
Only the fields given change. With `If-Match`, fails with 412 when it changed since.
- Needs:
the edit permission of what is written- Body:
CareTask
- delete
/care-tasks/{id}Delete a caretask
Puts it in the bin.
- Needs:
the edit permission of what is written
- get
/care-recordsList carerecords
- Needs:
items.read- Query:
cursorThe `next_cursor` of the page before.limit1 to 200, 50 by default.updated_sinceOnly what changed since this ISO 8601 time.deleted`false` (default), `true` to include the bin, `only` for the bin alone.item_idOnly the ones about this item.
- post
/care-recordsCreate a carerecord
Requires `taskId`, `itemId`. An `id` may be given.
- Needs:
the edit permission of what is written- Body:
CareRecord
- get
/care-records/{id}Get a carerecord
Answers with an `ETag`.
- Needs:
items.read
- patch
/care-records/{id}Change a carerecord
Only the fields given change. With `If-Match`, fails with 412 when it changed since.
- Needs:
the edit permission of what is written- Body:
CareRecord
- delete
/care-records/{id}Delete a carerecord
Puts it in the bin.
- Needs:
the edit permission of what is written
- get
/reviewsList reviews
- Needs:
items.read- Query:
cursorThe `next_cursor` of the page before.limit1 to 200, 50 by default.updated_sinceOnly what changed since this ISO 8601 time.deleted`false` (default), `true` to include the bin, `only` for the bin alone.item_idOnly the ones about this item.
- post
/reviewsCreate a review
Requires `zoneId`. An `id` may be given.
- Needs:
the edit permission of what is written- Body:
Review
- get
/reviews/{id}Get a review
Answers with an `ETag`.
- Needs:
items.read
- patch
/reviews/{id}Change a review
Only the fields given change. With `If-Match`, fails with 412 when it changed since.
- Needs:
the edit permission of what is written- Body:
Review
- delete
/reviews/{id}Delete a review
Puts it in the bin.
- Needs:
the edit permission of what is written
- get
/remindersWhat is due: loans, documents, reviews, swaps
- Needs:
items.read
- get
/conflictsList conflicts
- Needs:
items.read- Query:
cursorThe `next_cursor` of the page before.limit1 to 200, 50 by default.updated_sinceOnly what changed since this ISO 8601 time.deleted`false` (default), `true` to include the bin, `only` for the bin alone.item_idOnly the ones about this item.
- get
/conflicts/{id}Get a conflict
Answers with an `ETag`.
- Needs:
items.read
- post
/conflicts/{id}/resolveResolve a conflict
- Needs:
the edit permission of what is written- Body:
{ keep }
Labels
- get
/labelsList labels
- Needs:
items.read- Query:
cursorThe `next_cursor` of the page before.limit1 to 200, 50 by default.updated_sinceOnly what changed since this ISO 8601 time.deleted`false` (default), `true` to include the bin, `only` for the bin alone.item_idOnly the ones about this item.
- patch
/labels/{id}Change a label
Only the fields given change. With `If-Match`, fails with 412 when it changed since.
- Needs:
the edit permission of what is written- Body:
Label
- post
/labelsPrint a batch of blank labels
- Needs:
labels.print- Body:
{ count }
- get
/labels/{id}Get a label by its code
- Needs:
items.read
- get
/labels/resolveWhat a scan points to
- Needs:
items.read- Query:
scanA code, or the URL a label carries.
- get
/barcodes/{code}Things carrying a barcode
- Needs:
items.read
Insurance
- get
/policiesList policys
- Needs:
values.read- Query:
cursorThe `next_cursor` of the page before.limit1 to 200, 50 by default.updated_sinceOnly what changed since this ISO 8601 time.deleted`false` (default), `true` to include the bin, `only` for the bin alone.item_idOnly the ones about this item.
- post
/policiesCreate a policy
Requires `placeId`. An `id` may be given.
- Needs:
the edit permission of what is written- Body:
Policy
- get
/policies/{id}Get a policy
Answers with an `ETag`.
- Needs:
values.read
- patch
/policies/{id}Change a policy
Only the fields given change. With `If-Match`, fails with 412 when it changed since.
- Needs:
the edit permission of what is written- Body:
Policy
- delete
/policies/{id}Delete a policy
Puts it in the bin.
- Needs:
the edit permission of what is written
- get
/policies/{id}/coverageIs the place underinsured?
- Needs:
values.read
- post
/claim-packsMake a claim pack
A ZIP with a PDF report, the list as CSV and every photo and document of the things.
- Needs:
export.run- Body:
{ scopeId, locale }
Campaigns
- post
/campaigns/{id}/statementsMake a statement
The PDF the app makes: an estate's statement for one heir (`personId`) or for the notary (`personId` null), once the estate is closed; or a split's statement for all its parties, once the split is open.
- Needs:
campaigns.manage- Body:
{ personId, locale }
Found
- get
/foundConversations with finders
- Needs:
items.read
- get
/found/{id}Get a conversation
- Needs:
items.read
- post
/found/{id}/replyAnswer the finder
- Needs:
lostfound.answer- Body:
{ text }
- post
/found/{id}/meetingAccept or decline the finder's proposal to meet
- Needs:
lostfound.answer- Body:
{ accept, slot }
- post
/found/{id}/readMark as read
- Needs:
items.read
- post
/found/{id}/closeClose a conversation
- Needs:
lostfound.answer- Body:
{ rewardGiven }
- post
/found/{id}/reopenReopen a conversation
- Needs:
lostfound.answer
Exports
- get
/exportsList my exports
- Needs:
export.run
- post
/exportsStart an export, whole or partial
- Needs:
export.run- Body:
{ roots, photosOnly }
- get
/exports/{id}Get an export
- Needs:
export.run
- get
/exports/{id}/fileDownload an export
- Needs:
export.run
Access
- get
/tokensList my personal tokens
- Needs:
any member
- post
/tokensMake a personal token
The secret is in this answer only. Its permissions are picked from yours; without them it may do all you may.
- Needs:
any member- Body:
{ name, permissions, expiresInDays }
- delete
/tokens/{id}Revoke a personal token
- Needs:
any member
- post
/tokens/{id}/rotateReplace a token's secret
- Needs:
any member
- get
/service-accountsList service accounts
- Needs:
api.manage
- post
/service-accountsCreate a service account
- Needs:
api.manage- Body:
{ name, roleId, scopeId }
- get
/service-accounts/{id}Get a service account
- Needs:
api.manage
- patch
/service-accounts/{id}Rename or disable a service account
- Needs:
api.manage- Body:
{ name, disabled }
- delete
/service-accounts/{id}Delete a service account, its keys and grants
- Needs:
api.manage
- post
/service-accounts/{id}/keysMake a key
- Needs:
api.manage- Body:
{ name, expiresInDays }
- delete
/service-accounts/{id}/keys/{keyId}Revoke a key
- Needs:
api.manage
- post
/service-accounts/{id}/keys/{keyId}/rotateReplace a key's secret
- Needs:
api.manage
Webhooks
- get
/webhooksList webhooks
- Needs:
api.manage
- post
/webhooksAdd a webhook
Organisations only, at most 10. The URL must use https and resolve to public addresses. Each POST carries `Inventaire-Event`, `Inventaire-Delivery` and `Inventaire-Signature: t=<unix>,v1=<hex>`, an HMAC-SHA256 of `<t>.<body>` with the secret. A non-2xx answer is retried after 1, 5 and 15 minutes, 1, 3 and 6 hours, then every 6 hours for 24 hours; a webhook failing for 3 days is turned off.
- Needs:
api.manage- Body:
{ url, events, serviceAccountId }
- get
/webhooks/{id}Get a webhook
- Needs:
api.manage
- patch
/webhooks/{id}Change a webhook or turn it on or off
- Needs:
api.manage- Body:
{ url, events, serviceAccountId, state }
- delete
/webhooks/{id}Delete a webhook and its delivery log
- Needs:
api.manage
- post
/webhooks/{id}/rotateReplace the signing secret
The previous secret keeps signing for 24 hours: the header carries one `v1` per live secret.
- Needs:
api.manage
- post
/webhooks/{id}/testSend a test event
- Needs:
api.manage
- get
/webhooks/{id}/deliveriesList the last deliveries
- Needs:
api.manage- Query:
limit1 to 200, 50 by default.
- post
/webhooks/{id}/deliveries/{deliveryId}/redeliverSend a delivery again
- Needs:
api.manage