Core API Documentation
Notes
Front
Person
GET /api/v2/front/people/:person_id/notes
REQUEST
$ curl https://mybiz.pike13.com/api/v2/front/people/1/notes \
-H "Authorization: Bearer XXXXXXXXXXXXXXX"
RESPONSE
{
"notes": [
{
"id": 4,
"note": "This was a triumph.",
"pinned": true,
"person_id": 1,
"created_at": "2014-09-12T23:14:13Z",
"created_by_id": 10,
"updated_at": "2014-12-10T01:13:45Z",
"updated_by_id": 11
},
{
"id": 3,
"note": "I'm making a note here: Huge success.",
"pinned": false,
"person_id": 1,
"created_at": "2014-09-12T23:14:06Z",
"created_by_id": 10,
"updated_at": "2014-12-10T01:13:45Z",
"updated_by_id": 11
}
],
"total_count": 2
}
Lists notes for a person. Paginate using
GET /api/v2/front/people/:person_id/notes/:id
Returns the details for a note.
REQUEST
$ curl https://mybiz.pike13.com/api/v2/front/people/1/notes \
-H "Authorization: Bearer XXXXXXXXXXXXXXX"
RESPONSE
{
"notes": [
{
"id": 4,
"note": "This was a triumph.",
"pinned": true,
"person_id": 1,
"created_at": "2014-09-12T23:14:13Z",
"created_by_id": 10,
"updated_at": "2014-12-10T01:13:45Z",
"updated_by_id": 11
}
]
}
Event Occurrences
GET /api/v2/front/event_occurrences/:event_occurrence_id/notes
Lists notes for an event occurrence. Paginate using
REQUEST
$ curl https://mybiz.pike13.com/api/v2/front/event_occurrences/1/notes \
-H "Authorization: Bearer XXXXXXXXXXXXXXX"
RESPONSE
{
"notes": [
{
"id": 4,
"note": "This was a triumph.",
"pinned": true,
"event_occurrence_id": 7,
"created_at": "2014-09-12T23:14:13Z",
"created_by_id": 2,
"updated_at": "2014-12-10T01:13:45Z",
"updated_by_id": 3
},
{
"id": 3,
"note": "I'm making a note here: Huge success.",
"pinned": false,
"event_occurrence_id": 7,
"created_at": "2014-09-12T23:14:06Z",
"created_by_id": 2,
"updated_at": "2014-12-10T01:13:45Z",
"updated_by_id": 3
}
],
"total_count": 2
}
GET /api/v2/front/event_occurrences/:event_occurrence_id/notes/:id
Returns the details for a note.
REQUEST
$ curl https://mybiz.pike13.com/api/v2/front/event_occurrences/1/notes/4 \
-H "Authorization: Bearer XXXXXXXXXXXXXXX"
RESPONSE
{
"notes": [
{
"id": 4,
"note": "This was a triumph.",
"pinned": true,
"event_occurrence_id": 7,
"created_at": "2014-09-12T23:14:13Z",
"created_by_id": 2,
"updated_at": "2014-12-10T01:13:45Z",
"updated_by_id": 3
}
]
}
Desk
GET /api/v2/desk/event_occurrences/:event_occurrence_id/notes
GET /api/v2/desk/people/:person_id/notes
REQUEST
$ curl https://mybiz.pike13.com/api/v2/desk/event_occurrences/1/notes \
-H "Authorization: Bearer XXXXXXXXXXXXXXX"
$ curl https://mybiz.pike13.com/api/v2/desk/people/1/notes?include_eo_notes=true \
-H "Authorization: Bearer XXXXXXXXXXXXXXX"
RESPONSE
{
"notes": [
{
"id": 4,
"note": "This was a triumph.",
"subject": "Session Feedback",
"public": false,
"pinned": false,
"person_id": 1,
"event_occurrence_id": 7,
"created_at": "2014-09-12T23:14:13Z",
"created_by_id": 2,
"updated_at": "2014-12-10T01:13:45Z",
"updated_by_id": 3
},
{
"id": 3,
"note": "I'm making a note here: Huge success.",
"subject": "Scheduling Preference",
"public": true,
"pinned": false,
"person_id": 1,
"event_occurrence_id": null,
"created_at": "2014-09-12T23:14:06Z",
"created_by_id": 2,
"updated_at": "2014-12-10T01:13:45Z",
"updated_by_id": 3
}
],
"total_count": 2
}
Lists notes for an event occurrence or person. Paginate using
For a person,
On an event occurrence note,
public: false : staff only.public: true, pinned: false : staff and clients with a visit on the event occurrence.public: true, pinned: true : posted to the business's Pike13 website, where anyone viewing the class or course can see it.
Parameters (person)
| include_eo_notes | boolean | Also returns notes created on event occurrences the person has a visit on, including notes posted to the Pike13 website ( |
|---|---|---|
| created_since | timestamp | Filter to notes created after the given timestamp. |
| created_before | timestamp | Filter to notes created before the given timestamp. |
| updated_since | timestamp | Filter to notes updated after the given timestamp. |
| updated_before | timestamp | Filter to notes updated before the given timestamp. |
GET /api/v2/desk/event_occurrences/:event_occurrence_id/notes/:id
GET /api/v2/desk/people/:person_id/notes/:id
Returns the details for a note.
REQUEST
$ curl https://mybiz.pike13.com/api/v2/desk/event_occurrences/1/notes/4 \
-H "Authorization: Bearer XXXXXXXXXXXXXXX"
$ curl https://mybiz.pike13.com/api/v2/desk/people/1/notes/4 \
-H "Authorization: Bearer XXXXXXXXXXXXXXX"
RESPONSE
{
"notes": [
{
"id": 4,
"note": "This was a triumph.",
"subject": "Scheduling Preference",
"public": false,
"pinned": true,
"person_id": 1,
"event_occurrence_id": null,
"created_at": "2014-09-12T23:14:13Z",
"created_by_id": 2,
"updated_at": "2014-12-10T01:13:45Z",
"updated_by_id": 3
}
]
}
POST /api/v2/desk/event_occurrences/:event_occurrence_id/notes
POST /api/v2/desk/people/:person_id/notes
Creates a note on an event occurrence or person. Creating a public note requires the Send Public Notes permission; without it, the request returns 401.
REQUEST
$ curl -X POST https://mybiz.pike13.com/api/v2/desk/event_occurrences/1/notes \
-H "Authorization: Bearer XXXXXXXXXXXXXXX" \
-H "Content-Type: application/json" \
-d '{"note": {"subject": "Session Note", "note": "This was a triumph", "public": true}}'
$ curl -X POST https://mybiz.pike13.com/api/v2/desk/people/1/notes \
-H "Authorization: Bearer XXXXXXXXXXXXXXX" \
-H "Content-Type: application/json" \
-d '{"note": {"subject": "Session Note", "note": "This was a triumph", "public": true}}'
RESPONSE
{
"notes": [
{
"id": 1,
"note": "This was a triumph",
"subject": "Session Note",
"public": true,
"pinned": false,
"person_id": 7,
"event_occurrence_id": null,
"created_at": "2014-12-10T01:13:45Z",
"created_by_id": 2
}
]
}
Attributes
| subject | string | The subject of the note. Mailing purposes only. |
|---|---|---|
| note | string | The body of the note. Required. |
| public | boolean | Specifies if the note is viewable by the client. Defaults to false. |
| pinned | boolean | Specifies if the note should be starred. Starred notes show up in class rosters and the top of client profiles. On an event occurrence, a public pinned note is posted to the Pike13 website. Defaults to false. |
| send_notifications | boolean | Send notifications when the note is created? Defaults to false. |
PUT /api/v2/desk/event_occurrences/:event_occurrence_id/notes/:id
PUT /api/v2/desk/people/:person_id/notes/:id
Updates a note on an event occurrence or person. Making a private note public requires the Send Public Notes permission; without it, the request returns 401 and the note is unchanged.
REQUEST
$ curl -X PUT https://mybiz.pike13.com/api/v2/desk/event_occurrences/1/notes/4 \
-H "Authorization: Bearer XXXXXXXXXXXXXXX" \
-H "Content-Type: application/json" \
-d '{"note": {"subject": "Updated Session Note", "note": "This was a triumph"}}'
$ curl -X PUT https://mybiz.pike13.com/api/v2/desk/people/1/notes/4 \
-H "Authorization: Bearer XXXXXXXXXXXXXXX" \
-H "Content-Type: application/json" \
-d '{"note": {"subject": "Updated Session Note", "note": "This was a triumph"}}'
RESPONSE
{
"notes": [
{
"id": 1,
"note": "This was a triumph",
"subject": "Updated Session Note",
"public": true,
"pinned": false,
"person_id": 7,
"event_occurrence_id": null,
"created_at": "2014-12-10T01:13:45Z",
"created_by_id": 2,
"updated_at": "2014-12-10T01:13:45Z",
"updated_by_id": 3
}
]
}
Attributes
| subject | string | The subject of the note. Mailing purposes only. |
|---|---|---|
| note | string | The body of the note. Required. |
| public | boolean | Specifies if the note is viewable by the client. |
| pinned | boolean | Specifies if the note should be starred. Starred notes show up in class rosters and the top of client profiles. On an event occurrence, a public pinned note is posted to the Pike13 website. |
DELETE /api/v2/desk/event_occurrences/:event_occurrence_id/notes/:id
DELETE /api/v2/desk/people/:person_id/notes/:id
Deletes a note. The acting access token must be tied to a Person that is either a manager, an owner, or the author of the note.
REQUEST
$ curl -X DELETE https://mybiz.pike13.com/api/v2/desk/event_occurrences/1/notes/2 \
-H "Authorization: Bearer XXXXXXXXXXXXXXX"
$ curl -X DELETE https://mybiz.pike13.com/api/v2/desk/people/1/notes/2 \
-H "Authorization: Bearer XXXXXXXXXXXXXXX"
RESPONSE