Nest Changelog

1.0.7

9/24/2021

1.1.3

2/9/2022

39 changed endpoints

GET /users/{userId}/preferences

Get all User’s Preferences

Guard: none

Response Body
{
  data: {

}, }

GET /users/{userId}/preferences

Get a key-value pair of the user's preferences

Guard: selfOrAdmin

Response Body
{
  data: {

+ anotherSetting?: List<string>, + flatResistance?: record, + hillResistance?: record, + leaderboardDisplay?: record, + showStats?: record, }, }

GET /users

Get all users

Guard: none

Response Body
{
  data: List<{
-   createdBy: record,
-   dateActivated: number,

dateBirth: string, - dateCreated: number, - dateUpdated: number, - email: string, - firstName: string, - gender: {

text: string, - value?: 'm' | 'f',

}, - height: record, - id: number, - image: { - default?: string, - large?: string, - medium?: string, - small?: string,

}, - lastName: string,

mongoId?: string, - nickname: string, - parentId: number, - purchased: record, - roles: List<string>, - stripe: record, - updatedBy: {

id?: number,

}, - weight: record,

}>, }

GET /users

Get all users

Guard: admin

Response Body
{
  data: List<{

+ billingAddress?: { + city?: string, + country?: { + code?: string, + id?: number, + name?: string, + }, + postalCode?: string, + region?: { + code?: string, + name?: string, + }, + streetLine1?: string, + streetLine2?: string, + }, + createdBy?: { + id?: number, + }, + dateActivated?: number, dateBirth: string,

+ dateCreated?: number, + dateUpdated?: number, + email?: string, + firstName?: string, + gender?: { text: string,

+ value?: 'm' | 'f' | 'o', },

+ height?: { + text?: string, + units?: 'in' | 'cm', + value?: number, },

+ id?: number, + image?: { + default: string, + large: string, + medium: string, + small: string, + url?: string, + }, + lastName?: string, mongoId?: string,

+ nickname?: string, + parent?: { id?: number, + mongoId?: string, },

+ phoneNumber?: string, + purchaseHistory?: List<{ + datePurchased?: number, + name?: string, + retailer?: { + id?: number, + name?: string, + }, + serialNumber?: string, + }>, + roles?: List<string>, + stripe?: { + customerId?: string, + }, + updatedBy?: { + id?: number, + }, + weight?: { + text?: string, + units?: 'lb' | 'kg', + value?: number, + }, }>, }

GET /users/{userId}

Get a specific user by id

Guard: none

Response Body
{
  data: {
-   createdBy: record,
-   dateActivated: number,

dateBirth: string, - dateCreated: number, - dateUpdated: number, - email: string, - firstName: string, - gender: {

text: string, - value?: 'm' | 'f',

}, - height: record, - id: number, - image: { - default?: string, - large?: string, - medium?: string, - small?: string,

}, - lastName: string,

mongoId?: string, - nickname: string, - parentId: number, - purchased: record, - roles: List<string>, - stripe: record, - updatedBy: {

id?: number,

}, - weight: record,

}, }

GET /users/{userId}

Get a specific user by id

Guard: familyOrAdmin

Response Body
{
  data: {

+ billingAddress?: { + city?: string, + country?: { + code?: string, + id?: number, + name?: string, + }, + postalCode?: string, + region?: { + code?: string, + name?: string, + }, + streetLine1?: string, + streetLine2?: string, + }, + createdBy?: { + id?: number, + }, + dateActivated?: number, dateBirth: string,

+ dateCreated?: number, + dateUpdated?: number, + email?: string, + firstName?: string, + gender?: { text: string,

+ value?: 'm' | 'f' | 'o', },

+ height?: { + text?: string, + units?: 'in' | 'cm', + value?: number, },

+ id?: number, + image?: { + default: string, + large: string, + medium: string, + small: string, + url?: string, + }, + lastName?: string, mongoId?: string,

+ nickname?: string, + parent?: { id?: number, + mongoId?: string, },

+ phoneNumber?: string, + purchaseHistory?: List<{ + datePurchased?: number, + name?: string, + retailer?: { + id?: number, + name?: string, + }, + serialNumber?: string, + }>, + roles?: List<string>, + stripe?: { + customerId?: string, + }, + updatedBy?: { + id?: number, + }, + weight?: { + text?: string, + units?: 'lb' | 'kg', + value?: number, + }, }, }

PATCH /users/{userId}

Edit this user

Guard: none

Request Body
{

dateBirth: string, email: string, firstName: string, gender: { - text: string, - value?: 'm' | 'f',

}, height: { units?: 'in' | 'cm', value?: number, },

lastName: string,

nickname: string,

weight: { units?: 'lb' | 'kg', value?: number, }, }
Response Body
{
  data: {
-   createdBy: record,
-   dateActivated: number,

dateBirth: string, - dateCreated: number, - dateUpdated: number, - email: string, - firstName: string, - gender: {

text: string, - value?: 'm' | 'f',

}, - height: record, - id: number, - image: { - default?: string, - large?: string, - medium?: string, - small?: string,

}, - lastName: string,

mongoId?: string, - nickname: string, - parentId: number, - purchased: record, - roles: List<string>, - stripe: record, - updatedBy: {

id?: number,

}, - weight: record,

}, }

PATCH /users/{userId}

Edit this user

Guard: familyOrAdmin

Request Body
{
+ billingAddress: {
+   city: string,
+   country: {
+     code?: string,
+   },
+   postalCode: string,
+   region: {
+     code?: string,
+   },
+   streetLine1: string,
+   streetLine2: string,
+ },
  dateBirth: string,
  email: string,
  firstName: string,
  gender: {

+ value?: 'm' | 'f' | 'o', }, height: { units?: 'in' | 'cm', value?: number, }, + image: { + default: string, + large: string, + medium: string, + small: string, + url?: string, + }, lastName: string, + mongoId: string, nickname: string, + parent: { + id?: number, + mongoId?: string, + }, + phoneNumber: string, + purchaseHistory: List<{ + datePurchased?: number, + name?: string, + retailer?: { + id?: number, + name?: string, + }, + serialNumber?: string, + }>, + roles: List<string>, weight: { units?: 'lb' | 'kg', value?: number, }, }
Response Body
{
  data: {

+ billingAddress?: { + city?: string, + country?: { + code?: string, + id?: number, + name?: string, + }, + postalCode?: string, + region?: { + code?: string, + name?: string, + }, + streetLine1?: string, + streetLine2?: string, + }, + createdBy?: { + id?: number, + }, + dateActivated?: number, dateBirth: string,

+ dateCreated?: number, + dateUpdated?: number, + email?: string, + firstName?: string, + gender?: { text: string,

+ value?: 'm' | 'f' | 'o', },

+ height?: { + text?: string, + units?: 'in' | 'cm', + value?: number, },

+ id?: number, + image?: { + default: string, + large: string, + medium: string, + small: string, + url?: string, + }, + lastName?: string, mongoId?: string,

+ nickname?: string, + parent?: { id?: number, + mongoId?: string, },

+ phoneNumber?: string, + purchaseHistory?: List<{ + datePurchased?: number, + name?: string, + retailer?: { + id?: number, + name?: string, + }, + serialNumber?: string, + }>, + roles?: List<string>, + stripe?: { + customerId?: string, + }, + updatedBy?: { + id?: number, + }, + weight?: { + text?: string, + units?: 'lb' | 'kg', + value?: number, + }, }, }

GET /users/{userId}/family

Get child accounts of this user

Guard: none

Response Body
{
  data: List<{
-   createdBy: record,
-   dateActivated: number,

dateBirth: string, - dateCreated: number, - dateUpdated: number, - email: string, - firstName: string, - gender: {

text: string, - value?: 'm' | 'f',

}, - height: record, - id: number, - image: { - default?: string, - large?: string, - medium?: string, - small?: string,

}, - lastName: string,

mongoId?: string, - nickname: string, - parentId: number, - purchased: record, - roles: List<string>, - stripe: record, - updatedBy: {

id?: number,

}, - weight: record,

}>, }

GET /users/{userId}/family

Get child accounts of this user

Guard: familyOrAdmin

Response Body
{
  data: List<{

+ billingAddress?: { + city?: string, + country?: { + code?: string, + id?: number, + name?: string, + }, + postalCode?: string, + region?: { + code?: string, + name?: string, + }, + streetLine1?: string, + streetLine2?: string, + }, + createdBy?: { + id?: number, + }, + dateActivated?: number, dateBirth: string,

+ dateCreated?: number, + dateUpdated?: number, + email?: string, + firstName?: string, + gender?: { text: string,

+ value?: 'm' | 'f' | 'o', },

+ height?: { + text?: string, + units?: 'in' | 'cm', + value?: number, },

+ id?: number, + image?: { + default: string, + large: string, + medium: string, + small: string, + url?: string, + }, + lastName?: string, mongoId?: string,

+ nickname?: string, + parent?: { id?: number, + mongoId?: string, },

+ phoneNumber?: string, + purchaseHistory?: List<{ + datePurchased?: number, + name?: string, + retailer?: { + id?: number, + name?: string, + }, + serialNumber?: string, + }>, + roles?: List<string>, + stripe?: { + customerId?: string, + }, + updatedBy?: { + id?: number, + }, + weight?: { + text?: string, + units?: 'lb' | 'kg', + value?: number, + }, }>, }

POST /users/{userId}/family

Guard: none

Request Body
{
- dateBirth?: string,

email?: string, - firstName?: string,

gender: { - text: string, - value?: 'm' | 'f',

}, height: { units?: 'in' | 'cm', value?: number, }, - lastName?: string,

nickname: string,

weight: { units?: 'lb' | 'kg', value?: number, }, }
Response Body
{
  data: {
-   createdBy: record,
-   dateActivated: number,

dateBirth: string, - dateCreated: number, - dateUpdated: number, - email: string, - firstName: string, - gender: {

text: string, - value?: 'm' | 'f',

}, - height: record, - id: number, - image: { - default?: string, - large?: string, - medium?: string, - small?: string,

}, - lastName: string,

mongoId?: string, - nickname: string, - parentId: number, - purchased: record, - roles: List<string>, - stripe: record, - updatedBy: {

id?: number,

}, - weight: record,

}, }

POST /users/{userId}/family

Guard: family

