Package

The Package API is used to access, create, and modify the package objects on your business' account. The Package API is connected to the Invoice Item and Invoices and Quotes APIs, as packages appear on both invoice items and invoices.

On this page





Package API Endpoints

These are the endpoints that are available under the /package path, which lists all the different packages on your business' account.

EndpointDescription
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.




Package API Parameters

There are no parameters included with package calls.




Package API Request Body/Payloads


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.

POST /package
{
    "active": true,
    "allowOnline": null,
    "businessId": 43111,
    "createdDate": 1563892647977,
    "createdUser": "JoeSchmo",
    "description": "Cat grooming deal",
    "expireInDays": null,
    "imageURL": null,
    "internalName": null,
    "modifiedDate": 1563892647977,
    "modifiedUser": "JoeSchmo",
    "packageId": 7265,
    "packageName": "2 for 1 cat grooming",
    "price": 10,
    "quantity": 2,
    "reasonList": [{Reason objects for services included in package - for more info, see Services API page}],
    "remindWhenBelowQuantity": null,
    "serviceIds": [255109],
    "sortOrder": null,
    "taxable": null
}
POST /packageSold
{
    "businessId": 43111,
    "client": {Client object for client of package sold - for more info, see Clients API page},
    "maxQuantity": 10,
    "pkg": {Package object for package sold},
    "price": 100,
    "purchaseDate": 1681402301316,
    "reminderSent": false,
    "status": "OPEN",
    "usedQuantity": 0
}




Package API Responses

GET /package
[{
    "active": true,
    "allowOnline": null,
    "businessId": 43111,
    "createdDate": 1537472706912,
    "createdUser": "JoeSchmo",
    "description": null,
    "expireInDays": 180,
    "imageURL": null,
    "internalName": null,
    "modifiedDate": 1537472863088,
    "modifiedUser": "JoeSchmo",
    "packageId": 3700,
    "packageName": "10 Class Advanced Dog Training Package",
    "price": 100,
    "quantity": 10,
    "reasonList": [{Reason objects for services included in package - for more info, see Services API page}],
    "remindWhenBelowQuantity": null,
    "serviceIds": [240127],
    "sortOrder": null,
    "staffRateLevel": null,
    "taxable": true
}]
GET /package/{packageId}
{
    "active": true,
    "allowOnline": null,
    "businessId": 43111,
    "createdDate": 1537805743741,
    "createdUser": "JoeSchmo",
    "description": null,
    "expireInDays": 30,
    "imageURL": null,
    "internalName": null,
    "modifiedDate": 1537805743741,
    "modifiedUser": "JoeSchmo",
    "packageId": 3766,
    "packageName": "3-for-1 Pet Grooming Set",
    "price": 5,
    "quantity": 3,
    "reasonList": [{Reason objects for services included in package - for more info, see Services API page}],
    "remindWhenBelowQuantity": null,
    "serviceIds": [255109, 159330],
    "sortOrder": null,
    "staffRateLevel": null,
    "taxable": null
}
POST /package
{
    "active": true,
    "allowOnline": null,
    "businessId": 43111,
    "createdDate": 1537801908331,
    "createdUser": "JoeSchmo",
    "description": "Cat grooming deal",
    "expireInDays": 90,
    "imageURL": null,
    "internalName": null,
    "modifiedDate": 1537801908331,
    "modifiedUser": "JoeSchmo",
    "packageId": 3733,
    "packageName": "5 Cat Groomings Special",
    "price": 25,
    "quantity": 5,
    "reasonList": [{Reason objects for services included in package - for more info, see Services API page}],
    "remindWhenBelowQuantity": 2,
    "serviceIds": [255109],
    "sortOrder": null,
    "staffRateLevel": null,
    "taxable": true
}
GET /packageSold/client/{clientId}
[{
    "businessId": 43111,
    "client": {Client object for client of specified packageSold - for more info, see Clients API page},
    "createdDate": 1538077143179,
    "createdUser": "JoeSchmo",
    "expireDate": 1543381200000,
    "maxQuantity": 3,
    "modifiedDate": 1538077342522,
    "modifiedUser": "JoeSchmo",
    "packageSoldId": 8515,
    "pkg": {Package object for specified package sold},
    "price": 100,
    "purchaseDate": 1538077142989,
    "reminderSent": false,
    "status": "OPEN",
    "usedQuantity": 1
}]
POST /packageSold
{
    "businessId": 43111,
    "client": {Client object for client of specified package sold - for more info, see Clients API page},
    "createdDate": 1537812817525,
    "createdUser": "JoeSchmo",
    "expireDate": 1545523200000,
    "maxQuantity": 5,
    "modifiedDate": 1537812817525,
    "modifiedUser": "JoeSchmo",
    "packageSoldId": 8284,
    "pkg": {Package object for specified package sold},
    "price": 25,
    "purchaseDate": 1537812817525,
    "reminderSent": false,
    "status": "OPEN",
    "usedQuantity": 0
}




