List facilities

GET /api/facilities

Allows you to retrieve the paginated list of facilities that you have access to.

Query parameters

  • filter string

    criteria to filter by

  • sort string

    criteria to sort by

  • limit string

    amount of results per page to return

  • page string

    page number

Responses

  • OK

    Hide response attributes Show response attributes object
    • data array[object]

      Facilities data

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

      • First line of the facility address

      • Second line of the facility address

      • booths number

        The number of booths associated to the facility

      • 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 associated to the facility

      • 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

    • limit number

      The number of items per page currently applied

    • page number

      The number of the page returned

    • pages number

      The total number of pages matching the current search

    • total number

      The total number of facilities matching the query

  • Unauthorized

    Hide response attribute Show response attribute object
    • error string

      Human readable version of the error status code

GET /api/facilities
curl \
 -X GET http://localhost:4000/api/facilities
Response examples (200)
{
  "data": [
    {
      "id": "293f191b-f2e6-4dde-bcab-00b10fdb8cf3",
      "name": "Test Facility",
      "booths": 1,
      "status": "active",
      "region_id": "392098bb-ac91-010c-aaa1-9032b19b8cf4",
      "account_id": "293f191b-f2e6-4dde-bcab-00b10fdb8cf4",
      "working_hours": []
    }
  ],
  "page": 1,
  "limit": 1,
  "pages": 20,
  "total": 20
}
Response examples (200)
{
  "data": [
    {
      "id": "293f191b-f2e6-4dde-bcab-00b10fdb8cf3",
      "name": "Test Facility",
      "booths": 1,
      "status": "active",
      "region_id": "392098bb-ac91-010c-aaa1-9032b19b8cf4",
      "account_id": "293f191b-f2e6-4dde-bcab-00b10fdb8cf4",
      "working_hours": []
    }
  ],
  "page": 1,
  "limit": 1,
  "pages": 20,
  "total": 20
}
Response examples (401)
{
  "error": "Error Reason"
}
Response examples (401)
{
  "error": "Error Reason"
}