Request Body
{

+ billingAddress: { + city: string, + country: { + code?: string, + }, + postalCode: string, + region: { + code?: string, + }, + streetLine1: string, + streetLine2: string, + }, + dateBirth: string, email?: string,

+ firstName: string, gender: {

+ value?: 'm' | 'f' | 'o', }, height: { units?: 'in' | 'cm', value?: number, },

+ image: { + default: string, + large: string, + medium: string, + small: string, + url?: string, + }, + lastName: string, + mongoId: string, nickname: string, + parent: { + id?: number, + mongoId?: string, + }, + password?: string, + phoneNumber: string, + purchaseHistory: List<{ + datePurchased?: number, + name?: string, + retailer?: { + id?: number, + name?: string, + }, + serialNumber?: string, + }>, + roles: List<string>, weight: { units?: 'lb' | 'kg', value?: number, }, }
Response Body
{
  data: {

+ billingAddress?: { + city?: string, + country?: { + code?: string, + id?: number, + name?: string, + }, + postalCode?: string, + region?: { + code?: string, + name?: string, + }, + streetLine1?: string, + streetLine2?: string, + }, + createdBy?: { + id?: number, + }, + dateActivated?: number, dateBirth: string,

+ dateCreated?: number, + dateUpdated?: number, + email?: string, + firstName?: string, + gender?: { text: string,

+ value?: 'm' | 'f' | 'o', },

+ height?: { + text?: string, + units?: 'in' | 'cm', + value?: number, },

+ id?: number, + image?: { + default: string, + large: string, + medium: string, + small: string, + url?: string, + }, + lastName?: string, mongoId?: string,

+ nickname?: string, + parent?: { id?: number, + mongoId?: string, },

+ phoneNumber?: string, + purchaseHistory?: List<{ + datePurchased?: number, + name?: string, + retailer?: { + id?: number, + name?: string, + }, + serialNumber?: string, + }>, + roles?: List<string>, + stripe?: { + customerId?: string, + }, + updatedBy?: { + id?: number, + }, + weight?: { + text?: string, + units?: 'lb' | 'kg', + value?: number, + }, }, }

PUT /users/{userId}/password

Change the password of this user

Guard: none

PUT /users/{userId}/password

Change the password of this user

Guard: familyOrAdmin

DELETE /users/{userId}/family/{familyUserId}

Guard: none

DELETE /users/{userId}/family/{familyUserId}

Guard: familyOrAdmin

GET /plans

Get all Plans

Response Body
{
  data: List<{
-   amazon: {
-     sku: string,

},

id?: number, - image: {

url?: string, }, - name: string, - price: { - currency: string, - units?: number, - }, - shopify: {

productId?: string, - shopId: string,

}, - sku: string, - sortOrder: number, - stripe: { - planId?: string,

productId?: string,

}, - termFrequency: number, - trialDays: number, }>, }

GET /plans

Get all Plans

Response Body
{
  data: List<{

+ billingProviders?: List<{ + accountId?: string, + name?: 'stripe' | 'ios' | 'android' | 'amazon', + priceId?: string, + productId?: string, + }>, + country?: { + code?: string, + id?: number, }, + createdBy?: { + id?: number, + }, + dateCreated?: number, + dateUpdated?: number, + defaultTrial?: { + units?: 'day', + value?: number, + }, + description?: string, + frequency?: { + units?: 'month', + value?: number, + }, id?: number,

+ image?: { + default: string, + large: string, + medium: string, + small: string, url?: string, },

+ musicRights?: { productId?: string,

+ vendor?: 'audibleMagic', },

+ name?: string, + price?: { + currency?: string, + value?: number, + }, + sku?: string, + sortOrder?: number, + sources?: List<{ + accountId?: string, + name?: 'shopify' | 'amazon' | 'ios' | 'android' | 'organic' | 'free', productId?: string, + }>, + tags?: List<string>, + updatedBy?: { + id?: number, },

}>, }

POST /plans

Create Plan

Guard: none

Request Body
{
- amazon: {
-   sku: string,

}, - image: {

url?: string, },

name?: string, - price: { - currency: string, - units?: number,

}, - shopify: {

productId?: string, - shopId: string, - }, - sku: string, - sortOrder: number, - stripe: { - planId?: string, - productId?: string, - }, - termFrequency?: number, - trialDays: number,

}
Response Body
{
  data: {
-   amazon: {
-     sku: string,

},

id?: number, - image: {

url?: string, }, - name: string, - price: { - currency: string, - units?: number, - }, - shopify: {

productId?: string, - shopId: string,

}, - sku: string, - sortOrder: number, - stripe: { - planId?: string,

productId?: string,

}, - termFrequency: number, - trialDays: number, }, }

POST /plans

Create Plan

Guard: admin

Request Body
{

+ billingProviders?: List<{ + accountId?: string, + name?: 'stripe' | 'ios' | 'android' | 'amazon', + priceId?: string, + productId?: string, + }>, + country?: { + code?: string, + id?: number, },

+ defaultTrial?: { + units?: 'day', + value?: number, + }, + description?: string, + frequency?: { + units?: 'month', + value?: number, + }, + image?: { + default: string, + large: string, + medium: string, + small: string, url?: string, }, + musicRights?: { + productId?: string, + vendor?: 'audibleMagic', + }, name?: string,

+ price?: { + currency?: string, + value?: number, },

+ sku?: string, + sortOrder?: number, + sources?: List<{ + accountId?: string, + name?: 'shopify' | 'amazon' | 'ios' | 'android' | 'organic' | 'free', productId?: string,

+ }>, + tags?: List<string>, }
Response Body
{
  data: {

+ billingProviders?: List<{ + accountId?: string, + name?: 'stripe' | 'ios' | 'android' | 'amazon', + priceId?: string, + productId?: string, + }>, + country?: { + code?: string, + id?: number, }, + createdBy?: { + id?: number, + }, + dateCreated?: number, + dateUpdated?: number, + defaultTrial?: { + units?: 'day', + value?: number, + }, + description?: string, + frequency?: { + units?: 'month', + value?: number, + }, id?: number,

+ image?: { + default: string, + large: string, + medium: string, + small: string, url?: string, },

+ musicRights?: { productId?: string,

+ vendor?: 'audibleMagic', },

+ name?: string, + price?: { + currency?: string, + value?: number, + }, + sku?: string, + sortOrder?: number, + sources?: List<{ + accountId?: string, + name?: 'shopify' | 'amazon' | 'ios' | 'android' | 'organic' | 'free', productId?: string, + }>, + tags?: List<string>, + updatedBy?: { + id?: number, },

}, }

GET /plans/{id}

Get Plan by id

Response Body
{
  data: {
-   amazon: {
-     sku: string,

},

id?: number, - image: {

url?: string, }, - name: string, - price: { - currency: string, - units?: number, - }, - shopify: {

productId?: string, - shopId: string,

}, - sku: string, - sortOrder: number, - stripe: { - planId?: string,

productId?: string,

}, - termFrequency: number, - trialDays: number, }, }

GET /plans/{id}

Get Plan by id

Response Body
{
  data: {

+ billingProviders?: List<{ + accountId?: string, + name?: 'stripe' | 'ios' | 'android' | 'amazon', + priceId?: string, + productId?: string, + }>, + country?: { + code?: string, + id?: number, }, + createdBy?: { + id?: number, + }, + dateCreated?: number, + dateUpdated?: number, + defaultTrial?: { + units?: 'day', + value?: number, + }, + description?: string, + frequency?: { + units?: 'month', + value?: number, + }, id?: number,

+ image?: { + default: string, + large: string, + medium: string, + small: string, url?: string, },

+ musicRights?: { productId?: string,

+ vendor?: 'audibleMagic', },

+ name?: string, + price?: { + currency?: string, + value?: number, + }, + sku?: string, + sortOrder?: number, + sources?: List<{ + accountId?: string, + name?: 'shopify' | 'amazon' | 'ios' | 'android' | 'organic' | 'free', productId?: string, + }>, + tags?: List<string>, + updatedBy?: { + id?: number, },

}, }

PATCH /plans/{id}

Update Plan

Guard: none

Request Body
{
- amazon: {
-   sku: string,

},

image: {

url?: string, },

name: string, price: { - currency: string, - units?: number,

}, - shopify: { - productId?: string, - shopId: string, - }, sku: string, sortOrder: number, - stripe: { - planId?: string,

productId?: string, - }, - termFrequency: number, - trialDays: number,

}
Response Body
{
  data: {
-   amazon: {
-     sku: string,

},

id?: number, - image: {

url?: string, }, - name: string, - price: { - currency: string, - units?: number, - }, - shopify: {

productId?: string, - shopId: string,

}, - sku: string, - sortOrder: number, - stripe: { - planId?: string,

productId?: string,

}, - termFrequency: number, - trialDays: number, }, }

PATCH /plans/{id}

Update Plan

Guard: admin

Request Body
{

+ billingProviders: List<{ + accountId?: string, + name?: 'stripe' | 'ios' | 'android' | 'amazon', + priceId?: string, + productId?: string, + }>, + country: { + code?: string, + id?: number, }, + defaultTrial: { + units?: 'day', + value?: number, + }, + description: string, + frequency: { + units?: 'month', + value?: number, + }, image: { + default: string, + large: string, + medium: string, + small: string, url?: string, }, + musicRights: { + productId?: string, + vendor?: 'audibleMagic', + }, name: string, price: {

+ currency?: string, + value?: number, },

sku: string, sortOrder: number,

+ sources: List<{ + accountId?: string, + name?: 'shopify' | 'amazon' | 'ios' | 'android' | 'organic' | 'free', productId?: string,

+ }>, + tags: List<string>, }
Response Body
{
  data: {

+ billingProviders?: List<{ + accountId?: string, + name?: 'stripe' | 'ios' | 'android' | 'amazon', + priceId?: string, + productId?: string, + }>, + country?: { + code?: string, + id?: number, }, + createdBy?: { + id?: number, + }, + dateCreated?: number, + dateUpdated?: number, + defaultTrial?: { + units?: 'day', + value?: number, + }, + description?: string, + frequency?: { + units?: 'month', + value?: number, + }, id?: number,

+ image?: { + default: string, + large: string, + medium: string, + small: string, url?: string, },

+ musicRights?: { productId?: string,

+ vendor?: 'audibleMagic', },

+ name?: string, + price?: { + currency?: string, + value?: number, + }, + sku?: string, + sortOrder?: number, + sources?: List<{ + accountId?: string, + name?: 'shopify' | 'amazon' | 'ios' | 'android' | 'organic' | 'free', productId?: string, + }>, + tags?: List<string>, + updatedBy?: { + id?: number, },

}, }

PATCH /plans/{id}/features

Updates the Plan’s features by plan id

Guard: none

PATCH /plans/{id}/features

Updates the Plan’s features by plan id

Guard: admin

POST /auth

Sign in with email address and password

Request Body
{

email?: string, password?: string, }
Response Body
{
  data: {
    family?: List<{
      id?: number,
-     image: {
-       default?: string,
-       large?: string,
-       medium?: string,
-       small?: string,

}, nickname?: string, }>, guid?: string, jwt?: string, mongoId?: string, - plan: {

features?: record, id?: number, name?: string, }, userId?: number, }, }

