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

Add locations to a folder

This API adds specified locations to a folder. If the folder does not exist, it will be created automatically.

Behavior:

  • If locationIds are provided, the locations will be added to the folder.
  • If locationIds is omitted or empty, only the folder will be created.
Requires an API key. Send it as Authorization: API <your-key> — see Getting started.

Parameters

Body

NameTypeRequiredDescription
inputobjectoptional
input.namestringrequiredName of the folder to add locations to
input.locationIdsarray of stringoptionalArray of location IDs to add to the folder

Request

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

Responses

StatusDescription
200Successfully added locations to folder
Example response (generated from the schema)
{
  "data": {
    "addLocationsToFolder": {
      "errors": "string",
      "folder": {
        "accountId": 10072,
        "archived": false,
        "id": "0e4cc56e-45f8-4058-a713-ead264fa9318",
        "name": "acme",
        "root": false
      }
    }
  }
}

Response body

NameTypeRequiredDescription
dataobjectoptional
data.addLocationsToFolderobjectoptional
data.addLocationsToFolder.errorsobjectoptionalArray of errors if any occurred
data.addLocationsToFolder.folderobjectoptional
data.addLocationsToFolder.folder.accountIdintegeroptional
data.addLocationsToFolder.folder.archivedbooleanoptional
data.addLocationsToFolder.folder.idstringoptional
data.addLocationsToFolder.folder.namestringoptional
data.addLocationsToFolder.folder.rootbooleanoptional