Pike13 For Developers
Get Started
Authentication
Core API
Reporting API
Webhooks API
Announcements

Core API Documentation

Person

Resource model for a business-scoped Person (client and/or staff). Serialization uses the Desk or Front people partials; field availability follows that partial and query flags.

Front — GET /api/v2/front/people/:id and GET /api/v2/front/people/me return a root people array whose elements include is_schedulable as a JSON boolean or JSON null (column NULL). When with_dependents is true, nested dependents reuse the same partial and therefore expose the same key.

Desk — GET /api/v2/desk/people emits is_schedulable on each element of people; with include_relationships=true, nested dependents and providers use the Desk person partial and include the field. GET /api/v2/desk/people/:id and GET /api/v2/desk/people/me include it on the primary record and on each nested dependent/provider when those collections are present. GET /api/v2/desk/people/search returns results[] objects; each person sub-object is rendered with the same Desk person partial, so is_schedulable is always present there as well.

Front

GET /api/v2/front/people/:id
GET /api/v2/front/people/me

Returns a single-element people array for the authorized person. Use the path segment me instead of a numeric id to resolve the person bound to the bearer token. Access is limited to that person and, when permitted, their dependents. Response objects include is_schedulable (boolean or null) on the primary record; with with_dependents=true, each dependent object includes the same attribute.

Parameters

with_dependentsbooleanReturn dependent information

Show curl example

REQUEST
$ curl https://mybiz.pike13.com/api/v2/front/people/me \
  -H "Authorization: Bearer XXXXXXXXXXXXXXX"

RESPONSE
{
  "people": [
    {
      "id": 1,
      "name": "John Staff",
      "pronoun": null,
      "first_name": "John",
      "middle_name": null,
      "last_name": "Staff",
      "is_schedulable": true,
      "email": "johnstaff@example.com",
      "address": "400 Broad St, Seattle, WA 98109",
      "secondary_info_field": "Unlimited Membership",
      "birthdate": "1980-01-01",
      "profile_photo": {
        "x50": "https://d1nqv8xdwxria6.cloudfront.net/uploads/profile_photo/image/f1150c38-5e62-4c4b-a701-473e3f586e1e/image_profile_x50.jpg",
        "x100": "https://d1nqv8xdwxria6.cloudfront.net/uploads/profile_photo/image/f1150c38-5e62-4c4b-a701-473e3f586e1e/image_profile_x100.jpg",
        "x200": "https://d1nqv8xdwxria6.cloudfront.net/uploads/profile_photo/image/f1150c38-5e62-4c4b-a701-473e3f586e1e/image_profile_x200.jpg",
        "x400": "https://d1nqv8xdwxria6.cloudfront.net/uploads/profile_photo/image/f1150c38-5e62-4c4b-a701-473e3f586e1e/image_profile_x400.jpg"
      },
      "custom_fields": [
        {
          "id": 1,
          "custom_field_id": 5,
          "name": "Favorite Color",
          "value": "blue"
        }
      ],
      "balances": [
        {
          "id": 2,
          "balance_cents": 6000,
          "currency_code": "USD",
          "type": "credit"
        }
      ]
    }
  ]
}

Desk

GET /api/v2/desk/people

Paginated collection of client-scoped people (is_client = true); default page size 25, controlled via page. Each people[] element serializes is_schedulable. If include_relationships=true and the caller may index relationships, nested dependents and providers arrays repeat the same person shape, including is_schedulable.

Parameters

created_sincetimestampFilter to people created since the given timestamp.
updated_sincetimestampFilter to people updated since the given timestamp.
is_memberbooleanFilter to people with a current membership
include_relationshipsbooleanInclude providers and dependents for each person.
include_balancesbooleanInclude balances for each person.
include_last_note_timestampbooleanInclude the timestamp of the most recent note for each person.
sortstringSort results by the given attributes and directions. Attributes can be updated_at, created_at, or id. The order will be ascending unless prefixed by a minus sign (-). When no sort is given, defaults to id. Examples: "-updated_at" or "id,-created_at".

