Add
Add tags to a transport. Each tag can be referenced either by its pk (an existing tag)
or by its name. When a tag is referenced by name and no tag with that name exists yet,
it is created on the fly (get-or-create), in the same way as the POST/PATCH /transports/
endpoints. The optional color, tag_group_id and tag_group_name fields are only used
when creating a new tag.
This endpoint is idempotent - adding a tag that is already assigned will succeed silently.
If a tag being added belongs to a tag group, and the transport already has another tag from the same group, the old tag will be replaced by the new one (only one tag per group allowed).
Authentication is token based. You can issue a token for your API request from the 'API' section of the settings menu. The token MUST be sent in a Authorization header with each request.
Example of authenticated request
$ curl -X GET -H "Authorization: Token <your token>" "https://api.dashdoc.eu/api/v4/"
The unique identifier of the transport
List of tags to add to the transport. Each item references a tag either by its pk (an existing tag) or by its name. When a tag is referenced by name and no tag with that name exists yet, it is created on the fly (get-or-create). The optional color, tag_group_id and tag_group_name fields are only used when creating a new tag; they are ignored when the tag is matched by pk or by an already existing name.
Tags added successfully. Returns the updated list of tags on the transport.
The unique identifier of the tag
1The name of the tag
UrgentThe color of the tag in hex format
#E5291DThe ID of the tag group this tag belongs to, if any
Invalid request. For example, one or more tag PKs do not exist or do not belong to your company (invalid_tag_pks), a referenced tag group id does not belong to your company (tag_group_not_found), or several tags in the payload belong to the same tag group (only_one_tag_per_group_allowed).
Transport not found or not accessible
Last updated
Was this helpful?