Package
These are the endpoints that are available under the /package path, which lists all the different packages on your business' account.
Endpoint | Description |
---|---|
GET /package | Returns all package objects on an account in array format. |
GET /package/{packageId} | Returns a JSON object for specified package. |
POST /package | Creates new package object, updates an existing package object, or clones an existing package object. Request body/payload: Must pass a package object in request body/payload. For these calls, you need to pass a package object with all required fields and any fields you want to set or update filled in the body of the payload. We have an example of a package object in the responses section below and have indicated the required fields in the object values table at the bottom of this page. |
DELETE /package/{packageId} | Removes a package object from view by setting its active property to false. |
GET /packageSold/client/{clientId} | Returns all packageSold objects that have been sold to specified client. |
POST /packageSold | Creates a new packageSold object on a business invoice. Request body/payload: Must pass a packageSold object in request body/payload. For these calls, you need to pass a packageSold object with all required fields and any fields you want to set or update filled in the body of the payload. We have an example of a packageSold object in the responses section below. |
DELETE /packageSold/{packageSoldId} | Removes a packageSold object from view by setting its active property to false. |
There are no parameters included with package calls.
The objects below represent the minimum viable objects to pass that are needed to create or update a package or packageSold 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.
We have included object value tables for packages and packageSold objects as they are stored in unique tables on our database.
package
Property Name | Type | Required | Description |
---|---|---|---|
active | boolean | Yes | Indicates whether or not the specified package should return on GET calls. |
allowOnline | boolean | Indicates whether or not the specified package is allowed online. | |
businessId | integer | Yes | Provides unique numerical ID for the business to which the specified package belongs. |
createdDate | integer | Displays as date the specified package was created in milliseconds elapsed since January 1, 1970 00:00:00 UTC form. | |
createdUser | string | Displays as username of the user who created the specified package. | |
description | string | Displays as the description provided for the specified package. | |
expireInDays | integer | Provides the number of days before the specified package is set to expire. | |
imageURL | string | Displays the URL of the image associated with the specified package. | |
internalName | string | Displays as name that staff sees for the specified package. | |
modifiedDate | integer | Displays as date the specified package was last modified in milliseconds elapsed since January 1, 1970 00:00:00 UTC form. | |
modifiedUser | string | Displays as username of the user who last modified the specified package. | |
packageId | integer | Provides unique numeric ID of the specified package. | |
packageName | string | Yes | Displays as name given to the specified package. |
price | integer | Displays as price given for the specified package. | |
quantity | integer | Yes | Displays as number of services included in the specified package. |
reasonList | array | Displays an array of reason objects included in the specified package. | |
remindWhenBelowQuantity | integer | Displays as number of sessions remaining in a package that triggers a reminder to be sent. | |
serviceIds | array | Yes | Displays as serviceIds for all services included in the specified package. |
staffRateLevel | string | Provides the level given to. the specified package. Affects which appointments can be redeemed as part of the package by checking if the appointment’s service and staff match the staffRateLevel applied to the package | |
taxable | boolean | Indicates whether or not the specified package is taxable. |
packageSold
Property Name | Type | Required | Definition |
---|---|---|---|
businessId | integer | Yes | Provides unique numerical ID for the business to which the specified package sold belongs. |
client | object | Yes | Displays the client object for client connected to the specified package sold - for more info, see Clients API page. |
createdDate | integer | Displays as date the specified package sold was created in milliseconds elapsed since January 1, 1970 00:00:00 UTC form. | |
createdUser | string | Displays as username of the user who created the specified package sold. | |
expireDate | integer | Provides date that the specified package sold will expire in milliseconds elapsed since January 1, 1970 00:00:00 UTC form. | |
maxQuantity | integer | Yes | Provides the max quantity of sessions included in the specified package sold. |
modifiedDate | integer | Displays as date the specified package sold was last modified in milliseconds elapsed since January 1, 1970 00:00:00 UTC form. | |
modifiedUser | string | Displays as username of the user who last modified the specified package sold. | |
packageSoldId | integer | Provides unique numeric ID of the specified package sold. | |
pkg | object | Yes | Displays the package object for package of the specified package sold. |
price | integer | Yes | Provides the monetary price of the specified package sold. |
purchaseDate | integer | Yes | Displays as date the specified package sold was last modified in milliseconds elapsed since January 1, 1970 00:00:00 UTC form. |
status | string | Yes | Displays the status of the specified package sold. Has acceptable values OPEN, CLOSED. |
usedQuantity | integer | Yes | Displays the quantity of sessions that have been used in the specified package sold. |