Show curl example

REQUEST
$ curl https://mybiz.pike13.com/api/v2/desk/people \
  -H "Authorization: Bearer XXXXXXXXXXXXXXX"

RESPONSE
{
  "people": [
    {
      "id": 3,
      "name": "John Client",
      "pronoun": null,
      "first_name": "John",
      "middle_name": null,
      "last_name": "Client",
      "is_schedulable": true,
      "membership": null,
      "email": "johnclient@example.com",
      "secondary_info_field": "No Membership",
      "hidden_at": null,
      "business_id": 1,
      "updated_at": "2014-09-16T14:25:10-07:00",
      "birthdate": null,
      "location_id": null,
      "custom_fields": []
    },
    {
      "id": 48,
      "name": "Jane Client",
      "pronoun": null,
      "first_name": "Jane",
      "middle_name": null,
      "last_name": "Client",
      "is_schedulable": true,
      "membership": null,
      "email": "janeclient@example.com",
      "secondary_info_field": "No Membership",
      "hidden_at": null,
      "business_id": 1,
      "updated_at": "2014-09-17T14:19:12-07:00",
      "birthdate": null,
      "location_id": 1,
      "profile_photo": {
        "x50": "https://d1nqv8xdwxria6.cloudfront.net/uploads/profile_photo/image/f1150c38-5e62-4c4b-a701-473e3f586e1e/image_profile_x50.jpg",
        "x100": "https://d1nqv8xdwxria6.cloudfront.net/uploads/profile_photo/image/f1150c38-5e62-4c4b-a701-473e3f586e1e/image_profile_x100.jpg",
        "x200": "https://d1nqv8xdwxria6.cloudfront.net/uploads/profile_photo/image/f1150c38-5e62-4c4b-a701-473e3f586e1e/image_profile_x200.jpg",
        "x400": "https://d1nqv8xdwxria6.cloudfront.net/uploads/profile_photo/image/f1150c38-5e62-4c4b-a701-473e3f586e1e/image_profile_x400.jpg"
      },
      "custom_fields": [
        {
          "id": 3,
          "custom_field_id": 5,
          "name": "Favorite Color",
          "value": ""
        }
      ]
    }
  ],
  "total_count": 2
}

GET /api/v2/desk/people/:id
GET /api/v2/desk/people/me

Single-resource read: one people[] element. The id may reference any business person record the load scope resolves (including soft-deleted rows where applicable), not only the Desk client index subset. Primary and nested dependents / providers each expose is_schedulable via the Desk person partial.

Show curl example

REQUEST
$ curl https://mybiz.pike13.com/api/v2/desk/people/48 \
  -H "Authorization: Bearer XXXXXXXXXXXXXXX"

