{"info":{"_postman_id":"4160bdb6-56cd-4626-a22b-8f247d90efa5","name":"theaters","description":"<html><head></head><body><p>A collection of requests for <code>/theaters</code> endpoint.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"13348269","collectionId":"4160bdb6-56cd-4626-a22b-8f247d90efa5","publishedId":"TzRa6441","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2021-05-19T22:20:31.000Z"},"item":[{"name":"Get All Theaters","id":"62139ce7-de41-49b5-911a-2155f52eb668","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{base_url}}/theaters","description":"<h1 id=\"get-all-theaters\">Get all theaters</h1>\n<h2 id=\"response\">Response</h2>\n<hr />\n<p>List of theater details where each list item contains:</p>\n<ul>\n<li><code>theater_id</code></li>\n<li><code>theater_name</code></li>\n<li><code>num_of_rows</code></li>\n<li><code>seat_per_row</code></li>\n<li><code>theater_type</code></li>\n<li><code>missing</code> A list of gap positions in the layout.</li>\n<li><code>blocked</code> A list of disabled seats.</li>\n</ul>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"4160bdb6-56cd-4626-a22b-8f247d90efa5","id":"4160bdb6-56cd-4626-a22b-8f247d90efa5","name":"theaters","type":"collection"}},"urlObject":{"path":["theaters"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[{"id":"dee1b4ee-31a6-46c0-9caf-236bd8594ae3","name":"Mock Get All Theaters","originalRequest":{"method":"GET","header":[],"url":"{{base_url}}/theaters"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"886"},{"key":"ETag","value":"W/\"376-stFg/joSIWyyegomY+cuD5Nr1Wk\""},{"key":"Date","value":"Thu, 11 Mar 2021 13:02:09 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"headers\": {\n        \"success\": 1,\n        \"message\": \"Success\"\n    },\n    \"body\": [\n        {\n            \"theater_id\": 15,\n            \"theater_name\": \"C\",\n            \"num_of_rows\": 10,\n            \"seats_per_row\": 20,\n            \"theater_type\": \"normal\",\n            \"missing\": [\n                {\n                    \"seat_row\": \"A\",\n                    \"seat_number\": 11\n                },\n                {\n                    \"seat_row\": \"B\",\n                    \"seat_number\": 0\n                }\n            ],\n            \"blocked\": [\n                {\n                    \"seat_row\": \"C\",\n                    \"seat_number\": 23\n                },\n                {\n                    \"seat_row\": \"C\",\n                    \"seat_number\": 22\n                },\n                {\n                    \"seat_row\": \"D\",\n                    \"seat_number\": 23\n                },\n                {\n                    \"seat_row\": \"D\",\n                    \"seat_number\": 22\n                }\n            ]\n        },\n        {\n            \"theater_id\": 16,\n            \"theater_name\": \"D\",\n            \"num_of_rows\": 5,\n            \"seats_per_row\": 5,\n            \"theater_type\": \"royal\",\n            \"missing\": [\n                {\n                    \"seat_row\": \"A\",\n                    \"seat_number\": 11\n                },\n                {\n                    \"seat_row\": \"B\",\n                    \"seat_number\": 11\n                },\n                {\n                    \"seat_row\": \"C\",\n                    \"seat_number\": 11\n                },\n                {\n                    \"seat_row\": \"D\",\n                    \"seat_number\": 11\n                }\n            ],\n            \"blocked\": []\n        },\n        {\n            \"theater_id\": 22,\n            \"theater_name\": \"E\",\n            \"num_of_rows\": 10,\n            \"seats_per_row\": 2,\n            \"theater_type\": \"normal\",\n            \"missing\": [],\n            \"blocked\": [\n                {\n                    \"seat_row\": \"A\",\n                    \"seat_number\": 1\n                },\n                {\n                    \"seat_row\": \"B\",\n                    \"seat_number\": 2\n                },\n                {\n                    \"seat_row\": \"C\",\n                    \"seat_number\": 1\n                },\n                {\n                    \"seat_row\": \"D\",\n                    \"seat_number\": 2\n                }\n            ]\n        }\n    ]\n}"}],"_postman_id":"62139ce7-de41-49b5-911a-2155f52eb668"},{"name":"Get Theater By Id","id":"e73ceaa1-d7c6-471f-8461-b12dd36e38d3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{base_url}}/theaters/id/16","description":"<h1 id=\"get-a-theater-by-id\">Get a theater by id</h1>\n<h2 id=\"response\">Response</h2>\n<hr />\n<ul>\n<li><code>theater_id</code></li>\n<li><code>theater_name</code></li>\n<li><code>num_of_rows</code></li>\n<li><code>seat_per_row</code></li>\n<li><code>theater_type</code></li>\n<li><code>missing</code> A list of gap positions in the layout.</li>\n<li><code>blocked</code> A list of disable seats.</li>\n</ul>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"4160bdb6-56cd-4626-a22b-8f247d90efa5","id":"4160bdb6-56cd-4626-a22b-8f247d90efa5","name":"theaters","type":"collection"}},"urlObject":{"path":["theaters","id","16"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[{"id":"9c868322-e085-4374-aae3-d3d80190b1ab","name":"Mock Get Theater By Id","originalRequest":{"method":"GET","header":[],"url":"{{base_url}}/theaters/id/16"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"307"},{"key":"ETag","value":"W/\"133-tcsGEu8jwj1/8MVQnYHdHEUa0lQ\""},{"key":"Date","value":"Thu, 11 Mar 2021 13:02:26 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"headers\": {\n        \"success\": 1,\n        \"message\": \"Success\"\n    },\n    \"body\": {\n        \"theater_id\": 16,\n        \"theater_name\": \"D\",\n        \"num_of_rows\": 5,\n        \"seats_per_row\": 5,\n        \"theater_type\": \"royal\",\n        \"missing\": [\n            {\n                \"seat_row\": \"A\",\n                \"seat_number\": 11\n            },\n            {\n                \"seat_row\": \"B\",\n                \"seat_number\": 11\n            },\n            {\n                \"seat_row\": \"C\",\n                \"seat_number\": 11\n            },\n            {\n                \"seat_row\": \"D\",\n                \"seat_number\": 11\n            }\n        ],\n        \"blocked\": []\n    }\n}"}],"_postman_id":"e73ceaa1-d7c6-471f-8461-b12dd36e38d3"},{"name":"Add a theater","id":"d0647388-88af-47c3-bb3e-f0a8c228cce6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"theater_name\":\"E\",\r\n    \"seats_per_row\":2,\r\n    \"num_of_rows\":10,\r\n    \"theater_type\":\"normal\",\r\n    \"blocked\":[\"A-1\",\"B-2\",\"C-1\",\"D-2\"]\r\n}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/theaters","description":"<h1 id=\"add-a-new-theater\">Add a new theater</h1>\n<hr />\n<p>These parameters have special rules:</p>\n<h3 id=\"theater-type\">Theater Type</h3>\n<p><code>theater_type</code> can take one of two values:</p>\n<ul>\n<li><code>royal</code> for vip shows.</li>\n<li><code>normal</code> for regular shows.</li>\n</ul>\n<h3 id=\"theater-name\">Theater Name</h3>\n<ul>\n<li>Be a single letter string.</li>\n</ul>\n<h3 id=\"blocked-seats-optional\">Blocked Seats [OPTIONAL]</h3>\n<p>if <code>blocked</code> parameter is specified it should:</p>\n<ul>\n<li>Be a list.</li>\n<li>Each item should be a string.</li>\n<li>Each item should have format \"[seat_row]-[seat_number]\"</li>\n</ul>\n<h3 id=\"missing-seats-optional\">Missing Seats [OPTIONAL]</h3>\n<h2 id=\"if-missing-parameter-is-specified-it-should----be-a-list----each-item-should-be-a-string----each-item-should-have-format-seat_row-seat_number\">if <code>missing</code> parameter is specified it should:\n - Be a list.\n - Each item should be a string.\n - Each item should have format \"[seat_row]-[seat_number]\"</h2>\n<h2 id=\"response\">Response</h2>\n<hr />\n<ul>\n<li><code>theater_id</code> New theater's id.</li>\n<li><code>affected_rows</code> Should be 1.</li>\n</ul>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"4160bdb6-56cd-4626-a22b-8f247d90efa5","id":"4160bdb6-56cd-4626-a22b-8f247d90efa5","name":"theaters","type":"collection"}},"urlObject":{"path":["theaters"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"d0647388-88af-47c3-bb3e-f0a8c228cce6"},{"name":"Update a theater","id":"202ca1d6-9f97-4cb7-87c4-f4a040a04461","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n    \"theater_type\":\"royal\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/theaters/id/15","description":"<h1 id=\"update-details-of-a-theater\">Update details of a theater</h1>\n<h2 id=\"response\">Response</h2>\n<hr />\n<ul>\n<li>None</li></ul>\n\n<p><em><strong>Note</strong></em> : <code>message</code> header indicates result.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"4160bdb6-56cd-4626-a22b-8f247d90efa5","id":"4160bdb6-56cd-4626-a22b-8f247d90efa5","name":"theaters","type":"collection"}},"urlObject":{"path":["theaters","id","15"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"202ca1d6-9f97-4cb7-87c4-f4a040a04461"},{"name":"Delete a theater","id":"98df9700-1b2d-4136-914c-7cad699b42e3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"{{base_url}}/theaters/id/15","description":"<h1 id=\"delete-a-booking\">Delete a booking</h1>\n<h2 id=\"response\">Response</h2>\n<hr />\n<ul>\n<li>None</li></ul>\n\n<p><em><strong>Note</strong></em> : <code>message</code> header indicates result.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"4160bdb6-56cd-4626-a22b-8f247d90efa5","id":"4160bdb6-56cd-4626-a22b-8f247d90efa5","name":"theaters","type":"collection"}},"urlObject":{"path":["theaters","id","15"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[{"id":"361bf093-6f50-4c89-ab17-34f944d4e940","name":"Mock Delete a theater","originalRequest":{"method":"DELETE","header":[],"url":"{{base_url}}/theaters/id/15"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"72"},{"key":"ETag","value":"W/\"48-3pw1qSyBLqkQfmvuK0DO0EjjLAw\""},{"key":"Date","value":"Thu, 11 Mar 2021 12:10:51 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"headers\": {\n        \"success\": 1,\n        \"message\": \"Theater has been deleted\"\n    },\n    \"body\": {}\n}"}],"_postman_id":"98df9700-1b2d-4136-914c-7cad699b42e3"}],"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]}},"event":[{"listen":"prerequest","script":{"id":"2c7b715d-c344-4a5b-8d95-b7194b7f7ba6","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"2a088244-0e51-4ceb-bdd7-a59660a9ea42","type":"text/javascript","exec":[""]}}]}