Skip to content

Members

** Member data **

Attribute Value type Description
uuid str Member UUID
first_name str First name
last_name str Last name
email str email address
phone str phone (incl. countrycode)
initials str Initials
is_admin bool Is the Member admin
jobtypes list[Jobtypes] Jobtypes
custom_data list[CustomData] Custom data
user_type str active/inactive/deleted
image str image url / empty string

** Endpoint: members/ **

GET https://api.smartplanapp.io/v2/accounts/UUID/members/

Returns all members for the specified account (50 at a time).

Limited to 50 objects per page. In the response dataset; 'total_count' will be the total number of available objects. To fetch the next 'page' you can use the url in the 'next' param. Likewise you can use the url in the 'previous' for the previous 50 objects.

Available filters

Use simple GET params for the filters. Chain filters if you want;

  • custom_data (True/False) Should custom data be includeded for the resulting members. Defaults to False. NOTE: Disabled CustomData Fields are not returned.
  • is_admin (True/False) Filter members by admins or not admins.
  • jobtypes (member.UUID) Return only members that match one of the provided jobtypes.
Example response:
response = {
  'total_count': 77,
  'next': "https://api.smartplanapp.io/api/v2/accounts/<UUID>/members/?custom_data=True&limit=50&offset=50",
  'previous': None,
  'results': [
    {'uuid': '1234-1234-1234',
     'first_name': 'John', 
     'last_name': 'Doe', 
     'email': 'test@trysmartplan.com', 
     'phone': '+45 12341234', 
     'initials': 'JD', 
     'is_admin': True, 
     'user_type': 'active', 
     'jobtypes': [
       {'title': 'Chef',
        'uuid': '1234-1234-1234'
       }
     ], 
     'custom_data': [],
     'image': 'https://smartplans3.s3.amazonaws.com/media/user/uuid/filename.jpeg'
    },
    //(49 more...)
  ]
}

Example no 2: Requesting admins that have at least one of two provided jobtypes. Also includes custom data for the admins:

https://api.smartplanapp.io/api/v2/accounts/<UUID>/members/?custom_data=True&jobtypes=2345,2346&is_admin=True

** Endpoint: members/UUID/ **

GET https://api.smartplanapp.io/v2/accounts/UUID/members/UUID/

Returns the data for the specified member

Example response:
response = {
  'results': {
    'uuid': '1234-1234-1234',
    'first_name': 'Gordon', 
    'last_name': 'Ramsey', 
    'email': 'test@trysmartplan.com', 
    'phone': '+45 12341234',    
    'initials': 'GR', 
    'is_admin': True, 
    'user_type': 'active', 
    'jobtypes': [
      {'title': 'Chef',
       'uuid': '1234-1234-1234'
      }
    ], 
    'custom_data': [],
    'image': 'https://smartplans3.s3.amazonaws.com/media/user/uuid/filename.jpeg'
  }
}