List Users

The List Users API allows you to fetch a list of users within Zenput.

Below is a sample call and a full description of input parameters, and success and error output formats.

$ curl -H 'X-API-TOKEN: <API_TOKEN>' \
    'https://www.zenput.com/api/v1/users/list_users/?start=0&limit=10'

Input parameters
All input parameters are optional.

Name

Type

Description

group_id

integer

Limit list to users within given group id.

search_query

text

Query to search first name and last name.

start

integer

The index of the first row to return, used with limit, to define a page of results.

limit

integer

The number of users to return, used with start, to define a page of results. The default value is 100.

order_by

One of "first_name", "last_name", "email", "date_redeemed"

Sort order of result. A value may be prefixed by a - to specify a descending sort.

count

boolean

If true, result will include a count of found users without regard to any start or limit values.

Output format, success

{
    "status": 200,
    "count": count-of-users-found,
    "results": [
      {},
      ...
      {}
    ],
    "success": true
}

Output format, failure

{
    "status": 500,
    "message": "Cannot get user list",
    "exception": "Technical error details appear here",
    "success": false
}

API V3 (/api/v3/users)

$ curl -H 'X-API-TOKEN: <API_TOKEN>' \
    'https://www.zenput.com/api/v3/users/?start=0&limit=1'

Input parameters
All input parameters are optional.

Name

Type

Description

email

text

Filter results to given email.

limit

integer

Number of results to return per page.

start

integer

The initial index from which to return the results.

meta_only

boolean

Return only data within the meta key.

Output format (success)

{
  "meta": {
    "status_code": 200,
    "count": 999,
    "next": "https://www.zenput.com/api/v3/users/?limit=1&start=1",
    "previous": null
  },
  "data": [
    {
      "id": 0,
      "username": "[email protected]",
      "first_name": "First name",
      "last_name": "Last name",
      "email": "[email protected]",
      "sms_number": null,
      "user_role": {
        "id": 1,
        "name": "Store Manager"
      },
      "company": {
        "id": 1,
        "name": "Zenput",
        "features": []
      },
      "locale": "en_US",
      "default_team": {
        "id": 1,
        "name": "Team name"
      },
      "groups": [
        {
          "id": 3,
          "name": "Submitter"
        }
      ],
      "date_invited": null,
      "date_redeemed": null,
      "display_name": "First name Last name",
      "time_zone": "America/Mexico_City",
      "teams": [],
      "owned_locations": [
        {
          "id": 1,
          "name": "Location name",
          "address": "5394 Banding Parkway",
          "city": "richmond",
          "state": "VA",
          "zipcode": "86340",
          "is_active": true,
          "user_count": null
        }
      ]
    }
  ]
}