Overview

Wearable Coach REST API definition documentation

Version information

Version : 1.0.0

Tags

  • Admin

  • Companies

  • Locations

  • Sequences

  • Templates

  • Users

Produces

  • application/json

Resources

Admin

Get database dump - companies

GET /dump/company
Description

Get database dump - companies

Responses
HTTP Code Schema

200

< Company > array

Security
Type Name

apiKey

token

Get database dump - locations

GET /dump/location
Description

Get database dump - locations

Responses
HTTP Code Schema

200

< LocationSummary > array

Security
Type Name

apiKey

token

Get database dump - sequences

GET /dump/sequence
Description

Get database dump - sequences

Responses
HTTP Code Schema

200

< Sequence > array

Security
Type Name

apiKey

token

Get database dump - templates

GET /dump/template
Description

Get database dump - templates

Responses
HTTP Code Schema

200

< Template > array

Security
Type Name

apiKey

token

Get database dump - users

GET /dump/user
Description

Get database dump - users

Responses
HTTP Code Schema

200

< UserSummary > array

Security
Type Name

apiKey

token

Companies

List all Companies

GET /companies
Description

List all Companies

Parameters
Type Name Schema

Query

keyword
optional

string

Query

limit
optional

integer

Query

start
optional

string

Responses
HTTP Code Schema

200

Response 200

Response 200

Name Schema

data
required

< CompanySummary > array

next
required

string

Security
Type Name

apiKey

token

Create a new Company

POST /companies
Description

Create a new Company

Parameters
Type Name Schema

Body

body
required

CompanyNew

Responses
HTTP Code Schema

201

Response 201

Response 201

Name Schema

data
required

Company

Security
Type Name

apiKey

token

Update an existing Company

PUT /companies/{companyId}
Description

Update an existing Company

Parameters
Type Name Schema

Path

companyId
required

string

Body

body
required

CompanyNew

Responses
HTTP Code Schema

200

Response 200

Response 200

Name Schema

data
required

Company

Security
Type Name

apiKey

token

Delete an existing Company

DELETE /companies/{companyId}
Description

Delete an existing Company

Parameters
Type Name Schema

Path

companyId
required

string

Responses
HTTP Code Schema

200

Response 200

Response 200

Name Schema

message
required

string

Security
Type Name

apiKey

token

Locations

List company Locations

GET /companies/{companyId}/locations
Description

List company Locations

Parameters
Type Name Schema

Path

companyId
required

string

Query

locationId
optional

string

Query

keyword
optional

string

Query

limit
optional

integer

Query

start
optional

string

Responses
HTTP Code Schema

200

Response 200

Response 200

Name Schema

data
required

< Location > array

next
required

string

Security
Type Name

apiKey

token

Add new Location

POST /companies/{companyId}/locations
Description

Add new Location

Parameters
Type Name Schema

Path

companyId
required

string

Body

body
required

LocationNew

Responses
HTTP Code Schema

201

Response 201

Response 201

Name Schema

data
required

Location

Security
Type Name

apiKey

token

Update an existing Location

PUT /companies/{companyId}/locations/{locationId}
Description

Update an existing Location

Parameters
Type Name Schema

Path

companyId
required

string

Path

locationId
required

string

Body

body
required

LocationNew

Responses
HTTP Code Schema

200

Response 200

Response 200

Name Schema

data
required

Location

Security
Type Name

apiKey

token

Delete an existing Location

DELETE /companies/{companyId}/locations/{locationId}
Description

Delete an existing Location

Parameters
Type Name Schema

Path

companyId
required

string

Path

locationId
required

string

Responses
HTTP Code Schema

200

Response 200

Response 200

Name Schema

message
required

string

Security
Type Name

apiKey

token

Sequences

List company Sequences

GET /companies/{companyId}/sequences
Description

List company Sequences

Parameters
Type Name Schema

Path

companyId
required

string

Query

keyword
optional

string

Query

locationId
optional

string

Query

assigneeId
optional

string

Query

startDate
optional

string

Query

endDate
optional

string

Query

limit
optional

integer

Query

start
optional

string

Responses
HTTP Code Schema

