How to merge tags using the API?

💻 Environment/Context

  • API
  • Tags

 

In order for you to merge tags, the Taxonomy & Labels > Can edit permission must be enabled on your account.

If you're unable to follow any of the steps below, kindly reach out to your admin or refer to the Account Type Permissions Overview article for more information.

 

 

❓ Issue/Question

  • How can I merge tags using the ScorePlay API?
  • How do I find the ID of a tag to use it in the API?

 

👌 Resolution/Answer

  • Get your API key
  • Find the ID of each tag
    • Send a GET request to https://media.scoreplay.io/v1/tag/options?query=<tag name> with your API key in the X-ScorePlay-Api-Key header
    • Copy the ID of each tag from the response
  • Merge the tags
    • Send a POST request to https://media.scoreplay.io/v1/tag/options/merge with the same header
    • In the body, add the IDs of the tags to merge in tag_option_ids and the ID of the tag to keep in destination_tag_option_id, for example {"tag_option_ids": [123, 456], “destination_tag_option_id”: 101}
    • A response of true means the merge worked

 

🔖 Notes