RESPONSE
{
  "people": [
    {
      "id": 48,
      "pronoun": null,
      "first_name": "Jane",
      "middle_name": null,
      "last_name": "Client",
      "is_schedulable": true,
      "name": "Jane Client",
      "membership": "No Membership",
      "is_member": false,
      "joined_at": "2014-12-10T19:34:16Z",
      "phone": "206-555-1212",
      "email": "janeclient@example.com",
      "address": "123 Pike Street\nSuite 456\nSeattle, WA 98101, United States of America",
      "street_address": "123 Pike Street",
      "street_address2": "Suite 456",
      "city": "Seattle",
      "state_code": "WA",
      "postal_code": "98101",
      "secondary_info_field": "No Membership",
      "timezone": "America/Los_Angeles",
      "business_id": 1,
      "updated_at": "2014-12-10T19:34:16Z",
      "deleted_at": null,
      "hidden_at": null,
      "birthdate": null,
      "location_id": 1,
      "profile_photo": {
        "x50": "https://d1nqv8xdwxria6.cloudfront.net/uploads/profile_photo/image/f1150c38-5e62-4c4b-a701-473e3f586e1e/image_profile_x50.jpg",
        "x100": "https://d1nqv8xdwxria6.cloudfront.net/uploads/profile_photo/image/f1150c38-5e62-4c4b-a701-473e3f586e1e/image_profile_x100.jpg",
        "x200": "https://d1nqv8xdwxria6.cloudfront.net/uploads/profile_photo/image/f1150c38-5e62-4c4b-a701-473e3f586e1e/image_profile_x200.jpg",
        "x400": "https://d1nqv8xdwxria6.cloudfront.net/uploads/profile_photo/image/f1150c38-5e62-4c4b-a701-473e3f586e1e/image_profile_x400.jpg"
      },
      "custom_fields": [
        {
          "id": 9,
          "value": "blue",
          "name": "Shirt color"
        },
        {
          "id": 10,
          "value": "L",
          "name": "Shirt size"
        }
      ],
      "dependents": [],
      "providers": [
        {
          "id": 47,
          "pronoun": null,
          "first_name": "Momma",
          "middle_name": null,
          "last_name": "Client",
          "is_schedulable": true,
          "guardian_name": null,
          "name": "Momma Client",
          "membership": "No Membership",
          "is_member": false,
          "joined_at": "2014-12-10T19:34:16Z",
          "phone": null,
          "email": "mommaclient@example.com",
          "address": null,
          "secondary_info_field": "No Membership",
          "guardian_email": null,
          "timezone": "America/Los_Angeles",
          "business_id": 2,
          "updated_at": "2014-12-10T19:34:16Z",
          "deleted_at": null,
          "hidden_at": null,
          "birthdate": null,
          "location_id": 1000,
          "custom_fields": []
        }
      ],
      "location": {
        "id": 1,
        "name": "West Location",
        "slug": "west-location"
      },
      "balances": [
        {
          "id": 2,
          "balance_cents": 6000,
          "currency_code": "USD",
          "type": "credit"
        }
      ]
    }
  ]
}

GET /api/v2/desk/people/search?q=:query

Client-scoped search (same is_client constraint as the index). Email matching: local-part against name fields unless fields=email constrains to full-address matching. Phone queries require all digits and match full normalized numbers unless fields narrows the index; omit fields to search all configured fields. Each results[] item includes score plus a person object serialized with the Desk person partial, including is_schedulable.

qstringSearch query. Required. When you search by phone number, only digits are allowed. See the below example.
fieldscomma delimited stringFields to be searched. Can be any of the following: name, email, phone, barcodes.

Show curl example

REQUEST
$ curl https://myzbiz.pike13.com/api/v2/desk/people/search?q=jane \
  -H "Authorization: Bearer XXXXXXXXXXXXXXX"

RESPONSE
{
  "results": [
    {
      "score": 1.3977994,
      "person": {
        "id": 56,
        "pronoun": null,
        "first_name": "Jane",
        "middle_name": null,
        "last_name": "Client",
        "is_schedulable": true,
        "name": "Jane Client",
        "membership": "No Membership",
        "is_member": false,
        "joined_at": "2014-12-10T00:29:46Z",
        "email": "janeclient@example.com",
        "secondary_info_field": "No Membership",
        "timezone": "Asia/Yerevan",
        "business_id": 1,
        "updated_at": "2014-12-10T00:31:58Z",
        "deleted_at": null,
        "hidden_at": null,
        "birthdate": null,
        "location_id": 1,
        "custom_fields": [
          {
            "id": 5,
            "value": "blue",
            "name": "Favorite Color"
          }
        ]
      }
    }
  ],
  "total_count": 1
}

REQUEST
$ curl "https://myzbiz.pike13.com/api/v2/desk/people/search?q=1234567890&fields=phone" \
  -H "Authorization: Bearer XXXXXXXXXXXXXXX"

RESPONSE
{
  "results": [
    {
      "score": 1.3977994,
      "person": {
        "id": 56,
        "pronoun": null,
        "first_name": "Jane",
        "middle_name": null,
        "last_name": "Client",
        "is_schedulable": true,
        "name": "Jane Client",
        "membership": "No Membership",
        "is_member": false,
        "joined_at": "2014-12-10T00:29:46Z",
        "phone": "123-456-7890",
        "email": "janeclient@example.com",
        "secondary_info_field": "No Membership",
        "timezone": "Asia/Yerevan",
        "business_id": 1,
        "updated_at": "2014-12-10T00:31:58Z",
        "deleted_at": null,
        "hidden_at": null,
        "birthdate": null,
        "location_id": 1,
        "custom_fields": [
          {
            "id": 5,
            "value": "blue",
            "name": "Favorite Color"
          }
        ]
      }
    }
  ],
  "total_count": 1
}

