Create a new business
POSThttps://api.staging.powerapi.com/api/v3/businesses
Create a new business
Request
- application/json
Bodyrequired
Name of the business
PowerGym
Street where the business is located
12 rue du coquelicot
City where the business is located
Paris
Country code of the business
FR
Post code of the business
75019
Access group id that the business belongs to
ffb0fbe2-9127-4e86-bb5c-46d5cb0f5ca1
Max number of guest in a booking that the business can auto accept
6
Business bio
The best gym in town
Country where the business is located
France
Currency of the business
EUR
Email of the business
power@gym.com
Facebook page of the business
https://www.facebook.com/powergym
Latitude of the business
48.8566
Longitude of the business
22.3522
If the business has reservations enabled
true
Instagram page of the business
https://www.instagram.com/powergym
Logo of the business
https://www.powergym.com/logo.png
Max number of guests in a reservation
10
Minimum time before creating a reservation expressed in seconds
30
Phone number of the business
Possible values: >= 6 characters
and <= 19 characters
, Value must match regular expression ^\+[0-9]+$
+1234567890
State in which business is
Possible values: [draft
, waiting_for_approval
, rejected
, published
, hidden
]
draft
Tagline of the business
The best gym in town
Default duration of reservation in seconds
2700
Time specifying available hours for booking expressed in seconds
10
Timezone of the business
Europe/Paris
Name of the floor plan unit
Table
Style of the floor plan uni
Possible values: [Style 1
, Style 2
]
Style 1
Website of the business
https://www.powergym.com
Youtube page of the business
https://www.youtube.com/powergym
Cover photo of the business
https://www.powergym.com/cover.png
opening_hours objectnullable
Responses
- 201
- 400
- 401
- 403
- 404
- 422
- 500
- application/json
- Schema
- Example (auto)
Schema
Unique ID of the business
120c50ab-24ae-48f9-8860-ec0e9adea9ec
Access group id that the business belongs to
ffb0fbe2-9127-4e86-bb5c-46d5cb0f5ca1
Max number of guest in a booking that the business can auto accept
6
Business bio
The best gym in town
City where the business is located
Paris
Country where the business is located
France
Country code of the business
FR
Currency of the business
EUR
Email of the business
power@gym.com
Facebook page of the business
https://www.facebook.com/powergym
Latitude of the business
48.8566
Longitude of the business
22.3522
If the business has reservations enabled
true
Instagram page of the business
https://www.instagram.com/powergym
Logo of the business
https://www.powergym.com/logo.png
Max number of guests in a reservation
10
Minimum time before creating a reservation expressed in seconds
30
Name of the business
PowerGym
Phone number of the business
Possible values: >= 6 characters
and <= 19 characters
, Value must match regular expression ^\+[0-9]+$
+1234567890
Post code of the business
75019
Slug of the business
power-gym
State in which business is
Possible values: [draft
, waiting_for_approval
, rejected
, published
, hidden
]
draft
Street where the business is located
12 rue du coquelicot
Tagline of the business
The best gym in town
Default duration of reservation in seconds
2700
Time specifying available hours for booking expressed in seconds
10
Timezone of the business
Europe/Paris
Name of the floor plan unit
Table
Style of the floor plan uni
Possible values: [Style 1
, Style 2
]
Style 1
Website of the business
https://www.powergym.com
Youtube page of the business
https://www.youtube.com/powergym
Cover photo of the business
https://www.powergym.com/cover.png
opening_hours objectnullable
{
"id": "120c50ab-24ae-48f9-8860-ec0e9adea9ec",
"access_group_id": "ffb0fbe2-9127-4e86-bb5c-46d5cb0f5ca1",
"auto_accept_booking_limit": 6,
"bio": "The best gym in town",
"city": "Paris",
"country": "France",
"country_code": "FR",
"currency": "EUR",
"email": "power@gym.com",
"facebook_url": "https://www.facebook.com/powergym",
"latitude": 48.8566,
"longitude": 22.3522,
"has_reservations": true,
"instagram_url": "https://www.instagram.com/powergym",
"logo_url": "https://www.powergym.com/logo.png",
"max_reservation_size": 10,
"min_time_before_reservation": 30,
"name": "PowerGym",
"phone": "+1234567890",
"post_code": "75019",
"slug": "power-gym",
"state": "draft",
"street": "12 rue du coquelicot",
"tagline": "The best gym in town",
"time_of_stay": 2700,
"time_slots": 10,
"timezone": "Europe/Paris",
"floor_plan_unit_name": "Table",
"floor_plan_unit_style": "Style 1",
"website_url": "https://www.powergym.com",
"youtube_url": "https://www.youtube.com/powergym",
"cover_photo_url": "https://www.powergym.com/cover.png",
"photo_urls": [
"https://www.powergym.com/photo1.png"
],
"opening_hours": {
"monday": [
"08:00-12:00"
],
"tuesday": [
"08:00-12:00"
],
"wednesday": [
"08:00-12:00"
],
"thursday": [
"08:00-12:00"
],
"friday": [
"08:00-12:00"
],
"saturday": [
"08:00-12:00"
],
"sunday": [
"08:00-12:00"
]
}
}
- application/json
- Schema
- Example (auto)
Schema
HTTP status code
404
Error message
Cannot find item
Error name
Not Found
{
"statusCode": 404,
"message": "Cannot find item",
"error": "Not Found"
}
- application/json
- Schema
- Example (auto)
Schema
HTTP status code
404
Error message
Cannot find item
Error name
Not Found
{
"statusCode": 404,
"message": "Cannot find item",
"error": "Not Found"
}
- application/json
- Schema
- Example (auto)
Schema
HTTP status code
404
Error message
Cannot find item
Error name
Not Found
{
"statusCode": 404,
"message": "Cannot find item",
"error": "Not Found"
}
- application/json
- Schema
- Example (auto)
Schema
HTTP status code
404
Error message
Cannot find item
Error name
Not Found
{
"statusCode": 404,
"message": "Cannot find item",
"error": "Not Found"
}
- application/json
- Schema
- Example (auto)
Schema
HTTP status code
404
Error message
Cannot find item
Where in the request the error occurred
Possible values: [query
, body
, response
, param
]
errors object[]required
{
"statusCode": 404,
"message": "Cannot find item",
"location": "query",
"errors": [
{
"path": "business.id",
"constraints": {
"object_required_property": "Required property"
}
}
]
}
- application/json
- Schema
- Example (auto)
Schema
HTTP status code
404
Error message
Cannot find item
Error name
Not Found
{
"statusCode": 404,
"message": "Cannot find item",
"error": "Not Found"
}
Authorization: http
name: bearertype: httpscheme: bearerbearerFormat: JWT
- curl
- python
- go
- nodejs
- ruby
- java
- powershell
- CURL
curl -L 'https://api.staging.powerapi.com/api/v3/businesses' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"name": "PowerGym",
"street": "12 rue du coquelicot",
"city": "Paris",
"country_code": "FR",
"post_code": "75019",
"access_group_id": "ffb0fbe2-9127-4e86-bb5c-46d5cb0f5ca1",
"auto_accept_booking_limit": 6,
"bio": "The best gym in town",
"country": "France",
"currency": "EUR",
"email": "power@gym.com",
"facebook_url": "https://www.facebook.com/powergym",
"latitude": 48.8566,
"longitude": 22.3522,
"has_reservations": true,
"instagram_url": "https://www.instagram.com/powergym",
"logo_url": "https://www.powergym.com/logo.png",
"max_reservation_size": 10,
"min_time_before_reservation": 30,
"phone": "+1234567890",
"state": "draft",
"tagline": "The best gym in town",
"time_of_stay": 2700,
"time_slots": 10,
"timezone": "Europe/Paris",
"floor_plan_unit_name": "Table",
"floor_plan_unit_style": "Style 1",
"website_url": "https://www.powergym.com",
"youtube_url": "https://www.youtube.com/powergym",
"cover_photo_url": "https://www.powergym.com/cover.png",
"photo_urls": [
"https://www.powergym.com/photo1.png"
],
"opening_hours": {
"monday": [
"08:00-12:00"
],
"tuesday": [
"08:00-12:00"
],
"wednesday": [
"08:00-12:00"
],
"thursday": [
"08:00-12:00"
],
"friday": [
"08:00-12:00"
],
"saturday": [
"08:00-12:00"
],
"sunday": [
"08:00-12:00"
]
}
}'