v1

latestOpenAPI 3.0.22026-07-24154101.1 MB
Locations

Create Location

post/v2/company/{company_id}/locations

Path parameters

company_idinteger required

Company ID

Headers

x-api-versionstring

An API version

Example:2022-05-01

7shifts API version

x-company-guidstring uuid

Company GUID

Request body

namestring required

Location name

countrystring required

Country two letter abbreviation

formatted_addressstring

Full address

statestring nullable

State or province

citystring nullable

City

latitudestring

locations latitude coordinates

longitudestring

locations longitude coordinates

place_idstring

Google Places location Id

timezonestring

Timezone. Valid zone info name

holiday_payboolean

When true, holiday pay is enabled

sun_hours_closestring

Sunday closing time

mon_hours_closestring

Monday closing time

tue_hours_closestring

Tuesday closing time

wed_hours_closestring

Wednesday closing time

thu_hours_closestring

Thursday closing time

fri_hours_closestring

Friday closing time

sat_hours_closestring

Saturday closing time

sun_hours_openstring

Sunday opening time

mon_hours_openstring nullable

Monday opening time

tue_hours_openstring nullable

Tuesday opening time

wed_hours_openstring nullable

Wednesday opening time

thu_hours_openstring nullable

Thursday opening time

fri_hours_openstring nullable

Friday opening time

sat_hours_openstring nullable

Saturday opening time

sun_is_closedboolean nullable

If true, location is closed on Sunday

mon_is_closedboolean nullable

If true, location is closed on Monday

tue_is_closedboolean nullable

If true, location is closed on Tuesday

wed_is_closedboolean nullable

If true, location is closed on Wednesday

thu_is_closedboolean nullable

If true, location is closed on Thursday

fri_is_closedboolean nullable

If true, location is closed on Friday

sat_is_closedboolean nullable

If true, location is closed on Saturday

enable_shift_feedbackboolean

If true end of shift feedback requests are enabled

shift_feedbackboolean

If true end of shift feedback requests are enabled

couponstring nullable

Optional coupon to apply to this location's billing

stripe_token_idstring

Optional stripe payment token. If this is not provided, the account's default payment information will be used.

copy_from_idinteger nullable

Optional existing location id whose department and role structure the new location should copy

Example request

{
  "name": "Quackers",
  "country": "CA",
  "formatted_address": "701 Broadway Ave #200, MadeUpCity, SK SVN 1C3, Canada",
  "state": "ON",
  "city": "Toronto",
  "timezone": "America/Chicago",
  "sun_is_closed": true,
  "mon_is_closed": true,
  "tue_is_closed": true,
  "wed_is_closed": true,
  "thu_is_closed": true,
  "fri_is_closed": true,
  "sat_is_closed": true,
  "enable_shift_feedback": true,
  "shift_feedback": true,
  "coupon": "Quakers",
  "stripe_token_id": "tok_1KG8LT2eZvKYlo2CODSv0IXB",
  "copy_from_id": 123
}

Response

Created

object'location' required

Example response

{
  "data": {
    "id": 1234,
    "company_id": 1234,
    "name": "Quackers",
    "country": "CA",
    "state": "ON",
    "city": "Toronto",
    "formatted_address": "200 Bathurst Street, Toronto, ON, Canada",
    "lat": 43.6478436,
    "lng": -79.4043708,
    "place_id": "ChIJUyrhFOc0K4gRyuFq6AUlfmE",
    "timezone": "America/Chicago",
    "timezone_updated": true,
    "auto_send_log_book_time": "03:00",
    "sun_is_closed": true,
    "mon_is_closed": true,
    "tue_is_closed": true,
    "wed_is_closed": true,
    "thu_is_closed": true,
    "fri_is_closed": true,
    "sat_is_closed": true,
    "shift_feedback": true,
    "message": "msg",
    "created": "2020-01-01T12:00:00+00:00",
    "modified": "2020-01-02T12:00:00+00:00"
  }
}