Skip to content

Commit 4e4eec3

Browse files
committed
Updates Slate version.
1 parent de49684 commit 4e4eec3

File tree

15 files changed

+2145
-385
lines changed

15 files changed

+2145
-385
lines changed

source/images/logo.png

-18.4 KB
Loading

source/images/logo_white.svg

Lines changed: 21 additions & 0 deletions
Loading

source/includes/_accounts.md

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
# Accounts
2+
3+
## Switch Accounts
4+
5+
```shell
6+
curl "https://api.runara.com/accounts/switch/{ID}"
7+
-H "Authorization: Bearer:your.jwt.token"
8+
```
9+
10+
Switches the current account of the user provided that the user has access to the account.
11+
12+
<aside class="warning">
13+
User must have access to the account before switching to it. If they do not, a `401` response is returned.
14+
</aside>
15+
16+
### HTTP Request
17+
18+
`GET https://api.runara.com/accounts/switch/{ID}`
19+
20+
### URL Parameters
21+
22+
Parameter | Required | Description | Example
23+
--------- | -------- | ----------- | -----------
24+
ID | true | ID of account to switch to. | `568b55febffebc91068d4579`
25+
26+
## View User Favorites
27+
28+
```shell
29+
curl "https://api.runara.com/accounts/favorites"
30+
-H "Authorization: Bearer:your.jwt.token"
31+
```
32+
> The above command returns JSON structured like this:
33+
34+
```json
35+
{
36+
"data":{
37+
[
38+
{
39+
"name": "Curves2Go",
40+
"locations": [
41+
{
42+
"name": "West End",
43+
"id": "234343"
44+
}
45+
],
46+
"id": "2344342"
47+
}
48+
]
49+
}
50+
}
51+
```
52+
53+
Returns the clients's favorites list.
54+
55+
<aside class="warning">
56+
If you wish to view the favorites of a different client, you can change the method of this request to POST and pass the client's ID as "client".
57+
</aside>
58+
59+
### HTTP Request
60+
61+
`GET https://api.runara.com/accounts/favorites`
62+
63+
### BODY Parameters
64+
65+
Parameter | Required | Description | Example
66+
--------- | -------- | ----------- | -----------
67+
client | false | ID of client if not current client. | `234334`
68+
69+
## Manage User Favorites
70+
71+
```shell
72+
curl "https://api.runara.com/accounts/favorite"
73+
-H "Authorization: Bearer:your.jwt.token"
74+
```
75+
76+
> The above command returns JSON structured like this:
77+
78+
```json
79+
{
80+
"data":{
81+
[
82+
{
83+
"name": "Curves2Go",
84+
"multiple": true,
85+
"locations": [
86+
{
87+
"name": "West End",
88+
"id": "234343"
89+
}
90+
],
91+
"id": "234334"
92+
}
93+
]
94+
}
95+
}
96+
```
97+
98+
Adds or removes (favorites or un-favorites) a location for a client. If client already has the `location` marked as favorite, then this action will un-favorite the locaton.
99+
100+
### HTTP Request
101+
102+
`POST https://api.runara.com/accounts/favorite`
103+
104+
### BODY Parameters
105+
106+
Parameter | Required | Description | Example
107+
--------- | -------- | ----------- | -----------
108+
location | true | ID of location to favorite. | `2343432`

source/includes/_admin.md

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
# Admin
2+
3+
## What (and why) are Admin Routes?
4+
5+
The `admin` routes are helper endpoints created to assist staff with day-to-day workflow tasks, such as check-ins and payments. While these tasks can be achieved using other existing endpoints, `admin` routes are always set in the context of a staff member so any information returned is pertinent to the logged-in user (Staff Member).
6+
7+
## Admin View
8+
9+
```shell
10+
curl "https://api.runara.com/admin"
11+
-H "Authorization: Bearer:your.jwt.token"
12+
```
13+
14+
> The above command returns JSON structured like this:
15+
16+
```json
17+
{
18+
"meta" : {
19+
"accounts" : [
20+
{
21+
"id" : "sd5763ce9a89201a8f515fa4",
22+
"name" : "ABC and Co.",
23+
"role" : "staff"
24+
},
25+
{
26+
"id" : "335763ce9a89203a8f515fd0",
27+
"name" : "Curves on South",
28+
"role" : "staff"
29+
}
30+
],
31+
"current_account" : [
32+
{
33+
"id" : "sd5763ce9a89201a8f515fa4",
34+
"name" : "ABC and Co.",
35+
"role" : "staff"
36+
}
37+
]
38+
},
39+
"data": [
40+
{
41+
"id": "5976940e9a81200a4f10c363",
42+
"session_id": "5959bdce1a892041711c4a2a-5959bdce1a892041711c4a2d-1500985800",
43+
"name": "Insanity Level 1",
44+
"type": "class",
45+
"item_id": "5959bdce1a892041711c4a2a",
46+
"date": "July 25th at 12:30pm",
47+
"timestamp": 1500985800,
48+
"duration": "60 minutes",
49+
"timespan": "12:30pm - 1:30pm",
50+
"clients": [
51+
{
52+
"id": "595b06a91a89204afc2fb2c4",
53+
"booking_id": "5959bdce9a892041711c4a2a-5959bdce1a892041711c4a2d-1500985800",
54+
"name": "Nestor DuBuque",
55+
"payment_status": {
56+
"status": 1,
57+
"description": "Paid - Credit Card"
58+
},
59+
"payment_amount": "24.00",
60+
"checked_in": false
61+
},
62+
{
63+
"id": "595b06a81a89204afe458627",
64+
"booking_id": "5959bdce9a891041711c4a2a-5959bdce9a892041711c4a2d-1500985800",
65+
"name": "Kenyon Hartmann",
66+
"payment_status": {
67+
"status": 0,
68+
"description": "Unpaid - Pay at checkin"
69+
},
70+
"payment_amount": "24.00",
71+
"checked_in": false
72+
}
73+
],
74+
"account": {
75+
"id": "5940b4a81a892006485be28b",
76+
"name": "Curves2Go"
77+
},
78+
"staffed_by": {
79+
"id": "594c6d7f1a8920785c0e25e8",
80+
"name": "Michael Wuori"
81+
},
82+
"location": {
83+
"id": "5940b6251a892006485be2bd",
84+
"name": "Suburbia",
85+
"room": "Studio A"
86+
},
87+
"capacity": 25,
88+
"total_clients": 2,
89+
"total_checkins": 0
90+
}
91+
]
92+
}
93+
```
94+
95+
If logged-in as a staff member, returns upcoming bookings staff accounts.
96+
97+
<aside class="notice">
98+
This endpoint should only be used by staff members. Non staff members will not receive any results from this endpoint.
99+
</aside>
100+
101+
### HTTP Request
102+
103+
`GET https://api.runara.com/admin`
104+
105+
106+
## Switch Accounts
107+
108+
```shell
109+
curl "https://api.runara.com/admin/switch/{ID}"
110+
-H "Authorization: Bearer:your.jwt.token"
111+
```
112+
113+
Switches the current account of the user, provided the user has access to the account.
114+
115+
<aside class="warning">
116+
User must have access to the account before switching to it. If they do not, a `401` response is returned.
117+
</aside>
118+
119+
### HTTP Request
120+
121+
`GET https://api.runara.com/admin/switch/{ID}`
122+
123+
### URL Parameters
124+
125+
Parameter | Required | Description | Example
126+
--------- | -------- | ----------- | -----------
127+
ID | true | ID of account to switch to. | `568b55febffebc91068d4579`

0 commit comments

Comments
 (0)