My Account API Documentation

Overview

This resource represents the authenticated user's basic account information.

Fields

Name Type Restrictions Required? Description
email string (email address) Not editable. N/A The user's email address. This is used to log in and for notifications.
first_name string None No The user's first name.
last_name string None No The user's last name.
organization_name string Automatic Automatic The user's organization's name.
default_gym_id integer Must be the ID of a gym. Yes The unique database ID of the user's default gym, used when checking in customers through the Staff Site, and other location-specific functions.
default_gym_name string Automatic Automatic The name of the user's default gym.
default_gym_url string (URL) Automatic Automatic The unique API URL of the user's default gym.
date_joined string (ISO-8601 datetime) Automatic Automatic When the user was added to the Capitan database.
can_manage_events boolean Not editable. N/A Whether the user is able to manage events. This includes operations such as cancelling reservations and setting up private events.
can_manage_members boolean Not editable. N/A Whether the user is able to manage customer accounts. This includes operations such as updating account information and approving documents.
can_manage_customer_proficiencies boolean Not editable. N/A Whether the user is able to add and remove proficiencies from customers.
can_export_customers boolean Not editable. N/A Whether the user is able to export customers via the Staff Site.
can_access_reports boolean Not editable. N/A Whether the user is able to access reporting, such as revenue reports and check-in history.
is_organization_admin boolean Not editable. N/A Whether the user is able to administer their organization. This is required to manage staff accounts and edit organization configuration.
pin_mode_required boolean Not editable. N/A Whether the user is automatically placed in PIN Mode when they log into the Staff Site, regardless of whether the checkbox is selected. This is used to ensure that shared computers are not accidentally logged into without PIN mode.
previous_password string (write-only) Must match the user's current password. Required if new_password is provided. A write-only field used to change the user's password.
new_password string (write-only) Must not be blank. No A write-only field used to change the user's password.

Operations

Read

Request
GET /api/my-account/

Response
200 OK
{
    "email": "joe@example.com",
    "first_name": "Joe",
    "last_name": "Smith",
    ...
}

Replace

Request
PUT /api/my-account/
{
    "first_name": "Jonathan",
    "last_name": "Smith",
    "default_gym_id": 7
}

Response
200 OK
{
    "email": "joe@example.com",
    "first_name": "Jonathan",
    "last_name": "Smith",
    ...
}

Update

Request
PATCH /api/my-account/
{
    "first_name": "Joey"
}

Response
200 OK
{
    "email": "joe@example.com",
    "first_name": "Joey",
    "last_name": "Smith",
    ...
}

Change Password

Request
PATCH /api/change-password/
{
    "old_password": "r3cgu93gijs4",
    "new_password": "22lh8iknflfr5grf"
}

Response
200 OK
{
    "email": "joe@example.com",
    "first_name": "Joey",
    "last_name": "Smith",
    ...
}