200

Response 200

Response 200

Name Schema

data
required

< Sequence > array

next
required

string

Security
Type Name

apiKey

token

Create a new Sequence

POST /companies/{companyId}/sequences
Description

Create a new Sequence

Parameters
Type Name Schema

Path

companyId
required

string

Body

body
required

SequenceNew

Responses
HTTP Code Schema

201

Response 201

Response 201

Name Schema

data
required

Sequence

Security
Type Name

apiKey

token

Get particular Sequence

GET /companies/{companyId}/sequences/{sequenceId}
Description

Get particular Sequence

Parameters
Type Name Schema

Path

companyId
required

string

Path

sequenceId
required

string

Responses
HTTP Code Schema

200

Response 200

Response 200

Name Schema

data
required

Sequence

Security
Type Name

apiKey

token

Update existing Sequence

PUT /companies/{companyId}/sequences/{sequenceId}
Description

Update existing Sequence

Parameters
Type Name Schema

Path

companyId
required

string

Path

sequenceId
required

string

Query

shouldUpdateRecurring
optional

boolean

Body

body
required

SequenceUpdate

Responses
HTTP Code Schema

200

Response 200

Response 200

Name Schema

data
required

Sequence

Security
Type Name

apiKey

token

Delete existing Sequence

DELETE /companies/{companyId}/sequences/{sequence_id}
Description

Delete existing Sequence

Parameters
Type Name Schema

Path

companyId
required

string

Path

sequence_id
required

string

Query

shouldDeleteRecurring
optional

boolean

Responses
HTTP Code Schema

200

Response 200

Response 200

Name Schema

message
required

string

Security
Type Name

apiKey

token

Update existing Sequences in bulk

PUT /companies/{companyId}/sequences/bulk
Description

Update existing Sequences in bulk

Parameters
Type Name Schema

Path

companyId
required

string

Body

body
required

< Sequence > array

Responses
HTTP Code Schema

200

Response 200

Response 200

Name Schema

data
required

SequenceBulkResponse

Security
Type Name

apiKey

token

List sequence Steps

GET /companies/{companyId}/report_steps
Description

List sequence Steps

Parameters
Type Name Schema

Path

companyId
required

string

Query

sequenceStatus
required

string

Responses
HTTP Code Schema

200

Response 200

Response 200

Name Schema

data
required

< ReportStep > array

Security
Type Name

apiKey

token

Templates

Get company Templates

GET /companies/{companyId}/templates
Description

Get company Templates

Parameters
Type Name Schema

Path

companyId
required

string

Query

keyword
optional

string

Query

locationId
optional

string

Query

limit
optional

integer

Query

start
optional

string

Responses
HTTP Code Schema

200

Response 200

Response 200

Name Schema

data
required

< Template > array

next
required

string

Security
Type Name

apiKey

token

Create a new Task Template

POST /companies/{companyId}/templates
Description

Create a new Task Template

Parameters
Type Name Schema

Path

companyId
required

string

Body

body
required

body

body

Name Schema

temp
required

TemplateNew

Responses
HTTP Code Schema

201

Response 201

Response 201

Name Schema

data
required

Template

Security
Type Name

apiKey

token

Update existing Template

PUT /companies/{companyId}/templates/{templateId}
Description

Update existing Template

Parameters
Type Name Schema

Path

companyId
required

string

Path

templateId
required

string

Body

body
required

body

body

Name Schema

temp
required

TemplateNew

Responses
HTTP Code Schema

200

Response 200

Response 200

Name Schema

data
required

Template

Security
Type Name

apiKey

token

Delete existing Template

DELETE /companies/{companyId}/templates/{templateId}
Description

Delete existing Template

Parameters
Type Name Schema

Path

companyId
required

string

Path

templateId
required

string

Responses
HTTP Code Schema

200

Response 200

Response 200

Name Schema

message
required

string

Security
Type Name

apiKey

token

Users

List Users

GET /users
Description

List Users

Parameters
Type Name Schema

Query

keyword
optional

string

Query

companyId
optional

string

Query

locationId
optional

string

Query

type
optional

integer

