Core API Documentation
Punches
A punch pays for a visit with a plan.
Desk Only
GET /api/v2/desk/punches/:id
Returns the details of a punch.
REQUEST
$ curl https://mybiz.pike13.com/api/v2/desk/punches/1 \
-H "Authorization: Bearer XXXXXXXXXXXXXXX"
RESPONSE
{
"punches": [
{
"id": 1,
"visit_id": 1,
"plan_id": 2,
"created_at": "2014-09-12T23:14:13Z"
}
]
}
POST /api/v2/desk/punches
Creates a punch.
REQUEST
$ curl -X POST https://mybiz.pike13.com/api/v2/desk/punches \
-H "Authorization: Bearer XXXXXXXXXXXXXXX" \
-H "Content-Type: application/json" \
-d '{"punch": {"visit_id": 1, "plan_id": 2}}'
RESPONSE
{
"punches": [
{
"id": 1,
"visit_id": 1,
"plan_id": 2,
"created_at": "2014-09-12T23:14:13Z"
}
]
}
Attributes
| visit_id | integer | The id of the visit. Required. |
|---|---|---|
| plan_id | integer | The id of the plan. Optional. If omitted, we will attempt to automatically find a suitable plan. |
DELETE /api/v2/desk/punches/:id
Destroys a punch. The associated visit will be become unpaid.
REQUEST
$ curl -X DELETE https://mybiz.pike13.com/api/v2/desk/punches/1 \
-H "Authorization: Bearer XXXXXXXXXXXXXXX"
RESPONSE