Welcome to the developer documentation for WorkTaps.
We strive to make our system as flexible as possible and encourage you to reach out. Some reasons you want to contact us directly would be:
The Worktaps API uses tokens to authenticate requests. You can view and manage your API tokens in the WorkTaps Dashboard. API tokens are used to authorize a request using one of the two HTTP headers:
Authorization: Bearer your-api-token
Authorization: Basic your-api-token:
(note the colon on the end)You'll most likely use the Bearer token because it allows for cross-origin requests. We use the Basic protocol in the examples below because the syntax is simpler when making a curl request.
WorkTaps uses conventional HTTP response codes to indicate the success or failure of an API request. A successful response will result in a 200
. An unsuccessful response will result in a 4xx
.
Along with a 4xx
error code, an errors
object will be returned which contains an array of one or more human-readable problems which occurred and a optional error code specific to the endpoint being requested.
{
"code": 4xxxx,
"message": "A human description of the error."
}
These are application specific error codes.
Below are all of the various (JSON) object types which are returned by the WorkTaps API.
Fields are contextualized to the organization the user belongs to.
idnumber | Unique ID for an account |
createdDate | Date account was created. Note, this is the date that the user was added to WorkTaps initially, and not the hire date. |
startDateDate | Organization hire date for account |
firstNamestring | First name for an account |
lastNamestring | Last name for an account |
emailstring | Email address for an account |
phonestring | Phone number in E.164 format |
citystring | E.g. "San Francisco" |
statestring | Always the two letter acronym. E.g. "CA" |
streetstring | E.g. "615 Cleveland St." |
postalstring | E.g. "90210" |
birthDatestring | E.g. "YYYY-MM-DD" |
employeeIdstring | E.g. "73546" |
timezonestring | E.g. "America/New_York" Format examples here |
rolestring | Options are "EMPLOYEE", "MANAGER", or "OWNER" |
jobTitlestring | A member's job within the organization |
departmentDepartment | Department account belongs to (one-to-one) |
locationsLocation[] | Locations account belongs to (one-to-many) |
metaMeta | Meta fields for account |
idstring | Unique ID for department |
namestring | Name of department |
slugstring | A unique and URL-friendly version of the name |
idstring | Unique ID for location |
namestring | Name of location |
slugstring | A unique and URL-friendly version of the name |
anyany | Fields added as a meta field will be displayed in this object. There cannot be duplicate names for meta fields. |
POST /api/v1/account
curl -X POST \
https://worktaps.com/api/v1/account \
-u your-api-key: \
-d firstName="John" \
-d lastName="Doe"
firstNamestring | required | First name for an account |
lastNamestring | required | Last name for an account |
emailstring | optional | Email address for an account. If a phone number is not provided, this field is required |
phonestring | optional | Phone number in E.164 format. If a email is not provided, this field is required |
citystring | optional | E.g. "San Francisco" |
statestring | optional | Must be two letter acronym. E.g. "CA" |
postalstring | optional | E.g. "90210" |
birthDatestring | optional | E.g. "YYYY-MM-DD" |
employeeIdstring | optional | E.g. "73546" |
timezonestring | required | E.g. "America/New_York" Format examples here |
rolestring | required | Options are "EMPLOYEE", "MANAGER", or "OWNER" |
metaMetaInput | required | The meta field is required primarily to specify jobTitle and startDate for employee. |
departmentDepartment | required | Department account belongs to (one-to-one) |
locationsLocation[] | required | Locations account belongs to (one-to-many). At least one is required. |
Values for all MetaInput strings are limited to 100 characters.
jobTitlestring | required | A member's job within the organization |
startDatestring | required | Hired date for employee |
anystring | optional | This may be any user defined property |
Full account object returned.
GET /api/v1/account/:id
curl https://worktaps.com/api/v1/account/:id \
-u your-api-key:
:idstring | required | ID for account. |
A full Account object will be returned if successful.
PUT /api/v1/account/:id
curl -X PUT \
https://worktaps.com/api/v1/account/:id \
-u your-api-key: \
-d firstName="John" \
-d lastName="Doe"
:idstring | required | ID for account. |
firstNamestring | optional | First name for an account |
lastNamestring | optional | Last name for an account |
emailstring | optional | Email address for an account |
phonestring | optional | Phone number in E.164 format |
citystring | optional | E.g. "San Francisco" |
statestring | optional | Must be two letter acronym. E.g. "CA" |
postalstring | optional | E.g. "90210" |
birthDatestring | optional | E.g. "YYYY-MM-DD" |
employeeIdstring | optional | E.g. "73546" |
timezonestring | optional | E.g. "America/New_York" Format examples here |
rolestring | optional | Options are "EMPLOYEE", "MANAGER", or "OWNER" |
metaMetaInput | optional | The meta field is required primarily to specify jobTitle and startDate for employee. |
departmentDepartment | optional | Department account belongs to (one-to-one) |
locationsLocation[] | optional | Locations account belongs to (one-to-many). At least one is required. |
Values for all MetaInput strings are limited to 100 characters.
jobTitlestring | optional | A member's job within the organization |
startDatestring | optional | Hired date for employee |
anystring | optional | This may be any user defined property. This could be useful for storing custom ID's when doing reconciliation with other systems. |
An account object will be returned if successful.
DELETE /api/v1/account/:id
curl -X DELETE \
https://worktaps.com/api/v1/account/:id \
-d termDate="01/20/2010"
-u your-api-key:
:idstring | required | ID for account. |
termDatestring | required | The date the employee was termed |
removedboolean | Will always been true when when removed. Otherwise, an error will be returned. |
GET /api/v1/accounts
curl https://worktaps.com/api/v1/accounts?meta="{\"jobTitle\": \"Dish Washer\"} \
-u your-api-key:
limitnumber | optional | The minimum is 1 and the maximum is 1000 |
pagestring | optional | Page number for request. This is calculated based on the limit |
locationnumber | optional | ID for a location to filter by. |
emailstring | optional | Search for an exact email match. |
phonestring | optional | Search for an exact phone match. The string will be sanitized, so "(202)234-5678", "2022345678", "12022345678" and "+12022345678" are considered the same. |
metastring | optional | Search for any meta fields. You may search for custom meta fields as well. The value must be in stringified json. For example: |
totalnumber | The total amount of records |
recordsAccount[] | A collection of accounts |
GET /api/v1/departments
curl https://worktaps.com/api/v1/departments \
-u your-api-key:
limitnumber | optional | The minimum is 1 and the maximum is 1000 |
pagestring | optional | Page number for request. This is calculated based on the limit |
totalnumber | The total amount of records |
recordsDepartment[] | A collection of departments |
GET /api/v1/locations
curl https://worktaps.com/api/v1/locations \
-u your-api-key:
limitnumber | optional | The minimum is 1 and the maximum is 1000 |
pagestring | optional | Page number for request. This is calculated based on the limit |
totalnumber | The total amount of records |
recordsLocation[] | A collection of locations |
POST /api/v1/locations
curl -X POST \
https://worktaps.com/api/v1/locations \
-u your-api-key:
namestring | required | Name of location |
websitestring | optional | Website of location |
phonestring | optional | Phone number in E.164 format. |
streetstring | optional | Street of location |
citystring | optional | E.g. "San Francisco" |
postalstring | optional | E.g. "90210" |
statestring | optional | Must be two letter acronym. E.g. "CA" |
aboutstring | optional | Description of the location |
areacodestring | optional | Areacode of the location |
timezonestring | optional | E.g. "America/New_York" Format examples here |
Full locations object returned.
PUT /api/v1/locations/id
curl -X PUT \
https://worktaps.com/api/v1/locations/:id \
-u your-api-key:
:idstring | required | ID for location. |
namestring | optional | Name of location |
websitestring | optional | Website of location |
phonestring | optional | Phone number in E.164 format. |
streetstring | optional | Street of location |
citystring | optional | E.g. "San Francisco" |
postalstring | optional | E.g. "90210" |
statestring | optional | Must be two letter acronym. E.g. "CA" |
aboutstring | optional | Description of the location |
areacodestring | optional | Areacode of the location |
timezonestring | optional | E.g. "America/New_York" Format examples here |
Full locations object returned.