Skip to main content
PATCH
/
locations
/
{locationId}
Edit a location
curl --request PATCH \
  --url https://api.qminder.com/locations/{locationId} \
  --header 'Content-Type: application/json' \
  --header 'X-Qminder-API-Version: <x-qminder-api-version>' \
  --header 'X-Qminder-REST-API-Key: <api-key>' \
  --data '
{
  "name": "SF City Hall",
  "latitude": 37.7792792,
  "longitude": -122.4214304
}
'
import requests

url = "https://api.qminder.com/locations/{locationId}"

payload = {
"name": "SF City Hall",
"latitude": 37.7792792,
"longitude": -122.4214304
}
headers = {
"X-Qminder-API-Version": "<x-qminder-api-version>",
"X-Qminder-REST-API-Key": "<api-key>",
"Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PATCH',
headers: {
'X-Qminder-API-Version': '<x-qminder-api-version>',
'X-Qminder-REST-API-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: 'SF City Hall', latitude: 37.7792792, longitude: -122.4214304})
};

fetch('https://api.qminder.com/locations/{locationId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.qminder.com/locations/{locationId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'SF City Hall',
'latitude' => 37.7792792,
'longitude' => -122.4214304
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Qminder-API-Version: <x-qminder-api-version>",
"X-Qminder-REST-API-Key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.qminder.com/locations/{locationId}"

payload := strings.NewReader("{\n \"name\": \"SF City Hall\",\n \"latitude\": 37.7792792,\n \"longitude\": -122.4214304\n}")

req, _ := http.NewRequest("PATCH", url, payload)

req.Header.Add("X-Qminder-API-Version", "<x-qminder-api-version>")
req.Header.Add("X-Qminder-REST-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.patch("https://api.qminder.com/locations/{locationId}")
.header("X-Qminder-API-Version", "<x-qminder-api-version>")
.header("X-Qminder-REST-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"SF City Hall\",\n \"latitude\": 37.7792792,\n \"longitude\": -122.4214304\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.qminder.com/locations/{locationId}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["X-Qminder-API-Version"] = '<x-qminder-api-version>'
request["X-Qminder-REST-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"SF City Hall\",\n \"latitude\": 37.7792792,\n \"longitude\": -122.4214304\n}"

response = http.request(request)
puts response.read_body
{
  "code": "invalid_location_timezone",
  "message": "The provided coordinates would change the location's timezone, which is not allowed"
}
{
"code": "resource_missing",
"message": "Locations with following ids were not found: [12345]"
}

Authorizations

X-Qminder-REST-API-Key
string
header
default:yourbusinessapikey
required

Headers

X-Qminder-API-Version
enum<string>
default:2020-09-01
required

API version. Must be set to 2020-09-01.

Available options:
2020-09-01

Path Parameters

locationId
integer<int64>
default:12345
required

ID of the location to update.

Body

application/json

Location properties to update. All fields are optional — only include the fields you want to change.

name
string

Location name (max 30 characters). Must not be blank if provided.

Maximum string length: 30
latitude
number

Geographical latitude (-90 to 90).

Required range: -90 <= x <= 90
longitude
number

Geographical longitude (-180 to 180).

Required range: -180 <= x <= 180

Response

Location updated successfully