Skip to main content
POST
Create ProductTimePass
A ProductTimePass links a TimePass to a Product so that customers purchasing the product automatically receive an amount of check-in time. How time is calculated:
  • Day Pass (TimePass with MinutesIncluded = null): PassesIncluded is the number of calendar days. The customer can check in any number of times during each calendar day they hold.
  • Time Pass (TimePass with MinutesIncluded set): PassesIncluded is the number of pass instances (each worth MinutesIncluded minutes). Multiply PassesIncluded by MinutesIncluded to get total hours. For example, PassesIncluded = 10 with a 60-minute time pass gives the customer 10 hours of check-in time to use across different dates.
When is the time pass released?
  • Admin sale (via CoworkerProduct): An admin can choose to release the time pass before payment by setting ActivateNow = true when selling the product.
  • Member purchase (online, active contract): Time passes are released immediately unless the Store.AlwaysInvoice business setting is enabled, in which case they release after payment.
  • Contact purchase (online, no active contract): Time passes are released after the product is paid.
Use ExpirationType and ExpiresIn to control when the released time pass expires.

Authentication

This endpoint requires OAuth2 authentication. Include a valid bearer token in the Authorization header. The authenticated user must be a full unrestricted administrator or have the ProductTimePass-Create role.

Enums

Request Body

Required Fields

integer
required
ID of the product linked to this time pass record.
integer
required
ID of the time pass linked to this record. The type of time pass determines how time is calculated: Day Pass (MinutesIncluded = null) gives calendar days of check-in access; Time Pass (MinutesIncluded set) gives instances worth MinutesIncluded minutes each.
integer
required
Number of passes included: for Day Passes this is the number of calendar days the customer can check in; for Time Passes this is the number of pass instances (each worth the TimePass’s MinutesIncluded minutes). Total time = PassesIncluded × MinutesIncluded for time passes.

Optional Fields

integer
Expiration period in months (legacy field, use ExpiresIn with ExpirationType instead).
integer
Expiration period in weeks (legacy field, use ExpiresIn with ExpirationType instead).
integer
Expiration type for the released time pass: PricePlan (expires at end of billing period of the main contract - customer must have a main contract), Day, Week, Month, Year, or LastDayOfMonth. See eRecurrentChargePattern? enum above.
integer
Number of periods (of ExpirationType) until the released time pass expires.

Code Examples

Response

200

integer
HTTP status code. 200 on success.
string
A human-readable message confirming the creation.
object
Contains the Id of the newly created record.
boolean
true if the producttimepass was created successfully.
array
null on success.
Example Response

400

string
A summary of the validation error(s), in the format PropertyName: error message.
any
null on validation failure.
object[]
Array of validation errors.
boolean
false when the request fails validation.
Example Response