POST /auth

Sign in with email address and password

Request Body
{
+ commercial: {
+   Commercial Code?: string,
+ },
  email?: string,
  password?: string,
}
Response Body
{
  data: {
    family?: List<{
      id?: number,

+ image?: { + default: string, + large: string, + medium: string, + small: string, + url?: string, }, nickname?: string, }>, guid?: string, jwt?: string, mongoId?: string,

+ plan?: { features?: record, id?: number, name?: string, }, userId?: number, }, }

GET /auth/{sessionGuid}

Refresh the token

Response Body
{
  data: {
    family?: List<{
      id?: number,
-     image: {
-       default?: string,
-       large?: string,
-       medium?: string,
-       small?: string,

}, nickname?: string, }>, guid?: string, jwt?: string, mongoId?: string, - plan: {

features?: record, id?: number, name?: string, }, userId?: number, }, }

GET /auth/{sessionGuid}

Refresh the token

Response Body
{
  data: {
    family?: List<{
      id?: number,

+ image?: { + default: string, + large: string, + medium: string, + small: string, + url?: string, }, nickname?: string, }>, guid?: string, jwt?: string, mongoId?: string,

+ plan?: { features?: record, id?: number, name?: string, }, userId?: number, }, }

POST /auth/upgrade

Trade in your token from the legacy token for a session

Response Body
{
  data: {
    family?: List<{
      id?: number,
-     image: {
-       default?: string,
-       large?: string,
-       medium?: string,
-       small?: string,

}, nickname?: string, }>, guid?: string, jwt?: string, mongoId?: string, - plan: {

features?: record, id?: number, name?: string, }, userId?: number, }, }

POST /auth/upgrade

Trade in your token from the legacy token for a session

Response Body
{
  data: {
    family?: List<{
      id?: number,

+ image?: { + default: string, + large: string, + medium: string, + small: string, + url?: string, }, nickname?: string, }>, guid?: string, jwt?: string, mongoId?: string,

+ plan?: { features?: record, id?: number, name?: string, }, userId?: number, }, }

GET /instructors

Get a list of instructors

Response Body
{
  data: List<{
    bio?: string,

flags?: List<'connect' | 'reflect' | 'fitnation' | 'celebrity'>, id?: number, - image: { - default?: string, - large?: string, - medium?: string, - small?: string,

}, name?: string, - user: {

id?: number, },

}>, }

GET /instructors

Get a list of instructors

Response Body
{
  data: List<{
    bio?: string,
+   createdBy?: {
+     id?: number,
+   },
+   dateCreated?: number,
+   dateUpdated?: number,
    flags?: List<'connect' | 'reflect' | 'fitnation' | 'celebrity'>,
    id?: number,

+ image?: { + default: string, + large: string, + medium: string, + small: string, + url?: string, }, name?: string,

+ updatedBy?: { id?: number, }, + user?: { + id?: number, + }, }>, }

POST /instructors

Create a new instructor

Request Body
{
- bio: string,
- flags: List<'connect' | 'reflect' | 'fitnation' | 'celebrity'>,
- image: {
-   data?: string,
-   filename?: string,
- },

name?: string, - user: {

id?: number, }, }
Response Body
{
  data: {
    bio?: string,

flags?: List<'connect' | 'reflect' | 'fitnation' | 'celebrity'>, id?: number, - image: { - default?: string, - large?: string, - medium?: string, - small?: string,

}, name?: string, - user: {

id?: number, },

}, }

POST /instructors

Create a new instructor

Request Body
{

+ bio?: string, + flags?: List<'connect' | 'reflect' | 'fitnation' | 'celebrity'>, name?: string,

+ user?: { id?: number, }, }
Response Body
{
  data: {
    bio?: string,
+   createdBy?: {
+     id?: number,
+   },
+   dateCreated?: number,
+   dateUpdated?: number,
    flags?: List<'connect' | 'reflect' | 'fitnation' | 'celebrity'>,
    id?: number,

+ image?: { + default: string, + large: string, + medium: string, + small: string, + url?: string, }, name?: string,

+ updatedBy?: { id?: number, }, + user?: { + id?: number, + }, }, }

GET /instructors/{id}

Get a specific instructor

Response Body
{
  data: {
    bio?: string,

flags?: List<'connect' | 'reflect' | 'fitnation' | 'celebrity'>, id?: number, - image: { - default?: string, - large?: string, - medium?: string, - small?: string,

}, name?: string, - user: {

id?: number, },

}, }

GET /instructors/{id}

Get a specific instructor

Response Body
{
  data: {
    bio?: string,
+   createdBy?: {
+     id?: number,
+   },
+   dateCreated?: number,
+   dateUpdated?: number,
    flags?: List<'connect' | 'reflect' | 'fitnation' | 'celebrity'>,
    id?: number,

+ image?: { + default: string, + large: string, + medium: string, + small: string, + url?: string, }, name?: string,

+ updatedBy?: { id?: number, }, + user?: { + id?: number, + }, }, }

PATCH /instructors/{id}

Update an existing instructor

Guard: none

Request Body
{
  bio: string,
  flags: List<'connect' | 'reflect' | 'fitnation' | 'celebrity'>,
- image: {
-   data?: string,
-   filename?: string,
- },
  name: string,
  user: {
    id?: number,
  },
}
Response Body
{
  data: {
    bio?: string,

flags?: List<'connect' | 'reflect' | 'fitnation' | 'celebrity'>, id?: number, - image: { - default?: string, - large?: string, - medium?: string, - small?: string,

}, name?: string, - user: {

id?: number, },

}, }

PATCH /instructors/{id}

Update an existing instructor

Guard: admin

Request Body
{
  bio: string,
  flags: List<'connect' | 'reflect' | 'fitnation' | 'celebrity'>,

name: string, user: { id?: number, }, }
Response Body
{
  data: {
    bio?: string,
+   createdBy?: {
+     id?: number,
+   },
+   dateCreated?: number,
+   dateUpdated?: number,
    flags?: List<'connect' | 'reflect' | 'fitnation' | 'celebrity'>,
    id?: number,

+ image?: { + default: string, + large: string, + medium: string, + small: string, + url?: string, }, name?: string,

+ updatedBy?: { id?: number, }, + user?: { + id?: number, + }, }, }

GET /studios

Get a list of all studios

Response Body
{
  data: List<{
    code?: string,
-   country: {
-     code?: string,

id?: number, },

id?: number,

name?: string,

}>, }

GET /studios

Get a list of all studios

Response Body
{
  data: List<{
    code?: string,

+ createdBy?: { id?: number, }, + dateCreated?: number, + dateUpdated?: number, id?: number, + image?: { + default: string, + large: string, + medium: string, + small: string, + url?: string, + }, name?: string, + streetAddress?: { + city?: string, + country?: { + code?: string, + id?: number, + name?: string, + }, + postalCode?: string, + region?: { + code?: string, + name?: string, + }, + streetLine1?: string, + streetLine2?: string, + }, + updatedBy?: { + id?: number, + }, }>, }

GET /studios/{id}

Get this specific studio

Response Body
{
  data: {
    code?: string,
-   country: {
-     code?: string,

id?: number, },

id?: number,

name?: string,

}, }

GET /studios/{id}

Get this specific studio

Response Body
{
  data: {
    code?: string,

+ createdBy?: { id?: number, }, + dateCreated?: number, + dateUpdated?: number, id?: number, + image?: { + default: string, + large: string, + medium: string, + small: string, + url?: string, + }, name?: string, + streetAddress?: { + city?: string, + country?: { + code?: string, + id?: number, + name?: string, + }, + postalCode?: string, + region?: { + code?: string, + name?: string, + }, + streetLine1?: string, + streetLine2?: string, + }, + updatedBy?: { + id?: number, + }, }, }

GET /features

Get a list of all available features

Response Body
{
  data: List<{
-   code: string,

defaultValue: record, - description: string,

id?: number, - inputType: 'string' | 'number' | 'boolean' | 'enum', - name: string, - sortOrder: number, - usedBy: List<'client' | 'server'>, - validation: {

isNullable: bool, maxChoices: number, maxLength: number, maxValue: number, minChoices: number, minLength: number, minValue: number, options: List<string>, precision: number, regexPattern: string, }, }>, }

GET /features

Get a list of all available features

Response Body
{
  data: List<{

+ code?: string, defaultValue: record,

+ description?: string, id?: number,

+ inputType?: 'string' | 'number' | 'boolean' | 'enum', + name?: string, + sortOrder?: number, + usedBy?: List<'client' | 'server'>, + validation?: { isNullable: bool, maxChoices: number, maxLength: number, maxValue: number, minChoices: number, minLength: number, minValue: number, options: List<string>, precision: number, regexPattern: string, }, }>, }

POST /features

Create a new feature

Request Body
{
  code?: string,
  defaultValue: record,
- description: string,
- inputType: 'string' | 'number' | 'boolean' | 'enum',

name?: string, - sortOrder: number, - usedBy: List<'client' | 'server'>, - validation: {

isNullable: bool, maxChoices: number, maxLength: number, maxValue: number, minChoices: number, minLength: number, minValue: number, options: List<string>, precision: number, regexPattern: string, }, }
Response Body
{
  data: {
-   code: string,

defaultValue: record, - description: string,

id?: number, - inputType: 'string' | 'number' | 'boolean' | 'enum', - name: string, - sortOrder: number, - usedBy: List<'client' | 'server'>, - validation: {

isNullable: bool, maxChoices: number, maxLength: number, maxValue: number, minChoices: number, minLength: number, minValue: number, options: List<string>, precision: number, regexPattern: string, }, }, }

POST /features

Create a new feature

Request Body
{
  code?: string,
  defaultValue: record,

+ description?: string, + inputType?: 'string' | 'number' | 'boolean' | 'enum', name?: string,

+ sortOrder?: number, + usedBy?: List<'client' | 'server'>, + validation?: { isNullable: bool, maxChoices: number, maxLength: number, maxValue: number, minChoices: number, minLength: number, minValue: number, options: List<string>, precision: number, regexPattern: string, }, }
Response Body
{
  data: {

+ code?: string, defaultValue: record,

+ description?: string, id?: number,

+ inputType?: 'string' | 'number' | 'boolean' | 'enum', + name?: string, + sortOrder?: number, + usedBy?: List<'client' | 'server'>, + validation?: { isNullable: bool, maxChoices: number, maxLength: number, maxValue: number, minChoices: number, minLength: number, minValue: number, options: List<string>, precision: number, regexPattern: string, }, }, }

GET /features/{id}

Get a specific feature

