Skip to content
These docs describe Tradr v0.14.0. Running an older release? Check the release notes for what changed.

Replace a position's tag set.

PUT
/api/positions/{id}/tags
curl --request PUT \
--url https://api.tradr.cloud/api/positions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/tags \
--header 'Content-Type: application/json' \
--data '{ "tagIds": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ] }'

Authed. Replaces the position’s entire tag set with the supplied ids (replace-set semantics, not a merge). Duplicate ids collapse to one. Ownership of the position and of every tag is checked before the per-position cap. Tagging is allowed in any status.

id
required
string format: uuid
Media typeapplication/json
object
tagIds
required
Array<string>
Examplegenerated
{
"tagIds": [
"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
]
}

The position’s tags after the replace, ordered by category then name.

Validation error.

The position or one of the tags was not found (or not owned by the user).

TAG_LIMIT_REACHED — the set exceeds the per-position tag cap.