{"info":{"_postman_id":"569421f0-25ab-4d4b-9cd2-bb8680e5948b","name":"[Django] - e-shop","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"22115905","collectionId":"569421f0-25ab-4d4b-9cd2-bb8680e5948b","publishedId":"2s7ZE7LPjY","public":true,"customColor":{"top-bar":"303030","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2022-09-22T15:26:39.000Z"},"item":[{"name":"Categories","item":[{"name":"/api/v1/categories","id":"98366a0d-9f37-4643-9d68-4aba6636a160","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://127.0.0.1:8000/api/v1/categories","description":"<p>Returns a list of all categories.<br />Enabled search by name for a partial match (?search=example).</p>\n","urlObject":{"protocol":"http","port":"8000","path":["api","v1","categories"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[],"_postman_id":"98366a0d-9f37-4643-9d68-4aba6636a160"},{"name":"/api/v1/categories/<int:id>","id":"b0a884b0-e92c-4a29-bcda-4071dfba48d0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://127.0.0.1:8000/api/v1/categories/1","description":"<p>Endpoint for staff users only.</p>\n","urlObject":{"protocol":"http","port":"8000","path":["api","v1","categories","1"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[],"_postman_id":"b0a884b0-e92c-4a29-bcda-4071dfba48d0"},{"name":"/api/v1/categories/new","id":"681911ca-9e69-4738-bace-e9667373162d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"TV\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:8000/api/v1/categories/new","description":"<p>Endpoint for staff users only.</p>\n","urlObject":{"protocol":"http","port":"8000","path":["api","v1","categories","new"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[],"_postman_id":"681911ca-9e69-4738-bace-e9667373162d"},{"name":"/api/v1/categories/<int:id>","id":"1210120f-8424-4677-8023-1d1a2e9f5521","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"Laptop\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:8000/api/v1/categories/1","description":"<p>Endpoint for staff users only.</p>\n","urlObject":{"protocol":"http","port":"8000","path":["api","v1","categories","1"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[],"_postman_id":"1210120f-8424-4677-8023-1d1a2e9f5521"},{"name":"/api/v1/categories/<int:id>","id":"4bbd6736-ae73-4d71-8db0-d0b00f7f2b99","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"http://127.0.0.1:8000/api/v1/categories/1","description":"<p>Endpoint for staff users only.</p>\n","urlObject":{"protocol":"http","port":"8000","path":["api","v1","categories","1"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[],"_postman_id":"4bbd6736-ae73-4d71-8db0-d0b00f7f2b99"}],"id":"8e4c6dc5-fb92-4758-a031-c8959591d581","_postman_id":"8e4c6dc5-fb92-4758-a031-c8959591d581","description":""},{"name":"Products","item":[{"name":"/api/v1/products","id":"8919a4d2-655b-4c8b-99a5-61e8af8063aa","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://127.0.0.1:8000/api/v1/products","description":"<p>Returns a list of all products.<br />Enabled filter result by \"id\"(?id=1) and \"is_in_stock\"(?is_in_stock=true) fields.<br />Enabled search by name and description for a partial match (?search=example).</p>\n","urlObject":{"protocol":"http","port":"8000","path":["api","v1","products"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[],"_postman_id":"8919a4d2-655b-4c8b-99a5-61e8af8063aa"},{"name":"/api/v1/products/<int:id>","id":"567d20a6-b932-48d2-b39b-c47fd7d4d2a0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://127.0.0.1:8000/api/v1/products/1","urlObject":{"protocol":"http","port":"8000","path":["api","v1","products","1"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[],"_postman_id":"567d20a6-b932-48d2-b39b-c47fd7d4d2a0"},{"name":"/api/v1/products/new","id":"a26e0a68-8785-4b3d-892d-04b1bc7772d3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"Xiaomi Mi8\",\r\n    \"price\": 59.45,\r\n    \"category\": 1,\r\n    \"description\": \"test\",\r\n    \"is_in_stock\": true\r\n}","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:8000/api/v1/products/new","description":"<p>Endpoint for staff users only.</p>\n","urlObject":{"protocol":"http","port":"8000","path":["api","v1","products","new"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[],"_postman_id":"a26e0a68-8785-4b3d-892d-04b1bc7772d3"},{"name":"/api/v1/products/<int:id>","id":"3f386927-0538-4272-b555-0253b46f7d49","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"Xiaomi Mi9\",\r\n    \"price\": 59.44,\r\n    \"category\": 1,\r\n    \"description\": \"test2\",\r\n    \"is_in_stock\": false\r\n}","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:8000/api/v1/products/1","description":"<p>Endpoint for staff users only.</p>\n","urlObject":{"protocol":"http","port":"8000","path":["api","v1","products","1"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[],"_postman_id":"3f386927-0538-4272-b555-0253b46f7d49"},{"name":"/api/v1/products/<int:id>","id":"62f6cd40-e7d0-40e8-b54b-bda12f661997","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"http://127.0.0.1:8000/api/v1/products/1","description":"<p>Endpoint for staff users only.</p>\n","urlObject":{"protocol":"http","port":"8000","path":["api","v1","products","1"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[],"_postman_id":"62f6cd40-e7d0-40e8-b54b-bda12f661997"}],"id":"0176becd-ef7e-4095-8436-69bd3e9ee430","_postman_id":"0176becd-ef7e-4095-8436-69bd3e9ee430","description":""},{"name":"Order statuses","item":[{"name":"/api/v1/order-statuses","id":"d30f3e2d-3e48-4c3f-af1a-f4a83c712908","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://127.0.0.1:8000/api/v1/order-statuses","description":"<p>Endpoint for staff users only.</p>\n","urlObject":{"protocol":"http","port":"8000","path":["api","v1","order-statuses"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[],"_postman_id":"d30f3e2d-3e48-4c3f-af1a-f4a83c712908"},{"name":"/api/v1/order-statuses/<int:id>","id":"f435bd3a-73b1-4935-b9c9-7627de4def98","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://127.0.0.1:8000/api/v1/order-statuses/1","description":"<p>Endpoint for staff users only.</p>\n","urlObject":{"protocol":"http","port":"8000","path":["api","v1","order-statuses","1"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[],"_postman_id":"f435bd3a-73b1-4935-b9c9-7627de4def98"},{"name":"/api/v1/order-statuses/new","id":"6f8613a9-4aaf-4d7e-b272-ffee2c5c4a07","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"pending\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:8000/api/v1/order-statuses/new","description":"<p>Endpoint for staff users only.</p>\n","urlObject":{"protocol":"http","port":"8000","path":["api","v1","order-statuses","new"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[],"_postman_id":"6f8613a9-4aaf-4d7e-b272-ffee2c5c4a07"},{"name":"/api/v1/order-statuses/<int:id>","id":"0d193edb-91be-465e-820d-4519d466e3a9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"canceled\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:8000/api/v1/order-statuses/1","description":"<p>Endpoint for staff users only.</p>\n","urlObject":{"protocol":"http","port":"8000","path":["api","v1","order-statuses","1"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[],"_postman_id":"0d193edb-91be-465e-820d-4519d466e3a9"},{"name":"/api/v1/order-statuses/<int:id>","id":"a8f5e707-0f05-43f1-b923-9e6180da781e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"http://127.0.0.1:8000/api/v1/order-statuses/1","description":"<p>Endpoint for staff users only.</p>\n","urlObject":{"protocol":"http","port":"8000","path":["api","v1","order-statuses","1"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[],"_postman_id":"a8f5e707-0f05-43f1-b923-9e6180da781e"}],"id":"18ae1ee8-1411-47c3-83dc-5a50adc780a1","_postman_id":"18ae1ee8-1411-47c3-83dc-5a50adc780a1","description":""},{"name":"Orders","item":[{"name":"/api/v1/orders","id":"ddf4eca9-038c-4360-8adf-a7cc420f975a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://127.0.0.1:8000/api/v1/orders","description":"<p>Restricted for guests.<br />Registered users can get all orders related to them.<br />Staff users can get all orders in the database and filter results by customer (?customer={int:id}).</p>\n","urlObject":{"protocol":"http","port":"8000","path":["api","v1","orders"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[],"_postman_id":"ddf4eca9-038c-4360-8adf-a7cc420f975a"},{"name":"/api/v1/orders/<int:id>","id":"e5091319-41e0-4ae8-b3af-45484b261990","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://127.0.0.1:8000/api/v1/orders/1","description":"<p>Restricted for guests.<br />Registered users have access to the orders related to them.<br />Staff users can get all orders.</p>\n","urlObject":{"protocol":"http","port":"8000","path":["api","v1","orders","1"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[],"_postman_id":"e5091319-41e0-4ae8-b3af-45484b261990"},{"name":"/api/v1/orders/new","id":"f8126834-c548-4176-8554-c3af0a1472b9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"customer\": 1,\r\n    \"status\": 1\r\n}","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:8000/api/v1/orders/new","description":"<p>Restricted for guests.<br />Registered users can send a POST request with an empty request body to create a new order for themselves.<br />Staff users have unlimited access.</p>\n","urlObject":{"protocol":"http","port":"8000","path":["api","v1","orders","new"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[],"_postman_id":"f8126834-c548-4176-8554-c3af0a1472b9"},{"name":"/api/v1/orders/<int:id>","id":"cfd86c12-3de1-4a7b-8e3e-28ad37abe3d7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"customer\": 2,\r\n    \"status\": 1\r\n}","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:8000/api/v1/orders/1","description":"<p>Endpoint for staff users only.</p>\n","urlObject":{"protocol":"http","port":"8000","path":["api","v1","orders","1"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[],"_postman_id":"cfd86c12-3de1-4a7b-8e3e-28ad37abe3d7"},{"name":"/api/v1/orders/<int:id>","id":"bd00cc62-ab29-415a-abca-09bd12b2c168","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"http://127.0.0.1:8000/api/v1/orders/1","description":"<p>Endpoint for staff users only.</p>\n","urlObject":{"protocol":"http","port":"8000","path":["api","v1","orders","1"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[],"_postman_id":"bd00cc62-ab29-415a-abca-09bd12b2c168"}],"id":"65ded6e8-376a-4c0e-8d6c-fb30bae306ab","_postman_id":"65ded6e8-376a-4c0e-8d6c-fb30bae306ab","description":""},{"name":"Order Items","item":[{"name":"/api/v1/orders-items","id":"71ba264f-1f36-46b0-a1e9-e45157115c85","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://127.0.0.1:8000/api/v1/orders-items","description":"<p>Restricted for guests.<br />Registered users can get all orders items related to them.<br />Staff users can get all orders items in the database.</p>\n","urlObject":{"protocol":"http","port":"8000","path":["api","v1","orders-items"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[],"_postman_id":"71ba264f-1f36-46b0-a1e9-e45157115c85"},{"name":"/api/v1/orders-items/<int:id>","id":"2a89a5ba-8ff2-4c3f-9b3a-960ef8ee06e2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://127.0.0.1:8000/api/v1/orders-items/1","description":"<p>Restricted for guests.<br />Registered users have access to the orders items related to them.<br />Staff users can get all orders items.</p>\n","urlObject":{"protocol":"http","port":"8000","path":["api","v1","orders-items","1"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[],"_postman_id":"2a89a5ba-8ff2-4c3f-9b3a-960ef8ee06e2"},{"name":"/api/v1/orders-items/new","id":"166b6ee1-70b1-46f6-9339-c783ba0db1df","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"order\": 1,\r\n    \"product\": 1,\r\n    \"quantity\": 5\r\n}","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:8000/api/v1/orders-items/new","description":"<p>Restricted for guests.<br />Registered users can create a new orders items for themselves.<br />Staff users have unlimited access to endpoint.</p>\n","urlObject":{"protocol":"http","port":"8000","path":["api","v1","orders-items","new"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[],"_postman_id":"166b6ee1-70b1-46f6-9339-c783ba0db1df"},{"name":"/api/v1/orders-items/<int:id>","id":"83097a81-b824-41bb-98b8-ce82a774ce8d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"order\": 1,\r\n    \"product\": 1,\r\n    \"quantity\": 4\r\n}","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:8000/api/v1/orders-items/1","description":"<p>Endpoint for staff users only.</p>\n","urlObject":{"protocol":"http","port":"8000","path":["api","v1","orders-items","1"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[],"_postman_id":"83097a81-b824-41bb-98b8-ce82a774ce8d"},{"name":"/api/v1/orders-items/<int:id>","id":"0e3a5da3-8098-45d5-ab24-2a20a9a9eb5d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"http://127.0.0.1:8000/api/v1/orders-items/1","description":"<p>Endpoint for staff users only.</p>\n","urlObject":{"protocol":"http","port":"8000","path":["api","v1","orders-items","1"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[],"_postman_id":"0e3a5da3-8098-45d5-ab24-2a20a9a9eb5d"}],"id":"eab734f8-0d5a-4f04-951a-00a68d11ec9e","_postman_id":"eab734f8-0d5a-4f04-951a-00a68d11ec9e","description":""}],"event":[{"listen":"prerequest","script":{"id":"84ff1ba9-7560-4ebf-b2e6-52f6f3b4c2cb","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"b352b16c-25d8-4e94-b926-37fd531657e8","type":"text/javascript","exec":[""]}}],"variable":[{"key":"csrftoken","value":"","type":"string"}]}