Skip to content

Creates a new store.

POST
/api/region/{regionId}/stores

This method creates a new store. The store will initial contains the provided information.
Additional the platform will prepare the chat channels for team and sprinters.

The calling user is added as first store responsible in the store team.
You can add an initial first post on the store wall for all following members.

After creation the platform informs all members of the related region about the new store.

Authorizations

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

Parameters

Path Parameters

regionId*
Typestring
Required

Request Body

JSON
{
"store": null,
"firstPost": "string"
}

Responses

Created the new store and informed region members provides
JSON
{
"id": 0
}
Authorization
api_key
Variables
Key
Value
regionId*
cURL
curl -X POST \
'http://localhost/api/region/{regionId}/stores' \
 --data '{
  "store": null,
  "firstPost": "string"
}'

Samples

cURL
curl -X POST http://localhost/api/region/{regionId}/stores
JavaScript
fetch("http://localhost/api/region/{regionId}/stores", { 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}/stores");
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}/stores")
print(response.json())