Response Body
{
  data: {
-   code: string,

defaultValue: record, - description: string,

id?: number, - inputType: 'string' | 'number' | 'boolean' | 'enum', - name: string, - sortOrder: number, - usedBy: List<'client' | 'server'>, - validation: {

isNullable: bool, maxChoices: number, maxLength: number, maxValue: number, minChoices: number, minLength: number, minValue: number, options: List<string>, precision: number, regexPattern: string, }, }, }

GET /features/{id}

Get a specific feature

Response Body
{
  data: {

+ code?: string, defaultValue: record,

+ description?: string, id?: number,

+ inputType?: 'string' | 'number' | 'boolean' | 'enum', + name?: string, + sortOrder?: number, + usedBy?: List<'client' | 'server'>, + validation?: { isNullable: bool, maxChoices: number, maxLength: number, maxValue: number, minChoices: number, minLength: number, minValue: number, options: List<string>, precision: number, regexPattern: string, }, }, }

PUT /features/{id}

Update an existing feature

Request Body
{
- code: string,

defaultValue: record, - description: string, - inputType: 'string' | 'number' | 'boolean' | 'enum', - name: string, - sortOrder: number, - usedBy: List<'client' | 'server'>, - validation: {

isNullable: bool, maxChoices: number, maxLength: number, maxValue: number, minChoices: number, minLength: number, minValue: number, options: List<string>, precision: number, regexPattern: string, }, }
Response Body
{
  data: {
-   code: string,

defaultValue: record, - description: string,

id?: number, - inputType: 'string' | 'number' | 'boolean' | 'enum', - name: string, - sortOrder: number, - usedBy: List<'client' | 'server'>, - validation: {

isNullable: bool, maxChoices: number, maxLength: number, maxValue: number, minChoices: number, minLength: number, minValue: number, options: List<string>, precision: number, regexPattern: string, }, }, }

PUT /features/{id}

Update an existing feature

Request Body
{

+ code?: string, defaultValue: record,

+ description?: string, + inputType?: 'string' | 'number' | 'boolean' | 'enum', + name?: string, + sortOrder?: number, + usedBy?: List<'client' | 'server'>, + validation?: { isNullable: bool, maxChoices: number, maxLength: number, maxValue: number, minChoices: number, minLength: number, minValue: number, options: List<string>, precision: number, regexPattern: string, }, }
Response Body
{
  data: {

+ code?: string, defaultValue: record,

+ description?: string, id?: number,

+ inputType?: 'string' | 'number' | 'boolean' | 'enum', + name?: string, + sortOrder?: number, + usedBy?: List<'client' | 'server'>, + validation?: { isNullable: bool, maxChoices: number, maxLength: number, maxValue: number, minChoices: number, minLength: number, minValue: number, options: List<string>, precision: number, regexPattern: string, }, }, }

GET /songs

Get a list of songs

Response Body
{
  data: List<{
-   album: {

id?: number, name?: string, }, - artist: List<List<undefined>>, - coverArtUrl?: string, - duration: {

seconds: number, text: string, }, - genres: List<List<undefined>>,

id?: number, isExplicit?: bool, - isrc?: string, - label: {

id?: number, name?: string, }, - labelOwner: {

id?: number, name?: string, }, - licenseDetails: {

label: record, publisher: record, }, licensedIn?: List<string>, name?: string, yearPublished?: number, }>, }

GET /songs

Get a list of songs

Response Body
{
  data: List<{

+ album?: { id?: number, name?: string, },

+ artist?: List<{ + id?: number, + name?: string, + }>, + coverArt?: { + default: string, + large: string, + medium: string, + small: string, + url?: string, + }, + duration?: { seconds: number, text: string, },

+ genres?: List<{ + id?: number, + name?: string, + }>, id?: number, isExplicit?: bool,

+ isrcCode?: string, + label?: { id?: number, name?: string, },

+ labelOwner?: { id?: number, name?: string, },

+ licenseDetails?: { label: record, publisher: record, }, licensedIn?: List<string>, name?: string, yearPublished?: number, }>, }

GET /songs/{id}

Get a specific song

Response Body
{
  data: {
-   album: {

id?: number, name?: string, }, - artist: List<List<undefined>>, - coverArtUrl?: string, - duration: {

seconds: number, text: string, }, - genres: List<List<undefined>>,

id?: number, isExplicit?: bool, - isrc?: string, - label: {

id?: number, name?: string, }, - labelOwner: {

id?: number, name?: string, }, - licenseDetails: {

label: record, publisher: record, }, licensedIn?: List<string>, name?: string, yearPublished?: number, }, }

GET /songs/{id}

Get a specific song

Response Body
{
  data: {

+ album?: { id?: number, name?: string, },

+ artist?: List<{ + id?: number, + name?: string, + }>, + coverArt?: { + default: string, + large: string, + medium: string, + small: string, + url?: string, + }, + duration?: { seconds: number, text: string, },

+ genres?: List<{ + id?: number, + name?: string, + }>, id?: number, isExplicit?: bool,

+ isrcCode?: string, + label?: { id?: number, name?: string, },

+ labelOwner?: { id?: number, name?: string, },

+ licenseDetails?: { label: record, publisher: record, }, licensedIn?: List<string>, name?: string, yearPublished?: number, }, }

GET /songs/{id}/playlists

Get all playlists that contain this song

Response Body
{
  data: List<{
-   createdBy: {

id?: number, }, dateCreated?: number, - dateModified?: number,

id?: number, name?: string, - tracks: List<List<undefined>>, }>, }

GET /songs/{id}/playlists

Get all playlists that contain this song

Response Body
{
  data: List<{

+ content?: { + countries?: List<{ + code?: string, + }>, + createdBy?: { + id?: number, + }, + dateCreated?: number, + dateUpdated?: number, + description?: string, + guid?: string, + image?: { + default: string, + large: string, + medium: string, + small: string, + url?: string, + }, + instructors?: List<{ + id?: number, + name?: string, + }>, + keywords?: List<string>, + name?: string, + playlist?: { + id?: number, + name?: string, + }, + schedule?: List<{ + dateAvailable?: number, + type?: 'live' | 'vod' | 'encore', + }>, + status?: 'draft' | 'published', + studios?: List<{ + id?: number, + name?: string, + }>, + tags?: List<{ + text?: string, + type?: 'category', + value?: string, + }>, + updatedBy?: { + id?: number, + }, + videoLength?: { + id?: number, + name?: string, + }, + }, + createdBy?: { id?: number, }, dateCreated?: number,

+ dateUpdated?: number, id?: number, name?: string,

}>, }

GET /playlists

Get a list of playlists

Guard: none

Response Body
{
  data: List<{
-   createdBy: {

id?: number, }, dateCreated?: number, - dateModified?: number,

id?: number, name?: string, - tracks: List<List<undefined>>, }>, }

GET /playlists

Get a list of playlists

Guard: instructor

Response Body
{
  data: List<{

+ content?: { + countries?: List<{ + code?: string, + }>, + createdBy?: { + id?: number, + }, + dateCreated?: number, + dateUpdated?: number, + description?: string, + guid?: string, + image?: { + default: string, + large: string, + medium: string, + small: string, + url?: string, + }, + instructors?: List<{ + id?: number, + name?: string, + }>, + keywords?: List<string>, + name?: string, + playlist?: { + id?: number, + name?: string, + }, + schedule?: List<{ + dateAvailable?: number, + type?: 'live' | 'vod' | 'encore', + }>, + status?: 'draft' | 'published', + studios?: List<{ + id?: number, + name?: string, + }>, + tags?: List<{ + text?: string, + type?: 'category', + value?: string, + }>, + updatedBy?: { + id?: number, + }, + videoLength?: { + id?: number, + name?: string, + }, + }, + createdBy?: { id?: number, }, dateCreated?: number,

+ dateUpdated?: number, id?: number, name?: string,

}>, }

POST /playlists

Create a new playlist

Guard: none

Response Body
{
  data: {
-   createdBy: {

id?: number, }, dateCreated?: number, - dateModified?: number,

id?: number, name?: string, - tracks: List<List<undefined>>, }, }

POST /playlists

Create a new playlist

Guard: instructor

Response Body
{
  data: {

+ content?: { + countries?: List<{ + code?: string, + }>, + createdBy?: { + id?: number, + }, + dateCreated?: number, + dateUpdated?: number, + description?: string, + guid?: string, + image?: { + default: string, + large: string, + medium: string, + small: string, + url?: string, + }, + instructors?: List<{ + id?: number, + name?: string, + }>, + keywords?: List<string>, + name?: string, + playlist?: { + id?: number, + name?: string, + }, + schedule?: List<{ + dateAvailable?: number, + type?: 'live' | 'vod' | 'encore', + }>, + status?: 'draft' | 'published', + studios?: List<{ + id?: number, + name?: string, + }>, + tags?: List<{ + text?: string, + type?: 'category', + value?: string, + }>, + updatedBy?: { + id?: number, + }, + videoLength?: { + id?: number, + name?: string, + }, + }, + createdBy?: { id?: number, }, dateCreated?: number,

+ dateUpdated?: number, id?: number, name?: string,

}, }

GET /playlists/{id}

Get a specific playlist

Guard: none

Response Body
{
  data: {
-   createdBy: {

id?: number, }, dateCreated?: number, - dateModified?: number,

id?: number, name?: string, - tracks: List<List<undefined>>,

}, }

GET /playlists/{id}

Get a single playlist by ID

Guard: loggedIn

Response Body
{
  data: {

+ content?: { + countries?: List<{ + code?: string, + }>, + createdBy?: { + id?: number, + }, + dateCreated?: number, + dateUpdated?: number, + description?: string, + guid?: string, + image?: { + default: string, + large: string, + medium: string, + small: string, + url?: string, + }, + instructors?: List<{ + id?: number, + name?: string, + }>, + keywords?: List<string>, + name?: string, + playlist?: { + id?: number, + name?: string, + }, + schedule?: List<{ + dateAvailable?: number, + type?: 'live' | 'vod' | 'encore', + }>, + status?: 'draft' | 'published', + studios?: List<{ + id?: number, + name?: string, + }>, + tags?: List<{ + text?: string, + type?: 'category', + value?: string, + }>, + updatedBy?: { + id?: number, + }, + videoLength?: { + id?: number, + name?: string, + }, + }, + createdBy?: { id?: number, }, dateCreated?: number,

+ dateUpdated?: number, id?: number, name?: string,

+ tracks?: List<{ + dateCreated?: number, + song?: { + album?: { + id?: number, + name?: string, + }, + artist?: List<{ + id?: number, + name?: string, + }>, + coverArt?: { + default: string, + large: string, + medium: string, + small: string, + url?: string, + }, + duration?: { + seconds: number, + text: string, + }, + genres?: List<{ + id?: number, + name?: string, + }>, + id?: number, + isExplicit?: bool, + isrcCode?: string, + label?: { + id?: number, + name?: string, + }, + labelOwner?: { + id?: number, + name?: string, + }, + licenseDetails?: { + label: record, + publisher: record, + }, + licensedIn?: List<string>, + name?: string, + yearPublished?: number, + }, + trackOrder?: number, + }>, }, }

