Package

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.

 

 


 

Package API Endpoints

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

Endpoint

Description

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.

 


 

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.

{ "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 }
{ "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

[{ "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 }]
{ "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 }
{ "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 }
[{ "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 }]
{ "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 Name

Type

Required

Description

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

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.

Comments