Users
Users - Wonoloers and Requestors
A User can be either a Requestor (type: Employer
) or a Wonoloer (type: Worker
).
Priviledge Level¶ ↑
If you have Public Pool access, you will only be able to access Wonoloers with whom you have “active” Jobs. Active jobs are those Jobs which:
-
are in a state of
filled
,in_progress
,paused
,completed
, or -
are in a state of
approved
and were approved in the past 24 hours.
Supported Formats
json
GET /api_v2/users
List users
Returns a list of Users, optionally paginated. Note: the maximum number returned per page in any case is 50.
Supported Formats
jsonErrors
Code | Description |
---|---|
401 | Unauthorized - you did not pass a valid token |
Examples
curl -v -d "token=HdgXqxYWd5tTdyabzfzo" https://api.wonolo.com/api_v2/users
curl -v -d "token=HdgXqxYWd5tTdyabzfzo" https://api.wonolo.com/api_v2/users?page=10&per=25
Params
Param name | Description |
---|---|
token
required |
Token obtained from /authorize Validations:
|
page
optional |
The page number to start from Validations:
|
per
optional |
The size of the page Validations:
|
type
optional |
Filter Users by type - either ‘Worker’ or ‘Employer’ Validations:
|
email
optional |
Filter Users by email Validations:
|
first_name
optional |
Filter Users by first name - should contain only letters, numbers, dash (-) and period (.) character Validations:
|
last_name
optional |
Filter Users by last name - should contain only letters, numbers, dash (-) and period (.) character Validations:
|
external_id
optional |
Filter Users by external id(s) - separate multiple external ids with commas Validations:
|
onboarding_last_state
optional |
Filter Users by onboarding state(s) - separate multiple states with commas Validations:
|
w2_onboarding_status
optional |
Filter users by W2 onboarding states(s) - separate multiple states with commas Validations:
|
w2_employee_id
optional |
Filter Users by their W2 employee ID Validations:
|
address_state
optional |
Filter Users by address state - separate multiple states with commas Validations:
|
drug_tested
optional |
Filter Users by drug test results - separate multiple states with commas Validations:
|
updated_before
optional |
Filter Users by those that were last updated before provided DateTime Validations:
|
updated_after
optional |
Filter Users by those that were last updated after provided DateTime Validations:
|
customer_id
optional |
Filter Employers by Customer ID Validations:
|
POST /api_v2/users
Create a user
Supported Formats
jsonErrors
Code | Description |
---|---|
403 | Forbidden - if you have Public Pool access only |
Params
Param name | Description |
---|---|
token
required |
Token obtained from /authorize Validations:
|
user
required |
Validations:
|
user[type]
required |
The type of User - Worker = Wonoloer, Employer = Requestor Validations:
|
user[gender]
optional |
User’s gender Validations:
|
user[email]
required |
User email - must be unique. Validations:
|
user[password]
required |
Password. Minimum 8 characters. Must be specified on creation. Validations:
|
user[password_confirmation]
required |
Must be specified and match password, if specified. Validations:
|
user[first_name]
required |
User first name - should contain only letters, numbers, dash (-) and period (.) character Validations:
|
user[last_name]
required |
User last name - should contain only letters, numbers, dash (-) and period (.) character Validations:
|
user[avatar_url]
optional |
Validations:
|
user[address]
optional |
Validations:
|
user[city]
optional |
Validations:
|
user[address_state]
optional |
Validations:
|
user[zip]
optional |
Validations:
|
user[phone]
optional |
Validations:
|
user[suspended]
optional |
True if the User is currently suspended Validations:
|
user[suspended_at]
optional |
Validations:
|
user[rating]
optional |
User’s current rating (out of 5.0) Validations:
|
user[agreed_to_terms]
optional |
True if the User has agreed to terms Validations:
|
user[agreed_to_terms_date]
optional |
Validations:
|
user[external_id]
optional |
An arbitrary value to be associated with this Worker. This attribute is used for Workers only. Validations:
|
user[onboarding_last_state]
optional |
Worker’s last onboarding state. This attribute is used for Workers only. Validations:
|
user[w2_employee_id]
optional |
Worker’s unique employee ID for W2 classified jobs. This attribute is used for Workers only. Validations:
|
user[drug_tested]
optional |
Worker’s drug test results. This attribute is used for Workers only. Validations:
|
user[verified_phone]
optional |
Worker’s verified phone. This attribute is used for Workers only. Validations:
|
user[phone_verified_at]
optional |
This attribute is used for Workers only. Validations:
|
user[user_badges_attributes]
optional |
Badges that the Worker has. This attribute is used for Workers only. Validations:
|
user[user_badges_attributes][badge_id]
required |
The ID of the Badge. This attribute is used for Workers only. Validations:
|
user[user_badges_attributes][id]
optional |
The ID of the current User-Badge association between this Worker and a badge - required for the ‘_destroy’ function below. This attribute is used for Workers only. Validations:
|
user[user_badges_attributes][_destroy]
optional |
Set to remove this User-Badge association on updating a Worker (PATCH). This attribute is used for Workers only. Validations:
|
user[title]
optional |
Employer’s title. This attribute is used for Employers only. Validations:
|
user[role]
required |
Employer’s role. This attribute is used for Employers only. Validations:
|
user[customer_id]
required |
Employer’s customer ID. This attribute is used for Employers only. Validations:
|
POST /api_v2/users/invite
Invite worker into our system
Supported Formats
jsonParams
Param name | Description |
---|---|
token
required |
Token obtained from /authorize Validations:
|
user
required |
Validations:
|
user[first_name]
required |
Worker first name - should contain only letters, numbers, dash (-) and period (.) character Validations:
|
user[last_name]
required |
Worker last name - should contain only letters, numbers, dash (-) and period (.) character Validations:
|
user[phone]
required |
Validations:
|
user[type]
required |
The type of User - Worker = Wonoloer Validations:
|
user[email]
optional |
Worker email Validations:
|
user[external_id]
optional |
the id of user on the external server Validations:
|
PUT/PATCH /api_v2/users/:id
Update a user
Supported Formats
jsonErrors
Code | Description |
---|---|
403 | Forbidden - if you have Public Pool access only |
Params
Param name | Description |
---|---|
token
required |
Token obtained from /authorize Validations:
|
user
required |
Validations:
|
user[id]
required |
Unique ID of the User Validations:
|
user[type]
required |
The type of User - Worker = Wonoloer, Employer = Requestor Validations:
|
user[gender]
optional |
User’s gender Validations:
|
user[email]
required |
User email - must be unique. Validations:
|
user[password]
required |
Password. Minimum 8 characters. Must be specified on creation. Validations:
|
user[password_confirmation]
required |
Must be specified and match password, if specified. Validations:
|
user[first_name]
required |
User first name - should contain only letters, numbers, dash (-) and period (.) character Validations:
|
user[last_name]
required |
User last name - should contain only letters, numbers, dash (-) and period (.) character Validations:
|
user[avatar_url]
optional |
Validations:
|
user[address]
optional |
Validations:
|
user[city]
optional |
Validations:
|
user[address_state]
optional |
Validations:
|
user[zip]
optional |
Validations:
|
user[phone]
optional |
Validations:
|
user[suspended]
optional |
True if the User is currently suspended Validations:
|
user[suspended_at]
optional |
Validations:
|
user[rating]
optional |
User’s current rating (out of 5.0) Validations:
|
user[agreed_to_terms]
optional |
True if the User has agreed to terms Validations:
|
user[agreed_to_terms_date]
optional |
Validations:
|
user[external_id]
optional |
An arbitrary value to be associated with this Worker. This attribute is used for Workers only. Validations:
|
user[onboarding_last_state]
optional |
Worker’s last onboarding state. This attribute is used for Workers only. Validations:
|
user[w2_employee_id]
optional |
Worker’s unique employee ID for W2 classified jobs. This attribute is used for Workers only. Validations:
|
user[drug_tested]
optional |
Worker’s drug test results. This attribute is used for Workers only. Validations:
|
user[verified_phone]
optional |
Worker’s verified phone. This attribute is used for Workers only. Validations:
|
user[phone_verified_at]
optional |
This attribute is used for Workers only. Validations:
|
user[user_badges_attributes]
optional |
Badges that the Worker has. This attribute is used for Workers only. Validations:
|
user[user_badges_attributes][badge_id]
required |
The ID of the Badge. This attribute is used for Workers only. Validations:
|
user[user_badges_attributes][id]
optional |
The ID of the current User-Badge association between this Worker and a badge - required for the ‘_destroy’ function below. This attribute is used for Workers only. Validations:
|
user[user_badges_attributes][_destroy]
optional |
Set to remove this User-Badge association on updating a Worker (PATCH). This attribute is used for Workers only. Validations:
|
user[title]
optional |
Employer’s title. This attribute is used for Employers only. Validations:
|
user[role]
required |
Employer’s role. This attribute is used for Employers only. Validations:
|
user[customer_id]
required |
Employer’s customer ID. This attribute is used for Employers only. Validations:
|
GET /api_v2/users/:id
Get a specific user
Supported Formats
jsonErrors
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found. No User with the specified ID can be found |
Params
Param name | Description |
---|---|
token
required |
Token obtained from /authorize Validations:
|
GET /api_v2/users/:id/tracking
Get tracking data for a specific user
Supported Formats
jsonErrors
Code | Description |
---|---|
403 | Forbidden - if you have Public Pool access only |
Params
Param name | Description |
---|---|
token
required |
Token obtained from /authorize Validations:
|