Skip to main content

Create a new business

POST 

https://api.staging.powerapi.com/api/v3/businesses

Create a new business

Request

Bodyrequired

    name stringrequired

    Name of the business

    Example: PowerGym
    street stringrequired

    Street where the business is located

    Example: 12 rue du coquelicot
    city stringrequired

    City where the business is located

    Example: Paris
    country_code country-coderequired

    Country code of the business

    Example: FR
    post_code stringrequired

    Post code of the business

    Example: 75019
    access_group_id stringnullable

    Access group id that the business belongs to

    Example: ffb0fbe2-9127-4e86-bb5c-46d5cb0f5ca1
    auto_accept_booking_limit integernullable

    Max number of guest in a booking that the business can auto accept

    Example: 6
    bio stringnullable

    Business bio

    Example: The best gym in town
    country stringnullable

    Country where the business is located

    Example: France
    currency currency-code

    Currency of the business

    Example: EUR
    email stringnullable

    Email of the business

    Example: power@gym.com
    facebook_url stringnullable

    Facebook page of the business

    Example: https://www.facebook.com/powergym
    latitude doublenullable

    Latitude of the business

    Example: 48.8566
    longitude doublenullable

    Longitude of the business

    Example: 22.3522
    has_reservations booleannullable

    If the business has reservations enabled

    Example: true
    instagram_url stringnullable

    Instagram page of the business

    Example: https://www.instagram.com/powergym
    logo_url stringnullable

    Logo of the business

    Example: https://www.powergym.com/logo.png
    max_reservation_size integernullable

    Max number of guests in a reservation

    Example: 10
    min_time_before_reservation integernullable

    Minimum time before creating a reservation expressed in seconds

    Example: 30
    phone stringnullable

    Phone number of the business

    Possible values: >= 6 characters and <= 19 characters, Value must match regular expression ^\+[0-9]+$

    Example: +1234567890
    state stringnullable

    State in which business is

    Possible values: [draft, waiting_for_approval, rejected, published, hidden]

    Example: draft
    tagline stringnullable

    Tagline of the business

    Example: The best gym in town
    time_of_stay integernullable

    Default duration of reservation in seconds

    Example: 2700
    time_slots integernullable

    Time specifying available hours for booking expressed in seconds

    Example: 10
    timezone stringnullable

    Timezone of the business

    Example: Europe/Paris
    floor_plan_unit_name stringnullable

    Name of the floor plan unit

    Example: Table
    floor_plan_unit_style stringnullable

    Style of the floor plan uni

    Possible values: [Style 1, Style 2]

    Example: Style 1
    website_url stringnullable

    Website of the business

    Example: https://www.powergym.com
    youtube_url stringnullable

    Youtube page of the business

    Example: https://www.youtube.com/powergym
    cover_photo_url stringnullable

    Cover photo of the business

    Example: https://www.powergym.com/cover.png
    photo_urls string[]
    opening_hours objectnullable
    monday string[]required
    tuesday string[]required
    wednesday string[]required
    thursday string[]required
    friday string[]required
    saturday string[]required
    sunday string[]required

Responses

Schema
    id uuidrequired

    Unique ID of the business

    Example: 120c50ab-24ae-48f9-8860-ec0e9adea9ec
    access_group_id stringnullable

    Access group id that the business belongs to

    Example: ffb0fbe2-9127-4e86-bb5c-46d5cb0f5ca1
    auto_accept_booking_limit integernullable

    Max number of guest in a booking that the business can auto accept

    Example: 6
    bio stringnullable

    Business bio

    Example: The best gym in town
    city stringrequired

    City where the business is located

    Example: Paris
    country stringnullable

    Country where the business is located

    Example: France
    country_code country-coderequired

    Country code of the business

    Example: FR
    currency currency-coderequired

    Currency of the business

    Example: EUR
    email stringnullable

    Email of the business

    Example: power@gym.com
    facebook_url stringnullable

    Facebook page of the business

    Example: https://www.facebook.com/powergym
    latitude doublenullable

    Latitude of the business

    Example: 48.8566
    longitude doublenullable

    Longitude of the business

    Example: 22.3522
    has_reservations booleannullable

    If the business has reservations enabled

    Example: true
    instagram_url stringnullable

    Instagram page of the business

    Example: https://www.instagram.com/powergym
    logo_url stringnullable

    Logo of the business

    Example: https://www.powergym.com/logo.png
    max_reservation_size integernullable

    Max number of guests in a reservation

    Example: 10
    min_time_before_reservation integernullable

    Minimum time before creating a reservation expressed in seconds

    Example: 30
    name stringrequired

    Name of the business

    Example: PowerGym
    phone stringnullable

    Phone number of the business

    Possible values: >= 6 characters and <= 19 characters, Value must match regular expression ^\+[0-9]+$

    Example: +1234567890
    post_code stringrequired

    Post code of the business

    Example: 75019
    slug stringnullable

    Slug of the business

    Example: power-gym
    state stringnullable

    State in which business is

    Possible values: [draft, waiting_for_approval, rejected, published, hidden]

    Example: draft
    street stringrequired

    Street where the business is located

    Example: 12 rue du coquelicot
    tagline stringnullable

    Tagline of the business

    Example: The best gym in town
    time_of_stay integernullable

    Default duration of reservation in seconds

    Example: 2700
    time_slots integernullable

    Time specifying available hours for booking expressed in seconds

    Example: 10
    timezone stringnullable

    Timezone of the business

    Example: Europe/Paris
    floor_plan_unit_name stringnullable

    Name of the floor plan unit

    Example: Table
    floor_plan_unit_style stringnullable

    Style of the floor plan uni

    Possible values: [Style 1, Style 2]

    Example: Style 1
    website_url stringnullable

    Website of the business

    Example: https://www.powergym.com
    youtube_url stringnullable

    Youtube page of the business

    Example: https://www.youtube.com/powergym
    cover_photo_url stringnullable

    Cover photo of the business

    Example: https://www.powergym.com/cover.png
    photo_urls string[]required
    opening_hours objectnullable
    monday string[]required
    tuesday string[]required
    wednesday string[]required
    thursday string[]required
    friday string[]required
    saturday string[]required
    sunday string[]required

Authorization: http

name: bearertype: httpscheme: bearerbearerFormat: JWT
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"
]
}
}'
Request Collapse all
Base URL
https://api.staging.powerapi.com
Auth
Body required
{
  "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"
    ]
  }
}
ResponseClear

Click the Send API Request button above and see the response here!