List accounts

GET /api/accounts

Returns a list of accounts, paginated according to the pagination parameters. Only available to Garmat administrators.

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]

      Accounts data

      Hide data attributes Show data attributes object
      • booths number

        Number of booths in the system associated to the account

      • Number of facilities in the system associated to the account

      • id string

        ID of the account in the system

      • name string

        Name of the account

      • status string

        Whether the account is active or has been deactivated

      • type string

        Account type

      • users number

        Number of users in the system associated to the account

    • 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 accounts matching the query

  • Unauthorized

    Hide response attribute Show response attribute object
    • error string

      Human readable version of the error status code

GET /api/accounts
curl \
 -X GET http://localhost:4000/api/accounts
Response examples (200)
{
  "data": [
    {
      "name": "Test Account",
      "type": "customer",
      "users": 5,
      "booths": 2,
      "status": "active"
    }
  ],
  "page": 1,
  "limit": 1,
  "pages": 20,
  "total": 20
}
Response examples (200)
{
  "data": [
    {
      "name": "Test Account",
      "type": "customer",
      "users": 5,
      "booths": 2,
      "status": "active"
    }
  ],
  "page": 1,
  "limit": 1,
  "pages": 20,
  "total": 20
}
Response examples (401)
{
  "error": "Error Reason"
}
Response examples (401)
{
  "error": "Error Reason"
}