-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathTicket_Allocation.postman_collection.json
More file actions
106 lines (106 loc) · 2.83 KB
/
Ticket_Allocation.postman_collection.json
File metadata and controls
106 lines (106 loc) · 2.83 KB
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
{
"info": {
"_postman_id": "a738e5c8-0312-4ed6-bf38-0943677f59f7",
"name": "Ticket Allocation",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "164129"
},
"item": [
{
"name": "Get ticket option",
"request": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/vnd.api+json",
"type": "text"
}
],
"url": {
"raw": "localhost:3000/ticket_options/{{ticketOptionID}}",
"host": [
"localhost"
],
"port": "3000",
"path": [
"ticket_options",
"{{ticketOptionID}}"
]
},
"description": "Get Ticket Option by provided Ticket Option ID"
},
"response": []
},
{
"name": "Create ticket option",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var data = JSON.parse(pm.response.text());",
"pm.environment.set(\"ticketOptionID\", data[\"data\"][\"id\"]);",
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/vnd.api+json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"data\": {\n \"type\": \"ticket_options\",\n \"attributes\": {\n \"name\": \"Test ticket option\",\n \"description\": \"ticket option description\",\n \"allocation\": 100\n }\n }\n}"
},
"url": {
"raw": "localhost:3000/ticket_options",
"host": [
"localhost"
],
"port": "3000",
"path": [
"ticket_options"
]
},
"description": "Create Ticket Option with given attributes"
},
"response": []
},
{
"name": "Create Purchase",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/vnd.api+json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"data\": {\n \"type\": \"purchases\",\n \"attributes\": {\n \"quantity\": 1\n },\n \"relationships\": {\n \"user\": {\n \"data\": {\n \"type\": \"users\",\n \"id\": \"d6abe829-c28c-44ec-bee6-3183f2c53fef\"\n }\n },\n \"ticket_option\": {\n \"data\": {\n \"type\": \"ticket_options\",\n \"id\": \"{{ticketOptionID}}\"\n }\n }\n }\n }\n}"
},
"url": {
"raw": "localhost:3000/purchases",
"host": [
"localhost"
],
"port": "3000",
"path": [
"purchases"
]
},
"description": "Create Purchase with quantity and associated User / Ticket Option relationship"
},
"response": []
}
]
}