Tool reference · 14 tools

Memberships, class packs and credit

Membership plans, member prices, membership rules, class packs and account credit.

Ask it in plain words

  • "Add a 10-class pack for $180."
  • "Put the Elite plan on sale through December."
  • "What do members pay for open gym?"

get_membership_plans

Membership plans Reads

Every membership plan the gym sells (or used to): name, price, how often it is charged, sign-up fee, free trial, people covered, whether families can join online, and whether it is on sale. Plans only: never members.

Takes no parameters.

Call shape
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_membership_plans",
    "arguments": {}
  }
}

add_membership_plan

Add a membership plan Changesdry_run

Add a membership plan (owners only). Ask the owner for the name, price and how often it is charged; never guess a price. Families see it on the Memberships page when families_can_join_online is true (the default).

ParameterTypeDescription
name requiredstringe.g. Ninja Unlimited (up to 80 characters)
descriptionstringOne or two lines families see under the plan's name (up to 300 characters)
price requirednumberDollars each time it is charged, $1 to $5,000
how_often requiredstring: weekly | monthly | yearlyHow often it is charged
everyintegerCharged every 1 (default), 2, 3 or 6 weeks / months / years
sign_up_feenumberA one-time fee in dollars; 0 for none
free_trial_daysinteger0 to 60
people_coveredintegerHow many people one membership covers, 1 to 8 (a family plan covers several)
families_can_join_onlinebooleantrue = shown on the website's Memberships page so families can join and pay online
list_positionintegerOrder on the Memberships page, 0 to 99 (lower first)
dry_runbooleantrue = only show what would change, save nothing. Use it first for anything the owner hasn't seen yet.
Call shape
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "add_membership_plan",
    "arguments": {
      "name": "<name>",
      "price": 1,
      "how_often": "weekly",
      "dry_run": true
    }
  }
}

update_membership_plan

Change a membership plan Changesdry_run

Change a membership plan's name, price, how often it is charged, fee, trial, people covered, online sign-up or order (owners only). Send only what changes; everything else stays. Existing members keep their own price.

ParameterTypeDescription
plan requiredstringThe plan's current name
new_namestringThe plan's new name
descriptionstringOne or two lines families see under the plan's name (up to 300 characters)
pricenumberDollars each time it is charged, $1 to $5,000
how_oftenstring: weekly | monthly | yearlyHow often it is charged
everyintegerCharged every 1 (default), 2, 3 or 6 weeks / months / years
sign_up_feenumberA one-time fee in dollars; 0 for none
free_trial_daysinteger0 to 60
people_coveredintegerHow many people one membership covers, 1 to 8 (a family plan covers several)
families_can_join_onlinebooleantrue = shown on the website's Memberships page so families can join and pay online
list_positionintegerOrder on the Memberships page, 0 to 99 (lower first)
dry_runbooleantrue = only show what would change, save nothing. Use it first for anything the owner hasn't seen yet.
Call shape
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "update_membership_plan",
    "arguments": {
      "plan": "<plan>",
      "dry_run": true
    }
  }
}

reorder_membership_plans

Change the order of membership plans Changesdry_run

Change the order membership plans show in on the website's Pricing and Memberships pages and in the back office (owners only). get_membership_plans lists them in the current order. Only plans on sale are ordered.

ParameterTypeDescription
order requiredarray of stringPlan names in the order they should show, first one first. Plans you leave out keep their order after these.
dry_runbooleantrue = only show what would change, save nothing. Use it first for anything the owner hasn't seen yet.
Call shape
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "reorder_membership_plans",
    "arguments": {
      "order": [],
      "dry_run": true
    }
  }
}

set_membership_plan_on_sale

Stop or restart selling a membership plan Changesdry_runconfirm

Stop selling a membership plan (it leaves the website; current members keep their memberships) or put an archived plan back on sale (owners only). Stopping needs the owner's yes and confirm: true.

ParameterTypeDescription
plan requiredstringThe plan's id or exact name, from get_membership_plans
on_sale requiredbooleanfalse = stop selling it (archive); true = sell it again
confirmbooleanMust be true, after the owner has said yes
dry_runbooleantrue = only show what would change, save nothing. Use it first for anything the owner hasn't seen yet.
Call shape
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "set_membership_plan_on_sale",
    "arguments": {
      "plan": "<plan>",
      "on_sale": true,
      "dry_run": true
    }
  }
}

get_member_benefits

Member prices Reads

What members pay for open gym: each membership plan's open gym perk (Free, money off, or a members' price) and the price for children in a weekly class. Members get it automatically online, in the family cart and at the front desk.

Takes no parameters.

Call shape
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_member_benefits",
    "arguments": {}
  }
}

set_member_benefit

Set a member price for open gym Changesdry_run

Set what members pay for open gym (owners only): on a membership plan (e.g. Elite: free) or for children in a weekly class (e.g. $5 off). Ask the owner for the amount; never guess it.