POST /api/v2/desk/people

Create a Person. If dependent information is included, will also create the dependents. Dependents have the same attributes available.

Note: The single 'address' field is deprecated. Please use the separate address fields (street_address, city, etc) instead.

Note: Country code is optional and inherits from primary business by default. If you provide one you must use the alpha-2 country code from the ISO 3166-1 standard. Reference here.

Attributes

pronounstringClient's preferred pronouns.
first_namestringRequired. Client's first name.
middle_namestringClient's middle name.
last_namestringRequired. Client's last name.
is_schedulablebooleanOptional. On create, if the key is omitted or null, defaults to true; only explicit false stores false. On update, omitted or null leaves the column unchanged; only explicit true or false are applied.
is_clientbooleanOptional. Boolean; controls membership in client-only scopes (e.g. Desk index/search). Same create/update rules as is_schedulable.
emailstringClient's email address. Email address formatting is enforced.
street_addressstringFirst line of client's physical address.
street_address2stringSecond line of client's physical address (apt, suite, etc).
citystringCity portion of client's address.
state_codestringState/province code (e.g. 'WA', 'BC').
postal_codestringPostal/ZIP code.
country_codestringTwo-letter country code (e.g. 'us', 'ca'). Defaults to business country.
addressstringDEPRECATED: Legacy combined address field. Use separate address fields instead.
phonestringClient's phone number.
birthdatedateClient's date of birth.
guardian_namestringFull name of client's guardian.
guardian_emailstringEmail address of client's guardian.
location_idintegerLocation ID for client's home location.
joined_attimestampTimestamp for when the client joined the business. Default to current time.
send_invitebooleanSend the client a welcome email from Pike13
skip_complimentary_passesbooleanDo not issue any complimentary passes to the client.
custom_fieldscollection

Collection of custom field IDs and values.

idintegerCustom field ID
valuestringValue of the custom field
dependentscollection

Collection of dependents. All of the same fields for a person are available for a dependent.

pronounstringDependent's preferred pronouns.
first_namestringRequired. Dependent's first name.
middle_namestringDependent's middle name.
last_namestringRequired. Dependent's last name.
is_schedulablebooleanOptional. Same create rules as parent.
is_clientbooleanOptional. Same create rules as parent.
emailstringDependent's email address. Email address formatting is enforced.
etcetcAll other person fields.

Show curl example

REQUEST
$ curl -X POST https://myzbiz.pike13.com/api/v2/desk/people \
  -H "Authorization: Bearer XXXXXXXXXXXXXXX" \
  -H "Content-Type: application/json" \
  -d '{
    "person": {
      "first_name": "Jane",
      "last_name": "Client",
      "is_schedulable": true,
      "phone": "206-555-1212",
      "email": "janeclient@example.com",
      "street_address": "123 Pike Street",
      "street_address2": "Suite 456",
      "city": "Seattle",
      "state_code": "WA",
      "postal_code": "98101",
      "country_code": "us",
      "custom_fields": [ {"id": 9, "value": "blue"}, {"id": 10, "value": "L"}],
      "dependents": [
        {
          "first_name": "Child1",
          "last_name": "Client",
          "is_schedulable": true,
          "birthdate": "2008-01-21"
        },
        {
          "first_name": "Child2",
          "last_name": "Client",
          "is_schedulable": false,
          "birthdate": "Jan 23, 2010"
        }
      ]
    }
  }'