Query

limit
optional

integer

Query

start
optional

string

Responses
HTTP Code Schema

200

Response 200

Response 200

Name Schema

data
required

< User > array

next
required

string

Security
Type Name

apiKey

token

Create a new User

POST /users
Description

Create a new User

Parameters
Type Name Schema

Body

body
required

UserNew

Responses
HTTP Code Schema

201

Response 201

Response 201

Name Schema

data
required

User

Security
Type Name

apiKey

token

Get this User

GET /users/me
Description

Get this User

Responses
HTTP Code Schema

200

Response 200

Response 200

Name Schema

data
required

User

Security
Type Name

apiKey

token

Get a User

GET /users/{userId}
Description

Get a User

Parameters
Type Name Schema

Path

userId
required

string

Responses
HTTP Code Schema

200

Response 200

Response 200

Name Schema

data
required

User

Security
Type Name

apiKey

token

Update an existing User

PUT /users/{userId}
Description

Update an existing User

Parameters
Type Name Schema

Path

userId
required

string

Body

body
required

UserUpdate

Responses
HTTP Code Schema

200

Response 200

Response 200

Name Schema

data
required

User

Security
Type Name

apiKey

token

Delete an existing User

DELETE /users/{userId}
Description

Delete an existing User

Parameters
Type Name Schema

Path

userId
required

string

Responses
HTTP Code Schema

200

Response 200

Response 200

Name Schema

message
required

string

Security
Type Name

apiKey

token

Register a new User

POST /signup
Description

Register a new User

Parameters
Type Name Schema

Body

body
required

UserSignUp

Responses
HTTP Code Schema

201

Response 201

Response 201

Name Schema

token
required

string

data
required

User

Log in a user

POST /login
Description

Log in a user

Parameters
Type Name Schema

Body

body
required

body

body

Name Schema

username
required

string

password
required

string

Responses
HTTP Code Schema

200

Response 200

Response 200

Name Schema

token
required

string

data
required

User

Reset user password

POST /users/resetPassword
Description

Reset user password

Parameters
Type Name Schema

Body

body
required

body

body

Name Schema

username
required

string

Responses
HTTP Code Schema

200

Response 200

Response 200

Name Schema

message
required

string

Get TWILIO token

GET /users/twilio
Description

Get TWILIO token

Responses
HTTP Code Schema

200

Response 200

Response 200

Name Schema

token
required

string

Security
Type Name

apiKey

token

Definitions

Contact

Name Schema

name
optional

string

title
optional

string

email
optional

string

phone
optional

string

Address

Name Schema

street
optional

string

city
optional

string

state
optional

string

zip
optional

string

File

Name Schema

_id
optional

string

url
required

string

mimeType
required

string

Condition

Name Schema

if
required

string

then
required

string

PromptLevel

Prompt level:

0 - None

1-5 - corresponding Prompt Level

Type : enum (0, 1, 2, 3, 4, 5)

Company

Name Schema

_id
required

string

name
required

string

description
optional

string

startEarlyMinutes
optional

integer

photo
optional

File

address
optional

Address

contact
optional

Contact

skippingReasons
optional

< string > array

pauseReasons
optional

< string > array

created
optional

string (date-time)

CompanySummary

Name Schema

_id
required

string

name
required

string

description
optional

string

startEarlyMinutes
optional

integer

photo
optional

File

address
optional

Address

contact
optional

Contact

skippingReasons
optional

< string > array

pauseReasons
optional

< string > array

created
optional

string (date-time)

locations
required

integer

admins
required

integer

supervisors
required

integer

employees
required

integer

CompanyNew

Name Schema

name
optional

string

description
optional

string

address
optional

string

city
optional

string

state
optional

string

zip
optional

string

contactName
optional

string

contactTitle
optional

string

contactEmail
optional

string

contactPhone
optional

string

photo
optional

object

startEarlyMinutes
optional

integer

skippingReasons
optional

< string > array

pauseReasons
optional

< string > array

Error

Name Schema

code
optional

integer

description
optional

string

message
optional

string

PlainError

Name Schema

error
required

Error

Location

Name Schema

_id
required

