Offerings catalog

Course Types

A CourseType represents an offering type.

get/shop/course-types/{courseTypeId}

Retrieve a CourseType

getCourseType

Use this endpoint to retrieve a CourseType offering type.

Path parameters

  • courseTypeIdobject-idrequired

    The ID of a CourseType offering type.

Responses

  • 200

    Successfully retrieved a CourseType.

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

put/shop/course-types/{courseTypeId}

Update a course type

updateCourseType

Partially updates a CourseType. Every field is optional; only fields you send are written. Fields you omit retain their current values.

If the course type does not yet have a coupon_id (legacy course types from earlier versions of the API), one is provisioned on first update so future redemptions can be tracked. The coupon's name is kept in sync with <name> credit automatically.

Requires the SETTINGS_MANAGE permission on the course type's site.

Path parameters

  • courseTypeIdobject-idrequired

    The ID of a CourseType offering type.

Request body

  • namestringoptional

    Display name for the course type.

  • currencystringoptional

    The ISO-4217 currency code.

  • descriptionstringoptionalnullable

    Markdown-rendered long-form description shown to customers when they're selecting the course type.

  • product_codestringoptionalnullable

    Optional product code used to map this course type to an external POS or PMS catalog.

  • external_idstringoptionalnullable

    External identifier used by integrations to reference this offering. Free-form.

  • offered_onlinebooleanoptional

    When true, this course type can be purchased via the public shopfront.

  • privatebooleanoptional

    When true, the course type is hidden from the public shopfront listing but remains purchasable via direct link.

  • visibilitystringoptional

    The visibility status of the product.

    Possible values:publiclink_onlyprivate
  • offering_typestringoptional

    Deprecated. Legacy single-offering type pointer; new callers populate offerings instead. See CreateCourseType.

    Possible values:area_bookingappointmentproductsession
  • offering_idobject-idoptionalnullable

    Deprecated. Legacy single-offering ID; new callers populate offerings instead.

  • offeringsobject[]optional
  • upsell_offeringsobject[]optional
  • cross_sell_offeringsobject[]optional
  • metaobjectoptional

    SEO meta-overrides for the course type's shopfront page.

  • quantityintegeroptional

    Number of credits the course grants when purchased.

  • credits_validity_intervalstringoptionalnullable

    ISO 8601 duration string for how long credits remain redeemable. null = credits never expire.

  • image_idobject-idoptionalnullable

    ID of an uploaded Media to use as the course type's hero image.

  • customers_onlybooleanoptional

    When true, only signed-in customers can purchase.

  • members_onlybooleanoptional

    When true, only customers with an active membership of one of the permitted_membership_type_ids can purchase.

  • permitted_membership_type_idsstring[]optionalnullable

    When members_only: true, the list of MembershipType IDs whose holders are eligible to purchase.

  • category_idsstring[]optional

    Category IDs the course type belongs to.

  • revenue_centrestringoptionalnullable

    Free-form revenue centre code for accounting reports.

Responses

  • 200

    A single CourseType.

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

  • 422

    The request didn't pass validation

delete/shop/course-types/{courseTypeId}

Delete a course type

deleteCourseType

Soft-deletes the course type. Existing course credits already sold under this type remain redeemable; the type itself is removed from new-sale flows. Use POST .../restore to bring it back.

Requires the SETTINGS_MANAGE permission on the course type's site. No request body.

Path parameters

  • courseTypeIdobject-idrequired

    The ID of a CourseType offering type.

Responses

  • 204

    Course type deleted successfully.

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

get/shop/course-types/{courseTypeId}/availability-rules

List availability rules for a course type

listCourseTypeAvailabilityRules

Returns all AvailabilityRules configured on a CourseType. Rules define when this course type can be purchased — date ranges where it's available or explicitly unavailable.

Rule semantics: any is_available: false rule overrides any is_available: true rule for the same time period (closed beats open).

Path parameters

  • courseTypeIdobject-idrequired

    The ID of a CourseType offering type.

Responses

  • 200

    A list of AvailabilityRules on a CourseType.

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

post/shop/course-types/{courseTypeId}/availability-rules

Create an availability rule for a course type

createCourseTypeAvailabilityRule

Adds a new AvailabilityRule to a CourseType. Use to open bookable windows (is_available: true) or block existing ones (is_available: false). Course-type availability rules are simpler than appointment- or area-rule equivalents: only date filters, no time-of-day or weekday conditions.

