REST Tag Relationship

Create, change or delete tag relationships. Tags are keywords or terms that can be assigned to data records. These tags describe the record and make searching for it easier. In plentymarkets, tags are created and managed centrally. A tag relationship is created when one or several of these tags are linked to a data record in plentymarkets. Tags can be linked to categories, variations, tickets, contacts and task items in boards.

List relationships

Lists all relationships. The results can be filtered.

/rest/tags/relationships

Parameters

Field Type Description
with String Includes the specified tag information in the results. The following parameters are available:
  • availability = The tag availability
  • tag = The tag
More than one parameter should be separated by commas.
tagId Int Filter restricts the list of results to tag relationships with the specified tag ID. The tag ID must be specified.
tagType String Filter restricts the list of results to tag relationships with the specified tag type. The tag type must be specified.
relationshipValue Int Filter restricts the list of results to tag relationships with the specified relationship value. This is the ID of the data record. The relationship value must be specified.

Success 200

Errors 4xx

Code Exception Description
401 League\OAuth2\Server\Exception\AccessDeniedException The resource owner or authorization server denied the request.
401 League\OAuth2\Server\Exception\InvalidRequestException The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the "access token" parameter.

Create a tag relationship

Creates a tag relationship by linking a tag to a data record.

/rest/tags/relationships

Request

Field Type Description
tagId Int The ID of the tag required
tagType String The type of tag. required allowed values are category, ticket, item, board, contact
relationshipValue Int The ID of the data record for which a tag relationship is created required
relationshipUUID5 String The ID of the data record for which a tag relationship is created. For models with uuid5 as primary key optional
null

Success 200

Field Type Description
tagId Int The ID of the tag
tagType String The type of tag.
relationshipValue Int The ID of the data record for which a tag relationship is created
relationshipUUID5 String The ID of the data record for which a tag relationship is created. For models with uuid5 as primary key

Errors 4xx

Code Exception Description
401 League\OAuth2\Server\Exception\AccessDeniedException The resource owner or authorization server denied the request.
401 League\OAuth2\Server\Exception\InvalidRequestException The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the "access token" parameter.

Delete a tag relationship

Deletes a specific tag relationship that matches the specified data.

/rest/tags/relationships/{relationshipValue}/{tagType}/{id}

Success 200

This call does not have a response output.

Errors 4xx

Code Exception Description
401 League\OAuth2\Server\Exception\AccessDeniedException The resource owner or authorization server denied the request.
401 League\OAuth2\Server\Exception\InvalidRequestException The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the "access token" parameter.

Delete a tag relationship

Deletes a specific tag relationship that matches the specified data.

/rest/tags/{id}/relationships/{tagType}/{relationshipUUID}

Success 200

Errors 4xx

Code Exception Description
401 League\OAuth2\Server\Exception\AccessDeniedException The resource owner or authorization server denied the request.
401 League\OAuth2\Server\Exception\InvalidRequestException The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the "access token" parameter.

Is this article helpful?

 

Thank you for your Feedback

you can close this field now!