Status

The Status API is used to access the different status objects on your business' account. 

Every account starts out with the same list of statuses returned from GET status. The array of status objects returned from that call all have the statusId property filled in, but the businessId property is set to null because those are the shared statuses all accounts start out with.

If an account wants to add a new status or change an existing status, they first need to create the status as part of their status list by making a call to POST status. In the POST status call, the statusId must be null and the businessId property must be set to their business id.

Once you have your own list of statuses returning from GET status (which you would know because the array of status objects would have your business ID filled into the businessId property and none of them would be set to a businessId of null) you can use the PUT status call. In the PUT status call you are required to pass the statusId.

This information is crucial because if someone tries to make a PUT or a POST call on a status object where the businessId is set to null and the statusId is one of the initial status ids returned from the shared list of statuses, the backend will reject it.

On this page




Status API Endpoints

These are the endpoints that are available under the /status path, which lists all the different status objects that are available on your business account.

Endpoint

Description

GET /status

Returns all status objects on your business' account in array format.

POST /status

Creates a new substatus object on an account.

Request body/payload: Must pass a status object in the request body/payload.

For these calls, you need to pass a status object with all required fields and any fields you want to set filled in the body of the payload. We have an example of a status object in the responses section below and have indicated the required fields in the object values table at the bottom of this page.

PUT /status

Updates the specified substatus object.

Request body/payload: Must pass a status object in the request body/payload.

For these calls, you need to pass a status object with all required fields and any fields you want to update filled in the body of the payload. We have an example of a status object in the responses section below and have indicated the required fields in the object values table at the bottom of this page.




Status API Parameters

There are no parameters included with status calls.




Status API Request Body/Payloads

The objects below represent the minimum viable objects to pass that are needed to create or update a status object. Check whether or not a property can be written to by looking at the Object Values table below to see if the property is writable.

POST /status
{
    "active": true,
    "businessId": 43111,
    "dependsOn": null,
    "sortOrder": 7,
    "status": "OPEN",
    "statusId": null,
    "statusType": "APPOINTMENT",
    "subStatus": "DOZING",
    "userSelectable": true
}
PUT /status
{
    "active": true,
    "businessId": 43111,
    "createdDate": 1541102830739,
    "createdUser": "JoeSchmo",
    "dependsOn": null,
    "modifiedDate": 1541779932507,
    "modifiedUser": "JoeSchmo",
    "sortOrder": 5,
    "status": "OPEN",
    "statusId": 1948,
    "statusType": "APPOINTMENT",
    "subStatus": "RUNNING_LATE",
    "userSelectable": true
}






Status API Responses

GET /status
[{
    "active": true,
    "businessId": 43111,
    "createdDate": 1541101742804,
    "createdUser": "JoeSchmo",
    "dependsOn": null,
    "modifiedDate": 1541102830700,
    "modifiedUser": "JoeSchmo",
    "sortOrder": 1,
    "status": "OPEN",
    "statusId": 1915,
    "statusType": "APPOINTMENT",
    "subStatus": "OPEN",
    "userSelectable": true
}]
POST /status
{
    "active": true,
    "businessId": 43111,
    "createdDate": 1541779932457,
    "createdUser": "JoeSchmo",
    "dependsOn": null,
    "modifiedDate": null,
    "modifiedUser": null,
    "sortOrder": 6,
    "status": "OPEN",
    "statusId": 2146,
    "statusType": "APPOINTMENT",
    "subStatus": "Ready for clients",
    "userSelectable": true
}
PUT /status
{
    "active": true,
    "businessId": 43111,
    "createdDate": 1541101742804,
    "createdUser": "JoeSchmo",
    "dependsOn": null,
    "modifiedDate": 1541779932507,
    "modifiedUser": "JoeSchmo",
    "sortOrder": 1,
    "status": "OPEN",
    "statusId": 1915,
    "statusType": "APPOINTMENT",
    "subStatus": "OPEN",
    "userSelectable": true
}




Status Object Values

Property name

Type

RequiredWritable

Description

active

boolean

Yes
Indicates whether or not the specified status should return in any GET calls.

businessId

integer

Yes
Provides unique numeric ID of the business the specified status belongs to. 

createdDate

integer



Displays as the date the specified status was created in milliseconds elapsed since January 1, 1970 00:00:00 UTC form. 

createdUser

string



Displays the username of the user who created specified status.

dependsOn

array



Displays as an array of properties that the specified status depends on.
modifiedDateinteger

Displays as the date the specified status was last updated in milliseconds elapsed since January 1, 1970 00:00:00 UTC form.
modifiedUserstring

Displays the username of user who last modified specified status.
sortOrderinteger
YesDisplays the order in which the specified status appears in the list of statuses.
statusstringYesYesDisplays as specified status in string form. Has acceptable values PENDING, PENDING_CONFIRMATION, PENDING_WAITLIST, OPEN, READ_ONLY, READ_ONLY_FREE, NO_SHOW, COMPLETED, CANCELLED, and DELETED.
statusIdintegerYes, on PUT calls
Provides unique numeric ID for the specified status.
statusTypestring

Should be set to "APPOINTMENT".
subStatusstringYesYes

Displays as the substatus of the specified status. PENDING, PENDING_CONFIRMATION, PENDING_WAITLIST, OPEN, READ_ONLY, READ_ONLY_FREE, NO_SHOW, RUNNING_LATE, INPROGRESS, CHECKEDIN, COMPLETED, CONFIRMED, CANCELLED, and DELETED.

userSelectableboolean
YesIndicates whether or not the specified status can be selected by the user.