curl --request PATCH \
--url https://api.mercemur.com/api/v1/retail-locations/{locationId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"slug": "<string>",
"name": "<string>",
"address_line_1": "<string>",
"address_line_2": "<string>",
"city": "<string>",
"region": "<string>",
"postal_code": "<string>",
"country_code": "<string>",
"phone": "<string>",
"email": "<string>",
"website_url": "<string>",
"hours": {},
"custom_fields": {},
"tags": [
"<string>"
],
"is_active": true,
"position": 123
}
'const options = {
method: 'PATCH',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
slug: '<string>',
name: '<string>',
address_line_1: '<string>',
address_line_2: '<string>',
city: '<string>',
region: '<string>',
postal_code: '<string>',
country_code: '<string>',
phone: '<string>',
email: '<string>',
website_url: '<string>',
hours: {},
custom_fields: {},
tags: ['<string>'],
is_active: true,
position: 123
})
};
fetch('https://api.mercemur.com/api/v1/retail-locations/{locationId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.mercemur.com/api/v1/retail-locations/{locationId}"
payload = {
"slug": "<string>",
"name": "<string>",
"address_line_1": "<string>",
"address_line_2": "<string>",
"city": "<string>",
"region": "<string>",
"postal_code": "<string>",
"country_code": "<string>",
"phone": "<string>",
"email": "<string>",
"website_url": "<string>",
"hours": {},
"custom_fields": {},
"tags": ["<string>"],
"is_active": True,
"position": 123
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mercemur.com/api/v1/retail-locations/{locationId}"
payload := strings.NewReader("{\n \"slug\": \"<string>\",\n \"name\": \"<string>\",\n \"address_line_1\": \"<string>\",\n \"address_line_2\": \"<string>\",\n \"city\": \"<string>\",\n \"region\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"country_code\": \"<string>\",\n \"phone\": \"<string>\",\n \"email\": \"<string>\",\n \"website_url\": \"<string>\",\n \"hours\": {},\n \"custom_fields\": {},\n \"tags\": [\n \"<string>\"\n ],\n \"is_active\": true,\n \"position\": 123\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mercemur.com/api/v1/retail-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([
'slug' => '<string>',
'name' => '<string>',
'address_line_1' => '<string>',
'address_line_2' => '<string>',
'city' => '<string>',
'region' => '<string>',
'postal_code' => '<string>',
'country_code' => '<string>',
'phone' => '<string>',
'email' => '<string>',
'website_url' => '<string>',
'hours' => [
],
'custom_fields' => [
],
'tags' => [
'<string>'
],
'is_active' => true,
'position' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"address_line_1": "<string>",
"address_line_2": "<string>",
"city": "<string>",
"country_code": "<string>",
"created_at": "<string>",
"custom_fields": {
"parking": "<string>"
},
"email": "<string>",
"hours": {
"monday": "<string>",
"sunday": "<string>"
},
"id": "<string>",
"is_active": true,
"name": "<string>",
"phone": "<string>",
"position": 123,
"postal_code": "<string>",
"region": "<string>",
"slug": "<string>",
"tags": [
"<string>"
],
"updated_at": "<string>",
"website_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>"
}
}Correct a retail location
curl --request PATCH \
--url https://api.mercemur.com/api/v1/retail-locations/{locationId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"slug": "<string>",
"name": "<string>",
"address_line_1": "<string>",
"address_line_2": "<string>",
"city": "<string>",
"region": "<string>",
"postal_code": "<string>",
"country_code": "<string>",
"phone": "<string>",
"email": "<string>",
"website_url": "<string>",
"hours": {},
"custom_fields": {},
"tags": [
"<string>"
],
"is_active": true,
"position": 123
}
'const options = {
method: 'PATCH',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
slug: '<string>',
name: '<string>',
address_line_1: '<string>',
address_line_2: '<string>',
city: '<string>',
region: '<string>',
postal_code: '<string>',
country_code: '<string>',
phone: '<string>',
email: '<string>',
website_url: '<string>',
hours: {},
custom_fields: {},
tags: ['<string>'],
is_active: true,
position: 123
})
};
fetch('https://api.mercemur.com/api/v1/retail-locations/{locationId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.mercemur.com/api/v1/retail-locations/{locationId}"
payload = {
"slug": "<string>",
"name": "<string>",
"address_line_1": "<string>",
"address_line_2": "<string>",
"city": "<string>",
"region": "<string>",
"postal_code": "<string>",
"country_code": "<string>",
"phone": "<string>",
"email": "<string>",
"website_url": "<string>",
"hours": {},
"custom_fields": {},
"tags": ["<string>"],
"is_active": True,
"position": 123
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mercemur.com/api/v1/retail-locations/{locationId}"
payload := strings.NewReader("{\n \"slug\": \"<string>\",\n \"name\": \"<string>\",\n \"address_line_1\": \"<string>\",\n \"address_line_2\": \"<string>\",\n \"city\": \"<string>\",\n \"region\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"country_code\": \"<string>\",\n \"phone\": \"<string>\",\n \"email\": \"<string>\",\n \"website_url\": \"<string>\",\n \"hours\": {},\n \"custom_fields\": {},\n \"tags\": [\n \"<string>\"\n ],\n \"is_active\": true,\n \"position\": 123\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mercemur.com/api/v1/retail-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([
'slug' => '<string>',
'name' => '<string>',
'address_line_1' => '<string>',
'address_line_2' => '<string>',
'city' => '<string>',
'region' => '<string>',
'postal_code' => '<string>',
'country_code' => '<string>',
'phone' => '<string>',
'email' => '<string>',
'website_url' => '<string>',
'hours' => [
],
'custom_fields' => [
],
'tags' => [
'<string>'
],
'is_active' => true,
'position' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"address_line_1": "<string>",
"address_line_2": "<string>",
"city": "<string>",
"country_code": "<string>",
"created_at": "<string>",
"custom_fields": {
"parking": "<string>"
},
"email": "<string>",
"hours": {
"monday": "<string>",
"sunday": "<string>"
},
"id": "<string>",
"is_active": true,
"name": "<string>",
"phone": "<string>",
"position": 123,
"postal_code": "<string>",
"region": "<string>",
"slug": "<string>",
"tags": [
"<string>"
],
"updated_at": "<string>",
"website_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>"
}
}Authorizations
A secret API key. Publishable keys cannot reach this API. A key may carry an expiry, and an expired key is refused exactly like an unknown one, with a 401 that names no reason; check the key's expires_at in the dashboard rather than inferring it from a response. When a merchant rolls a key's secret they choose a grace window of up to 3 days, and for its duration BOTH the new secret and the one it replaced authenticate, so an integration moves over on its own deploy schedule instead of at the instant the button is pressed. Move before the window closes: after it, the old secret is refused. Nothing else about this contract moves with a roll. The key keeps its id and its scopes, so the only thing an integration updates is the credential itself.
Headers
A unique key per logical write. Replaying a request with the same key returns the first response byte for byte instead of applying the write twice.
Path Parameters
Body
A PATCH, not the dashboard's full replace: an omitted key keeps its stored value. The six nullable fields (address_line_2, region, postal_code, phone, email, website_url) may be set to null to CLEAR them, which is a different claim from an empty string and is rendered differently by every consumer of this feed. A null on any other field is a 400 rather than a silent no-op. hours, custom_fields and tags REPLACE wholesale rather than merging, so a seasonal closure can delete one day rather than only add to it. The address is re-resolved on every patch, so a client changing several fields should send them in one call.
Response
Success
Show child attributes
Show child attributes