PATCH /playlists/{id}

Update an existing playlist

Guard: none

Response Body
{

}

PATCH /playlists/{id}

Update an existing playlist

Guard: instructor

Response Body
{

+ data: { + content?: { + countries?: List<{ + code?: string, + }>, + createdBy?: { + id?: number, + }, + dateCreated?: number, + dateUpdated?: number, + description?: string, + guid?: string, + image?: { + default: string, + large: string, + medium: string, + small: string, + url?: string, + }, + instructors?: List<{ + id?: number, + name?: string, + }>, + keywords?: List<string>, + name?: string, + playlist?: { + id?: number, + name?: string, + }, + schedule?: List<{ + dateAvailable?: number, + type?: 'live' | 'vod' | 'encore', + }>, + status?: 'draft' | 'published', + studios?: List<{ + id?: number, + name?: string, + }>, + tags?: List<{ + text?: string, + type?: 'category', + value?: string, + }>, + updatedBy?: { + id?: number, + }, + videoLength?: { + id?: number, + name?: string, + }, + }, + createdBy?: { + id?: number, + }, + dateCreated?: number, + dateUpdated?: number, + id?: number, + name?: string, + }, }

DELETE /playlists/{playlistId}/tracks/{songId}

Delete song from an existing playlist

Guard: none

DELETE /playlists/{playlistId}/tracks/{songId}

Remove song from a playlist

Guard: instructor

PUT /playlists/{playlistId}/tracks/{songId}

Edit the specific song on this playlist

Guard: none

Response Body
{
- data: List<{
-   addedBy?: number,
-   dateAdded?: number,
-   playlistId?: number,
-   songId?: number,
-   trackOrder: number,
- }>,

}

PUT /playlists/{playlistId}/tracks/{songId}

Guard: instructor

Response Body
{

+ data: { + dateCreated?: number, + song?: { + album?: { + id?: number, + name?: string, + }, + artist?: List<{ + id?: number, + name?: string, + }>, + coverArt?: { + default: string, + large: string, + medium: string, + small: string, + url?: string, + }, + duration?: { + seconds: number, + text: string, + }, + genres?: List<{ + id?: number, + name?: string, + }>, + id?: number, + isExplicit?: bool, + isrcCode?: string, + label?: { + id?: number, + name?: string, + }, + labelOwner?: { + id?: number, + name?: string, + }, + licenseDetails?: { + label: record, + publisher: record, + }, + licensedIn?: List<string>, + name?: string, + yearPublished?: number, + }, + trackOrder?: number, + }, }

GET /firmware

Get a list of the available firmware updates

Response Body
{
  data: List<{
-   appVersions: {
-     android: {

maxVersion?: string, minVersion?: string, }, - ios: {

maxVersion?: string, minVersion?: string, }, - screen: {

maxVersion?: string, minVersion?: string, }, },

dateReleased?: number, dateRequired?: number, id?: number, name?: string, releaseNotes?: string, status?: 'draft' | 'published' | 'trash', supportedModels?: List<string>, type?: 'hardware' | 'tablet' | 'reflect', - updateFile: { - data?: string, - filename?: string,

}, - url?: string, version?: string, }>, }

GET /firmware

Get a list of the available firmware updates

Response Body
{
  data: List<{

+ appVersions?: { + android?: { maxVersion?: string, minVersion?: string, },

+ ios?: { maxVersion?: string, minVersion?: string, },

+ screen?: { maxVersion?: string, minVersion?: string, }, }, + capabilities?: List<{ + data: record, + name?: string, + }>, dateReleased?: number, dateRequired?: number, id?: number, name?: string, releaseNotes?: string, status?: 'draft' | 'published' | 'trash', supportedModels?: List<string>, type?: 'hardware' | 'tablet' | 'reflect',

+ updateFile?: { + url?: string, },

version?: string, }>, }

POST /firmware

Create Firmware Update

Request Body
{
- appVersions: {
-   android: {

maxVersion?: string, minVersion?: string, }, - ios: {

maxVersion?: string, minVersion?: string, }, - screen: {

maxVersion?: string, minVersion?: string, }, },

dateReleased?: number, dateRequired?: number, name?: string, releaseNotes?: string, status?: 'draft' | 'published' | 'trash', supportedModels?: List<string>, type?: 'hardware' | 'tablet' | 'reflect', updateFile: { data?: string, filename?: string, }, version?: string, }
Response Body
{
  data: {
-   appVersions: {
-     android: {

maxVersion?: string, minVersion?: string, }, - ios: {

maxVersion?: string, minVersion?: string, }, - screen: {

maxVersion?: string, minVersion?: string, }, },

dateReleased?: number, dateRequired?: number, id?: number, name?: string, releaseNotes?: string, status?: 'draft' | 'published' | 'trash', supportedModels?: List<string>, type?: 'hardware' | 'tablet' | 'reflect', - updateFile: { - data?: string, - filename?: string,

}, - url?: string, version?: string, }, }

POST /firmware

Create Firmware Update

Request Body
{

+ appVersions?: { + android?: { maxVersion?: string, minVersion?: string, },

+ ios?: { maxVersion?: string, minVersion?: string, },

+ screen?: { maxVersion?: string, minVersion?: string, }, }, + capabilities?: List<{ + data: record, + name?: string, + }>, dateReleased?: number, dateRequired?: number, name?: string, releaseNotes?: string, status?: 'draft' | 'published' | 'trash', supportedModels?: List<string>, type?: 'hardware' | 'tablet' | 'reflect', updateFile: { data?: string, filename?: string, }, version?: string, }
Response Body
{
  data: {

+ appVersions?: { + android?: { maxVersion?: string, minVersion?: string, },

+ ios?: { maxVersion?: string, minVersion?: string, },

+ screen?: { maxVersion?: string, minVersion?: string, }, }, + capabilities?: List<{ + data: record, + name?: string, + }>, dateReleased?: number, dateRequired?: number, id?: number, name?: string, releaseNotes?: string, status?: 'draft' | 'published' | 'trash', supportedModels?: List<string>, type?: 'hardware' | 'tablet' | 'reflect',

+ updateFile?: { + url?: string, },

version?: string, }, }

GET /firmware/{id}

Get Firmware Update by ID

Response Body
{
  data: {
-   appVersions: {
-     android: {

maxVersion?: string, minVersion?: string, }, - ios: {

maxVersion?: string, minVersion?: string, }, - screen: {

maxVersion?: string, minVersion?: string, }, },

dateReleased?: number, dateRequired?: number, id?: number, name?: string, releaseNotes?: string, status?: 'draft' | 'published' | 'trash', supportedModels?: List<string>, type?: 'hardware' | 'tablet' | 'reflect', - updateFile: { - data?: string, - filename?: string,

}, - url?: string, version?: string, }, }

GET /firmware/{id}

Get Firmware Update by ID

Response Body
{
  data: {

+ appVersions?: { + android?: { maxVersion?: string, minVersion?: string, },

+ ios?: { maxVersion?: string, minVersion?: string, },

+ screen?: { maxVersion?: string, minVersion?: string, }, }, + capabilities?: List<{ + data: record, + name?: string, + }>, dateReleased?: number, dateRequired?: number, id?: number, name?: string, releaseNotes?: string, status?: 'draft' | 'published' | 'trash', supportedModels?: List<string>, type?: 'hardware' | 'tablet' | 'reflect',

+ updateFile?: { + url?: string, },

version?: string, }, }

PUT /firmware/{id}

Update Firmware Update

Request Body
{
- appVersions: {
-   android: {

maxVersion?: string, minVersion?: string, }, - ios: {

maxVersion?: string, minVersion?: string, }, - screen: {

maxVersion?: string, minVersion?: string, }, },

dateReleased?: number, dateRequired?: number, name?: string, releaseNotes?: string, status?: 'draft' | 'published' | 'trash', supportedModels?: List<string>, type?: 'hardware' | 'tablet' | 'reflect', updateFile: { data?: string, filename?: string, }, version?: string, }
Response Body
{
  data: {
-   appVersions: {
-     android: {

maxVersion?: string, minVersion?: string, }, - ios: {

maxVersion?: string, minVersion?: string, }, - screen: {

maxVersion?: string, minVersion?: string, }, },

dateReleased?: number, dateRequired?: number, id?: number, name?: string, releaseNotes?: string, status?: 'draft' | 'published' | 'trash', supportedModels?: List<string>, type?: 'hardware' | 'tablet' | 'reflect', - updateFile: { - data?: string, - filename?: string,

}, - url?: string, version?: string, }, }

PUT /firmware/{id}

Update Firmware Update

Request Body
{

+ appVersions?: { + android?: { maxVersion?: string, minVersion?: string, },

+ ios?: { maxVersion?: string, minVersion?: string, },

+ screen?: { maxVersion?: string, minVersion?: string, }, }, + capabilities?: List<{ + data: record, + name?: string, + }>, dateReleased?: number, dateRequired?: number, name?: string, releaseNotes?: string, status?: 'draft' | 'published' | 'trash', supportedModels?: List<string>, type?: 'hardware' | 'tablet' | 'reflect', updateFile: { data?: string, filename?: string, }, version?: string, }
Response Body
{
  data: {

+ appVersions?: { + android?: { maxVersion?: string, minVersion?: string, },

+ ios?: { maxVersion?: string, minVersion?: string, },

+ screen?: { maxVersion?: string, minVersion?: string, }, }, + capabilities?: List<{ + data: record, + name?: string, + }>, dateReleased?: number, dateRequired?: number, id?: number, name?: string, releaseNotes?: string, status?: 'draft' | 'published' | 'trash', supportedModels?: List<string>, type?: 'hardware' | 'tablet' | 'reflect',

+ updateFile?: { + url?: string, },

version?: string, }, }
51 added endpoints
Added endpoints

PATCH /users/{userId}/preferences

Save / updates the preferences for this user

Guard: selfOrAdmin

Response Body
{
  data: {
    anotherSetting?: List<string>,
    flatResistance?: record,
    hillResistance?: record,
    leaderboardDisplay?: record,
    showStats?: record,
  },
}

GET /users/{userId}/preferences/full

Get a list of the user preferences

Guard: selfOrAdmin

POST /users