string

company
optional

Company

facility
optional

string

address
optional

string

city
optional

string

state
optional

string

zip
optional

string

contact
optional

Contact

created
optional

string

LocationSummary

Name Schema

_id
required

string

facility
optional

string

address
optional

string

city
optional

string

state
optional

string

zip
optional

string

contact
optional

Contact

created
optional

string

company
optional

string

LocationNew

Name Schema

facility
optional

string

address
optional

string

city
optional

string

state
optional

string

zip
optional

string

contact
optional

Contact

RecurrenceTemplate

Name Schema

_id
required

string

companyId
required

string

startDate
required

string (date-time)

endDate
required

string (date-time)

endTimes
optional

integer

recurrence
required

Recurrence

created
required

string

updated
required

string

Recurrence

Recurrence rules:

Daily: repeat every value days

Weekly: repeat every value weeks on selected days of week

Monthly: repeat every value months. weeks parameter switches between modes

Yearly: repeat every value years

Name Schema

_id
optional

string

type
required

RecurrenceType

value
required

integer

days
optional

< RecurrenceWeekDay > array

weeks
optional

RecurrenceWeeks

RecurrenceNew

Name Schema

_id
optional

string

type
required

RecurrenceType

value
required

integer

days
optional

< RecurrenceWeekDay > array

weeks
optional

RecurrenceWeeks

endDate
optional

string (date-time)

endTimes
optional

integer

RecurrenceType

Recurrence date types:

0 - Day

1 - Week

2 - Month

3 - Year

Type : enum (0, 1, 2, 3)

RecurrenceWeekDay

Recurrence week day:

0 - Sunday

1 - Monday

2 - Tuesday

3 - Wednesday

4 - Thursday

5 - Friday

6 - Saturday

Type : enum (0, 1, 2, 3, 4, 5, 6)

RecurrenceWeeks

Recurrence Month Weeks:

0 - monthly on date (i.e. on the 5th of the month)

1 - monthly on day (i.e. on the second tuesday of the month)

Type : enum (0, 1)

Sequence

Name Schema

_id
required

string

company
optional

Company

title
optional

string

supervisor
optional

UserSummary

assignee
optional

UserSummary

location
optional

LocationSummary

startDate
optional

string

noStartTime
optional

boolean

status
optional

Status

tasks
optional

< Task > array

recurrenceTemplate
optional

RecurrenceTemplate

startedDate
optional

string

endedDate
optional

string

created
optional

string

updated
optional

string

SequenceNew

Name Schema

title
required

string

assigneeId
optional

string

locationId
required

string

startDate
required

string

noStartTime
optional

boolean

status
optional

Status

tasks
optional

< Task > array

recurrence
optional

RecurrenceNew

SequenceUpdate

Name Schema

title
required

string

assigneeId
optional

string

locationId
required

string

startDate
required

string

noStartTime
optional

boolean

status
optional

Status

tasks
optional

< Task > array

recurrence
optional

RecurrenceNew

startedDate
optional

string

endedDate
optional

string

SequenceBulkResponse

Name Schema

success
required

< string > array

failed
required

< FailedBulkInsertError > array

FailedBulkInsertError

Name Schema

id
required

string

error
required

string

Status

Status:

0 - Idle

1 - In Progress

2 - Needs Attention

3 - Completed

4 - Skipped

5 - Paused

Type : enum (0, 1, 2, 3, 4, 5)

Task

Name Schema

_id
optional

string

title
required

string

description
optional

string

status
optional

Status

condition
optional

Condition

steps
optional

< Step > array

promptingLevelOverride
optional

PromptLevel

productivityLevelOverride
optional

integer

skippingReason
optional

string

startedDate
optional

string

endedDate
optional

string

Step

Name Schema

_id
optional

string

title
required

string

description
optional

string

status
optional

Status

prompts
optional

< Prompt > array

startedDate
optional

string

endedDate
optional

string

pauseReason
optional

string

pauseStartedDate
optional

string

pauseEndedDate
optional

string

Prompt

Name Schema

_id
optional

string

level
required

integer

duration
required

integer

prompt
required

string

