reqcord 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (249) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +8 -0
  3. data/CHANGELOG.md +77 -0
  4. data/Gemfile +5 -0
  5. data/Gemfile.lock +171 -0
  6. data/LICENSE.txt +21 -0
  7. data/README.md +239 -95
  8. data/Rakefile +13 -0
  9. data/docs/configuration.md +319 -0
  10. data/examples/complex-spec-app/.rspec +1 -0
  11. data/examples/complex-spec-app/README.md +21 -0
  12. data/examples/complex-spec-app/app.rb +363 -0
  13. data/examples/complex-spec-app/docs/api/README.md +104 -0
  14. data/examples/complex-spec-app/docs/api/api/v1/admin/products/create.md +117 -0
  15. data/examples/complex-spec-app/docs/api/api/v1/admin/products/destroy.md +51 -0
  16. data/examples/complex-spec-app/docs/api/api/v1/admin/products/index.md +11 -0
  17. data/examples/complex-spec-app/docs/api/api/v1/admin/products/list.md +106 -0
  18. data/examples/complex-spec-app/docs/api/api/v1/auth/index.md +9 -0
  19. data/examples/complex-spec-app/docs/api/api/v1/auth/login.md +76 -0
  20. data/examples/complex-spec-app/docs/api/api/v1/cart-items/create.md +91 -0
  21. data/examples/complex-spec-app/docs/api/api/v1/cart-items/destroy.md +51 -0
  22. data/examples/complex-spec-app/docs/api/api/v1/cart-items/index.md +10 -0
  23. data/examples/complex-spec-app/docs/api/api/v1/carts/checkout.md +102 -0
  24. data/examples/complex-spec-app/docs/api/api/v1/carts/index.md +10 -0
  25. data/examples/complex-spec-app/docs/api/api/v1/carts/show.md +73 -0
  26. data/examples/complex-spec-app/docs/api/api/v1/home/index.md +9 -0
  27. data/examples/complex-spec-app/docs/api/api/v1/home/list.md +47 -0
  28. data/examples/complex-spec-app/docs/api/api/v1/notes/create.md +94 -0
  29. data/examples/complex-spec-app/docs/api/api/v1/notes/index.md +10 -0
  30. data/examples/complex-spec-app/docs/api/api/v1/notes/list.md +61 -0
  31. data/examples/complex-spec-app/docs/api/api/v1/orders/cancel.md +69 -0
  32. data/examples/complex-spec-app/docs/api/api/v1/orders/create.md +150 -0
  33. data/examples/complex-spec-app/docs/api/api/v1/orders/destroy.md +37 -0
  34. data/examples/complex-spec-app/docs/api/api/v1/orders/index.md +13 -0
  35. data/examples/complex-spec-app/docs/api/api/v1/orders/list.md +78 -0
  36. data/examples/complex-spec-app/docs/api/api/v1/orders/show.md +83 -0
  37. data/examples/complex-spec-app/docs/api/api/v1/products/index.md +11 -0
  38. data/examples/complex-spec-app/docs/api/api/v1/products/list.md +83 -0
  39. data/examples/complex-spec-app/docs/api/api/v1/products/search.md +88 -0
  40. data/examples/complex-spec-app/docs/api/api/v1/products/show.md +71 -0
  41. data/examples/complex-spec-app/docs/api/api/v1/profiles/index.md +10 -0
  42. data/examples/complex-spec-app/docs/api/api/v1/profiles/show.md +61 -0
  43. data/examples/complex-spec-app/docs/api/api/v1/profiles/update.md +91 -0
  44. data/examples/complex-spec-app/docs/api/api/v2/products/index.md +9 -0
  45. data/examples/complex-spec-app/docs/api/api/v2/products/list.md +77 -0
  46. data/examples/complex-spec-app/docs/api/curl/api/v1/admin/products/create.sh +18 -0
  47. data/examples/complex-spec-app/docs/api/curl/api/v1/admin/products/destroy.sh +9 -0
  48. data/examples/complex-spec-app/docs/api/curl/api/v1/admin/products/list.sh +9 -0
  49. data/examples/complex-spec-app/docs/api/curl/api/v1/auth/login.sh +9 -0
  50. data/examples/complex-spec-app/docs/api/curl/api/v1/cart-items/create.sh +16 -0
  51. data/examples/complex-spec-app/docs/api/curl/api/v1/cart-items/destroy.sh +9 -0
  52. data/examples/complex-spec-app/docs/api/curl/api/v1/carts/checkout.sh +13 -0
  53. data/examples/complex-spec-app/docs/api/curl/api/v1/carts/show.sh +9 -0
  54. data/examples/complex-spec-app/docs/api/curl/api/v1/home/list.sh +8 -0
  55. data/examples/complex-spec-app/docs/api/curl/api/v1/notes/create.sh +15 -0
  56. data/examples/complex-spec-app/docs/api/curl/api/v1/notes/list.sh +9 -0
  57. data/examples/complex-spec-app/docs/api/curl/api/v1/orders/cancel.sh +9 -0
  58. data/examples/complex-spec-app/docs/api/curl/api/v1/orders/create.sh +29 -0
  59. data/examples/complex-spec-app/docs/api/curl/api/v1/orders/destroy.sh +9 -0
  60. data/examples/complex-spec-app/docs/api/curl/api/v1/orders/list.sh +9 -0
  61. data/examples/complex-spec-app/docs/api/curl/api/v1/orders/show.sh +9 -0
  62. data/examples/complex-spec-app/docs/api/curl/api/v1/products/list.sh +8 -0
  63. data/examples/complex-spec-app/docs/api/curl/api/v1/products/search.sh +8 -0
  64. data/examples/complex-spec-app/docs/api/curl/api/v1/products/show.sh +8 -0
  65. data/examples/complex-spec-app/docs/api/curl/api/v1/profiles/show.sh +9 -0
  66. data/examples/complex-spec-app/docs/api/curl/api/v1/profiles/update.sh +16 -0
  67. data/examples/complex-spec-app/docs/api/curl/api/v2/products/list.sh +8 -0
  68. data/examples/complex-spec-app/docs/api/dataset.json +5116 -0
  69. data/examples/complex-spec-app/docs/api/postman/collection.json +2519 -0
  70. data/examples/complex-spec-app/generate.rb +14 -0
  71. data/examples/complex-spec-app/reqcord.yml +28 -0
  72. data/examples/complex-spec-app/spec/requests/admin_spec.rb +67 -0
  73. data/examples/complex-spec-app/spec/requests/cart_spec.rb +61 -0
  74. data/examples/complex-spec-app/spec/requests/home_and_auth_spec.rb +49 -0
  75. data/examples/complex-spec-app/spec/requests/orders_spec.rb +124 -0
  76. data/examples/complex-spec-app/spec/requests/products_spec.rb +65 -0
  77. data/examples/complex-spec-app/spec/spec_helper.rb +17 -0
  78. data/examples/complex-test-app/README.md +40 -0
  79. data/examples/complex-test-app/app.rb +384 -0
  80. data/examples/complex-test-app/docs/api/README.md +104 -0
  81. data/examples/complex-test-app/docs/api/api/v1/admin/products/create.md +117 -0
  82. data/examples/complex-test-app/docs/api/api/v1/admin/products/destroy.md +51 -0
  83. data/examples/complex-test-app/docs/api/api/v1/admin/products/index.md +11 -0
  84. data/examples/complex-test-app/docs/api/api/v1/admin/products/list.md +106 -0
  85. data/examples/complex-test-app/docs/api/api/v1/auth/index.md +9 -0
  86. data/examples/complex-test-app/docs/api/api/v1/auth/login.md +76 -0
  87. data/examples/complex-test-app/docs/api/api/v1/cart-items/create.md +91 -0
  88. data/examples/complex-test-app/docs/api/api/v1/cart-items/destroy.md +51 -0
  89. data/examples/complex-test-app/docs/api/api/v1/cart-items/index.md +10 -0
  90. data/examples/complex-test-app/docs/api/api/v1/carts/checkout.md +102 -0
  91. data/examples/complex-test-app/docs/api/api/v1/carts/index.md +10 -0
  92. data/examples/complex-test-app/docs/api/api/v1/carts/show.md +73 -0
  93. data/examples/complex-test-app/docs/api/api/v1/home/index.md +9 -0
  94. data/examples/complex-test-app/docs/api/api/v1/home/list.md +47 -0
  95. data/examples/complex-test-app/docs/api/api/v1/notes/create.md +94 -0
  96. data/examples/complex-test-app/docs/api/api/v1/notes/index.md +10 -0
  97. data/examples/complex-test-app/docs/api/api/v1/notes/list.md +61 -0
  98. data/examples/complex-test-app/docs/api/api/v1/orders/cancel.md +69 -0
  99. data/examples/complex-test-app/docs/api/api/v1/orders/create.md +150 -0
  100. data/examples/complex-test-app/docs/api/api/v1/orders/destroy.md +37 -0
  101. data/examples/complex-test-app/docs/api/api/v1/orders/index.md +13 -0
  102. data/examples/complex-test-app/docs/api/api/v1/orders/list.md +71 -0
  103. data/examples/complex-test-app/docs/api/api/v1/orders/show.md +83 -0
  104. data/examples/complex-test-app/docs/api/api/v1/products/index.md +11 -0
  105. data/examples/complex-test-app/docs/api/api/v1/products/list.md +83 -0
  106. data/examples/complex-test-app/docs/api/api/v1/products/search.md +88 -0
  107. data/examples/complex-test-app/docs/api/api/v1/products/show.md +71 -0
  108. data/examples/complex-test-app/docs/api/api/v1/profiles/index.md +10 -0
  109. data/examples/complex-test-app/docs/api/api/v1/profiles/show.md +61 -0
  110. data/examples/complex-test-app/docs/api/api/v1/profiles/update.md +91 -0
  111. data/examples/complex-test-app/docs/api/api/v2/products/index.md +9 -0
  112. data/examples/complex-test-app/docs/api/api/v2/products/list.md +77 -0
  113. data/examples/complex-test-app/docs/api/curl/api/v1/admin/products/create.sh +18 -0
  114. data/examples/complex-test-app/docs/api/curl/api/v1/admin/products/destroy.sh +9 -0
  115. data/examples/complex-test-app/docs/api/curl/api/v1/admin/products/list.sh +9 -0
  116. data/examples/complex-test-app/docs/api/curl/api/v1/auth/login.sh +9 -0
  117. data/examples/complex-test-app/docs/api/curl/api/v1/cart-items/create.sh +16 -0
  118. data/examples/complex-test-app/docs/api/curl/api/v1/cart-items/destroy.sh +9 -0
  119. data/examples/complex-test-app/docs/api/curl/api/v1/carts/checkout.sh +13 -0
  120. data/examples/complex-test-app/docs/api/curl/api/v1/carts/show.sh +9 -0
  121. data/examples/complex-test-app/docs/api/curl/api/v1/home/list.sh +8 -0
  122. data/examples/complex-test-app/docs/api/curl/api/v1/notes/create.sh +15 -0
  123. data/examples/complex-test-app/docs/api/curl/api/v1/notes/list.sh +9 -0
  124. data/examples/complex-test-app/docs/api/curl/api/v1/orders/cancel.sh +9 -0
  125. data/examples/complex-test-app/docs/api/curl/api/v1/orders/create.sh +29 -0
  126. data/examples/complex-test-app/docs/api/curl/api/v1/orders/destroy.sh +9 -0
  127. data/examples/complex-test-app/docs/api/curl/api/v1/orders/list.sh +9 -0
  128. data/examples/complex-test-app/docs/api/curl/api/v1/orders/show.sh +9 -0
  129. data/examples/complex-test-app/docs/api/curl/api/v1/products/list.sh +8 -0
  130. data/examples/complex-test-app/docs/api/curl/api/v1/products/search.sh +8 -0
  131. data/examples/complex-test-app/docs/api/curl/api/v1/products/show.sh +8 -0
  132. data/examples/complex-test-app/docs/api/curl/api/v1/profiles/show.sh +9 -0
  133. data/examples/complex-test-app/docs/api/curl/api/v1/profiles/update.sh +16 -0
  134. data/examples/complex-test-app/docs/api/curl/api/v2/products/list.sh +8 -0
  135. data/examples/complex-test-app/docs/api/dataset.json +5109 -0
  136. data/examples/complex-test-app/docs/api/postman/collection.json +2568 -0
  137. data/examples/complex-test-app/generate.rb +14 -0
  138. data/examples/complex-test-app/reqcord.yml +28 -0
  139. data/examples/complex-test-app/test/integration/admin_test.rb +70 -0
  140. data/examples/complex-test-app/test/integration/cart_test.rb +64 -0
  141. data/examples/complex-test-app/test/integration/home_and_auth_test.rb +53 -0
  142. data/examples/complex-test-app/test/integration/orders_test.rb +127 -0
  143. data/examples/complex-test-app/test/integration/products_test.rb +66 -0
  144. data/examples/reqcord.yml +58 -0
  145. data/examples/spec-app/.rspec +1 -0
  146. data/examples/spec-app/README.md +36 -0
  147. data/examples/spec-app/app.rb +209 -0
  148. data/examples/spec-app/docs/api/README.md +45 -0
  149. data/examples/spec-app/docs/api/api/v1/customers/create.md +95 -0
  150. data/examples/spec-app/docs/api/api/v1/customers/index.md +11 -0
  151. data/examples/spec-app/docs/api/api/v1/customers/list.md +67 -0
  152. data/examples/spec-app/docs/api/api/v1/customers/show.md +65 -0
  153. data/examples/spec-app/docs/api/api/v1/tasks/complete.md +51 -0
  154. data/examples/spec-app/docs/api/api/v1/tasks/create.md +90 -0
  155. data/examples/spec-app/docs/api/api/v1/tasks/destroy.md +35 -0
  156. data/examples/spec-app/docs/api/api/v1/tasks/index.md +14 -0
  157. data/examples/spec-app/docs/api/api/v1/tasks/list.md +65 -0
  158. data/examples/spec-app/docs/api/api/v1/tasks/show.md +65 -0
  159. data/examples/spec-app/docs/api/api/v1/tasks/update.md +74 -0
  160. data/examples/spec-app/docs/api/api/v1/users/create.md +95 -0
  161. data/examples/spec-app/docs/api/api/v1/users/index.md +11 -0
  162. data/examples/spec-app/docs/api/api/v1/users/list.md +67 -0
  163. data/examples/spec-app/docs/api/api/v1/users/show.md +65 -0
  164. data/examples/spec-app/docs/api/curl/api/v1/customers/create.sh +17 -0
  165. data/examples/spec-app/docs/api/curl/api/v1/customers/list.sh +9 -0
  166. data/examples/spec-app/docs/api/curl/api/v1/customers/show.sh +9 -0
  167. data/examples/spec-app/docs/api/curl/api/v1/tasks/complete.sh +8 -0
  168. data/examples/spec-app/docs/api/curl/api/v1/tasks/create.sh +15 -0
  169. data/examples/spec-app/docs/api/curl/api/v1/tasks/destroy.sh +8 -0
  170. data/examples/spec-app/docs/api/curl/api/v1/tasks/list.sh +8 -0
  171. data/examples/spec-app/docs/api/curl/api/v1/tasks/show.sh +8 -0
  172. data/examples/spec-app/docs/api/curl/api/v1/tasks/update.sh +14 -0
  173. data/examples/spec-app/docs/api/curl/api/v1/users/create.sh +17 -0
  174. data/examples/spec-app/docs/api/curl/api/v1/users/list.sh +9 -0
  175. data/examples/spec-app/docs/api/curl/api/v1/users/show.sh +9 -0
  176. data/examples/spec-app/docs/api/dataset.json +2402 -0
  177. data/examples/spec-app/docs/api/postman/collection.json +1290 -0
  178. data/examples/spec-app/generate.rb +14 -0
  179. data/examples/spec-app/reqcord.yml +27 -0
  180. data/examples/spec-app/spec/requests/customers_spec.rb +71 -0
  181. data/examples/spec-app/spec/requests/tasks_spec.rb +78 -0
  182. data/examples/spec-app/spec/requests/users_spec.rb +68 -0
  183. data/examples/spec-app/spec/spec_helper.rb +17 -0
  184. data/examples/test-app/README.md +57 -0
  185. data/examples/test-app/app.rb +212 -0
  186. data/examples/test-app/docs/api/README.md +45 -0
  187. data/examples/test-app/docs/api/api/v1/customers/create.md +95 -0
  188. data/examples/test-app/docs/api/api/v1/customers/index.md +11 -0
  189. data/examples/test-app/docs/api/api/v1/customers/list.md +67 -0
  190. data/examples/test-app/docs/api/api/v1/customers/show.md +65 -0
  191. data/examples/test-app/docs/api/api/v1/tasks/complete.md +51 -0
  192. data/examples/test-app/docs/api/api/v1/tasks/create.md +90 -0
  193. data/examples/test-app/docs/api/api/v1/tasks/destroy.md +35 -0
  194. data/examples/test-app/docs/api/api/v1/tasks/index.md +14 -0
  195. data/examples/test-app/docs/api/api/v1/tasks/list.md +65 -0
  196. data/examples/test-app/docs/api/api/v1/tasks/show.md +65 -0
  197. data/examples/test-app/docs/api/api/v1/tasks/update.md +74 -0
  198. data/examples/test-app/docs/api/api/v1/users/create.md +95 -0
  199. data/examples/test-app/docs/api/api/v1/users/index.md +11 -0
  200. data/examples/test-app/docs/api/api/v1/users/list.md +67 -0
  201. data/examples/test-app/docs/api/api/v1/users/show.md +65 -0
  202. data/examples/test-app/docs/api/curl/api/v1/customers/create.sh +17 -0
  203. data/examples/test-app/docs/api/curl/api/v1/customers/list.sh +9 -0
  204. data/examples/test-app/docs/api/curl/api/v1/customers/show.sh +9 -0
  205. data/examples/test-app/docs/api/curl/api/v1/tasks/complete.sh +8 -0
  206. data/examples/test-app/docs/api/curl/api/v1/tasks/create.sh +15 -0
  207. data/examples/test-app/docs/api/curl/api/v1/tasks/destroy.sh +8 -0
  208. data/examples/test-app/docs/api/curl/api/v1/tasks/list.sh +8 -0
  209. data/examples/test-app/docs/api/curl/api/v1/tasks/show.sh +8 -0
  210. data/examples/test-app/docs/api/curl/api/v1/tasks/update.sh +14 -0
  211. data/examples/test-app/docs/api/curl/api/v1/users/create.sh +17 -0
  212. data/examples/test-app/docs/api/curl/api/v1/users/list.sh +9 -0
  213. data/examples/test-app/docs/api/curl/api/v1/users/show.sh +9 -0
  214. data/examples/test-app/docs/api/dataset.json +2402 -0
  215. data/examples/test-app/docs/api/postman/collection.json +1290 -0
  216. data/examples/test-app/generate.rb +14 -0
  217. data/examples/test-app/reqcord.yml +28 -0
  218. data/examples/test-app/test/integration/customers_test.rb +72 -0
  219. data/examples/test-app/test/integration/tasks_test.rb +80 -0
  220. data/examples/test-app/test/integration/users_test.rb +72 -0
  221. data/lib/reqcord/capture/collector.rb +31 -0
  222. data/lib/reqcord/capture/integration_patch.rb +209 -0
  223. data/lib/reqcord/capture/minitest_context.rb +34 -0
  224. data/lib/reqcord/capture/rspec_context.rb +42 -0
  225. data/lib/reqcord/capture/test_context.rb +25 -0
  226. data/lib/reqcord/capture.rb +19 -0
  227. data/lib/reqcord/configuration.rb +198 -0
  228. data/lib/reqcord/dataset.rb +176 -0
  229. data/lib/reqcord/endpoint.rb +263 -0
  230. data/lib/reqcord/errors.rb +9 -0
  231. data/lib/reqcord/exporters/curl.rb +68 -0
  232. data/lib/reqcord/exporters/markdown.rb +295 -0
  233. data/lib/reqcord/exporters/postman.rb +206 -0
  234. data/lib/reqcord/exporters.rb +32 -0
  235. data/lib/reqcord/generator.rb +364 -0
  236. data/lib/reqcord/railtie.rb +51 -0
  237. data/lib/reqcord/renderers/curl.rb +56 -0
  238. data/lib/reqcord/renderers/payload.rb +69 -0
  239. data/lib/reqcord/request_example.rb +104 -0
  240. data/lib/reqcord/response_example.rb +72 -0
  241. data/lib/reqcord/route_collector.rb +242 -0
  242. data/lib/reqcord/sanitizers/sanitizer.rb +140 -0
  243. data/lib/reqcord/schema.rb +187 -0
  244. data/lib/reqcord/support.rb +58 -0
  245. data/lib/reqcord/version.rb +5 -0
  246. data/lib/reqcord.rb +78 -0
  247. data/lib/tasks/reqcord.rake +99 -0
  248. data/reqcord.gemspec +46 -0
  249. metadata +317 -3
