Lifts

List Lifts

Request:

GET /api/operations/lifts

Response:

// 200 OK
{
    "lifts": [
        {
            "id": 1,
            "name": "Albion",
            "slug": "albion",
            "open": true,
            "closing_at": "16:30",
            "notes": null,
            "ordered": 0,
            "created_at": "2019-08-07 01:52:01",
            "updated_at": "2019-08-07 01:52:01"
        },
        {
            "id": 2,
            "name": "Sunnyside",
            "slug": "sunnyside",
            "open": true,
            "closing_at": "16:30",
            "notes": null,
            "ordered": 1,
            "created_at": "2019-08-07 01:52:01",
            "updated_at": "2019-08-07 01:52:01"
        },
        {
            "id": 3,
            "name": "Supreme",
            "slug": "supreme",
            "open": false,
            "closing_at": "16:30",
            "notes": null,
            "ordered": 2,
            "created_at": "2019-08-07 01:52:01",
            "updated_at": "2019-08-07 01:52:01"
        },
        {
            "id": 4,
            "name": "Sugarloaf",
            "slug": "sugarloaf",
            "open": false,
            "closing_at": "16:30",
            "notes": null,
            "ordered": 3,
            "created_at": "2019-08-07 01:52:01",
            "updated_at": "2019-08-07 01:52:01"
        },
        {
            "id": 5,
            "name": "Collins",
            "slug": "collins",
            "open": false,
            "closing_at": "16:30",
            "notes": null,
            "ordered": 4,
            "created_at": "2019-08-07 01:52:01",
            "updated_at": "2019-08-07 01:52:01"
        },
        {
            "id": 6,
            "name": "Wildcat",
            "slug": "wildcat",
            "open": false,
            "closing_at": "16:30",
            "notes": null,
            "ordered": 5,
            "created_at": "2019-08-07 01:52:01",
            "updated_at": "2019-08-07 01:52:01"
        }
    ]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
Code Status Reason
200 OK Successful
500 Server Error 💥

Create Lift

Request:

POST /api/operations/lifts

// Payload:
{
    "name": "Collins",
    "open": true,
    "closing_at": "16:30",
    "notes": "Yadda, yadda..."
}
1
2
3
4
5
6
7

Response:

// 201 Created
{
    "lift": {
        "name": "Collins",
        "open": true,
        "closing_at": "16:30",
        "notes": "Yadda, yadda...",
        "slug": "collins",
        "updated_at": "2019-08-07 01:52:01",
        "created_at": "2019-08-07 01:52:01",
        "id": 1
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
Code Status Reason
201 Created Successful
417 Expectation Failed Error
422 Unprocessable Entity Validation Failed
500 Server Error 💥

Get Lift

Request:

GET /api/operations/lifts/{id}

Response:

// 200 OK
{
    "lift": {
        "id": 5,
        "name": "Collins",
        "slug": "collins",
        "open": true,
        "closing_at": "16:30",
        "notes": null,
        "ordered": 4,
        "created_at": "2019-08-07 01:52:01",
        "updated_at": "2019-08-07 01:52:01"
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Code Status Reason
200 OK Successful
500 Server Error 💥

Update Lift

Request:

PUT /api/operations/lifts/{id}

// Payload:
{
    "name": "Collins",
    "open": false,
    "closing_at": "12:00",
    "notes": "Too windy."
}
1
2
3
4
5
6
7

Response:

// 202 Accepted
{
    "lift": {
        "id": 1,
        "name": "Collins",
        "slug": "collins",
        "open": false,
        "closing_at": "12:00",
        "notes": "Too windy."
        "ordered": null,
        "created_at": "2019-08-07 01:52:01",
        "updated_at": "2019-08-07 01:52:01"
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Code Status Reason
202 Accepted Successful
417 Expectation Failed Error
422 Unprocessable Entity Validation Failed
500 Server Error 💥

Delete Lift

Request:

DELETE /api/operations/lifts/{id}

Response:

// 204 No Content
{
    null
}
1
2
3
4
Code Status Reason
204 No Content Successful
417 Expectation Failed Error
500 Server Error 💥

Runs

List Runs

Request:

GET /api/operations/runs

Response:

// 200 OK
{
    "runs": [
        {
            "id": 1,
            "name": "Patsey Marley",
            "slug": "patsey-marley",
            "open": true,
            "groomed": true,
            "difficulty": "green",
            "notes": null,
            "ordered": 0,
            "created_at": "2019-08-07 01:52:02",
            "updated_at": "2019-08-07 01:52:02"
        },
        {
            "id": 2,
            "name": "Crooked Mile",
            "slug": "crooked-mile",
            "open": false,
            "groomed": false,
            "difficulty": "green",
            "notes": null,
            "ordered": 1,
            "created_at": "2019-08-07 01:52:02",
            "updated_at": "2019-08-07 01:52:02"
        },
        {
            "id": 3,
            "name": "Sugar Way",
            "slug": "sugar-way",
            "open": false,
            "groomed": false,
            "difficulty": "green",
            "notes": null,
            "ordered": 2,
            "created_at": "2019-08-07 01:52:02",
            "updated_at": "2019-08-07 01:52:02"
        },
        {
            "id": 4,
            "name": "Dipsy Doodle",
            "slug": "dipsy-doodle",
            "open": true,
            "groomed": false,
            "difficulty": "green",
            "notes": null,
            "ordered": 3,
            "created_at": "2019-08-07 01:52:02",
            "updated_at": "2019-08-07 01:52:02"
        },
        {
            "id": 5,
            "name": "Sunnyside",
            "slug": "sunnyside",
            "open": true,
            "groomed": true,
            "difficulty": "green",
            "notes": null,
            "ordered": 4,
            "created_at": "2019-08-07 01:52:02",
            "updated_at": "2019-08-07 01:52:02"
        },
        ...
    ]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
Code Status Reason
200 OK Successful
500 Server Error 💥

Create Run

Request:

POST /api/operations/run

// Payload:
{
    "name": "Collins Face",
    "open": true,
    "groomed": true,
    "difficulty": "black"
}
1
2
3
4
5
6
7

Response:

// 201 Created
{
    "run": {
        "name": "Collins Face",
        "open": true,
        "groomed": true,
        "difficulty": "black",
        "slug": "collins-face",
        "updated_at": "2019-08-07 01:52:02",
        "created_at": "2019-08-07 01:52:02",
        "id": 1
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
Code Status Reason
201 Created Successful
417 Expectation Failed Error
422 Unprocessable Entity Validation Failed
500 Server Error 💥

Get Run

Request:

GET /api/operations/run/{id}

Response:

// 200 OK
{
    "run": {
        "id": 33,
        "name": "Collins Face",
        "slug": "collins-face",
        "open": true,
        "groomed": true,
        "difficulty": "black",
        "notes": null,
        "ordered": 32,
        "created_at": "2019-08-07 01:52:02",
        "updated_at": "2019-08-07 01:52:02"
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Code Status Reason
200 OK Successful
500 Server Error 💥

Update Run

Request:

PUT /api/operations/run/{id}

// Payload:
{
    "name": "Collins Face Updated",
    "open": true,
    "groomed": true,
    "difficulty": "black",
    "notes": "Updated notes..."
}
1
2
3
4
5
6
7
8

Response:

// 202 Accepted
{
    "run": {
        "id": 33,
        "name": "Collins Face Updated",
        "slug": "collins-face-updated",
        "open": true,
        "groomed": true,
        "difficulty": "black",
        "notes": "Updated notes...",
        "ordered": 32,
        "created_at": "2019-08-07 01:52:02",
        "updated_at": "2019-08-07 01:52:02"
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Code Status Reason
202 Accepted Successful
417 Expectation Failed Error
422 Unprocessable Entity Validation Failed
500 Server Error 💥

Delete Run

Request:

DELETE /api/operations/run/{id}

Response:

// 204 No Content
{
    null
}
1
2
3
4
Code Status Reason
204 No Content Successful
417 Expectation Failed Error
422 Unprocessable Entity Validation Failed
500 Server Error 💥

Attaching/Detaching Lifts & Runs

Attach

Request:

POST /api/operations/lift-run/{id}

// Payload: array of runs
{
    "runs": [1, 2, 3, 4, 5],
}
1
2
3
4

Response:

// 201 Created
{
    "lift": {
        "id": 1,
        "name": "Albion",
        "slug": "albion",
        "open": true,
        "closing_at": "16:30",
        "notes": null,
        "ordered": null,
        "created_at": "2019-08-07 03:04:10",
        "updated_at": "2019-08-07 03:04:10",
        "runs": [
            {
                "id": 1,
                "name": "Patsey Marley",
                "slug": "patsey-marley",
                "open": false,
                "groomed": true,
                "difficulty": "green",
                "notes": null,
                "ordered": 0,
                "created_at": "2019-08-07 03:04:10",
                "updated_at": "2019-08-07 03:04:10",
                "pivot": {
                    "lift_id": "1",
                    "run_id": "1"
                }
            },
            {
                "id": 2,
                "name": "Crooked Mile",
                "slug": "crooked-mile",
                "open": false,
                "groomed": false,
                "difficulty": "green",
                "notes": null,
                "ordered": 1,
                "created_at": "2019-08-07 03:04:10",
                "updated_at": "2019-08-07 03:04:10",
                "pivot": {
                    "lift_id": "1",
                    "run_id": "2"
                }
            },
            {
                "id": 3,
                "name": "Sugar Way",
                "slug": "sugar-way",
                "open": false,
                "groomed": true,
                "difficulty": "green",
                "notes": null,
                "ordered": 2,
                "created_at": "2019-08-07 03:04:10",
                "updated_at": "2019-08-07 03:04:10",
                "pivot": {
                    "lift_id": "1",
                    "run_id": "3"
                }
            },
            {
                "id": 4,
                "name": "Dipsy Doodle",
                "slug": "dipsy-doodle",
                "open": false,
                "groomed": true,
                "difficulty": "green",
                "notes": null,
                "ordered": 3,
                "created_at": "2019-08-07 03:04:10",
                "updated_at": "2019-08-07 03:04:10",
                "pivot": {
                    "lift_id": "1",
                    "run_id": "4"
                }
            },
            {
                "id": 5,
                "name": "Sunnyside",
                "slug": "sunnyside",
                "open": false,
                "groomed": true,
                "difficulty": "green",
                "notes": null,
                "ordered": 4,
                "created_at": "2019-08-07 03:04:10",
                "updated_at": "2019-08-07 03:04:10",
                "pivot": {
                    "lift_id": "1",
                    "run_id": "5"
                }
            }
        ]
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
Code Status Reason
201 Created Successful
417 Expectation Failed Error
422 Unprocessable Entity Validation Failed
500 Server Error 💥

Detach

Request:

DELETE /api/operations/lift-run/{id}

// Payload: array of runs
{
    "runs": [2, 4, 5],
}
1
2
3
4

Response:

// 202 Accepted
{
    "lift": {
        "id": 1,
        "name": "Albion",
        "slug": "albion",
        "open": false,
        "closing_at": "16:30",
        "notes": null,
        "ordered": null,
        "created_at": "2019-08-07 03:07:54",
        "updated_at": "2019-08-07 03:07:54",
        "runs": [
            {
                "id": 1,
                "name": "Patsey Marley",
                "slug": "patsey-marley",
                "open": true,
                "groomed": true,
                "difficulty": "green",
                "notes": null,
                "ordered": null,
                "created_at": "2019-08-07 03:07:54",
                "updated_at": "2019-08-07 03:07:54",
                "pivot": {
                    "lift_id": "1",
                    "run_id": "1"
                }
            },
            {
                "id": 3,
                "name": "Sugar Way",
                "slug": "sugar-way",
                "open": false,
                "groomed": true,
                "difficulty": "green",
                "notes": null,
                "ordered": null,
                "created_at": "2019-08-07 03:07:54",
                "updated_at": "2019-08-07 03:07:54",
                "pivot": {
                    "lift_id": "1",
                    "run_id": "3"
                }
            }
        ]
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Code Status Reason
202 Accepted Successful
417 Expectation Failed Error
422 Unprocessable Entity Validation Failed
500 Server Error 💥

Terrain Areas

List Terrain Areas

Request:

GET /api/operations/terrain-areas

Response:

// 200 OK
{
    "terrainAreas": [
        {
            "id": 1,
            "name": "Ballroom\/Baldy Shoulder",
            "slug": "ballroombaldy-shoulder",
            "open": false,
            "in_progress": false,
            "scheduled": true,
            "notes": null,
            "ordered": 0,
            "created_at": "2019-08-07 01:52:02",
            "updated_at": "2019-08-07 01:52:02"
        },
        {
            "id": 2,
            "name": "Backside",
            "slug": "backside",
            "open": true,
            "in_progress": false,
            "scheduled": false,
            "notes": null,
            "ordered": 1,
            "created_at": "2019-08-07 01:52:02",
            "updated_at": "2019-08-07 01:52:02"
        },
        {
            "id": 3,
            "name": "Devil's Castle",
            "slug": "devils-castle",
            "open": true,
            "in_progress": false,
            "scheduled": false,
            "notes": null,
            "ordered": 2,
            "created_at": "2019-08-07 01:52:02",
            "updated_at": "2019-08-07 01:52:02"
        },
        {
            "id": 4,
            "name": "Mount Baldy",
            "slug": "mount-baldy",
            "open": false,
            "in_progress": false,
            "scheduled": true,
            "notes": null,
            "ordered": 3,
            "created_at": "2019-08-07 01:52:02",
            "updated_at": "2019-08-07 01:52:02"
        },
        {
            "id": 5,
            "name": "East Castle",
            "slug": "east-castle",
            "open": false,
            "in_progress": false,
            "scheduled": false,
            "notes": null,
            "ordered": 4,
            "created_at": "2019-08-07 01:52:02",
            "updated_at": "2019-08-07 01:52:02"
        },
        {
            "id": 6,
            "name": "Catherine's Area",
            "slug": "catherines-area",
            "open": false,
            "in_progress": false,
            "scheduled": true,
            "notes": null,
            "ordered": 5,
            "created_at": "2019-08-07 01:52:02",
            "updated_at": "2019-08-07 01:52:02"
        },
        {
            "id": 7,
            "name": "Summer Road",
            "slug": "summer-road",
            "open": true,
            "in_progress": true,
            "scheduled": true,
            "notes": "Access to Catherine's Pass",
            "ordered": 6,
            "created_at": "2019-08-07 01:52:02",
            "updated_at": "2019-08-07 01:52:02"
        },
        {
            "id": 8,
            "name": "EBT\/Collins Return",
            "slug": "ebtcollins-return",
            "open": true,
            "in_progress": true,
            "scheduled": true,
            "notes": null,
            "ordered": 7,
            "created_at": "2019-08-07 01:52:02",
            "updated_at": "2019-08-07 01:52:02"
        }
    ]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
Code Status Reason
200 OK Successful
500 Server Error 💥

Create Terrain Area

Request:

POST /api/operations/terrain-area

// Payload:
{
    "name": "Mount Baldy",
    "open": false,
    "in_progress": false,
    "scheduled": true
}
1
2
3
4
5
6
7

Response:

// 201 Created
{
    "terrainArea": {
        "name": "Mount Baldy",
        "open": false,
        "in_progress": false,
        "scheduled": true,
        "slug": "mount-baldy",
        "updated_at": "2019-08-07 01:52:02",
        "created_at": "2019-08-07 01:52:02",
        "id": 1
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
Code Status Reason
201 Created Successful
417 Expectation Failed Error
422 Unprocessable Entity Validation Failed
500 Server Error 💥

Get Terrain Area

GET /api/operations/terrain-area/{id}

Response:

// 200 OK
{
    "terrainArea": {
        "id": 7,
        "name": "Summer Road",
        "slug": "summer-road",
        "open": true,
        "in_progress": true,
        "scheduled": false,
        "notes": "Access to Catherine's Pass",
        "ordered": 6,
        "created_at": "2019-08-07 01:52:02",
        "updated_at": "2019-08-07 01:52:02"
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Code Status Reason
200 OK Successful
500 Server Error 💥

Update Terrain Area

Request:

PUT /api/operations/terrain-area/{id}

// Payload:
{
    "name": "Mount Baldy",
    "open": true,
    "in_progress": false,
    "scheduled": false,
    "notes": "Updated notes."
}
1
2
3
4
5
6
7
8

Response:

// 202 Accepted
{
    "terrainArea": {
        "id": 4,
        "name": "Mount Baldy",
        "slug": "mount-baldy",
        "open": true,
        "in_progress": false,
        "scheduled": false,
        "notes": "Updated notes.",
        "ordered": 3,
        "created_at": "2019-08-07 01:52:02",
        "updated_at": "2019-08-07 01:52:02"
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Code Status Reason
202 Accepted Successful
417 Expectation Failed Error
422 Unprocessable Entity Validation Failed
500 Server Error 💥

Delete Terrain Area

Request:

DELETE /api/operations/terrain-area/{id}

Response:

// 204 No Content
{
    null
}
1
2
3
4
Code Status Reason
204 No Content Successful
417 Expectation Failed Error
500 Server Error 💥

Attaching/Detaching Lifts & Terrain Areas

Attach

Request:

POST /api/operations/lift-terrain-area/{id}

// Payload: array of terrainAreas
{
    "terrainAreas": [1, 2, 3],
}
1
2
3
4
Code Status Reason
201 Created Successful
417 Expectation Failed Error
422 Unprocessable Entity Validation Failed
500 Server Error 💥

Response:

// 201 Created
{
    "lift": {
        "id": 1,
        "name": "Albion",
        "slug": "albion",
        "open": true,
        "closing_at": "16:30",
        "notes": null,
        "ordered": null,
        "created_at": "2019-08-07 03:04:10",
        "updated_at": "2019-08-07 03:04:10",
        "terrainAreas": [
            {
                "id": 1,
                "name": "Ballroom\/Baldy Shoulder",
                "slug": "ballroombaldy-shoulder",
                "open": false,
                "in_progress": false,
                "scheduled": true,
                "notes": null,
                "ordered": 0,
                "created_at": "2019-08-07 01:52:02",
                "updated_at": "2019-08-07 01:52:02"
            },
            {
                "id": 2,
                "name": "Backside",
                "slug": "backside",
                "open": true,
                "in_progress": false,
                "scheduled": false,
                "notes": null,
                "ordered": 1,
                "created_at": "2019-08-07 01:52:02",
                "updated_at": "2019-08-07 01:52:02"
            },
            {
                "id": 3,
                "name": "Devil's Castle",
                "slug": "devils-castle",
                "open": true,
                "in_progress": false,
                "scheduled": false,
                "notes": null,
                "ordered": 2,
                "created_at": "2019-08-07 01:52:02",
                "updated_at": "2019-08-07 01:52:02"
            }
        ]
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52

Detach

Request:

DELETE /api/operations/lift-terrain-area/{id}

// Payload: array of terrain areas
{
    "terrainAreas": [2],
}
1
2
3
4

Response:

// 202 Accepted
{
    "lift": {
        "id": 1,
        "name": "Albion",
        "slug": "albion",
        "open": false,
        "closing_at": "16:30",
        "notes": null,
        "ordered": null,
        "created_at": "2019-08-07 03:07:54",
        "updated_at": "2019-08-07 03:07:54",
        "terrainAreas": [
            {
                "id": 1,
                "name": "Ballroom\/Baldy Shoulder",
                "slug": "ballroombaldy-shoulder",
                "open": false,
                "in_progress": false,
                "scheduled": true,
                "notes": null,
                "ordered": 0,
                "created_at": "2019-08-07 01:52:02",
                "updated_at": "2019-08-07 01:52:02"
            },
            {
                "id": 3,
                "name": "Devil's Castle",
                "slug": "devils-castle",
                "open": true,
                "in_progress": false,
                "scheduled": false,
                "notes": null,
                "ordered": 2,
                "created_at": "2019-08-07 01:52:02",
                "updated_at": "2019-08-07 01:52:02"
            }
        ]
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Code Status Reason
202 Accepted Successful
417 Expectation Failed Error
422 Unprocessable Entity Validation Failed
500 Server Error 💥

Access Gates

List Access Gates

Request:

GET /api/operations/access-gates

Response:

// 200 OK
{
    "accessGates": [
        {
            "id": 1,
            "name": "Sugarloaf Pass",
            "slug": "sugarloaf-pass",
            "open": false,
            "notes": null,
            "ordered": 0,
            "lifts": [
                {
                    "id": 4,
                    "name": "Sugarloaf",
                    "slug": "sugarloaf",
                    "capacity": 4,
                    "opening_at": "09:15",
                    "opening_at_formatted": "09:15 am",
                    "closing_at": "16:00",
                    "closing_at_formatted": "04:00 pm",
                    "open": false,
                    "notes": null,
                    "ordered": 3,
                    "created_at": "2019-11-06 20:27:55",
                    "updated_at": "2019-12-09 16:01:00"
                }
            ],
            "created_at": "2019-11-06 20:27:56",
            "updated_at": "2019-11-06 20:27:56"
        },
        {
            "id": 2,
            "name": "Keyhole",
            "slug": "keyhole",
            "open": false,
            "notes": null,
            "ordered": 1,
            "lifts": [
                {
                    "id": 6,
                    "name": "Wildcat",
                    "slug": "wildcat",
                    "capacity": 2,
                    "opening_at": "09:15",
                    "opening_at_formatted": "09:15 am",
                    "closing_at": "16:00",
                    "closing_at_formatted": "04:00 pm",
                    "open": false,
                    "notes": null,
                    "ordered": 5,
                    "created_at": "2019-11-06 20:27:55",
                    "updated_at": "2019-12-09 16:00:54"
                }
            ],
            "created_at": "2019-11-06 20:27:56",
            "updated_at": "2019-11-06 20:27:56"
        },
        {
            "id": 3,
            "name": "White Cliffs",
            "slug": "white-cliffs",
            "open": true,
            "notes": null,
            "ordered": 2,
            "lifts": [
                {
                    "id": 6,
                    "name": "Wildcat",
                    "slug": "wildcat",
                    "capacity": 2,
                    "opening_at": "09:15",
                    "opening_at_formatted": "09:15 am",
                    "closing_at": "16:00",
                    "closing_at_formatted": "04:00 pm",
                    "open": false,
                    "notes": null,
                    "ordered": 5,
                    "created_at": "2019-11-06 20:27:55",
                    "updated_at": "2019-12-09 16:00:54"
                }
            ],
            "created_at": "2019-11-06 20:27:56",
            "updated_at": "2019-11-06 20:27:56"
        },
        {
            "id": 4,
            "name": "Blackjack Traverse",
            "slug": "blackjack-traverse",
            "open": true,
            "notes": null,
            "ordered": 3,
            "lifts": [
                {
                    "id": 6,
                    "name": "Wildcat",
                    "slug": "wildcat",
                    "capacity": 2,
                    "opening_at": "09:15",
                    "opening_at_formatted": "09:15 am",
                    "closing_at": "16:00",
                    "closing_at_formatted": "04:00 pm",
                    "open": false,
                    "notes": null,
                    "ordered": 5,
                    "created_at": "2019-11-06 20:27:55",
                    "updated_at": "2019-12-09 16:00:54"
                }
            ],
            "created_at": "2019-11-06 20:27:56",
            "updated_at": "2019-11-06 20:27:56"
        }
    ]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
Code Status Reason
200 OK Successful
500 Server Error 💥

Create Access Gate

Request:

POST /api/operations/access-gates

// Payload:
{
    "name": "Sugarloaf Pass",
    "open": false,
}
1
2
3
4
5

Response:

// 201 Created
{
    "accessGate": {
        "name": "Sugarloaf Pass",
        "slug": "sugarloaf-pass",
        "open": false,
        "notes": "",
        "ordered": 0,
        "created_at": "2019-11-06 20:27:56",
        "updated_at": "2019-12-10 08:41:52"
        "id": 1,
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
Code Status Reason
201 Created Successful
417 Expectation Failed Error
422 Unprocessable Entity Validation Failed
500 Server Error 💥

Get Access Gate

GET /api/operations/access-gates/{id}

Response:

// 200 OK
{
    "accessGate": {
        "id": 1,
        "name": "Sugarloaf Pass",
        "slug": "sugarloaf-pass",
        "open": false,
        "notes": "",
        "ordered": 0,
        "created_at": "2019-11-06 20:27:56",
        "updated_at": "2019-12-10 08:41:52"
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
Code Status Reason
200 OK Successful
500 Server Error 💥

Update Access Gate

Request:

PUT /api/operations/access-gates/{id}

// Payload:
{
    "name": "Sugarloaf Pass",
    "open": 1,
    "notes": "Open now."
}
1
2
3
4
5
6

Response:

// 202 Accepted
{
    "accessGate": {
        "id": 1,
        "name": "Sugarloaf Pass",
        "slug": "sugarloaf-pass",
        "open": true,
        "notes": "Open now.",
        "ordered": 0,
        "created_at": "2019-11-06 20:27:56",
        "updated_at": "2019-12-56 08:41:52"
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
Code Status Reason
202 Accepted Successful
417 Expectation Failed Error
422 Unprocessable Entity Validation Failed
500 Server Error 💥

Delete Access Gate

Request:

DELETE /api/operations/access-gates/{id}

Response:

// 204 No Content
{
    null
}
1
2
3
4
Code Status Reason
204 No Content Successful
417 Expectation Failed Error
500 Server Error 💥

Attaching/Detaching Lifts & Access Gates

Attach

Request:

POST /api/operations/lift-access-gate/{id}

// Payload: array of accessGates
{
    "accessGates": [1, 2, 3, 4],
}
1
2
3
4
Code Status Reason
201 Created Successful
417 Expectation Failed Error
422 Unprocessable Entity Validation Failed
500 Server Error 💥

Response:

// 201 Created
{
    "lift": {
        "id": 1,
        "name": "Albion",
        "slug": "albion",
        "open": true,
        "closing_at": "16:30",
        "notes": null,
        "ordered": null,
        "created_at": "2019-08-07 03:04:10",
        "updated_at": "2019-08-07 03:04:10",
        "accessGates": [
            {
                "id": 1,
                "name": "Sugarloaf Pass",
                "slug": "sugarloaf-pass",
                "open": false,
                "notes": null,
                "ordered": 0,
                "created_at": "2019-11-06 20:27:56",
                "updated_at": "2019-11-06 20:27:56"
            },
            {
                "id": 2,
                "name": "Keyhole",
                "slug": "keyhole",
                "open": false,
                "notes": null,
                "ordered": 1,
                "created_at": "2019-11-06 20:27:56",
                "updated_at": "2019-11-06 20:27:56"
            },
            {
                "id": 3,
                "name": "White Cliffs",
                "slug": "white-cliffs",
                "open": true,
                "notes": null,
                "ordered": 2,
                "created_at": "2019-11-06 20:27:56",
                "updated_at": "2019-11-06 20:27:56"
            },
            {
                "id": 4,
                "name": "Blackjack Traverse",
                "slug": "blackjack-traverse",
                "open": true,
                "notes": null,
                "ordered": 3,
                "created_at": "2019-11-06 20:27:56",
                "updated_at": "2019-11-06 20:27:56"
            }
        ]
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56

Detach

Request:

DELETE /api/operations/lift-access-gate/{id}

// Payload: array of access gates
{
    "accessGates": [2, 3],
}
1
2
3
4

Response:

// 202 Accepted
{
    "lift": {
        "id": 1,
        "name": "Albion",
        "slug": "albion",
        "open": false,
        "closing_at": "16:30",
        "notes": null,
        "ordered": null,
        "created_at": "2019-08-07 03:07:54",
        "updated_at": "2019-08-07 03:07:54",
        "accessGates": [
            {
                "id": 1,
                "name": "Sugarloaf Pass",
                "slug": "sugarloaf-pass",
                "open": false,
                "notes": null,
                "ordered": 0,
                "created_at": "2019-11-06 20:27:56",
                "updated_at": "2019-11-06 20:27:56"
            },
            {
                "id": 4,
                "name": "Blackjack Traverse",
                "slug": "blackjack-traverse",
                "open": true,
                "notes": null,
                "ordered": 3,
                "created_at": "2019-11-06 20:27:56",
                "updated_at": "2019-11-06 20:27:56"
            }
        ]
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Code Status Reason
202 Accepted Successful
417 Expectation Failed Error
422 Unprocessable Entity Validation Failed
500 Server Error 💥