Package Object Values

We have included object value tables for packages and packageSold objects as they are stored in unique tables on our database.

package

Property NameTypeRequiredDescription
activebooleanYesIndicates whether or not the specified package should return on GET calls. 
allowOnlineboolean
Indicates whether or not the specified package is allowed online.
businessIdintegerYesProvides unique numerical ID for the business to which the specified package belongs.
createdDateinteger
Displays as date the specified package was created in milliseconds elapsed since January 1, 1970 00:00:00 UTC form. 
createdUserstring
Displays as username of the user who created the specified package.
descriptionstring
Displays as the description provided for the specified package.
expireInDaysinteger
Provides the number of days before the specified package is set to expire.
imageURLstring
Displays the URL of the image associated with the specified package.
internalNamestring
Displays as name that staff sees for the specified package.
modifiedDateinteger
Displays as date the specified package was last modified in milliseconds elapsed since January 1, 1970 00:00:00 UTC form. 
modifiedUserstring
Displays as username of the user who last modified the specified package.
packageIdinteger
Provides unique numeric ID of the specified package.
packageNamestringYesDisplays as name given to the specified package.
priceinteger
Displays as price given for the specified package.
quantityintegerYesDisplays as number of services included in the specified package.
reasonListarray
Displays an array of reason objects included in the specified package.
remindWhenBelowQuantityinteger
Displays as number of sessions remaining in a package that triggers a reminder to be sent.
serviceIdsarrayYesDisplays as serviceIds for all services included in the specified package.
staffRateLevelstring
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
taxableboolean

Indicates whether or not the specified package is taxable.

packageSold

Property NameTypeRequiredDefinition
businessIdintegerYesProvides unique numerical ID for the business to which the specified package sold belongs.
clientobjectYesDisplays the client object for client connected to the specified package sold - for more info, see Clients API page.
createdDateinteger
Displays as date the specified package sold was created in milliseconds elapsed since January 1, 1970 00:00:00 UTC form. 
createdUserstring
Displays as username of the user who created the specified package sold.
expireDateinteger
Provides date that the specified package sold will expire in milliseconds elapsed since January 1, 1970 00:00:00 UTC form. 
maxQuantityintegerYesProvides the max quantity of sessions included in the specified package sold.
modifiedDateinteger
Displays as date the specified package sold was last modified in milliseconds elapsed since January 1, 1970 00:00:00 UTC form. 
modifiedUserstring
Displays as username of the user who last modified the specified package sold.
packageSoldIdinteger
Provides unique numeric ID of the specified package sold.
pkgobjectYesDisplays the package object for package of the specified package sold.
priceintegerYesProvides the monetary price of the specified package sold.
purchaseDateintegerYesDisplays as date the specified package sold was last modified in milliseconds elapsed since January 1, 1970 00:00:00 UTC form. 
statusstringYesDisplays the status of the specified package sold. Has acceptable values OPEN, CLOSED.
usedQuantityintegerYesDisplays the quantity of sessions that have been used in the specified package sold.