photo
optional

File

status
optional

Status

startedDate
optional

string

endedDate
optional

string

ReportStep

Name Schema

_id
optional

string

title
required

string

description
optional

string

status
optional

Status

prompts
optional

< Prompt > array

startedDate
optional

string

endedDate
optional

string

pauseReason
optional

string

pauseStartedDate
optional

string

pauseEndedDate
optional

string

taskTitle
optional

string

taskSkippingReason
optional

string

location
required

LocationSummary

assignee
optional

UserSummary

Template

Name Schema

_id
required

string

company
required

Company

location
optional

LocationSummary

title
required

string

description
optional

string

condition
optional

Condition

steps
required

< TemplateStep > array

created
required

string

TemplateStep

Name Schema

_id
required

string

title
required

string

description
optional

string

prompts
required

< TemplatePrompt > array

TemplatePrompt

Name Schema

_id
required

string

level
optional

integer

duration
optional

integer

prompt
required

string

photo
optional

File

TemplateNew

Name Schema

locationId
required

string

title
required

string

description
optional

string

condition
optional

Condition

steps
required

< TemplateStepNew > array

TemplateStepNew

Name Schema

title
required

string

description
optional

string

prompts
required

< TemplatePromptNew > array

TemplatePromptNew

Name Schema

level
optional

integer

duration
optional

integer

prompt
required

string

photo
optional

File

newPhoto
optional

object

User

Name Schema

_id
required

string

company
optional

Company

location
optional

Location

type
required

UserType

username
required

string

passwordReset
optional

boolean

photo
optional

File

title
optional

string

firstName
optional

string

lastName
optional

string

description
optional

string

phone
optional

string

promptingLevel
optional

PromptLevel

productivityLevel
optional

integer

speechSynthesisLanguage
optional

SpeechSynthesisLanguage

supervisorPhone
optional

string

allowTaskChoice
optional

boolean

allowWorkflowPause
optional

boolean

requireStepEndTap
optional

boolean

created
optional

string

UserSummary

Name Schema

_id
required

string

type
required

UserType

username
required

string

passwordReset
optional

boolean

photo
optional

File

title
optional

string

firstName
optional

string

lastName
optional

string

description
optional

string

phone
optional

string

promptingLevel
optional

PromptLevel

productivityLevel
optional

integer

speechSynthesisLanguage
optional

SpeechSynthesisLanguage

supervisorPhone
optional

string

allowTaskChoice
optional

boolean

allowWorkflowPause
optional

boolean

requireStepEndTap
optional

boolean

created
optional

string

company
optional

string

location
optional

string

UserSignUp

Name Schema

username
required

string

password
required

string

type
required

integer

companyId
required

string

UserNew

Name Schema

companyId
optional

string

locationId
optional

string

type
required

UserType

username
required

string

password
required

string

title
optional

string

firstName
optional

string

lastName
optional

string

description
optional

string

phone
optional

string

promptingLevel
optional

PromptLevel

productivityLevel
optional

integer

speechSynthesisLanguage
optional

SpeechSynthesisLanguage

supervisorPhone
optional

string

allowTaskChoice
optional

boolean

allowWorkflowPause
optional

boolean

requireStepEndTap
optional

boolean

photo
optional

object

UserUpdate

Name Schema

companyId
optional

string

locationId
optional

string

type
required

UserType

username
required

string

title
optional

string

firstName
optional

string

lastName
optional

string

description
optional

string

phone
optional

string

promptingLevel
optional

PromptLevel

productivityLevel
optional

integer

speechSynthesisLanguage
optional

SpeechSynthesisLanguage

supervisorPhone
optional

string

allowTaskChoice
optional

boolean

allowWorkflowPause
optional

boolean

requireStepEndTap
optional

boolean

photo
optional

object

oldPassword
optional

string

newPassword
optional

string

newPasswordConfirm
optional

string

UserType

User type:

0 - Admin

1 - Supervisor

2 - Employee

Type : enum (0, 1, 2)

SpeechSynthesisLanguage

Type : enum (en, es)

Security

token

Type : apiKey
Name : Authorization
In : HEADER