Request Body
{
  billingAddress: {
    city: string,
    country: {
      code?: string,
    },
    postalCode: string,
    region: {
      code?: string,
    },
    streetLine1: string,
    streetLine2: string,
  },
  dateBirth: string,
  email?: string,
  firstName: string,
  gender: {
    value?: 'm' | 'f' | 'o',
  },
  height: {
    units?: 'in' | 'cm',
    value?: number,
  },
  image: {
    default: string,
    large: string,
    medium: string,
    small: string,
    url?: string,
  },
  lastName: string,
  mongoId: string,
  nickname: string,
  parent: {
    id?: number,
    mongoId?: string,
  },
  password?: string,
  phoneNumber: string,
  purchaseHistory: List<{
    datePurchased?: number,
    name?: string,
    retailer?: {
      id?: number,
      name?: string,
    },
    serialNumber?: string,
  }>,
  roles: List<string>,
  weight: {
    units?: 'lb' | 'kg',
    value?: number,
  },
}
Response Body
{
  data: {
    billingAddress?: {
      city?: string,
      country?: {
        code?: string,
        id?: number,
        name?: string,
      },
      postalCode?: string,
      region?: {
        code?: string,
        name?: string,
      },
      streetLine1?: string,
      streetLine2?: string,
    },
    createdBy?: {
      id?: number,
    },
    dateActivated?: number,
    dateBirth: string,
    dateCreated?: number,
    dateUpdated?: number,
    email?: string,
    firstName?: string,
    gender?: {
      text: string,
      value?: 'm' | 'f' | 'o',
    },
    height?: {
      text?: string,
      units?: 'in' | 'cm',
      value?: number,
    },
    id?: number,
    image?: {
      default: string,
      large: string,
      medium: string,
      small: string,
      url?: string,
    },
    lastName?: string,
    mongoId?: string,
    nickname?: string,
    parent?: {
      id?: number,
      mongoId?: string,
    },
    phoneNumber?: string,
    purchaseHistory?: List<{
      datePurchased?: number,
      name?: string,
      retailer?: {
        id?: number,
        name?: string,
      },
      serialNumber?: string,
    }>,
    roles?: List<string>,
    stripe?: {
      customerId?: string,
    },
    updatedBy?: {
      id?: number,
    },
    weight?: {
      text?: string,
      units?: 'lb' | 'kg',
      value?: number,
    },
  },
}

PATCH /plans

Update plans in bulk.

Guard: admin

Request Body
{
  data?: {
    billingProviders: List<{
      accountId?: string,
      name?: 'stripe' | 'ios' | 'android' | 'amazon',
      priceId?: string,
      productId?: string,
    }>,
    country: {
      code?: string,
      id?: number,
    },
    defaultTrial: {
      units?: 'day',
      value?: number,
    },
    description: string,
    frequency: {
      units?: 'month',
      value?: number,
    },
    image: {
      default: string,
      large: string,
      medium: string,
      small: string,
      url?: string,
    },
    musicRights: {
      productId?: string,
      vendor?: 'audibleMagic',
    },
    name: string,
    price: {
      currency?: string,
      value?: number,
    },
    sku: string,
    sortOrder: number,
    sources: List<{
      accountId?: string,
      name?: 'shopify' | 'amazon' | 'ios' | 'android' | 'organic' | 'free',
      productId?: string,
    }>,
    tags: List<string>,
  },
  where?: {
    countryCode: string,
    ids: List<number>,
  },
}
Response Body
{
  data: {
    affected?: number,
  },
}

GET /preferences

Get a list of possible preferences

Response Body
{
  data: List<{
    code?: string,
    defaultValue: record,
    description?: string,
    group?: {
      id?: number,
    },
    id?: number,
    inputType?: 'string' | 'number' | 'boolean' | 'enum',
    name?: string,
    sortOrder?: number,
    validation?: {
      isNullable: bool,
      maxChoices: number,
      maxLength: number,
      maxValue: number,
      minChoices: number,
      minLength: number,
      minValue: number,
      options: List<string>,
      precision: number,
      regexPattern: string,
    },
  }>,
}

POST /preferences

Add a new preference

Request Body
{
  code?: string,
  defaultValue: record,
  description?: string,
  group?: {
    id?: number,
  },
  inputType?: 'string' | 'number' | 'boolean' | 'enum',
  name?: string,
  sortOrder?: number,
  validation?: {
    isNullable: bool,
    maxChoices: number,
    maxLength: number,
    maxValue: number,
    minChoices: number,
    minLength: number,
    minValue: number,
    options: List<string>,
    precision: number,
    regexPattern: string,
  },
}
Response Body
{
  data: {
    code?: string,
    defaultValue: record,
    description?: string,
    group?: {
      id?: number,
    },
    id?: number,
    inputType?: 'string' | 'number' | 'boolean' | 'enum',
    name?: string,
    sortOrder?: number,
    validation?: {
      isNullable: bool,
      maxChoices: number,
      maxLength: number,
      maxValue: number,
      minChoices: number,
      minLength: number,
      minValue: number,
      options: List<string>,
      precision: number,
      regexPattern: string,
    },
  },
}

GET /preferences/{id}

Get a specific preference

Response Body
{
  data: {
    code?: string,
    defaultValue: record,
    description?: string,
    group?: {
      id?: number,
    },
    id?: number,
    inputType?: 'string' | 'number' | 'boolean' | 'enum',
    name?: string,
    sortOrder?: number,
    validation?: {
      isNullable: bool,
      maxChoices: number,
      maxLength: number,
      maxValue: number,
      minChoices: number,
      minLength: number,
      minValue: number,
      options: List<string>,
      precision: number,
      regexPattern: string,
    },
  },
}

PUT /preferences/{id}

Edit a preference as a replacement for previous value.

Request Body
{
  code?: string,
  defaultValue: record,
  description?: string,
  group?: {
    id?: number,
  },
  inputType?: 'string' | 'number' | 'boolean' | 'enum',
  name?: string,
  sortOrder?: number,
  validation?: {
    isNullable: bool,
    maxChoices: number,
    maxLength: number,
    maxValue: number,
    minChoices: number,
    minLength: number,
    minValue: number,
    options: List<string>,
    precision: number,
    regexPattern: string,
  },
}
Response Body
{
  data: {
    code?: string,
    defaultValue: record,
    description?: string,
    group?: {
      id?: number,
    },
    id?: number,
    inputType?: 'string' | 'number' | 'boolean' | 'enum',
    name?: string,
    sortOrder?: number,
    validation?: {
      isNullable: bool,
      maxChoices: number,
      maxLength: number,
      maxValue: number,
      minChoices: number,
      minLength: number,
      minValue: number,
      options: List<string>,
      precision: number,
      regexPattern: string,
    },
  },
}

PATCH /preferences/{id}

Edit a preference as an overlay of the previous value.

Request Body
{
  code: string,
  defaultValue: record,
  description: string,
  group: {
    id?: number,
  },
  inputType: 'string' | 'number' | 'boolean' | 'enum',
  name: string,
  sortOrder: number,
  validation: {
    isNullable: bool,
    maxChoices: number,
    maxLength: number,
    maxValue: number,
    minChoices: number,
    minLength: number,
    minValue: number,
    options: List<string>,
    precision: number,
    regexPattern: string,
  },
}
Response Body
{
  data: {
    code?: string,
    defaultValue: record,
    description?: string,
    group?: {
      id?: number,
    },
    id?: number,
    inputType?: 'string' | 'number' | 'boolean' | 'enum',
    name?: string,
    sortOrder?: number,
    validation?: {
      isNullable: bool,
      maxChoices: number,
      maxLength: number,
      maxValue: number,
      minChoices: number,
      minLength: number,
      minValue: number,
      options: List<string>,
      precision: number,
      regexPattern: string,
    },
  },
}

DELETE /instructors/{id}

Delete an instructor

Guard: admin

POST /studios

Create new studio

Guard: admin

Request Body
{
  code?: string,
  createdBy?: {
    id?: number,
  },
  dateCreated?: number,
  dateUpdated?: number,
  image?: {
    default: string,
    large: string,
    medium: string,
    small: string,
    url?: string,
  },
  name?: string,
  streetAddress?: {
    city?: string,
    country?: {
      code?: string,
    },
    postalCode?: string,
    region?: {
      code?: string,
    },
    streetLine1?: string,
    streetLine2?: string,
  },
  updatedBy?: {
    id?: number,
  },
}
Response Body
{
  data: {
    code?: string,
    createdBy?: {
      id?: number,
    },
    dateCreated?: number,
    dateUpdated?: number,
    id?: number,
    image?: {
      default: string,
      large: string,
      medium: string,
      small: string,
      url?: string,
    },
    name?: string,
    streetAddress?: {
      city?: string,
      country?: {
        code?: string,
        id?: number,
        name?: string,
      },
      postalCode?: string,
      region?: {
        code?: string,
        name?: string,
      },
      streetLine1?: string,
      streetLine2?: string,
    },
    updatedBy?: {
      id?: number,
    },
  },
}

PATCH /studios/{id}

Edit studio

Guard: admin

Request Body
{
  code?: string,
  createdBy?: {
    id?: number,
  },
  dateCreated?: number,
  dateUpdated?: number,
  image?: {
    default: string,
    large: string,
    medium: string,
    small: string,
    url?: string,
  },
  name?: string,
  streetAddress?: {
    city?: string,
    country?: {
      code?: string,
    },
    postalCode?: string,
    region?: {
      code?: string,
    },
    streetLine1?: string,
    streetLine2?: string,
  },
  updatedBy?: {
    id?: number,
  },
}
Response Body
{
  data: {
    code?: string,
    createdBy?: {
      id?: number,
    },
    dateCreated?: number,
    dateUpdated?: number,
    id?: number,
    image?: {
      default: string,
      large: string,
      medium: string,
      small: string,
      url?: string,
    },
    name?: string,
    streetAddress?: {
      city?: string,
      country?: {
        code?: string,
        id?: number,
        name?: string,
      },
      postalCode?: string,
      region?: {
        code?: string,
        name?: string,
      },
      streetLine1?: string,
      streetLine2?: string,
    },
    updatedBy?: {
      id?: number,
    },
  },
}

POST /songs/{id}/sample

Get a sample of a song

Response Body
{
  data: {
    url?: string,
  },
}

POST /songs/{id}/playback

Get a link to a song's playback

Response Body
{
  data: {
    url?: string,
  },
}

PATCH /firmware/{id}

Update Firmware Update