RESPONSE
{
  "people": [
    {
      "id": 27,
      "pronoun": null,
      "first_name": "Jane",
      "middle_name": null,
      "last_name": "Client",
      "is_schedulable": true,
      "name": "Jane Client",
      "membership": "No Membership",
      "is_member": false,
      "joined_at": "2014-12-10T19:34:16Z",
      "phone": "206-555-1212",
      "email": "janeclient@example.com",
      "address": "123 Pike Street\nSuite 456\nSeattle, WA 98101, United States of America",
      "street_address": "123 Pike Street",
      "street_address2": "Suite 456",
      "city": "Seattle",
      "state_code": "WA",
      "postal_code": "98101",
      "secondary_info_field": "No Membership",
      "timezone": "America/Los_Angeles",
      "business_id": 1,
      "updated_at": "2014-12-10T19:34:16Z",
      "deleted_at": null,
      "hidden_at": null,
      "birthdate": null,
      "location_id": 1,
      "custom_fields": [
        {
          "id": 9,
          "value": "blue",
          "name": "Shirt color"
        },
        {
          "id": 10,
          "value": "L",
          "name": "Shirt size"
        }
      ],
      "dependents": [
        {
          "id": 28,
          "pronoun": null,
          "first_name": "Child1",
          "middle_name": null,
          "last_name": "Client",
          "is_schedulable": true,
          "name": "Child1 Client",
          "membership": "No Membership",
          "is_member": false,
          "joined_at": "2014-12-10T19:34:16Z",
          "phone": null,
          "email": null,
          "secondary_info_field": "No Membership",
          "timezone": "America/Los_Angeles",
          "business_id": 1,
          "updated_at": "2014-12-10T19:34:16Z",
          "deleted_at": null,
          "hidden_at": null,
          "birthdate": "2008-01-21",
          "location_id": 1,
          "custom_fields": []
        },
        {
          "id": 29,
          "pronoun": null,
          "first_name": "Child2",
          "middle_name": null,
          "last_name": "Client",
          "is_schedulable": false,
          "name": "Child2 Client",
          "membership": "No Membership",
          "is_member": false,
          "joined_at": "2014-12-10T19:34:16Z",
          "phone": null,
          "email": null,
          "secondary_info_field": "No Membership",
          "timezone": "America/Los_Angeles",
          "business_id": 1,
          "updated_at": "2014-12-10T19:34:16Z",
          "deleted_at": null,
          "hidden_at": null,
          "birthdate": "2010-01-23",
          "location_id": 1,
          "custom_fields": []
        }
      ],
      "providers": [],
      "location": {
        "id": 1,
        "name": "West Location",
        "slug": "west-location"
      }
    }
  ]
}

PUT /api/v2/desk/people/:id

Updates a Person. Dependents can be added to the Person using the dependent_ids attribute. When adding new dependents, all existing dependents must also be passed in to dependent_ids; otherwise, they will be removed from the Person's dependents. If the request body does not include the dependent_ids attribute, the dependents will remain unchanged. Conversely, you can set the provider (only one) on a person by passing the provider id in the provider_ids field.

Partial update via strong parameters: only keys present under person are applied; omitted keys do not clear unrelated columns. Permitted shape is a subset of create: nested dependents / dependents_as_api_attributes and send_invite are create-only—on PUT use dependent_ids / provider_ids to mutate relationships, not inline dependent attribute hashes.

Partial update — representative keys

is_schedulablebooleanOptional. If omitted or null, no change. Only explicit true or false are applied.
is_clientbooleanOptional. Same update rules as is_schedulable.

Note: PUT requests only allow attaching or detaching existing Persons as dependents. You cannot edit the attributes of a dependent in a PUT request.

Note: The single 'address' field is deprecated. Please use the separate address fields (street_address, city, etc) instead.

Note: Country code is optional and inherits from primary business by default. If you provide one you must use the alpha-2 country code from the ISO 3166-1 standard. Reference here.

Show curl example

REQUEST
$ curl -X PUT https://myzbiz.pike13.com/api/v2/desk/people/27 \
  -H "Authorization: Bearer XXXXXXXXXXXXXXX" \
  -H "Content-Type: application/json" \
  -d '{"person":{"middle_name": "May", "custom_fields": [ {"id": 9, "value": "blue"}, {"id": 10, "value": "L"}]}, "dependent_ids": "53,33"}'