@@ -0,0 +1,2519 @@
1
+ {
2
+ "info": {
3
+ "name": "complex-spec-app API",
4
+ "description": "Generated by Reqcord from the application's integration tests.",
5
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
6
+ },
7
+ "item": [
8
+ {
9
+ "name": "Api",
10
+ "item": [
11
+ {
12
+ "name": "V1",
13
+ "item": [
14
+ {
15
+ "name": "Admin",
16
+ "item": [
17
+ {
18
+ "name": "Products",
19
+ "item": [
20
+ {
21
+ "name": "List Products",
22
+ "request": {
23
+ "method": "GET",
24
+ "description": "GET /api/v1/admin/products\napi/v1/admin/products#index\nRoute: api_v1_admin_products",
25
+ "header": [
26
+ {
27
+ "key": "X-Api-Key",
28
+ "value": "{{api_key}}"
29
+ },
30
+ {
31
+ "key": "Accept",
32
+ "value": "application/json"
33
+ }
34
+ ],
35
+ "url": {
36
+ "raw": "{{base_url}}/api/v1/admin/products",
37
+ "host": [
38
+ "{{base_url}}"
39
+ ],
40
+ "path": [
41
+ "api",
42
+ "v1",
43
+ "admin",
44
+ "products"
45
+ ]
46
+ },
47
+ "auth": {
48
+ "type": "noauth"
49
+ }
50
+ },
51
+ "response": [
52
+ {
53
+ "name": "200 OK",
54
+ "originalRequest": {
55
+ "method": "GET",
56
+ "description": "GET /api/v1/admin/products\napi/v1/admin/products#index\nRoute: api_v1_admin_products",
57
+ "header": [
58
+ {
59
+ "key": "X-Api-Key",
60
+ "value": "{{api_key}}"
61
+ },
62
+ {
63
+ "key": "Accept",
64
+ "value": "application/json"
65
+ }
66
+ ],
67
+ "url": {
68
+ "raw": "{{base_url}}/api/v1/admin/products",
69
+ "host": [
70
+ "{{base_url}}"
71
+ ],
72
+ "path": [
73
+ "api",
74
+ "v1",
75
+ "admin",
76
+ "products"
77
+ ]
78
+ },
79
+ "auth": {
80
+ "type": "noauth"
81
+ }
82
+ },
83
+ "status": "OK",
84
+ "code": 200,
85
+ "_postman_previewlanguage": "json",
86
+ "header": [
87
+ {
88
+ "key": "content-type",
89
+ "value": "application/json; charset=utf-8"
90
+ }
91
+ ],
92
+ "body": "[\n {\n \"id\": 1,\n \"sku\": \"TEA-001\",\n \"name\": \"Earl Grey\",\n \"category\": \"tea\",\n \"price_cents\": 1200,\n \"cost_cents\": 500,\n \"tags\": [\n \"black\",\n \"bergamot\"\n ]\n },\n {\n \"id\": 2,\n \"sku\": \"TEA-002\",\n \"name\": \"Sencha\",\n \"category\": \"tea\",\n \"price_cents\": 1500,\n \"cost_cents\": 700,\n \"tags\": [\n \"green\"\n ]\n },\n {\n \"id\": 3,\n \"sku\": \"MUG-001\",\n \"name\": \"Stoneware Mug\",\n \"category\": \"mugs\",\n \"price_cents\": 2400,\n \"cost_cents\": 900,\n \"tags\": [\n \"ceramic\"\n ]\n },\n {\n \"id\": 4,\n \"sku\": \"MUG-002\",\n \"name\": \"Travel Mug\",\n \"category\": \"mugs\",\n \"price_cents\": 3200,\n \"cost_cents\": 1400,\n \"tags\": [\n \"steel\",\n \"insulated\"\n ]\n }\n]"
93
+ },
94
+ {
95
+ "name": "401 Unauthorized",
96
+ "originalRequest": {
97
+ "method": "GET",
98
+ "description": "GET /api/v1/admin/products\napi/v1/admin/products#index\nRoute: api_v1_admin_products",
99
+ "header": [
100
+ {
101
+ "key": "Accept",
102
+ "value": "application/json"
103
+ }
104
+ ],
105
+ "url": {
106
+ "raw": "{{base_url}}/api/v1/admin/products",
107
+ "host": [
108
+ "{{base_url}}"
109
+ ],
110
+ "path": [
111
+ "api",
112
+ "v1",
113
+ "admin",
114
+ "products"
115
+ ]
116
+ },
117
+ "auth": {
118
+ "type": "noauth"
119
+ }
120
+ },
121
+ "status": "Unauthorized",
122
+ "code": 401,
123
+ "_postman_previewlanguage": "json",
124
+ "header": [
125
+ {
126
+ "key": "content-type",
127
+ "value": "application/json; charset=utf-8"
128
+ }
129
+ ],
130
+ "body": "{\n \"error\": \"API key required\"\n}"
131
+ }
132
+ ]
133
+ },
134
+ {
135
+ "name": "Create Product",
136
+ "request": {
137
+ "method": "POST",
138
+ "description": "POST /api/v1/admin/products\napi/v1/admin/products#create",
139
+ "header": [
140
+ {
141
+ "key": "X-Api-Key",
142
+ "value": "{{api_key}}"
143
+ },
144
+ {
145
+ "key": "Content-Type",
146
+ "value": "application/json"
147
+ },
148
+ {
149
+ "key": "Accept",
150
+ "value": "application/json"
151
+ }
152
+ ],
153
+ "url": {
154
+ "raw": "{{base_url}}/api/v1/admin/products",
155
+ "host": [
156
+ "{{base_url}}"
157
+ ],
158
+ "path": [
159
+ "api",
160
+ "v1",
161
+ "admin",
162
+ "products"
163
+ ]
164
+ },
165
+ "body": {
166
+ "mode": "raw",
167
+ "raw": "{\n \"product\": {\n \"sku\": \"TEA-003\",\n \"name\": \"Jasmine\",\n \"category\": \"tea\",\n \"price_cents\": 1400\n }\n}",
168
+ "options": {
169
+ "raw": {
170
+ "language": "json"
171
+ }
172
+ }
173
+ },
174
+ "auth": {
175
+ "type": "noauth"
176
+ }
177
+ },
178
+ "response": [
179
+ {
180
+ "name": "201 Created",
181
+ "originalRequest": {
182
+ "method": "POST",
183
+ "description": "POST /api/v1/admin/products\napi/v1/admin/products#create",
184
+ "header": [
185
+ {
186
+ "key": "X-Api-Key",
187
+ "value": "{{api_key}}"
188
+ },
189
+ {
190
+ "key": "Content-Type",
191
+ "value": "application/json"
192
+ },
193
+ {
194
+ "key": "Accept",
195
+ "value": "application/json"
196
+ }
197
+ ],
198
+ "url": {
199
+ "raw": "{{base_url}}/api/v1/admin/products",
200
+ "host": [
201
+ "{{base_url}}"
202
+ ],
203
+ "path": [
204
+ "api",
205
+ "v1",
206
+ "admin",
207
+ "products"
208
+ ]
209
+ },
210
+ "body": {
211
+ "mode": "raw",
212
+ "raw": "{\n \"product\": {\n \"sku\": \"TEA-003\",\n \"name\": \"Jasmine\",\n \"category\": \"tea\",\n \"price_cents\": 1400\n }\n}",
213
+ "options": {
214
+ "raw": {
215
+ "language": "json"
216
+ }
217
+ }
218
+ },
219
+ "auth": {
220
+ "type": "noauth"
221
+ }
222
+ },
223
+ "status": "Created",
224
+ "code": 201,
225
+ "_postman_previewlanguage": "json",
226
+ "header": [
227
+ {
228
+ "key": "content-type",
229
+ "value": "application/json; charset=utf-8"
230
+ }
231
+ ],
232
+ "body": "{\n \"id\": 5,\n \"cost_cents\": 0,\n \"tags\": [],\n \"sku\": \"TEA-003\",\n \"name\": \"Jasmine\",\n \"category\": \"tea\",\n \"price_cents\": 1400\n}"
233
+ },
234
+ {
235
+ "name": "409 Conflict",
236
+ "originalRequest": {
237
+ "method": "POST",
238
+ "description": "POST /api/v1/admin/products\napi/v1/admin/products#create",
239
+ "header": [
240
+ {
241
+ "key": "X-Api-Key",
242
+ "value": "{{api_key}}"
243
+ },
244
+ {
245
+ "key": "Content-Type",
246
+ "value": "application/json"
247
+ },
248
+ {
249
+ "key": "Accept",
250
+ "value": "application/json"
251
+ }
252
+ ],
253
+ "url": {
254
+ "raw": "{{base_url}}/api/v1/admin/products",
255
+ "host": [
256
+ "{{base_url}}"
257
+ ],
258
+ "path": [
259
+ "api",
260
+ "v1",
261
+ "admin",
262
+ "products"
263
+ ]
264
+ },
265
+ "body": {
266
+ "mode": "raw",
267
+ "raw": "{\n \"product\": {\n \"sku\": \"TEA-001\",\n \"name\": \"Earl Grey again\",\n \"category\": \"tea\",\n \"price_cents\": 1200\n }\n}",
268
+ "options": {
269
+ "raw": {
270
+ "language": "json"
271
+ }
272
+ }
273
+ },
274
+ "auth": {
275
+ "type": "noauth"
276
+ }
277
+ },
278
+ "status": "Conflict",
279
+ "code": 409,
280
+ "_postman_previewlanguage": "json",
281
+ "header": [
282
+ {
283
+ "key": "content-type",
284
+ "value": "application/json; charset=utf-8"
285
+ }
286
+ ],
287
+ "body": "{\n \"error\": \"sku TEA-001 already exists\"\n}"
288
+ },
289
+ {
290
+ "name": "422 Unprocessable Content",
291
+ "originalRequest": {
292
+ "method": "POST",
293
+ "description": "POST /api/v1/admin/products\napi/v1/admin/products#create",
294
+ "header": [
295
+ {
296
+ "key": "X-Api-Key",
297
+ "value": "{{api_key}}"
298
+ },
299
+ {
300
+ "key": "Content-Type",
301
+ "value": "application/json"
302
+ },
303
+ {
304
+ "key": "Accept",
305
+ "value": "application/json"
306
+ }
307
+ ],
308
+ "url": {
309
+ "raw": "{{base_url}}/api/v1/admin/products",
310
+ "host": [
311
+ "{{base_url}}"
312
+ ],
313
+ "path": [
314
+ "api",
315
+ "v1",
316
+ "admin",
317
+ "products"
318
+ ]
319
+ },
320
+ "body": {
321
+ "mode": "raw",
322
+ "raw": "{\n \"product\": {\n \"sku\": \"\",\n \"name\": \"Nameless\"\n }\n}",
323
+ "options": {
324
+ "raw": {
325
+ "language": "json"
326
+ }
327
+ }
328
+ },
329
+ "auth": {
330
+ "type": "noauth"
331
+ }
332
+ },
333
+ "status": "Unprocessable Content",
334
+ "code": 422,
335
+ "_postman_previewlanguage": "json",
336
+ "header": [
337
+ {
338
+ "key": "content-type",
339
+ "value": "application/json; charset=utf-8"
340
+ }
341
+ ],
342
+ "body": "{\n \"errors\": {\n \"sku\": [\n \"can't be blank\"\n ]\n }\n}"
343
+ }
344
+ ]
345
+ },
346
+ {
347
+ "name": "Delete Product",
348
+ "request": {
349
+ "method": "DELETE",
350
+ "description": "DELETE /api/v1/admin/products/:id\napi/v1/admin/products#destroy\nRoute: api_v1_admin_product",
351
+ "header": [
352
+ {
353
+ "key": "X-Api-Key",
354
+ "value": "{{api_key}}"
355
+ },
356
+ {
357
+ "key": "Accept",
358
+ "value": "application/json"
359
+ }
360
+ ],
361
+ "url": {
362
+ "raw": "{{base_url}}/api/v1/admin/products/4",
363
+ "host": [
364
+ "{{base_url}}"
365
+ ],
366
+ "path": [
367
+ "api",
368
+ "v1",
369
+ "admin",
370
+ "products",
371
+ "4"
372
+ ]
373
+ },
374
+ "auth": {
375
+ "type": "noauth"
376
+ }
377
+ },
378
+ "response": [
379
+ {
380
+ "name": "204 No Content",
381
+ "originalRequest": {
382
+ "method": "DELETE",
383
+ "description": "DELETE /api/v1/admin/products/:id\napi/v1/admin/products#destroy\nRoute: api_v1_admin_product",
384
+ "header": [
385
+ {
386
+ "key": "X-Api-Key",
387
+ "value": "{{api_key}}"
388
+ },
389
+ {
390
+ "key": "Accept",
391
+ "value": "application/json"
392
+ }
393
+ ],
394
+ "url": {
395
+ "raw": "{{base_url}}/api/v1/admin/products/4",
396
+ "host": [
397
+ "{{base_url}}"
398
+ ],
399
+ "path": [
400
+ "api",
401
+ "v1",
402
+ "admin",
403
+ "products",
404
+ "4"
405
+ ]
406
+ },
407
+ "auth": {
408
+ "type": "noauth"
409
+ }
410
+ },
411
+ "status": "No Content",
412
+ "code": 204,
413
+ "_postman_previewlanguage": "text",
414
+ "header": [],
415
+ "body": ""
416
+ },
417
+ {
418
+ "name": "404 Not Found",
419
+ "originalRequest": {
420
+ "method": "DELETE",
421
+ "description": "DELETE /api/v1/admin/products/:id\napi/v1/admin/products#destroy\nRoute: api_v1_admin_product",
422
+ "header": [
423
+ {
424
+ "key": "X-Api-Key",
425
+ "value": "{{api_key}}"
426
+ },
427
+ {
428
+ "key": "Accept",
429
+ "value": "application/json"
430
+ }
431
+ ],
432
+ "url": {
433
+ "raw": "{{base_url}}/api/v1/admin/products/999",
434
+ "host": [
435
+ "{{base_url}}"
436
+ ],
437
+ "path": [
438
+ "api",
439
+ "v1",
440
+ "admin",
441
+ "products",
442
+ "999"
443
+ ]
444
+ },
445
+ "auth": {
446
+ "type": "noauth"
447
+ }
448
+ },
449
+ "status": "Not Found",
450
+ "code": 404,
451
+ "_postman_previewlanguage": "json",
452
+ "header": [
453
+ {
454
+ "key": "content-type",
455
+ "value": "application/json; charset=utf-8"
456
+ }
457
+ ],
458
+ "body": "{\n \"error\": \"Not Found\"\n}"
459
+ }
460
+ ]
461
+ }
462
+ ]
463
+ }
464
+ ]
465
+ },
466
+ {
467
+ "name": "Auth",
468
+ "item": [
469
+ {
470
+ "name": "Login",
471
+ "request": {
472
+ "method": "POST",
473
+ "description": "POST /api/v1/auth/login\napi/v1/auth#login\nRoute: api_v1_auth_login",
474
+ "header": [
475
+ {
476
+ "key": "Content-Type",
477
+ "value": "application/x-www-form-urlencoded"
478
+ }
479
+ ],
480
+ "url": {
481
+ "raw": "{{base_url}}/api/v1/auth/login",
482
+ "host": [
483
+ "{{base_url}}"
484
+ ],
485
+ "path": [
486
+ "api",
487
+ "v1",
488
+ "auth",
489
+ "login"
490
+ ]
491
+ },
492
+ "body": {
493
+ "mode": "urlencoded",
494
+ "urlencoded": [
495
+ {
496
+ "key": "email",
497
+ "value": "ada@example.com",
498
+ "type": "text"
499
+ },
500
+ {
501
+ "key": "password",
502
+ "value": "{{password}}",
503
+ "type": "text"
504
+ }
505
+ ]
506
+ },
507
+ "auth": {
508
+ "type": "noauth"
509
+ }
510
+ },
511
+ "response": [
512
+ {
513
+ "name": "200 OK",
514
+ "originalRequest": {
515
+ "method": "POST",
516
+ "description": "POST /api/v1/auth/login\napi/v1/auth#login\nRoute: api_v1_auth_login",
517
+ "header": [
518
+ {
519
+ "key": "Content-Type",
520
+ "value": "application/x-www-form-urlencoded"
521
+ }
522
+ ],
523
+ "url": {
524
+ "raw": "{{base_url}}/api/v1/auth/login",
525
+ "host": [
526
+ "{{base_url}}"
527
+ ],
528
+ "path": [
529
+ "api",
530
+ "v1",
531
+ "auth",
532
+ "login"
533
+ ]
534
+ },
535
+ "body": {
536
+ "mode": "urlencoded",
537
+ "urlencoded": [
538
+ {
539
+ "key": "email",
540
+ "value": "ada@example.com",
541
+ "type": "text"
542
+ },
543
+ {
544
+ "key": "password",
545
+ "value": "{{password}}",
546
+ "type": "text"
547
+ }
548
+ ]
549
+ },
550
+ "auth": {
551
+ "type": "noauth"
552
+ }
553
+ },
554
+ "status": "OK",
555
+ "code": 200,
556
+ "_postman_previewlanguage": "json",
557
+ "header": [
558
+ {
559
+ "key": "content-type",
560
+ "value": "application/json; charset=utf-8"
561
+ }
562
+ ],
563
+ "body": "{\n \"token\": \"{{token}}\",\n \"token_type\": \"Bearer\",\n \"expires_in\": 3600\n}"
564
+ },
565
+ {
566
+ "name": "401 Unauthorized",
567
+ "originalRequest": {
568
+ "method": "POST",
569
+ "description": "POST /api/v1/auth/login\napi/v1/auth#login\nRoute: api_v1_auth_login",
570
+ "header": [
571
+ {
572
+ "key": "Content-Type",
573
+ "value": "application/x-www-form-urlencoded"
574
+ }
575
+ ],
576
+ "url": {
577
+ "raw": "{{base_url}}/api/v1/auth/login",
578
+ "host": [
579
+ "{{base_url}}"
580
+ ],
581
+ "path": [
582
+ "api",
583
+ "v1",
584
+ "auth",
585
+ "login"
586
+ ]
587
+ },
588
+ "body": {
589
+ "mode": "urlencoded",
590
+ "urlencoded": [
591
+ {
592
+ "key": "email",
593
+ "value": "ada@example.com",
594
+ "type": "text"
595
+ },
596
+ {
597
+ "key": "password",
598
+ "value": "{{password}}",
599
+ "type": "text"
600
+ }
601
+ ]
602
+ },
603
+ "auth": {
604
+ "type": "noauth"
605
+ }
606
+ },
607
+ "status": "Unauthorized",
608
+ "code": 401,
609
+ "_postman_previewlanguage": "json",
610
+ "header": [
611
+ {
612
+ "key": "content-type",
613
+ "value": "application/json; charset=utf-8"
614
+ }
615
+ ],
616
+ "body": "{\n \"error\": \"Invalid email or password\"\n}"
617
+ }
618
+ ]
619
+ }
620
+ ]
621
+ },
622
+ {
623
+ "name": "Cart Items",
624
+ "item": [
625
+ {
626
+ "name": "Create Cart Item",
627
+ "request": {
628
+ "method": "POST",
629
+ "description": "POST /api/v1/cart/items\napi/v1/cart_items#create\nRoute: api_v1_cart_items",
630
+ "header": [
631
+ {
632
+ "key": "Content-Type",
633
+ "value": "application/json"
634
+ },
635
+ {
636
+ "key": "Accept",
637
+ "value": "application/json"
638
+ }
639
+ ],
640
+ "url": {
641
+ "raw": "{{base_url}}/api/v1/cart/items",
642
+ "host": [
643
+ "{{base_url}}"
644
+ ],
645
+ "path": [
646
+ "api",
647
+ "v1",
648
+ "cart",
649
+ "items"
650
+ ]
651
+ },
652
+ "body": {
653
+ "mode": "raw",
654
+ "raw": "{\n \"item\": {\n \"sku\": \"TEA-002\",\n \"quantity\": 3\n }\n}",
655
+ "options": {
656
+ "raw": {
657
+ "language": "json"
658
+ }
659
+ }
660
+ }
661
+ },
662
+ "response": [
663
+ {
664
+ "name": "201 Created",
665
+ "originalRequest": {
666
+ "method": "POST",
667
+ "description": "POST /api/v1/cart/items\napi/v1/cart_items#create\nRoute: api_v1_cart_items",
668
+ "header": [
669
+ {
670
+ "key": "Content-Type",
671
+ "value": "application/json"
672
+ },
673
+ {
674
+ "key": "Accept",
675
+ "value": "application/json"
676
+ }
677
+ ],
678
+ "url": {
679
+ "raw": "{{base_url}}/api/v1/cart/items",
680
+ "host": [
681
+ "{{base_url}}"
682
+ ],
683
+ "path": [
684
+ "api",
685
+ "v1",
686
+ "cart",
687
+ "items"
688
+ ]
689
+ },
690
+ "body": {
691
+ "mode": "raw",
692
+ "raw": "{\n \"item\": {\n \"sku\": \"TEA-002\",\n \"quantity\": 3\n }\n}",
693
+ "options": {
694
+ "raw": {
695
+ "language": "json"
696
+ }
697
+ }
698
+ }
699
+ },
700
+ "status": "Created",
701
+ "code": 201,
702
+ "_postman_previewlanguage": "json",
703
+ "header": [
704
+ {
705
+ "key": "content-type",
706
+ "value": "application/json; charset=utf-8"
707
+ }
708
+ ],
709
+ "body": "{\n \"sku\": \"TEA-002\",\n \"name\": \"Sencha\",\n \"quantity\": 3,\n \"unit_price_cents\": 1500\n}"
710
+ },
711
+ {
712
+ "name": "422 Unprocessable Content",
713
+ "originalRequest": {
714
+ "method": "POST",
715
+ "description": "POST /api/v1/cart/items\napi/v1/cart_items#create\nRoute: api_v1_cart_items",
716
+ "header": [
717
+ {
718
+ "key": "Content-Type",
719
+ "value": "application/json"
720
+ },
721
+ {
722
+ "key": "Accept",
723
+ "value": "application/json"
724
+ }
725
+ ],
726
+ "url": {
727
+ "raw": "{{base_url}}/api/v1/cart/items",
728
+ "host": [
729
+ "{{base_url}}"
730
+ ],
731
+ "path": [
732
+ "api",
733
+ "v1",
734
+ "cart",
735
+ "items"
736
+ ]
737
+ },
738
+ "body": {
739
+ "mode": "raw",
740
+ "raw": "{\n \"item\": {\n \"sku\": \"TEA-999\",\n \"quantity\": 1\n }\n}",
741
+ "options": {
742
+ "raw": {
743
+ "language": "json"
744
+ }
745
+ }
746
+ }
747
+ },
748
+ "status": "Unprocessable Content",
749
+ "code": 422,
750
+ "_postman_previewlanguage": "json",
751
+ "header": [
752
+ {
753
+ "key": "content-type",
754
+ "value": "application/json; charset=utf-8"
755
+ }
756
+ ],
757
+ "body": "{\n \"errors\": {\n \"sku\": [\n \"TEA-999 is not a known product\"\n ]\n }\n}"
758
+ }
759
+ ]
760
+ },
761
+ {
762
+ "name": "Delete Cart Item",
763
+ "request": {
764
+ "method": "DELETE",
765
+ "description": "DELETE /api/v1/cart/items/:sku\napi/v1/cart_items#destroy\nRoute: api_v1_cart_item",
766
+ "header": [
767
+ {
768
+ "key": "Accept",
769
+ "value": "application/json"
770
+ }
771
+ ],
772
+ "url": {
773
+ "raw": "{{base_url}}/api/v1/cart/items/TEA-001",
774
+ "host": [
775
+ "{{base_url}}"
776
+ ],
777
+ "path": [
778
+ "api",
779
+ "v1",
780
+ "cart",
781
+ "items",
782
+ "TEA-001"
783
+ ]
784
+ }
785
+ },
786
+ "response": [
787
+ {
788
+ "name": "204 No Content",
789
+ "originalRequest": {
790
+ "method": "DELETE",
791
+ "description": "DELETE /api/v1/cart/items/:sku\napi/v1/cart_items#destroy\nRoute: api_v1_cart_item",
792
+ "header": [
793
+ {
794
+ "key": "Accept",
795
+ "value": "application/json"
796
+ }
797
+ ],
798
+ "url": {
799
+ "raw": "{{base_url}}/api/v1/cart/items/TEA-001",
800
+ "host": [
801
+ "{{base_url}}"
802
+ ],
803
+ "path": [
804
+ "api",
805
+ "v1",
806
+ "cart",
807
+ "items",
808
+ "TEA-001"
809
+ ]
810
+ }
811
+ },
812
+ "status": "No Content",
813
+ "code": 204,
814
+ "_postman_previewlanguage": "text",
815
+ "header": [],
816
+ "body": ""
817
+ },
818
+ {
819
+ "name": "404 Not Found",
820
+ "originalRequest": {
821
+ "method": "DELETE",
822
+ "description": "DELETE /api/v1/cart/items/:sku\napi/v1/cart_items#destroy\nRoute: api_v1_cart_item",
823
+ "header": [
824
+ {
825
+ "key": "Accept",
826
+ "value": "application/json"
827
+ }
828
+ ],
829
+ "url": {
830
+ "raw": "{{base_url}}/api/v1/cart/items/MUG-002",
831
+ "host": [
832
+ "{{base_url}}"
833
+ ],
834
+ "path": [
835
+ "api",
836
+ "v1",
837
+ "cart",
838
+ "items",
839
+ "MUG-002"
840
+ ]
841
+ }
842
+ },
843
+ "status": "Not Found",
844
+ "code": 404,
845
+ "_postman_previewlanguage": "json",
846
+ "header": [
847
+ {
848
+ "key": "content-type",
849
+ "value": "application/json; charset=utf-8"
850
+ }
851
+ ],
852
+ "body": "{\n \"error\": \"Not Found\"\n}"
853
+ }
854
+ ]
855
+ }
856
+ ]
857
+ },
858
+ {
859
+ "name": "Carts",
860
+ "item": [
861
+ {
862
+ "name": "Get Cart",
863
+ "request": {
864
+ "method": "GET",
865
+ "description": "GET /api/v1/cart\napi/v1/carts#show\nRoute: api_v1_cart",
866
+ "header": [
867
+ {
868
+ "key": "Accept",
869
+ "value": "application/json"
870
+ }
871
+ ],
872
+ "url": {
873
+ "raw": "{{base_url}}/api/v1/cart",
874
+ "host": [
875
+ "{{base_url}}"
876
+ ],
877
+ "path": [
878
+ "api",
879
+ "v1",
880
+ "cart"
881
+ ]
882
+ }
883
+ },
884
+ "response": [
885
+ {
886
+ "name": "200 OK",
887
+ "originalRequest": {
888
+ "method": "GET",
889
+ "description": "GET /api/v1/cart\napi/v1/carts#show\nRoute: api_v1_cart",
890
+ "header": [
891
+ {
892
+ "key": "Accept",
893
+ "value": "application/json"
894
+ }
895
+ ],
896
+ "url": {
897
+ "raw": "{{base_url}}/api/v1/cart",
898
+ "host": [
899
+ "{{base_url}}"
900
+ ],
901
+ "path": [
902
+ "api",
903
+ "v1",
904
+ "cart"
905
+ ]
906
+ }
907
+ },
908
+ "status": "OK",
909
+ "code": 200,
910
+ "_postman_previewlanguage": "json",
911
+ "header": [
912
+ {
913
+ "key": "content-type",
914
+ "value": "application/json; charset=utf-8"
915
+ }
916
+ ],
917
+ "body": "{\n \"items\": [\n {\n \"sku\": \"TEA-001\",\n \"name\": \"Earl Grey\",\n \"quantity\": 2,\n \"unit_price_cents\": 1200\n },\n {\n \"sku\": \"MUG-001\",\n \"name\": \"Stoneware Mug\",\n \"quantity\": 1,\n \"unit_price_cents\": 2400\n }\n ],\n \"total_cents\": 4800\n}"
918
+ },
919
+ {
920
+ "name": "401 Unauthorized",
921
+ "originalRequest": {
922
+ "method": "GET",
923
+ "description": "GET /api/v1/cart\napi/v1/carts#show\nRoute: api_v1_cart",
924
+ "header": [
925
+ {
926
+ "key": "Accept",
927
+ "value": "application/json"
928
+ }
929
+ ],
930
+ "url": {
931
+ "raw": "{{base_url}}/api/v1/cart",
932
+ "host": [
933
+ "{{base_url}}"
934
+ ],
935
+ "path": [
936
+ "api",
937
+ "v1",
938
+ "cart"
939
+ ]
940
+ },
941
+ "auth": {
942
+ "type": "noauth"
943
+ }
944
+ },
945
+ "status": "Unauthorized",
946
+ "code": 401,
947
+ "_postman_previewlanguage": "json",
948
+ "header": [
949
+ {
950
+ "key": "content-type",
951
+ "value": "application/json; charset=utf-8"
952
+ }
953
+ ],
954
+ "body": "{\n \"error\": \"Unauthorized\"\n}"
955
+ }
956
+ ]
957
+ },
958
+ {
959
+ "name": "Checkout Cart",
960
+ "request": {
961
+ "method": "POST",
962
+ "description": "POST /api/v1/cart/checkout\napi/v1/carts#checkout\nRoute: checkout_api_v1_cart",
963
+ "header": [
964
+ {
965
+ "key": "Content-Type",
966
+ "value": "application/json"
967
+ },
968
+ {
969
+ "key": "Accept",
970
+ "value": "application/json"
971
+ }
972
+ ],
973
+ "url": {
974
+ "raw": "{{base_url}}/api/v1/cart/checkout",
975
+ "host": [
976
+ "{{base_url}}"
977
+ ],
978
+ "path": [
979
+ "api",
980
+ "v1",
981
+ "cart",
982
+ "checkout"
983
+ ]
984
+ },
985
+ "body": {
986
+ "mode": "raw",
987
+ "raw": "{\n \"payment_method\": \"card\"\n}",
988
+ "options": {
989
+ "raw": {
990
+ "language": "json"
991
+ }
992
+ }
993
+ }
994
+ },
995
+ "response": [
996
+ {
997
+ "name": "201 Created",
998
+ "originalRequest": {
999
+ "method": "POST",
1000
+ "description": "POST /api/v1/cart/checkout\napi/v1/carts#checkout\nRoute: checkout_api_v1_cart",
1001
+ "header": [
1002
+ {
1003
+ "key": "Content-Type",
1004
+ "value": "application/json"
1005
+ },
1006
+ {
1007
+ "key": "Accept",
1008
+ "value": "application/json"
1009
+ }
1010
+ ],
1011
+ "url": {
1012
+ "raw": "{{base_url}}/api/v1/cart/checkout",
1013
+ "host": [
1014
+ "{{base_url}}"
1015
+ ],
1016
+ "path": [
1017
+ "api",
1018
+ "v1",
1019
+ "cart",
1020
+ "checkout"
1021
+ ]
1022
+ },
1023
+ "body": {
1024
+ "mode": "raw",
1025
+ "raw": "{\n \"payment_method\": \"card\"\n}",
1026
+ "options": {
1027
+ "raw": {
1028
+ "language": "json"
1029
+ }
1030
+ }
1031
+ }
1032
+ },
1033
+ "status": "Created",
1034
+ "code": 201,
1035
+ "_postman_previewlanguage": "json",
1036
+ "header": [
1037
+ {
1038
+ "key": "content-type",
1039
+ "value": "application/json; charset=utf-8"
1040
+ }
1041
+ ],
1042
+ "body": "{\n \"id\": 5,\n \"status\": \"pending\",\n \"payment_method\": \"card\",\n \"total_cents\": 4800,\n \"line_items\": [\n {\n \"sku\": \"TEA-001\",\n \"name\": \"Earl Grey\",\n \"quantity\": 2,\n \"unit_price_cents\": 1200\n },\n {\n \"sku\": \"MUG-001\",\n \"name\": \"Stoneware Mug\",\n \"quantity\": 1,\n \"unit_price_cents\": 2400\n }\n ]\n}"
1043
+ },
1044
+ {
1045
+ "name": "422 Unprocessable Content",
1046
+ "originalRequest": {
1047
+ "method": "POST",
1048
+ "description": "POST /api/v1/cart/checkout\napi/v1/carts#checkout\nRoute: checkout_api_v1_cart",
1049
+ "header": [
1050
+ {
1051
+ "key": "Content-Type",
1052
+ "value": "application/json"
1053
+ },
1054
+ {
1055
+ "key": "Accept",
1056
+ "value": "application/json"
1057
+ }
1058
+ ],
1059
+ "url": {
1060
+ "raw": "{{base_url}}/api/v1/cart/checkout",
1061
+ "host": [
1062
+ "{{base_url}}"
1063
+ ],
1064
+ "path": [
1065
+ "api",
1066
+ "v1",
1067
+ "cart",
1068
+ "checkout"
1069
+ ]
1070
+ },
1071
+ "body": {
1072
+ "mode": "raw",
1073
+ "raw": "{\n \"payment_method\": \"cash\"\n}",
1074
+ "options": {
1075
+ "raw": {
1076
+ "language": "json"
1077
+ }
1078
+ }
1079
+ }
1080
+ },
1081
+ "status": "Unprocessable Content",
1082
+ "code": 422,
1083
+ "_postman_previewlanguage": "json",
1084
+ "header": [
1085
+ {
1086
+ "key": "content-type",
1087
+ "value": "application/json; charset=utf-8"
1088
+ }
1089
+ ],
1090
+ "body": "{\n \"errors\": {\n \"payment_method\": [\n \"is not included in the list\"\n ]\n }\n}"
1091
+ }
1092
+ ]
1093
+ }
1094
+ ]
1095
+ },
1096
+ {
1097
+ "name": "Home",
1098
+ "item": [
1099
+ {
1100
+ "name": "Home",
1101
+ "request": {
1102
+ "method": "GET",
1103
+ "description": "GET /api/v1\napi/v1/home#index\nRoute: api_v1_root",
1104
+ "header": [
1105
+ {
1106
+ "key": "Accept",
1107
+ "value": "application/json"
1108
+ }
1109
+ ],
1110
+ "url": {
1111
+ "raw": "{{base_url}}/api/v1",
1112
+ "host": [
1113
+ "{{base_url}}"
1114
+ ],
1115
+ "path": [
1116
+ "api",
1117
+ "v1"
1118
+ ]
1119
+ },
1120
+ "auth": {
1121
+ "type": "noauth"
1122
+ }
1123
+ },
1124
+ "response": [
1125
+ {
1126
+ "name": "200 OK",
1127
+ "originalRequest": {
1128
+ "method": "GET",
1129
+ "description": "GET /api/v1\napi/v1/home#index\nRoute: api_v1_root",
1130
+ "header": [
1131
+ {
1132
+ "key": "Accept",
1133
+ "value": "application/json"
1134
+ }
1135
+ ],
1136
+ "url": {
1137
+ "raw": "{{base_url}}/api/v1",
1138
+ "host": [
1139
+ "{{base_url}}"
1140
+ ],
1141
+ "path": [
1142
+ "api",
1143
+ "v1"
1144
+ ]
1145
+ },
1146
+ "auth": {
1147
+ "type": "noauth"
1148
+ }
1149
+ },
1150
+ "status": "OK",
1151
+ "code": 200,
1152
+ "_postman_previewlanguage": "json",
1153
+ "header": [
1154
+ {
1155
+ "key": "content-type",
1156
+ "value": "application/json; charset=utf-8"
1157
+ }
1158
+ ],
1159
+ "body": "{\n \"name\": \"Store API\",\n \"version\": \"v1\",\n \"links\": {\n \"products\": \"/api/v1/products\",\n \"orders\": \"/api/v1/orders\"\n }\n}"
1160
+ }
1161
+ ]
1162
+ }
1163
+ ]
1164
+ },
1165
+ {
1166
+ "name": "Notes",
1167
+ "item": [
1168
+ {
1169
+ "name": "List Notes",
1170
+ "request": {
1171
+ "method": "GET",
1172
+ "description": "GET /api/v1/orders/:order_id/notes\napi/v1/notes#index\nRoute: api_v1_order_notes",
1173
+ "header": [
1174
+ {
1175
+ "key": "Accept",
1176
+ "value": "application/json"
1177
+ }
1178
+ ],
1179
+ "url": {
1180
+ "raw": "{{base_url}}/api/v1/orders/1/notes",
1181
+ "host": [
1182
+ "{{base_url}}"
1183
+ ],
1184
+ "path": [
1185
+ "api",
1186
+ "v1",
1187
+ "orders",
1188
+ "1",
1189
+ "notes"
1190
+ ]
1191
+ }
1192
+ },
1193
+ "response": [
1194
+ {
1195
+ "name": "200 OK",
1196
+ "originalRequest": {
1197
+ "method": "GET",
1198
+ "description": "GET /api/v1/orders/:order_id/notes\napi/v1/notes#index\nRoute: api_v1_order_notes",
1199
+ "header": [
1200
+ {
1201
+ "key": "Accept",
1202
+ "value": "application/json"
1203
+ }
1204
+ ],
1205
+ "url": {
1206
+ "raw": "{{base_url}}/api/v1/orders/1/notes",
1207
+ "host": [
1208
+ "{{base_url}}"
1209
+ ],
1210
+ "path": [
1211
+ "api",
1212
+ "v1",
1213
+ "orders",
1214
+ "1",
1215
+ "notes"
1216
+ ]
1217
+ }
1218
+ },
1219
+ "status": "OK",
1220
+ "code": 200,
1221
+ "_postman_previewlanguage": "json",
1222
+ "header": [
1223
+ {
1224
+ "key": "content-type",
1225
+ "value": "application/json; charset=utf-8"
1226
+ }
1227
+ ],
1228
+ "body": "[\n {\n \"id\": 1,\n \"order_id\": 1,\n \"body\": \"Leave at the door\",\n \"author\": \"ada\"\n },\n {\n \"id\": 2,\n \"order_id\": 1,\n \"body\": \"Gift wrap please\",\n \"author\": \"ada\"\n }\n]"
1229
+ }
1230
+ ]
1231
+ },
1232
+ {
1233
+ "name": "Create Note",
1234
+ "request": {
1235
+ "method": "POST",
1236
+ "description": "POST /api/v1/orders/:order_id/notes\napi/v1/notes#create",
1237
+ "header": [
1238
+ {
1239
+ "key": "Content-Type",
1240
+ "value": "application/json"
1241
+ },
1242
+ {
1243
+ "key": "Accept",
1244
+ "value": "application/json"
1245
+ }
1246
+ ],
1247
+ "url": {
1248
+ "raw": "{{base_url}}/api/v1/orders/1/notes",
1249
+ "host": [
1250
+ "{{base_url}}"
1251
+ ],
1252
+ "path": [
1253
+ "api",
1254
+ "v1",
1255
+ "orders",
1256
+ "1",
1257
+ "notes"
1258
+ ]
1259
+ },
1260
+ "body": {
1261
+ "mode": "raw",
1262
+ "raw": "{\n \"note\": {\n \"body\": \"Ring the bell twice\"\n }\n}",
1263
+ "options": {
1264
+ "raw": {
1265
+ "language": "json"
1266
+ }
1267
+ }
1268
+ }
1269
+ },
1270
+ "response": [
1271
+ {
1272
+ "name": "201 Created",
1273
+ "originalRequest": {
1274
+ "method": "POST",
1275
+ "description": "POST /api/v1/orders/:order_id/notes\napi/v1/notes#create",
1276
+ "header": [
1277
+ {
1278
+ "key": "Content-Type",
1279
+ "value": "application/json"
1280
+ },
1281
+ {
1282
+ "key": "Accept",
1283
+ "value": "application/json"
1284
+ }
1285
+ ],
1286
+ "url": {
1287
+ "raw": "{{base_url}}/api/v1/orders/1/notes",
1288
+ "host": [
1289
+ "{{base_url}}"
1290
+ ],
1291
+ "path": [
1292
+ "api",
1293
+ "v1",
1294
+ "orders",
1295
+ "1",
1296
+ "notes"
1297
+ ]
1298
+ },
1299
+ "body": {
1300
+ "mode": "raw",
1301
+ "raw": "{\n \"note\": {\n \"body\": \"Ring the bell twice\"\n }\n}",
1302
+ "options": {
1303
+ "raw": {
1304
+ "language": "json"
1305
+ }
1306
+ }
1307
+ }
1308
+ },
1309
+ "status": "Created",
1310
+ "code": 201,
1311
+ "_postman_previewlanguage": "json",
1312
+ "header": [
1313
+ {
1314
+ "key": "content-type",
1315
+ "value": "application/json; charset=utf-8"
1316
+ }
1317
+ ],
1318
+ "body": "{\n \"id\": 3,\n \"order_id\": 1,\n \"body\": \"Ring the bell twice\",\n \"author\": \"ada\"\n}"
1319
+ },
1320
+ {
1321
+ "name": "422 Unprocessable Content",
1322
+ "originalRequest": {
1323
+ "method": "POST",
1324
+ "description": "POST /api/v1/orders/:order_id/notes\napi/v1/notes#create",
1325
+ "header": [
1326
+ {
1327
+ "key": "Accept",
1328
+ "value": "application/json"
1329
+ }
1330
+ ],
1331
+ "url": {
1332
+ "raw": "{{base_url}}/api/v1/orders/1/notes",
1333
+ "host": [
1334
+ "{{base_url}}"
1335
+ ],
1336
+ "path": [
1337
+ "api",
1338
+ "v1",
1339
+ "orders",
1340
+ "1",
1341
+ "notes"
1342
+ ]
1343
+ }
1344
+ },
1345
+ "status": "Unprocessable Content",
1346
+ "code": 422,
1347
+ "_postman_previewlanguage": "json",
1348
+ "header": [
1349
+ {
1350
+ "key": "content-type",
1351
+ "value": "application/json; charset=utf-8"
1352
+ }
1353
+ ],
1354
+ "body": "{\n \"errors\": {\n \"body\": [\n \"can't be blank\"\n ]\n }\n}"
1355
+ }
1356
+ ]
1357
+ }
1358
+ ]
1359
+ },
1360
+ {
1361
+ "name": "Orders",
1362
+ "item": [
1363
+ {
1364
+ "name": "List Orders",
1365
+ "request": {
1366
+ "method": "GET",
1367
+ "description": "GET /api/v1/orders\napi/v1/orders#index\nRoute: api_v1_orders",
1368
+ "header": [
1369
+ {
1370
+ "key": "Accept",
1371
+ "value": "application/json"
1372
+ }
1373
+ ],
1374
+ "url": {
1375
+ "raw": "{{base_url}}/api/v1/orders",
1376
+ "host": [
1377
+ "{{base_url}}"
1378
+ ],
1379
+ "path": [
1380
+ "api",
1381
+ "v1",
1382
+ "orders"
1383
+ ]
1384
+ }
1385
+ },
1386
+ "response": [
1387
+ {
1388
+ "name": "200 OK",
1389
+ "originalRequest": {
1390
+ "method": "GET",
1391
+ "description": "GET /api/v1/orders\napi/v1/orders#index\nRoute: api_v1_orders",
1392
+ "header": [
1393
+ {
1394
+ "key": "Accept",
1395
+ "value": "application/json"
1396
+ }
1397
+ ],
1398
+ "url": {
1399
+ "raw": "{{base_url}}/api/v1/orders",
1400
+ "host": [
1401
+ "{{base_url}}"
1402
+ ],
1403
+ "path": [
1404
+ "api",
1405
+ "v1",
1406
+ "orders"
1407
+ ]
1408
+ }
1409
+ },
1410
+ "status": "OK",
1411
+ "code": 200,
1412
+ "_postman_previewlanguage": "json",
1413
+ "header": [
1414
+ {
1415
+ "key": "content-type",
1416
+ "value": "application/json; charset=utf-8"
1417
+ }
1418
+ ],
1419
+ "body": "[\n {\n \"id\": 1,\n \"user_id\": 1,\n \"status\": \"pending\",\n \"currency\": \"USD\",\n \"total_cents\": 2700\n },\n {\n \"id\": 2,\n \"user_id\": 1,\n \"status\": \"shipped\",\n \"currency\": \"USD\",\n \"total_cents\": 3200\n }\n]"
1420
+ },
1421
+ {
1422
+ "name": "401 Unauthorized",
1423
+ "originalRequest": {
1424
+ "method": "GET",
1425
+ "description": "GET /api/v1/orders\napi/v1/orders#index\nRoute: api_v1_orders",
1426
+ "header": [
1427
+ {
1428
+ "key": "Accept",
1429
+ "value": "application/json"
1430
+ }
1431
+ ],
1432
+ "url": {
1433
+ "raw": "{{base_url}}/api/v1/orders",
1434
+ "host": [
1435
+ "{{base_url}}"
1436
+ ],
1437
+ "path": [
1438
+ "api",
1439
+ "v1",
1440
+ "orders"
1441
+ ]
1442
+ },
1443
+ "auth": {
1444
+ "type": "noauth"
1445
+ }
1446
+ },
1447
+ "status": "Unauthorized",
1448
+ "code": 401,
1449
+ "_postman_previewlanguage": "json",
1450
+ "header": [
1451
+ {
1452
+ "key": "content-type",
1453
+ "value": "application/json; charset=utf-8"
1454
+ }
1455
+ ],
1456
+ "body": "{\n \"error\": \"Unauthorized\"\n}"
1457
+ }
1458
+ ]
1459
+ },
1460
+ {
1461
+ "name": "Create Order",
1462
+ "request": {
1463
+ "method": "POST",
1464
+ "description": "POST /api/v1/orders\napi/v1/orders#create",
1465
+ "header": [
1466
+ {
1467
+ "key": "Content-Type",
1468
+ "value": "application/json"
1469
+ },
1470
+ {
1471
+ "key": "Accept",
1472
+ "value": "application/json"
1473
+ }
1474
+ ],
1475
+ "url": {
1476
+ "raw": "{{base_url}}/api/v1/orders",
1477
+ "host": [
1478
+ "{{base_url}}"
1479
+ ],
1480
+ "path": [
1481
+ "api",
1482
+ "v1",
1483
+ "orders"
1484
+ ]
1485
+ },
1486
+ "body": {
1487
+ "mode": "raw",
1488
+ "raw": "{\n \"order\": {\n \"line_items\": [\n {\n \"sku\": \"TEA-001\",\n \"quantity\": 2\n },\n {\n \"sku\": \"MUG-001\",\n \"quantity\": 1\n }\n ],\n \"shipping_address\": {\n \"line1\": \"1 Analytical Engine Way\",\n \"city\": \"London\",\n \"country\": \"GB\"\n }\n }\n}",
1489
+ "options": {
1490
+ "raw": {
1491
+ "language": "json"
1492
+ }
1493
+ }
1494
+ }
1495
+ },
1496
+ "response": [
1497
+ {
1498
+ "name": "201 Created",
1499
+ "originalRequest": {
1500
+ "method": "POST",
1501
+ "description": "POST /api/v1/orders\napi/v1/orders#create",
1502
+ "header": [
1503
+ {
1504
+ "key": "Content-Type",
1505
+ "value": "application/json"
1506
+ },
1507
+ {
1508
+ "key": "Accept",
1509
+ "value": "application/json"
1510
+ }
1511
+ ],
1512
+ "url": {
1513
+ "raw": "{{base_url}}/api/v1/orders",
1514
+ "host": [
1515
+ "{{base_url}}"
1516
+ ],
1517
+ "path": [
1518
+ "api",
1519
+ "v1",
1520
+ "orders"
1521
+ ]
1522
+ },
1523
+ "body": {
1524
+ "mode": "raw",
1525
+ "raw": "{\n \"order\": {\n \"line_items\": [\n {\n \"sku\": \"TEA-001\",\n \"quantity\": 2\n },\n {\n \"sku\": \"MUG-001\",\n \"quantity\": 1\n }\n ],\n \"shipping_address\": {\n \"line1\": \"1 Analytical Engine Way\",\n \"city\": \"London\",\n \"country\": \"GB\"\n }\n }\n}",
1526
+ "options": {
1527
+ "raw": {
1528
+ "language": "json"
1529
+ }
1530
+ }
1531
+ }
1532
+ },
1533
+ "status": "Created",
1534
+ "code": 201,
1535
+ "_postman_previewlanguage": "json",
1536
+ "header": [
1537
+ {
1538
+ "key": "content-type",
1539
+ "value": "application/json; charset=utf-8"
1540
+ }
1541
+ ],
1542
+ "body": "{\n \"id\": 4,\n \"status\": \"pending\",\n \"currency\": \"USD\",\n \"total_cents\": 4800,\n \"line_items\": [\n {\n \"sku\": \"TEA-001\",\n \"name\": \"Earl Grey\",\n \"quantity\": 2,\n \"unit_price_cents\": 1200,\n \"subtotal_cents\": 2400\n },\n {\n \"sku\": \"MUG-001\",\n \"name\": \"Stoneware Mug\",\n \"quantity\": 1,\n \"unit_price_cents\": 2400,\n \"subtotal_cents\": 2400\n }\n ],\n \"shipping_address\": {\n \"line1\": \"1 Analytical Engine Way\",\n \"city\": \"London\",\n \"country\": \"GB\"\n }\n}"
1543
+ },
1544
+ {
1545
+ "name": "422 Unprocessable Content",
1546
+ "originalRequest": {
1547
+ "method": "POST",
1548
+ "description": "POST /api/v1/orders\napi/v1/orders#create",
1549
+ "header": [
1550
+ {
1551
+ "key": "Accept",
1552
+ "value": "application/json"
1553
+ }
1554
+ ],
1555
+ "url": {
1556
+ "raw": "{{base_url}}/api/v1/orders",
1557
+ "host": [
1558
+ "{{base_url}}"
1559
+ ],
1560
+ "path": [
1561
+ "api",
1562
+ "v1",
1563
+ "orders"
1564
+ ]
1565
+ }
1566
+ },
1567
+ "status": "Unprocessable Content",
1568
+ "code": 422,
1569
+ "_postman_previewlanguage": "json",
1570
+ "header": [
1571
+ {
1572
+ "key": "content-type",
1573
+ "value": "application/json; charset=utf-8"
1574
+ }
1575
+ ],
1576
+ "body": "{\n \"errors\": {\n \"line_items\": [\n \"can't be blank\"\n ]\n }\n}"
1577
+ }
1578
+ ]
1579
+ },
1580
+ {
1581
+ "name": "Delete Order",
1582
+ "request": {
1583
+ "method": "DELETE",
1584
+ "description": "DELETE /api/v1/orders/:id\napi/v1/orders#destroy",
1585
+ "header": [
1586
+ {
1587
+ "key": "Accept",
1588
+ "value": "application/json"
1589
+ }
1590
+ ],
1591
+ "url": {
1592
+ "raw": "{{base_url}}/api/v1/orders/1",
1593
+ "host": [
1594
+ "{{base_url}}"
1595
+ ],
1596
+ "path": [
1597
+ "api",
1598
+ "v1",
1599
+ "orders",
1600
+ "1"
1601
+ ]
1602
+ }
1603
+ },
1604
+ "response": [
1605
+ {
1606
+ "name": "204 No Content",
1607
+ "originalRequest": {
1608
+ "method": "DELETE",
1609
+ "description": "DELETE /api/v1/orders/:id\napi/v1/orders#destroy",
1610
+ "header": [
1611
+ {
1612
+ "key": "Accept",
1613
+ "value": "application/json"
1614
+ }
1615
+ ],
1616
+ "url": {
1617
+ "raw": "{{base_url}}/api/v1/orders/1",
1618
+ "host": [
1619
+ "{{base_url}}"
1620
+ ],
1621
+ "path": [
1622
+ "api",
1623
+ "v1",
1624
+ "orders",
1625
+ "1"
1626
+ ]
1627
+ }
1628
+ },
1629
+ "status": "No Content",
1630
+ "code": 204,
1631
+ "_postman_previewlanguage": "text",
1632
+ "header": [],
1633
+ "body": ""
1634
+ }
1635
+ ]
1636
+ },
1637
+ {
1638
+ "name": "Get Order",
1639
+ "request": {
1640
+ "method": "GET",
1641
+ "description": "GET /api/v1/orders/:id\napi/v1/orders#show\nRoute: api_v1_order",
1642
+ "header": [
1643
+ {
1644
+ "key": "Accept",
1645
+ "value": "application/json"
1646
+ }
1647
+ ],
1648
+ "url": {
1649
+ "raw": "{{base_url}}/api/v1/orders/1",
1650
+ "host": [
1651
+ "{{base_url}}"
1652
+ ],
1653
+ "path": [
1654
+ "api",
1655
+ "v1",
1656
+ "orders",
1657
+ "1"
1658
+ ]
1659
+ }
1660
+ },
1661
+ "response": [
1662
+ {
1663
+ "name": "200 OK",
1664
+ "originalRequest": {
1665
+ "method": "GET",
1666
+ "description": "GET /api/v1/orders/:id\napi/v1/orders#show\nRoute: api_v1_order",
1667
+ "header": [
1668
+ {
1669
+ "key": "Accept",
1670
+ "value": "application/json"
1671
+ }
1672
+ ],
1673
+ "url": {
1674
+ "raw": "{{base_url}}/api/v1/orders/1",
1675
+ "host": [
1676
+ "{{base_url}}"
1677
+ ],
1678
+ "path": [
1679
+ "api",
1680
+ "v1",
1681
+ "orders",
1682
+ "1"
1683
+ ]
1684
+ }
1685
+ },
1686
+ "status": "OK",
1687
+ "code": 200,
1688
+ "_postman_previewlanguage": "json",
1689
+ "header": [
1690
+ {
1691
+ "key": "content-type",
1692
+ "value": "application/json; charset=utf-8"
1693
+ }
1694
+ ],
1695
+ "body": "{\n \"id\": 1,\n \"user_id\": 1,\n \"status\": \"pending\",\n \"currency\": \"USD\",\n \"total_cents\": 2700\n}"
1696
+ },
1697
+ {
1698
+ "name": "403 Forbidden",
1699
+ "originalRequest": {
1700
+ "method": "GET",
1701
+ "description": "GET /api/v1/orders/:id\napi/v1/orders#show\nRoute: api_v1_order",
1702
+ "header": [
1703
+ {
1704
+ "key": "Accept",
1705
+ "value": "application/json"
1706
+ }
1707
+ ],
1708
+ "url": {
1709
+ "raw": "{{base_url}}/api/v1/orders/3",
1710
+ "host": [
1711
+ "{{base_url}}"
1712
+ ],
1713
+ "path": [
1714
+ "api",
1715
+ "v1",
1716
+ "orders",
1717
+ "3"
1718
+ ]
1719
+ }
1720
+ },
1721
+ "status": "Forbidden",
1722
+ "code": 403,
1723
+ "_postman_previewlanguage": "json",
1724
+ "header": [
1725
+ {
1726
+ "key": "content-type",
1727
+ "value": "application/json; charset=utf-8"
1728
+ }
1729
+ ],
1730
+ "body": "{\n \"error\": \"Forbidden\"\n}"
1731
+ },
1732
+ {
1733
+ "name": "404 Not Found",
1734
+ "originalRequest": {
1735
+ "method": "GET",
1736
+ "description": "GET /api/v1/orders/:id\napi/v1/orders#show\nRoute: api_v1_order",
1737
+ "header": [
1738
+ {
1739
+ "key": "Accept",
1740
+ "value": "application/json"
1741
+ }
1742
+ ],
1743
+ "url": {
1744
+ "raw": "{{base_url}}/api/v1/orders/999",
1745
+ "host": [
1746
+ "{{base_url}}"
1747
+ ],
1748
+ "path": [
1749
+ "api",
1750
+ "v1",
1751
+ "orders",
1752
+ "999"
1753
+ ]
1754
+ }
1755
+ },
1756
+ "status": "Not Found",
1757
+ "code": 404,
1758
+ "_postman_previewlanguage": "json",
1759
+ "header": [
1760
+ {
1761
+ "key": "content-type",
1762
+ "value": "application/json; charset=utf-8"
1763
+ }
1764
+ ],
1765
+ "body": "{\n \"error\": \"Not Found\"\n}"
1766
+ }
1767
+ ]
1768
+ },
1769
+ {
1770
+ "name": "Cancel Order",
1771
+ "request": {
1772
+ "method": "POST",
1773
+ "description": "POST /api/v1/orders/:id/cancel\napi/v1/orders#cancel\nRoute: cancel_api_v1_order",
1774
+ "header": [
1775
+ {
1776
+ "key": "Accept",
1777
+ "value": "application/json"
1778
+ }
1779
+ ],
1780
+ "url": {
1781
+ "raw": "{{base_url}}/api/v1/orders/1/cancel",
1782
+ "host": [
1783
+ "{{base_url}}"
1784
+ ],
1785
+ "path": [
1786
+ "api",
1787
+ "v1",
1788
+ "orders",
1789
+ "1",
1790
+ "cancel"
1791
+ ]
1792
+ }
1793
+ },
1794
+ "response": [
1795
+ {
1796
+ "name": "200 OK",
1797
+ "originalRequest": {
1798
+ "method": "POST",
1799
+ "description": "POST /api/v1/orders/:id/cancel\napi/v1/orders#cancel\nRoute: cancel_api_v1_order",
1800
+ "header": [
1801
+ {
1802
+ "key": "Accept",
1803
+ "value": "application/json"
1804
+ }
1805
+ ],
1806
+ "url": {
1807
+ "raw": "{{base_url}}/api/v1/orders/1/cancel",
1808
+ "host": [
1809
+ "{{base_url}}"
1810
+ ],
1811
+ "path": [
1812
+ "api",
1813
+ "v1",
1814
+ "orders",
1815
+ "1",
1816
+ "cancel"
1817
+ ]
1818
+ }
1819
+ },
1820
+ "status": "OK",
1821
+ "code": 200,
1822
+ "_postman_previewlanguage": "json",
1823
+ "header": [
1824
+ {
1825
+ "key": "content-type",
1826
+ "value": "application/json; charset=utf-8"
1827
+ }
1828
+ ],
1829
+ "body": "{\n \"id\": 1,\n \"user_id\": 1,\n \"status\": \"cancelled\",\n \"currency\": \"USD\",\n \"total_cents\": 2700\n}"
1830
+ },
1831
+ {
1832
+ "name": "409 Conflict",
1833
+ "originalRequest": {
1834
+ "method": "POST",
1835
+ "description": "POST /api/v1/orders/:id/cancel\napi/v1/orders#cancel\nRoute: cancel_api_v1_order",
1836
+ "header": [
1837
+ {
1838
+ "key": "Accept",
1839
+ "value": "application/json"
1840
+ }
1841
+ ],
1842
+ "url": {
1843
+ "raw": "{{base_url}}/api/v1/orders/2/cancel",
1844
+ "host": [
1845
+ "{{base_url}}"
1846
+ ],
1847
+ "path": [
1848
+ "api",
1849
+ "v1",
1850
+ "orders",
1851
+ "2",
1852
+ "cancel"
1853
+ ]
1854
+ }
1855
+ },
1856
+ "status": "Conflict",
1857
+ "code": 409,
1858
+ "_postman_previewlanguage": "json",
1859
+ "header": [
1860
+ {
1861
+ "key": "content-type",
1862
+ "value": "application/json; charset=utf-8"
1863
+ }
1864
+ ],
1865
+ "body": "{\n \"error\": \"Shipped orders cannot be cancelled\"\n}"
1866
+ }
1867
+ ]
1868
+ }
1869
+ ]
1870
+ },
1871
+ {
1872
+ "name": "Products",
1873
+ "item": [
1874
+ {
1875
+ "name": "List Products",
1876
+ "request": {
1877
+ "method": "GET",
1878
+ "description": "GET /api/v1/products\napi/v1/products#index\nRoute: api_v1_products",
1879
+ "header": [
1880
+ {
1881
+ "key": "Accept",
1882
+ "value": "application/json"
1883
+ }
1884
+ ],
1885
+ "url": {
1886
+ "raw": "{{base_url}}/api/v1/products",
1887
+ "host": [
1888
+ "{{base_url}}"
1889
+ ],
1890
+ "path": [
1891
+ "api",
1892
+ "v1",
1893
+ "products"
1894
+ ]
1895
+ },
1896
+ "auth": {
1897
+ "type": "noauth"
1898
+ }
1899
+ },
1900
+ "response": [
1901
+ {
1902
+ "name": "200 OK",
1903
+ "originalRequest": {
1904
+ "method": "GET",
1905
+ "description": "GET /api/v1/products\napi/v1/products#index\nRoute: api_v1_products",
1906
+ "header": [
1907
+ {
1908
+ "key": "Accept",
1909
+ "value": "application/json"
1910
+ }
1911
+ ],
1912
+ "url": {
1913
+ "raw": "{{base_url}}/api/v1/products",
1914
+ "host": [
1915
+ "{{base_url}}"
1916
+ ],
1917
+ "path": [
1918
+ "api",
1919
+ "v1",
1920
+ "products"
1921
+ ]
1922
+ },
1923
+ "auth": {
1924
+ "type": "noauth"
1925
+ }
1926
+ },
1927
+ "status": "OK",
1928
+ "code": 200,
1929
+ "_postman_previewlanguage": "json",
1930
+ "header": [
1931
+ {
1932
+ "key": "content-type",
1933
+ "value": "application/json; charset=utf-8"
1934
+ }
1935
+ ],
1936
+ "body": "{\n \"data\": [\n {\n \"id\": 1,\n \"sku\": \"TEA-001\",\n \"name\": \"Earl Grey\",\n \"category\": \"tea\",\n \"price_cents\": 1200,\n \"tags\": [\n \"black\",\n \"bergamot\"\n ]\n },\n {\n \"id\": 2,\n \"sku\": \"TEA-002\",\n \"name\": \"Sencha\",\n \"category\": \"tea\",\n \"price_cents\": 1500,\n \"tags\": [\n \"green\"\n ]\n }\n ],\n \"meta\": {\n \"page\": 1,\n \"per_page\": 2,\n \"total\": 4\n }\n}"
1937
+ }
1938
+ ]
1939
+ },
1940
+ {
1941
+ "name": "Get Product",
1942
+ "request": {
1943
+ "method": "GET",
1944
+ "description": "GET /api/v1/products/:id\napi/v1/products#show\nRoute: api_v1_product",
1945
+ "header": [
1946
+ {
1947
+ "key": "Accept",
1948
+ "value": "application/json"
1949
+ }
1950
+ ],
1951
+ "url": {
1952
+ "raw": "{{base_url}}/api/v1/products/3",
1953
+ "host": [
1954
+ "{{base_url}}"
1955
+ ],
1956
+ "path": [
1957
+ "api",
1958
+ "v1",
1959
+ "products",
1960
+ "3"
1961
+ ]
1962
+ },
1963
+ "auth": {
1964
+ "type": "noauth"
1965
+ }
1966
+ },
1967
+ "response": [
1968
+ {
1969
+ "name": "200 OK",
1970
+ "originalRequest": {
1971
+ "method": "GET",
1972
+ "description": "GET /api/v1/products/:id\napi/v1/products#show\nRoute: api_v1_product",
1973
+ "header": [
1974
+ {
1975
+ "key": "Accept",
1976
+ "value": "application/json"
1977
+ }
1978
+ ],
1979
+ "url": {
1980
+ "raw": "{{base_url}}/api/v1/products/3",
1981
+ "host": [
1982
+ "{{base_url}}"
1983
+ ],
1984
+ "path": [
1985
+ "api",
1986
+ "v1",
1987
+ "products",
1988
+ "3"
1989
+ ]
1990
+ },
1991
+ "auth": {
1992
+ "type": "noauth"
1993
+ }
1994
+ },
1995
+ "status": "OK",
1996
+ "code": 200,
1997
+ "_postman_previewlanguage": "json",
1998
+ "header": [
1999
+ {
2000
+ "key": "content-type",
2001
+ "value": "application/json; charset=utf-8"
2002
+ }
2003
+ ],
2004
+ "body": "{\n \"id\": 3,\n \"sku\": \"MUG-001\",\n \"name\": \"Stoneware Mug\",\n \"category\": \"mugs\",\n \"price_cents\": 2400,\n \"tags\": [\n \"ceramic\"\n ]\n}"
2005
+ },
2006
+ {
2007
+ "name": "404 Not Found",
2008
+ "originalRequest": {
2009
+ "method": "GET",
2010
+ "description": "GET /api/v1/products/:id\napi/v1/products#show\nRoute: api_v1_product",
2011
+ "header": [
2012
+ {
2013
+ "key": "Accept",
2014
+ "value": "application/json"
2015
+ }
2016
+ ],
2017
+ "url": {
2018
+ "raw": "{{base_url}}/api/v1/products/999",
2019
+ "host": [
2020
+ "{{base_url}}"
2021
+ ],
2022
+ "path": [
2023
+ "api",
2024
+ "v1",
2025
+ "products",
2026
+ "999"
2027
+ ]
2028
+ },
2029
+ "auth": {
2030
+ "type": "noauth"
2031
+ }
2032
+ },
2033
+ "status": "Not Found",
2034
+ "code": 404,
2035
+ "_postman_previewlanguage": "json",
2036
+ "header": [
2037
+ {
2038
+ "key": "content-type",
2039
+ "value": "application/json; charset=utf-8"
2040
+ }
2041
+ ],
2042
+ "body": "{\n \"error\": \"Not Found\"\n}"
2043
+ }
2044
+ ]
2045
+ },
2046
+ {
2047
+ "name": "Search Products",
2048
+ "request": {
2049
+ "method": "GET",
2050
+ "description": "GET /api/v1/products/search\napi/v1/products#search\nRoute: search_api_v1_products",
2051
+ "header": [
2052
+ {
2053
+ "key": "Accept",
2054
+ "value": "application/json"
2055
+ }
2056
+ ],
2057
+ "url": {
2058
+ "raw": "{{base_url}}/api/v1/products/search?q=mug",
2059
+ "host": [
2060
+ "{{base_url}}"
2061
+ ],
2062
+ "path": [
2063
+ "api",
2064
+ "v1",
2065
+ "products",
2066
+ "search"
2067
+ ],
2068
+ "query": [
2069
+ {
2070
+ "key": "q",
2071
+ "value": "mug"
2072
+ }
2073
+ ]
2074
+ },
2075
+ "auth": {
2076
+ "type": "noauth"
2077
+ }
2078
+ },
2079
+ "response": [
2080
+ {
2081
+ "name": "200 OK",
2082
+ "originalRequest": {
2083
+ "method": "GET",
2084
+ "description": "GET /api/v1/products/search\napi/v1/products#search\nRoute: search_api_v1_products",
2085
+ "header": [
2086
+ {
2087
+ "key": "Accept",
2088
+ "value": "application/json"
2089
+ }
2090
+ ],
2091
+ "url": {
2092
+ "raw": "{{base_url}}/api/v1/products/search?q=mug",
2093
+ "host": [
2094
+ "{{base_url}}"
2095
+ ],
2096
+ "path": [
2097
+ "api",
2098
+ "v1",
2099
+ "products",
2100
+ "search"
2101
+ ],
2102
+ "query": [
2103
+ {
2104
+ "key": "q",
2105
+ "value": "mug"
2106
+ }
2107
+ ]
2108
+ },
2109
+ "auth": {
2110
+ "type": "noauth"
2111
+ }
2112
+ },
2113
+ "status": "OK",
2114
+ "code": 200,
2115
+ "_postman_previewlanguage": "json",
2116
+ "header": [
2117
+ {
2118
+ "key": "content-type",
2119
+ "value": "application/json; charset=utf-8"
2120
+ }
2121
+ ],
2122
+ "body": "{\n \"query\": \"mug\",\n \"results\": [\n {\n \"id\": 3,\n \"sku\": \"MUG-001\",\n \"name\": \"Stoneware Mug\",\n \"category\": \"mugs\",\n \"price_cents\": 2400,\n \"tags\": [\n \"ceramic\"\n ]\n },\n {\n \"id\": 4,\n \"sku\": \"MUG-002\",\n \"name\": \"Travel Mug\",\n \"category\": \"mugs\",\n \"price_cents\": 3200,\n \"tags\": [\n \"steel\",\n \"insulated\"\n ]\n }\n ]\n}"
2123
+ },
2124
+ {
2125
+ "name": "400 Bad Request",
2126
+ "originalRequest": {
2127
+ "method": "GET",
2128
+ "description": "GET /api/v1/products/search\napi/v1/products#search\nRoute: search_api_v1_products",
2129
+ "header": [
2130
+ {
2131
+ "key": "Accept",
2132
+ "value": "application/json"
2133
+ }
2134
+ ],
2135
+ "url": {
2136
+ "raw": "{{base_url}}/api/v1/products/search",
2137
+ "host": [
2138
+ "{{base_url}}"
2139
+ ],
2140
+ "path": [
2141
+ "api",
2142
+ "v1",
2143
+ "products",
2144
+ "search"
2145
+ ]
2146
+ },
2147
+ "auth": {
2148
+ "type": "noauth"
2149
+ }
2150
+ },
2151
+ "status": "Bad Request",
2152
+ "code": 400,
2153
+ "_postman_previewlanguage": "json",
2154
+ "header": [
2155
+ {
2156
+ "key": "content-type",
2157
+ "value": "application/json; charset=utf-8"
2158
+ }
2159
+ ],
2160
+ "body": "{\n \"error\": \"q is required\"\n}"
2161
+ }
2162
+ ]
2163
+ }
2164
+ ]
2165
+ },
2166
+ {
2167
+ "name": "Profiles",
2168
+ "item": [
2169
+ {
2170
+ "name": "Get Profile",
2171
+ "request": {
2172
+ "method": "GET",
2173
+ "description": "GET /api/v1/profile\napi/v1/profiles#show\nRoute: api_v1_profile",
2174
+ "header": [
2175
+ {
2176
+ "key": "Accept",
2177
+ "value": "application/json"
2178
+ }
2179
+ ],
2180
+ "url": {
2181
+ "raw": "{{base_url}}/api/v1/profile",
2182
+ "host": [
2183
+ "{{base_url}}"
2184
+ ],
2185
+ "path": [
2186
+ "api",
2187
+ "v1",
2188
+ "profile"
2189
+ ]
2190
+ }
2191
+ },
2192
+ "response": [
2193
+ {
2194
+ "name": "200 OK",
2195
+ "originalRequest": {
2196
+ "method": "GET",
2197
+ "description": "GET /api/v1/profile\napi/v1/profiles#show\nRoute: api_v1_profile",
2198
+ "header": [
2199
+ {
2200
+ "key": "Accept",
2201
+ "value": "application/json"
2202
+ }
2203
+ ],
2204
+ "url": {
2205
+ "raw": "{{base_url}}/api/v1/profile",
2206
+ "host": [
2207
+ "{{base_url}}"
2208
+ ],
2209
+ "path": [
2210
+ "api",
2211
+ "v1",
2212
+ "profile"
2213
+ ]
2214
+ }
2215
+ },
2216
+ "status": "OK",
2217
+ "code": 200,
2218
+ "_postman_previewlanguage": "json",
2219
+ "header": [
2220
+ {
2221
+ "key": "content-type",
2222
+ "value": "application/json; charset=utf-8"
2223
+ }
2224
+ ],
2225
+ "body": "{\n \"id\": 1,\n \"name\": \"Ada Lovelace\",\n \"email\": \"ada@example.com\",\n \"locale\": \"en\"\n}"
2226
+ },
2227
+ {
2228
+ "name": "401 Unauthorized",
2229
+ "originalRequest": {
2230
+ "method": "GET",
2231
+ "description": "GET /api/v1/profile\napi/v1/profiles#show\nRoute: api_v1_profile",
2232
+ "header": [
2233
+ {
2234
+ "key": "Accept",
2235
+ "value": "application/json"
2236
+ }
2237
+ ],
2238
+ "url": {
2239
+ "raw": "{{base_url}}/api/v1/profile",
2240
+ "host": [
2241
+ "{{base_url}}"
2242
+ ],
2243
+ "path": [
2244
+ "api",
2245
+ "v1",
2246
+ "profile"
2247
+ ]
2248
+ },
2249
+ "auth": {
2250
+ "type": "noauth"
2251
+ }
2252
+ },
2253
+ "status": "Unauthorized",
2254
+ "code": 401,
2255
+ "_postman_previewlanguage": "json",
2256
+ "header": [
2257
+ {
2258
+ "key": "content-type",
2259
+ "value": "application/json; charset=utf-8"
2260
+ }
2261
+ ],
2262
+ "body": "{\n \"error\": \"Unauthorized\"\n}"
2263
+ }
2264
+ ]
2265
+ },
2266
+ {
2267
+ "name": "Update Profile",
2268
+ "request": {
2269
+ "method": "PATCH",
2270
+ "description": "PATCH /api/v1/profile\napi/v1/profiles#update\nAlso answers PUT.",
2271
+ "header": [
2272
+ {
2273
+ "key": "Content-Type",
2274
+ "value": "application/json"
2275
+ },
2276
+ {
2277
+ "key": "Accept",
2278
+ "value": "application/json"
2279
+ }
2280
+ ],
2281
+ "url": {
2282
+ "raw": "{{base_url}}/api/v1/profile",
2283
+ "host": [
2284
+ "{{base_url}}"
2285
+ ],
2286
+ "path": [
2287
+ "api",
2288
+ "v1",
2289
+ "profile"
2290
+ ]
2291
+ },
2292
+ "body": {
2293
+ "mode": "raw",
2294
+ "raw": "{\n \"profile\": {\n \"name\": \"Ada L.\",\n \"locale\": \"tr\"\n }\n}",
2295
+ "options": {
2296
+ "raw": {
2297
+ "language": "json"
2298
+ }
2299
+ }
2300
+ }
2301
+ },
2302
+ "response": [
2303
+ {
2304
+ "name": "200 OK",
2305
+ "originalRequest": {
2306
+ "method": "PATCH",
2307
+ "description": "PATCH /api/v1/profile\napi/v1/profiles#update\nAlso answers PUT.",
2308
+ "header": [
2309
+ {
2310
+ "key": "Content-Type",
2311
+ "value": "application/json"
2312
+ },
2313
+ {
2314
+ "key": "Accept",
2315
+ "value": "application/json"
2316
+ }
2317
+ ],
2318
+ "url": {
2319
+ "raw": "{{base_url}}/api/v1/profile",
2320
+ "host": [
2321
+ "{{base_url}}"
2322
+ ],
2323
+ "path": [
2324
+ "api",
2325
+ "v1",
2326
+ "profile"
2327
+ ]
2328
+ },
2329
+ "body": {
2330
+ "mode": "raw",
2331
+ "raw": "{\n \"profile\": {\n \"name\": \"Ada L.\",\n \"locale\": \"tr\"\n }\n}",
2332
+ "options": {
2333
+ "raw": {
2334
+ "language": "json"
2335
+ }
2336
+ }
2337
+ }
2338
+ },
2339
+ "status": "OK",
2340
+ "code": 200,
2341
+ "_postman_previewlanguage": "json",
2342
+ "header": [
2343
+ {
2344
+ "key": "content-type",
2345
+ "value": "application/json; charset=utf-8"
2346
+ }
2347
+ ],
2348
+ "body": "{\n \"id\": 1,\n \"name\": \"Ada L.\",\n \"email\": \"ada@example.com\",\n \"locale\": \"tr\"\n}"
2349
+ },
2350
+ {
2351
+ "name": "422 Unprocessable Content",
2352
+ "originalRequest": {
2353
+ "method": "PATCH",
2354
+ "description": "PATCH /api/v1/profile\napi/v1/profiles#update\nAlso answers PUT.",
2355
+ "header": [
2356
+ {
2357
+ "key": "Content-Type",
2358
+ "value": "application/json"
2359
+ },
2360
+ {
2361
+ "key": "Accept",
2362
+ "value": "application/json"
2363
+ }
2364
+ ],
2365
+ "url": {
2366
+ "raw": "{{base_url}}/api/v1/profile",
2367
+ "host": [
2368
+ "{{base_url}}"
2369
+ ],
2370
+ "path": [
2371
+ "api",
2372
+ "v1",
2373
+ "profile"
2374
+ ]
2375
+ },
2376
+ "body": {
2377
+ "mode": "raw",
2378
+ "raw": "{\n \"profile\": {\n \"locale\": \"xx\"\n }\n}",
2379
+ "options": {
2380
+ "raw": {
2381
+ "language": "json"
2382
+ }
2383
+ }
2384
+ }
2385
+ },
2386
+ "status": "Unprocessable Content",
2387
+ "code": 422,
2388
+ "_postman_previewlanguage": "json",
2389
+ "header": [
2390
+ {
2391
+ "key": "content-type",
2392
+ "value": "application/json; charset=utf-8"
2393
+ }
2394
+ ],
2395
+ "body": "{\n \"errors\": {\n \"locale\": [\n \"is not included in the list\"\n ]\n }\n}"
2396
+ }
2397
+ ]
2398
+ }
2399
+ ]
2400
+ }
2401
+ ]
2402
+ },
2403
+ {
2404
+ "name": "V2",
2405
+ "item": [
2406
+ {
2407
+ "name": "Products",
2408
+ "item": [
2409
+ {
2410
+ "name": "List Products",
2411
+ "request": {
2412
+ "method": "GET",
2413
+ "description": "GET /api/v2/products\napi/v2/products#index\nRoute: api_v2_products",
2414
+ "header": [
2415
+ {
2416
+ "key": "Accept",
2417
+ "value": "application/json"
2418
+ }
2419
+ ],
2420
+ "url": {
2421
+ "raw": "{{base_url}}/api/v2/products",
2422
+ "host": [
2423
+ "{{base_url}}"
2424
+ ],
2425
+ "path": [
2426
+ "api",
2427
+ "v2",
2428
+ "products"
2429
+ ]
2430
+ },
2431
+ "auth": {
2432
+ "type": "noauth"
2433
+ }
2434
+ },
2435
+ "response": [
2436
+ {
2437
+ "name": "200 OK",
2438
+ "originalRequest": {
2439
+ "method": "GET",
2440
+ "description": "GET /api/v2/products\napi/v2/products#index\nRoute: api_v2_products",
2441
+ "header": [
2442
+ {
2443
+ "key": "Accept",
2444
+ "value": "application/json"
2445
+ }
2446
+ ],
2447
+ "url": {
2448
+ "raw": "{{base_url}}/api/v2/products",
2449
+ "host": [
2450
+ "{{base_url}}"
2451
+ ],
2452
+ "path": [
2453
+ "api",
2454
+ "v2",
2455
+ "products"
2456
+ ]
2457
+ },
2458
+ "auth": {
2459
+ "type": "noauth"
2460
+ }
2461
+ },
2462
+ "status": "OK",
2463
+ "code": 200,
2464
+ "_postman_previewlanguage": "json",
2465
+ "header": [
2466
+ {
2467
+ "key": "content-type",
2468
+ "value": "application/json; charset=utf-8"
2469
+ }
2470
+ ],
2471
+ "body": "{\n \"items\": [\n {\n \"id\": 1,\n \"sku\": \"TEA-001\",\n \"name\": \"Earl Grey\",\n \"category\": \"tea\",\n \"price_cents\": 1200,\n \"tags\": [\n \"black\",\n \"bergamot\"\n ],\n \"price\": \"12.00\"\n },\n {\n \"id\": 2,\n \"sku\": \"TEA-002\",\n \"name\": \"Sencha\",\n \"category\": \"tea\",\n \"price_cents\": 1500,\n \"tags\": [\n \"green\"\n ],\n \"price\": \"15.00\"\n }\n ],\n \"next_cursor\": \"eyJpZCI6Mn0\"\n}"
2472
+ }
2473
+ ]
2474
+ }
2475
+ ]
2476
+ }
2477
+ ]
2478
+ }
2479
+ ]
2480
+ }
2481
+ ],
2482
+ "variable": [
2483
+ {
2484
+ "key": "base_url",
2485
+ "value": "http://localhost:3000",
2486
+ "type": "string"
2487
+ },
2488
+ {
2489
+ "key": "api_key",
2490
+ "value": "",
2491
+ "type": "string"
2492
+ },
2493
+ {
2494
+ "key": "password",
2495
+ "value": "",
2496
+ "type": "string"
2497
+ },
2498
+ {
2499
+ "key": "secret",
2500
+ "value": "",
2501
+ "type": "string"
2502
+ },
2503
+ {
2504
+ "key": "token",
2505
+ "value": "",
2506
+ "type": "string"
2507
+ }
2508
+ ],
2509
+ "auth": {
2510
+ "type": "bearer",
2511
+ "bearer": [
2512
+ {
2513
+ "key": "token",
2514
+ "value": "{{token}}",
2515
+ "type": "string"
2516
+ }
2517
+ ]
2518
+ }
2519
+ }