Get facility details

GET /api/facilities/{id}

Allows you to retrieve the details of a facility you have access to, given its ID.

Path parameters

  • id string Required

    The ID of the facility to retrieve

Responses

  • OK

    Hide response attributes Show response attributes object
    • Id of the account the facility belongs to

    • Name of the account the facility belongs to

    • First line of the facility address

    • Second line of the facility address

    • city string

      City where the facility is located

    • The type of climate control the facility has. Can be one of 'both', 'heated_only', 'cooled_only', or 'none'

    • Id of the distributor the facility belongs to

    • Name of the distributor the facility belongs to

    • id string

      ID of the facility in the system

    • name string

      Name of the facility

    • ID of the region the facility belongs to

    • Name of the region the facility belongs to

    • The square footage of the facility

    • state string

      State where the facility is located

    • status string

      Status of the facility.

    • Identifier of the facility

    • type string

      The type of facility. One of auto_body_shop, manufacturing_plant, or auto_dealership

    • tz string

      The timezone of the facility as a IANA TZ identifier string

    • working_hours array[object]

      List of facility schedules for the week

      Hide working_hours attributes Show working_hours attributes object
      • day string

        The day of the week. Should be all lowercase

      • enabled string

        Boolean indicating whether the facility operates on this day of the week

      • start string

        The ISO8601 formatted time when the facility starts operating on this day of the week

      • stop string

        The ISO8601 formatted time when the facility stops operating on this day of the week

    • zipcode string

      Zip code of the facility

  • Unauthorized

    Hide response attribute Show response attribute object
    • error string

      Human readable version of the error status code

  • Not found

    Hide response attribute Show response attribute object
    • error string

      Human readable version of the error status code

GET /api/facilities/{id}
curl \
 -X GET http://localhost:4000/api/facilities/{id}
Response examples (200)
{
  "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"
}
Response examples (200)
{
  "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"
}
Response examples (401)
{
  "error": "Error Reason"
}
Response examples (401)
{
  "error": "Error Reason"
}
Response examples (404)
{
  "error": "Error Reason"
}
Response examples (404)
{
  "error": "Error Reason"
}