RESPONSE
{
  "people": [
    {
      "id": 27,
      "pronoun": null,
      "first_name": "Jane",
      "middle_name": "May",
      "last_name": "Client",
      "is_schedulable": true,
      "name": "Jane Client",
      "membership": "No Membership",
      "is_member": false,
      "joined_at": "2014-12-10T19:34:16Z",
      "email": "janeclient@example.com",
      "address": "123 Pike Street\nSuite 456\nSeattle, WA 98101, United States of America",
      "street_address": "123 Pike Street",
      "street_address2": "Suite 456",
      "city": "Seattle",
      "state_code": "WA",
      "postal_code": "98101",
      "secondary_info_field": "No Membership",
      "timezone": "America/Los_Angeles",
      "business_id": 1,
      "updated_at": "2014-12-10T19:34:16Z",
      "deleted_at": null,
      "hidden_at": null,
      "birthdate": null,
      "location_id": 1,
      "custom_fields": [
        {
          "id": 9,
          "value": "blue",
          "name": "Shirt color"
        },
        {
          "id": 10,
          "value": "L",
          "name": "Shirt size"
        }
      ],
      "dependents": [
        {
          "id": 53,
          "pronoun": null,
          "first_name": "Johnny",
          "middle_name": null,
          "last_name": "Depedendent",
          "is_schedulable": true,
          "guardian_name": null,
          "name": "Johnny Dependent",
          "membership": "No Membership",
          "is_member": false,
          "joined_at": "2018-04-30T23:08:09Z",
          "phone": "049.460.9886 x010",
          "email": "johnny.dependent@pike13.com",
          "address": "456 Kid Street\nApt 789\nSeattle, WA 98101, United States of America",
          "street_address": "456 Kid Street",
          "street_address2": "Apt 789",
          "city": "Seattle",
          "state_code": "WA",
          "postal_code": "98101",
          "secondary_info_field": "No Membership",
          "guardian_email": null,
          "timezone": "America/Los_Angeles",
          "business_id": 1,
          "updated_at": "2018-12-12T17:53:47Z",
          "deleted_at": null,
          "hidden_at": null,
          "birthdate": null,
          "location_id": null,
          "custom_fields": []
        },
        {
          "id": 33,
          "pronoun": null,
          "first_name": "Susie",
          "middle_name": null,
          "last_name": "Dependent",
          "is_schedulable": true,
          "guardian_name": null,
          "name": "Susie Dependent",
          "membership": "No Membership",
          "is_member": false,
          "joined_at": "2018-04-30T23:08:04Z",
          "phone": "1-708-587-6630 x22009",
          "email": "susiedependent@pike13.com",
          "address": "456 Kid Street\nApt 790\nSeattle, WA 98101, United States of America",
          "street_address": "456 Kid Street",
          "street_address2": "Apt 790",
          "city": "Seattle",
          "state_code": "WA",
          "postal_code": "98101",
          "secondary_info_field": "No Membership",
          "guardian_email": null,
          "timezone": "America/Los_Angeles",
          "business_id": 1,
          "updated_at": "2018-12-12T18:02:10Z",
          "deleted_at": null,
          "hidden_at": null,
          "birthdate": null,
          "location_id": null,
          "custom_fields": []
        }
      ],
      "providers": [],
      "location": {
        "id": 1,
        "name": "West Location",
        "slug": "west-location"
      }
    }
  ]
}

DELETE /api/v2/desk/people/:id

Deletes a Person. In certain circumstances deleting a Person is not valid. In such cases, the server will return a 422 response and corresponding error messages. Such cases include but are not limited to:

  • Clients that have open invoices
  • Clients that have future visits
  • Clients that have active plans

Show curl example

REQUEST
$ curl -X DELETE https://mybiz.pike13.com/api/v2/desk/people/1 \
  -H "Authorization: Bearer XXXXXXXXXXXXXXX"

RESPONSE