Write the values of a possession
Write what a possession holds for some fields of its type. Only the fields named change.
A value of null or "" removes what the field held. Every value is checked against its field first, and nothing is written unless every one of them fits.
Each value that does not fit answers 422 on values.{field_id}, in the words of its kind: “Write at most 2000 characters in Serial number.”, “Price takes a number.”, “Bought on takes a date written as year, month and day, like 2005-03-24.”, “Insured takes yes or no.”, “Condition takes one of its own choices.” or “Comfort takes a rating from one to five.” A field of another type, or of another account, answers “This field is not a field of the type of this possession.”
The change is written to the account log.
Parameters
Sent as JSON. Anything not listed here is ignored.
The vault the possession is kept in, named either by the readable name it reports as slug or by its id. A vault of another account answers 404.
The id of the possession. A possession of another vault or of another account answers 404.
The values to write, keyed by the field_id of each field. Text takes up to 2,000 characters, a number takes a number, a date is written as 2005-03-24, a boolean takes true or false, a select field takes one of its own choices, and a rating takes an integer from 1 to 5.
Returns
The possession object as it now reads. A vault or a possession of another account answers 404.
The possession.
Always possession. It names the kind of record, so a caller holding several kinds can tell them apart without looking at where they came from.
The id of this record, as a string even when it reads as a number. It is what every endpoint naming this record takes.
Everything the record holds.
What the thing is called, such as World’s Best Boss mug.
Free text about the thing, or null.
A serial number, a licence plate or any other reference written on the thing, or null.
Where the thing stands: owned, ordered, sold, given_away, lost, stolen or thrown_away.
How many of the thing there are, at least 1.
Whether the thing is featured, which places it in the order shown first in the vault.
Its place among the featured possessions of the vault, counting from 1, or null when it is not featured.
The kind of thing it is. It is chosen when the possession is added and never changes.
The id of the possession type.
What the type is called.
The colour of the type, as a hexadecimal value.
The icon of the type, one of the glyphs of the catalogue, or null.
Where the thing is kept now, or null when nobody said.
The id of the location.
What the location is called.
What the thing holds for the fields of its type, in the order of the fields: the groups first, then the standalone fields. A field holding nothing is left out.
One value.
The id of the field, which is the key to send when writing its value.
What the field is called.
What the field holds: text, number, date, boolean, select or rating.
The name of the group the field sits in, or null when it stands alone.
The value, as the kind of the field reads it: a string for text, a date written as 2005-03-24 and a choice, a number for a number, an integer from 1 to 5 for a rating, and true or false for a boolean.
How the thing was acquired, read from its acquisition transaction: the earliest purchase, exchange, gift received or inheritance. Each part is null without one. Change it through the transactions, since none of it can be written here.
The type of the acquisition transaction: purchase, exchange, gift_received or inheritance, or null.
Who it came from, or null when the transaction names nobody.
The counterparty of the acquisition transaction, as text.
The day of the acquisition transaction, written as 2005-03-24, or null.
The id of the acquisition transaction, or null.
What it would cost to replace today, or null.
The amount, a decimal with two digits after the point, such as 12.99.
The currency: usd, eur, gbp, cad, aud, chf, jpy, brl, inr or cny.
What the thing is worth now: its latest valuation, else its declared value, else null. Read from its valuations, so it cannot be written here.
The amount, a decimal with two digits after the point, such as 15.00.
The currency of the amount, in lower case. Nothing is ever converted.
Where the amount comes from: valuation or declared_value.
The tags the thing carries, sorted by name.
One tag.
The id of the tag.
What the tag reads.
The colour of the tag, as a hexadecimal value.
When the possession was added, as a count of seconds since 1970.
When it last changed, as a count of seconds.
Where to find this record.
The absolute address this record is read from.
Rate limit
Sixty requests per minute, per user, shared by every key and device. Every answer carries the budget left in X-RateLimit-Remaining.
Keys act as you, with exactly the access you have. Make one per integration so you can revoke it alone.