POSTapi.synup.com/api/v4/locations/folders/remove
Remove locations from a folder
This API removes specified locations from their current folder.
Behavior:
- A location can belong to only one folder at a time.
- Only the locationIds need to be provided, as the system automatically identifies their current folder.
- If a location is removed, it will no longer be associated with any folder unless reassigned.
Requires an API key. Send it as
Authorization: API <your-key> — see Getting started.Parameters
Body
| Name | Type | Required | Description |
|---|---|---|---|
input | object | optional | |
input.locationIds | array of string | required | Array of location IDs to remove from their folders |
Request
Request
curl -X POST 'https://api.synup.com/api/v4/locations/folders/remove' \
-H 'Authorization: API YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"input": {
"locationIds": [
"TG9jYXRpb246MTY4NDY="
]
}
}'const res = await fetch('https://api.synup.com/api/v4/locations/folders/remove', {
method: 'POST',
headers: {
Authorization: 'API YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"input": {
"locationIds": [
"TG9jYXRpb246MTY4NDY="
]
}
}),
});
const data = await res.json();import requests
res = requests.post(
"https://api.synup.com/api/v4/locations/folders/remove",
headers={
"Authorization": "API YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"input": {
"locationIds": [
"TG9jYXRpb246MTY4NDY="
]
}
},
)
data = res.json()req, _ := http.NewRequest("POST", "https://api.synup.com/api/v4/locations/folders/remove", bytes.NewBufferString(payload))
req.Header.Set("Authorization", "API YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)Responses
| Status | Description |
|---|---|
200 | Successful response |
Example response
{
"data": {
"deleteLocationsFromFolder": {
"clientMutationId": null,
"errors": null,
"locations": [
"bG9jYXRpb25zOjE2OTQx"
],
"success": true
}
},
"errors": []
}Response body
| Name | Type | Required | Description |
|---|---|---|---|
data | object | optional | |
data.deleteLocationsFromFolder | object | optional | |
data.deleteLocationsFromFolder.clientMutationId | object | optional | |
data.deleteLocationsFromFolder.errors | object | optional | |
data.deleteLocationsFromFolder.locations | array of string | optional | |
data.deleteLocationsFromFolder.success | boolean | optional |