{"info":{"_postman_id":"0ebf1dbd-cb0b-4d80-81a5-bbb99045f41e","name":"Talabat","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"28646082","collectionId":"0ebf1dbd-cb0b-4d80-81a5-bbb99045f41e","publishedId":"2sAY4yfghP","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-11-05T18:54:08.000Z"},"item":[{"name":"Identity Part 02","item":[{"name":"Get Current User","id":"c3b4e7fd-3f51-4022-9dcb-9cc84694349a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://localhost:7284/api/account","urlObject":{"path":["api","account"],"host":["https://localhost:7284"],"query":[],"variable":[]}},"response":[],"_postman_id":"c3b4e7fd-3f51-4022-9dcb-9cc84694349a"},{"name":"Check if email exists","id":"d04e0678-5e6f-4b9b-90ed-318890a66cb0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://localhost:7284/api/account/emailExists?email=medo.mostafa22255@gmail.co","urlObject":{"path":["api","account","emailExists"],"host":["https://localhost:7284"],"query":[{"key":"email","value":"medo.mostafa22255@gmail.co"}],"variable":[]}},"response":[],"_postman_id":"d04e0678-5e6f-4b9b-90ed-318890a66cb0"},{"name":"Get User Address","id":"a1017954-f5b3-49ef-9447-2fc356f01e48","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://localhost:7284/api/account/address","urlObject":{"path":["api","account","address"],"host":["https://localhost:7284"],"query":[],"variable":[]}},"response":[],"_postman_id":"a1017954-f5b3-49ef-9447-2fc356f01e48"},{"name":"Update User Address (moahmmed)","id":"948e6687-e119-42c1-8a93-01adba4cd3df","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"PUT","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9lbWFpbGFkZHJlc3MiOiJhaG1lZG5hc3I5N0BnbWFpbC5jb20iLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9naXZlbm5hbWUiOiJBaG1lZCBOYXNyIiwiZXhwIjoxNjYyNzQ0Mzc3LCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo1MDAxLyIsImF1ZCI6Ik15U2VjdXJlZEFwaVVzZXJzIn0.cc5Om4AabDr4ZuVhc7VXZaxXY77FgYCvowD2_TvV0Pg","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"FName\": \"Mohammed\",\n    \"LName\": \"Mostafa\",\n    \"street\": \"Elsalam\",\n    \"city\": \"Ismailia\",\n    \"country\": \"Egypt\"\n}","options":{"raw":{"language":"json"}}},"url":"https://localhost:7284/api/account/address","urlObject":{"path":["api","account","address"],"host":["https://localhost:7284"],"query":[],"variable":[]}},"response":[],"_postman_id":"948e6687-e119-42c1-8a93-01adba4cd3df"}],"id":"0fb38078-a1fe-4c27-bd5d-8c8084507fd2","_postman_id":"0fb38078-a1fe-4c27-bd5d-8c8084507fd2","description":""},{"name":"Products","item":[{"name":"Get Products","id":"0e7282b4-448b-4563-bf16-ad9dbae7fd0f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"url":"/api/Products","urlObject":{"path":["api","Products"],"host":[""],"query":[],"variable":[]}},"response":[],"_postman_id":"0e7282b4-448b-4563-bf16-ad9dbae7fd0f"},{"name":"Get Product By ID","id":"fef7adf6-661b-4c47-98f0-7179945f6ba0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"url":"/api/Products/1","urlObject":{"path":["api","Products","1"],"host":[""],"query":[],"variable":[]}},"response":[],"_postman_id":"fef7adf6-661b-4c47-98f0-7179945f6ba0"}],"id":"c054fd8b-33ab-4857-9584-517df52dcdb2","_postman_id":"c054fd8b-33ab-4857-9584-517df52dcdb2","description":""},{"name":"Get Products, Brands and Types","item":[{"name":"Get Products","id":"83b09130-79fa-45db-a404-5fe49fdda4d3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"url":"https://localhost:7284/api/products","urlObject":{"path":["api","products"],"host":["https://localhost:7284"],"query":[],"variable":[]}},"response":[],"_postman_id":"83b09130-79fa-45db-a404-5fe49fdda4d3"},{"name":"Get Product Brands","id":"5af294e4-0f3b-4ed5-8af0-c92de8b32d02","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://localhost:7284/api/products/brands","urlObject":{"path":["api","products","brands"],"host":["https://localhost:7284"],"query":[],"variable":[]}},"response":[],"_postman_id":"5af294e4-0f3b-4ed5-8af0-c92de8b32d02"},{"name":"Get Product Categories","id":"cc1bf5e3-14ad-4cc8-bd8c-2c56ad93985a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://localhost:7284/api/products/categories","urlObject":{"path":["api","products","categories"],"host":["https://localhost:7284"],"query":[],"variable":[]}},"response":[],"_postman_id":"cc1bf5e3-14ad-4cc8-bd8c-2c56ad93985a"}],"id":"446a008f-27fa-4c14-b061-aafcbe42d186","_postman_id":"446a008f-27fa-4c14-b061-aafcbe42d186","description":""},{"name":"Sorting and Filtering","item":[{"name":"GetProducts sorted by name (default case)","id":"f7be15d8-7516-4b1d-8761-b53e1da296cf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://localhost:7284/api/products?sort=name","urlObject":{"path":["api","products"],"host":["https://localhost:7284"],"query":[{"key":"sort","value":"name"}],"variable":[]}},"response":[],"_postman_id":"f7be15d8-7516-4b1d-8761-b53e1da296cf"},{"name":"GetProducts sorted by Price Ascending","id":"464e86e8-1ba6-4ea8-916e-459ec07f7db6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://localhost:7284/api/products?sort=priceAsc","urlObject":{"path":["api","products"],"host":["https://localhost:7284"],"query":[{"key":"sort","value":"priceAsc"}],"variable":[]}},"response":[],"_postman_id":"464e86e8-1ba6-4ea8-916e-459ec07f7db6"},{"name":"GetProducts sorted by Price Descending","id":"ce91d196-2db1-4303-9861-b237b2b0de82","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9lbWFpbGFkZHJlc3MiOiJhaG1lZG5hc3I5N0BnbWFpbC5jb20iLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9naXZlbm5hbWUiOiJBaG1lZCBOYXNyIiwiZXhwIjoxNjYyMjkxNjk0LCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo1MDAxLyIsImF1ZCI6Ik15U2VjdXJlZEFwaVVzZXJzIn0.TkjlL4KD01lHWE4M9sZ4DW_topvi-T0-FdJG8ehWuvs","type":"text"}],"url":"https://localhost:7284/api/products?sort=priceDesc","urlObject":{"path":["api","products"],"host":["https://localhost:7284"],"query":[{"key":"sort","value":"priceDesc"}],"variable":[]}},"response":[],"_postman_id":"ce91d196-2db1-4303-9861-b237b2b0de82"},{"name":"Get Products by Brand","id":"c292514f-c3eb-4aa4-8e0a-11a41c81c822","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://localhost:7284/api/products?brandId=2","urlObject":{"path":["api","products"],"host":["https://localhost:7284"],"query":[{"key":"brandId","value":"2"}],"variable":[]}},"response":[],"_postman_id":"c292514f-c3eb-4aa4-8e0a-11a41c81c822"},{"name":"Get Products by Category","id":"ee4480f1-695a-4753-9687-9e86d10ab013","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://localhost:7284/api/products?sort=priceAsc&CategoryId=6","urlObject":{"path":["api","products"],"host":["https://localhost:7284"],"query":[{"key":"sort","value":"priceAsc"},{"key":"CategoryId","value":"6"}],"variable":[]}},"response":[],"_postman_id":"ee4480f1-695a-4753-9687-9e86d10ab013"},{"name":"Get Products by Brand And Category","id":"872d1cbe-1852-4538-ba82-f3ee5b84920b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://localhost:7284/api/products?CategoryId=1&brandId=1","urlObject":{"path":["api","products"],"host":["https://localhost:7284"],"query":[{"key":"CategoryId","value":"1"},{"key":"brandId","value":"1"}],"variable":[]}},"response":[],"_postman_id":"872d1cbe-1852-4538-ba82-f3ee5b84920b"},{"name":"Get Products by Brand And Category Sorted by price asc","id":"6f22807a-9bcb-4b07-9013-4d5410109aff","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Origin","value":"https://localhost:4200","type":"text"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://localhost:7284/api/products?categoryId=1&brandId=1&sort=priceAsc","urlObject":{"path":["api","products"],"host":["https://localhost:7284"],"query":[{"key":"categoryId","value":"1"},{"key":"brandId","value":"1"},{"key":"sort","value":"priceAsc"}],"variable":[]}},"response":[],"_postman_id":"6f22807a-9bcb-4b07-9013-4d5410109aff"},{"name":"Get Paged Products Page 1 Size 5","id":"9734cf18-cd68-4c81-bd27-1193308c17fd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://localhost:7284/api/products?pageSize=5&pageIndex=4","urlObject":{"path":["api","products"],"host":["https://localhost:7284"],"query":[{"key":"pageSize","value":"5"},{"key":"pageIndex","value":"4"}],"variable":[]}},"response":[],"_postman_id":"9734cf18-cd68-4c81-bd27-1193308c17fd"},{"name":"Get Paged Products By BrandId","id":"43203486-43b2-49bb-b1b8-f7c59aaf5c24","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://localhost:7284/api/Products?brandId=2&pageSize=2&pageIndex=2&sort=priceDesc","urlObject":{"path":["api","Products"],"host":["https://localhost:7284"],"query":[{"key":"brandId","value":"2"},{"key":"pageSize","value":"2"},{"key":"pageIndex","value":"2"},{"key":"sort","value":"priceDesc"}],"variable":[]}},"response":[],"_postman_id":"43203486-43b2-49bb-b1b8-f7c59aaf5c24"}],"id":"166d477a-ecf6-434e-a471-8736393d4170","_postman_id":"166d477a-ecf6-434e-a471-8736393d4170","description":""},{"name":"Basket","item":[{"name":"Get Basket","id":"3558b482-24b3-467b-b0e6-22e9d6e8c65f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"url":"https://localhost:7284/api/basket?id=basket1","urlObject":{"path":["api","basket"],"host":["https://localhost:7284"],"query":[{"key":"id","value":"basket1"}],"variable":[]}},"response":[],"_postman_id":"3558b482-24b3-467b-b0e6-22e9d6e8c65f"},{"name":"Update Basket","id":"e51b5215-1468-4104-a0bc-b33b75c9f880","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"id\": \"basket1\",\n  \"items\": [\n    {\n      \"id\": 4,\n      \"productName\": \"Starbucks Mug\",\n      \"price\": 7,\n      \"quantity\": 2,\n      \"pictureUrl\": \"https://localhost:5001/images/products/2.png\",\n      \"brand\": \"Starbucks\",\n      \"category\": \"Mug\"\n    }\n  ]\n}","options":{"raw":{"language":"json"}}},"url":"https://localhost:7284/api/basket","urlObject":{"path":["api","basket"],"host":["https://localhost:7284"],"query":[],"variable":[]}},"response":[],"_postman_id":"e51b5215-1468-4104-a0bc-b33b75c9f880"},{"name":"Delete Basket","id":"85b255e7-5af8-421d-a7e3-c80fcab8ab4c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"DELETE","header":[],"url":"https://localhost:7284/api/basket?id=basket1","urlObject":{"path":["api","basket"],"host":["https://localhost:7284"],"query":[{"key":"id","value":"basket1"}],"variable":[]}},"response":[],"_postman_id":"85b255e7-5af8-421d-a7e3-c80fcab8ab4c"},{"name":"Update Basket with Price = 0 OR Quantity = 0","id":"09a2745c-a38a-407e-b0b8-d9655a75c643","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"id\": \"basket2\",\r\n  \"items\": [\r\n    {\r\n      \"id\": 2,\r\n      \"productName\": \"Iced Spanich Latte\",\r\n      \"pictureUrl\": \"string\",\r\n      \"price\": 0,\r\n      \"quantity\": 0,\r\n      \"category\": \"Latte\",\r\n      \"brand\": \"Starbucks\"\r\n    }\r\n  ]\r\n}","options":{"raw":{"language":"json"}}},"url":"https://localhost:7284/api/basket","urlObject":{"path":["api","basket"],"host":["https://localhost:7284"],"query":[],"variable":[]}},"response":[],"_postman_id":"09a2745c-a38a-407e-b0b8-d9655a75c643"}],"id":"79b254c6-ceca-4fae-8dd5-4da24dc8ac93","_postman_id":"79b254c6-ceca-4fae-8dd5-4da24dc8ac93","description":""},{"name":"Identity Part 01","item":[{"name":"Login as Mohammed","event":[{"listen":"test","script":{"exec":["const user = pm.response.json();","","pm.test(\"Has properties\", function () {","    pm.expect(user).to.have.property('displayName');","    pm.expect(user).to.have.property('email');","    pm.expect(user).to.have.property('token');","});","","if (pm.test(\"Has properties\")) {","    pm.globals.set('Hamda_Token', user.token);","}",""],"type":"text/javascript","id":"99d08d90-0882-4ea3-92bc-ccbdf98468cc"}}],"id":"400f9c61-eb36-4077-86b6-15f22f0aad06","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"email\": \"ahmed.nasr@linkdev.com\",\n\t\"password\": \"Pa$$w0rd\"\n}","options":{"raw":{"language":"json"}}},"url":"https://localhost:7284/api/account/login","urlObject":{"path":["api","account","login"],"host":["https://localhost:7284"],"query":[],"variable":[]}},"response":[],"_postman_id":"400f9c61-eb36-4077-86b6-15f22f0aad06"},{"name":"Login as Mohammed bad password","id":"a725cbfe-5eef-4292-8b96-83f5844bc25e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"email\": \"ahmednasr\",\n\t\"password\": \"BadPassword\"\n}","options":{"raw":{"language":"json"}}},"url":"https://localhost:7284/api/account/login","urlObject":{"path":["api","account","login"],"host":["https://localhost:7284"],"query":[],"variable":[]}},"response":[],"_postman_id":"a725cbfe-5eef-4292-8b96-83f5844bc25e"},{"name":"Register as mo","event":[{"listen":"test","script":{"exec":["const user = pm.response.json();","","pm.test(\"Has properties\", function () {","    pm.expect(user).to.have.property('displayName');","    pm.expect(user).to.have.property('email');","    pm.expect(user).to.have.property('token');","});","","if (pm.test(\"Has properties\")) {","    pm.globals.set('tom_token', user.token);","}",""],"type":"text/javascript","id":"54c18ce1-8de1-4fd6-bbaa-c5db4449c9f0"}}],"id":"c13aa621-f33f-471c-8464-639082098226","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"displayName\": \"Aya Mohamed\",\n  \"email\": \"ayamohamed@gmail.com\",\n  \"phoneNumber\": \"01122334455\",\n  \"password\": \"Pa$$w0rd\"\n}","options":{"raw":{"language":"json"}}},"url":"https://localhost:7284/api/account/register","urlObject":{"path":["api","account","register"],"host":["https://localhost:7284"],"query":[],"variable":[]}},"response":[],"_postman_id":"c13aa621-f33f-471c-8464-639082098226"},{"name":"Login as Aya and save token to env","event":[{"listen":"test","script":{"exec":["const user = pm.response.json();","","pm.test(\"Has properties\", function () {","    pm.expect(user).to.have.property('displayName');","    pm.expect(user).to.have.property('email');","    pm.expect(user).to.have.property('token');","});","","if (pm.test(\"Has properties\")) {","    pm.globals.set('tom_token', user.token);","}",""],"type":"text/javascript","id":"d04bf9e4-2702-4dd9-80f8-a6b2265f0645"}}],"id":"fb58ef56-bfd0-4d76-8967-b17f8a538f87","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"email\": \"ayamohamed@gmail.com\",\n\t\"password\": \"Pa$$w0rd\"\n}","options":{"raw":{"language":"json"}}},"url":"https://localhost:7284/api/account/login","urlObject":{"path":["api","account","login"],"host":["https://localhost:7284"],"query":[],"variable":[]}},"response":[],"_postman_id":"fb58ef56-bfd0-4d76-8967-b17f8a538f87"},{"name":"Get Products","id":"e19e43b7-8d21-4811-96ba-7aeb945fc624","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"url":"https://localhost:7284/api/products","urlObject":{"path":["api","products"],"host":["https://localhost:7284"],"query":[],"variable":[]}},"response":[],"_postman_id":"e19e43b7-8d21-4811-96ba-7aeb945fc624"}],"id":"38a2ff32-818a-489d-a1d1-325d2568f301","_postman_id":"38a2ff32-818a-489d-a1d1-325d2568f301","description":""},{"name":"Orders Part 01","item":[{"name":"Update Basket","id":"dbd7e9bb-1f30-4aeb-878b-b7331c647095","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"id\": \"order1\",\n    \"items\": [\n        {\n            \"id\": 1,\n            \"productName\": \"Starbucks Mug\",\n            \"price\": 1,\n            \"quantity\": 1,\n            \"pictureUrl\": \"https://localhost:5001/images/products/2.png\",\n            \"brand\": \"Starbucks\",\n            \"category\": \"Mug\"\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"https://localhost:7284/api/basket","urlObject":{"path":["api","basket"],"host":["https://localhost:7284"],"query":[],"variable":[]}},"response":[],"_postman_id":"dbd7e9bb-1f30-4aeb-878b-b7331c647095"},{"name":"Checkout Order [order1] as Mohammed","id":"dffca8c4-cbe2-499e-bcb1-5ec09f37c5f5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"buyerEmail\": \"ahmed.nasr@linkdev.com\",\n    \"basketId\": \"order1\",\n    \"deliveryMethodId\": 1,\n    \"shippingAddress\": {\n        \"firstName\": \"Ahmed\",\n        \"lastName\": \"Nasr\",\n        \"street\": \"10 The Street\",\n        \"city\": \"New York\",\n        \"country\": \"USA\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"https://localhost:7284/api/orders","urlObject":{"path":["api","orders"],"host":["https://localhost:7284"],"query":[],"variable":[]}},"response":[],"_postman_id":"dffca8c4-cbe2-499e-bcb1-5ec09f37c5f5"}],"id":"b3f9b88b-b7d8-448b-a133-ed3355ae4389","_postman_id":"b3f9b88b-b7d8-448b-a133-ed3355ae4389","description":""},{"name":"Login and Save Token","item":[{"name":"Login as Mohammed and save token to env","event":[{"listen":"test","script":{"id":"0484a19d-d3fa-4ec4-b27f-71c45c26e6e6","exec":["const user = pm.response.json();","","pm.test(\"Has properties\", function () {","    pm.expect(user).to.have.property('displayName');","    pm.expect(user).to.have.property('email');","    pm.expect(user).to.have.property('token');","});","","if (pm.test(\"Has properties\")) {","    pm.collectionVariables.set('', user.token);","}",""],"type":"text/javascript","packages":{}}}],"id":"0e947c34-115d-455b-8e7a-e173a4a34138","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"email\": \"medo.mostafa22255@gmail.com\",\n\t\"password\": \"Pa$$w0rd\"\n}","options":{"raw":{"language":"json"}}},"url":"https://localhost:7284/api/account/login","urlObject":{"path":["api","account","login"],"host":["https://localhost:7284"],"query":[],"variable":[]}},"response":[],"_postman_id":"0e947c34-115d-455b-8e7a-e173a4a34138"}],"id":"10d68599-0b86-43bd-9a6c-7cd95ed5d69e","_postman_id":"10d68599-0b86-43bd-9a6c-7cd95ed5d69e","description":""},{"name":"Orders Part 02","item":[{"name":"Get Orders For User (moahmmed)","id":"8168a900-fea7-4fb8-a7b2-5063c6c52311","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://localhost:7284/api/orders?email=ahmed.nasr@linkdev.com","urlObject":{"path":["api","orders"],"host":["https://localhost:7284"],"query":[{"key":"email","value":"ahmed.nasr@linkdev.com"}],"variable":[]}},"response":[],"_postman_id":"8168a900-fea7-4fb8-a7b2-5063c6c52311"},{"name":"Get Order For User (mohammed)","id":"df661868-43cf-4b35-b1eb-8534d8a756b4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://localhost:7284/api/orders/1?email=ahmed.nasr@linkdev.com","urlObject":{"path":["api","orders","1"],"host":["https://localhost:7284"],"query":[{"key":"email","value":"ahmed.nasr@linkdev.com"},{"disabled":true,"key":"orderId","value":"5"}],"variable":[]}},"response":[],"_postman_id":"df661868-43cf-4b35-b1eb-8534d8a756b4"},{"name":"Get Delivey Methods","id":"a2ab11b6-3dec-4fc6-9013-bda617b203a0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"url":"https://localhost:7284/api/orders/deliverymethods","urlObject":{"path":["api","orders","deliverymethods"],"host":["https://localhost:7284"],"query":[],"variable":[]}},"response":[],"_postman_id":"a2ab11b6-3dec-4fc6-9013-bda617b203a0"}],"id":"d66898b0-2658-4ba3-baf6-232e3431149b","_postman_id":"d66898b0-2658-4ba3-baf6-232e3431149b","description":""},{"name":"Payments","item":[{"name":"Create Basket","id":"bfcf51ce-e368-49d4-baf1-2baca5506a36","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n   \"Id\":\"order1\",\n   \"Items\":[\n      {\n         \"Id\":1,\n         \"ProductName\":\".NET Black \\u0026 White Mug\",\n         \"PictureUrl\":\"https://localhost:5001/images/products/2.png\",\n         \"Category\":\"USB Memory Stick\",\n         \"Brand\":\".NET\",\n         \"Price\":1.0,\n         \"Quantity\":2\n      }\n   ],\n   \"DeliveryMethodId\":1\n}","options":{"raw":{"language":"json"}}},"url":"https://localhost:7284/api/basket","urlObject":{"path":["api","basket"],"host":["https://localhost:7284"],"query":[],"variable":[]}},"response":[],"_postman_id":"bfcf51ce-e368-49d4-baf1-2baca5506a36"},{"name":"Create Payment Intent as Mohammed","id":"27dc32ab-4142-475d-8630-be14140b1b23","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJnaXZlbl9uYW1lIjoibWVkby5tb3N0YWZhMjIyNTUiLCJlbWFpbCI6Im1lZG8ubW9zdGFmYTIyMjU1QGdtYWlsLmNvbSIsIm5hbWVpZCI6ImQ4ZWFhOGQzLWI1ZDUtNDUxMC05NzM2LTEyMDNlMjM4YmJlMyIsImV4cCI6MTczNjAxMjIzMywiaXNzIjoiaHR0cHM6Ly9sb2NhbGhvc3Q6NzI4NC8iLCJhdWQiOiJNb2hhbW1lZC1Nb3N0YWZhLUFwaXMtQ2xpZW50In0.OdKb4ks_wmSiW0Xi-rjmDIX_jk-Y-DSgt8amO5Cqnfg"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJnaXZlbl9uYW1lIjoibWVkby5tb3N0YWZhMjIyNTUiLCJlbWFpbCI6Im1lZG8ubW9zdGFmYTIyMjU1QGdtYWlsLmNvbSIsIm5hbWVpZCI6ImQ4ZWFhOGQzLWI1ZDUtNDUxMC05NzM2LTEyMDNlMjM4YmJlMyIsImV4cCI6MTczNjAxMjIzMywiaXNzIjoiaHR0cHM6Ly9sb2NhbGhvc3Q6NzI4NC8iLCJhdWQiOiJNb2hhbW1lZC1Nb3N0YWZhLUFwaXMtQ2xpZW50In0.OdKb4ks_wmSiW0Xi-rjmDIX_jk-Y-DSgt8amO5Cqnfg","type":"text"}],"body":{"mode":"raw","raw":"{}","options":{"raw":{"language":"json"}}},"url":"https://localhost:7284/api/payment/order1","urlObject":{"path":["api","payment","order1"],"host":["https://localhost:7284"],"query":[],"variable":[]}},"response":[],"_postman_id":"27dc32ab-4142-475d-8630-be14140b1b23"},{"name":"Update Basket with Client Secret","id":"e856e6ef-20d7-4ef6-9d2d-7ea8e1658f4b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"id\": \"order1\",\n    \"items\": [\n        {\n            \"id\": 1,\n            \"productName\": \".NET Black & White Mug\",\n            \"pictureUrl\": \"https://localhost:5001/images/products/2.png\",\n            \"price\": 200.00,\n            \"category\": \"USB Memory Stick\",\n            \"brand\": \".NET\",\n            \"quantity\": 3\n        }\n    ],\n    \"paymentIntentId\": \"pi_3QHqzDLeDOOmiS3J1uloWSN6\",\n    \"clientSecret\": \"pi_3QHqzDLeDOOmiS3J1uloWSN6_secret_SeZMZpJnHfVFf447wALywp8uI\",\n    \"deliveryMethodId\": 1,\n    \"shippingPrice\": 10.00\n}","options":{"raw":{"language":"json"}}},"url":"https://localhost:7284/api/basket","urlObject":{"path":["api","basket"],"host":["https://localhost:7284"],"query":[],"variable":[]}},"response":[],"_postman_id":"e856e6ef-20d7-4ef6-9d2d-7ea8e1658f4b"},{"name":"Update Payment Intent","id":"6724b536-72b2-4c5b-b829-b6e21be17c9b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJnaXZlbl9uYW1lIjoibWVkby5tb3N0YWZhMjIyNTUiLCJlbWFpbCI6Im1lZG8ubW9zdGFmYTIyMjU1QGdtYWlsLmNvbSIsIm5hbWVpZCI6ImQ4ZWFhOGQzLWI1ZDUtNDUxMC05NzM2LTEyMDNlMjM4YmJlMyIsImV4cCI6MTczNjAxMjIzMywiaXNzIjoiaHR0cHM6Ly9sb2NhbGhvc3Q6NzI4NC8iLCJhdWQiOiJNb2hhbW1lZC1Nb3N0YWZhLUFwaXMtQ2xpZW50In0.OdKb4ks_wmSiW0Xi-rjmDIX_jk-Y-DSgt8amO5Cqnfg"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJnaXZlbl9uYW1lIjoibWVkby5tb3N0YWZhMjIyNTUiLCJlbWFpbCI6Im1lZG8ubW9zdGFmYTIyMjU1QGdtYWlsLmNvbSIsIm5hbWVpZCI6ImQ4ZWFhOGQzLWI1ZDUtNDUxMC05NzM2LTEyMDNlMjM4YmJlMyIsImV4cCI6MTczNjAxMjIzMywiaXNzIjoiaHR0cHM6Ly9sb2NhbGhvc3Q6NzI4NC8iLCJhdWQiOiJNb2hhbW1lZC1Nb3N0YWZhLUFwaXMtQ2xpZW50In0.OdKb4ks_wmSiW0Xi-rjmDIX_jk-Y-DSgt8amO5Cqnfg","type":"text"}],"body":{"mode":"raw","raw":"{}","options":{"raw":{"language":"json"}}},"url":"https://localhost:7284/api/payment/order1","urlObject":{"path":["api","payment","order1"],"host":["https://localhost:7284"],"query":[],"variable":[]}},"response":[],"_postman_id":"6724b536-72b2-4c5b-b829-b6e21be17c9b"},{"name":"Create Order - Checkout","id":"b7c18e1e-262c-43b4-b3f9-3ffec3b89ee1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJnaXZlbl9uYW1lIjoibWVkby5tb3N0YWZhMjIyNTUiLCJlbWFpbCI6Im1lZG8ubW9zdGFmYTIyMjU1QGdtYWlsLmNvbSIsIm5hbWVpZCI6ImQ4ZWFhOGQzLWI1ZDUtNDUxMC05NzM2LTEyMDNlMjM4YmJlMyIsImV4cCI6MTczNjAxMjIzMywiaXNzIjoiaHR0cHM6Ly9sb2NhbGhvc3Q6NzI4NC8iLCJhdWQiOiJNb2hhbW1lZC1Nb3N0YWZhLUFwaXMtQ2xpZW50In0.OdKb4ks_wmSiW0Xi-rjmDIX_jk-Y-DSgt8amO5Cqnfg"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"basketId\": \"order1\",\n    \"deliveryMethodId\": 1,\n    \"shippingAddress\": {\n        \"FName\": \"Mohammed\",\n        \"LName\": \"Mostafa\",\n        \"street\": \"10 The Street\",\n        \"city\": \"New York\",\n        \"country\": \"USA\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"https://localhost:7284/api/order","urlObject":{"path":["api","order"],"host":["https://localhost:7284"],"query":[],"variable":[]}},"response":[],"_postman_id":"b7c18e1e-262c-43b4-b3f9-3ffec3b89ee1"}],"id":"8fa8d1b0-1e71-43c3-b14c-7de310a534ec","_postman_id":"8fa8d1b0-1e71-43c3-b14c-7de310a534ec","description":""},{"name":"Get Orders as OrderToReturnDto","item":[{"name":"Get Orders For User","id":"9cfdeb98-c5b5-4d6c-abe7-1dd2019353b9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://localhost:7284/api/orders?email=ahmed.nasr@linkdev.com","urlObject":{"path":["api","orders"],"host":["https://localhost:7284"],"query":[{"key":"email","value":"ahmed.nasr@linkdev.com"}],"variable":[]}},"response":[],"_postman_id":"9cfdeb98-c5b5-4d6c-abe7-1dd2019353b9"},{"name":"Get Order For User","id":"755c458c-2fc0-4423-aa5f-4b0d34a5ca20","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://localhost:7284/api/orders/1?email=ahmed.nasr@linkdev.com","urlObject":{"path":["api","orders","1"],"host":["https://localhost:7284"],"query":[{"key":"email","value":"ahmed.nasr@linkdev.com"},{"disabled":true,"key":"orderId","value":"5"}],"variable":[]}},"response":[],"_postman_id":"755c458c-2fc0-4423-aa5f-4b0d34a5ca20"}],"id":"a24bf275-c414-42cc-be80-1a6f7e85a6d1","_postman_id":"a24bf275-c414-42cc-be80-1a6f7e85a6d1","description":""}],"variable":[{"key":"baseUrl","value":"","type":"default"},{"key":"url","value":"https://localhost:7284","type":"default"},{"value":""},{"value":""},{"value":""},{"value":""},{"key":"Messi_Token","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJnaXZlbl9uYW1lIjoibWVkby5tb3N0YWZhMjIyNTUiLCJlbWFpbCI6Im1lZG8ubW9zdGFmYTIyMjU1QGdtYWlsLmNvbSIsIm5hbWVpZCI6ImQ4ZWFhOGQzLWI1ZDUtNDUxMC05NzM2LTEyMDNlMjM4YmJlMyIsImV4cCI6MTczNjAxMjIzMywiaXNzIjoiaHR0cHM6Ly9sb2NhbGhvc3Q6NzI4NC8iLCJhdWQiOiJNb2hhbW1lZC1Nb3N0YWZhLUFwaXMtQ2xpZW50In0.OdKb4ks_wmSiW0Xi-rjmDIX_jk-Y-DSgt8amO5Cqnfg","type":"default"}]}