ParameterTypeDescription
who requiredstringA membership plan's name (e.g. Elite), or "weekly class" for children enrolled in a weekly class
how requiredstring: free | money_off | members_pay | regularfree; money_off (amount = dollars off); members_pay (amount = the price); regular = no member price
amountnumberDollars, for money_off or members_pay
dry_runbooleantrue = only show what would change, save nothing. Use it first for anything the owner hasn't seen yet.
Call shape
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "set_member_benefit",
    "arguments": {
      "who": "<who>",
      "how": "free",
      "dry_run": true
    }
  }
}

get_class_packs

Class packs Reads

The class packs the gym sells (at the front desk, and online on the class packs page): name, number of classes, price and how many months a pack is good for.

Takes no parameters.

Call shape
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_class_packs",
    "arguments": {}
  }
}

save_class_pack

Add or change a class pack Changesdry_run

Add a class pack, or change one's name, number of classes, price or months it is good for (owners and managers). Send only what changes. Packs already sold keep what they were sold with.

ParameterTypeDescription
packstringThe pack's current name, to change one; leave out to add a new pack
namestringe.g. 10-class pack (up to 60 characters)
classesintegerHow many classes, 1 to 500
pricenumberDollars
monthsintegerHow many months it is good for; 0 = no end
locationstringOnly for gyms with several locations: the location that sells it, by name; empty = every location
dry_runbooleantrue = only show what would change, save nothing. Use it first for anything the owner hasn't seen yet.
Call shape
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "save_class_pack",
    "arguments": {
      "dry_run": true
    }
  }
}

remove_class_pack

Stop selling a class pack Changesdry_runconfirm

Take a kind of class pack off sale (owners and managers). Packs families already bought keep working. Ask the owner to confirm, then send confirm: true. It can be put back from History.

ParameterTypeDescription
pack requiredstringThe class pack's id or exact name, from get_class_packs
confirmbooleanMust be true, after the owner has said yes
dry_runbooleantrue = only show what would change, save nothing. Use it first for anything the owner hasn't seen yet.
Call shape
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "remove_class_pack",
    "arguments": {
      "pack": "<pack>",
      "dry_run": true
    }
  }
}

get_account_credit

Account credit Reads

Families' account credit (money a family can spend with the gym, often from a refund to credit instead of the card). Without a family: every family with credit and the total. With a family: their credit now and its history (each change: when, what, who, the amount and the credit after). Owners and managers.

ParameterTypeDescription
familystringA family's name or email. Leave it out for every family with credit
Call shape
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_account_credit",
    "arguments": {}
  }
}

change_account_credit

Add or take off account credit Changesdry_runconfirm

Add credit to a family's account (a make-good, a goodwill credit) or take credit off (a mistake), with a reason that shows in their history. Owners and managers. Every change needs confirm: true after the owner said yes. Refunds to credit are made from the refund buttons in the back office, not here.

ParameterTypeDescription
family requiredstringThe family's name or email
amount requirednumberDollars: positive adds credit, negative takes it off
reason requiredstringWhy, for the family's credit history
confirmbooleanMust be true, after the owner has said yes
dry_runbooleantrue = only show what would change, save nothing. Use it first for anything the owner hasn't seen yet.
Call shape
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "change_account_credit",
    "arguments": {
      "family": "<family>",
      "amount": 1,
      "reason": "<reason>",
      "dry_run": true
    }
  }
}

get_membership_rules

Membership rules and terms Reads

The membership rules on Money > Memberships > Plans & rules (owners): the introduction on the Memberships page, the exact membership terms families agree to before paying, whether members can cancel online in My account, and whether members get an emailed receipt for each payment.

Takes no parameters.

Call shape
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_membership_rules",
    "arguments": {}
  }
}

set_membership_rules

Change the membership rules and terms Changesdry_runconfirm

Change the membership rules on Money > Memberships > Plans & rules (owners only). The terms are legal text families agree to before paying: always show the owner the exact new wording first (call with dry_run) and suggest their attorney reviews it; a terms change needs confirm: true. Turning off online cancel needs confirm: true and a warning to the owner first: several states (California among them) require an online way to cancel anything sold online, and a membership bought online can always be cancelled online anyway. Turning receipts off needs confirm: true. Only what the owner mentions changes.

ParameterTypeDescription
introductionstringA line or two at the top of the Memberships page (300 characters at most; empty = none)
termsstringThe whole new membership terms, word for word (3000 characters at most; empty = back to the standard text)
members_can_cancel_onlinebooleanMembers can cancel in My account (the membership runs to the end of the paid period)
email_receiptsbooleanEmail members a receipt for each payment
dry_runbooleantrue = only show what would change, save nothing. Use it first for anything the owner hasn't seen yet.
confirmbooleanMust be true, after the owner has said yes
Call shape
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "set_membership_rules",
    "arguments": {
      "dry_run": true
    }
  }
}

All 318 tools

Ask NinjaHQ

Answers from our Help Center and website

Ask anything about NinjaHQ, or try:

AI answers from NinjaHQ's own pages and can make mistakes. Your questions are sent to Anthropic, the AI company, to answer; NinjaHQ doesn't keep them. Privacy