API v1
v1
View as Markdown

Move a possession condition

PUT /api/v1/possession-conditions/{possessionCondition}/position

Move a possession condition to another place in the order. The others shift to make room.

A position past the end puts the condition last. The change is written to the account log.

Parameters

Sent as JSON. Anything not listed here is ignored.

possessionCondition uuid Required

The id of the possession condition. A condition belonging to somebody else answers 404.

position integer Required

Where it goes, counting from 1.

Returns

The possession condition object at its new place.

data object

The possession condition.

data.type string

Always possession_condition. 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.name string

What the condition reads, such as New or Broken.

data.attributes.colour string

One of the eight vault colours, as a hexadecimal value.

data.attributes.icon string

One of the glyphs of the catalogue, or null when the condition has none.

data.attributes.position integer

Its place in the order the account keeps, from best to worst, counting from 1.

data.attributes.created_at timestamp

When the condition was added, as a count of seconds since 1970.

data.attributes.updated_at timestamp

When it last changed, as a count of seconds, or null.

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 settings screen where the conditions of the account are managed, 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.

PUT
curl https://my.monicahq.com/api/v1/possession-conditions/4c1e7a92-8d35-4f06-b2a9-e3f71c5d8b40/position \
-X PUT \
-H "Authorization: Bearer $MONICA_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"position": 1
}'
const response = await fetch('https://my.monicahq.com/api/v1/possession-conditions/4c1e7a92-8d35-4f06-b2a9-e3f71c5d8b40/position', {
method: 'PUT',
headers: { Authorization: `Bearer ${token}`, 'Content-Type': 'application/json' },
body: JSON.stringify({
position: 1,
}),
})
const data = await response.json()
$response = Http::withToken($token)->put('https://my.monicahq.com/api/v1/possession-conditions/4c1e7a92-8d35-4f06-b2a9-e3f71c5d8b40/position', [
'position' => 1,
]);
Response 200
{
"data": {
"type": "possession_condition",
"id": "4c1e7a92-8d35-4f06-b2a9-e3f71c5d8b40",
"attributes": {
"name": "Mint",
"colour": "#2f7f86",
"icon": "star",
"position": 1,
"created_at": 1761436800,
"updated_at": 1761440400
},
"links": {
"self": "https://my.monicahq.com/api/v1/possession-conditions/4c1e7a92-8d35-4f06-b2a9-e3f71c5d8b40",
"web": "https://my.monicahq.com/settings/account/possession-conditions"
}
}
}

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