Create a facility
Allows you to create a new facility. Only available to Garmat administrators.
Body
The parameters to create a facility
-
id of the account to associate the facility to
-
address_line_1 string
First line of the facility address
-
address_line_2 string
Second line of the facility address
-
city string
City where the facility is located
-
climate_control string
The type of climate control the facility has. Can be one of 'both', 'heated_only', 'cooled_only', or 'none'
-
distributor_id string
id of the distributor associated to the facility
-
name of the facility to create
-
region_id string
ID of the region the facility belongs to
-
square_ft number
The square footage of the facility
-
state string
State where the facility is located
-
status string
status of the facility to create.
-
store_number string
Identifier of the facility
-
type string
The type of facility. One of auto_body_shop, manufacturing_plant, or auto_dealership
-
The timezone of the facility as a IANA TZ identifier string
-
working_hours array[object]
List of facility schedules for the week
-
zipcode string
Zip code of the facility
curl \
-X POST http://localhost:4000/api/facilities \
-d '{"tz":"America/Denver","city":"Boulder","name":"Test Facility","type":"auto_body_shop","state":"CO","status":"active","zipcode":"12345","region_id":"392098bb-ac91-010c-aaa1-9032b19b8cf4","square_ft":12000.0,"account_id":"f260f115-f2e6-4dde-bcab-98b10fdb8cf6","store_number":"Test Facility 01","working_hours":[{"day":"monday","stop":"17:00:00","start":"09:00:00","enabled":true},{"day":"sunday","enabled":false}],"address_line_1":"Test Road 123","address_line_2":"Suite 1000","distributor_id":"e260f115-f2e6-4dde-bcab-98b10fdb8ce6","climate_control":"both"}'
{
"tz": "America/Denver",
"city": "Boulder",
"name": "Test Facility",
"type": "auto_body_shop",
"state": "CO",
"status": "active",
"zipcode": "12345",
"region_id": "392098bb-ac91-010c-aaa1-9032b19b8cf4",
"square_ft": 12000.0,
"account_id": "f260f115-f2e6-4dde-bcab-98b10fdb8cf6",
"store_number": "Test Facility 01",
"working_hours": [
{
"day": "monday",
"stop": "17:00:00",
"start": "09:00:00",
"enabled": true
},
{
"day": "sunday",
"enabled": false
}
],
"address_line_1": "Test Road 123",
"address_line_2": "Suite 1000",
"distributor_id": "e260f115-f2e6-4dde-bcab-98b10fdb8ce6",
"climate_control": "both"
}
{
"id": "293f191b-f2e6-4dde-bcab-00b10fdb8cf3",
"tz": "America/Denver",
"city": "Boulder",
"name": "Test Facility",
"type": "auto_body_shop",
"state": "CO",
"status": "active",
"zipcode": "12345",
"region_id": "392098bb-ac91-010c-aaa1-9032b19b8cf4",
"square_ft": 12000.0,
"account_id": "293f191b-f2e6-4dde-bcab-00b10fdb8cf4",
"region_name": "Test Region",
"account_name": "New account",
"store_number": "Test Facility 01",
"working_hours": [
{
"day": "monday",
"stop": "17:00:00",
"start": "09:00:00",
"enabled": true
},
{
"day": "sunday",
"enabled": false
}
],
"address_line_1": "Test Road 123",
"address_line_2": "Suite 1000",
"distributor_id": "753f191b-f2e6-4dde-bcab-00b10fdb8cb0",
"climate_control": "both",
"distributor_name": "New distributor"
}
{
"id": "293f191b-f2e6-4dde-bcab-00b10fdb8cf3",
"tz": "America/Denver",
"city": "Boulder",
"name": "Test Facility",
"type": "auto_body_shop",
"state": "CO",
"status": "active",
"zipcode": "12345",
"region_id": "392098bb-ac91-010c-aaa1-9032b19b8cf4",
"square_ft": 12000.0,
"account_id": "293f191b-f2e6-4dde-bcab-00b10fdb8cf4",
"region_name": "Test Region",
"account_name": "New account",
"store_number": "Test Facility 01",
"working_hours": [
{
"day": "monday",
"stop": "17:00:00",
"start": "09:00:00",
"enabled": true
},
{
"day": "sunday",
"enabled": false
}
],
"address_line_1": "Test Road 123",
"address_line_2": "Suite 1000",
"distributor_id": "753f191b-f2e6-4dde-bcab-00b10fdb8cb0",
"climate_control": "both",
"distributor_name": "New distributor"
}
{
"error": "Error Reason"
}
{
"error": "Error Reason"
}