-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo.http
157 lines (129 loc) · 7.97 KB
/
demo.http
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
# To use this file please install the REST Client plugin for VSCode => https://marketplace.visualstudio.com/items?itemName=humao.rest-client
@authToken = {{$dotenv CYPRESS_WORDPRESS_AUTH}}
@couponId = 30080
9NKxGbX!@&NP6oe&
###
GET https://acecentre.arlo.co/management/Orders/GenPdf.ashx?OrderID=12&IsInvoice=true
Cookie: arloauth=eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2Q0JDLUhTNTEyIiwia2lkIjoiMDQ1NzA1YzhhYTM5NDRjYmFhOGVlMzEwMTVmMjY4M2UiLCJ0eXAiOiJKV1QifQ..F5mq3EjfghQpSdBT8Qm-HA.sBje7k1Crh9wwafuA7Y_KC92V_mfixot3SyJmdfOnz5XKDNSUV9g5yOrvA-TqMeUTW5X6d1qmfvjIhqhtgf3dAB895iLwGF0D8NVDXE0lWdgFEYLqa1nonaEt07zct-tEQAqK5QvOSkepCC6KZiyCG_4dcLLtc-e-521Lbdmh8kbtp6SU5tpUf5KMdUItWtCIDGwyF32hyOIHYtCmxTStzwc9EOWT0qmQtJhZiiWy9RqxesGDLsQGu932ULt8h71ADbD3YC8ZRHxxW9uuVKn2HIRlu5ZtHVm41TTHC1HxLQcjbsi71UsenbhFWPJlb2r29ty6t4tZsZ7kUWIeuKeYnhB6S1mhww4eZEJ4wweDqP6fGjw1u0IcELTdbZer5dRZCfgDR9P2lfTkXASOiIVav58CpeeMf69aYnoGpnjc1WTkIIcV_3R00V-HT2NRnFjI_qPQBd7iPHvMdEPYTdYzR3dEUqBPEQvvMOVQ9FCvWZupKzKQO8MRhGDkTAwtxdYCflx4oEHBdhay7xooYO0HPplEDu8u4cLFgpQXCZTCNBaZS7YTHrp6MUKaoS4UPdbDWpKTeGX51-uvGY8jzR8cHIcA7yKktlYBvNqr_4KW02OJ_k5Y5SgE5Xs-0GNis3aCkGafIUp1piRPzp4F4XcHsVW7HpfSeNU6ImcKNJbJleb6lVYha7nLFfcQmEPera3Rsmvlp7a_c9IQYrD7YrJMc1P4Syf2R6W7IZDyPDowdqXU5Y_YZcANDxIWzGUrg1wNoHV9s7qjI3Rwpe5Ax2wIPbdevbDAS5F2TKhS2sM6wsx7_unq_XsEVJPbhPzxCUL.MpC8KSZ5rokgfIwTjr0uBT2hNkOuqIcuY1SMeCr3G1o;
### Language Library
GET https://language-library.acecentre.org.uk/wp-json
Content-Type: application/json
### Language Library
GET https://language-library.acecentre.org.uk/wp-json/language-library/v1/fields
Content-Type: application/json
### Language Library
GET https://language-library.acecentre.org.uk/wp-json/language-library/v1/slugs
Content-Type: application/json
### Language Library
POST https://language-library.acecentre.org.uk/wp-json/language-library/v1/resources
Content-Type: application/json
{
"slugs": ["this-is-a-new-resources", "listener-mediated-phrasebook-34"]
}
### Language Library
GET https://language-library.acecentre.org.uk/wp-json/language-library/v1/resources
Content-Type: application/json
### GraphQL Query for all prodducts
POST https://backend.acecentre.org.uk/graphql
Content-Type: application/json
{
"query": "query AllProducts {\n products(first: 1000) {\n nodes {\n attachedResources {\n nodes {\n slug\n databaseId\n date\n name\n description\n shortDescription\n featured\n totalSales\n meta {\n ibook\n epubLocation\n epubViewLocation\n }\n image {\n altText\n mediaDetails {\n width\n height\n }\n sourceUrl\n }\n productCategories {\n nodes {\n name\n slug\n parent {\n node {\n name\n parent {\n node {\n name\n }\n }\n }\n }\n }\n }\n }\n }\n productCategories {\n nodes {\n name\n slug\n parent {\n node {\n name\n parent {\n node {\n name\n }\n }\n }\n }\n }\n }\n meta {\n ibook\n epubLocation\n epubViewLocation\n project {\n ... on Project {\n title\n slug\n content\n date\n excerpt\n categories {\n nodes {\n name\n }\n }\n extraMeta {\n featured\n }\n featuredImage {\n node {\n sourceUrl\n altText\n mediaDetails {\n width\n height\n }\n }\n }\n }\n }\n }\n slug\n name\n totalSales\n featured\n shortDescription\n description\n date\n courseGroupPurchase\n moodleCourses {\n nodes {\n id\n content\n title\n featuredImage {\n node {\n sourceUrl\n altText\n mediaDetails {\n width\n height\n }\n }\n }\n meta {\n location\n date\n dateSpecific\n shortDesc\n courseLevel {\n name\n slug\n id\n }\n }\n }\n }\n image {\n altText\n mediaDetails {\n width\n height\n }\n sourceUrl\n }\n galleryImages {\n nodes {\n altText\n mediaDetails {\n width\n height\n }\n sourceUrl\n }\n }\n ... on SimpleProduct {\n price(format: RAW)\n soldIndividually\n downloadable\n stockStatus\n stockQuantity\n databaseId\n }\n ... on ExternalProduct {\n price(format: RAW)\n databaseId\n externalUrl\n buttonText\n }\n ... on VariableProduct {\n databaseId\n soldIndividually\n variations {\n nodes {\n name\n id\n slug\n price(format: RAW)\n totalSales\n downloadable\n stockStatus\n stockQuantity\n databaseId\n attributes {\n nodes {\n value\n }\n }\n }\n }\n }\n }\n }\n}\n",
"variables": null,
"operationName": "AllProducts"
}
### Create new coupon
POST https://backend.acecentre.org.uk/wp-json/wc/v3/coupons
Content-Type: application/json
Authorization: Basic {{authToken}}
{
"code": "cypress_testing_code",
"discount_type": "percent",
"amount": "100",
"usage_limit": 1,
"description": "Created automatically for Cypress tests"
}
### Delete Coupon
DELETE https://backend.acecentre.org.uk/wp-json/wc/v3/coupons/{{couponId}}?force=true
Content-Type: application/json
Authorization: Basic {{authToken}}
### Get Coupon
GET https://backend.acecentre.org.uk/wp-json/wc/v3/coupons/{{couponId}}?force=true
Content-Type: application/json
Authorization: Basic {{authToken}}
### GraphQL
POST https://digitalocean.acecentre.org.uk/index.php?graphql
Accept: application/json
Content-Type: application/json
X-REQUEST-TYPE: GraphQL
query GetAllProductCategories {
productCategories(first: 1000) {
nodes {
name
id
slug
products(first: 1000) {
nodes {
slug
moodleCourses {
nodes {
slug
}
}
}
}
image {
sourceUrl
altText
mediaDetails {
width
height
}
}
ancestors {
nodes {
id
}
}
children(first: 1000) {
nodes {
products(first: 1000) {
nodes {
slug
moodleCourses {
nodes {
slug
}
}
}
}
name
id
slug
image {
sourceUrl
altText
mediaDetails {
width
height
}
}
children(first: 1000) {
nodes {
id
slug
name
image {
sourceUrl
altText
mediaDetails {
width
height
}
}
}
}
}
}
}
}
}