{"info":{"_postman_id":"51396772-5cf2-4f51-9d78-32e28280c321","name":"#3Project Restull Booker E2E","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"40062290","collectionId":"51396772-5cf2-4f51-9d78-32e28280c321","publishedId":"2sAYk8uhyx","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2025-03-12T06:16:25.000Z"},"item":[{"name":"SC01_E2E Create a BOOKING ->Update -> Delete It -> Verify via GET it doesn't exist.","item":[{"name":"Post_CreateValidBooking","event":[{"listen":"test","script":{"id":"60e6703b-1f46-46f2-a82d-a9be444bb2f6","exec":["// Verify the status code is 200\r","pm.test(\"Verify the status code is 200\", function () {\r","    pm.expect(pm.response.code).to.equal(200);\r","});\r","\r","// Verify the first name is Jim\r","pm.test(\"Verify the first name is Jim\", function () {\r","    // Get the response JSON\r","    var responseJSON = pm.response.json();\r","    // Access the \"booking\" object\r","    var booking = responseJSON[\"booking\"];\r","    // Access the \"firstname\" property correctly\r","    var firstname = booking[\"firstname\"];\r","    // Assertion\r","    pm.expect(firstname).to.equal(\"Jim\");\r","});\r","\r","var responseJSON = pm.response.json();\r","    var bookingid = responseJSON[\"bookingid\"];\r","    pm.environment.set(\"bookingid\",bookingid)\r","\r","    "],"type":"text/javascript","packages":{}}}],"id":"bd318648-5871-4e31-9054-ae2d4c83f077","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n    \"firstname\" : \"Jim\",\r\n    \"lastname\" : \"Brown\",\r\n    \"totalprice\" : 111,\r\n    \"depositpaid\" : true,\r\n    \"bookingdates\" : {\r\n        \"checkin\" : \"2018-01-01\",\r\n        \"checkout\" : \"2019-01-01\"\r\n    },\r\n    \"additionalneeds\" : \"Breakfast\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://restful-booker.herokuapp.com/booking","description":"<p>Generated from cURL: curl -X POST <br />  <a href=\"https://restful-booker.herokuapp.com/booking\">https://restful-booker.herokuapp.com/booking</a> <br />  -H 'Content-Type: application/json' <br />  -d '{\n    \"firstname\" : \"Jim\",\n    \"lastname\" : \"Brown\",\n    \"totalprice\" : 111,\n    \"depositpaid\" : true,\n    \"bookingdates\" : {\n        \"checkin\" : \"2018-01-01\",\n        \"checkout\" : \"2019-01-01\"\n    },\n    \"additionalneeds\" : \"Breakfast\"\n}'</p>\n","urlObject":{"protocol":"https","path":["booking"],"host":["restful-booker","herokuapp","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"bd318648-5871-4e31-9054-ae2d4c83f077"},{"name":"PUT_UpdateBookingWithValidData","event":[{"listen":"test","script":{"id":"baaef419-7d35-41ac-a3ea-b0ec51ce9b36","exec":["// ✅ Verify Status Code (Should be 200 OK)\r","pm.test(\"Status code is 200 OK\", () => {\r","    pm.expect(pm.response.code).to.equal(200);\r","});\r","\r","\r","// ✅ Check Response Time (Should be within 2 seconds)\r","pm.test(\"Response time is within acceptable limits\", () => {\r","    pm.expect(pm.response.responseTime).to.be.below(2000);\r","});\r","\r",""],"type":"text/javascript","packages":{}}}],"id":"24b4a86c-9ec3-4c4b-9c7a-d5d3cb2f48da","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":false},"method":"PUT","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"},{"key":"Cookie","value":"token=f24561cf0620918"}],"body":{"mode":"raw","raw":"{\r\n    \"firstname\" : \"ABC\",\r\n    \"lastname\" : \"PQR\",\r\n    \"totalprice\" : 111,\r\n    \"depositpaid\" : true,\r\n    \"bookingdates\" : {\r\n        \"checkin\" : \"2018-01-01\",\r\n        \"checkout\" : \"2019-01-01\"\r\n    },\r\n    \"additionalneeds\" : \"Breakfast\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://restful-booker.herokuapp.com/booking/{{bookingid}}","description":"<p>Generated from cURL: curl -X PUT <br />  <a href=\"https://restful-booker.herokuapp.com/booking/1\">https://restful-booker.herokuapp.com/booking/1</a> <br />  -H 'Content-Type: application/json' <br />  -H 'Accept: application/json' <br />  -H 'Cookie: token=abc123' <br />  -d '{\n    \"firstname\" : \"James\",\n    \"lastname\" : \"Brown\",\n    \"totalprice\" : 111,\n    \"depositpaid\" : true,\n    \"bookingdates\" : {\n        \"checkin\" : \"2018-01-01\",\n        \"checkout\" : \"2019-01-01\"\n    },\n    \"additionalneeds\" : \"Breakfast\"\n}'</p>\n","urlObject":{"protocol":"https","path":["booking","{{bookingid}}"],"host":["restful-booker","herokuapp","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"24b4a86c-9ec3-4c4b-9c7a-d5d3cb2f48da"},{"name":"GET_GetBookingById","event":[{"listen":"test","script":{"id":"fde59fa3-77de-47bc-a001-0ae93ffdbb8f","exec":["// ✅ Verify Status Code (Should be 200 if booking exists)\r","pm.test(\"Status code is 200 or 404\", () => {\r","    pm.expect(pm.response.code).to.be.oneOf([200, 404]);\r","});\r","\r","// ✅ Validate Response Body Structure\r","pm.test(\"Response contains valid booking details\", () => {\r","    if (pm.response.code === 200) {\r","        let jsonData = pm.response.json();\r","        pm.expect(jsonData).to.have.property(\"firstname\");\r","        pm.expect(jsonData).to.have.property(\"lastname\");\r","        pm.expect(jsonData).to.have.property(\"totalprice\");\r","        pm.expect(jsonData).to.have.property(\"depositpaid\");\r","        pm.expect(jsonData).to.have.property(\"bookingdates\");\r","        pm.expect(jsonData.bookingdates).to.have.property(\"checkin\");\r","        pm.expect(jsonData.bookingdates).to.have.property(\"checkout\");\r","    } else {\r","        pm.test(\"Response should contain 'reason' for 404\", () => {\r","            let jsonData = pm.response.json();\r","            pm.expect(jsonData).to.have.property(\"reason\");\r","        });\r","    }\r","});\r","\r","// ✅ Validate Content-Type\r","pm.test(\"Content-Type is JSON\", () => {\r","    pm.response.to.have.header(\"Content-Type\");\r","    pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");\r","});\r","\r","// ✅ Check Response Time (Performance Test)\r","pm.test(\"Response time is within 2 seconds\", () => {\r","    pm.expect(pm.response.responseTime).to.be.below(2000);\r","});\r",""],"type":"text/javascript","packages":{}}}],"id":"72693140-b9df-462c-bf24-01bd72383cce","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"file","file":{}},"url":"https://restful-booker.herokuapp.com/booking/{{bookingid}}","description":"<p>Generated from cURL: curl -i <a href=\"https://restful-booker.herokuapp.com/booking/1\">https://restful-booker.herokuapp.com/booking/1</a></p>\n","urlObject":{"protocol":"https","path":["booking","{{bookingid}}"],"host":["restful-booker","herokuapp","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"72693140-b9df-462c-bf24-01bd72383cce"},{"name":"Delete_DeleteValidBooking","event":[{"listen":"test","script":{"id":"df165bc7-15f2-45e6-88fb-f8b301775910","exec":["// ✅ Verify Status Code (Should be 201 Created or 204 No Content)\r","pm.test(\"Status code is 201 Created or 204 No Content\", () => {\r","    pm.expect(pm.response.code).to.be.oneOf([201, 204]);\r","});\r",""],"type":"text/javascript","packages":{}}}],"id":"e525f287-ae26-4b94-a6b2-ad8fc191bf34","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":false},"method":"DELETE","header":[{"key":"Content-Type","value":"application/json"},{"key":"Cookie","value":"token=6c3798012a80fa1"}],"url":"https://restful-booker.herokuapp.com/booking/{{bookingid}}","description":"<p>Generated from cURL: curl -X DELETE <br />  <a href=\"https://restful-booker.herokuapp.com/booking/1\">https://restful-booker.herokuapp.com/booking/1</a> <br />  -H 'Content-Type: application/json' <br />  -H 'Cookie: token=abc123'</p>\n","urlObject":{"protocol":"https","path":["booking","{{bookingid}}"],"host":["restful-booker","herokuapp","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"e525f287-ae26-4b94-a6b2-ad8fc191bf34"},{"name":"GET_GetBookingById Copy","event":[{"listen":"test","script":{"id":"fde59fa3-77de-47bc-a001-0ae93ffdbb8f","exec":["// ✅ Verify Status Code (Should be 200 if booking exists)\r","pm.test(\"Status code is 200 or 404\", () => {\r","    pm.expect(pm.response.code).to.be.oneOf([200, 404]);\r","});\r","\r","pm.test(\"Body is correct\", function () {\r","    pm.response.to.have.body(\"Not Found\");\r","});\r","\r","\r",""],"type":"text/javascript","packages":{}}}],"id":"53784c41-8ceb-4736-99f9-bbf92d85c08f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://restful-booker.herokuapp.com/booking/{{bookingid}}","description":"<p>Generated from cURL: curl -i <a href=\"https://restful-booker.herokuapp.com/booking/1\">https://restful-booker.herokuapp.com/booking/1</a></p>\n","urlObject":{"protocol":"https","path":["booking","{{bookingid}}"],"host":["restful-booker","herokuapp","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"53784c41-8ceb-4736-99f9-bbf92d85c08f"}],"id":"7fe4533d-bad3-4655-9d42-c533d8054a7f","_postman_id":"7fe4533d-bad3-4655-9d42-c533d8054a7f","description":""},{"name":"SC02_E2E_Get an Existing Booking from Get All Bookings Ids -> Update a Booking and Verify using GET by id.","item":[{"name":"GET_GetAllBookingIds✅","event":[{"listen":"test","script":{"id":"65d9bcad-fe14-445d-8d43-54a3c0c204e5","exec":["// ✅ Verify Status Code\r","pm.test(\"Status code is 200\", () => pm.response.to.have.status(200));\r","\r","// ✅ Validate Response Body (Ensure booking IDs list is returned)\r","pm.test(\"Response contains booking IDs\", () => {\r","    let jsonData = pm.response.json();\r","    pm.expect(jsonData).to.be.an('array').that.is.not.empty;\r","});\r","\r","//get booking ID and set as a envirament variable\r","pm.test(\"Extract and set booking ID\", function () {\r","    var responseJSON = pm.response.json(); // Parse the response\r","    if (responseJSON.length > 0) {  // Ensure the response is not empty\r","        var bookingId = responseJSON[0].bookingid; // Get the first booking ID\r","        pm.environment.set(\"booking_id\", bookingId); // Set as environment variable\r","        console.log(\"Booking ID set:\", bookingId); // Log for debugging\r","    } else {\r","        pm.test.skip(\"Response is empty, cannot set booking ID\");\r","    }\r","});"],"type":"text/javascript","packages":{}}}],"id":"d1179854-d9a5-4dfe-be40-b762260f4085","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":false},"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://restful-booker.herokuapp.com/booking","description":"<p>Generated from cURL: curl -i <a href=\"https://restful-booker.herokuapp.com/booking\">https://restful-booker.herokuapp.com/booking</a></p>\n","urlObject":{"protocol":"https","path":["booking"],"host":["restful-booker","herokuapp","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"d1179854-d9a5-4dfe-be40-b762260f4085"},{"name":"PUT_UpdateBookingWithValidData Copy","event":[{"listen":"test","script":{"id":"baaef419-7d35-41ac-a3ea-b0ec51ce9b36","exec":["// ✅ Verify Status Code (Should be 200 OK)\r","pm.test(\"Status code is 200 OK\", () => {\r","    pm.expect(pm.response.code).to.equal(200);\r","});\r","\r","\r","// ✅ Check Response Time (Should be within 2 seconds)\r","pm.test(\"Response time is within acceptable limits\", () => {\r","    pm.expect(pm.response.responseTime).to.be.below(2000);\r","});\r","\r",""],"type":"text/javascript","packages":{}}}],"id":"d7bf10cf-1c5e-40f3-b7b4-0ea3e5293649","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":false},"method":"PUT","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"},{"key":"Cookie","value":"token=f24561cf0620918"}],"body":{"mode":"raw","raw":"{\r\n    \"firstname\" : \"ABC\",\r\n    \"lastname\" : \"PQR\",\r\n    \"totalprice\" : 111,\r\n    \"depositpaid\" : true,\r\n    \"bookingdates\" : {\r\n        \"checkin\" : \"2018-01-01\",\r\n        \"checkout\" : \"2019-01-01\"\r\n    },\r\n    \"additionalneeds\" : \"Breakfast\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://restful-booker.herokuapp.com/booking/{{booking_id}}","description":"<p>Generated from cURL: curl -X PUT <br />  <a href=\"https://restful-booker.herokuapp.com/booking/1\">https://restful-booker.herokuapp.com/booking/1</a> <br />  -H 'Content-Type: application/json' <br />  -H 'Accept: application/json' <br />  -H 'Cookie: token=abc123' <br />  -d '{\n    \"firstname\" : \"James\",\n    \"lastname\" : \"Brown\",\n    \"totalprice\" : 111,\n    \"depositpaid\" : true,\n    \"bookingdates\" : {\n        \"checkin\" : \"2018-01-01\",\n        \"checkout\" : \"2019-01-01\"\n    },\n    \"additionalneeds\" : \"Breakfast\"\n}'</p>\n","urlObject":{"protocol":"https","path":["booking","{{booking_id}}"],"host":["restful-booker","herokuapp","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"d7bf10cf-1c5e-40f3-b7b4-0ea3e5293649"},{"name":"GET_GetBookingById Copy","event":[{"listen":"test","script":{"id":"fde59fa3-77de-47bc-a001-0ae93ffdbb8f","exec":["// ✅ Verify Status Code (Should be 200 if booking exists)\r","pm.test(\"Status code is 200 or 404\", () => {\r","    pm.expect(pm.response.code).to.be.oneOf([200, 404]);\r","});\r","\r","// ✅ Validate Response Body Structure\r","pm.test(\"Response contains valid booking details\", () => {\r","    if (pm.response.code === 200) {\r","        let jsonData = pm.response.json();\r","        pm.expect(jsonData).to.have.property(\"firstname\");\r","        pm.expect(jsonData).to.have.property(\"lastname\");\r","        pm.expect(jsonData).to.have.property(\"totalprice\");\r","        pm.expect(jsonData).to.have.property(\"depositpaid\");\r","        pm.expect(jsonData).to.have.property(\"bookingdates\");\r","        pm.expect(jsonData.bookingdates).to.have.property(\"checkin\");\r","        pm.expect(jsonData.bookingdates).to.have.property(\"checkout\");\r","    } else {\r","        pm.test(\"Response should contain 'reason' for 404\", () => {\r","            let jsonData = pm.response.json();\r","            pm.expect(jsonData).to.have.property(\"reason\");\r","        });\r","    }\r","});\r","\r","// ✅ Validate Content-Type\r","pm.test(\"Content-Type is JSON\", () => {\r","    pm.response.to.have.header(\"Content-Type\");\r","    pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");\r","});\r","\r","// ✅ Check Response Time (Performance Test)\r","pm.test(\"Response time is within 2 seconds\", () => {\r","    pm.expect(pm.response.responseTime).to.be.below(2000);\r","});\r",""],"type":"text/javascript","packages":{}}}],"id":"e3322f32-5828-48ac-ab2b-960273bb97f9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"file","file":{}},"url":"https://restful-booker.herokuapp.com/booking/{{booking_id}}","description":"<p>Generated from cURL: curl -i <a href=\"https://restful-booker.herokuapp.com/booking/1\">https://restful-booker.herokuapp.com/booking/1</a></p>\n","urlObject":{"protocol":"https","path":["booking","{{booking_id}}"],"host":["restful-booker","herokuapp","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"e3322f32-5828-48ac-ab2b-960273bb97f9"}],"id":"83e111e1-da8f-416d-81f3-e111996a785e","_postman_id":"83e111e1-da8f-416d-81f3-e111996a785e","description":""},{"name":"SC03_E2E_Trying to Update on a Delete Id -> 404.","item":[{"name":"PUT_UpdateBookingWithValidData Copy 2","event":[{"listen":"test","script":{"id":"baaef419-7d35-41ac-a3ea-b0ec51ce9b36","exec":["\r","\r","// ✅ Check Response Time (Should be within 2 seconds)\r","pm.test(\"Response time is within acceptable limits\", () => {\r","    pm.expect(pm.response.responseTime).to.be.below(2000);\r","});\r","\r","pm.test(\"Status code is 404\", function () {\r","    pm.response.to.have.status(404);\r","});"],"type":"text/javascript","packages":{}}}],"id":"b214fc1d-fcef-4ee3-a1c9-5897d2344406","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":false},"method":"PUT","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"},{"key":"Cookie","value":"token=f24561cf0620918"}],"body":{"mode":"raw","raw":"{\r\n    \"firstname\" : \"XYZ\",\r\n    \"lastname\" : \"AAAA\",\r\n    \"totalprice\" : 111,\r\n    \"depositpaid\" : true,\r\n    \"bookingdates\" : {\r\n        \"checkin\" : \"2018-01-01\",\r\n        \"checkout\" : \"2019-01-01\"\r\n    },\r\n    \"additionalneeds\" : \"Breakfast\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://restful-booker.herokuapp.com/booking/{{bookingid}}","description":"<p>Generated from cURL: curl -X PUT <br />  <a href=\"https://restful-booker.herokuapp.com/booking/1\">https://restful-booker.herokuapp.com/booking/1</a> <br />  -H 'Content-Type: application/json' <br />  -H 'Accept: application/json' <br />  -H 'Cookie: token=abc123' <br />  -d '{\n    \"firstname\" : \"James\",\n    \"lastname\" : \"Brown\",\n    \"totalprice\" : 111,\n    \"depositpaid\" : true,\n    \"bookingdates\" : {\n        \"checkin\" : \"2018-01-01\",\n        \"checkout\" : \"2019-01-01\"\n    },\n    \"additionalneeds\" : \"Breakfast\"\n}'</p>\n","urlObject":{"protocol":"https","path":["booking","{{bookingid}}"],"host":["restful-booker","herokuapp","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"b214fc1d-fcef-4ee3-a1c9-5897d2344406"}],"id":"fc293b29-0565-436f-9b5d-beb8ee0a4fdd","_postman_id":"fc293b29-0565-436f-9b5d-beb8ee0a4fdd","description":""},{"name":"SC04_E2E_Create a Booking (id) → Update the Booking Name -> Get the Booking by Id and verify the name","item":[{"name":"Post_CreateValidBooking Copy","event":[{"listen":"test","script":{"id":"60e6703b-1f46-46f2-a82d-a9be444bb2f6","exec":["// Verify the status code is 200\r","pm.test(\"Verify the status code is 200\", function () {\r","    pm.expect(pm.response.code).to.equal(200);\r","});\r","\r","\r","var responseJSON = pm.response.json();\r","var bookingid = responseJSON[\"bookingid\"];\r","pm.environment.set(\"bookingid2\", bookingid);\r","    "],"type":"text/javascript","packages":{}}}],"id":"2a669fa2-d572-4fc3-8cb9-90c4fae85cc1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n    \"firstname\" : \"Wilfred\",\r\n    \"lastname\" : \"Prosacco\",\r\n    \"totalprice\" : 111,\r\n    \"depositpaid\" : true,\r\n    \"bookingdates\" : {\r\n        \"checkin\" : \"2018-01-01\",\r\n        \"checkout\" : \"2019-01-01\"\r\n    },\r\n    \"additionalneeds\" : \"Breakfast\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://restful-booker.herokuapp.com/booking","description":"<p>Generated from cURL: curl -X POST <br />  <a href=\"https://restful-booker.herokuapp.com/booking\">https://restful-booker.herokuapp.com/booking</a> <br />  -H 'Content-Type: application/json' <br />  -d '{\n    \"firstname\" : \"Jim\",\n    \"lastname\" : \"Brown\",\n    \"totalprice\" : 111,\n    \"depositpaid\" : true,\n    \"bookingdates\" : {\n        \"checkin\" : \"2018-01-01\",\n        \"checkout\" : \"2019-01-01\"\n    },\n    \"additionalneeds\" : \"Breakfast\"\n}'</p>\n","urlObject":{"protocol":"https","path":["booking"],"host":["restful-booker","herokuapp","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"2a669fa2-d572-4fc3-8cb9-90c4fae85cc1"},{"name":"PATCH_PartialUpdateInvalidData Copy","event":[{"listen":"test","script":{"id":"224d9614-ee1f-4f4c-97b9-44527e695954","exec":["// ✅ Verify Status Code (Should be 200 OK)\r","pm.test(\"Status code is 200 OK\", () => {\r","    pm.expect(pm.response.code).to.equal(200);\r","});\r","\r","// ✅ Validate Response Body\r","pm.test(\"Response body should contain updated fields\", () => {\r","    let jsonData = pm.response.json();\r","    pm.expect(jsonData).to.have.property(\"firstname\", \"James\");\r","    pm.expect(jsonData).to.have.property(\"lastname\", \"Brown\");\r","});\r","\r","// ✅ Check Content-Type\r","pm.test(\"Content-Type is application/json\", () => {\r","    pm.response.to.have.header(\"Content-Type\");\r","    pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");\r","});\r",""],"type":"text/javascript","packages":{}}}],"id":"0e90c981-f358-4775-b99f-5fae67951696","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":false},"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"},{"key":"Cookie","value":"token=f24561cf0620918"}],"body":{"mode":"raw","raw":"{\r\n    \"firstname\" : \"James\",\r\n    \"lastname\" : \"Brown\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://restful-booker.herokuapp.com/booking/{{bookingid2}}","description":"<p>Generated from cURL: curl -X PATCH <br />  <a href=\"https://restful-booker.herokuapp.com/booking/1\">https://restful-booker.herokuapp.com/booking/1</a> <br />  -H 'Content-Type: application/json' <br />  -H 'Accept: application/json' <br />  -H 'Cookie: token=abc123' <br />  -d '{\n    \"firstname\" : \"James\",\n    \"lastname\" : \"Brown\"\n}'</p>\n","urlObject":{"protocol":"https","path":["booking","{{bookingid2}}"],"host":["restful-booker","herokuapp","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"0e90c981-f358-4775-b99f-5fae67951696"}],"id":"2d5a3c18-1b7b-4a48-82f6-6fbc8e16bb55","_postman_id":"2d5a3c18-1b7b-4a48-82f6-6fbc8e16bb55","description":""}]}