reqcord 0.1.1 → 0.1.2

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 (223) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -0
  3. data/Gemfile +5 -0
  4. data/README.md +13 -0
  5. data/gemfiles/rails_7.1.gemfile +13 -0
  6. data/gemfiles/rails_7.2.gemfile +13 -0
  7. data/gemfiles/rails_8.0.gemfile +13 -0
  8. data/gemfiles/rails_8.1.gemfile +13 -0
  9. data/lib/reqcord/version.rb +1 -1
  10. data/reqcord.gemspec +18 -4
  11. metadata +65 -217
  12. data/.gitignore +0 -8
  13. data/Gemfile.lock +0 -171
  14. data/examples/complex-spec-app/.rspec +0 -1
  15. data/examples/complex-spec-app/README.md +0 -21
  16. data/examples/complex-spec-app/app.rb +0 -363
  17. data/examples/complex-spec-app/docs/api/README.md +0 -104
  18. data/examples/complex-spec-app/docs/api/api/v1/admin/products/create.md +0 -117
  19. data/examples/complex-spec-app/docs/api/api/v1/admin/products/destroy.md +0 -51
  20. data/examples/complex-spec-app/docs/api/api/v1/admin/products/index.md +0 -11
  21. data/examples/complex-spec-app/docs/api/api/v1/admin/products/list.md +0 -106
  22. data/examples/complex-spec-app/docs/api/api/v1/auth/index.md +0 -9
  23. data/examples/complex-spec-app/docs/api/api/v1/auth/login.md +0 -76
  24. data/examples/complex-spec-app/docs/api/api/v1/cart-items/create.md +0 -91
  25. data/examples/complex-spec-app/docs/api/api/v1/cart-items/destroy.md +0 -51
  26. data/examples/complex-spec-app/docs/api/api/v1/cart-items/index.md +0 -10
  27. data/examples/complex-spec-app/docs/api/api/v1/carts/checkout.md +0 -102
  28. data/examples/complex-spec-app/docs/api/api/v1/carts/index.md +0 -10
  29. data/examples/complex-spec-app/docs/api/api/v1/carts/show.md +0 -73
  30. data/examples/complex-spec-app/docs/api/api/v1/home/index.md +0 -9
  31. data/examples/complex-spec-app/docs/api/api/v1/home/list.md +0 -47
  32. data/examples/complex-spec-app/docs/api/api/v1/notes/create.md +0 -94
  33. data/examples/complex-spec-app/docs/api/api/v1/notes/index.md +0 -10
  34. data/examples/complex-spec-app/docs/api/api/v1/notes/list.md +0 -61
  35. data/examples/complex-spec-app/docs/api/api/v1/orders/cancel.md +0 -69
  36. data/examples/complex-spec-app/docs/api/api/v1/orders/create.md +0 -150
  37. data/examples/complex-spec-app/docs/api/api/v1/orders/destroy.md +0 -37
  38. data/examples/complex-spec-app/docs/api/api/v1/orders/index.md +0 -13
  39. data/examples/complex-spec-app/docs/api/api/v1/orders/list.md +0 -78
  40. data/examples/complex-spec-app/docs/api/api/v1/orders/show.md +0 -83
  41. data/examples/complex-spec-app/docs/api/api/v1/products/index.md +0 -11
  42. data/examples/complex-spec-app/docs/api/api/v1/products/list.md +0 -83
  43. data/examples/complex-spec-app/docs/api/api/v1/products/search.md +0 -88
  44. data/examples/complex-spec-app/docs/api/api/v1/products/show.md +0 -71
  45. data/examples/complex-spec-app/docs/api/api/v1/profiles/index.md +0 -10
  46. data/examples/complex-spec-app/docs/api/api/v1/profiles/show.md +0 -61
  47. data/examples/complex-spec-app/docs/api/api/v1/profiles/update.md +0 -91
  48. data/examples/complex-spec-app/docs/api/api/v2/products/index.md +0 -9
  49. data/examples/complex-spec-app/docs/api/api/v2/products/list.md +0 -77
  50. data/examples/complex-spec-app/docs/api/curl/api/v1/admin/products/create.sh +0 -18
  51. data/examples/complex-spec-app/docs/api/curl/api/v1/admin/products/destroy.sh +0 -9
  52. data/examples/complex-spec-app/docs/api/curl/api/v1/admin/products/list.sh +0 -9
  53. data/examples/complex-spec-app/docs/api/curl/api/v1/auth/login.sh +0 -9
  54. data/examples/complex-spec-app/docs/api/curl/api/v1/cart-items/create.sh +0 -16
  55. data/examples/complex-spec-app/docs/api/curl/api/v1/cart-items/destroy.sh +0 -9
  56. data/examples/complex-spec-app/docs/api/curl/api/v1/carts/checkout.sh +0 -13
  57. data/examples/complex-spec-app/docs/api/curl/api/v1/carts/show.sh +0 -9
  58. data/examples/complex-spec-app/docs/api/curl/api/v1/home/list.sh +0 -8
  59. data/examples/complex-spec-app/docs/api/curl/api/v1/notes/create.sh +0 -15
  60. data/examples/complex-spec-app/docs/api/curl/api/v1/notes/list.sh +0 -9
  61. data/examples/complex-spec-app/docs/api/curl/api/v1/orders/cancel.sh +0 -9
  62. data/examples/complex-spec-app/docs/api/curl/api/v1/orders/create.sh +0 -29
  63. data/examples/complex-spec-app/docs/api/curl/api/v1/orders/destroy.sh +0 -9
  64. data/examples/complex-spec-app/docs/api/curl/api/v1/orders/list.sh +0 -9
  65. data/examples/complex-spec-app/docs/api/curl/api/v1/orders/show.sh +0 -9
  66. data/examples/complex-spec-app/docs/api/curl/api/v1/products/list.sh +0 -8
  67. data/examples/complex-spec-app/docs/api/curl/api/v1/products/search.sh +0 -8
  68. data/examples/complex-spec-app/docs/api/curl/api/v1/products/show.sh +0 -8
  69. data/examples/complex-spec-app/docs/api/curl/api/v1/profiles/show.sh +0 -9
  70. data/examples/complex-spec-app/docs/api/curl/api/v1/profiles/update.sh +0 -16
  71. data/examples/complex-spec-app/docs/api/curl/api/v2/products/list.sh +0 -8
  72. data/examples/complex-spec-app/docs/api/dataset.json +0 -5116
  73. data/examples/complex-spec-app/docs/api/postman/collection.json +0 -2519
  74. data/examples/complex-spec-app/generate.rb +0 -14
  75. data/examples/complex-spec-app/reqcord.yml +0 -28
  76. data/examples/complex-spec-app/spec/requests/admin_spec.rb +0 -67
  77. data/examples/complex-spec-app/spec/requests/cart_spec.rb +0 -61
  78. data/examples/complex-spec-app/spec/requests/home_and_auth_spec.rb +0 -49
  79. data/examples/complex-spec-app/spec/requests/orders_spec.rb +0 -124
  80. data/examples/complex-spec-app/spec/requests/products_spec.rb +0 -65
  81. data/examples/complex-spec-app/spec/spec_helper.rb +0 -17
  82. data/examples/complex-test-app/README.md +0 -40
  83. data/examples/complex-test-app/app.rb +0 -384
  84. data/examples/complex-test-app/docs/api/README.md +0 -104
  85. data/examples/complex-test-app/docs/api/api/v1/admin/products/create.md +0 -117
  86. data/examples/complex-test-app/docs/api/api/v1/admin/products/destroy.md +0 -51
  87. data/examples/complex-test-app/docs/api/api/v1/admin/products/index.md +0 -11
  88. data/examples/complex-test-app/docs/api/api/v1/admin/products/list.md +0 -106
  89. data/examples/complex-test-app/docs/api/api/v1/auth/index.md +0 -9
  90. data/examples/complex-test-app/docs/api/api/v1/auth/login.md +0 -76
  91. data/examples/complex-test-app/docs/api/api/v1/cart-items/create.md +0 -91
  92. data/examples/complex-test-app/docs/api/api/v1/cart-items/destroy.md +0 -51
  93. data/examples/complex-test-app/docs/api/api/v1/cart-items/index.md +0 -10
  94. data/examples/complex-test-app/docs/api/api/v1/carts/checkout.md +0 -102
  95. data/examples/complex-test-app/docs/api/api/v1/carts/index.md +0 -10
  96. data/examples/complex-test-app/docs/api/api/v1/carts/show.md +0 -73
  97. data/examples/complex-test-app/docs/api/api/v1/home/index.md +0 -9
  98. data/examples/complex-test-app/docs/api/api/v1/home/list.md +0 -47
  99. data/examples/complex-test-app/docs/api/api/v1/notes/create.md +0 -94
  100. data/examples/complex-test-app/docs/api/api/v1/notes/index.md +0 -10
  101. data/examples/complex-test-app/docs/api/api/v1/notes/list.md +0 -61
  102. data/examples/complex-test-app/docs/api/api/v1/orders/cancel.md +0 -69
  103. data/examples/complex-test-app/docs/api/api/v1/orders/create.md +0 -150
  104. data/examples/complex-test-app/docs/api/api/v1/orders/destroy.md +0 -37
  105. data/examples/complex-test-app/docs/api/api/v1/orders/index.md +0 -13
  106. data/examples/complex-test-app/docs/api/api/v1/orders/list.md +0 -71
  107. data/examples/complex-test-app/docs/api/api/v1/orders/show.md +0 -83
  108. data/examples/complex-test-app/docs/api/api/v1/products/index.md +0 -11
  109. data/examples/complex-test-app/docs/api/api/v1/products/list.md +0 -83
  110. data/examples/complex-test-app/docs/api/api/v1/products/search.md +0 -88
  111. data/examples/complex-test-app/docs/api/api/v1/products/show.md +0 -71
  112. data/examples/complex-test-app/docs/api/api/v1/profiles/index.md +0 -10
  113. data/examples/complex-test-app/docs/api/api/v1/profiles/show.md +0 -61
  114. data/examples/complex-test-app/docs/api/api/v1/profiles/update.md +0 -91
  115. data/examples/complex-test-app/docs/api/api/v2/products/index.md +0 -9
  116. data/examples/complex-test-app/docs/api/api/v2/products/list.md +0 -77
  117. data/examples/complex-test-app/docs/api/curl/api/v1/admin/products/create.sh +0 -18
  118. data/examples/complex-test-app/docs/api/curl/api/v1/admin/products/destroy.sh +0 -9
  119. data/examples/complex-test-app/docs/api/curl/api/v1/admin/products/list.sh +0 -9
  120. data/examples/complex-test-app/docs/api/curl/api/v1/auth/login.sh +0 -9
  121. data/examples/complex-test-app/docs/api/curl/api/v1/cart-items/create.sh +0 -16
  122. data/examples/complex-test-app/docs/api/curl/api/v1/cart-items/destroy.sh +0 -9
  123. data/examples/complex-test-app/docs/api/curl/api/v1/carts/checkout.sh +0 -13
  124. data/examples/complex-test-app/docs/api/curl/api/v1/carts/show.sh +0 -9
  125. data/examples/complex-test-app/docs/api/curl/api/v1/home/list.sh +0 -8
  126. data/examples/complex-test-app/docs/api/curl/api/v1/notes/create.sh +0 -15
  127. data/examples/complex-test-app/docs/api/curl/api/v1/notes/list.sh +0 -9
  128. data/examples/complex-test-app/docs/api/curl/api/v1/orders/cancel.sh +0 -9
  129. data/examples/complex-test-app/docs/api/curl/api/v1/orders/create.sh +0 -29
  130. data/examples/complex-test-app/docs/api/curl/api/v1/orders/destroy.sh +0 -9
  131. data/examples/complex-test-app/docs/api/curl/api/v1/orders/list.sh +0 -9
  132. data/examples/complex-test-app/docs/api/curl/api/v1/orders/show.sh +0 -9
  133. data/examples/complex-test-app/docs/api/curl/api/v1/products/list.sh +0 -8
  134. data/examples/complex-test-app/docs/api/curl/api/v1/products/search.sh +0 -8
  135. data/examples/complex-test-app/docs/api/curl/api/v1/products/show.sh +0 -8
  136. data/examples/complex-test-app/docs/api/curl/api/v1/profiles/show.sh +0 -9
  137. data/examples/complex-test-app/docs/api/curl/api/v1/profiles/update.sh +0 -16
  138. data/examples/complex-test-app/docs/api/curl/api/v2/products/list.sh +0 -8
  139. data/examples/complex-test-app/docs/api/dataset.json +0 -5109
  140. data/examples/complex-test-app/docs/api/postman/collection.json +0 -2568
  141. data/examples/complex-test-app/generate.rb +0 -14
  142. data/examples/complex-test-app/reqcord.yml +0 -28
  143. data/examples/complex-test-app/test/integration/admin_test.rb +0 -70
  144. data/examples/complex-test-app/test/integration/cart_test.rb +0 -64
  145. data/examples/complex-test-app/test/integration/home_and_auth_test.rb +0 -53
  146. data/examples/complex-test-app/test/integration/orders_test.rb +0 -127
  147. data/examples/complex-test-app/test/integration/products_test.rb +0 -66
  148. data/examples/spec-app/.rspec +0 -1
  149. data/examples/spec-app/README.md +0 -36
  150. data/examples/spec-app/app.rb +0 -209
  151. data/examples/spec-app/docs/api/README.md +0 -45
  152. data/examples/spec-app/docs/api/api/v1/customers/create.md +0 -95
  153. data/examples/spec-app/docs/api/api/v1/customers/index.md +0 -11
  154. data/examples/spec-app/docs/api/api/v1/customers/list.md +0 -67
  155. data/examples/spec-app/docs/api/api/v1/customers/show.md +0 -65
  156. data/examples/spec-app/docs/api/api/v1/tasks/complete.md +0 -51
  157. data/examples/spec-app/docs/api/api/v1/tasks/create.md +0 -90
  158. data/examples/spec-app/docs/api/api/v1/tasks/destroy.md +0 -35
  159. data/examples/spec-app/docs/api/api/v1/tasks/index.md +0 -14
  160. data/examples/spec-app/docs/api/api/v1/tasks/list.md +0 -65
  161. data/examples/spec-app/docs/api/api/v1/tasks/show.md +0 -65
  162. data/examples/spec-app/docs/api/api/v1/tasks/update.md +0 -74
  163. data/examples/spec-app/docs/api/api/v1/users/create.md +0 -95
  164. data/examples/spec-app/docs/api/api/v1/users/index.md +0 -11
  165. data/examples/spec-app/docs/api/api/v1/users/list.md +0 -67
  166. data/examples/spec-app/docs/api/api/v1/users/show.md +0 -65
  167. data/examples/spec-app/docs/api/curl/api/v1/customers/create.sh +0 -17
  168. data/examples/spec-app/docs/api/curl/api/v1/customers/list.sh +0 -9
  169. data/examples/spec-app/docs/api/curl/api/v1/customers/show.sh +0 -9
  170. data/examples/spec-app/docs/api/curl/api/v1/tasks/complete.sh +0 -8
  171. data/examples/spec-app/docs/api/curl/api/v1/tasks/create.sh +0 -15
  172. data/examples/spec-app/docs/api/curl/api/v1/tasks/destroy.sh +0 -8
  173. data/examples/spec-app/docs/api/curl/api/v1/tasks/list.sh +0 -8
  174. data/examples/spec-app/docs/api/curl/api/v1/tasks/show.sh +0 -8
  175. data/examples/spec-app/docs/api/curl/api/v1/tasks/update.sh +0 -14
  176. data/examples/spec-app/docs/api/curl/api/v1/users/create.sh +0 -17
  177. data/examples/spec-app/docs/api/curl/api/v1/users/list.sh +0 -9
  178. data/examples/spec-app/docs/api/curl/api/v1/users/show.sh +0 -9
  179. data/examples/spec-app/docs/api/dataset.json +0 -2402
  180. data/examples/spec-app/docs/api/postman/collection.json +0 -1290
  181. data/examples/spec-app/generate.rb +0 -14
  182. data/examples/spec-app/reqcord.yml +0 -27
  183. data/examples/spec-app/spec/requests/customers_spec.rb +0 -71
  184. data/examples/spec-app/spec/requests/tasks_spec.rb +0 -78
  185. data/examples/spec-app/spec/requests/users_spec.rb +0 -68
  186. data/examples/spec-app/spec/spec_helper.rb +0 -17
  187. data/examples/test-app/README.md +0 -57
  188. data/examples/test-app/app.rb +0 -212
  189. data/examples/test-app/docs/api/README.md +0 -45
  190. data/examples/test-app/docs/api/api/v1/customers/create.md +0 -95
  191. data/examples/test-app/docs/api/api/v1/customers/index.md +0 -11
  192. data/examples/test-app/docs/api/api/v1/customers/list.md +0 -67
  193. data/examples/test-app/docs/api/api/v1/customers/show.md +0 -65
  194. data/examples/test-app/docs/api/api/v1/tasks/complete.md +0 -51
  195. data/examples/test-app/docs/api/api/v1/tasks/create.md +0 -90
  196. data/examples/test-app/docs/api/api/v1/tasks/destroy.md +0 -35
  197. data/examples/test-app/docs/api/api/v1/tasks/index.md +0 -14
  198. data/examples/test-app/docs/api/api/v1/tasks/list.md +0 -65
  199. data/examples/test-app/docs/api/api/v1/tasks/show.md +0 -65
  200. data/examples/test-app/docs/api/api/v1/tasks/update.md +0 -74
  201. data/examples/test-app/docs/api/api/v1/users/create.md +0 -95
  202. data/examples/test-app/docs/api/api/v1/users/index.md +0 -11
  203. data/examples/test-app/docs/api/api/v1/users/list.md +0 -67
  204. data/examples/test-app/docs/api/api/v1/users/show.md +0 -65
  205. data/examples/test-app/docs/api/curl/api/v1/customers/create.sh +0 -17
  206. data/examples/test-app/docs/api/curl/api/v1/customers/list.sh +0 -9
  207. data/examples/test-app/docs/api/curl/api/v1/customers/show.sh +0 -9
  208. data/examples/test-app/docs/api/curl/api/v1/tasks/complete.sh +0 -8
  209. data/examples/test-app/docs/api/curl/api/v1/tasks/create.sh +0 -15
  210. data/examples/test-app/docs/api/curl/api/v1/tasks/destroy.sh +0 -8
  211. data/examples/test-app/docs/api/curl/api/v1/tasks/list.sh +0 -8
  212. data/examples/test-app/docs/api/curl/api/v1/tasks/show.sh +0 -8
  213. data/examples/test-app/docs/api/curl/api/v1/tasks/update.sh +0 -14
  214. data/examples/test-app/docs/api/curl/api/v1/users/create.sh +0 -17
  215. data/examples/test-app/docs/api/curl/api/v1/users/list.sh +0 -9
  216. data/examples/test-app/docs/api/curl/api/v1/users/show.sh +0 -9
  217. data/examples/test-app/docs/api/dataset.json +0 -2402
  218. data/examples/test-app/docs/api/postman/collection.json +0 -1290
  219. data/examples/test-app/generate.rb +0 -14
  220. data/examples/test-app/reqcord.yml +0 -28
  221. data/examples/test-app/test/integration/customers_test.rb +0 -72
  222. data/examples/test-app/test/integration/tasks_test.rb +0 -80
  223. data/examples/test-app/test/integration/users_test.rb +0 -72
