POST /businesses/{business}/routes
Serve a hostname from this business. Poll the list until its status is live.
Needs the routes:write scope.
Parameters
business integer, in path, required
The business id, from GET /businesses.
Body
hostname string
For example shop.northwind.coffee
cURL
JavaScript
Python
Copy
curl -X POST "https://helstify.com/api/v1/businesses/60/routes" \
-H "Authorization: Bearer $HELSTIFY_KEY" \
-H "Content-Type: application/json" \
-d '{"hostname":"shop.northwind.coffee"}'
const res = await fetch("https://helstify.com/api/v1/businesses/60/routes", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.HELSTIFY_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"hostname": "shop.northwind.coffee"
}),
});
const data = await res.json();
import os, requests
res = requests.post(
"https://helstify.com/api/v1/businesses/60/routes",
headers={"Authorization": f"Bearer {os.environ['HELSTIFY_KEY']}"},
json={
"hostname": "shop.northwind.coffee"
},
)
print(res.json())
Response 201
{
"route" : {
"hostname" : "shop.northwind.coffee" ,
"status" : "pending" ,
"url" : "https://shop.northwind.coffee" ,
"error" : null ,
"live_since" : null
},
"note" : "Serving is being set up. Poll GET /routes until status is \" live\"."
}