API v1
v1
View as Markdown

List the provenance of a possession

GET /api/v1/vaults/{vault}/possessions/{possession}/provenance

List every provenance event of a possession, oldest first.

Events with an unknown date come last. On the same date, the earliest recorded comes first. The list is whole rather than paginated.

This endpoint also answers QUERY, with the same parameters sent in the request body. How QUERY works.

Path parameters

Sent as JSON. Anything not listed here is ignored.

vault string Required

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.

possession uuid Required

The id of the possession. A possession of another vault or of another account answers 404.

Returns

Every provenance event object of the possession, or an empty list. A vault or a possession of another account answers 404.

data array

Every one of the possession provenance events, whole rather than a page at a time.

data[] object

One possession provenance event.

data[].type string

Always possession_provenance_event. It names the kind of record, so a caller holding several kinds can tell them apart without looking at where they came from.

data[].id string

The id of this record, as a string even when it reads as a number. It is what every endpoint naming this record takes.

data[].attributes object

Everything the record holds.

data[].attributes.type string

What happened: origin, acquisition, inheritance, gift, sale, custody, loss, recovery, authentication, exhibition, publication or other.

data[].attributes.group string

The group the type belongs to: ownership, custody or authenticity.

data[].attributes.title string

What happened in a few words, or null, in which case the application shows the name of the type.

data[].attributes.date_precision string

How much of the date is known: day, month, year, circa or unknown.

data[].attributes.occurred_on string

When it happened, in the shape its precision gives: 1980-01-20 for a day, 1980-01 for a month, 1980 for a year or around a year, null when unknown.

data[].attributes.from string

Who it came from, as text, or null.

data[].attributes.to string

Who held it afterwards, as text, or null.

data[].attributes.location string

Where it happened, as text, or null.

data[].attributes.description string

What happened and how it is known, or null.

data[].attributes.reference_number string

The reference of the record (a lot, a deed, a certificate), or null.

data[].attributes.source_url string

Where the event can be checked, or null.

data[].attributes.is_verified boolean

Whether a document, a record or an expert confirms the event.

data[].attributes.transaction_id uuid

The id of the transaction of the same possession that records what the moment cost, or null. An event holds no money of its own.

data[].attributes.created_at timestamp

When the event was recorded, as a count of seconds since 1970.

data[].links object

Where to find this record.

data[].links.self string

The absolute address this record is read from.

data[].links.web string

The Provenance section of the possession in the application, which opens for somebody signed in rather than for a key. It is the link to give a person.

Rate limit

Sixty requests per minute, per user, shared by every key and device. Every answer carries the budget left in X-RateLimit-Remaining.

GET
curl https://my.monicahq.com/api/v1/vaults/schrute-farms/possessions/5e1b7c93-4a28-4d6f-9b02-7c3e8a1f4d60/provenance \
-H "Authorization: Bearer $MONICA_TOKEN"
const response = await fetch('https://my.monicahq.com/api/v1/vaults/schrute-farms/possessions/5e1b7c93-4a28-4d6f-9b02-7c3e8a1f4d60/provenance', {
headers: { Authorization: `Bearer ${token}` },
})
const data = await response.json()
$response = Http::withToken($token)->get('https://my.monicahq.com/api/v1/vaults/schrute-farms/possessions/5e1b7c93-4a28-4d6f-9b02-7c3e8a1f4d60/provenance');
Response 200
{
"data": [
{
"type": "possession_provenance_event",
"id": "8a3f2d15-6c94-4e70-b1d8-3f5a9c2e7b41",
"attributes": {
"type": "origin",
"group": "ownership",
"title": "Built by Grandfather Schrute",
"date_precision": "circa",
"occurred_on": "1921",
"from": null,
"to": "Dwight Schrute Sr.",
"location": "Honesdale",
"description": "Mose remembers the cart it came on. No record has been found.",
"reference_number": null,
"source_url": null,
"is_verified": false,
"transaction_id": null,
"created_at": 1773446400
},
"links": {
"self": "https://my.monicahq.com/api/v1/vaults/schrute-farms/possessions/5e1b7c93-4a28-4d6f-9b02-7c3e8a1f4d60/provenance/8a3f2d15-6c94-4e70-b1d8-3f5a9c2e7b41",
"web": "https://my.monicahq.com/vaults/schrute-farms/possessions/5e1b7c93-4a28-4d6f-9b02-7c3e8a1f4d60/provenance"
}
},
{
"type": "possession_provenance_event",
"id": "c47e9b20-1d53-4a8f-9e6c-2b8d5f1a3e97",
"attributes": {
"type": "gift",
"group": "ownership",
"title": "Given to Dwight for his tenth birthday",
"date_precision": "day",
"occurred_on": "1980-01-20",
"from": "Dwight Schrute Sr.",
"to": "Dwight Schrute",
"location": "Schrute Farms",
"description": null,
"reference_number": "Family ledger, page 12",
"source_url": null,
"is_verified": true,
"transaction_id": "2f6d8a41-9b37-4c05-a7e2-5d1c3b9f8e64",
"created_at": 1773450000
},
"links": {
"self": "https://my.monicahq.com/api/v1/vaults/schrute-farms/possessions/5e1b7c93-4a28-4d6f-9b02-7c3e8a1f4d60/provenance/c47e9b20-1d53-4a8f-9e6c-2b8d5f1a3e97",
"web": "https://my.monicahq.com/vaults/schrute-farms/possessions/5e1b7c93-4a28-4d6f-9b02-7c3e8a1f4d60/provenance"
}
}
]
}

Keys act as you, with exactly the access you have. Make one per integration so you can revoke it alone.