@@ -1,2568 +0,0 @@
1
- {
2
- "info": {
3
- "name": "complex-test-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?status=pending",
1376
- "host": [
1377
- "{{base_url}}"
1378
- ],
1379
- "path": [
1380
- "api",
1381
- "v1",
1382
- "orders"
1383
- ],
1384
- "query": [
1385
- {
1386
- "key": "status",
1387
- "value": "pending"
1388
- }
1389
- ]
1390
- }
1391
- },
1392
- "response": [
1393
- {
1394
- "name": "200 OK",
1395
- "originalRequest": {
1396
- "method": "GET",
1397
- "description": "GET /api/v1/orders\napi/v1/orders#index\nRoute: api_v1_orders",
1398
- "header": [
1399
- {
1400
- "key": "Accept",
1401
- "value": "application/json"
1402
- }
1403
- ],
1404
- "url": {
1405
- "raw": "{{base_url}}/api/v1/orders?status=pending",
1406
- "host": [
1407
- "{{base_url}}"
1408
- ],
1409
- "path": [
1410
- "api",
1411
- "v1",
1412
- "orders"
1413
- ],
1414
- "query": [
1415
- {
1416
- "key": "status",
1417
- "value": "pending"
1418
- }
1419
- ]
1420
- }
1421
- },
1422
- "status": "OK",
1423
- "code": 200,
1424
- "_postman_previewlanguage": "json",
1425
- "header": [
1426
- {
1427
- "key": "content-type",
1428
- "value": "application/json; charset=utf-8"
1429
- }
1430
- ],
1431
- "body": "[\n {\n \"id\": 1,\n \"user_id\": 1,\n \"status\": \"pending\",\n \"currency\": \"USD\",\n \"total_cents\": 2700\n }\n]"
1432
- },
1433
- {
1434
- "name": "401 Unauthorized",
1435
- "originalRequest": {
1436
- "method": "GET",
1437
- "description": "GET /api/v1/orders\napi/v1/orders#index\nRoute: api_v1_orders",
1438
- "header": [
1439
- {
1440
- "key": "Accept",
1441
- "value": "application/json"
1442
- }
1443
- ],
1444
- "url": {
1445
- "raw": "{{base_url}}/api/v1/orders",
1446
- "host": [
1447
- "{{base_url}}"
1448
- ],
1449
- "path": [
1450
- "api",
1451
- "v1",
1452
- "orders"
1453
- ]
1454
- },
1455
- "auth": {
1456
- "type": "noauth"
1457
- }
1458
- },
1459
- "status": "Unauthorized",
1460
- "code": 401,
1461
- "_postman_previewlanguage": "json",
1462
- "header": [
1463
- {
1464
- "key": "content-type",
1465
- "value": "application/json; charset=utf-8"
1466
- }
1467
- ],
1468
- "body": "{\n \"error\": \"Unauthorized\"\n}"
1469
- }
1470
- ]
1471
- },
1472
- {
1473
- "name": "Create Order",
1474
- "request": {
1475
- "method": "POST",
1476
- "description": "POST /api/v1/orders\napi/v1/orders#create",
1477
- "header": [
1478
- {
1479
- "key": "Content-Type",
1480
- "value": "application/json"
1481
- },
1482
- {
1483
- "key": "Accept",
1484
- "value": "application/json"
1485
- }
1486
- ],
1487
- "url": {
1488
- "raw": "{{base_url}}/api/v1/orders",
1489
- "host": [
1490
- "{{base_url}}"
1491
- ],
1492
- "path": [
1493
- "api",
1494
- "v1",
1495
- "orders"
1496
- ]
1497
- },
1498
- "body": {
1499
- "mode": "raw",
1500
- "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}",
1501
- "options": {
1502
- "raw": {
1503
- "language": "json"
1504
- }
1505
- }
1506
- }
1507
- },
1508
- "response": [
1509
- {
1510
- "name": "201 Created",
1511
- "originalRequest": {
1512
- "method": "POST",
1513
- "description": "POST /api/v1/orders\napi/v1/orders#create",
1514
- "header": [
1515
- {
1516
- "key": "Content-Type",
1517
- "value": "application/json"
1518
- },
1519
- {
1520
- "key": "Accept",
1521
- "value": "application/json"
1522
- }
1523
- ],
1524
- "url": {
1525
- "raw": "{{base_url}}/api/v1/orders",
1526
- "host": [
1527
- "{{base_url}}"
1528
- ],
1529
- "path": [
1530
- "api",
1531
- "v1",
1532
- "orders"
1533
- ]
1534
- },
1535
- "body": {
1536
- "mode": "raw",
1537
- "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}",
1538
- "options": {
1539
- "raw": {
1540
- "language": "json"
1541
- }
1542
- }
1543
- }
1544
- },
1545
- "status": "Created",
1546
- "code": 201,
1547
- "_postman_previewlanguage": "json",
1548
- "header": [
1549
- {
1550
- "key": "content-type",
1551
- "value": "application/json; charset=utf-8"
1552
- }
1553
- ],
1554
- "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}"
1555
- },
1556
- {
1557
- "name": "422 Unprocessable Content",
1558
- "originalRequest": {
1559
- "method": "POST",
1560
- "description": "POST /api/v1/orders\napi/v1/orders#create",
1561
- "header": [
1562
- {
1563
- "key": "Content-Type",
1564
- "value": "application/json"
1565
- },
1566
- {
1567
- "key": "Accept",
1568
- "value": "application/json"
1569
- }
1570
- ],
1571
- "url": {
1572
- "raw": "{{base_url}}/api/v1/orders",
1573
- "host": [
1574
- "{{base_url}}"
1575
- ],
1576
- "path": [
1577
- "api",
1578
- "v1",
1579
- "orders"
1580
- ]
1581
- },
1582
- "body": {
1583
- "mode": "raw",
1584
- "raw": "{\n \"order\": {\n \"line_items\": [\n {\n \"sku\": \"TEA-999\",\n \"quantity\": 1\n }\n ]\n }\n}",
1585
- "options": {
1586
- "raw": {
1587
- "language": "json"
1588
- }
1589
- }
1590
- }
1591
- },
1592
- "status": "Unprocessable Content",
1593
- "code": 422,
1594
- "_postman_previewlanguage": "json",
1595
- "header": [
1596
- {
1597
- "key": "content-type",
1598
- "value": "application/json; charset=utf-8"
1599
- }
1600
- ],
1601
- "body": "{\n \"errors\": {\n \"sku\": [\n \"TEA-999 is not a known product\"\n ]\n }\n}"
1602
- }
1603
- ]
1604
- },
1605
- {
1606
- "name": "Delete Order",
1607
- "request": {
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
- "response": [
1630
- {
1631
- "name": "204 No Content",
1632
- "originalRequest": {
1633
- "method": "DELETE",
1634
- "description": "DELETE /api/v1/orders/:id\napi/v1/orders#destroy",
1635
- "header": [
1636
- {
1637
- "key": "Accept",
1638
- "value": "application/json"
1639
- }
1640
- ],
1641
- "url": {
1642
- "raw": "{{base_url}}/api/v1/orders/1",
1643
- "host": [
1644
- "{{base_url}}"
1645
- ],
1646
- "path": [
1647
- "api",
1648
- "v1",
1649
- "orders",
1650
- "1"
1651
- ]
1652
- }
1653
- },
1654
- "status": "No Content",
1655
- "code": 204,
1656
- "_postman_previewlanguage": "text",
1657
- "header": [],
1658
- "body": ""
1659
- }
1660
- ]
1661
- },
1662
- {
1663
- "name": "Get Order",
1664
- "request": {
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
- "response": [
1687
- {
1688
- "name": "200 OK",
1689
- "originalRequest": {
1690
- "method": "GET",
1691
- "description": "GET /api/v1/orders/:id\napi/v1/orders#show\nRoute: api_v1_order",
1692
- "header": [
1693
- {
1694
- "key": "Accept",
1695
- "value": "application/json"
1696
- }
1697
- ],
1698
- "url": {
1699
- "raw": "{{base_url}}/api/v1/orders/1",
1700
- "host": [
1701
- "{{base_url}}"
1702
- ],
1703
- "path": [
1704
- "api",
1705
- "v1",
1706
- "orders",
1707
- "1"
1708
- ]
1709
- }
1710
- },
1711
- "status": "OK",
1712
- "code": 200,
1713
- "_postman_previewlanguage": "json",
1714
- "header": [
1715
- {
1716
- "key": "content-type",
1717
- "value": "application/json; charset=utf-8"
1718
- }
1719
- ],
1720
- "body": "{\n \"id\": 1,\n \"user_id\": 1,\n \"status\": \"pending\",\n \"currency\": \"USD\",\n \"total_cents\": 2700\n}"
1721
- },
1722
- {
1723
- "name": "403 Forbidden",
1724
- "originalRequest": {
1725
- "method": "GET",
1726
- "description": "GET /api/v1/orders/:id\napi/v1/orders#show\nRoute: api_v1_order",
1727
- "header": [
1728
- {
1729
- "key": "Accept",
1730
- "value": "application/json"
1731
- }
1732
- ],
1733
- "url": {
1734
- "raw": "{{base_url}}/api/v1/orders/3",
1735
- "host": [
1736
- "{{base_url}}"
1737
- ],
1738
- "path": [
1739
- "api",
1740
- "v1",
1741
- "orders",
1742
- "3"
1743
- ]
1744
- }
1745
- },
1746
- "status": "Forbidden",
1747
- "code": 403,
1748
- "_postman_previewlanguage": "json",
1749
- "header": [
1750
- {
1751
- "key": "content-type",
1752
- "value": "application/json; charset=utf-8"
1753
- }
1754
- ],
1755
- "body": "{\n \"error\": \"Forbidden\"\n}"
1756
- },
1757
- {
1758
- "name": "404 Not Found",
1759
- "originalRequest": {
1760
- "method": "GET",
1761
- "description": "GET /api/v1/orders/:id\napi/v1/orders#show\nRoute: api_v1_order",
1762
- "header": [
1763
- {
1764
- "key": "Accept",
1765
- "value": "application/json"
1766
- }
1767
- ],
1768
- "url": {
1769
- "raw": "{{base_url}}/api/v1/orders/999",
1770
- "host": [
1771
- "{{base_url}}"
1772
- ],
1773
- "path": [
1774
- "api",
1775
- "v1",
1776
- "orders",
1777
- "999"
1778
- ]
1779
- }
1780
- },
1781
- "status": "Not Found",
1782
- "code": 404,
1783
- "_postman_previewlanguage": "json",
1784
- "header": [
1785
- {
1786
- "key": "content-type",
1787
- "value": "application/json; charset=utf-8"
1788
- }
1789
- ],
1790
- "body": "{\n \"error\": \"Not Found\"\n}"
1791
- }
1792
- ]
1793
- },
1794
- {
1795
- "name": "Cancel Order",
1796
- "request": {
1797
- "method": "POST",
1798
- "description": "POST /api/v1/orders/:id/cancel\napi/v1/orders#cancel\nRoute: cancel_api_v1_order",
1799
- "header": [
1800
- {
1801
- "key": "Accept",
1802
- "value": "application/json"
1803
- }
1804
- ],
1805
- "url": {
1806
- "raw": "{{base_url}}/api/v1/orders/1/cancel",
1807
- "host": [
1808
- "{{base_url}}"
1809
- ],
1810
- "path": [
1811
- "api",
1812
- "v1",
1813
- "orders",
1814
- "1",
1815
- "cancel"
1816
- ]
1817
- }
1818
- },
1819
- "response": [
1820
- {
1821
- "name": "200 OK",
1822
- "originalRequest": {
1823
- "method": "POST",
1824
- "description": "POST /api/v1/orders/:id/cancel\napi/v1/orders#cancel\nRoute: cancel_api_v1_order",
1825
- "header": [
1826
- {
1827
- "key": "Accept",
1828
- "value": "application/json"
1829
- }
1830
- ],
1831
- "url": {
1832
- "raw": "{{base_url}}/api/v1/orders/1/cancel",
1833
- "host": [
1834
- "{{base_url}}"
1835
- ],
1836
- "path": [
1837
- "api",
1838
- "v1",
1839
- "orders",
1840
- "1",
1841
- "cancel"
1842
- ]
1843
- }
1844
- },
1845
- "status": "OK",
1846
- "code": 200,
1847
- "_postman_previewlanguage": "json",
1848
- "header": [
1849
- {
1850
- "key": "content-type",
1851
- "value": "application/json; charset=utf-8"
1852
- }
1853
- ],
1854
- "body": "{\n \"id\": 1,\n \"user_id\": 1,\n \"status\": \"cancelled\",\n \"currency\": \"USD\",\n \"total_cents\": 2700\n}"
1855
- },
1856
- {
1857
- "name": "409 Conflict",
1858
- "originalRequest": {
1859
- "method": "POST",
1860
- "description": "POST /api/v1/orders/:id/cancel\napi/v1/orders#cancel\nRoute: cancel_api_v1_order",
1861
- "header": [
1862
- {
1863
- "key": "Accept",
1864
- "value": "application/json"
1865
- }
1866
- ],
1867
- "url": {
1868
- "raw": "{{base_url}}/api/v1/orders/2/cancel",
1869
- "host": [
1870
- "{{base_url}}"
1871
- ],
1872
- "path": [
1873
- "api",
1874
- "v1",
1875
- "orders",
1876
- "2",
1877
- "cancel"
1878
- ]
1879
- }
1880
- },
1881
- "status": "Conflict",
1882
- "code": 409,
1883
- "_postman_previewlanguage": "json",
1884
- "header": [
1885
- {
1886
- "key": "content-type",
1887
- "value": "application/json; charset=utf-8"
1888
- }
1889
- ],
1890
- "body": "{\n \"error\": \"Shipped orders cannot be cancelled\"\n}"
1891
- }
1892
- ]
1893
- }
1894
- ]
1895
- },
1896
- {
1897
- "name": "Products",
1898
- "item": [
1899
- {
1900
- "name": "List Products",
1901
- "request": {
1902
- "method": "GET",
1903
- "description": "GET /api/v1/products\napi/v1/products#index\nRoute: api_v1_products",
1904
- "header": [
1905
- {
1906
- "key": "Accept",
1907
- "value": "application/json"
1908
- }
1909
- ],
1910
- "url": {
1911
- "raw": "{{base_url}}/api/v1/products?filter%5Bcategory%5D=tea",
1912
- "host": [
1913
- "{{base_url}}"
1914
- ],
1915
- "path": [
1916
- "api",
1917
- "v1",
1918
- "products"
1919
- ],
1920
- "query": [
1921
- {
1922
- "key": "filter[category]",
1923
- "value": "tea"
1924
- }
1925
- ]
1926
- },
1927
- "auth": {
1928
- "type": "noauth"
1929
- }
1930
- },
1931
- "response": [
1932
- {
1933
- "name": "200 OK",
1934
- "originalRequest": {
1935
- "method": "GET",
1936
- "description": "GET /api/v1/products\napi/v1/products#index\nRoute: api_v1_products",
1937
- "header": [
1938
- {
1939
- "key": "Accept",
1940
- "value": "application/json"
1941
- }
1942
- ],
1943
- "url": {
1944
- "raw": "{{base_url}}/api/v1/products?filter%5Bcategory%5D=tea",
1945
- "host": [
1946
- "{{base_url}}"
1947
- ],
1948
- "path": [
1949
- "api",
1950
- "v1",
1951
- "products"
1952
- ],
1953
- "query": [
1954
- {
1955
- "key": "filter[category]",
1956
- "value": "tea"
1957
- }
1958
- ]
1959
- },
1960
- "auth": {
1961
- "type": "noauth"
1962
- }
1963
- },
1964
- "status": "OK",
1965
- "code": 200,
1966
- "_postman_previewlanguage": "json",
1967
- "header": [
1968
- {
1969
- "key": "content-type",
1970
- "value": "application/json; charset=utf-8"
1971
- }
1972
- ],
1973
- "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\": 2\n }\n}"
1974
- }
1975
- ]
1976
- },
1977
- {
1978
- "name": "Get Product",
1979
- "request": {
1980
- "method": "GET",
1981
- "description": "GET /api/v1/products/:id\napi/v1/products#show\nRoute: api_v1_product",
1982
- "header": [
1983
- {
1984
- "key": "Accept",
1985
- "value": "application/json"
1986
- }
1987
- ],
1988
- "url": {
1989
- "raw": "{{base_url}}/api/v1/products/3",
1990
- "host": [
1991
- "{{base_url}}"
1992
- ],
1993
- "path": [
1994
- "api",
1995
- "v1",
1996
- "products",
1997
- "3"
1998
- ]
1999
- },
2000
- "auth": {
2001
- "type": "noauth"
2002
- }
2003
- },
2004
- "response": [
2005
- {
2006
- "name": "200 OK",
2007
- "originalRequest": {
2008
- "method": "GET",
2009
- "description": "GET /api/v1/products/:id\napi/v1/products#show\nRoute: api_v1_product",
2010
- "header": [
2011
- {
2012
- "key": "Accept",
2013
- "value": "application/json"
2014
- }
2015
- ],
2016
- "url": {
2017
- "raw": "{{base_url}}/api/v1/products/3",
2018
- "host": [
2019
- "{{base_url}}"
2020
- ],
2021
- "path": [
2022
- "api",
2023
- "v1",
2024
- "products",
2025
- "3"
2026
- ]
2027
- },
2028
- "auth": {
2029
- "type": "noauth"
2030
- }
2031
- },
2032
- "status": "OK",
2033
- "code": 200,
2034
- "_postman_previewlanguage": "json",
2035
- "header": [
2036
- {
2037
- "key": "content-type",
2038
- "value": "application/json; charset=utf-8"
2039
- }
2040
- ],
2041
- "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}"
2042
- },
2043
- {
2044
- "name": "404 Not Found",
2045
- "originalRequest": {
2046
- "method": "GET",
2047
- "description": "GET /api/v1/products/:id\napi/v1/products#show\nRoute: api_v1_product",
2048
- "header": [
2049
- {
2050
- "key": "Accept",
2051
- "value": "application/json"
2052
- }
2053
- ],
2054
- "url": {
2055
- "raw": "{{base_url}}/api/v1/products/999",
2056
- "host": [
2057
- "{{base_url}}"
2058
- ],
2059
- "path": [
2060
- "api",
2061
- "v1",
2062
- "products",
2063
- "999"
2064
- ]
2065
- },
2066
- "auth": {
2067
- "type": "noauth"
2068
- }
2069
- },
2070
- "status": "Not Found",
2071
- "code": 404,
2072
- "_postman_previewlanguage": "json",
2073
- "header": [
2074
- {
2075
- "key": "content-type",
2076
- "value": "application/json; charset=utf-8"
2077
- }
2078
- ],
2079
- "body": "{\n \"error\": \"Not Found\"\n}"
2080
- }
2081
- ]
2082
- },
2083
- {
2084
- "name": "Search Products",
2085
- "request": {
2086
- "method": "GET",
2087
- "description": "GET /api/v1/products/search\napi/v1/products#search\nRoute: search_api_v1_products",
2088
- "header": [
2089
- {
2090
- "key": "Accept",
2091
- "value": "application/json"
2092
- }
2093
- ],
2094
- "url": {
2095
- "raw": "{{base_url}}/api/v1/products/search?q=mug",
2096
- "host": [
2097
- "{{base_url}}"
2098
- ],
2099
- "path": [
2100
- "api",
2101
- "v1",
2102
- "products",
2103
- "search"
2104
- ],
2105
- "query": [
2106
- {
2107
- "key": "q",
2108
- "value": "mug"
2109
- }
2110
- ]
2111
- },
2112
- "auth": {
2113
- "type": "noauth"
2114
- }
2115
- },
2116
- "response": [
2117
- {
2118
- "name": "200 OK",
2119
- "originalRequest": {
2120
- "method": "GET",
2121
- "description": "GET /api/v1/products/search\napi/v1/products#search\nRoute: search_api_v1_products",
2122
- "header": [
2123
- {
2124
- "key": "Accept",
2125
- "value": "application/json"
2126
- }
2127
- ],
2128
- "url": {
2129
- "raw": "{{base_url}}/api/v1/products/search?q=mug",
2130
- "host": [
2131
- "{{base_url}}"
2132
- ],
2133
- "path": [
2134
- "api",
2135
- "v1",
2136
- "products",
2137
- "search"
2138
- ],
2139
- "query": [
2140
- {
2141
- "key": "q",
2142
- "value": "mug"
2143
- }
2144
- ]
2145
- },
2146
- "auth": {
2147
- "type": "noauth"
2148
- }
2149
- },
2150
- "status": "OK",
2151
- "code": 200,
2152
- "_postman_previewlanguage": "json",
2153
- "header": [
2154
- {
2155
- "key": "content-type",
2156
- "value": "application/json; charset=utf-8"
2157
- }
2158
- ],
2159
- "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}"
2160
- },
2161
- {
2162
- "name": "400 Bad Request",
2163
- "originalRequest": {
2164
- "method": "GET",
2165
- "description": "GET /api/v1/products/search\napi/v1/products#search\nRoute: search_api_v1_products",
2166
- "header": [
2167
- {
2168
- "key": "Accept",
2169
- "value": "application/json"
2170
- }
2171
- ],
2172
- "url": {
2173
- "raw": "{{base_url}}/api/v1/products/search",
2174
- "host": [
2175
- "{{base_url}}"
2176
- ],
2177
- "path": [
2178
- "api",
2179
- "v1",
2180
- "products",
2181
- "search"
2182
- ]
2183
- },
2184
- "auth": {
2185
- "type": "noauth"
2186
- }
2187
- },
2188
- "status": "Bad Request",
2189
- "code": 400,
2190
- "_postman_previewlanguage": "json",
2191
- "header": [
2192
- {
2193
- "key": "content-type",
2194
- "value": "application/json; charset=utf-8"
2195
- }
2196
- ],
2197
- "body": "{\n \"error\": \"q is required\"\n}"
2198
- }
2199
- ]
2200
- }
2201
- ]
2202
- },
2203
- {
2204
- "name": "Profiles",
2205
- "item": [
2206
- {
2207
- "name": "Get Profile",
2208
- "request": {
2209
- "method": "GET",
2210
- "description": "GET /api/v1/profile\napi/v1/profiles#show\nRoute: api_v1_profile",
2211
- "header": [
2212
- {
2213
- "key": "Accept",
2214
- "value": "application/json"
2215
- }
2216
- ],
2217
- "url": {
2218
- "raw": "{{base_url}}/api/v1/profile",
2219
- "host": [
2220
- "{{base_url}}"
2221
- ],
2222
- "path": [
2223
- "api",
2224
- "v1",
2225
- "profile"
2226
- ]
2227
- }
2228
- },
2229
- "response": [
2230
- {
2231
- "name": "200 OK",
2232
- "originalRequest": {
2233
- "method": "GET",
2234
- "description": "GET /api/v1/profile\napi/v1/profiles#show\nRoute: api_v1_profile",
2235
- "header": [
2236
- {
2237
- "key": "Accept",
2238
- "value": "application/json"
2239
- }
2240
- ],
2241
- "url": {
2242
- "raw": "{{base_url}}/api/v1/profile",
2243
- "host": [
2244
- "{{base_url}}"
2245
- ],
2246
- "path": [
2247
- "api",
2248
- "v1",
2249
- "profile"
2250
- ]
2251
- }
2252
- },
2253
- "status": "OK",
2254
- "code": 200,
2255
- "_postman_previewlanguage": "json",
2256
- "header": [
2257
- {
2258
- "key": "content-type",
2259
- "value": "application/json; charset=utf-8"
2260
- }
2261
- ],
2262
- "body": "{\n \"id\": 1,\n \"name\": \"Ada Lovelace\",\n \"email\": \"ada@example.com\",\n \"locale\": \"en\"\n}"
2263
- },
2264
- {
2265
- "name": "401 Unauthorized",
2266
- "originalRequest": {
2267
- "method": "GET",
2268
- "description": "GET /api/v1/profile\napi/v1/profiles#show\nRoute: api_v1_profile",
2269
- "header": [
2270
- {
2271
- "key": "Accept",
2272
- "value": "application/json"
2273
- }
2274
- ],
2275
- "url": {
2276
- "raw": "{{base_url}}/api/v1/profile",
2277
- "host": [
2278
- "{{base_url}}"
2279
- ],
2280
- "path": [
2281
- "api",
2282
- "v1",
2283
- "profile"
2284
- ]
2285
- },
2286
- "auth": {
2287
- "type": "noauth"
2288
- }
2289
- },
2290
- "status": "Unauthorized",
2291
- "code": 401,
2292
- "_postman_previewlanguage": "json",
2293
- "header": [
2294
- {
2295
- "key": "content-type",
2296
- "value": "application/json; charset=utf-8"
2297
- }
2298
- ],
2299
- "body": "{\n \"error\": \"Unauthorized\"\n}"
2300
- }
2301
- ]
2302
- },
2303
- {
2304
- "name": "Update Profile",
2305
- "request": {
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
- "response": [
2340
- {
2341
- "name": "200 OK",
2342
- "originalRequest": {
2343
- "method": "PATCH",
2344
- "description": "PATCH /api/v1/profile\napi/v1/profiles#update\nAlso answers PUT.",
2345
- "header": [
2346
- {
2347
- "key": "Content-Type",
2348
- "value": "application/json"
2349
- },
2350
- {
2351
- "key": "Accept",
2352
- "value": "application/json"
2353
- }
2354
- ],
2355
- "url": {
2356
- "raw": "{{base_url}}/api/v1/profile",
2357
- "host": [
2358
- "{{base_url}}"
2359
- ],
2360
- "path": [
2361
- "api",
2362
- "v1",
2363
- "profile"
2364
- ]
2365
- },
2366
- "body": {
2367
- "mode": "raw",
2368
- "raw": "{\n \"profile\": {\n \"name\": \"Ada L.\",\n \"locale\": \"tr\"\n }\n}",
2369
- "options": {
2370
- "raw": {
2371
- "language": "json"
2372
- }
2373
- }
2374
- }
2375
- },
2376
- "status": "OK",
2377
- "code": 200,
2378
- "_postman_previewlanguage": "json",
2379
- "header": [
2380
- {
2381
- "key": "content-type",
2382
- "value": "application/json; charset=utf-8"
2383
- }
2384
- ],
2385
- "body": "{\n \"id\": 1,\n \"name\": \"Ada L.\",\n \"email\": \"ada@example.com\",\n \"locale\": \"tr\"\n}"
2386
- },
2387
- {
2388
- "name": "422 Unprocessable Content",
2389
- "originalRequest": {
2390
- "method": "PATCH",
2391
- "description": "PATCH /api/v1/profile\napi/v1/profiles#update\nAlso answers PUT.",
2392
- "header": [
2393
- {
2394
- "key": "Content-Type",
2395
- "value": "application/json"
2396
- },
2397
- {
2398
- "key": "Accept",
2399
- "value": "application/json"
2400
- }
2401
- ],
2402
- "url": {
2403
- "raw": "{{base_url}}/api/v1/profile",
2404
- "host": [
2405
- "{{base_url}}"
2406
- ],
2407
- "path": [
2408
- "api",
2409
- "v1",
2410
- "profile"
2411
- ]
2412
- },
2413
- "body": {
2414
- "mode": "raw",
2415
- "raw": "{\n \"profile\": {\n \"locale\": \"xx\"\n }\n}",
2416
- "options": {
2417
- "raw": {
2418
- "language": "json"
2419
- }
2420
- }
2421
- }
2422
- },
2423
- "status": "Unprocessable Content",
2424
- "code": 422,
2425
- "_postman_previewlanguage": "json",
2426
- "header": [
2427
- {
2428
- "key": "content-type",
2429
- "value": "application/json; charset=utf-8"
2430
- }
2431
- ],
2432
- "body": "{\n \"errors\": {\n \"locale\": [\n \"is not included in the list\"\n ]\n }\n}"
2433
- }
2434
- ]
2435
- }
2436
- ]
2437
- }
2438
- ]
2439
- },
2440
- {
2441
- "name": "V2",
2442
- "item": [
2443
- {
2444
- "name": "Products",
2445
- "item": [
2446
- {
2447
- "name": "List Products",
2448
- "request": {
2449
- "method": "GET",
2450
- "description": "GET /api/v2/products\napi/v2/products#index\nRoute: api_v2_products",
2451
- "header": [
2452
- {
2453
- "key": "Accept",
2454
- "value": "application/json"
2455
- }
2456
- ],
2457
- "url": {
2458
- "raw": "{{base_url}}/api/v2/products?cursor=eyJpZCI6Mn0",
2459
- "host": [
2460
- "{{base_url}}"
2461
- ],
2462
- "path": [
2463
- "api",
2464
- "v2",
2465
- "products"
2466
- ],
2467
- "query": [
2468
- {
2469
- "key": "cursor",
2470
- "value": "eyJpZCI6Mn0"
2471
- }
2472
- ]
2473
- },
2474
- "auth": {
2475
- "type": "noauth"
2476
- }
2477
- },
2478
- "response": [
2479
- {
2480
- "name": "200 OK",
2481
- "originalRequest": {
2482
- "method": "GET",
2483
- "description": "GET /api/v2/products\napi/v2/products#index\nRoute: api_v2_products",
2484
- "header": [
2485
- {
2486
- "key": "Accept",
2487
- "value": "application/json"
2488
- }
2489
- ],
2490
- "url": {
2491
- "raw": "{{base_url}}/api/v2/products?cursor=eyJpZCI6Mn0",
2492
- "host": [
2493
- "{{base_url}}"
2494
- ],
2495
- "path": [
2496
- "api",
2497
- "v2",
2498
- "products"
2499
- ],
2500
- "query": [
2501
- {
2502
- "key": "cursor",
2503
- "value": "eyJpZCI6Mn0"
2504
- }
2505
- ]
2506
- },
2507
- "auth": {
2508
- "type": "noauth"
2509
- }
2510
- },
2511
- "status": "OK",
2512
- "code": 200,
2513
- "_postman_previewlanguage": "json",
2514
- "header": [
2515
- {
2516
- "key": "content-type",
2517
- "value": "application/json; charset=utf-8"
2518
- }
2519
- ],
2520
- "body": "{\n \"items\": [\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 \"price\": \"24.00\"\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 \"price\": \"32.00\"\n }\n ],\n \"next_cursor\": null\n}"
2521
- }
2522
- ]
2523
- }
2524
- ]
2525
- }
2526
- ]
2527
- }
2528
- ]
2529
- }
2530
- ],
2531
- "variable": [
2532
- {
2533
- "key": "base_url",
2534
- "value": "http://localhost:3000",
2535
- "type": "string"
2536
- },
2537
- {
2538
- "key": "api_key",
2539
- "value": "",
2540
- "type": "string"
2541
- },
2542
- {
2543
- "key": "password",
2544
- "value": "",
2545
- "type": "string"
2546
- },
2547
- {
2548
- "key": "secret",
2549
- "value": "",
2550
- "type": "string"
2551
- },
2552
- {
2553
- "key": "token",
2554
- "value": "",
2555
- "type": "string"
2556
- }
2557
- ],
2558
- "auth": {
2559
- "type": "bearer",
2560
- "bearer": [
2561
- {
2562
- "key": "token",
2563
- "value": "{{token}}",
2564
- "type": "string"
2565
- }
2566
- ]
2567
- }
2568
- }