Request Body
{
  appVersions: {
    android?: {
      maxVersion?: string,
      minVersion?: string,
    },
    ios?: {
      maxVersion?: string,
      minVersion?: string,
    },
    screen?: {
      maxVersion?: string,
      minVersion?: string,
    },
  },
  capabilities: List<{
    data: record,
    name?: string,
  }>,
  dateReleased: number,
  dateRequired: number,
  name: string,
  releaseNotes: string,
  status: 'draft' | 'published' | 'trash',
  supportedModels: List<string>,
  type: 'hardware' | 'tablet' | 'reflect',
  updateFile: {
    data?: string,
    filename?: string,
  },
  version: string,
}
Response Body
{
  data: {
    appVersions?: {
      android?: {
        maxVersion?: string,
        minVersion?: string,
      },
      ios?: {
        maxVersion?: string,
        minVersion?: string,
      },
      screen?: {
        maxVersion?: string,
        minVersion?: string,
      },
    },
    capabilities?: List<{
      data: record,
      name?: string,
    }>,
    dateReleased?: number,
    dateRequired?: number,
    id?: number,
    name?: string,
    releaseNotes?: string,
    status?: 'draft' | 'published' | 'trash',
    supportedModels?: List<string>,
    type?: 'hardware' | 'tablet' | 'reflect',
    updateFile?: {
      url?: string,
    },
    version?: string,
  },
}

GET /brightback/{userId}/{subId}

Get URL for user cancel/save workflow.

Response Body
{
  data: string,
}

GET /content/items

Get list of content items

Guard: loggedIn

Response Body
{
  data: List<{
    countries?: List<{
      code?: string,
    }>,
    createdBy?: {
      id?: number,
    },
    dateCreated?: number,
    dateUpdated?: number,
    description?: string,
    guid?: string,
    image?: {
      default: string,
      large: string,
      medium: string,
      small: string,
      url?: string,
    },
    instructors?: List<{
      id?: number,
      name?: string,
    }>,
    keywords?: List<string>,
    name?: string,
    playlist?: {
      id?: number,
      name?: string,
    },
    schedule?: List<{
      dateAvailable?: number,
      type?: 'live' | 'vod' | 'encore',
    }>,
    status?: 'draft' | 'published',
    studios?: List<{
      id?: number,
      name?: string,
    }>,
    tags?: List<{
      text?: string,
      type?: 'category',
      value?: string,
    }>,
    updatedBy?: {
      id?: number,
    },
    videoLength?: {
      id?: number,
      name?: string,
    },
  }>,
}

GET /content/items/{guid}

Get a specific content item

Response Body
{
  data: List<{
    countries?: List<{
      code?: string,
    }>,
    createdBy?: {
      id?: number,
    },
    dateCreated?: number,
    dateUpdated?: number,
    description?: string,
    guid?: string,
    image?: {
      default: string,
      large: string,
      medium: string,
      small: string,
      url?: string,
    },
    instructors?: List<{
      id?: number,
      name?: string,
    }>,
    keywords?: List<string>,
    name?: string,
    playlist?: {
      id?: number,
      name?: string,
    },
    schedule?: List<{
      dateAvailable?: number,
      type?: 'live' | 'vod' | 'encore',
    }>,
    status?: 'draft' | 'published',
    studios?: List<{
      id?: number,
      name?: string,
    }>,
    tags?: List<{
      text?: string,
      type?: 'category',
      value?: string,
    }>,
    updatedBy?: {
      id?: number,
    },
    videoLength?: {
      id?: number,
      name?: string,
    },
  }>,
}

GET /content/recommendations

Get content recommended for this user.

Guard: selfOrAdmin

Response Body
{
  data: List<{
    countries?: List<{
      code?: string,
    }>,
    createdBy?: {
      id?: number,
    },
    dateCreated?: number,
    dateUpdated?: number,
    description?: string,
    guid?: string,
    image?: {
      default: string,
      large: string,
      medium: string,
      small: string,
      url?: string,
    },
    instructors?: List<{
      id?: number,
      name?: string,
    }>,
    keywords?: List<string>,
    name?: string,
    playlist?: {
      id?: number,
      name?: string,
    },
    schedule?: List<{
      dateAvailable?: number,
      type?: 'live' | 'vod' | 'encore',
    }>,
    status?: 'draft' | 'published',
    studios?: List<{
      id?: number,
      name?: string,
    }>,
    tags?: List<{
      text?: string,
      type?: 'category',
      value?: string,
    }>,
    updatedBy?: {
      id?: number,
    },
    videoLength?: {
      id?: number,
      name?: string,
    },
  }>,
}

PUT /workouts/{workoutGuid}

Updates a user workout

Request Body
{
  device?: {
    app_version?: string,
    model?: string,
    os?: string,
    os_version?: string,
  },
  peripheral?: List<{
    data_points?: List<unknown>,
    events?: List<{
      timestamp?: number,
      type?: 'resistance' | 'speed' | 'incline' | 'pause' | 'connection',
      value?: number,
    }>,
    info?: {
      firmware_version?: string,
      hardware_version?: string,
      model_id?: string,
    },
    metrics?: List<unknown>,
    name?: string,
    type?: 'bike' | 'rower' | 'treadmill' | 'hrm',
    uuid?: string,
  }>,
  user?: {
    id: number,
    subscription_active?: bool,
    weight?: number,
  },
  workout?: {
    class_library?: string,
    end_date?: number,
    events?: List<{
      msg: string,
      timestamp?: number,
      type?: 'started' | 'paused' | 'completed' | 'social',
      user: record,
    }>,
    id?: string,
    metadata?: {
      desc?: string,
      id?: number,
      instructor?: string,
      playlist_id?: number,
      promo?: bool,
      title?: string,
    },
    product_name?: string,
    start_date?: number,
  },
}

GET /redemption-codes

Get a list of redemption codes

Guard: admin

Response Body
{
  data: List<{
    batchGuid?: string,
    campaignCode?: string,
    code?: string,
    createdBy?: {
      id?: number,
    },
    dateCreated?: number,
    delayBillingDays?: number,
    eligibilityRequirements: record,
    plans?: List<{
      id?: number,
    }>,
    redeemedBy?: {
      id?: number,
    },
    referenceNumber?: string,
    retailer?: {
      bundleDays: number,
      id?: number,
      name: string,
    },
    serialNumber?: string,
    status?: 'inactive' | 'active' | 'redeemed' | 'deleted',
    stripeCoupon?: string,
    subscription?: {
      id?: number,
    },
  }>,
}

PUT /redemption-codes

Create one or more redemption codes. Used for importing pre-generated codes.

Guard: admin

Request Body
{
  campaignCode?: string,
  codes?: List<string>,
  createdById?: number,
  delayBillingDays?: number,
  eligibilityRequirements: record,
  planIds?: List<number>,
  retailerId?: number,
  status?: 'inactive' | 'active' | 'redeemed' | 'deleted',
  stripeCoupon: string,
}
Response Body
{
  data: string,
}

PATCH /redemption-codes

Guard: admin

Request Body
{
  data?: {
    campaignCode: string,
    delayBillingDays: number,
    eligibilityRequirements: record,
    plans: List<{
      id?: number,
    }>,
    redeemedBy: {
      id?: number,
    },
    referenceNumber: string,
    retailer: {
      id?: number,
    },
    serialNumber: string,
    status: 'inactive' | 'active' | 'redeemed' | 'deleted',
    stripeCoupon: string,
    subscription: {
      id?: number,
    },
  },
  where?: {
    batchGuid: string,
    campaignCode: string,
    codes: List<string>,
    prefix: string,
    retailerId: number,
  },
}
Response Body
{
  data: {
    affected?: number,
  },
}

GET /redemption-codes/{code}

Get a single Redemption Code

Guard: admin

Response Body
{
  data: {
    batchGuid?: string,
    campaignCode?: string,
    code?: string,
    createdBy?: {
      id?: number,
    },
    dateCreated?: number,
    delayBillingDays?: number,
    eligibilityRequirements: record,
    plans?: List<{
      id?: number,
    }>,
    redeemedBy?: {
      id?: number,
    },
    referenceNumber?: string,
    retailer?: {
      bundleDays: number,
      id?: number,
      name: string,
    },
    serialNumber?: string,
    status?: 'inactive' | 'active' | 'redeemed' | 'deleted',
    stripeCoupon?: string,
    subscription?: {
      id?: number,
    },
  },
}

PATCH /redemption-codes/{code}

Update an individual Redemption Code

Guard: admin

Request Body
{
  campaignCode: string,
  delayBillingDays: number,
  eligibilityRequirements: record,
  plans: List<{
    id?: number,
  }>,
  redeemedBy: {
    id?: number,
  },
  referenceNumber: string,
  retailer: {
    id?: number,
  },
  serialNumber: string,
  status: 'inactive' | 'active' | 'redeemed' | 'deleted',
  stripeCoupon: string,
  subscription: {
    id?: number,
  },
}
Response Body
{
  data: {
    batchGuid?: string,
    campaignCode?: string,
    code?: string,
    createdBy?: {
      id?: number,
    },
    dateCreated?: number,
    delayBillingDays?: number,
    eligibilityRequirements: record,
    plans?: List<{
      id?: number,
    }>,
    redeemedBy?: {
      id?: number,
    },
    referenceNumber?: string,
    retailer?: {
      bundleDays: number,
      id?: number,
      name: string,
    },
    serialNumber?: string,
    status?: 'inactive' | 'active' | 'redeemed' | 'deleted',
    stripeCoupon?: string,
    subscription?: {
      id?: number,
    },
  },
}

DELETE /redemption-codes/{code}

Soft delete a single code

Guard: admin

POST /redemption-codes/{code}/redemption

Redeem a single code

Guard: loggedIn

Request Body
{
  planId?: number,
  serialNumber: string,
}
Response Body
{
  data: {

  },
}

GET /redemption-codes/{code}/redemption

Check if a redemption code is available to be redeemed. Returns the status of a redemption code, not a redemption code itself.

Response Body
{
  data: {
    batchGuid?: string,
    campaignCode?: string,
    code?: string,
    createdBy?: {
      id?: number,
    },
    dateCreated?: number,
    delayBillingDays?: number,
    eligibilityRequirements: record,
    plans?: List<{
      id?: number,
    }>,
    redeemedBy?: {
      id?: number,
    },
    referenceNumber?: string,
    retailer?: {
      bundleDays: number,
      id?: number,
      name: string,
    },
    serialNumber?: string,
    status?: 'inactive' | 'active' | 'redeemed' | 'deleted',
    stripeCoupon?: string,
    subscription?: {
      id?: number,
    },
  },
}

POST /redemption-codes/{code}/activation

Activate a single redemption code

Guard: admin

POST /redemption-codes/create

Create one or more redemption codes

Guard: admin

Request Body
{
  campaignCode: string,
  codeLength?: number,
  count?: number,
  delayBillingDays?: number,
  eligibilityRequirements: record,
  plans?: List<{
    id?: number,
  }>,
  prefix: string,
  retailer?: {
    id?: number,
  },
  status?: 'inactive' | 'active' | 'redeemed' | 'deleted',
  stripeCoupon: string,
}

