{"info":{"_postman_id":"6e26ca52-821a-4b05-afc2-ca2b02405127","name":"Freddy's Artisanal Halloween Candy Shop","description":"<html><head></head><body><p>The Freddy's Artisanal Halloween Candy Shop API provides a digital interface for accessing the shop's extensive features and data, including user authentication, dashboard analytics, and order management. This API, designed with OpenAPI 3.0.1 specifications, enables developers to seamlessly integrate with Freddy's online platform, facilitating operations like login authentication, token refreshment, dashboard data retrieval, and comprehensive orders handling.</p>\n<p>With endpoints meticulously documented for clarity and ease of use, this API is the gateway to automating and enhancing the ecommerce capabilities of Freddy's Artisanal Halloween Candy Shop, making it an essential tool for developers aiming to interact with the shop's system programmatically.</p>\n<p>Contact Support:</p>\n<ul>\n<li>name: CandyShop support</li>\n<li>email: <a href=\"https://mailto:Support.CandyShop@freddy.codesubmit.io\">Support.CandyShop@freddy.codesubmit.io</a></li>\n<li>url: <a href=\"http://freddy.codesubmit.io/support\">http://freddy.codesubmit.io/support</a></li>\n</ul>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"15482145","collectionId":"6e26ca52-821a-4b05-afc2-ca2b02405127","publishedId":"TzRLmqYY","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2021-05-02T16:57:58.000Z"},"item":[{"name":"Login","id":"cd1806b9-16cd-46d1-87f5-e4b477035837","protocolProfileBehavior":{"disableBodyPruning":true,"disabledSystemHeaders":{"content-type":true}},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"username\": \"sample_username\",\n    \"password\": \"sample_password\"\n}","options":{"raw":{"language":"json"}}},"url":"https://freddy.codesubmit.io/login","description":"<h1 id=\"login-endpoint\">Login endpoint</h1>\n<p>Use the Login endpoint to generate an <code>access_token</code> and a <code>refresh_token</code> for authorization of other endpoints.</p>\n<p>The <code>access_tokens</code> are valid for 15 minutes. You can use the <code>refresh_token</code> (valid for 30 days) generated earlier to renew the <code>access_token</code>. See <a href=\"#refresh-endpoint\">POST Refresh token</a> for more details.</p>\n<p><strong>Note</strong>: These are <code>JWT</code> tokens. (JSON web tokens)</p>\n<p> </p>\n<h2 id=\"generating-access-tokens\">Generating Access tokens</h2>\n<p>Enter your <code>username</code> and <code>password</code> in the request <em>body</em> as a <code>JSON</code> object to generate the tokens.</p>\n<p>To avoid hassles with wrong credentials, ensure to enter accurate <code>username</code> and <code>password</code> as <code>JSON</code> object. Otherwise, the server will throw an error.</p>\n<p><strong>Method</strong>: <code>POST</code></p>\n<p><strong>Endpoint</strong>: <code>https://freddy.codesubmit.io/login</code></p>\n<p><strong>Request Header</strong>: <code>Content_Type:application/json</code>. (login endpoint only accepts application/json)</p>\n<p> </p>\n<h2 id=\"login_parameters\">Login_Parameters</h2>\n<p> </p>\n<h4 id=\"login-request-header_parameters\">Login Request Header_parameters</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header name</th>\n<th>Description</th>\n<th>Values</th>\n<th>Required</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Content-Type</td>\n<td>Format of the request header</td>\n<td>application/json</td>\n<td>Required</td>\n</tr>\n</tbody>\n</table>\n</div><p> </p>\n<h4 id=\"login-request-body_parameters\">Login Request Body_parameters</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Element</th>\n<th>Description</th>\n<th>Type</th>\n<th>Required</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>username</td>\n<td>Your username</td>\n<td>string</td>\n<td>Required</td>\n</tr>\n<tr>\n<td>password</td>\n<td>Your password</td>\n<td>string</td>\n<td>Required</td>\n</tr>\n</tbody>\n</table>\n</div><p> </p>\n<h4 id=\"login-response-body_parameters\">Login Response Body_parameters</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Element</th>\n<th>Description</th>\n<th>Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>access_token</td>\n<td>Generated Access token</td>\n<td>string</td>\n</tr>\n<tr>\n<td>refresh_token</td>\n<td>Generated Refresh token</td>\n<td>string</td>\n</tr>\n</tbody>\n</table>\n</div><p> </p>\n<h3 id=\"login-status-codes\">Login Status Codes</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Code</th>\n<th>Description</th>\n<th>API Specific description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n<td>JSON response object with access and refresh tokens</td>\n</tr>\n<tr>\n<td>400</td>\n<td>BAD REQUEST</td>\n<td>The browser (or proxy) sent a request that this server could not understand.</td>\n</tr>\n<tr>\n<td>401</td>\n<td>UNAUTHORIZED</td>\n<td>Bad Credentials</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n","urlObject":{"path":["login"],"host":["https://freddy.codesubmit.io"],"query":[],"variable":[]}},"response":[{"id":"4c406645-c8d8-487b-b9b1-63a1ed6422e6","name":"OK","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"username\": \"sampleman\",\n    \"password\": \"samplepassword\"\n}"},"url":"https://freddy.codesubmit.io/login"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n \"access_token\": \"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MjAwMTQ0MDUsIm5iZiI6MTYyMDAxNDQwNSwianRpIjoiOGEyOGJlMjQtY2M3NS00NjQ2LTkwYTYtNTgyOGM0MzhlNDUxIiwiZXhwIjoxNjIwMDE1MzA1LCJpZGVudGl0eSI6ImZyZWRkeSIsImZyZXNoIjpmYWxzZSwidHlwZSI6ImFjY2VzcyJ9.YzeRutCBuY9yingM7v5Ddr9xu9CSPW7BgqAaaoJOUh0\",\n \"refresh_token\": \"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MjAwMTQ0MDUsIm5iZiI6MTYyMDAxNDAwNSwianRpIjoiOGEyOGJlMjQtY2M3NS00NjQ2LTkwYTYtNTgyOGM0MzhlNDUxIiwiZXhwIjoxNjIwMDE1MzA1LCJpZGVudGl0eSI6ImZyZWRkeSIsImZyZXNoIjpmYWxzZSwidHlwZSI6ImFjY2VzcyJ9.YzeRutCBuY9yingM7v5Ddr9xu9CSPW7BgqAaaoGOUf4\"\n}"},{"id":"6278b3a5-83ae-4b73-9d0e-08fe05874fa4","name":"Bad Request","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"username\": \"sampleman\",\n    \"password\": \"samplepassword\n}"},"url":"https://freddy.codesubmit.io/login"},"status":"Bad Request","code":400,"_postman_previewlanguage":"text","header":[{"key":"Content-Type","value":"text/plain"}],"cookie":[],"responseTime":null,"body":"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2 Final//EN\">\r\n<title>400 Bad Request</title>\r\n<h1>Bad Request</h1>\r\n<p>The browser (or proxy) sent a request that this server could not understand.</p>"},{"id":"36400ebb-0879-407d-a334-8b7a40d4244d","name":"Bad Credentials","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"username\": \"sampliman\",\n    \"password\": \"samplipassword\"\n}"},"url":"https://freddy.codesubmit.io/login"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"text","header":[{"key":"Content-Type","value":"text/plain"}],"cookie":[],"responseTime":null,"body":"{\r\n    \"msg\":\"Bad Credentials\"\r\n}"}],"_postman_id":"cd1806b9-16cd-46d1-87f5-e4b477035837"},{"name":"Refresh Token","id":"f351b580-268e-4b88-93cc-a487b20904ab","request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"url":"https://freddy.codesubmit.io/refresh","description":"<h1 id=\"refresh-endpoint\">Refresh Endpoint</h1>\n<p>Use the refresh endpoint to request a new <code>access_token</code> using the active <code>refresh_token</code> generated earlier.</p>\n<p>The <code>refresh_token</code>, once generated is valid for 30 days</p>\n<h2 id=\"refreshing-the-token\">Refreshing the token</h2>\n<p>To refresh the <code>access_token</code> provide an active <code>refresh_token</code> in the authorization <em>header</em>.</p>\n<p><strong>Method</strong>: <code>POST</code></p>\n<p><strong>Endpoint</strong>: <code>https://freddy.codesubmit.io/refresh</code></p>\n<p><strong>Request Header</strong>: <code>Authorization: Bearer &lt;refresh_token&gt;</code></p>\n<p> </p>\n<h2 id=\"refresh_parameters\">Refresh_Parameters</h2>\n<p> </p>\n<h4 id=\"refresh-request-header_parameters\">Refresh Request Header_parameters</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header name</th>\n<th>Description</th>\n<th>Required</th>\n<th>Values</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Bearer</td>\n<td>Refresh token to receive a new <code>access_token</code></td>\n<td>Required</td>\n<td><code>refresh_token</code></td>\n</tr>\n</tbody>\n</table>\n</div><p> </p>\n<h4 id=\"refresh-response-body_parameters\">Refresh Response Body_parameters</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Element</th>\n<th>Description</th>\n<th>Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>access_token</td>\n<td>The refreshed Access token</td>\n<td>string</td>\n</tr>\n</tbody>\n</table>\n</div><p> </p>\n<h2 id=\"refresh-status-codes\">Refresh Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Code</th>\n<th>Description</th>\n<th>API Specific</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n<td>JSON response object with the new access_token</td>\n</tr>\n<tr>\n<td>400</td>\n<td>BAD REQUEST</td>\n<td>The browser (or proxy) sent a request that this server could not understand.</td>\n</tr>\n<tr>\n<td>401</td>\n<td>UNAUTHORIZED</td>\n<td>Token has Expired</td>\n</tr>\n<tr>\n<td></td>\n<td></td>\n<td>Missing Authorization Header</td>\n</tr>\n<tr>\n<td>422</td>\n<td>UNPROCESSABLE ENTITY</td>\n<td>Not enough segments</td>\n</tr>\n<tr>\n<td></td>\n<td></td>\n<td>Only refresh tokens are allowed</td>\n</tr>\n<tr>\n<td></td>\n<td></td>\n<td>Signature verification Failed</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["refresh"],"host":["https://freddy.codesubmit.io"],"query":[],"variable":[]}},"response":[{"id":"7d683770-68a1-4cd4-b6ff-41f25319ddc5","name":"OK","originalRequest":{"method":"POST","header":[{"description":"Added as a part of security scheme: bearer","key":"Authorization","value":"Bearer <token>"}],"url":"https://freddy.codesubmit.io/refresh"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n \"access_token\": \"eyG9eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MjAwMTQ0MDUsIm5iZiI6MTYyMDAxNDQwNSwianRpIjoiOGEyOGJlMjQtY2M3NS00NjQ2LTkwYTYtNTgyOGM0MzhlNDUxIiwiZXhwIjoxNjIwMDE1MzA1LCJpZGVudGl0eSI6ImZyZWRkeSIsImZyZXNoIjpmYWxzZSwidHlwZSI6ImFjY2VzcyJ9.YzeRutCBuY9yingM7v5Ddr9xu9CSPW7BgqAaaoJOUh0\"\n}"},{"id":"19b65a0e-94b4-49e5-a607-ffefbc93ebfa","name":"Token Expired","originalRequest":{"method":"POST","header":[{"description":"Added as a part of security scheme: bearer","key":"Authorization","value":"Bearer <token>"}],"url":"https://freddy.codesubmit.io/refresh"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"text/plain"}],"cookie":[],"responseTime":null,"body":"{\n    \"msg\": \"Token has expired\"\n}"},{"id":"f34f2b1b-995b-4c3a-a3d2-33675fe85ec9","name":"Bad Request","originalRequest":{"method":"POST","header":[{"description":"Added as a part of security scheme: bearer","key":"Authorization","value":"Bearer <token>"}],"url":"https://freddy.codesubmit.io/refresh"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"html","header":[{"key":"Content-Type","value":"text/plain"}],"cookie":[],"responseTime":null,"body":"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2 Final//EN\">\n<title>400 Bad Request</title>\n<h1>Bad Request</h1>\n<p>The browser (or proxy) sent a request that this server could not understand.</p>"},{"id":"795a4b09-832a-4b81-8a6d-9eb4078a8259","name":"Missing Authorization Header","originalRequest":{"method":"POST","header":[{"description":"Added as a part of security scheme: bearer","key":"Authorization","value":"Bearer <token>","disabled":true}],"url":"https://freddy.codesubmit.io/refresh"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"text/plain"}],"cookie":[],"responseTime":null,"body":"{\n    \"msg\": \"Missing Authorization Header\"\n}"},{"id":"daf8289e-3463-4f8c-a0f8-a449df03ad25","name":"Signature verification failed","originalRequest":{"method":"POST","header":[{"description":"Added as a part of security scheme: bearer","key":"Authorization","value":"Bearer <token>"}],"url":"https://freddy.codesubmit.io/refresh"},"status":"Unprocessable Entity (WebDAV) (RFC 4918)","code":422,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"text/plain"}],"cookie":[],"responseTime":null,"body":"{\n    \"msg\": \"signature verification failed\"\n}"},{"id":"1b32b098-b7aa-454c-a5df-db9ca0afd1da","name":"Not enough segments","originalRequest":{"method":"POST","header":[{"description":"Added as a part of security scheme: bearer","key":"Authorization","value":"Bearer <token>"}],"url":"https://freddy.codesubmit.io/refresh"},"status":"Unprocessable Entity (WebDAV) (RFC 4918)","code":422,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"text/plain"}],"cookie":[],"responseTime":null,"body":"{\n    \"msg\": \"Not enough segments\"\n}"}],"_postman_id":"f351b580-268e-4b88-93cc-a487b20904ab"},{"name":"Dashboard data","id":"4c686dfc-a747-40dd-9474-667e8b6ce983","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"https://freddy.codesubmit.io/dashboard","description":"<h1 id=\"dashboard-endpoint\">Dashboard Endpoint</h1>\n<p>Use the dashboard endpoint to retrieve the entire dashboard data. This includes the data of revenue earned and units sold for the best sellers, sales over a week, and sales over a year.</p>\n<h2 id=\"retrieving-dashboard-data\">Retrieving dashboard data</h2>\n<p>To retrieve the dashboard data, provide the <code>access_token</code> in the authorization <em>header</em>.</p>\n<p><strong>Method</strong>: <code>GET</code></p>\n<p><strong>Endpoint</strong>: <code>https://freddy.codesubmit.io/dashboard</code></p>\n<p><strong>Request Header</strong>: <code>Authorization: Bearer &lt;access_token&gt;</code></p>\n<h2 id=\"dashboard_parameters\">Dashboard_Parameters</h2>\n<p> </p>\n<h4 id=\"dashboard-request-header_parameters\">Dashboard Request Header_parameters</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header name</th>\n<th>Description</th>\n<th>Required</th>\n<th>Values</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Bearer</td>\n<td>Access token</td>\n<td>Required</td>\n<td><code>access_token</code></td>\n</tr>\n</tbody>\n</table>\n</div><p> </p>\n<h4 id=\"dashboard-response-body_parameters\">Dashboard Response body_parameters</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Element</th>\n<th></th>\n<th></th>\n<th>Description</th>\n<th>Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>dashboard</td>\n<td></td>\n<td></td>\n<td>Dashboard object</td>\n<td>object</td>\n</tr>\n<tr>\n<td>bestseller</td>\n<td></td>\n<td></td>\n<td>Array of bestseller product objects</td>\n<td>array</td>\n</tr>\n<tr>\n<td></td>\n<td>product</td>\n<td></td>\n<td>Product details object</td>\n<td>object</td>\n</tr>\n<tr>\n<td></td>\n<td></td>\n<td>id</td>\n<td>Product ID</td>\n<td>string</td>\n</tr>\n<tr>\n<td></td>\n<td></td>\n<td>image</td>\n<td>Product image URL</td>\n<td>string</td>\n</tr>\n<tr>\n<td></td>\n<td></td>\n<td>name</td>\n<td>Name of the product</td>\n<td>string</td>\n</tr>\n<tr>\n<td></td>\n<td>revenue</td>\n<td></td>\n<td>Total revenue earned by the product</td>\n<td>integer</td>\n</tr>\n<tr>\n<td></td>\n<td>unit</td>\n<td></td>\n<td>Total units of the products sold</td>\n<td>integer</td>\n</tr>\n<tr>\n<td>sales_over_time_week</td>\n<td></td>\n<td></td>\n<td>Total sales over a week object</td>\n<td>object</td>\n</tr>\n<tr>\n<td></td>\n<td>day</td>\n<td></td>\n<td>Day of the week</td>\n<td>string</td>\n</tr>\n<tr>\n<td></td>\n<td></td>\n<td>orders</td>\n<td>Total orders for the day</td>\n<td>integer</td>\n</tr>\n<tr>\n<td></td>\n<td></td>\n<td>total</td>\n<td>Total revenue for the day</td>\n<td>integer</td>\n</tr>\n<tr>\n<td>sales_over_time_year</td>\n<td></td>\n<td></td>\n<td>Total sales over a year object</td>\n<td>object</td>\n</tr>\n<tr>\n<td></td>\n<td>month</td>\n<td></td>\n<td>A month in a year</td>\n<td>string</td>\n</tr>\n<tr>\n<td></td>\n<td></td>\n<td>orders</td>\n<td>Total orders for the month</td>\n<td>integer</td>\n</tr>\n<tr>\n<td></td>\n<td></td>\n<td>total</td>\n<td>Total revenue for the month</td>\n<td>integer</td>\n</tr>\n</tbody>\n</table>\n</div><p> </p>\n<h2 id=\"dashboard-status-codes\">Dashboard Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Code</th>\n<th>Description</th>\n<th>API Specific description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n<td>JSON response object with Dashboard data</td>\n</tr>\n<tr>\n<td>400</td>\n<td>BAD REQUEST</td>\n<td>The browser (or proxy) sent a request that this server could not understand.</td>\n</tr>\n<tr>\n<td>401</td>\n<td>UNAUTHORIZED</td>\n<td>Token has Expired</td>\n</tr>\n<tr>\n<td>422</td>\n<td>UNPROCESSABLE ENTITY</td>\n<td>Not enough segments</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["dashboard"],"host":["https://freddy.codesubmit.io"],"query":[],"variable":[]}},"response":[{"id":"5afe4c90-5a5c-4f14-8404-683d0b50daee","name":"OK","originalRequest":{"method":"GET","header":[{"description":"Added as a part of security scheme: bearer","key":"Authorization","value":"Bearer <token>"}],"url":"https://freddy.codesubmit.io/dashboard"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n \"bestseller\": [\n  {\n   \"product\": {\n    \"id\": \"sint\",\n    \"image\": \"Ut dolor\",\n    \"name\": \"in ut \"\n   },\n   \"revenue\": 24656616,\n   \"units\": -42065843\n  },\n  {\n   \"product\": {\n    \"id\": \"dolore aute\",\n    \"image\": \"Duis pariatur est dolor\",\n    \"name\": \"mollit Lorem fugia\"\n   },\n   \"revenue\": -32356412,\n   \"units\": -97142599\n  }\n ],\n \"sales_over_time_week\": {\n  \"1\": {\n   \"orders\": -22614315,\n   \"total\": -39825936\n  },\n  \"2\": {\n   \"orders\": 93399884,\n   \"total\": 14962048\n  },\n  \"3\": {\n   \"orders\": 14730116,\n   \"total\": 85399531\n  },\n  \"4\": {\n   \"orders\": 4507696,\n   \"total\": -74726058\n  },\n  \"5\": {\n   \"orders\": -53224025,\n   \"total\": -50805476\n  },\n  \"6\": {\n   \"orders\": -95029385,\n   \"total\": -57619666\n  },\n  \"7\": {\n   \"orders\": 26346535,\n   \"total\": 20662074\n  }\n },\n \"sales_over_time_year\": {\n  \"1\": {\n   \"orders\": -5953129,\n   \"total\": -35038498\n  },\n  \"2\": {\n   \"orders\": -54219977,\n   \"total\": -12954075\n  },\n  \"3\": {\n   \"orders\": 58962581,\n   \"total\": 65402151\n  },\n  \"4\": {\n   \"orders\": -31324700,\n   \"total\": 41370197\n  },\n  \"5\": {\n   \"orders\": -27409951,\n   \"total\": 20238962\n  },\n  \"6\": {\n   \"orders\": 72557023,\n   \"total\": -27207379\n  },\n  \"7\": {\n   \"orders\": 17834222,\n   \"total\": 64784848\n  },\n  \"8\": {\n   \"orders\": 63201673,\n   \"total\": 90943456\n  },\n  \"9\": {\n   \"orders\": -1361128,\n   \"total\": 61191142\n  },\n  \"10\": {\n   \"orders\": -4353160,\n   \"total\": 34575912\n  },\n  \"11\": {\n   \"orders\": 16909063,\n   \"total\": -31972959\n  },\n  \"12\": {\n   \"orders\": -84434448,\n   \"total\": 7957504\n  }\n }\n}"},{"id":"60c6f45a-0419-4f9f-b91b-5a2bf8c6cd69","name":"Bad Request","originalRequest":{"method":"GET","header":[{"description":"Added as a part of security scheme: bearer","key":"Authorization","value":"Bearer <token>"}],"url":"https://freddy.codesubmit.io/dashboard"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"html","header":[{"key":"Content-Type","value":"text/plain"}],"cookie":[],"responseTime":null,"body":"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2 Final//EN\">\n<title>400 Bad Request</title>\n<h1>Bad Request</h1>\n<p>The browser (or proxy) sent a request that this server could not understand.</p>"},{"id":"1b8d6a02-d457-45c4-bb7b-72911ae623d1","name":"Token Expired","originalRequest":{"method":"GET","header":[{"description":"Added as a part of security scheme: bearer","key":"Authorization","value":"Bearer <token>"}],"url":"https://freddy.codesubmit.io/dashboard"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"text/plain"}],"cookie":[],"responseTime":null,"body":"{\n    \"msg\": \"Token has expired\"\n}"},{"id":"64a811a3-9ef5-4b3f-916a-7ab0bd9c0fee","name":"Missing Authorization Header","originalRequest":{"method":"GET","header":[{"description":"Added as a part of security scheme: bearer","key":"Authorization","value":"Bearer <token>","disabled":true}],"url":"https://freddy.codesubmit.io/dashboard"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"text/plain"}],"cookie":[],"responseTime":null,"body":"{\n    \"msg\": \"Missing Authorization Header\"\n}"},{"id":"6a653fbb-a93e-4a0c-80f1-dded5529b877","name":"Signature verification failed","originalRequest":{"method":"GET","header":[{"description":"Added as a part of security scheme: bearer","key":"Authorization","value":"Bearer <token>"}],"url":"https://freddy.codesubmit.io/dashboard"},"status":"Unprocessable Entity (WebDAV) (RFC 4918)","code":422,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"text/plain"}],"cookie":[],"responseTime":null,"body":"{\n    \"msg\": \"signature verification failed\"\n}"},{"id":"f5069b29-692a-4cef-a0ff-c4c7edfdaa42","name":"Not enough segments","originalRequest":{"method":"GET","header":[{"description":"Added as a part of security scheme: bearer","key":"Authorization","value":"Bearer <token>"}],"url":"https://freddy.codesubmit.io/dashboard"},"status":"Unprocessable Entity (WebDAV) (RFC 4918)","code":422,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"text/plain"}],"cookie":[],"responseTime":null,"body":"{\n    \"msg\": \"Not enough segments\"\n}"}],"_postman_id":"4c686dfc-a747-40dd-9474-667e8b6ce983"},{"name":"Orders","id":"7da73dde-a999-4eb5-8ff2-978450bbddf3","request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"https://freddy.codesubmit.io/orders","description":"<h1 id=\"orders-endpoint\">Orders Endpoint</h1>\n<p>Use the Orders endpoint to retrieve all the Orders Data. This includes the data of:</p>\n<ul>\n<li>order details<ul>\n<li>id</li>\n<li>created date</li>\n<li>currency</li>\n<li>product details (id, name, image URL, quantity)</li>\n<li>order status</li>\n<li>total order value</li>\n<li>customer details (id, name, surname, email, address, avatar image URL)</li>\n</ul>\n</li>\n<li>page number</li>\n<li>total number of orders</li>\n</ul>\n<h2 id=\"retrieve-order-data\">Retrieve order data</h2>\n<p>To retrieve the Orders data, provide the <code>access_token</code> in the authorization <em>header</em>.</p>\n<p><strong>Method</strong>: <code>GET</code></p>\n<p><strong>Endpoint</strong>: <code>https://freddy.codesubmit.io/orders</code></p>\n<p><strong>Request Header</strong>: <code>Authorization: Bearer &lt;access_token&gt;</code></p>\n<h2 id=\"orders_parameters\">Orders_Parameters</h2>\n<p> </p>\n<h4 id=\"orders-request-header_parameters\">Orders Request Header_parameters</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header name</th>\n<th>Description</th>\n<th>Required</th>\n<th>Values</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Bearer</td>\n<td>Access token</td>\n<td>Required</td>\n<td><code>access_token</code></td>\n</tr>\n</tbody>\n</table>\n</div><p> </p>\n<h4 id=\"orders-request-query_parameters\">Orders Request Query_parameters</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>page</td>\n<td>Page number of Orders data to be retrieved</td>\n<td>integer</td>\n<td>Optional</td>\n<td>Default is the first page. See <a href=\"#pagination\">pagination</a> for more details</td>\n</tr>\n<tr>\n<td>q</td>\n<td>The search_term to filter the Orders data</td>\n<td>string</td>\n<td>Optional</td>\n<td>See <a href=\"#search-criteria\">search criteria</a> for more details</td>\n</tr>\n</tbody>\n</table>\n</div><p> </p>\n<h5 id=\"pagination\">Pagination</h5>\n<p>Pagination allows to retrieve the orders data of the desired page. Specify the page number to get the details of that particular page.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-math\">Total number of retrieved pages = Total number of orders / page size\n</code></pre>\n<p> </p>\n<h5 id=\"search-criteria\">Search criteria</h5>\n<p>The <code>q</code> query parameter allows to filter the Orders data only for the following elements:</p>\n<ul>\n<li>productname: returns all the orders matching with the search_term in the product name, either partially or exactly</li>\n<li>customer name: returns all the orders matching with the search_term either in <code>surname</code> or <code>name</code></li>\n<li>customer email: returns all the orders matching with the search_term either with exact email username or email domain name</li>\n</ul>\n<p> </p>\n<h4 id=\"order-response-body_parameters\">Order Response body_parameters</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Element</th>\n<th></th>\n<th></th>\n<th></th>\n<th>Description</th>\n<th>Type</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td></td>\n<td></td>\n<td></td>\n<td></td>\n<td>Orders data object</td>\n<td>object</td>\n<td></td>\n</tr>\n<tr>\n<td>orders</td>\n<td></td>\n<td></td>\n<td></td>\n<td>Array of orders objects</td>\n<td>array</td>\n<td></td>\n</tr>\n<tr>\n<td></td>\n<td>created_at</td>\n<td></td>\n<td></td>\n<td>Date &amp; Time at which order was created</td>\n<td>string</td>\n<td>Format is yyyy-mm-ddThh:mm:ss.mmm</td>\n</tr>\n<tr>\n<td></td>\n<td>Currency</td>\n<td></td>\n<td></td>\n<td>Symbol of Currency used for the order</td>\n<td>string</td>\n<td>default is USD ($)</td>\n</tr>\n<tr>\n<td></td>\n<td>Customer</td>\n<td></td>\n<td></td>\n<td>Customer details object</td>\n<td>object</td>\n<td></td>\n</tr>\n<tr>\n<td></td>\n<td></td>\n<td>address</td>\n<td></td>\n<td>Customer address object</td>\n<td>object</td>\n<td></td>\n</tr>\n<tr>\n<td></td>\n<td></td>\n<td></td>\n<td>city</td>\n<td>Customer's city</td>\n<td>string</td>\n<td></td>\n</tr>\n<tr>\n<td></td>\n<td></td>\n<td></td>\n<td>street</td>\n<td>Customer's street</td>\n<td>string</td>\n<td></td>\n</tr>\n<tr>\n<td></td>\n<td></td>\n<td></td>\n<td>zipcode</td>\n<td>Customer's zip code</td>\n<td>string</td>\n<td></td>\n</tr>\n<tr>\n<td></td>\n<td></td>\n<td>avatar</td>\n<td></td>\n<td>Customer's display profile Image URL</td>\n<td>string</td>\n<td></td>\n</tr>\n<tr>\n<td></td>\n<td></td>\n<td>email</td>\n<td></td>\n<td>Customer's email ID</td>\n<td>string</td>\n<td></td>\n</tr>\n<tr>\n<td></td>\n<td></td>\n<td>id</td>\n<td></td>\n<td>Customer ID</td>\n<td>string</td>\n<td></td>\n</tr>\n<tr>\n<td></td>\n<td></td>\n<td>name</td>\n<td></td>\n<td>Customer's first name</td>\n<td>string</td>\n<td></td>\n</tr>\n<tr>\n<td></td>\n<td></td>\n<td>surname</td>\n<td></td>\n<td>Customer's last name</td>\n<td>string</td>\n<td></td>\n</tr>\n<tr>\n<td></td>\n<td>id</td>\n<td></td>\n<td></td>\n<td>Order ID</td>\n<td>string</td>\n<td></td>\n</tr>\n<tr>\n<td></td>\n<td>product</td>\n<td></td>\n<td></td>\n<td>Product details object</td>\n<td>object</td>\n<td></td>\n</tr>\n<tr>\n<td></td>\n<td></td>\n<td>id</td>\n<td></td>\n<td>Product ID</td>\n<td>string</td>\n<td></td>\n</tr>\n<tr>\n<td></td>\n<td></td>\n<td>image</td>\n<td></td>\n<td>Product image URL</td>\n<td>string</td>\n<td></td>\n</tr>\n<tr>\n<td></td>\n<td></td>\n<td>name</td>\n<td></td>\n<td>Name of the Product</td>\n<td>string</td>\n<td></td>\n</tr>\n<tr>\n<td></td>\n<td></td>\n<td>quantity</td>\n<td></td>\n<td>Total quantity of the products in the order</td>\n<td>integer</td>\n<td></td>\n</tr>\n<tr>\n<td></td>\n<td>status</td>\n<td></td>\n<td></td>\n<td>Status of the Order</td>\n<td>string</td>\n<td></td>\n</tr>\n<tr>\n<td></td>\n<td>total</td>\n<td></td>\n<td></td>\n<td>Total revenue from the order</td>\n<td>integer</td>\n<td></td>\n</tr>\n<tr>\n<td>page</td>\n<td></td>\n<td></td>\n<td></td>\n<td>Current page number</td>\n<td>integer</td>\n<td></td>\n</tr>\n<tr>\n<td>total</td>\n<td></td>\n<td></td>\n<td></td>\n<td>Total number of orders</td>\n<td>integer</td>\n<td></td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"orders-status-codes\">Orders Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Code</th>\n<th>Description</th>\n<th>API Specific description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n<td>JSON response object with Orders data</td>\n</tr>\n<tr>\n<td>400</td>\n<td>BAD REQUEST</td>\n<td>The browser (or proxy) sent a request that this server could not understand.</td>\n</tr>\n<tr>\n<td>401</td>\n<td>UNAUTHORIZED</td>\n<td>Token has Expired</td>\n</tr>\n<tr>\n<td>422</td>\n<td>UNPROCESSABLE ENTITY</td>\n<td>Not enough segments</td>\n</tr>\n<tr>\n<td></td>\n<td></td>\n<td>Signature verification Failed</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["orders"],"host":["https://freddy.codesubmit.io"],"query":[],"variable":[]}},"response":[{"id":"c5238e31-c276-4a5f-8695-b20a6531bd78","name":"OK","originalRequest":{"method":"GET","header":[{"description":"Added as a part of security scheme: bearer","key":"Authorization","value":"Bearer <token>"}],"url":{"raw":"https://freddy.codesubmit.io/orders?page=1&q=Marton","host":["https://freddy.codesubmit.io"],"path":["orders"],"query":[{"key":"page","value":"1"},{"key":"q","value":"Marton"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\r\n    \"orders\":[\r\n        {\r\n            \"created_at\":\"2018-01-01T00:20:55.295510\",\r\n            \"currency\":\"$\",\r\n            \"customer\":{\r\n                \"address\":{\r\n                    \"city\":\"Kirklands\",\r\n                    \"street\":\"Pelytoni\",\r\n                    \"zipcode\":\"76505\"\r\n                },\r\n                \"avatar\":\"https://api.adorable.io/avatars/256/ef914e974269a803b6123216a23613eb.png\",\r\n                \"email\":\"scorpion1971@outlook.com\",\r\n                \"id\":\"a5d478b2-b578-4ecb-8495-0feb542edd4f\",\r\n                \"name\":\"Marton\",\r\n                \"surname\":\"Schwarz\"\r\n            },\r\n            \"id\":\"7fa2dd40-44b0-26d4-1003-e5447e928158\",\r\n            \"product\":{\r\n                \"id\":\"6a1fb763-e29a-054b-2839-0fa20b7e8ddb\",\r\n                \"image\":\"https://images.unsplash.com/photo-1505678261036-a3fcc5e884ee?crop=entropy&cs=tinysrgb&fit=crop&fm=jpg&h=500&ixid=eyJhcHBfaWQiOjF9&ixlib=rb-1.2.1&q=80&w=500\",\r\n                \"name\":\"Colgate-Palmolive Juniper Berry Cocona Gum\",\r\n                \"quantity\":4\r\n            },\r\n            \"status\":\"delivered\",\r\n            \"total\":9612\r\n        }\r\n    ],\r\n    \"page\":1,\r\n    \"total\":1\r\n}"},{"id":"762dbcd1-ce61-4dd0-9671-7730b6f08a05","name":"Missing Authorization Header","originalRequest":{"method":"GET","header":[{"description":"Added as a part of security scheme: bearer","key":"Authorization","value":"Bearer <token>","disabled":true}],"url":{"raw":"https://freddy.codesubmit.io/orders?page=1&q=Marton","host":["https://freddy.codesubmit.io"],"path":["orders"],"query":[{"key":"page","value":"1"},{"key":"q","value":"Marton"}]}},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"text/plain"}],"cookie":[],"responseTime":null,"body":"{\n    \"msg\": \"Missing Authorization Header\"\n}"},{"id":"f7cdd51e-a91c-4000-8125-5a75655e10ed","name":"Bad Request","originalRequest":{"method":"GET","header":[{"description":"Added as a part of security scheme: bearer","key":"Authorization","value":"Bearer <token>"}],"url":{"raw":"https://freddy.codesubmit.io/orders?page=1&q=Martona","host":["https://freddy.codesubmit.io"],"path":["orders"],"query":[{"key":"page","value":"1"},{"key":"q","value":"Martona"}]}},"status":"Unauthorized","code":401,"_postman_previewlanguage":"html","header":[{"key":"Content-Type","value":"text/plain"}],"cookie":[],"responseTime":null,"body":"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2 Final//EN\">\n<title>400 Bad Request</title>\n<h1>Bad Request</h1>\n<p>The browser (or proxy) sent a request that this server could not understand.</p>"},{"id":"c7ab4f33-7f33-4b6d-a916-728097c9d528","name":"Token Expired","originalRequest":{"method":"GET","header":[{"description":"Added as a part of security scheme: bearer","key":"Authorization","value":"Bearer <token>"}],"url":{"raw":"https://freddy.codesubmit.io/orders?page=1&q=Marton","host":["https://freddy.codesubmit.io"],"path":["orders"],"query":[{"key":"page","value":"1"},{"key":"q","value":"Marton"}]}},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"text/plain"}],"cookie":[],"responseTime":null,"body":"{\n    \"msg\": \"Token has expired\"\n}"},{"id":"a5c1f291-0305-410b-9894-c8007f626ecc","name":"Signature verification failed","originalRequest":{"method":"GET","header":[{"description":"Added as a part of security scheme: bearer","key":"Authorization","value":"Bearer <token>"}],"url":{"raw":"https://freddy.codesubmit.io/orders?page=1&q=Marton","host":["https://freddy.codesubmit.io"],"path":["orders"],"query":[{"key":"page","value":"1"},{"key":"q","value":"Marton"}]}},"status":"Unprocessable Entity (WebDAV) (RFC 4918)","code":422,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"text/plain"}],"cookie":[],"responseTime":null,"body":"{\n    \"msg\": \"signature verification failed\"\n}"},{"id":"a415a7e6-6f66-457a-82da-7e779efdacc4","name":"Not enough segments","originalRequest":{"method":"GET","header":[{"description":"Added as a part of security scheme: bearer","key":"Authorization","value":"Bearer <token>"}],"url":{"raw":"https://freddy.codesubmit.io/orders?page=1&q=Marton","host":["https://freddy.codesubmit.io"],"path":["orders"],"query":[{"key":"page","value":"1"},{"key":"q","value":"Marton"}]}},"status":"Unprocessable Entity (WebDAV) (RFC 4918)","code":422,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"text/plain"}],"cookie":[],"responseTime":null,"body":"{\n    \"msg\": \"Not enough segments\"\n}"}],"_postman_id":"7da73dde-a999-4eb5-8ff2-978450bbddf3"}],"variable":[{"id":"796e3fc0-dbee-4d2b-8339-01a0c6ba1609","key":"baseUrl","value":"https://freddy.codesubmit.io","type":"string"}]}