Skip to content
SynupAPI
Get an API key
POSTapi.synup.com/api/v4/locations/tags

Add location to a tag

This API associates a location with a specified tag. If the tag does not exist, it will be automatically created before the association.

Behavior:

  • Can be used to create new tags and assign existing tags to locations.
  • Each location can have a maximum of 10 tags. Exceeding this limit will result in an error.
Requires an API key. Send it as Authorization: API <your-key> — see Getting started.

Parameters

Body

NameTypeRequiredDescription
inputobjectrequired
input.locationIdstringrequiredUnique identifier of the location
input.tagstringrequiredName of the tag to add the location to

Request

Request
curl -X POST 'https://api.synup.com/api/v4/locations/tags' \
  -H 'Authorization: API YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '""'

Responses

StatusDescription
200Operation result
400Bad request - Invalid location ID or tag name
401Unauthorized - Authentication required
403Forbidden - Insufficient permissions
404Location not found
Example response (generated from the schema)
{
  "data": {
    "addTag": {
      "clientMutationId": "string",
      "errors": [
        {
          "code": "SY10040",
          "message": "string",
          "contextInfo": [
            "string"
          ]
        }
      ],
      "success": true,
      "tag": {
        "id": "00000000-0000-0000-0000-000000000000",
        "name": "string"
      }
    }
  }
}

Response body

NameTypeRequiredDescription
dataobjectoptional
data.addTagobjectoptional
data.addTag.clientMutationIdobjectoptionalOptional client-provided mutation identifier
data.addTag.errorsarray of objectoptionalArray of errors if any occurred
data.addTag.errors[].codestringoptionalError code
data.addTag.errors[].messagestringoptionalHuman-readable error message
data.addTag.errors[].contextInfoarray of stringoptionalAdditional context about the error
data.addTag.successbooleanoptionalIndicates if the operation was successful
data.addTag.tagobjectoptionalDetails of the created/existing tag
data.addTag.tag.idstringoptionalUnique identifier of the tag
data.addTag.tag.namestringoptionalName of the tag