GET /subscriptions/{id}

Get a susbcription

Guard: admin

Response Body
{
  data: {
    activation?: {
      isActivated?: bool,
    },
    billingProvider?: {
      accountId?: string,
      customerId?: string,
      name?: 'stripe' | 'ios' | 'android' | 'amazon',
      orderId?: string,
    },
    cancellation?: {
      dateCancelled?: number,
      feedback?: string,
      reason?: string,
    },
    createdBy?: {
      id?: number,
    },
    dateCreated?: number,
    dateUpdated?: number,
    id?: number,
    pause?: {
      dateEnd?: number,
      dateStart?: number,
      reason?: string,
    },
    plan?: {
      id?: number,
    },
    price?: {
      currency?: string,
      value?: number,
    },
    promotion?: {
      id?: number,
    },
    renewal?: 'auto' | 'paused' | 'cancelled' | 'failed',
    source?: {
      accountId?: string,
      lineItemId?: string,
      name?: 'shopify' | 'amazon' | 'ios' | 'android' | 'organic' | 'free',
      orderId?: string,
      productId?: string,
    },
    status?: 'pending' | 'trialing' | 'active' | 'expired',
    term?: {
      dateEnd?: number,
      dateStart?: number,
    },
    token?: string,
    trial?: {
      dateEnd?: number,
      dateStart?: number,
    },
    updatedBy?: {
      id?: number,
    },
    user?: {
      id?: number,
    },
  },
}

GET /subscriptions/{id}/history

Get a subscription history by subscription ID

Guard: admin

Response Body
{
  data: List<{
    action?: 'paused' | 'planChanged' | 'created' | 'canceled' | 'discounted',
    dateOccurred?: number,
    initiatedBy?: {
      id?: number,
    },
    reason: string,
    source: 'stripe.com' | 'admin.echelonfit.com' | 'falcon1.echelonfit.com' | 'member.echelonfit.com' | 'stag.member.echelonfit.com',
    subscription?: {
      id?: number,
    },
    user?: {
      id?: number,
    },
  }>,
}

POST /subscriptions/{id}/history

Create Subscription History

Request Body
{
  action?: 'paused' | 'planChanged' | 'created' | 'canceled' | 'discounted',
  dateOccurred?: number,
  initiatedBy?: {
    id?: number,
  },
  payload: record,
  rawJson: record,
  reason: string,
  source: 'stripe.com' | 'admin.echelonfit.com' | 'falcon1.echelonfit.com' | 'member.echelonfit.com' | 'stag.member.echelonfit.com',
  subscription?: {
    id?: number,
  },
  user?: {
    id?: number,
  },
}
Response Body
{
  data: {
    action?: 'paused' | 'planChanged' | 'created' | 'canceled' | 'discounted',
    dateOccurred?: number,
    initiatedBy?: {
      id?: number,
    },
    reason: string,
    source: 'stripe.com' | 'admin.echelonfit.com' | 'falcon1.echelonfit.com' | 'member.echelonfit.com' | 'stag.member.echelonfit.com',
    subscription?: {
      id?: number,
    },
    user?: {
      id?: number,
    },
  },
}

GET /retailers

Get a list of retailers

Response Body
{
  data: List<{
    brand?: {
      id?: number,
      name?: string,
    },
    bundleDays?: number,
    country?: {
      code?: string,
      id?: number,
    },
    dateCreated?: number,
    id?: number,
    image?: {
      default: string,
      large: string,
      medium: string,
      small: string,
      url?: string,
    },
    isActive?: bool,
    name?: string,
  }>,
}

GET /retailers/{id}

Get an individual retailer

Guard: loggedIn

Response Body
{
  data: {
    brand?: {
      id?: number,
      name?: string,
    },
    bundleDays?: number,
    country?: {
      code?: string,
      id?: number,
    },
    dateCreated?: number,
    id?: number,
    image?: {
      default: string,
      large: string,
      medium: string,
      small: string,
      url?: string,
    },
    isActive?: bool,
    name?: string,
  },
}

GET /users/{userId}/relationships

Retrieve valid relationships by userId

Response Body
{
  data: List<{
    type?: 'friends' | 'outgoing-request' | 'incoming-request' | 'blocked',
    user?: {
      id?: number,
      name?: string,
    },
  }>,
}

PUT /users/{userId}/relationships/{targetId}

Update or create a relationship

Request Body
{
  status?: 'accepted' | 'blocked' | 'requested',
}
Response Body
{
  data: {
    type?: 'friends' | 'outgoing-request' | 'incoming-request' | 'blocked',
    user?: {
      id?: number,
      name?: string,
    },
  },
}

DELETE /users/{userId}/relationships/{receiverUserId}

Delete a relationship.

GET /equipment/models

Get a list of all available Equipment

Response Body
{
  data: List<{
    dateAvailable?: number,
    id?: number,
    image?: {
      default: string,
      large: string,
      medium: string,
      small: string,
      url?: string,
    },
    name?: string,
    plans?: List<{
      id?: number,
    }>,
  }>,
}

GET /equipment/models/{id}

Get a specific model of equipment

Response Body
{
  data: {
    dateAvailable?: number,
    id?: number,
    image?: {
      default: string,
      large: string,
      medium: string,
      small: string,
      url?: string,
    },
    name?: string,
    plans?: List<{
      id?: number,
    }>,
  },
}

GET /brands

Get all brands

Response Body
{
  data: List<{
    alias?: string,
    createdBy?: {
      id?: number,
    },
    dateCreated?: number,
    dateUpdated?: number,
    id?: number,
    image?: {
      default: string,
      large: string,
      medium: string,
      small: string,
      url?: string,
    },
    isActive?: bool,
    name?: string,
    updatedBy?: {
      id?: number,
    },
  }>,
}

POST /brands

Create a new brand

Guard: admin

Request Body
{
  alias?: string,
  image: {
    data?: string,
    filename?: string,
  },
  isActive?: bool,
  name?: string,
}
Response Body
{
  data: {
    alias?: string,
    createdBy?: {
      id?: number,
    },
    dateCreated?: number,
    dateUpdated?: number,
    id?: number,
    image?: {
      default: string,
      large: string,
      medium: string,
      small: string,
      url?: string,
    },
    isActive?: bool,
    name?: string,
    updatedBy?: {
      id?: number,
    },
  },
}

GET /brands/{id}

Get a specific brand

Response Body
{
  data: {
    alias?: string,
    createdBy?: {
      id?: number,
    },
    dateCreated?: number,
    dateUpdated?: number,
    id?: number,
    image?: {
      default: string,
      large: string,
      medium: string,
      small: string,
      url?: string,
    },
    isActive?: bool,
    name?: string,
    updatedBy?: {
      id?: number,
    },
  },
}

PATCH /brands/{id}

Edit a brand (overlay)

Guard: admin

Request Body
{
  alias: string,
  image: {
    data?: string,
    filename?: string,
  },
  isActive: bool,
  name: string,
}
Response Body
{
  data: {
    alias?: string,
    createdBy?: {
      id?: number,
    },
    dateCreated?: number,
    dateUpdated?: number,
    id?: number,
    image?: {
      default: string,
      large: string,
      medium: string,
      small: string,
      url?: string,
    },
    isActive?: bool,
    name?: string,
    updatedBy?: {
      id?: number,
    },
  },
}

PUT /brands/{id}

Edit a brand (replace)

Guard: admin

Request Body
{
  alias?: string,
  image?: {
    data?: string,
    filename?: string,
  },
  isActive?: bool,
  name?: string,
}
Response Body
{
  data: {
    alias?: string,
    createdBy?: {
      id?: number,
    },
    dateCreated?: number,
    dateUpdated?: number,
    id?: number,
    image?: {
      default: string,
      large: string,
      medium: string,
      small: string,
      url?: string,
    },
    isActive?: bool,
    name?: string,
    updatedBy?: {
      id?: number,
    },
  },
}

DELETE /brands/{id}

Delete a brand

Guard: admin

GET /equipment/categories

Get all equipment categories.

Response Body
{
  data: List<{
    contentTag?: string,
    dateCreated?: number,
    dateUpdated?: number,
    guid?: string,
    image?: {
      default: string,
      large: string,
      medium: string,
      small: string,
      url?: string,
    },
    isActive?: bool,
    legacyContentTag?: string,
    name?: string,
    sortOrder?: number,
    updatedBy?: {
      id?: number,
    },
  }>,
}

POST /equipment/categories

Create a new category

Guard: admin

Request Body
{
  contentTag?: string,
  image: {
    data?: string,
    filename?: string,
  },
  isActive?: bool,
  legacyContentTag?: string,
  name?: string,
  sortOrder: number,
  updatedBy?: {
    id?: number,
  },
}
Response Body
{
  data: {
    contentTag?: string,
    dateCreated?: number,
    dateUpdated?: number,
    guid?: string,
    image?: {
      default: string,
      large: string,
      medium: string,
      small: string,
      url?: string,
    },
    isActive?: bool,
    legacyContentTag?: string,
    name?: string,
    sortOrder?: number,
    updatedBy?: {
      id?: number,
    },
  },
}

GET /equipment/categories/{id}

Get a equipment category by its ID.

Guard: loggedIn

Response Body
{
  data: {
    contentTag?: string,
    dateCreated?: number,
    dateUpdated?: number,
    guid?: string,
    image?: {
      default: string,
      large: string,
      medium: string,
      small: string,
      url?: string,
    },
    isActive?: bool,
    legacyContentTag?: string,
    name?: string,
    sortOrder?: number,
    updatedBy?: {
      id?: number,
    },
  },
}

DELETE /equipment/categories/{id}

Soft delete a single category

Guard: admin

PATCH /equipment/categories/{id}

Update an existing equipment category.

Guard: admin

Request Body
{
  contentTag: string,
  image: {
    data?: string,
    filename?: string,
  },
  isActive: bool,
  legacyContentTag: string,
  name: string,
  sortOrder: number,
  updatedBy: {
    id?: number,
  },
}
Response Body
{
  data: {
    contentTag?: string,
    dateCreated?: number,
    dateUpdated?: number,
    guid?: string,
    image?: {
      default: string,
      large: string,
      medium: string,
      small: string,
      url?: string,
    },
    isActive?: bool,
    legacyContentTag?: string,
    name?: string,
    sortOrder?: number,
    updatedBy?: {
      id?: number,
    },
  },
}
2 deleted endpoints

PUT /users/{userId}/preferences

Save / updates the user’s preferences for this user

Response Body
{
  data: {

  },
}

GET /brightback/{userId}

Get URL for user cancel/save workflow.

Response Body
{
  data: string,
}
Deleted endpoints
WORK IN PROGRESS