Replace a position's tag set.
PUT
/api/positions/{id}/tags
const url = 'https://api.tradr.cloud/api/positions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/tags';const options = { method: 'PUT', headers: {'Content-Type': 'application/json'}, body: '{"tagIds":["2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string format: uuid
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
tagIds
required
Array<string>
Examplegenerated
{ "tagIds": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ]}Responses
Section titled “Responses”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.