Skip to content

Removes the current user from a region. Returns 403 if not logged in, 400 if the region does not exist, 409 if the user is still an active store manager in the region, or 200 if the user was removed from the region or was not a member of that region. That means that after a 200 result the user will definitely not be a member of that region anymore.

POST
/api/region/{regionId}/leave

Authorizations

api_key
Type: API Key (header: X-CSRF-Token)

Parameters

Path Parameters

regionId*

which region or group to leave

Typeinteger
Required

Responses

Success
Authorization
api_key
Variables
Key
Value
regionId*
cURL
curl -X POST \
'http://localhost/api/region/{regionId}/leave'

Samples

cURL
curl -X POST http://localhost/api/region/{regionId}/leave
JavaScript
fetch("http://localhost/api/region/{regionId}/leave", { method: "POST" })
  .then(response => response.json())
  .then(data => console.log(data));
PHP
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://localhost/api/region/{regionId}/leave");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Python
import requests
response = requests.post("http://localhost/api/region/{regionId}/leave")
print(response.json())