Requires the update permission on the parent course type (typically SETTINGS_MANAGE on the course type's site).

Path parameters

  • courseTypeIdobject-idrequired

    The ID of a CourseType offering type.

Request body

  • is_availablebooleanoptional

    Whether the rule opens or closes the window.

  • date_fromdateoptionalnullable

    First date this rule applies.

  • date_todateoptionalnullable

    Last date this rule applies. Must be ≥ date_from.

Responses

  • 201

    A single AvailabilityRule on a CourseType.

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

  • 422

    The request didn't pass validation

get/shop/course-types/{courseTypeId}/availability-rules/{availabilityRuleId}

Retrieve a course-type availability rule

getCourseTypeAvailabilityRule

Returns a single AvailabilityRule belonging to the given CourseType.

Path parameters

Responses

  • 200

    A single AvailabilityRule on a CourseType.

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

put/shop/course-types/{courseTypeId}/availability-rules/{availabilityRuleId}

Update a course-type availability rule

updateCourseTypeAvailabilityRule

Updates an AvailabilityRule. The server validates the same shape as on create, so is_available is required. Requires the update permission on the parent course type.

Path parameters

Request body

  • is_availablebooleanrequired

    Whether the rule opens or closes the window.

  • date_fromdateoptionalnullable

    First date this rule applies.

  • date_todateoptionalnullable

    Last date this rule applies. Must be ≥ date_from.

Responses

  • 200

    A single AvailabilityRule on a CourseType.

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

  • 422

    The request didn't pass validation

delete/shop/course-types/{courseTypeId}/availability-rules/{availabilityRuleId}

Delete a course-type availability rule

deleteCourseTypeAvailabilityRule

Removes an AvailabilityRule from a CourseType. Existing bookings/redemptions are unaffected. Future availability is recomputed from whatever rules remain.

Path parameters

Responses

  • 204

    Availability rule deleted successfully.

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

post/shop/course-types/{courseTypeId}/copy

Duplicate a course type

copyCourseType

Creates a copy of an existing CourseType with new fields applied from the request body. name is required so the copy is distinguishable from the source. Fields you omit are inherited from the source.

Requires the SETTINGS_MANAGE permission on the source course type's site.

Path parameters

  • courseTypeIdobject-idrequired

    The ID of a CourseType offering type.

Request body

  • namestringrequired

    Display name for the new copy. Plain text only — HTML tags are rejected. Required so the copy is distinguishable from the source.

  • descriptionstringoptionalnullable

    Long-form description shown to customers. Markdown rendered.

  • product_codestringoptionalnullable

    External POS/PMS product code.

  • external_idstringoptionalnullable

    External identifier for integrations.

  • currencystringoptional

    The ISO-4217 currency code.

  • offered_onlinebooleanoptional

    Whether bookable via the public shopfront.

  • privatebooleanoptional

    When true, only customers with the direct link can purchase.

  • visibilitystringoptional

    Visibility override. public = everyone; hidden = out of search/browse (still purchasable by direct link); members_only = restricted to permitted membership-type holders.

    Possible values:publichiddenmembers_only
  • offering_typestringoptional

    The type of offering the course wraps. Determines which Offering ID the offering_id field references. Note: this field will be removed once the multiple_course_offerings feature flag is fully rolled out.

    Possible values:area-bookingappointmentproductsession
  • offering_idstringoptionalnullable

    Identifier of the single underlying offering this course bundles (matched against the type set in offering_type). Note: this field will be removed once the multiple_course_offerings feature flag rolls out — use offerings instead, which supports multiple offerings per course.

  • offeringsobject[]optional

    Multiple offerings bundled by this course. Each entry pairs an offering ID with its type.

  • upsell_offeringsobject[]optional
  • cross_sell_offeringsobject[]optional
  • quantityintegeroptional

    Number of redemptions the course grants the purchaser (e.g. a 10-class card has quantity: 10).

  • credits_validity_intervalstringoptionalnullable

    ISO 8601 duration during which the course credits remain redeemable after purchase. Null = no expiry.

  • image_idstringoptionalnullable

    ID of an uploaded Media for the cover image.

  • customers_onlybooleanoptional

    Restrict purchase to registered customers.

  • members_onlybooleanoptional

    Restrict purchase to permitted membership-type holders.

  • permitted_membership_type_idsstring[]optionalnullable

    Membership-type IDs allowed to purchase when members_only=true.

  • category_idsstring[]optional

    Category IDs for shopfront grouping.

  • revenue_centrestringoptionalnullable

    Revenue centre to post course sales to. Must be valid for the source course type's site.

  • metaobjectoptional

    SEO metadata for the public shopfront page.

Responses

  • 201

    The course type was copied.

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

  • 422

    The request didn't pass validation

get/shop/course-types/{courseTypeId}/price-rules

List price rules for a course type

listCourseTypePriceRules

Returns all PriceRules configured for a CourseType, filterable by date range. Course price rules let you charge different prices for the same course at different times — e.g. summer rates for a membership-credit course. Only date-range filters are supported (no time-of-day or weekday conditions). The first rule whose conditions match the time of sale wins.

Path parameters

  • courseTypeIdobject-idrequired

    The ID of a CourseType offering type.

Query parameters

  • date_fromdateoptional

    Restrict results to those on or after this date, ISO-8601 YYYY-MM-DD.

  • date_todateoptional

    Restrict results to those on or before this date, ISO-8601 YYYY-MM-DD.

  • pageintegeroptional

    The page to retrieve results from

  • per_pageintegeroptional

    The number of results to return per page

Responses

  • 200

    A list of price rules for a course type.

  • 401

    The user is unauthenticated

  • 404

    The resource couldn't be found

post/shop/course-types/{courseTypeId}/price-rules

Create a price rule for a course type

createCourseTypePriceRule

Adds a new PriceRule to a CourseType. Set price and optionally a date_from/date_to window. With no date filters the rule applies always — useful as the baseline price.

Requires the update permission on the parent CourseType (typically SETTINGS_MANAGE on the course type's site).

Path parameters

  • courseTypeIdobject-idrequired

    The ID of a CourseType offering type.

Request body

  • priceintegerrequired

    Price in the smallest currency unit (e.g. pence, cents). 12000 is £120.00 on a GBP site.

  • date_fromdateoptionalnullable

    First date this rule applies (inclusive). Defaults to today in the course type's timezone when omitted.

  • date_todateoptionalnullable

    Last date this rule applies (inclusive). Must be on or after date_from if both are set. Null = no end date.

Responses

  • 201

    A single PriceRule on a CourseType.

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

  • 422

    The request didn't pass validation

get/shop/course-types/{courseTypeId}/price-rules/{priceRuleId}

Retrieve a course-type price rule

getCourseTypePriceRule

Returns a single PriceRule belonging to the given CourseType.

Path parameters

  • courseTypeIdobject-idrequired

    The ID of a CourseType offering type.

  • priceRuleIdobject-idrequired

    The unique identifier of the price rule.

Responses

  • 200

    A single PriceRule on a CourseType.

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

put/shop/course-types/{courseTypeId}/price-rules/{priceRuleId}

Update a course-type price rule

updateCourseTypePriceRule

Partially updates a PriceRule on a CourseType. All fields optional. Requires the update permission on the parent course type.

Path parameters

  • courseTypeIdobject-idrequired

    The ID of a CourseType offering type.

  • priceRuleIdobject-idrequired

    The unique identifier of the price rule.

Request body

  • priceintegeroptional

    Price in the smallest currency unit.

  • date_fromdateoptionalnullable

    First date this rule applies.

  • date_todateoptionalnullable

    Last date this rule applies. Must be ≥ date_from.

Responses

  • 200

    A single PriceRule on a CourseType.

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

  • 422

    The request didn't pass validation

delete/shop/course-types/{courseTypeId}/price-rules/{priceRuleId}

Delete a course-type price rule

deleteCourseTypePriceRule

Removes a PriceRule from a CourseType. Past purchases priced under this rule are unaffected. Future sales reprice from whatever rules remain (falling back to the course type's base price if none apply).

Path parameters

  • courseTypeIdobject-idrequired

    The ID of a CourseType offering type.

  • priceRuleIdobject-idrequired

    The unique identifier of the price rule.

Responses

  • 204

    Price rule deleted successfully.

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

post/shop/course-types/{courseTypeId}/restore

Restore a deleted course type

restoreCourseType

Un-deletes a previously soft-deleted CourseType. The course type returns to its pre-deletion state, including underlying offering associations, quantity, and credit-validity rules. Existing purchases that contained the course remain unaffected.

Requires the SETTINGS_MANAGE permission on the course type's site. No request body.

Path parameters

  • courseTypeIdobject-idrequired

    The ID of a CourseType offering type.

Responses

  • 200

    The course type was restored successfully.

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

get/shop/course-types

List course types

listCourseTypes

Returns a paginated list of CourseTypes configured at the given site, ordered by name. Use this to power a settings dashboard or to populate a course-credit selector in the shopfront. The list includes archived items only when archived=true is passed.

Filter by a specific offering with offering_id (matches against the course type's offerings array) or by category with category_id.

Requires the RESERVATIONS_VIEW permission on the site.

Query parameters

  • site_idstringrequired

    Filter results by the site they belong to

  • pageintegeroptional

    The page to retrieve results from

  • per_pageintegeroptional

    The number of results to return per page

  • archivedbooleanoptional

    Whether to include archived resources in the response. When true, archived resources are returned; when false or omitted, only non-archived resources are returned.

  • offering_idstringoptional

    Filter results to course types whose offerings include the given offering ID. Comma-separate to OR multiple IDs (e.g. offering_id=abc,def).

  • category_idstringoptional

    Filter results to course types that include the given category in their category_ids. Comma-separate to OR multiple categories.

Responses

  • 200

    A paginated list of CourseTypes for the requested site.

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

post/shop/course-types

Create a course type

createCourseType

Creates a new CourseType at the site referenced via the Trybe-Site-Id header (and the site_id query parameter). The minimum body is name; everything else has a sensible default.

On create the server provisions an internal Coupon to track redemptions of the course type's credits, unless coupon_id is supplied. The new CourseType.coupon_id is set to the resulting coupon's ID.

Requires the SETTINGS_MANAGE permission on the site.

Query parameters

  • site_idstringrequired

    Filter results by the site they belong to

  • pageintegeroptional

    The page to retrieve results from

  • per_pageintegeroptional

    The number of results to return per page

  • archivedbooleanoptional

    Whether to include archived resources in the response. When true, archived resources are returned; when false or omitted, only non-archived resources are returned.

  • offering_idstringoptional

    Filter results to course types whose offerings include the given offering ID. Comma-separate to OR multiple IDs (e.g. offering_id=abc,def).

  • category_idstringoptional

    Filter results to course types that include the given category in their category_ids. Comma-separate to OR multiple categories.

Request body

  • namestringrequired

    Display name for the course type. Visible to customers in the shopfront and on emailed credit balances. Plain text only.

  • currencystringoptional

    The ISO-4217 currency code.

  • descriptionstringoptionalnullable

    Long-form description shown to customers when they're selecting the course type. Markdown is rendered.

  • product_codestringoptionalnullable

    Optional product code used to map the course type to an external POS or PMS catalog. Free-form; uniqueness is not enforced.

  • external_idstringoptionalnullable

    External identifier used by integrations to reference this offering. Free-form.

  • offered_onlinebooleanoptional

    When true, this course type can be purchased via the public shopfront. When false it is admin-only. Defaults to false.

  • privatebooleanoptional

    When true, the course type is hidden from the public shopfront listing but remains purchasable via direct link. Used for "secret" or staff-only offers.

  • visibilitystringoptional

    The visibility status of the product.

    Possible values:publiclink_onlyprivate
  • coupon_idobject-idoptional

    Optional Coupon to use as the redemption-tracking coupon for this course type. When omitted the server creates a new programmatic coupon named " credit" and attaches it.

  • offering_typestringoptional

    Deprecated. The type of offering this course unlocks. Used together with offering_id for legacy single- offering course types. New callers should populate offerings instead.

    Possible values:area_bookingappointmentproductsession
  • offering_idobject-idoptionalnullable

    Deprecated. The ID of the single offering this course unlocks. Paired with offering_type. New callers should populate offerings instead.

  • offeringsobject[]optional

    List of offerings this course type unlocks. Each entry identifies one offering by type + ID. Offerings must belong to the same site as the course type — others are dropped at validation time.

  • quantityintegeroptional

    Number of credits the course grants when purchased. Defaults to 1.

  • credits_validity_intervalstringoptionalnullable

    ISO 8601 duration string for how long credits remain redeemable from purchase. null means credits never expire. Example: P1Y = 1 year, P6M = 6 months.

  • image_idobject-idoptionalnullable

    ID of an uploaded Media to use as the course type's hero image.

  • customers_onlybooleanoptional

    When true, only signed-in customers can purchase. When false, guest checkout is allowed.

  • members_onlybooleanoptional

    When true, only customers with an active membership of one of the permitted_membership_type_ids can purchase.

  • upsell_offeringsobject[]optional

    Offerings shown as upsells during checkout.

  • cross_sell_offeringsobject[]optional

    Offerings shown as cross-sells on the course type's detail page.

  • permitted_membership_type_idsstring[]optionalnullable

    When members_only: true, the list of MembershipType IDs whose holders are eligible to purchase. Must belong to the same brand as the course type's site.

  • category_idsstring[]optional

    Category IDs the course type belongs to. Used for shopfront grouping.

  • revenue_centrestringoptionalnullable

    Free-form revenue centre code for accounting reports. Must be a configured revenue centre on the course type's site.

Responses

  • 201

    A single CourseType.

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 422

    The request didn't pass validation