{"info":{"_postman_id":"8ff3307d-6cc8-4a93-8194-c8843b990b99","name":"Feedlink","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"45722982","collectionId":"8ff3307d-6cc8-4a93-8194-c8843b990b99","publishedId":"2sB3HtEGLL","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2025-09-19T14:38:07.000Z"},"item":[{"name":"Reviews","item":[{"name":"Get reviews","event":[{"listen":"test","script":{"id":"02382793-2d53-410e-8f1c-2e364db5af5a","exec":["const response = pm.response.json();","","pm.test(\"Status code is 200\", function () {","    pm.expect(pm.response.code).to.equal(200);","});","","pm.test(\"Response time is less than 5000ms\", function () {","    pm.expect(pm.response.responseTime).to.be.below(5000);","});","","pm.test(\"Content-Type is application/json\", function () {","    pm.expect(pm.response.headers.get(\"Content-Type\")).to.equal(\"application/json\");","});","","pm.test(\"Response body is an array\", function () {","    pm.expect(response).to.be.an('array');","});","","response.forEach((review) => {","    pm.test(\"Review object has required fields\", function () {","        pm.expect(review).to.have.all.keys('user', 'order', 'ratings');","    });","","    pm.test(\"User field is a number\", function () {","        pm.expect(review.user).to.be.a('number');","    });","","    pm.test(\"Order field is a number\", function () {","        pm.expect(review.order).to.be.a('number');","    });","","    pm.test(\"Ratings field is a number\", function () {","        pm.expect(review.ratings).to.be.a('number');","    });","});",""],"type":"text/javascript","packages":{},"requests":{}}}],"id":"838cdc6b-c018-41bf-9f0e-7f9d11904617","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://feedlink-210643547921.herokuapp.com/api/reviews/","description":"<h2 id=\"api-endpoint-retrieve-reviews\">API Endpoint: Retrieve Reviews</h2>\n<h3 id=\"request-method\">Request Method</h3>\n<p><code>GET</code></p>\n<h3 id=\"endpoint\">Endpoint</h3>\n<p><code>https://feedlink-210643547921.herokuapp.com/api/reviews/</code></p>\n<h3 id=\"description\">Description</h3>\n<p>This endpoint is used to retrieve a list of reviews associated with orders. The request does not require any parameters to be passed in the URL.</p>\n<h3 id=\"expected-response\">Expected Response</h3>\n<p>On a successful request, the server responds with a status code of <code>200</code> and returns a JSON array containing review objects. Each review object includes the following fields:</p>\n<ul>\n<li><p><strong>user</strong>: An identifier for the user who submitted the review.</p>\n</li>\n<li><p><strong>order</strong>: An identifier for the order associated with the review.</p>\n</li>\n<li><p><strong>ratings</strong>: The rating given by the user for the order.</p>\n</li>\n</ul>\n<p>The response format is as follows:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">[\n    {\n        \"user\": 0,\n        \"order\": 0,\n        \"ratings\": 0\n    }\n]\n\n</code></pre>\n<p>This structure allows clients to easily parse the reviews and their associated data.</p>\n","urlObject":{"protocol":"https","path":["api","reviews",""],"host":["feedlink-210643547921","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"fe02433c-220b-4de5-951b-7a2c85657434","name":"get reviews","originalRequest":{"method":"GET","header":[],"url":"https://feedlink-210643547921.herokuapp.com/api/reviews/"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Allow","value":"GET, POST, HEAD, OPTIONS"},{"key":"Content-Length","value":"136"},{"key":"Content-Type","value":"application/json"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Date","value":"Fri, 19 Sep 2025 13:00:57 GMT"},{"key":"Nel","value":"{\"report_to\":\"heroku-nel\",\"response_headers\":[\"Via\"],\"max_age\":3600,\"success_fraction\":0.01,\"failure_fraction\":0.1}"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Report-To","value":"{\"group\":\"heroku-nel\",\"endpoints\":[{\"url\":\"https://nel.heroku.com/reports?s=jOWixGYJ7WI7LePG3XjqzNDvsSVjpm2tJiP%2BKDr2bhM%3D\\u0026sid=1b10b0ff-8a76-4548-befa-353fc6c6c045\\u0026ts=1758286857\"}],\"max_age\":3600}"},{"key":"Reporting-Endpoints","value":"heroku-nel=\"https://nel.heroku.com/reports?s=jOWixGYJ7WI7LePG3XjqzNDvsSVjpm2tJiP%2BKDr2bhM%3D&sid=1b10b0ff-8a76-4548-befa-353fc6c6c045&ts=1758286857\""},{"key":"Server","value":"Heroku"},{"key":"Vary","value":"Accept, origin"},{"key":"Via","value":"1.1 heroku-router"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"user\": 7,\n        \"order\": 1,\n        \"ratings\": 3\n    },\n    {\n        \"user\": 11,\n        \"order\": 2,\n        \"ratings\": 2\n    },\n    {\n        \"user\": 14,\n        \"order\": 1,\n        \"ratings\": 3\n    },\n    {\n        \"user\": 14,\n        \"order\": 2,\n        \"ratings\": 3\n    }\n]"}],"_postman_id":"838cdc6b-c018-41bf-9f0e-7f9d11904617"}],"id":"cdf84eab-bee5-410f-aa0f-c5509bc01d51","_postman_id":"cdf84eab-bee5-410f-aa0f-c5509bc01d51","description":""},{"name":"Orders","item":[{"name":"order","item":[{"name":"orders","event":[{"listen":"test","script":{"id":"9a553869-e523-49e1-91df-8abecd218592","exec":["pm.test(\"Status code is 200\", () => {","    pm.response.to.have.status(200);","});","","pm.test(\"Response time < 5000ms\", () => {","    pm.expect(pm.response.responseTime).to.be.below(5000);","});","","pm.test(\"Content-Type is application/json\", () => {","    pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");","});","","const orders = pm.response.json();","pm.test(\"Response is a non-empty JSON array\", () => {","    pm.expect(orders).to.be.an(\"array\");","    pm.expect(orders.length).to.be.above(0);","});","","pm.test(\"All orders have correct structure and types\", () => {","    orders.forEach((order, idx) => {","        pm.expect(order.user === null || typeof order.user === 'number',","            `Order ${idx}: user should be number or null, got ${typeof order.user}`","        ).to.be.true;","","        pm.expect(order.order_id).to.be.a('number');","        pm.expect(order.order_date).to.be.a('string');","        pm.expect(order.order_status).to.be.a('string');","        pm.expect(order.payment_status).to.be.a('string');","        pm.expect(order.total_amount).to.be.a('string');","        pm.expect(order.pin).to.be.a('string');","        pm.expect(order.created_at).to.be.a('string');","        pm.expect(order.updated_at).to.be.a('string');","        pm.expect(order.items).to.be.an('array');","","        order.items.forEach((item, itemIdx) => {","            pm.expect(item.id).to.be.a('number');","            pm.expect(item.quantity).to.be.a('number');","            pm.expect(item.price).to.be.a('string');","            pm.expect(item.created_at).to.be.a('string');","            pm.expect(item.updated_at).to.be.a('string');","            pm.expect(item.order).to.be.a('number');","            pm.expect(item.listing).to.be.a('number');","        });","    });","});"],"type":"text/javascript","packages":{},"requests":{}}}],"id":"6b7f2a56-192e-4f9c-a13b-294524bcc134","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"url":"https://feedlink-210643547921.herokuapp.com/api/orders/","description":"<h3 id=\"endpoint-description\">Endpoint Description</h3>\n<p>This endpoint retrieves a list of orders from the system. It allows clients to access information about existing orders, including details about the items within each order, user information, order status, and payment status.</p>\n<h3 id=\"request-format\">Request Format</h3>\n<ul>\n<li><p><strong>Method:</strong> GET</p>\n</li>\n<li><p><strong>URL:</strong> <code>https://feedlink-210643547921.herokuapp.com/api/orders/</code></p>\n</li>\n<li><p><strong>Request Body:</strong> No request body is required for this GET request.</p>\n</li>\n</ul>\n<h3 id=\"response-structure\">Response Structure</h3>\n<p>On a successful request, the server responds with a JSON array containing order objects. Each order object includes the following fields:</p>\n<ul>\n<li><p><strong>order_id</strong>: (integer) Unique identifier for the order.</p>\n</li>\n<li><p><strong>items</strong>: (array) A list of items associated with the order, where each item contains:</p>\n<ul>\n<li><p><strong>id</strong>: (integer) Unique identifier for the item.</p>\n</li>\n<li><p><strong>quantity</strong>: (integer) The quantity of the item ordered.</p>\n</li>\n<li><p><strong>price</strong>: (string) The price of the item.</p>\n</li>\n<li><p><strong>created_at</strong>: (string) Timestamp when the item was created.</p>\n</li>\n<li><p><strong>updated_at</strong>: (string) Timestamp when the item was last updated.</p>\n</li>\n<li><p><strong>order</strong>: (integer) Reference to the associated order.</p>\n</li>\n<li><p><strong>listing</strong>: (integer) Reference to the item listing.</p>\n</li>\n</ul>\n</li>\n<li><p><strong>user</strong>: (integer) Identifier for the user who placed the order.</p>\n</li>\n<li><p><strong>order_date</strong>: (string) Date when the order was placed.</p>\n</li>\n<li><p><strong>order_status</strong>: (string) Current status of the order (e.g., pending, completed).</p>\n</li>\n<li><p><strong>payment_status</strong>: (string) Current status of the payment (e.g., paid, unpaid).</p>\n</li>\n<li><p><strong>total_amount</strong>: (string) Total amount for the order.</p>\n</li>\n<li><p><strong>pin</strong>: (string) Optional pin associated with the order.</p>\n</li>\n<li><p><strong>created_at</strong>: (string) Timestamp when the order was created.</p>\n</li>\n<li><p><strong>updated_at</strong>: (string) Timestamp when the order was last updated.</p>\n</li>\n</ul>\n<h3 id=\"example-response\">Example Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">[\n  {\n    \"order_id\": 0,\n    \"items\": [\n      {\n        \"id\": 0,\n        \"quantity\": 0,\n        \"price\": \"\",\n        \"created_at\": \"\",\n        \"updated_at\": \"\",\n        \"order\": 0,\n        \"listing\": 0\n      }\n    ],\n    \"user\": 0,\n    \"order_date\": \"\",\n    \"order_status\": \"\",\n    \"payment_status\": \"\",\n    \"total_amount\": \"\",\n    \"pin\": \"\",\n    \"created_at\": \"\",\n    \"updated_at\": \"\"\n  }\n]\n\n</code></pre>\n","urlObject":{"protocol":"https","path":["api","orders",""],"host":["feedlink-210643547921","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"e1d2a4a9-fcf1-4f86-a84d-e6c1ac4b7545","name":"orders","originalRequest":{"method":"GET","header":[],"url":"https://feedlink-210643547921.herokuapp.com/api/orders/"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Allow","value":"GET, POST, HEAD, OPTIONS"},{"key":"Content-Length","value":"895"},{"key":"Content-Type","value":"application/json"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Date","value":"Fri, 19 Sep 2025 13:06:48 GMT"},{"key":"Nel","value":"{\"report_to\":\"heroku-nel\",\"response_headers\":[\"Via\"],\"max_age\":3600,\"success_fraction\":0.01,\"failure_fraction\":0.1}"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Report-To","value":"{\"group\":\"heroku-nel\",\"endpoints\":[{\"url\":\"https://nel.heroku.com/reports?s=ewbYjEuZjAW33GptwSCERtt2S7PHluFureSI8zlFFbs%3D\\u0026sid=1b10b0ff-8a76-4548-befa-353fc6c6c045\\u0026ts=1758287208\"}],\"max_age\":3600}"},{"key":"Reporting-Endpoints","value":"heroku-nel=\"https://nel.heroku.com/reports?s=ewbYjEuZjAW33GptwSCERtt2S7PHluFureSI8zlFFbs%3D&sid=1b10b0ff-8a76-4548-befa-353fc6c6c045&ts=1758287208\""},{"key":"Server","value":"Heroku"},{"key":"Vary","value":"Accept, origin"},{"key":"Via","value":"1.1 heroku-router"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"order_id\": 1,\n        \"items\": [\n            {\n                \"id\": 2,\n                \"quantity\": 6,\n                \"price\": \"10.00\",\n                \"created_at\": \"2025-09-19T12:25:22.714721Z\",\n                \"updated_at\": \"2025-09-19T12:25:22.714736Z\",\n                \"order\": 1,\n                \"listing\": 4\n            }\n        ],\n        \"user\": 9,\n        \"order_date\": \"2025-09-19T12:18:27.629159Z\",\n        \"order_status\": \"picked\",\n        \"payment_status\": \"unpaid\",\n        \"total_amount\": \"60.00\",\n        \"pin\": \"4115\",\n        \"created_at\": \"2025-09-19T12:18:27.634985Z\",\n        \"updated_at\": \"2025-09-19T12:18:27.634992Z\"\n    },\n    {\n        \"order_id\": 2,\n        \"items\": [],\n        \"user\": 17,\n        \"order_date\": \"2025-09-19T12:40:39.659283Z\",\n        \"order_status\": \"pending\",\n        \"payment_status\": \"unpaid\",\n        \"total_amount\": \"0.00\",\n        \"pin\": \"6194\",\n        \"created_at\": \"2025-09-19T12:40:39.663341Z\",\n        \"updated_at\": \"2025-09-19T12:40:39.663348Z\"\n    },\n    {\n        \"order_id\": 3,\n        \"items\": [],\n        \"user\": 17,\n        \"order_date\": \"2025-09-19T12:40:53.808809Z\",\n        \"order_status\": \"picked\",\n        \"payment_status\": \"paid\",\n        \"total_amount\": \"0.00\",\n        \"pin\": \"7043\",\n        \"created_at\": \"2025-09-19T12:40:53.811198Z\",\n        \"updated_at\": \"2025-09-19T12:40:53.811205Z\"\n    }\n]"}],"_postman_id":"6b7f2a56-192e-4f9c-a13b-294524bcc134"},{"name":"orders","event":[{"listen":"test","script":{"id":"aee634e5-fd6c-465c-a379-082fbb029751","exec":["pm.test(\"Status code is 201\", function () {","    pm.response.to.have.status(201);","});","","pm.test(\"Response time is less than 5000ms\", function () {","    pm.expect(pm.response.responseTime).to.be.below(5000);","});","","pm.test(\"Content-Type is application/json\", function () {","    pm.response.to.have.header(\"Content-Type\");","    pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");","});","","pm.test(\"Response has all required fields\", function () {","    var jsonData = pm.response.json();","    pm.expect(jsonData).to.have.property(\"order_id\");","    pm.expect(jsonData).to.have.property(\"items\");","    pm.expect(jsonData).to.have.property(\"user\");","    pm.expect(jsonData).to.have.property(\"order_date\");","    pm.expect(jsonData).to.have.property(\"order_status\");","    pm.expect(jsonData).to.have.property(\"payment_status\");","    pm.expect(jsonData).to.have.property(\"total_amount\");","    pm.expect(jsonData).to.have.property(\"pin\");","    pm.expect(jsonData).to.have.property(\"created_at\");","    pm.expect(jsonData).to.have.property(\"updated_at\");","});","","pm.test(\"Field types are correct\", function () {","    var jsonData = pm.response.json();","    pm.expect(jsonData.order_id).to.be.a(\"number\");","    pm.expect(jsonData.items).to.be.an(\"array\");","    pm.expect(jsonData.user).to.be.a(\"number\");","    pm.expect(jsonData.order_date).to.be.a(\"string\");","    pm.expect(jsonData.order_status).to.be.a(\"string\");","    pm.expect(jsonData.payment_status).to.be.a(\"string\");","    pm.expect(jsonData.total_amount).to.be.a(\"string\");","    pm.expect(jsonData.pin).to.be.a(\"string\");","    pm.expect(jsonData.created_at).to.be.a(\"string\");","    pm.expect(jsonData.updated_at).to.be.a(\"string\");","","    var iso8601regex = /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d+Z$/;","    pm.expect(jsonData.order_date).to.match(iso8601regex);","    pm.expect(jsonData.created_at).to.match(iso8601regex);","    pm.expect(jsonData.updated_at).to.match(iso8601regex);","});"],"type":"text/javascript","packages":{},"requests":{}}}],"id":"cf3131c5-89da-43d1-b8ac-ed2ceadb2814","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n   \n        \"user\": 9,\n        \"order_date\": \"2025-09-19T12:18:27.629159Z\",\n        \"order_status\": \"picked\",\n        \"payment_status\": \"unpaid\"\n}","options":{"raw":{"language":"json"}}},"url":"https://feedlink-210643547921.herokuapp.com/api/orders/","urlObject":{"protocol":"https","path":["api","orders",""],"host":["feedlink-210643547921","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"2137de3c-4153-4ffd-9986-a6cd5298b4c6","name":"orders","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n   \n        \"user\": 9,\n        \"order_date\": \"2025-09-19T12:18:27.629159Z\",\n        \"order_status\": \"picked\",\n        \"payment_status\": \"unpaid\"\n}","options":{"raw":{"language":"json"}}},"url":"https://feedlink-210643547921.herokuapp.com/api/orders/"},"status":"Created","code":201,"_postman_previewlanguage":null,"header":[{"key":"Allow","value":"GET, POST, HEAD, OPTIONS"},{"key":"Content-Length","value":"248"},{"key":"Content-Type","value":"application/json"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Date","value":"Fri, 19 Sep 2025 13:10:12 GMT"},{"key":"Nel","value":"{\"report_to\":\"heroku-nel\",\"response_headers\":[\"Via\"],\"max_age\":3600,\"success_fraction\":0.01,\"failure_fraction\":0.1}"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Report-To","value":"{\"group\":\"heroku-nel\",\"endpoints\":[{\"url\":\"https://nel.heroku.com/reports?s=Vd6GIoM6KDZRA9vDqRwK9b6qhu1Yvw5pcNxI80xB75A%3D\\u0026sid=1b10b0ff-8a76-4548-befa-353fc6c6c045\\u0026ts=1758287412\"}],\"max_age\":3600}"},{"key":"Reporting-Endpoints","value":"heroku-nel=\"https://nel.heroku.com/reports?s=Vd6GIoM6KDZRA9vDqRwK9b6qhu1Yvw5pcNxI80xB75A%3D&sid=1b10b0ff-8a76-4548-befa-353fc6c6c045&ts=1758287412\""},{"key":"Server","value":"Heroku"},{"key":"Vary","value":"Accept, origin"},{"key":"Via","value":"1.1 heroku-router"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"}],"cookie":[],"responseTime":null,"body":"{\n    \"order_id\": 4,\n    \"items\": [],\n    \"user\": 9,\n    \"order_date\": \"2025-09-19T13:10:12.555129Z\",\n    \"order_status\": \"picked\",\n    \"payment_status\": \"unpaid\",\n    \"total_amount\": \"0.00\",\n    \"pin\": \"1659\",\n    \"created_at\": \"2025-09-19T13:10:12.558185Z\",\n    \"updated_at\": \"2025-09-19T13:10:12.558192Z\"\n}"}],"_postman_id":"cf3131c5-89da-43d1-b8ac-ed2ceadb2814"},{"name":"orders","event":[{"listen":"test","script":{"id":"0a6eaebc-6235-4752-8056-f1b63b7be673","exec":["pm.test(\"Status code is 200 or 404\", function () {","    pm.expect(pm.response.code).to.be.oneOf([200, 404]);","});","if (pm.response.code === 200) {","    pm.test(\"Response time is less than 5000ms\", function () {","        pm.expect(pm.response.responseTime).to.be.below(5000);","    });","    pm.test(\"Content-Type header is application/json\", function () {","        pm.response.to.have.header(\"Content-Type\");","        pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");","    });","    pm.test(\"Response body contains required fields with correct types\", function () {","        var jsonData = pm.response.json();","        var requiredFields = [","            \"order_id\", \"items\", \"user\", \"order_date\", \"order_status\",","            \"payment_status\", \"total_amount\", \"pin\", \"created_at\", \"updated_at\"","        ];","        requiredFields.forEach(function(field) {","            pm.expect(jsonData, `Missing top-level field: ${field}`).to.have.property(field);","        });","        pm.expect(jsonData.order_id).to.be.a(\"number\");","        pm.expect(jsonData.items).to.be.an(\"array\");","        pm.expect(jsonData.user).to.be.a(\"number\");","        pm.expect(jsonData.order_date).to.be.a(\"string\");","        pm.expect(jsonData.order_status).to.be.a(\"string\");","        pm.expect(jsonData.payment_status).to.be.a(\"string\");","        pm.expect(jsonData.total_amount).to.be.a(\"string\");","        pm.expect(jsonData.pin).to.be.a(\"string\");","        pm.expect(jsonData.created_at).to.be.a(\"string\");","        pm.expect(jsonData.updated_at).to.be.a(\"string\");","        if (jsonData.items.length > 0) {","            jsonData.items.forEach(function(item, index) {","                pm.expect(item, `Item at index ${index} missing 'id'`).to.have.property(\"id\").that.is.a(\"number\");","                pm.expect(item, `Item at index ${index} missing 'quantity'`).to.have.property(\"quantity\").that.is.a(\"number\");","                pm.expect(item, `Item at index ${index} missing 'price'`).to.have.property(\"price\").that.is.a(\"string\");","                pm.expect(item, `Item at index ${index} missing 'created_at'`).to.have.property(\"created_at\").that.is.a(\"string\");","                pm.expect(item, `Item at index ${index} missing 'updated_at'`).to.have.property(\"updated_at\").that.is.a(\"string\");","                pm.expect(item, `Item at index ${index} missing 'order'`).to.have.property(\"order\").that.is.a(\"number\");","                pm.expect(item, `Item at index ${index} missing 'listing'`).to.have.property(\"listing\").that.is.a(\"number\");","            });","        }","    });","}","else if (pm.response.code === 404) {","    pm.test(\"404 response handled gracefully\", function () {","        pm.expect(true).to.be.true;","    });","    pm.test(\"404 response may contain error message (optional)\", function () {","        const contentType = pm.response.headers.get(\"Content-Type\") || \"\";","        if (contentType.includes(\"application/json\")) {","            try {","                const body = pm.response.json();","                if (body.message || body.error) {","                    pm.expect(body.message || body.error).to.be.a(\"string\");","                }","            } catch (e) {","            }","        }","    });","}"],"type":"text/javascript","packages":{},"requests":{}}}],"id":"41ee6331-f062-4d64-bef3-2226813dd4e4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n       \n        \"order_status\": \"pending\",\n        \"payment_status\": \"paid\"\n        \n    }"},"url":"https://feedlink-210643547921.herokuapp.com/api/orders/80/","urlObject":{"protocol":"https","path":["api","orders","80",""],"host":["feedlink-210643547921","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"1f1ad741-7ea8-45e5-a5fc-8c403a2f53d8","name":"orders","originalRequest":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n       \n        \"order_status\": \"pending\",\n        \"payment_status\": \"paid\"\n        \n    }"},"url":"https://feedlink-210643547921.herokuapp.com/api/orders/1/"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Allow","value":"GET, PUT, PATCH, DELETE, HEAD, OPTIONS"},{"key":"Content-Length","value":"393"},{"key":"Content-Type","value":"application/json"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Date","value":"Fri, 19 Sep 2025 13:16:29 GMT"},{"key":"Nel","value":"{\"report_to\":\"heroku-nel\",\"response_headers\":[\"Via\"],\"max_age\":3600,\"success_fraction\":0.01,\"failure_fraction\":0.1}"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Report-To","value":"{\"group\":\"heroku-nel\",\"endpoints\":[{\"url\":\"https://nel.heroku.com/reports?s=7odIjgv8oNAeD5deeGA6rqXCsZk5AxfSj94NVwWapPo%3D\\u0026sid=1b10b0ff-8a76-4548-befa-353fc6c6c045\\u0026ts=1758287789\"}],\"max_age\":3600}"},{"key":"Reporting-Endpoints","value":"heroku-nel=\"https://nel.heroku.com/reports?s=7odIjgv8oNAeD5deeGA6rqXCsZk5AxfSj94NVwWapPo%3D&sid=1b10b0ff-8a76-4548-befa-353fc6c6c045&ts=1758287789\""},{"key":"Server","value":"Heroku"},{"key":"Vary","value":"Accept, origin"},{"key":"Via","value":"1.1 heroku-router"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"}],"cookie":[],"responseTime":null,"body":"{\n    \"order_id\": 1,\n    \"items\": [\n        {\n            \"id\": 2,\n            \"quantity\": 6,\n            \"price\": \"10.00\",\n            \"created_at\": \"2025-09-19T12:25:22.714721Z\",\n            \"updated_at\": \"2025-09-19T12:25:22.714736Z\",\n            \"order\": 1,\n            \"listing\": 4\n        }\n    ],\n    \"user\": 9,\n    \"order_date\": \"2025-09-19T12:18:27.629159Z\",\n    \"order_status\": \"pending\",\n    \"payment_status\": \"paid\",\n    \"total_amount\": \"60.00\",\n    \"pin\": \"4115\",\n    \"created_at\": \"2025-09-19T12:18:27.634985Z\",\n    \"updated_at\": \"2025-09-19T13:16:29.302419Z\"\n}"}],"_postman_id":"41ee6331-f062-4d64-bef3-2226813dd4e4"},{"name":"New Request","id":"e85cc0af-9f3a-4cca-86c7-84a6836d466a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"e85cc0af-9f3a-4cca-86c7-84a6836d466a"}],"id":"26398a35-989c-4f8c-b134-7cbb8202b51b","_postman_id":"26398a35-989c-4f8c-b134-7cbb8202b51b","description":""},{"name":"claims","item":[{"name":"claims","event":[{"listen":"test","script":{"id":"58dce30c-6422-42d4-b33a-d0aa619eb23c","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});","","pm.test(\"Response time is less than 5000ms\", function () {","    pm.expect(pm.response.responseTime).to.be.below(5000);","});","","pm.test(\"Content-Type is application/json\", function () {","    pm.response.to.have.header(\"Content-Type\", \"application/json\");","});","","pm.test(\"Response body has required fields with correct data types\", function () {","    var jsonData = pm.response.json();","    jsonData.forEach(function(item) {","        pm.expect(item).to.have.property('waste_id').that.is.a('number');","        pm.expect(item).to.have.property('user').that.is.a('number');","        pm.expect(item).to.have.property('listing_id').that.is.a('number');","        pm.expect(item).to.have.property('claim_time').that.is.a('string');","        pm.expect(item).to.have.property('claim_status').that.is.a('string');","        pm.expect(item).to.have.property('pin').that.is.a('string');","        pm.expect(item).to.have.property('created_at').that.is.a('string');","        pm.expect(item).to.have.property('updated_at').that.is.a('string');","        ","        var isoDatetimeRegex = /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d+Z$/;","        pm.expect(item.claim_time).to.match(isoDatetimeRegex);","        pm.expect(item.created_at).to.match(isoDatetimeRegex);","        pm.expect(item.updated_at).to.match(isoDatetimeRegex);","    });","});"],"type":"text/javascript","packages":{},"requests":{}}}],"id":"04331096-0ee8-4670-8634-ead488be3db9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"url":"https://feedlink-210643547921.herokuapp.com/api/wasteclaims/","urlObject":{"protocol":"https","path":["api","wasteclaims",""],"host":["feedlink-210643547921","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"f09222fa-b6aa-46c4-afea-4ceafe3b4834","name":"New Request","originalRequest":{"method":"GET","header":[],"url":"https://feedlink-210643547921.herokuapp.com/api/wasteclaims/"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Allow","value":"GET, POST, HEAD, OPTIONS"},{"key":"Content-Length","value":"620"},{"key":"Content-Type","value":"application/json"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Date","value":"Fri, 19 Sep 2025 13:20:02 GMT"},{"key":"Nel","value":"{\"report_to\":\"heroku-nel\",\"response_headers\":[\"Via\"],\"max_age\":3600,\"success_fraction\":0.01,\"failure_fraction\":0.1}"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Report-To","value":"{\"group\":\"heroku-nel\",\"endpoints\":[{\"url\":\"https://nel.heroku.com/reports?s=UtMmcB9SiCk1tJULgVs%2FMAyIJri7c3iofpONgxfdfYA%3D\\u0026sid=1b10b0ff-8a76-4548-befa-353fc6c6c045\\u0026ts=1758288002\"}],\"max_age\":3600}"},{"key":"Reporting-Endpoints","value":"heroku-nel=\"https://nel.heroku.com/reports?s=UtMmcB9SiCk1tJULgVs%2FMAyIJri7c3iofpONgxfdfYA%3D&sid=1b10b0ff-8a76-4548-befa-353fc6c6c045&ts=1758288002\""},{"key":"Server","value":"Heroku"},{"key":"Vary","value":"Accept, origin"},{"key":"Via","value":"1.1 heroku-router"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"waste_id\": 3,\n        \"user\": 8,\n        \"listing_id\": 2,\n        \"claim_time\": \"2025-09-19T12:30:32.941155Z\",\n        \"claim_status\": \"pending\",\n        \"pin\": \"1494\",\n        \"created_at\": \"2025-09-19T12:30:32.947854Z\",\n        \"updated_at\": \"2025-09-19T12:30:32.947864Z\"\n    },\n    {\n        \"waste_id\": 2,\n        \"user\": 8,\n        \"listing_id\": 3,\n        \"claim_time\": \"2025-09-19T12:30:04.958247Z\",\n        \"claim_status\": \"pending\",\n        \"pin\": \"3943\",\n        \"created_at\": \"2025-09-19T12:30:04.960928Z\",\n        \"updated_at\": \"2025-09-19T12:30:04.960934Z\"\n    },\n    {\n        \"waste_id\": 1,\n        \"user\": 13,\n        \"listing_id\": 5,\n        \"claim_time\": \"2025-09-19T12:29:38.257312Z\",\n        \"claim_status\": \"pending\",\n        \"pin\": \"8474\",\n        \"created_at\": \"2025-09-19T12:29:38.259669Z\",\n        \"updated_at\": \"2025-09-19T12:29:38.259676Z\"\n    }\n]"}],"_postman_id":"04331096-0ee8-4670-8634-ead488be3db9"},{"name":"claims","event":[{"listen":"test","script":{"id":"e9508626-bd5c-42eb-b23c-922fea8d828a","exec":["pm.test(\"Status code is 201 or 400\", function () {","    pm.expect(pm.response.code).to.be.oneOf([201, 400]);","});","if (pm.response.code === 201) {","    pm.test(\"Response time is less than 5000ms\", function () {","        pm.expect(pm.response.responseTime).to.be.below(5000);","    });","    pm.test(\"Content-Type is application/json\", function () {","        pm.response.to.have.header(\"Content-Type\");","        pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");","    });","    pm.test(\"Response has required fields with correct data types\", function () {","        var jsonData = pm.response.json();","        pm.expect(jsonData).to.have.property('user').that.is.a('number');","        pm.expect(jsonData).to.have.property('listing_id').that.is.a('number');","        pm.expect(jsonData).to.have.property('claim_time').that.is.a('string');","        pm.expect(jsonData).to.have.property('claim_status').that.is.a('string');","    });","}","else if (pm.response.code === 400) {","    pm.test(\"400 error is accepted (no failure)\", function () {","        pm.expect(true).to.be.true;","    });","    pm.test(\"400 response may contain error details (optional)\", function () {","        const contentType = pm.response.headers.get(\"Content-Type\") || \"\";","        if (contentType.includes(\"application/json\")) {","            try {","                const body = pm.response.json();","                if (body.error || body.message || body.detail) {","                    pm.expect(body.error || body.message || body.detail).to.be.a(\"string\");","                }","            } catch (e) {","            }","        }","    });","}"],"type":"text/javascript","packages":{},"requests":{}}}],"id":"eddec7a9-6a9d-4867-a00f-b91d24ec2f83","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"\n {\n        \"waste_id\": 208,\n        \"user\": 18,\n        \"listing_id\": 154,\n        \"claim_time\": \"2025-10-07T07:23:00.554570Z\",\n        \"claim_status\": \"pending\",\n        \"created_at\": \"2025-10-07T07:23:00.557793Z\",\n        \"updated_at\": \"2025-10-07T07:23:00.557800Z\"\n    }","options":{"raw":{"language":"json"}}},"url":"https://feedlink-210643547921.herokuapp.com/api/wasteclaims/","urlObject":{"protocol":"https","path":["api","wasteclaims",""],"host":["feedlink-210643547921","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"af40afbf-2ffb-41ed-8ac3-4099edf51e95","name":"New Request","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"\n    {\n        \"user\": 10,\n        \"listing_id\": 3,\n        \"claim_time\": \"2025-09-19T12:30:32.941155Z\",\n        \"claim_status\": \"pending\"\n    }","options":{"raw":{"language":"json"}}},"url":"https://feedlink-210643547921.herokuapp.com/api/wasteclaims/"},"status":"Created","code":201,"_postman_previewlanguage":null,"header":[{"key":"Allow","value":"GET, POST, HEAD, OPTIONS"},{"key":"Content-Length","value":"206"},{"key":"Content-Type","value":"application/json"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Date","value":"Fri, 19 Sep 2025 13:27:25 GMT"},{"key":"Nel","value":"{\"report_to\":\"heroku-nel\",\"response_headers\":[\"Via\"],\"max_age\":3600,\"success_fraction\":0.01,\"failure_fraction\":0.1}"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Report-To","value":"{\"group\":\"heroku-nel\",\"endpoints\":[{\"url\":\"https://nel.heroku.com/reports?s=GjF9ltnOXOEFxlZLp2305KKAr8g4%2BAbdvprSn9x%2FZeU%3D\\u0026sid=1b10b0ff-8a76-4548-befa-353fc6c6c045\\u0026ts=1758288445\"}],\"max_age\":3600}"},{"key":"Reporting-Endpoints","value":"heroku-nel=\"https://nel.heroku.com/reports?s=GjF9ltnOXOEFxlZLp2305KKAr8g4%2BAbdvprSn9x%2FZeU%3D&sid=1b10b0ff-8a76-4548-befa-353fc6c6c045&ts=1758288445\""},{"key":"Server","value":"Heroku"},{"key":"Vary","value":"Accept, origin"},{"key":"Via","value":"1.1 heroku-router"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"}],"cookie":[],"responseTime":null,"body":"{\n    \"waste_id\": 5,\n    \"user\": 10,\n    \"listing_id\": 3,\n    \"claim_time\": \"2025-09-19T13:27:25.527351Z\",\n    \"claim_status\": \"pending\",\n    \"pin\": \"7260\",\n    \"created_at\": \"2025-09-19T13:27:25.533359Z\",\n    \"updated_at\": \"2025-09-19T13:27:25.533367Z\"\n}"}],"_postman_id":"eddec7a9-6a9d-4867-a00f-b91d24ec2f83"},{"name":"claims","event":[{"listen":"test","script":{"id":"e23fd276-7a96-4478-bfab-5f8121f01f8a","exec":["pm.test(\"Status code is 200 or 404\", function () {","    pm.expect(pm.response.code).to.be.oneOf([200, 404]);","});","if (pm.response.code === 200) {","    pm.test(\"Response time is less than 5000ms\", function () {","        pm.expect(pm.response.responseTime).to.be.below(5000);","    });","    pm.test(\"Content-Type header is application/json\", function () {","        pm.response.to.have.header(\"Content-Type\");","        pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");","    });","    pm.test(\"Response body has required fields with correct data types\", function () {","        var jsonData = pm.response.json();","        pm.expect(jsonData).to.have.property(\"claim_status\");","        pm.expect(jsonData.claim_status).to.be.a(\"string\");","    });","}","else if (pm.response.code === 404) {","    pm.test(\"404 response is accepted\", function () {","        pm.expect(true).to.be.true;","    });","    pm.test(\"404 response may contain JSON error (optional)\", function () {","        const contentType = pm.response.headers.get(\"Content-Type\") || \"\";","        if (contentType.includes(\"application/json\")) {","            try {","                const body = pm.response.json();","                if (body.detail) {","                    pm.expect(body.detail).to.be.a(\"string\");","                }","            } catch (e) {","            }","        }","    });","}"],"type":"text/javascript","packages":{},"requests":{}}}],"id":"590e24e3-45f2-4094-9fa3-4476c5b4a23d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n        \"waste_id\": 207,\n        \"user\": 18,\n        \"listing_id\": 154,\n        \"claim_time\": \"2025-10-07T07:23:00.554570Z\",\n        \"claim_status\": \"collected\",\n        \"pin\": \"3186\",\n        \"created_at\": \"2025-10-07T07:23:00.557793Z\",\n        \"updated_at\": \"2025-10-07T07:23:00.557800Z\"\n    }"},"url":"https://feedlink-210643547921.herokuapp.com/api/wasteclaims/207/","urlObject":{"protocol":"https","path":["api","wasteclaims","207",""],"host":["feedlink-210643547921","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"8b77779d-bc1c-4934-be38-f5176c4fa90f","name":"New Request","originalRequest":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n        \"claim_status\": \"collected\"\n    }"},"url":"https://feedlink-210643547921.herokuapp.com/api/wasteclaims/1/"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Allow","value":"GET, PUT, PATCH, DELETE, HEAD, OPTIONS"},{"key":"Content-Length","value":"208"},{"key":"Content-Type","value":"application/json"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Date","value":"Fri, 19 Sep 2025 13:29:37 GMT"},{"key":"Nel","value":"{\"report_to\":\"heroku-nel\",\"response_headers\":[\"Via\"],\"max_age\":3600,\"success_fraction\":0.01,\"failure_fraction\":0.1}"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Report-To","value":"{\"group\":\"heroku-nel\",\"endpoints\":[{\"url\":\"https://nel.heroku.com/reports?s=T1a90yQVKfWZZFZ5bj94yT%2F0Gq%2BXAeQTKHAtXlsNpKU%3D\\u0026sid=1b10b0ff-8a76-4548-befa-353fc6c6c045\\u0026ts=1758288576\"}],\"max_age\":3600}"},{"key":"Reporting-Endpoints","value":"heroku-nel=\"https://nel.heroku.com/reports?s=T1a90yQVKfWZZFZ5bj94yT%2F0Gq%2BXAeQTKHAtXlsNpKU%3D&sid=1b10b0ff-8a76-4548-befa-353fc6c6c045&ts=1758288576\""},{"key":"Server","value":"Heroku"},{"key":"Vary","value":"Accept, origin"},{"key":"Via","value":"1.1 heroku-router"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"}],"cookie":[],"responseTime":null,"body":"{\n    \"waste_id\": 1,\n    \"user\": 13,\n    \"listing_id\": 5,\n    \"claim_time\": \"2025-09-19T12:29:38.257312Z\",\n    \"claim_status\": \"collected\",\n    \"pin\": \"8474\",\n    \"created_at\": \"2025-09-19T12:29:38.259669Z\",\n    \"updated_at\": \"2025-09-19T13:29:37.233141Z\"\n}"}],"_postman_id":"590e24e3-45f2-4094-9fa3-4476c5b4a23d"}],"id":"53ba29c1-74d4-43df-9e7f-e85770dc9e6d","_postman_id":"53ba29c1-74d4-43df-9e7f-e85770dc9e6d","description":""},{"name":"item","item":[{"name":"item","event":[{"listen":"test","script":{"id":"72021165-7da6-40e4-bb33-a30e019fe366","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});","","pm.test(\"Response time is less than 5000ms\", function () {","    pm.expect(pm.response.responseTime).to.be.below(5000);","});","","pm.test(\"Content-Type header is application/json\", function () {","    pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");","});","","const responseBody = pm.response.text();","pm.test(\"Response body is not empty\", function () {","    pm.expect(responseBody).to.not.be.empty;","});","","let jsonData;","pm.test(\"Response is valid JSON\", function () {","    try {","        jsonData = pm.response.json();","        pm.expect(jsonData).to.be.an(\"array\");","    } catch (e) {","        pm.expect.fail(\"Response is not valid JSON\");","    }","});","","if (jsonData && Array.isArray(jsonData) && jsonData.length > 0) {","    const requiredFields = [\"id\", \"quantity\", \"price\", \"created_at\", \"updated_at\", \"order\", \"listing\"];","","    jsonData.forEach((item, index) => {","        pm.test(`Item ${index}: has all required fields`, function () {","            requiredFields.forEach(field => {","                pm.expect(item).to.have.property(field);","            });","        });","","        pm.test(`Item ${index}: field types are correct`, function () {","            pm.expect(item.id).to.be.a(\"number\");","            pm.expect(item.quantity).to.be.a(\"number\");","            pm.expect(item.price).to.be.a(\"string\");","            pm.expect(item.created_at).to.be.a(\"string\");","            pm.expect(item.updated_at).to.be.a(\"string\");","            pm.expect(item.order).to.be.a(\"number\");","            pm.expect(item.listing).to.be.a(\"number\");","        });","","        pm.test(`Item ${index}: created_at and updated_at are valid ISO 8601 dates`, function () {","            const createdAt = new Date(item.created_at);","            const updatedAt = new Date(item.updated_at);","            pm.expect(createdAt.toString()).to.not.equal(\"Invalid Date\");","            pm.expect(updatedAt.toString()).to.not.equal(\"Invalid Date\");","        });","    });","} else {","    pm.test(\"Response is an array\", function () {","    pm.expect(jsonData).to.be.an(\"array\");","});","}"],"type":"text/javascript","packages":{},"requests":{}}}],"id":"a7fa554e-c6e0-4724-8528-574293abad1d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://feedlink-210643547921.herokuapp.com/api/item/","description":"<h3 id=\"api-endpoint-get-item-list\">API Endpoint: Get Item List</h3>\n<p>This endpoint retrieves a list of items from the server. It is a <strong>GET</strong> request that does not require any parameters.</p>\n<h4 id=\"request\">Request</h4>\n<ul>\n<li><p><strong>Method:</strong> GET</p>\n</li>\n<li><p><strong>URL:</strong> <code>https://feedlink-210643547921.herokuapp.com/api/item/</code></p>\n</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<p>On a successful request, the server responds with a status code of <strong>200</strong> and a JSON array containing item objects. Each item object includes the following fields:</p>\n<ul>\n<li><p><strong>id</strong>: (integer) Unique identifier for the item.</p>\n</li>\n<li><p><strong>quantity</strong>: (integer) The quantity of the item available.</p>\n</li>\n<li><p><strong>price</strong>: (string) The price of the item.</p>\n</li>\n<li><p><strong>created_at</strong>: (string) Timestamp of when the item was created.</p>\n</li>\n<li><p><strong>updated_at</strong>: (string) Timestamp of when the item was last updated.</p>\n</li>\n<li><p><strong>order</strong>: (integer) The order in which the item appears.</p>\n</li>\n<li><p><strong>listing</strong>: (integer) Identifier for the listing associated with the item.</p>\n</li>\n</ul>\n<h4 id=\"example-response\">Example Response</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">[\n    {\n        \"id\": 0,\n        \"quantity\": 0,\n        \"price\": \"\",\n        \"created_at\": \"\",\n        \"updated_at\": \"\",\n        \"order\": 0,\n        \"listing\": 0\n    }\n]\n\n</code></pre>\n<h4 id=\"notes\">Notes</h4>\n<ul>\n<li><p>Ensure that you handle the response correctly, as it will return an array of items, even if it is empty.</p>\n</li>\n<li><p>The fields returned may contain default or placeholder values if no actual data is present.</p>\n</li>\n</ul>\n","urlObject":{"protocol":"https","path":["api","item",""],"host":["feedlink-210643547921","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"a80bc62e-1b13-46b1-8f53-4dd426bd3160","name":"item","originalRequest":{"method":"GET","header":[],"url":"https://feedlink-210643547921.herokuapp.com/api/item/"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Allow","value":"GET, POST, HEAD, OPTIONS"},{"key":"Content-Length","value":"147"},{"key":"Content-Type","value":"application/json"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Date","value":"Fri, 19 Sep 2025 14:26:36 GMT"},{"key":"Nel","value":"{\"report_to\":\"heroku-nel\",\"response_headers\":[\"Via\"],\"max_age\":3600,\"success_fraction\":0.01,\"failure_fraction\":0.1}"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Report-To","value":"{\"group\":\"heroku-nel\",\"endpoints\":[{\"url\":\"https://nel.heroku.com/reports?s=FzfHeXL%2B%2FsELVqR4YitAbHnGkcuWAxmVP8oi7MUUj1M%3D\\u0026sid=1b10b0ff-8a76-4548-befa-353fc6c6c045\\u0026ts=1758291996\"}],\"max_age\":3600}"},{"key":"Reporting-Endpoints","value":"heroku-nel=\"https://nel.heroku.com/reports?s=FzfHeXL%2B%2FsELVqR4YitAbHnGkcuWAxmVP8oi7MUUj1M%3D&sid=1b10b0ff-8a76-4548-befa-353fc6c6c045&ts=1758291996\""},{"key":"Server","value":"Heroku"},{"key":"Vary","value":"Accept, origin"},{"key":"Via","value":"1.1 heroku-router"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"id\": 2,\n        \"quantity\": 6,\n        \"price\": \"10.00\",\n        \"created_at\": \"2025-09-19T12:25:22.714721Z\",\n        \"updated_at\": \"2025-09-19T12:25:22.714736Z\",\n        \"order\": 1,\n        \"listing\": 4\n    }\n]"}],"_postman_id":"a7fa554e-c6e0-4724-8528-574293abad1d"},{"name":"item","event":[{"listen":"test","script":{"id":"f926cfeb-0369-4799-8b99-23e38faae50f","exec":["pm.test(\"Response status code is 201 or 400\", function () {","    pm.expect(pm.response.code).to.be.oneOf([201, 400]);","});","pm.test(\"Response time is less than 5000ms\", function () {","    if (pm.response.code === 201) {","        pm.expect(pm.response.responseTime).to.be.below(5000);","    } else {","        pm.expect(true).to.be.true;","    }","});","pm.test(\"Content-Type header is application/json\", function () {","    if (pm.response.code === 201) {","        pm.response.to.have.header(\"Content-Type\");","        pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");","    } else {","        const contentType = pm.response.headers.get(\"Content-Type\") || \"\";","        if (contentType) {","            pm.expect(contentType).to.include(\"application/json\");","        }","    }","});","pm.test(\"Response body contains all required fields\", function () {","    if (pm.response.code === 201) {","        var jsonData = pm.response.json();","        pm.expect(jsonData).to.have.all.keys(\"id\", \"quantity\", \"price\", \"created_at\", \"updated_at\", \"order\", \"listing\");","    } else {","        pm.expect(true).to.be.true;","    }","});","pm.test(\"Each required field is of the correct type\", function () {","    if (pm.response.code === 201) {","        var jsonData = pm.response.json();","        pm.expect(jsonData.id).to.be.a(\"number\");","        pm.expect(jsonData.quantity).to.be.a(\"number\");","        pm.expect(jsonData.price).to.be.a(\"string\");","        pm.expect(jsonData.created_at).to.be.a(\"string\");","        pm.expect(jsonData.updated_at).to.be.a(\"string\");","        pm.expect(jsonData.order).to.be.a(\"number\");","        pm.expect(jsonData.listing).to.be.a(\"number\");","    } else {","        pm.expect(true).to.be.true;","    }","});","pm.test(\"Response body is valid JSON when Content-Type is application/json\", function () {","    const contentType = pm.response.headers.get(\"Content-Type\") || \"\";","    if (contentType.includes(\"application/json\")) {","        var body = pm.response.json();","        pm.expect(body).to.be.an(\"object\");","    }","});"],"type":"text/javascript","packages":{},"requests":{}}}],"id":"2d84b0de-8b93-4d7b-95b4-24ce4054bea3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":" {\n        \"id\": 102,\n        \"quantity\": 1,\n        \"price\": \"80.00\",\n        \"created_at\": \"2025-10-06T06:04:46.170046Z\",\n        \"updated_at\": \"2025-10-06T06:04:46.170061Z\",\n        \"order\": 79,\n        \"listing\": 150\n    }","options":{"raw":{"language":"json"}}},"url":"https://feedlink-210643547921.herokuapp.com/api/item/","description":"<h3 id=\"endpoint-description\">Endpoint Description</h3>\n<p>This endpoint allows users to create a new item in the inventory. By sending a POST request to <code>https://feedlink-210643547921.herokuapp.com/api/item/</code>, users can add an item with specific attributes such as quantity, price, order, and listing.</p>\n<h3 id=\"request-body-format\">Request Body Format</h3>\n<p>The request must be sent in JSON format and should include the following parameters:</p>\n<ul>\n<li><p><strong>quantity</strong> (integer): The number of items to be added.</p>\n</li>\n<li><p><strong>price</strong> (string): The price of the item, formatted as a string (e.g., \"10.00\").</p>\n</li>\n<li><p><strong>order</strong> (integer): An identifier for the order associated with the item.</p>\n</li>\n<li><p><strong>listing</strong> (integer): An identifier for the listing to which the item belongs.</p>\n</li>\n</ul>\n<p><strong>Example Request Body:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"quantity\": 6,\n  \"price\": \"10.00\",\n  \"order\": 1,\n  \"listing\": 4\n}\n\n</code></pre>\n<h3 id=\"response-structure\">Response Structure</h3>\n<p>Upon successful creation of the item, the API will return a response with a status code of <code>201 Created</code>. The response body will be in JSON format and will include the following fields:</p>\n<ul>\n<li><p><strong>id</strong> (integer): The unique identifier for the newly created item.</p>\n</li>\n<li><p><strong>quantity</strong> (integer): The quantity of the item that was added.</p>\n</li>\n<li><p><strong>price</strong> (string): The price of the item.</p>\n</li>\n<li><p><strong>created_at</strong> (string): The timestamp of when the item was created.</p>\n</li>\n<li><p><strong>updated_at</strong> (string): The timestamp of the last update to the item.</p>\n</li>\n<li><p><strong>order</strong> (integer): The order identifier associated with the item.</p>\n</li>\n<li><p><strong>listing</strong> (integer): The listing identifier associated with the item.</p>\n</li>\n</ul>\n<p><strong>Example Response:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"id\": 0,\n  \"quantity\": 0,\n  \"price\": \"\",\n  \"created_at\": \"\",\n  \"updated_at\": \"\",\n  \"order\": 0,\n  \"listing\": 0\n}\n\n</code></pre>\n<p>This structure allows users to confirm the successful creation of the item and provides essential information about the item that was just created.</p>\n","urlObject":{"protocol":"https","path":["api","item",""],"host":["feedlink-210643547921","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"e8feee45-4a55-41bd-a0fb-6bad7fb789d8","name":"New Request","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":" {\n        \"quantity\": 6,\n        \"price\": \"10.00\",\n        \"order\": 1,\n        \"listing\": 4\n    }","options":{"raw":{"language":"json"}}},"url":"https://feedlink-210643547921.herokuapp.com/api/item/"},"status":"Created","code":201,"_postman_previewlanguage":null,"header":[{"key":"Allow","value":"GET, POST, HEAD, OPTIONS"},{"key":"Content-Length","value":"146"},{"key":"Content-Type","value":"application/json"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Date","value":"Fri, 19 Sep 2025 14:30:29 GMT"},{"key":"Nel","value":"{\"report_to\":\"heroku-nel\",\"response_headers\":[\"Via\"],\"max_age\":3600,\"success_fraction\":0.01,\"failure_fraction\":0.1}"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Report-To","value":"{\"group\":\"heroku-nel\",\"endpoints\":[{\"url\":\"https://nel.heroku.com/reports?s=heblfwTKA1I04RU9cwlUESv%2BBBWHU7ROPlca8UEIjV4%3D\\u0026sid=1b10b0ff-8a76-4548-befa-353fc6c6c045\\u0026ts=1758292229\"}],\"max_age\":3600}"},{"key":"Reporting-Endpoints","value":"heroku-nel=\"https://nel.heroku.com/reports?s=heblfwTKA1I04RU9cwlUESv%2BBBWHU7ROPlca8UEIjV4%3D&sid=1b10b0ff-8a76-4548-befa-353fc6c6c045&ts=1758292229\""},{"key":"Server","value":"Heroku"},{"key":"Vary","value":"Accept, origin"},{"key":"Via","value":"1.1 heroku-router"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 13,\n    \"quantity\": 6,\n    \"price\": \"10.00\",\n    \"created_at\": \"2025-09-19T14:30:29.921070Z\",\n    \"updated_at\": \"2025-09-19T14:30:29.921083Z\",\n    \"order\": 1,\n    \"listing\": 4\n}"}],"_postman_id":"2d84b0de-8b93-4d7b-95b4-24ce4054bea3"},{"name":"item","id":"da819804-667e-4ab4-8643-020798777a56","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":" {\n        \"id\": 101,\n        \"quantity\": 1,\n        \"price\": \"80.00\",\n        \"created_at\": \"2025-10-06T06:04:46.170046Z\",\n        \"updated_at\": \"2025-10-06T06:04:46.170061Z\",\n        \"order\": 47,\n        \"listing\": 150\n    }"},"url":"https://feedlink-210643547921.herokuapp.com/api/item/102/","description":"<h3 id=\"patch-request-to-update-item\">PATCH Request to Update Item</h3>\n<p>This endpoint allows you to update an existing item in the inventory. The request modifies the properties of the item identified by the specified ID in the URL.</p>\n<h4 id=\"request-format\">Request Format</h4>\n<ul>\n<li><p><strong>URL</strong>: <code>https://feedlink-210643547921.herokuapp.com/api/item/{id}/</code></p>\n</li>\n<li><p><strong>Method</strong>: <code>PATCH</code></p>\n</li>\n<li><p><strong>Content-Type</strong>: <code>application/json</code></p>\n</li>\n</ul>\n<h4 id=\"request-body\">Request Body</h4>\n<p>The request body must be in JSON format and should include the following parameters:</p>\n<ul>\n<li><p><code>quantity</code> (integer): The new quantity of the item.</p>\n</li>\n<li><p><code>order</code> (integer): The order number associated with the item.</p>\n</li>\n<li><p><code>listing</code> (integer): The listing ID for the item.</p>\n</li>\n</ul>\n<p><strong>Example Request Body:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"quantity\": 10,\n  \"order\": 1,\n  \"listing\": 4\n}\n\n</code></pre>\n<h4 id=\"response-format\">Response Format</h4>\n<p>On a successful update, the server responds with a status code of <code>200</code> and returns a JSON object containing the updated item details. The response includes:</p>\n<ul>\n<li><p><code>id</code> (integer): The unique identifier of the item.</p>\n</li>\n<li><p><code>quantity</code> (integer): The updated quantity of the item.</p>\n</li>\n<li><p><code>price</code> (string): The price of the item (may be empty).</p>\n</li>\n<li><p><code>created_at</code> (string): Timestamp of when the item was created.</p>\n</li>\n<li><p><code>updated_at</code> (string): Timestamp of when the item was last updated.</p>\n</li>\n<li><p><code>order</code> (integer): The updated order number.</p>\n</li>\n<li><p><code>listing</code> (integer): The updated listing ID.</p>\n</li>\n</ul>\n<p><strong>Example Response:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"id\": 0,\n  \"quantity\": 0,\n  \"price\": \"\",\n  \"created_at\": \"\",\n  \"updated_at\": \"\",\n  \"order\": 0,\n  \"listing\": 0\n}\n\n</code></pre>\n","urlObject":{"protocol":"https","path":["api","item","102",""],"host":["feedlink-210643547921","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"b1b11fec-4e11-4144-a9f5-dc71854e2954","name":"New Request","originalRequest":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":" {\n        \"quantity\": 10,\n        \"order\": 1,\n        \"listing\": 4\n    }"},"url":"https://feedlink-210643547921.herokuapp.com/api/item/2/"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Allow","value":"GET, PUT, PATCH, DELETE, HEAD, OPTIONS"},{"key":"Content-Length","value":"146"},{"key":"Content-Type","value":"application/json"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Date","value":"Fri, 19 Sep 2025 14:35:28 GMT"},{"key":"Nel","value":"{\"report_to\":\"heroku-nel\",\"response_headers\":[\"Via\"],\"max_age\":3600,\"success_fraction\":0.01,\"failure_fraction\":0.1}"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Report-To","value":"{\"group\":\"heroku-nel\",\"endpoints\":[{\"url\":\"https://nel.heroku.com/reports?s=NrR8%2B2yoIVb6Z1rs9zQRsn51VYPbJWW%2FSUXW2e5StOc%3D\\u0026sid=1b10b0ff-8a76-4548-befa-353fc6c6c045\\u0026ts=1758292528\"}],\"max_age\":3600}"},{"key":"Reporting-Endpoints","value":"heroku-nel=\"https://nel.heroku.com/reports?s=NrR8%2B2yoIVb6Z1rs9zQRsn51VYPbJWW%2FSUXW2e5StOc%3D&sid=1b10b0ff-8a76-4548-befa-353fc6c6c045&ts=1758292528\""},{"key":"Server","value":"Heroku"},{"key":"Vary","value":"Accept, origin"},{"key":"Via","value":"1.1 heroku-router"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 2,\n    \"quantity\": 10,\n    \"price\": \"10.00\",\n    \"created_at\": \"2025-09-19T12:25:22.714721Z\",\n    \"updated_at\": \"2025-09-19T14:35:28.796621Z\",\n    \"order\": 1,\n    \"listing\": 4\n}"}],"_postman_id":"da819804-667e-4ab4-8643-020798777a56"}],"id":"fb4a12ef-481d-4e25-93b9-288d3268a44c","_postman_id":"fb4a12ef-481d-4e25-93b9-288d3268a44c","description":""}],"id":"8cc7d804-02ea-420c-b632-2b35bd778e38","_postman_id":"8cc7d804-02ea-420c-b632-2b35bd778e38","description":""},{"name":"Payment","item":[{"name":"Get payment by id","event":[{"listen":"test","script":{"id":"fb02e027-5a14-4c36-bab5-6a7e99ca1577","exec":["","pm.test(\"Status code is 200\", function () {","    pm.expect(pm.response.code).to.equal(200);","});","","pm.test(\"Response time is less than 2000ms\", function () {","    pm.expect(pm.response.responseTime).to.be.below(2000);","});","","const response = pm.response.json();","","pm.test(\"Content-Type is application/json\", function () {","    pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");","});","","const requiredFields = [","    \"transaction_id\",","    \"amount\",","    \"created_at\",","    \"mpesa_receipt_number\",","    \"phone_number\",","    \"checkout_request_id\",","    \"merchant_request_id\",","    \"result_code\",","    \"result_desc\",","    \"payment_date\",","    \"status\",","    \"order_id\",","    \"user_id\"","];","","requiredFields.forEach(field => {","    pm.test(`Response contains required field: ${field}`, function () {","        pm.expect(response).to.have.property(field);","    });","});","","pm.test(\"Field types validation\", function () {","    pm.expect(response.amount).to.be.a('string');","    pm.expect(response.created_at).to.be.a('string');","    pm.expect(response.phone_number).to.be.a('string'); ","    pm.expect(response.status).to.be.a('string');","","    const stringOrNullFields = [","        'mpesa_receipt_number',","        'checkout_request_id',","        'merchant_request_id',","        'result_code',","        'result_desc',","        'payment_date'","    ];","","    stringOrNullFields.forEach(field => {","        const value = response[field];","        pm.expect(value === null || typeof value === 'string', ","            `${field} should be string or null, but got ${typeof value}`).to.be.true;","    });","","    const numberOrNullFields = [","        'transaction_id',","        'order_id',   ","        'user_id'     ","    ];","","    numberOrNullFields.forEach(field => {","        const value = response[field];","        pm.expect(value === null || typeof value === 'number', ","            `${field} should be number or null, but got ${typeof value}`).to.be.true;","    });","});",""],"type":"text/javascript","packages":{},"requests":{}}}],"id":"f77df8c4-344a-47e6-b614-a2b1f00881f2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://feedlink-210643547921.herokuapp.com/api/payments/34/","description":"<h2 id=\"endpoint-description\">Endpoint Description</h2>\n<p>This endpoint retrieves the payment details associated with a specific payment ID.</p>\n<h3 id=\"request\">Request</h3>\n<ul>\n<li><p><strong>Method</strong>: GET</p>\n</li>\n<li><p><strong>URL</strong>: <code>https://feedlink-210643547921.herokuapp.com/api/payments/{payment_id}/</code></p>\n</li>\n<li><p><strong>Path Parameter</strong>:</p>\n<ul>\n<li><code>payment_id</code> (integer): The unique identifier of the payment you wish to retrieve. In this example, the payment ID is <code>1</code>.</li>\n</ul>\n</li>\n</ul>\n<h3 id=\"response\">Response</h3>\n<p>On a successful request (HTTP Status 200), the response will return a JSON object containing the following fields:</p>\n<ul>\n<li><p><code>transaction_id</code> (integer): The unique identifier for the transaction.</p>\n</li>\n<li><p><code>amount</code> (string): The amount associated with the payment.</p>\n</li>\n<li><p><code>created_at</code> (string): The timestamp when the payment was created.</p>\n</li>\n<li><p><code>mpesa_receipt_number</code> (null or string): The receipt number from the M-Pesa transaction, if applicable.</p>\n</li>\n<li><p><code>phone_number</code> (string): The phone number associated with the payment.</p>\n</li>\n<li><p><code>checkout_request_id</code> (null or string): The ID of the checkout request, if applicable.</p>\n</li>\n<li><p><code>merchant_request_id</code> (null or string): The ID of the merchant request, if applicable.</p>\n</li>\n<li><p><code>result_code</code> (null or string): The result code of the payment processing.</p>\n</li>\n<li><p><code>result_desc</code> (null or string): A description of the result of the payment processing.</p>\n</li>\n<li><p><code>payment_date</code> (string): The date when the payment was processed.</p>\n</li>\n<li><p><code>status</code> (string): The current status of the payment.</p>\n</li>\n<li><p><code>order_id</code> (integer): The ID of the order associated with the payment.</p>\n</li>\n<li><p><code>user_id</code> (integer): The ID of the user who made the payment.</p>\n</li>\n</ul>\n<h3 id=\"notes\">Notes</h3>\n<ul>\n<li><p>Ensure that the payment ID is valid and exists in the system to receive the correct payment details.</p>\n</li>\n<li><p>The response may contain null values for fields that are not applicable to the specific payment.</p>\n</li>\n</ul>\n","urlObject":{"protocol":"https","path":["api","payments","34",""],"host":["feedlink-210643547921","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"b385ce7e-ccf0-462f-9d6b-1257759302bc","name":"New Request","originalRequest":{"method":"GET","header":[],"url":"https://feedlink-210643547921.herokuapp.com/api/payments/1/"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Allow","value":"GET, PUT, PATCH, DELETE, HEAD, OPTIONS"},{"key":"Content-Length","value":"302"},{"key":"Content-Type","value":"application/json"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Date","value":"Fri, 19 Sep 2025 13:21:14 GMT"},{"key":"Nel","value":"{\"report_to\":\"heroku-nel\",\"response_headers\":[\"Via\"],\"max_age\":3600,\"success_fraction\":0.01,\"failure_fraction\":0.1}"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Report-To","value":"{\"group\":\"heroku-nel\",\"endpoints\":[{\"url\":\"https://nel.heroku.com/reports?s=c5UJ2qnJ1gpL2MmHunFZHQVM9oewZIS5uumvnHSALok%3D\\u0026sid=1b10b0ff-8a76-4548-befa-353fc6c6c045\\u0026ts=1758288074\"}],\"max_age\":3600}"},{"key":"Reporting-Endpoints","value":"heroku-nel=\"https://nel.heroku.com/reports?s=c5UJ2qnJ1gpL2MmHunFZHQVM9oewZIS5uumvnHSALok%3D&sid=1b10b0ff-8a76-4548-befa-353fc6c6c045&ts=1758288074\""},{"key":"Server","value":"Heroku"},{"key":"Vary","value":"Accept, origin"},{"key":"Via","value":"1.1 heroku-router"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"}],"cookie":[],"responseTime":null,"body":"{\n    \"transaction_id\": 1,\n    \"amount\": \"120.00\",\n    \"created_at\": \"2025-09-19T12:50:56.957310Z\",\n    \"mpesa_receipt_number\": null,\n    \"phone_number\": \"\",\n    \"checkout_request_id\": null,\n    \"merchant_request_id\": null,\n    \"result_code\": null,\n    \"result_desc\": null,\n    \"payment_date\": \"2025-09-19T15:50:00Z\",\n    \"status\": \"pending\",\n    \"order_id\": 1,\n    \"user_id\": 16\n}"}],"_postman_id":"f77df8c4-344a-47e6-b614-a2b1f00881f2"},{"name":"Add a payment","event":[{"listen":"test","script":{"id":"ed17c326-ff97-4549-90c9-11460ef758f2","exec":["let response = null;","let isJson = false;","try {","    const contentType = pm.response.headers.get(\"Content-Type\") || \"\";","    if (contentType.includes(\"application/json\")) {","        response = pm.response.json();","        isJson = true;","    }","} catch (e) {","    isJson = false;","}","pm.test(\"Status code is 201 or 400\", function () {","    pm.expect(pm.response.code).to.be.oneOf([201, 400]);","});","pm.test(\"Response time is acceptable\", function () {","    if (pm.response.code === 201) {","        pm.expect(pm.response.responseTime).to.be.below(1000);","    } else {","        pm.expect(true).to.be.true;","    }","});","pm.test(\"Response body contains required fields\", function () {","    if (pm.response.code === 201) {","        pm.expect(isJson, \"Response should be valid JSON on 201\").to.be.true;","        const requiredFields = [","            'transaction_id', 'amount', 'created_at',","            'mpesa_receipt_number', 'phone_number',","            'checkout_request_id', 'merchant_request_id',","            'result_code', 'result_desc', 'payment_date',","            'status', 'order_id', 'user_id'","        ];","        requiredFields.forEach(field => {","            pm.expect(response, `Missing field: ${field}`).to.have.property(field);","        });","    } else {","        pm.expect(true).to.be.true;","    }","});","pm.test(\"Content-Type is application/json\", function () {","    const contentType = pm.response.headers.get(\"Content-Type\") || \"\";","    if (pm.response.code === 201) {","        pm.expect(contentType).to.include(\"application/json\");","    } else {","        if (contentType) {","            pm.expect(contentType).to.include(\"application/json\");","        }","    }","});","pm.test(\"Field types are correct\", function () {","    if (pm.response.code === 201) {","        pm.expect(isJson).to.be.true;","        pm.expect(response.transaction_id).to.be.a('number');","        pm.expect(response.amount).to.be.a('string');","        pm.expect(response.created_at).to.be.a('string');","        pm.expect(response.mpesa_receipt_number).to.be.null;","        pm.expect(response.phone_number).to.be.a('string');","        pm.expect(response.checkout_request_id).to.be.null;","        pm.expect(response.merchant_request_id).to.be.null;","        pm.expect(response.result_code).to.be.null;","        pm.expect(response.result_desc).to.be.null;","        pm.expect(response.payment_date).to.be.a('string');","        pm.expect(response.status).to.be.a('string');","        pm.expect(response.order_id).to.be.a('number');","        pm.expect(response.user_id).to.be.a('number');","    } else {","        pm.expect(true).to.be.true;","    }","});"],"type":"text/javascript","packages":{},"requests":{}}}],"id":"6c341660-aa8d-456e-b2f9-0009f1e1ddc0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"transaction_id\": 2,\n    \"amount\": \"150.00\",\n    \"created_at\": \"2025-09-19T12:50:56.957310Z\",\n    \"mpesa_receipt_number\": null,\n    \"phone_number\": \"\",\n    \"checkout_request_id\": null,\n    \"merchant_request_id\": null,\n    \"result_code\": null,\n    \"result_desc\": null,\n    \"payment_date\": \"2025-09-19T15:50:00Z\",\n    \"status\": \"pending\",\n    \"order_id\": 2,\n    \"user_id\": 16\n}","options":{"raw":{"language":"json"}}},"url":"https://feedlink-210643547921.herokuapp.com/api/payments/","description":"<h2 id=\"api-endpoint-create-payment\">API Endpoint: Create Payment</h2>\n<p>This endpoint allows users to create a new payment entry in the system. It accepts payment details in the request body and returns a confirmation response upon successful creation.</p>\n<h3 id=\"request\">Request</h3>\n<ul>\n<li><p><strong>Method</strong>: POST</p>\n</li>\n<li><p><strong>URL</strong>: <code>https://feedlink-210643547921.herokuapp.com/api/payments/</code></p>\n</li>\n<li><p><strong>Content-Type</strong>: application/json</p>\n</li>\n</ul>\n<h4 id=\"request-body-parameters\">Request Body Parameters</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>transaction_id</code></td>\n<td>number</td>\n<td>Unique identifier for the transaction.</td>\n</tr>\n<tr>\n<td><code>amount</code></td>\n<td>string</td>\n<td>The amount of money involved in the transaction.</td>\n</tr>\n<tr>\n<td><code>created_at</code></td>\n<td>string</td>\n<td>Timestamp of when the transaction was created.</td>\n</tr>\n<tr>\n<td><code>mpesa_receipt_number</code></td>\n<td>null</td>\n<td>Receipt number from M-Pesa, if applicable.</td>\n</tr>\n<tr>\n<td><code>phone_number</code></td>\n<td>string</td>\n<td>Phone number associated with the transaction.</td>\n</tr>\n<tr>\n<td><code>checkout_request_id</code></td>\n<td>null</td>\n<td>ID for the checkout request, if applicable.</td>\n</tr>\n<tr>\n<td><code>merchant_request_id</code></td>\n<td>null</td>\n<td>ID for the merchant request, if applicable.</td>\n</tr>\n<tr>\n<td><code>result_code</code></td>\n<td>null</td>\n<td>Code indicating the result of the payment.</td>\n</tr>\n<tr>\n<td><code>result_desc</code></td>\n<td>null</td>\n<td>Description of the result of the payment.</td>\n</tr>\n<tr>\n<td><code>payment_date</code></td>\n<td>string</td>\n<td>Date and time when the payment was made.</td>\n</tr>\n<tr>\n<td><code>status</code></td>\n<td>string</td>\n<td>Current status of the payment (e.g., pending).</td>\n</tr>\n<tr>\n<td><code>order_id</code></td>\n<td>number</td>\n<td>Identifier for the order associated with the payment.</td>\n</tr>\n<tr>\n<td><code>user_id</code></td>\n<td>number</td>\n<td>Identifier for the user making the payment.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"response\">Response</h3>\n<ul>\n<li><p><strong>Status Code</strong>: 201 Created</p>\n</li>\n<li><p><strong>Content-Type</strong>: application/json</p>\n</li>\n</ul>\n<h4 id=\"response-body\">Response Body</h4>\n<p>The response will contain the following fields:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>transaction_id</code></td>\n<td>number</td>\n<td>ID of the created transaction.</td>\n</tr>\n<tr>\n<td><code>amount</code></td>\n<td>string</td>\n<td>Amount of the transaction.</td>\n</tr>\n<tr>\n<td><code>created_at</code></td>\n<td>string</td>\n<td>Timestamp of when the transaction was created.</td>\n</tr>\n<tr>\n<td><code>mpesa_receipt_number</code></td>\n<td>null</td>\n<td>Receipt number from M-Pesa, if applicable.</td>\n</tr>\n<tr>\n<td><code>phone_number</code></td>\n<td>string</td>\n<td>Phone number associated with the transaction.</td>\n</tr>\n<tr>\n<td><code>checkout_request_id</code></td>\n<td>null</td>\n<td>ID for the checkout request, if applicable.</td>\n</tr>\n<tr>\n<td><code>merchant_request_id</code></td>\n<td>null</td>\n<td>ID for the merchant request, if applicable.</td>\n</tr>\n<tr>\n<td><code>result_code</code></td>\n<td>null</td>\n<td>Code indicating the result of the payment.</td>\n</tr>\n<tr>\n<td><code>result_desc</code></td>\n<td>null</td>\n<td>Description of the result of the payment.</td>\n</tr>\n<tr>\n<td><code>payment_date</code></td>\n<td>string</td>\n<td>Date and time when the payment was made.</td>\n</tr>\n<tr>\n<td><code>status</code></td>\n<td>string</td>\n<td>Current status of the payment.</td>\n</tr>\n<tr>\n<td><code>order_id</code></td>\n<td>number</td>\n<td>Identifier for the order associated with the payment.</td>\n</tr>\n<tr>\n<td><code>user_id</code></td>\n<td>number</td>\n<td>Identifier for the user making the payment.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"notes\">Notes</h3>\n<ul>\n<li><p>Ensure that all required parameters are included in the request body to avoid errors.</p>\n</li>\n<li><p>The <code>status</code> field in the response will indicate the result of the payment creation process.</p>\n</li>\n<li><p>If any of the optional fields are not applicable, they can be sent as <code>null</code>.</p>\n</li>\n</ul>\n","urlObject":{"protocol":"https","path":["api","payments",""],"host":["feedlink-210643547921","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"2b5de1ad-fea4-4aa0-9185-7ebc519773af","name":"New Request","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"transaction_id\": 2,\n    \"amount\": \"150.00\",\n    \"created_at\": \"2025-09-19T12:50:56.957310Z\",\n    \"mpesa_receipt_number\": null,\n    \"phone_number\": \"\",\n    \"checkout_request_id\": null,\n    \"merchant_request_id\": null,\n    \"result_code\": null,\n    \"result_desc\": null,\n    \"payment_date\": \"2025-09-19T15:50:00Z\",\n    \"status\": \"pending\",\n    \"order_id\": 2,\n    \"user_id\": 16\n}","options":{"raw":{"language":"json"}}},"url":"https://feedlink-210643547921.herokuapp.com/api/payments/"},"status":"Created","code":201,"_postman_previewlanguage":null,"header":[{"key":"Allow","value":"GET, POST, HEAD, OPTIONS"},{"key":"Content-Length","value":"302"},{"key":"Content-Type","value":"application/json"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Date","value":"Fri, 19 Sep 2025 13:24:45 GMT"},{"key":"Nel","value":"{\"report_to\":\"heroku-nel\",\"response_headers\":[\"Via\"],\"max_age\":3600,\"success_fraction\":0.01,\"failure_fraction\":0.1}"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Report-To","value":"{\"group\":\"heroku-nel\",\"endpoints\":[{\"url\":\"https://nel.heroku.com/reports?s=Sann6e7a3bz0W5Njn6tConSpdd3Zm1A1uJgcL3hbYTQ%3D\\u0026sid=1b10b0ff-8a76-4548-befa-353fc6c6c045\\u0026ts=1758288285\"}],\"max_age\":3600}"},{"key":"Reporting-Endpoints","value":"heroku-nel=\"https://nel.heroku.com/reports?s=Sann6e7a3bz0W5Njn6tConSpdd3Zm1A1uJgcL3hbYTQ%3D&sid=1b10b0ff-8a76-4548-befa-353fc6c6c045&ts=1758288285\""},{"key":"Server","value":"Heroku"},{"key":"Vary","value":"Accept, origin"},{"key":"Via","value":"1.1 heroku-router"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"}],"cookie":[],"responseTime":null,"body":"{\n    \"transaction_id\": 2,\n    \"amount\": \"150.00\",\n    \"created_at\": \"2025-09-19T13:24:45.803946Z\",\n    \"mpesa_receipt_number\": null,\n    \"phone_number\": \"\",\n    \"checkout_request_id\": null,\n    \"merchant_request_id\": null,\n    \"result_code\": null,\n    \"result_desc\": null,\n    \"payment_date\": \"2025-09-19T15:50:00Z\",\n    \"status\": \"pending\",\n    \"order_id\": 2,\n    \"user_id\": 16\n}"}],"_postman_id":"6c341660-aa8d-456e-b2f9-0009f1e1ddc0"},{"name":"Get Payments","event":[{"listen":"test","script":{"id":"cef45b94-567c-41cc-8775-00aa16f999eb","exec":["pm.test(\"Status code is 200\", function () {","    pm.expect(pm.response.code).to.equal(200);","});","","pm.test(\"Response time is less than 2000ms\", function () {","    pm.expect(pm.response.responseTime).to.be.below(2000);","});","","const response = pm.response.json();","","pm.test(\"Response body is an array\", function () {","    pm.expect(response).to.be.an('array');","});","","pm.test(\"Content-Type is application/json\", function () {","    pm.expect(pm.response.headers.get(\"Content-Type\")).to.equal(\"application/json\");","});","","const requiredFields = [","    { field: 'transaction_id', type: 'number' },","    { field: 'amount', type: 'string' },","    { field: 'created_at', type: 'string' },","    { field: 'mpesa_receipt_number', type: 'nullable' },","    { field: 'phone_number', type: 'string' },","    { field: 'checkout_request_id', type: 'nullable' },","    { field: 'merchant_request_id', type: 'nullable' },","    { field: 'result_code', type: 'nullable' },","    { field: 'result_desc', type: 'nullable' },","    { field: 'payment_date', type: 'nullable' },","    { field: 'status', type: 'string' },","    { field: 'order_id', type: 'nullable' },","    { field: 'user_id', type: 'nullable' },","];","","response.forEach(payment => {","    requiredFields.forEach(({ field, type }) => {","        pm.test(`Field ${field} exists`, function () {","            pm.expect(payment).to.have.property(field);","        });","","        if (type === 'nullable') {","            pm.test(`Field ${field} is nullable or has value`, function () {","                pm.expect(payment[field]).to.satisfy(value => value === null || value === undefined || value !== '');","            });","        } else {","            pm.test(`Field ${field} is of type ${type}`, function () {","                pm.expect(payment[field]).to.be.a(type);","            });","        }","    });","});",""],"type":"text/javascript","packages":{},"requests":{}}}],"id":"4988d789-66c1-4cdb-92c2-8d49d37fa223","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://feedlink-210643547921.herokuapp.com/api/payments/","description":"<h2 id=\"api-endpoint-retrieve-payments\">API Endpoint: Retrieve Payments</h2>\n<p>This endpoint allows you to retrieve a list of payment transactions from the server. It is a simple HTTP GET request that returns the details of payments processed.</p>\n<h3 id=\"request\">Request</h3>\n<ul>\n<li><p><strong>Method</strong>: GET</p>\n</li>\n<li><p><strong>URL</strong>: <code>https://feedlink-210643547921.herokuapp.com/api/payments/</code></p>\n</li>\n</ul>\n<h3 id=\"response\">Response</h3>\n<p>Upon a successful request, the server responds with a status code of <code>200</code> and returns a JSON array containing the details of each payment transaction. The response includes the following fields:</p>\n<ul>\n<li><p><strong>transaction_id</strong>: Unique identifier for the transaction (integer).</p>\n</li>\n<li><p><strong>amount</strong>: The amount of money involved in the transaction (string).</p>\n</li>\n<li><p><strong>created_at</strong>: Timestamp of when the transaction was created (string).</p>\n</li>\n<li><p><strong>mpesa_receipt_number</strong>: Receipt number from the payment provider, if applicable (nullable).</p>\n</li>\n<li><p><strong>phone_number</strong>: The phone number associated with the transaction (string).</p>\n</li>\n<li><p><strong>checkout_request_id</strong>: Identifier for the checkout request (nullable).</p>\n</li>\n<li><p><strong>merchant_request_id</strong>: Identifier for the merchant request (nullable).</p>\n</li>\n<li><p><strong>result_code</strong>: Code indicating the result of the payment (nullable).</p>\n</li>\n<li><p><strong>result_desc</strong>: Description of the result of the payment (nullable).</p>\n</li>\n<li><p><strong>payment_date</strong>: Date when the payment was made (string).</p>\n</li>\n<li><p><strong>status</strong>: Current status of the payment (string).</p>\n</li>\n<li><p><strong>order_id</strong>: Identifier for the order associated with the transaction (integer).</p>\n</li>\n<li><p><strong>user_id</strong>: Identifier for the user associated with the transaction (integer).</p>\n</li>\n</ul>\n<h3 id=\"notes\">Notes</h3>\n<ul>\n<li><p>Ensure that you have the necessary permissions to access this endpoint.</p>\n</li>\n<li><p>The response may include null values for certain fields if they are not applicable to the transaction.</p>\n</li>\n<li><p>This endpoint is useful for tracking payment statuses and details for user transactions.</p>\n</li>\n</ul>\n","urlObject":{"protocol":"https","path":["api","payments",""],"host":["feedlink-210643547921","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"5d17f8a4-2d61-4a82-904f-75289d3d2e2c","name":"New Request","originalRequest":{"method":"GET","header":[],"url":"https://feedlink-210643547921.herokuapp.com/api/payments/"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Allow","value":"GET, POST, HEAD, OPTIONS"},{"key":"Content-Length","value":"304"},{"key":"Content-Type","value":"application/json"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Date","value":"Fri, 19 Sep 2025 13:20:09 GMT"},{"key":"Nel","value":"{\"report_to\":\"heroku-nel\",\"response_headers\":[\"Via\"],\"max_age\":3600,\"success_fraction\":0.01,\"failure_fraction\":0.1}"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Report-To","value":"{\"group\":\"heroku-nel\",\"endpoints\":[{\"url\":\"https://nel.heroku.com/reports?s=Tu96jFaP7LjwuHm4M99edUicCwbnhc6%2BqsPwy6Ouf5c%3D\\u0026sid=1b10b0ff-8a76-4548-befa-353fc6c6c045\\u0026ts=1758288009\"}],\"max_age\":3600}"},{"key":"Reporting-Endpoints","value":"heroku-nel=\"https://nel.heroku.com/reports?s=Tu96jFaP7LjwuHm4M99edUicCwbnhc6%2BqsPwy6Ouf5c%3D&sid=1b10b0ff-8a76-4548-befa-353fc6c6c045&ts=1758288009\""},{"key":"Server","value":"Heroku"},{"key":"Vary","value":"Accept, origin"},{"key":"Via","value":"1.1 heroku-router"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"transaction_id\": 1,\n        \"amount\": \"120.00\",\n        \"created_at\": \"2025-09-19T12:50:56.957310Z\",\n        \"mpesa_receipt_number\": null,\n        \"phone_number\": \"\",\n        \"checkout_request_id\": null,\n        \"merchant_request_id\": null,\n        \"result_code\": null,\n        \"result_desc\": null,\n        \"payment_date\": \"2025-09-19T15:50:00Z\",\n        \"status\": \"pending\",\n        \"order_id\": 1,\n        \"user_id\": 16\n    }\n]"}],"_postman_id":"4988d789-66c1-4cdb-92c2-8d49d37fa223"},{"name":"Update payment status","id":"c880ffc5-bfda-44bb-afe8-a9645d0bbec1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"transaction_id\": 1,\n    \"amount\": \"120.00\",\n    \"created_at\": \"2025-09-19T12:50:56.957310Z\",\n    \"mpesa_receipt_number\": null,\n    \"phone_number\": \"\",\n    \"checkout_request_id\": null,\n    \"merchant_request_id\": null,\n    \"result_code\": null,\n    \"result_desc\": null,\n    \"payment_date\": \"2025-09-19T15:50:00Z\",\n    \"status\": \"confirmed\",\n    \"order_id\": 1,\n    \"user_id\": 16\n}","options":{"raw":{"language":"json"}}},"url":"https://feedlink-210643547921.herokuapp.com/api/payments/1/","description":"<h2 id=\"update-payment-information\">Update Payment Information</h2>\n<p>This endpoint allows you to update the details of a specific payment transaction identified by its unique ID. The request modifies the existing payment information, which may include transaction details, amounts, and statuses.</p>\n<h3 id=\"request\">Request</h3>\n<p><strong>Method:</strong> PUT<br /><strong>URL:</strong> <code>https://feedlink-210643547921.herokuapp.com/api/payments/{id}/</code></p>\n<h4 id=\"request-body-parameters\">Request Body Parameters</h4>\n<p>The request body must be in JSON format and include the following parameters:</p>\n<ul>\n<li><p><strong>transaction_id</strong> (integer): The unique identifier for the transaction being updated.</p>\n</li>\n<li><p><strong>amount</strong> (string): The amount associated with the payment transaction.</p>\n</li>\n<li><p><strong>created_at</strong> (string): The timestamp indicating when the transaction was created, formatted as ISO 8601.</p>\n</li>\n<li><p><strong>mpesa_receipt_number</strong> (string or null): The receipt number provided by the payment processor (if applicable).</p>\n</li>\n<li><p><strong>phone_number</strong> (string): The phone number associated with the payment transaction.</p>\n</li>\n<li><p><strong>checkout_request_id</strong> (string or null): The ID for the checkout request (if applicable).</p>\n</li>\n<li><p><strong>merchant_request_id</strong> (string or null): The ID for the merchant request (if applicable).</p>\n</li>\n<li><p><strong>result_code</strong> (string or null): The code indicating the result of the payment transaction (if applicable).</p>\n</li>\n<li><p><strong>result_desc</strong> (string or null): A description of the result of the payment transaction (if applicable).</p>\n</li>\n<li><p><strong>payment_date</strong> (string): The date and time when the payment was made, formatted as ISO 8601.</p>\n</li>\n<li><p><strong>status</strong> (string): The current status of the payment (e.g., confirmed, pending).</p>\n</li>\n<li><p><strong>order_id</strong> (integer): The unique identifier for the order associated with the payment.</p>\n</li>\n<li><p><strong>user_id</strong> (integer): The unique identifier for the user making the payment.</p>\n</li>\n</ul>\n<h3 id=\"response\">Response</h3>\n<p>Upon a successful update, the API will return a response with a status code of 200 and the following structure:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"transaction_id\": 0,\n  \"amount\": \"\",\n  \"created_at\": \"\",\n  \"mpesa_receipt_number\": null,\n  \"phone_number\": \"\",\n  \"checkout_request_id\": null,\n  \"merchant_request_id\": null,\n  \"result_code\": null,\n  \"result_desc\": null,\n  \"payment_date\": \"\",\n  \"status\": \"\",\n  \"order_id\": 0,\n  \"user_id\": 0\n}\n\n</code></pre>\n<h4 id=\"response-parameters\">Response Parameters</h4>\n<ul>\n<li><p><strong>transaction_id</strong> (integer): The updated transaction ID.</p>\n</li>\n<li><p><strong>amount</strong> (string): The updated amount for the payment.</p>\n</li>\n<li><p><strong>created_at</strong> (string): The timestamp of when the payment was created.</p>\n</li>\n<li><p><strong>mpesa_receipt_number</strong> (string or null): The updated receipt number from the payment processor.</p>\n</li>\n<li><p><strong>phone_number</strong> (string): The updated phone number associated with the payment.</p>\n</li>\n<li><p><strong>checkout_request_id</strong> (string or null): The updated checkout request ID.</p>\n</li>\n<li><p><strong>merchant_request_id</strong> (string or null): The updated merchant request ID.</p>\n</li>\n<li><p><strong>result_code</strong> (string or null): The updated result code of the payment transaction.</p>\n</li>\n<li><p><strong>result_desc</strong> (string or null): The updated description of the payment result.</p>\n</li>\n<li><p><strong>payment_date</strong> (string): The updated date and time of the payment.</p>\n</li>\n<li><p><strong>status</strong> (string): The updated status of the payment.</p>\n</li>\n<li><p><strong>order_id</strong> (integer): The updated order ID associated with the payment.</p>\n</li>\n<li><p><strong>user_id</strong> (integer): The updated user ID associated with the payment.</p>\n</li>\n</ul>\n<p>Ensure that all required fields are provided in the request to successfully update the payment information.</p>\n","urlObject":{"protocol":"https","path":["api","payments","1",""],"host":["feedlink-210643547921","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"fa4fc316-17cc-4d1c-996e-34447d8201ed","name":"New Request","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"transaction_id\": 1,\n    \"amount\": \"120.00\",\n    \"created_at\": \"2025-09-19T12:50:56.957310Z\",\n    \"mpesa_receipt_number\": null,\n    \"phone_number\": \"\",\n    \"checkout_request_id\": null,\n    \"merchant_request_id\": null,\n    \"result_code\": null,\n    \"result_desc\": null,\n    \"payment_date\": \"2025-09-19T15:50:00Z\",\n    \"status\": \"confirmed\",\n    \"order_id\": 1,\n    \"user_id\": 16\n}","options":{"raw":{"language":"json"}}},"url":"https://feedlink-210643547921.herokuapp.com/api/payments/1/"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Allow","value":"GET, PUT, PATCH, DELETE, HEAD, OPTIONS"},{"key":"Content-Length","value":"304"},{"key":"Content-Type","value":"application/json"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Date","value":"Fri, 19 Sep 2025 13:41:03 GMT"},{"key":"Nel","value":"{\"report_to\":\"heroku-nel\",\"response_headers\":[\"Via\"],\"max_age\":3600,\"success_fraction\":0.01,\"failure_fraction\":0.1}"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Report-To","value":"{\"group\":\"heroku-nel\",\"endpoints\":[{\"url\":\"https://nel.heroku.com/reports?s=%2FSPkki5iwHsuQWiF3uarq%2B5AzUNyfEldkXq7sfsheiQ%3D\\u0026sid=1b10b0ff-8a76-4548-befa-353fc6c6c045\\u0026ts=1758289263\"}],\"max_age\":3600}"},{"key":"Reporting-Endpoints","value":"heroku-nel=\"https://nel.heroku.com/reports?s=%2FSPkki5iwHsuQWiF3uarq%2B5AzUNyfEldkXq7sfsheiQ%3D&sid=1b10b0ff-8a76-4548-befa-353fc6c6c045&ts=1758289263\""},{"key":"Server","value":"Heroku"},{"key":"Vary","value":"Accept, origin"},{"key":"Via","value":"1.1 heroku-router"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"}],"cookie":[],"responseTime":null,"body":"{\n    \"transaction_id\": 1,\n    \"amount\": \"120.00\",\n    \"created_at\": \"2025-09-19T12:50:56.957310Z\",\n    \"mpesa_receipt_number\": null,\n    \"phone_number\": \"\",\n    \"checkout_request_id\": null,\n    \"merchant_request_id\": null,\n    \"result_code\": null,\n    \"result_desc\": null,\n    \"payment_date\": \"2025-09-19T15:50:00Z\",\n    \"status\": \"confirmed\",\n    \"order_id\": 1,\n    \"user_id\": 16\n}"}],"_postman_id":"c880ffc5-bfda-44bb-afe8-a9645d0bbec1"},{"name":"STK-push","event":[{"listen":"test","script":{"id":"9bbe6928-0b66-4bbd-a8a8-0858a45c7386","exec":["const response = pm.response.json();","","pm.test(\"Status code is 200\", function () {","    pm.expect(pm.response.code).to.equal(200);","});","","pm.test(\"Response time is less than 4000ms\", function () {","    pm.expect(pm.response.responseTime).to.be.below(4000);","});","","pm.test(\"Content-Type is application/json\", function () {","    pm.expect(pm.response.headers.get(\"Content-Type\")).to.equal(\"application/json\");","});","","pm.test(\"Response contains required fields\", function () {","    pm.expect(response).to.have.property(\"message\");","    pm.expect(response).to.have.property(\"response\");","    pm.expect(response).to.have.property(\"payment_id\");","    ","    const responseObject = response.response;","    pm.expect(responseObject).to.have.property(\"MerchantRequestID\");","    pm.expect(responseObject).to.have.property(\"CheckoutRequestID\");","    pm.expect(responseObject).to.have.property(\"ResponseCode\");","    pm.expect(responseObject).to.have.property(\"ResponseDescription\");","    pm.expect(responseObject).to.have.property(\"CustomerMessage\");","});","","pm.test(\"Field types are correct\", function () {","    pm.expect(response.message).to.be.a('string');","    pm.expect(response.payment_id).to.be.a('number');","","    const responseObject = response.response;","    pm.expect(responseObject.MerchantRequestID).to.be.a('string');","    pm.expect(responseObject.CheckoutRequestID).to.be.a('string');","    pm.expect(responseObject.ResponseCode).to.be.a('string');","    pm.expect(responseObject.ResponseDescription).to.be.a('string');","    pm.expect(responseObject.CustomerMessage).to.be.a('string');","});",""],"type":"text/javascript","packages":{},"requests":{}}}],"id":"f1ef383c-6584-4acd-b707-4bed0b9e74dd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n        \"phone_number\": \"254799968388\",\n        \"amount\": 1,\n        \"account_reference\": \"Pay 1 KES to feedlink\",\n        \"transaction_desc\": \"You have paid pay 1 KES\"\n    }","options":{"raw":{"language":"json"}}},"url":"https://feedlink-210643547921.herokuapp.com/api/ussdpush","description":"<h2 id=\"ussd-push-api\">USSD Push API</h2>\n<p>This endpoint allows you to initiate a USSD push transaction by sending a POST request to the specified URL. It is designed to facilitate payments via USSD by providing necessary transaction details.</p>\n<h3 id=\"request-parameters\">Request Parameters</h3>\n<p>The request body should be in JSON format and must include the following parameters:</p>\n<ul>\n<li><p><strong>phone_number</strong> (string): The phone number of the customer initiating the payment. This should be in the appropriate format.</p>\n</li>\n<li><p><strong>amount</strong> (integer): The amount of money to be processed in the transaction. This should be a positive integer.</p>\n</li>\n<li><p><strong>account_reference</strong> (string): A reference string for the transaction, which can be used for identification purposes.</p>\n</li>\n<li><p><strong>transaction_desc</strong> (string): A description of the transaction, providing context for the payment.</p>\n</li>\n</ul>\n<h3 id=\"example-request-body\">Example Request Body</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"phone_number\": \"254799968388\",\n  \"amount\": 1,\n  \"account_reference\": \"Pay 1 KES to feedlink\",\n  \"transaction_desc\": \"You have paid pay 1 KES\"\n}\n\n</code></pre>\n<h3 id=\"expected-response\">Expected Response</h3>\n<p>Upon a successful request, the API will return a JSON response with the following structure:</p>\n<ul>\n<li><p><strong>message</strong> (string): A message indicating the result of the transaction (may be empty).</p>\n</li>\n<li><p><strong>response</strong> (object): Contains details about the transaction:</p>\n<ul>\n<li><p><strong>MerchantRequestID</strong> (string): A unique identifier for the merchant's request.</p>\n</li>\n<li><p><strong>CheckoutRequestID</strong> (string): A unique identifier for the checkout process.</p>\n</li>\n<li><p><strong>ResponseCode</strong> (string): A code representing the status of the response.</p>\n</li>\n<li><p><strong>ResponseDescription</strong> (string): A description of the response status.</p>\n</li>\n<li><p><strong>CustomerMessage</strong> (string): A message intended for the customer.</p>\n</li>\n</ul>\n</li>\n<li><p><strong>payment_id</strong> (integer): A unique identifier for the payment transaction.</p>\n</li>\n</ul>\n<h3 id=\"example-response\">Example Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"\",\n  \"response\": {\n    \"MerchantRequestID\": \"\",\n    \"CheckoutRequestID\": \"\",\n    \"ResponseCode\": \"\",\n    \"ResponseDescription\": \"\",\n    \"CustomerMessage\": \"\"\n  },\n  \"payment_id\": 0\n}\n\n</code></pre>\n<h3 id=\"notes\">Notes</h3>\n<ul>\n<li><p>Ensure that the phone number is valid and formatted correctly to prevent errors.</p>\n</li>\n<li><p>The amount should be specified in the smallest currency unit (e.g., cents for KES).</p>\n</li>\n<li><p>The API returns a status code of 200 for successful requests. Handle other status codes appropriately based on your application's needs.</p>\n</li>\n</ul>\n","urlObject":{"protocol":"https","path":["api","ussdpush"],"host":["feedlink-210643547921","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"cbbf748d-0c6f-4538-ad6b-15faabfb7410","name":"New Request","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n        \"phone_number\": \"254799968388\",\n        \"amount\": 1,\n        \"account_reference\": \"Pay 1 KES to feedlink\",\n        \"transaction_desc\": \"You have paid pay 1 KES\"\n    }","options":{"raw":{"language":"json"}}},"url":"https://feedlink-210643547921.herokuapp.com/api/ussdpush"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Allow","value":"POST, OPTIONS"},{"key":"Content-Length","value":"360"},{"key":"Content-Type","value":"application/json"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Date","value":"Mon, 06 Oct 2025 07:25:16 GMT"},{"key":"Nel","value":"{\"report_to\":\"heroku-nel\",\"response_headers\":[\"Via\"],\"max_age\":3600,\"success_fraction\":0.01,\"failure_fraction\":0.1}"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Report-To","value":"{\"group\":\"heroku-nel\",\"endpoints\":[{\"url\":\"https://nel.heroku.com/reports?s=eHSu6k%2F6mzYiTB7oBNzBUqTGFZPlM1WZdtKalZc62RA%3D\\u0026sid=1b10b0ff-8a76-4548-befa-353fc6c6c045\\u0026ts=1759735514\"}],\"max_age\":3600}"},{"key":"Reporting-Endpoints","value":"heroku-nel=\"https://nel.heroku.com/reports?s=eHSu6k%2F6mzYiTB7oBNzBUqTGFZPlM1WZdtKalZc62RA%3D&sid=1b10b0ff-8a76-4548-befa-353fc6c6c045&ts=1759735514\""},{"key":"Server","value":"Heroku"},{"key":"Vary","value":"Accept, origin"},{"key":"Via","value":"1.1 heroku-router"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"USSD Push initiated, check your phone to complete the payment.\",\n    \"response\": {\n        \"MerchantRequestID\": \"ec67-43aa-9362-0f167cc2e9de42296\",\n        \"CheckoutRequestID\": \"ws_CO_06102025102515593799968388\",\n        \"ResponseCode\": \"0\",\n        \"ResponseDescription\": \"Success. Request accepted for processing\",\n        \"CustomerMessage\": \"Success. Request accepted for processing\"\n    },\n    \"payment_id\": 72\n}"}],"_postman_id":"f1ef383c-6584-4acd-b707-4bed0b9e74dd"},{"name":"Callback","event":[{"listen":"test","script":{"id":"e51750b4-f91b-42e2-95d3-06f928da22b5","exec":["const response = pm.response.json();","","pm.test(\"Status code is 200\", function () {","    pm.expect(pm.response.code).to.equal(200);","});","","pm.test(\"Response time is less than 3000ms\", function () {","    pm.expect(pm.response.responseTime).to.be.below(3000);","});","","pm.test(\"Content-Type is application/json\", function () {","    pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");","});","","pm.test(\"Response body has required fields\", function () {","    pm.expect(response).to.have.all.keys('ResultCode', 'ResultDesc', 'receipt_url');","});","","pm.test(\"Field types are correct\", function () {","    pm.expect(response.ResultCode).to.be.a('number');","    pm.expect(response.ResultDesc).to.be.a('string');","    pm.expect(response.receipt_url).to.be.null;","});",""],"type":"text/javascript","packages":{},"requests":{}}}],"id":"2942f68b-377b-48e6-a0b3-c521df42e7fe","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n   \"Body\": {\n      \"stkCallback\": {\n         \"MerchantRequestID\": \"2e9c-429c-a95c-b4cd653531a35448\",\n         \"CheckoutRequestID\": \"ws_CO_03102025103035723799968388\",\n         \"ResultCode\": 0,\n         \"ResultDesc\": \"The service request is processed successfully.\",\n         \"CallbackMetadata\": {\n            \"Item\": [\n               {\"Name\": \"Amount\", \"Value\": 1.00},\n               {\"Name\": \"MpesaReceiptNumber\", \"Value\": \"NLJ7RT61SV\"},\n               {\"Name\": \"TransactionDate\", \"Value\": 20251003102800},\n               {\"Name\": \"PhoneNumber\", \"Value\": 254799968388}\n            ]\n         }\n      }\n   }\n}\n","options":{"raw":{"language":"json"}}},"url":"https://feedlink-210643547921.herokuapp.com/api/mpesa/callback","description":"<h1 id=\"mpesa-callback-api\">MPesa Callback API</h1>\n<p>This endpoint is designed to handle callbacks from the MPesa payment service. It processes the payment results sent by MPesa and provides a response indicating the success or failure of the transaction.</p>\n<h2 id=\"request\">Request</h2>\n<h3 id=\"method\">Method</h3>\n<p><code>POST</code></p>\n<h3 id=\"url\">URL</h3>\n<p><code>https://feedlink-210643547921.herokuapp.com/api/mpesa/callback</code></p>\n<h3 id=\"request-body\">Request Body</h3>\n<p>The request body should be in JSON format and must include the following parameters:</p>\n<ul>\n<li><p><strong>Body</strong>: An object containing the payment details.</p>\n<ul>\n<li><p><strong>stkCallback</strong>: An object representing the callback details.</p>\n<ul>\n<li><p><strong>MerchantRequestID</strong>: A unique identifier for the merchant request.</p>\n</li>\n<li><p><strong>CheckoutRequestID</strong>: A unique identifier for the checkout request.</p>\n</li>\n<li><p><strong>ResultCode</strong>: An integer indicating the result of the payment processing (e.g., 0 for success).</p>\n</li>\n<li><p><strong>ResultDesc</strong>: A string providing a description of the result.</p>\n</li>\n<li><p><strong>CallbackMetadata</strong>: An object containing additional information about the transaction.</p>\n<ul>\n<li><p><strong>Item</strong>: An array of objects, each containing:</p>\n<ul>\n<li><p><strong>Name</strong>: The name of the metadata item (e.g., \"Amount\").</p>\n</li>\n<li><p><strong>Value</strong>: The corresponding value for the metadata item.</p>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n<h3 id=\"example-request\">Example Request</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"Body\": {\n    \"stkCallback\": {\n      \"MerchantRequestID\": \"2e9c-429c-a95c-b4cd653531a3544\",\n      \"CheckoutRequestID\": \"ws_CO_031020251030357237999683\",\n      \"ResultCode\": 0,\n      \"ResultDesc\": \"The service request is processed\",\n      \"CallbackMetadata\": {\n        \"Item\": [\n          {\n            \"Name\": \"Amount\",\n            \"Value\": 1\n          }\n        ]\n      }\n    }\n  }\n}\n\n</code></pre>\n<h2 id=\"response\">Response</h2>\n<h3 id=\"status-code\">Status Code</h3>\n<ul>\n<li><code>200 OK</code>: Indicates that the request was successfully processed.</li>\n</ul>\n<h3 id=\"response-body\">Response Body</h3>\n<p>The response will be in JSON format and will include the following fields:</p>\n<ul>\n<li><p><strong>ResultCode</strong>: An integer indicating the result of the callback processing (0 for success).</p>\n</li>\n<li><p><strong>ResultDesc</strong>: A string providing a description of the result.</p>\n</li>\n<li><p><strong>receipt_url</strong>: A URL for the receipt, which may be <code>null</code> if not applicable.</p>\n</li>\n</ul>\n<h3 id=\"example-response\">Example Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"ResultCode\": 0,\n  \"ResultDesc\": \"\",\n  \"receipt_url\": null\n}\n\n</code></pre>\n<h2 id=\"error-handling\">Error Handling</h2>\n<p>In case of a <code>500 Internal Server Error</code>, it is recommended to check the following:</p>\n<ul>\n<li><p>Ensure that the request body is correctly formatted and contains all required fields.</p>\n</li>\n<li><p>Verify that the MerchantRequestID and CheckoutRequestID are valid and correspond to a real transaction.</p>\n</li>\n<li><p>Check server logs for any specific error messages that can provide insights into what went wrong.</p>\n</li>\n</ul>\n<p>By following these guidelines, you can effectively troubleshoot issues related to this API endpoint.</p>\n","urlObject":{"protocol":"https","path":["api","mpesa","callback"],"host":["feedlink-210643547921","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"304f0c89-f9d1-4e3e-9bf5-095dc3d33e99","name":"New Request","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n   \"Body\": {\n      \"stkCallback\": {\n         \"MerchantRequestID\": \"2e9c-429c-a95c-b4cd653531a35448\",\n         \"CheckoutRequestID\": \"ws_CO_03102025103035723799968388\",\n         \"ResultCode\": 0,\n         \"ResultDesc\": \"The service request is processed successfully.\",\n         \"CallbackMetadata\": {\n            \"Item\": [\n               {\"Name\": \"Amount\", \"Value\": 1.00},\n               {\"Name\": \"MpesaReceiptNumber\", \"Value\": \"NLJ7RT61SV\"},\n               {\"Name\": \"TransactionDate\", \"Value\": 20251003102800},\n               {\"Name\": \"PhoneNumber\", \"Value\": 254799968388}\n            ]\n         }\n      }\n   }\n}\n","options":{"raw":{"language":"json"}}},"url":"https://feedlink-210643547921.herokuapp.com/api/mpesa/callback"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Allow","value":"OPTIONS, POST"},{"key":"Content-Length","value":"82"},{"key":"Content-Type","value":"application/json"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Date","value":"Mon, 06 Oct 2025 07:46:37 GMT"},{"key":"Nel","value":"{\"report_to\":\"heroku-nel\",\"response_headers\":[\"Via\"],\"max_age\":3600,\"success_fraction\":0.01,\"failure_fraction\":0.1}"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Report-To","value":"{\"group\":\"heroku-nel\",\"endpoints\":[{\"url\":\"https://nel.heroku.com/reports?s=61Bx2nFZWtiUNkGhKQxgUxS8dC%2FFvmMTuCzRkRNIp7A%3D\\u0026sid=1b10b0ff-8a76-4548-befa-353fc6c6c045\\u0026ts=1759736796\"}],\"max_age\":3600}"},{"key":"Reporting-Endpoints","value":"heroku-nel=\"https://nel.heroku.com/reports?s=61Bx2nFZWtiUNkGhKQxgUxS8dC%2FFvmMTuCzRkRNIp7A%3D&sid=1b10b0ff-8a76-4548-befa-353fc6c6c045&ts=1759736796\""},{"key":"Server","value":"Heroku"},{"key":"Vary","value":"Accept, origin"},{"key":"Via","value":"1.1 heroku-router"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"}],"cookie":[],"responseTime":null,"body":"{\n    \"ResultCode\": 0,\n    \"ResultDesc\": \"Callback processed successfully\",\n    \"receipt_url\": null\n}"}],"_postman_id":"2942f68b-377b-48e6-a0b3-c521df42e7fe"}],"id":"8b1e6607-c370-4e8e-b3e2-f9063af0161a","_postman_id":"8b1e6607-c370-4e8e-b3e2-f9063af0161a","description":""},{"name":"Users","item":[{"name":"get users","event":[{"listen":"test","script":{"id":"d63eba59-ab6b-4a0d-8b07-18cbba800b06","exec":["const response = pm.response.json();","","pm.test(\"Status code is 200\", function () {","    pm.expect(pm.response.code).to.equal(200);","});","","pm.test(\"Response time is less than 3000ms\", function () {","    pm.expect(pm.response.responseTime).to.be.below(3000);","});","","pm.test(\"Content-Type is application/json\", function () {","    pm.expect(pm.response.headers.get(\"Content-Type\")).to.equal(\"application/json\");","});","","pm.test(\"Response body is an array\", function () {","    pm.expect(response).to.be.an('array');","});","","response.forEach(user => {","    pm.test(\"User object has required fields\", function () {","        pm.expect(user).to.have.all.keys('id', 'first_name', 'last_name', 'email', 'role', 'profile_picture', 'address', 'till_number', 'latitude', 'longitude');","    });","    ","    pm.test(\"User fields have correct types\", function () {","        pm.expect(user.id).to.be.a('number');","        pm.expect(user.first_name).to.be.a('string');","        pm.expect(user.last_name).to.be.a('string');","        pm.expect(user.email).to.be.a('string');","        pm.expect(user.role).to.be.a('string');","       pm.expect(user.profile_picture).to.satisfy(value => value === null || typeof value === 'string');","pm.expect(user.address).to.satisfy(value => value === null || typeof value === 'string');","pm.expect(user.till_number).to.satisfy(value => value === null || typeof value === 'string');","","        pm.expect(user.latitude).to.satisfy(value => value === null || typeof value === 'number');","        pm.expect(user.longitude).to.satisfy(value => value === null || typeof value === 'number');","    });","});",""],"type":"text/javascript","packages":{},"requests":{}}}],"id":"79d61116-511c-4057-be53-9fd220bb3b10","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://feedlink-210643547921.herokuapp.com/api/users/","urlObject":{"protocol":"https","path":["api","users",""],"host":["feedlink-210643547921","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"78ea0048-d39d-4a24-bdb6-faacf2ce9a17","name":"get users","originalRequest":{"method":"GET","header":[],"url":"https://feedlink-210643547921.herokuapp.com/api/users/"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Allow","value":"GET, POST, HEAD, OPTIONS"},{"key":"Content-Length","value":"3362"},{"key":"Content-Type","value":"application/json"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Date","value":"Fri, 19 Sep 2025 13:08:18 GMT"},{"key":"Nel","value":"{\"report_to\":\"heroku-nel\",\"response_headers\":[\"Via\"],\"max_age\":3600,\"success_fraction\":0.01,\"failure_fraction\":0.1}"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Report-To","value":"{\"group\":\"heroku-nel\",\"endpoints\":[{\"url\":\"https://nel.heroku.com/reports?s=WCG%2BRqa1OOT57vXq0%2FlKLJfseofZQTXhRfVW5XtW0kE%3D\\u0026sid=1b10b0ff-8a76-4548-befa-353fc6c6c045\\u0026ts=1758287298\"}],\"max_age\":3600}"},{"key":"Reporting-Endpoints","value":"heroku-nel=\"https://nel.heroku.com/reports?s=WCG%2BRqa1OOT57vXq0%2FlKLJfseofZQTXhRfVW5XtW0kE%3D&sid=1b10b0ff-8a76-4548-befa-353fc6c6c045&ts=1758287298\""},{"key":"Server","value":"Heroku"},{"key":"Vary","value":"Accept, origin"},{"key":"Via","value":"1.1 heroku-router"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"id\": 1,\n        \"first_name\": \"semhal\",\n        \"last_name\": \"estifanos\",\n        \"email\": \"semhalestif02@gmail.com\",\n        \"role\": \"producer\",\n        \"profile_picture\": \"\",\n        \"address\": \"Bole,AdisAbeba\",\n        \"till_number\": \"123456\",\n        \"latitude\": 8.9822541,\n        \"longitude\": 38.8383871\n    },\n    {\n        \"id\": 3,\n        \"first_name\": \"Hewan\",\n        \"last_name\": \"Mehari\",\n        \"email\": \"hewaanmehari@gmail.com\",\n        \"role\": \"recycler\",\n        \"profile_picture\": \"\",\n        \"address\": \"\",\n        \"till_number\": \"\",\n        \"latitude\": null,\n        \"longitude\": null\n    },\n    {\n        \"id\": 4,\n        \"first_name\": \"Emeline\",\n        \"last_name\": \"Niyogisubizo\",\n        \"email\": \"rubayizaniyogisubizoemeline@gmail.com\",\n        \"role\": \"admin\",\n        \"profile_picture\": \"\",\n        \"address\": \"\",\n        \"till_number\": \"\",\n        \"latitude\": null,\n        \"longitude\": null\n    },\n    {\n        \"id\": 5,\n        \"first_name\": \"John\",\n        \"last_name\": \"Kamau\",\n        \"email\": \"kamau@gmail.com\",\n        \"role\": \"recycler\",\n        \"profile_picture\": \"\",\n        \"address\": \"\",\n        \"till_number\": \"\",\n        \"latitude\": null,\n        \"longitude\": null\n    },\n    {\n        \"id\": 6,\n        \"first_name\": \"Peter\",\n        \"last_name\": \"Macharia\",\n        \"email\": \"macharia@gmail.com\",\n        \"role\": \"recycler\",\n        \"profile_picture\": \"\",\n        \"address\": \"\",\n        \"till_number\": \"\",\n        \"latitude\": null,\n        \"longitude\": null\n    },\n    {\n        \"id\": 7,\n        \"first_name\": \"Magret\",\n        \"last_name\": \"David\",\n        \"email\": \"magretdavid@gmail.com\",\n        \"role\": \"buyer\",\n        \"profile_picture\": \"\",\n        \"address\": \"\",\n        \"till_number\": \"\",\n        \"latitude\": null,\n        \"longitude\": null\n    },\n    {\n        \"id\": 8,\n        \"first_name\": \"Kevin\",\n        \"last_name\": \"Ouma\",\n        \"email\": \"ouma@gmail.com\",\n        \"role\": \"recycler\",\n        \"profile_picture\": \"\",\n        \"address\": \"\",\n        \"till_number\": \"\",\n        \"latitude\": null,\n        \"longitude\": null\n    },\n    {\n        \"id\": 9,\n        \"first_name\": \"Nshuti\",\n        \"last_name\": \"Divine\",\n        \"email\": \"nsutidivine@gmail.com\",\n        \"role\": \"buyer\",\n        \"profile_picture\": \"\",\n        \"address\": \"\",\n        \"till_number\": \"\",\n        \"latitude\": null,\n        \"longitude\": null\n    },\n    {\n        \"id\": 10,\n        \"first_name\": \"Jane\",\n        \"last_name\": \"Njoki\",\n        \"email\": \"njoki@gmail.com\",\n        \"role\": \"recycler\",\n        \"profile_picture\": \"\",\n        \"address\": \"\",\n        \"till_number\": \"\",\n        \"latitude\": null,\n        \"longitude\": null\n    },\n    {\n        \"id\": 11,\n        \"first_name\": \"Kembol\",\n        \"last_name\": \"Carol\",\n        \"email\": \"kembolcarol@gmail.com\",\n        \"role\": \"buyer\",\n        \"profile_picture\": \"\",\n        \"address\": \"\",\n        \"till_number\": \"\",\n        \"latitude\": null,\n        \"longitude\": null\n    },\n    {\n        \"id\": 12,\n        \"first_name\": \"Lucy\",\n        \"last_name\": \"Wambui\",\n        \"email\": \"wambui@gmail.com\",\n        \"role\": \"recycler\",\n        \"profile_picture\": \"\",\n        \"address\": \"\",\n        \"till_number\": \"\",\n        \"latitude\": null,\n        \"longitude\": null\n    },\n    {\n        \"id\": 2,\n        \"first_name\": \"Elleni\",\n        \"last_name\": \"Dawit\",\n        \"email\": \"aberasemhal@gmail.com\",\n        \"role\": \"producer\",\n        \"profile_picture\": \"\",\n        \"address\": \"Westlands, Nairobi, Kenya\",\n        \"till_number\": \"1234\",\n        \"latitude\": -1.2465281,\n        \"longitude\": 36.7860759\n    },\n    {\n        \"id\": 13,\n        \"first_name\": \"Esther\",\n        \"last_name\": \"Wambui\",\n        \"email\": \"essy@gmail.com\",\n        \"role\": \"recycler\",\n        \"profile_picture\": \"\",\n        \"address\": \"\",\n        \"till_number\": \"\",\n        \"latitude\": null,\n        \"longitude\": null\n    },\n    {\n        \"id\": 14,\n        \"first_name\": \"Daniel\",\n        \"last_name\": \"Njoroge\",\n        \"email\": \"njoroge@gmail.com\",\n        \"role\": \"buyer\",\n        \"profile_picture\": \"\",\n        \"address\": \"\",\n        \"till_number\": \"\",\n        \"latitude\": null,\n        \"longitude\": null\n    },\n    {\n        \"id\": 15,\n        \"first_name\": \"Brian\",\n        \"last_name\": \"Wanyoike\",\n        \"email\": \"wanyoike@gmail.com\",\n        \"role\": \"buyer\",\n        \"profile_picture\": \"\",\n        \"address\": \"\",\n        \"till_number\": \"\",\n        \"latitude\": null,\n        \"longitude\": null\n    },\n    {\n        \"id\": 16,\n        \"first_name\": \"Tobias\",\n        \"last_name\": \"Otieno\",\n        \"email\": \"otieno@gmail.com\",\n        \"role\": \"buyer\",\n        \"profile_picture\": \"\",\n        \"address\": \"\",\n        \"till_number\": \"\",\n        \"latitude\": null,\n        \"longitude\": null\n    },\n    {\n        \"id\": 17,\n        \"first_name\": \"Sandra\",\n        \"last_name\": \"Akinyi\",\n        \"email\": \"akinyi@gmail.com\",\n        \"role\": \"buyer\",\n        \"profile_picture\": \"\",\n        \"address\": \"\",\n        \"till_number\": \"\",\n        \"latitude\": null,\n        \"longitude\": null\n    },\n    {\n        \"id\": 18,\n        \"first_name\": \"Samuel\",\n        \"last_name\": \"Ngugi\",\n        \"email\": \"sammy@gmail.com\",\n        \"role\": \"buyer\",\n        \"profile_picture\": \"\",\n        \"address\": \"\",\n        \"till_number\": \"\",\n        \"latitude\": null,\n        \"longitude\": null\n    }\n]"}],"_postman_id":"79d61116-511c-4057-be53-9fd220bb3b10"},{"name":"sign up","event":[{"listen":"test","script":{"id":"ce578091-33b8-41fe-8334-774f8c492b7a","exec":["const MAX_RESPONSE_TIME_MS = 5000;","const REQUIRED_CONTENT_TYPE = \"application/json\";","","const REQUIRED_FIELDS_ON_SUCCESS = {","    id: \"number\",","    first_name: \"string\",","    email: \"string\"","};","","pm.test(\"Response time is less than \" + MAX_RESPONSE_TIME_MS + \"ms\", () => {","    pm.expect(pm.response.responseTime).to.be.below(MAX_RESPONSE_TIME_MS);","});","","pm.test(\"Content-Type is \" + REQUIRED_CONTENT_TYPE, () => {","    pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(REQUIRED_CONTENT_TYPE);","});","","pm.test(\"Response body is not empty\", () => {","    pm.response.to.have.body;","});","","const statusCode = pm.response.code;","","if (statusCode === 201) {","    pm.test(\"Status code is 201 (user created)\", () => {","        pm.response.to.have.status(201);","    });","","    const jsonData = pm.response.json();","    const items = Array.isArray(jsonData) ? jsonData : [jsonData];","","    pm.test(\"Each object contains required fields with correct types\", () => {","        items.forEach((item, index) => {","            Object.entries(REQUIRED_FIELDS_ON_SUCCESS).forEach(([field, expectedType]) => {","                pm.expect(item, `Item ${index}: Missing field '${field}'`).to.have.property(field);","                ","                const value = item[field];","                const actualType = Array.isArray(value) ","                    ? \"array\" ","                    : value === null ","                        ? \"null\" ","                        : typeof value;","","                pm.expect(actualType, ","                    `Item ${index}: Field '${field}' should be '${expectedType}', but got '${actualType}'`","                ).to.eql(expectedType);","            });","        });","    });","","} else if (statusCode === 400) {","    pm.test(\"Status code is 400 (duplicate user or validation error)\", () => {","        pm.response.to.have.status(400);","    });","","    pm.test(\"400 response contains error detail\", () => {","        const body = pm.response.json();","        pm.expect(body).to.be.an(\"object\");","        pm.expect(Object.keys(body).length).to.be.above(0);","    });","","} else {","    pm.test(`Unexpected status code: ${statusCode}`, () => {","        pm.expect.fail(`Expected 201 or 400, but got ${statusCode}`);","    });","}"],"type":"text/javascript","packages":{},"requests":{}}}],"id":"feaf6f54-8f17-4623-a555-4dac8803be9a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"first_name\": \"kisanet\",\n    \"last_name\":\"estifanos\",\n    \"email\":\"semhalestifanos770b35@gmail.com\",\n     \"password\":\"12345\",\n    \"role\":\"producer\",\n    \"address\": \"kiambu\",\n    \"till_number\": \"123456\"\n}","options":{"raw":{"language":"json"}}},"url":"https://feedlink-210643547921.herokuapp.com/api/signup/","urlObject":{"protocol":"https","path":["api","signup",""],"host":["feedlink-210643547921","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"834cb8bd-a582-40a1-bbee-ab8ed2a8acb4","name":"users sign up","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"first_name\": \"kisanet\",\n    \"last_name\":\"estifanos\",\n    \"email\":\"semhalestifanos35@gmail.com\",\n     \"password\":\"12345\",\n    \"role\":\"producer\",\n    \"address\": \"kiambu\",\n    \"till_number\": \"123456\"\n}","options":{"raw":{"language":"json"}}},"url":"https://feedlink-210643547921.herokuapp.com/api/signup/"},"status":"Created","code":201,"_postman_previewlanguage":null,"header":[{"key":"Allow","value":"POST, OPTIONS"},{"key":"Content-Length","value":"220"},{"key":"Content-Type","value":"application/json"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Date","value":"Fri, 19 Sep 2025 13:12:23 GMT"},{"key":"Nel","value":"{\"report_to\":\"heroku-nel\",\"response_headers\":[\"Via\"],\"max_age\":3600,\"success_fraction\":0.01,\"failure_fraction\":0.1}"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Report-To","value":"{\"group\":\"heroku-nel\",\"endpoints\":[{\"url\":\"https://nel.heroku.com/reports?s=%2FIFF8vUtqFnawu0%2Fu1b5NJjK3xfWjC738lApTqIzZVs%3D\\u0026sid=1b10b0ff-8a76-4548-befa-353fc6c6c045\\u0026ts=1758287542\"}],\"max_age\":3600}"},{"key":"Reporting-Endpoints","value":"heroku-nel=\"https://nel.heroku.com/reports?s=%2FIFF8vUtqFnawu0%2Fu1b5NJjK3xfWjC738lApTqIzZVs%3D&sid=1b10b0ff-8a76-4548-befa-353fc6c6c045&ts=1758287542\""},{"key":"Server","value":"Heroku"},{"key":"Vary","value":"Accept, origin"},{"key":"Via","value":"1.1 heroku-router"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 19,\n    \"first_name\": \"kisanet\",\n    \"last_name\": \"estifanos\",\n    \"email\": \"semhalestifanos35@gmail.com\",\n    \"role\": \"producer\",\n    \"till_number\": \"123456\",\n    \"profile_picture\": \"\",\n    \"address\": \"kiambu\",\n    \"latitude\": -1.0363951,\n    \"longitude\": 36.8431312\n}"},{"id":"3b7c4862-046a-4743-950e-5d57e7b24384","name":"sign up","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"first_name\": \"kisanet\",\n    \"last_name\":\"estifanos\",\n    \"email\":\"semhalestifanos770u35@gmail.com\",\n     \"password\":\"12345\",\n    \"role\":\"producer\",\n    \"address\": \"kiambu\",\n    \"till_number\": \"123456\"\n}","options":{"raw":{"language":"json"}}},"url":"https://feedlink-210643547921.herokuapp.com/api/signup/"},"status":"Created","code":201,"_postman_previewlanguage":null,"header":[{"key":"Allow","value":"POST, OPTIONS"},{"key":"Content-Length","value":"227"},{"key":"Content-Type","value":"application/json"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Date","value":"Wed, 08 Oct 2025 05:17:01 GMT"},{"key":"Nel","value":"{\"report_to\":\"heroku-nel\",\"response_headers\":[\"Via\"],\"max_age\":3600,\"success_fraction\":0.01,\"failure_fraction\":0.1}"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Report-To","value":"{\"group\":\"heroku-nel\",\"endpoints\":[{\"url\":\"https://nel.heroku.com/reports?s=b9KgAbdR%2BwgQ6uYKfPDiwIfe%2Bu1izC6sFVQ%2B8GH0WCg%3D\\u0026sid=1b10b0ff-8a76-4548-befa-353fc6c6c045\\u0026ts=1759900621\"}],\"max_age\":3600}"},{"key":"Reporting-Endpoints","value":"heroku-nel=\"https://nel.heroku.com/reports?s=b9KgAbdR%2BwgQ6uYKfPDiwIfe%2Bu1izC6sFVQ%2B8GH0WCg%3D&sid=1b10b0ff-8a76-4548-befa-353fc6c6c045&ts=1759900621\""},{"key":"Server","value":"Heroku"},{"key":"Vary","value":"Accept, origin"},{"key":"Via","value":"1.1 heroku-router"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 201,\n    \"first_name\": \"kisanet\",\n    \"last_name\": \"estifanos\",\n    \"email\": \"semhalestifanos770u35@gmail.com\",\n    \"role\": \"producer\",\n    \"till_number\": \"123456\",\n    \"profile_picture\": null,\n    \"address\": \"kiambu\",\n    \"latitude\": -1.0363951,\n    \"longitude\": 36.8431312\n}"}],"_postman_id":"feaf6f54-8f17-4623-a555-4dac8803be9a"},{"name":"ForgetPassword","event":[{"listen":"test","script":{"id":"dac9afb9-d226-4206-8dcd-1655f6901832","exec":["const response = pm.response.json();","","pm.test(\"Status code is 200\", function () {","    pm.expect(pm.response.code).to.equal(200);","});","","pm.test(\"Response time is less than 3000ms\", function () {","    pm.expect(pm.response.responseTime).to.be.below(3000);","});","","pm.test(\"Content-Type is application/json\", function () {","    pm.expect(pm.response.headers.get(\"Content-Type\")).to.equal(\"application/json\");","});","","pm.test(\"Response body has required fields\", function () {","    pm.expect(response).to.have.property(\"detail\");","});","","pm.test(\"Field types are correct\", function () {","    pm.expect(response.detail).to.be.a('string');","});",""],"type":"text/javascript","packages":{},"requests":{}}}],"id":"53a9b549-257c-48ef-b0e5-f639855590e6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \n    \"email\":\"mahadoaliyussuf@gmail.com\"\n\n   \n}","options":{"raw":{"language":"json"}}},"url":"https://feedlink-210643547921.herokuapp.com/api/forgotpassword/","urlObject":{"protocol":"https","path":["api","forgotpassword",""],"host":["feedlink-210643547921","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"9cad5b5b-86f6-4ae3-98b4-63f56fb20b6f","name":"ForgetPassword user","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \n    \"email\":\"semhalestifanos35@gmail.com\"\n\n   \n}","options":{"raw":{"language":"json"}}},"url":"https://feedlink-210643547921.herokuapp.com/api/forgotpassword/"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Allow","value":"POST, OPTIONS"},{"key":"Content-Length","value":"36"},{"key":"Content-Type","value":"application/json"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Date","value":"Fri, 19 Sep 2025 13:16:50 GMT"},{"key":"Nel","value":"{\"report_to\":\"heroku-nel\",\"response_headers\":[\"Via\"],\"max_age\":3600,\"success_fraction\":0.01,\"failure_fraction\":0.1}"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Report-To","value":"{\"group\":\"heroku-nel\",\"endpoints\":[{\"url\":\"https://nel.heroku.com/reports?s=awlHYjE71g%2FSEjRENcL6VXbPsxBNNjQPpvKuYxSTaHE%3D\\u0026sid=1b10b0ff-8a76-4548-befa-353fc6c6c045\\u0026ts=1758287807\"}],\"max_age\":3600}"},{"key":"Reporting-Endpoints","value":"heroku-nel=\"https://nel.heroku.com/reports?s=awlHYjE71g%2FSEjRENcL6VXbPsxBNNjQPpvKuYxSTaHE%3D&sid=1b10b0ff-8a76-4548-befa-353fc6c6c045&ts=1758287807\""},{"key":"Server","value":"Heroku"},{"key":"Vary","value":"Accept, origin"},{"key":"Via","value":"1.1 heroku-router"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"}],"cookie":[],"responseTime":null,"body":"{\n    \"detail\": \"OTP sent to your email.\"\n}"}],"_postman_id":"53a9b549-257c-48ef-b0e5-f639855590e6"},{"name":"Login","event":[{"listen":"test","script":{"id":"a5396c33-1d30-4d7e-bd7d-02a5202c8a8f","exec":["const response = pm.response.json();","","pm.test(\"Status code is 200\", function () {","    pm.expect(pm.response.code).to.equal(200);","});","","pm.test(\"Response time is less than 5000ms\", function () {","    pm.expect(pm.response.responseTime).to.be.below(5000);","});","","pm.test(\"Content-Type is application/json\", function () {","    pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");","});","","if (pm.response.code === 200) {","    pm.test(\"Response body contains required fields\", function () {","        pm.expect(response).to.have.all.keys('token', 'user_id', 'first_name', 'last_name', 'email');","    });","","    pm.test(\"Field types are correct\", function () {","        pm.expect(response.token).to.be.a('string');","        pm.expect(response.user_id).to.be.a('string');","        pm.expect(response.first_name).to.be.a('string');","        pm.expect(response.last_name).to.be.a('string');","        pm.expect(response.email).to.be.a('string');","    });","} else {","    pm.test(\"Error response contains 'error' message\", function () {","        pm.expect(response).to.have.property('error');","        pm.expect(response.error).to.be.a('string');","    });","}"],"type":"text/javascript","packages":{},"requests":{}}}],"id":"31aaac65-9b00-4848-b3fb-c3e69c204707","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \n    \"email\":\"karenwanngugi@gmail.com\",\n    \"password\":\"omenim\"\n   \n}","options":{"raw":{"language":"json"}}},"url":"https://feedlink-210643547921.herokuapp.com/api/login/","urlObject":{"protocol":"https","path":["api","login",""],"host":["feedlink-210643547921","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"93fe55e8-d839-4cf0-8b9a-98ddffb7cb82","name":"User login","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \n    \"email\":\"semhalestifanos35@gmail.com\",\n    \"password\":\"12345\"\n   \n}","options":{"raw":{"language":"json"}}},"url":"https://feedlink-210643547921.herokuapp.com/api/login/"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Allow","value":"POST, OPTIONS"},{"key":"Content-Length","value":"152"},{"key":"Content-Type","value":"application/json"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Date","value":"Fri, 19 Sep 2025 13:14:30 GMT"},{"key":"Nel","value":"{\"report_to\":\"heroku-nel\",\"response_headers\":[\"Via\"],\"max_age\":3600,\"success_fraction\":0.01,\"failure_fraction\":0.1}"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Report-To","value":"{\"group\":\"heroku-nel\",\"endpoints\":[{\"url\":\"https://nel.heroku.com/reports?s=TaDTQWjhYEvwFJpr4IHgn3troci2e7hxIWTnRy8lwxc%3D\\u0026sid=1b10b0ff-8a76-4548-befa-353fc6c6c045\\u0026ts=1758287669\"}],\"max_age\":3600}"},{"key":"Reporting-Endpoints","value":"heroku-nel=\"https://nel.heroku.com/reports?s=TaDTQWjhYEvwFJpr4IHgn3troci2e7hxIWTnRy8lwxc%3D&sid=1b10b0ff-8a76-4548-befa-353fc6c6c045&ts=1758287669\""},{"key":"Server","value":"Heroku"},{"key":"Vary","value":"Accept, origin"},{"key":"Via","value":"1.1 heroku-router"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"}],"cookie":[],"responseTime":null,"body":"{\n    \"token\": \"d3c2f6729794635ff19f92c3a870f1b679899f6f\",\n    \"user_id\": \"19\",\n    \"first_name\": \"kisanet\",\n    \"last_name\": \"estifanos\",\n    \"email\": \"semhalestifanos35@gmail.com\"\n}"}],"_postman_id":"31aaac65-9b00-4848-b3fb-c3e69c204707"},{"name":"verification","event":[{"listen":"test","script":{"id":"9187ce03-a1ac-4cdb-8a90-02756accda81","exec":["const statusCode = pm.response.code;","","pm.test(\"Status code is 200 or 400\", function () {","    pm.expect(statusCode).to.be.oneOf([200, 400], `Unexpected status: ${statusCode}`);","});","","pm.test(\"Response time is less than 5000ms\", function () {","    pm.expect(pm.response.responseTime).to.be.below(5000);","});","","pm.test(\"Content-Type is application/json\", function () {","    const contentType = pm.response.headers.get(\"Content-Type\");","    pm.expect(contentType).to.include(\"application/json\");","});","","let response;","try {","    response = pm.response.json();","} catch (e) {","    pm.expect.fail(\"Response body is not valid JSON\");","}","","if (statusCode === 400) {","    pm.test(\"Response body has 'detail' field (400 error)\", function () {","        pm.expect(response).to.have.property('detail');","    });","","    pm.test(\"'detail' field is a string (400 error)\", function () {","        pm.expect(response.detail).to.be.a('string');","    });","} else if (statusCode === 200) {","    pm.test(\"Response is a success (200)\", function () {","        pm.expect(response).to.be.an('object');","    });","}"],"type":"text/javascript","packages":{},"requests":{}}}],"id":"8fc75aad-8205-4087-b6bc-e1ba0b1412d4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \n    \"email\":\"mahadoaliyussuf@gmail.com\",\n    \"otp\":\"2700\"\n   \n}","options":{"raw":{"language":"json"}}},"url":"https://feedlink-210643547921.herokuapp.com/api/verification/","urlObject":{"protocol":"https","path":["api","verification",""],"host":["feedlink-210643547921","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"856464c3-e8f4-4cce-ae5d-effaf5ba163a","name":"Verification User","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \n    \"email\":\"semhalestifanos35@gmail.com\",\n    \"otp\":\"1266\"\n   \n}","options":{"raw":{"language":"json"}}},"url":"https://feedlink-210643547921.herokuapp.com/api/verification/"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Allow","value":"POST, OPTIONS"},{"key":"Content-Length","value":"26"},{"key":"Content-Type","value":"application/json"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Date","value":"Fri, 19 Sep 2025 13:20:14 GMT"},{"key":"Nel","value":"{\"report_to\":\"heroku-nel\",\"response_headers\":[\"Via\"],\"max_age\":3600,\"success_fraction\":0.01,\"failure_fraction\":0.1}"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Report-To","value":"{\"group\":\"heroku-nel\",\"endpoints\":[{\"url\":\"https://nel.heroku.com/reports?s=p%2BbeRz7NyrPpJMm%2BiI%2F2Bjv3pb7escYo2Wv17zkk36U%3D\\u0026sid=1b10b0ff-8a76-4548-befa-353fc6c6c045\\u0026ts=1758288014\"}],\"max_age\":3600}"},{"key":"Reporting-Endpoints","value":"heroku-nel=\"https://nel.heroku.com/reports?s=p%2BbeRz7NyrPpJMm%2BiI%2F2Bjv3pb7escYo2Wv17zkk36U%3D&sid=1b10b0ff-8a76-4548-befa-353fc6c6c045&ts=1758288014\""},{"key":"Server","value":"Heroku"},{"key":"Vary","value":"Accept, origin"},{"key":"Via","value":"1.1 heroku-router"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"}],"cookie":[],"responseTime":null,"body":"{\n    \"detail\": \"OTP verified.\"\n}"}],"_postman_id":"8fc75aad-8205-4087-b6bc-e1ba0b1412d4"},{"name":"Reset User","event":[{"listen":"test","script":{"id":"81517c10-4dfb-47f4-a249-c50795316ab2","exec":["const response = pm.response.json();","","pm.test(\"Status code is 200\", function () {","    pm.expect(pm.response.code).to.equal(200);","});","","pm.test(\"Response time is less than 5000ms\", function () {","    pm.expect(pm.response.responseTime).to.be.below(5000);","});","","pm.test(\"Response body has required fields\", function () {","    pm.expect(response).to.have.property(\"detail\");","    pm.expect(response.detail).to.be.a(\"string\");","});","","pm.test(\"Content-Type is application/json\", function () {","    pm.expect(pm.response.headers.get(\"Content-Type\")).to.equal(\"application/json\");","});",""],"type":"text/javascript","packages":{},"requests":{}}}],"id":"afb7c742-e963-4cb7-bb79-a9e7c4461018","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n   \"email\": \"mahadoaliyussuf@gmail.com\",\n    \"password\": \"1234567\",\n    \"confirm_password\": \"1234567\"\n\n}","options":{"raw":{"language":"json"}}},"url":"https://feedlink-210643547921.herokuapp.com/api/reset/","urlObject":{"protocol":"https","path":["api","reset",""],"host":["feedlink-210643547921","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"1fd30b7d-0f9e-49e7-85e8-4313cdaedcc9","name":"Reset User","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n   \"email\": \"semhalestifanos35@gmail.com\",\n    \"password\": \"1234567\",\n    \"confirm_password\": \"1234567\"\n\n}","options":{"raw":{"language":"json"}}},"url":"https://feedlink-210643547921.herokuapp.com/api/reset/"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Allow","value":"POST, OPTIONS"},{"key":"Content-Length","value":"39"},{"key":"Content-Type","value":"application/json"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Date","value":"Fri, 19 Sep 2025 13:23:20 GMT"},{"key":"Nel","value":"{\"report_to\":\"heroku-nel\",\"response_headers\":[\"Via\"],\"max_age\":3600,\"success_fraction\":0.01,\"failure_fraction\":0.1}"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Report-To","value":"{\"group\":\"heroku-nel\",\"endpoints\":[{\"url\":\"https://nel.heroku.com/reports?s=rc6r1ptpPWfyFXN43zXt1%2B5gdz4%2FCnMeyxIrDj5iUaM%3D\\u0026sid=1b10b0ff-8a76-4548-befa-353fc6c6c045\\u0026ts=1758288200\"}],\"max_age\":3600}"},{"key":"Reporting-Endpoints","value":"heroku-nel=\"https://nel.heroku.com/reports?s=rc6r1ptpPWfyFXN43zXt1%2B5gdz4%2FCnMeyxIrDj5iUaM%3D&sid=1b10b0ff-8a76-4548-befa-353fc6c6c045&ts=1758288200\""},{"key":"Server","value":"Heroku"},{"key":"Vary","value":"Accept, origin"},{"key":"Via","value":"1.1 heroku-router"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"}],"cookie":[],"responseTime":null,"body":"{\n    \"detail\": \"Password reset successful.\"\n}"}],"_postman_id":"afb7c742-e963-4cb7-bb79-a9e7c4461018"},{"name":"New Request","event":[{"listen":"test","script":{"id":"07591e53-b5c1-45d3-bd65-26d0ff5a3902","exec":["const statusCode = pm.response.code;","","pm.test(\"Status code is 204 (deleted) or 404 (already deleted / not found)\", function () {","    pm.expect(statusCode).to.be.oneOf([204, 404], `Unexpected status: ${statusCode}`);","});","","pm.test(\"Response time is less than 3000ms\", function () {","    pm.expect(pm.response.responseTime).to.be.below(3000);","});","","if (statusCode === 204) {","    pm.test(\"Response body is empty (204)\", function () {","        pm.expect(pm.response.text()).to.be.empty;","    });","","    pm.test(\"Content-Type header is not present (204)\", function () {","        pm.expect(pm.response.headers.get(\"Content-Type\")).to.be.null;","    });","","} else if (statusCode === 404) {","    pm.test(\"Response body is not empty (404 error)\", function () {","        pm.expect(pm.response.text()).to.not.be.empty;","    });","","    pm.test(\"Content-Type is application/json (404)\", function () {","        const ct = pm.response.headers.get(\"Content-Type\");","        pm.expect(ct).to.include(\"application/json\");","    });","","    pm.test(\"404 response contains 'detail' error message\", function () {","        const body = pm.response.json();","        pm.expect(body).to.have.property(\"detail\");","        pm.expect(body.detail).to.be.a(\"string\");","    });","}"],"type":"text/javascript","packages":{},"requests":{}}}],"id":"31d0d263-05e1-4bb1-9542-17e567c88606","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":" {\n        \"id\": 3,\n        \"first_name\": \"Hewan\",\n        \"last_name\": \"Mehari\",\n        \"email\": \"hewaanmehari@gmail.com\",\n        \"role\": \"buyer\",\n        \"profile_picture\": null,\n        \"address\": \"\",\n        \"till_number\": \"\",\n        \"latitude\": null,\n        \"longitude\": null\n    }","options":{"raw":{"language":"json"}}},"url":"https://feedlink-210643547921.herokuapp.com/api/users/15/","urlObject":{"protocol":"https","path":["api","users","15",""],"host":["feedlink-210643547921","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"c709d3e4-c696-4311-b06c-def7525779bc","name":"Delet user","originalRequest":{"method":"DELETE","header":[],"url":"https://feedlink-210643547921.herokuapp.com/api/users/5/"},"status":"No Content","code":204,"_postman_previewlanguage":null,"header":[{"key":"Allow","value":"GET, PUT, PATCH, DELETE, HEAD, OPTIONS"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Date","value":"Fri, 19 Sep 2025 13:41:34 GMT"},{"key":"Nel","value":"{\"report_to\":\"heroku-nel\",\"response_headers\":[\"Via\"],\"max_age\":3600,\"success_fraction\":0.01,\"failure_fraction\":0.1}"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Report-To","value":"{\"group\":\"heroku-nel\",\"endpoints\":[{\"url\":\"https://nel.heroku.com/reports?s=U0ZZrFNivioLQnZdv8oiVaaC4TZQ0XzFYPW3UF9m7N8%3D\\u0026sid=1b10b0ff-8a76-4548-befa-353fc6c6c045\\u0026ts=1758289294\"}],\"max_age\":3600}"},{"key":"Reporting-Endpoints","value":"heroku-nel=\"https://nel.heroku.com/reports?s=U0ZZrFNivioLQnZdv8oiVaaC4TZQ0XzFYPW3UF9m7N8%3D&sid=1b10b0ff-8a76-4548-befa-353fc6c6c045&ts=1758289294\""},{"key":"Server","value":"Heroku"},{"key":"Vary","value":"Accept, origin"},{"key":"Via","value":"1.1 heroku-router"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"}],"cookie":[],"responseTime":null,"body":null}],"_postman_id":"31d0d263-05e1-4bb1-9542-17e567c88606"},{"name":"Update user","event":[{"listen":"test","script":{"id":"920c75c0-08ca-4c8c-ad5a-ee7362cf53c7","exec":["const response = pm.response.json();","","pm.test(\"Status code is 200\", function () {","    pm.expect(pm.response.code).to.equal(200);","});","","pm.test(\"Response time is less than 3000ms\", function () {","    pm.expect(pm.response.responseTime).to.be.below(3000);","});","","pm.test(\"Content-Type is application/json\", function () {","    pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");","});","","const requiredFields = [","    'id', 'first_name', 'last_name', 'email', 'role',","    'profile_picture', 'address', 'till_number', 'latitude', 'longitude'","];","","requiredFields.forEach(field => {","    pm.test(`${field} exists in the response`, function () {","        pm.expect(response).to.have.property(field);","    });","});","","pm.test(\"Field types are correct\", function () {","    pm.expect(response.id).to.be.a('number');","    pm.expect(response.first_name).to.satisfy(val => val === null || typeof val === 'string');","    pm.expect(response.last_name).to.satisfy(val => val === null || typeof val === 'string');","    pm.expect(response.email).to.be.a('string'); ","    pm.expect(response.role).to.satisfy(val => val === null || typeof val === 'string');","","    const optionalStringFields = ['profile_picture', 'address', 'till_number'];","    optionalStringFields.forEach(field => {","        pm.expect(response[field], `${field} must be string or null`)","            .to.satisfy(val => val === null || typeof val === 'string');","    });","","    pm.expect(response.latitude).to.satisfy(val => val === null || typeof val === 'number');","    pm.expect(response.longitude).to.satisfy(val => val === null || typeof val === 'number');","});"],"type":"text/javascript","packages":{},"requests":{}}}],"id":"b83fce82-171e-48e7-9f17-caae978b7482","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"\n    {\n        \"id\": 1,\n        \"first_name\": \"Kibrom\",\n        \"last_name\": \"Tekklay\",\n        \"email\": \"kibrom@gmail.com\",\n        \"role\": \"producer\",\n        \"profile_picture\": null,\n        \"address\": \"Korongo\",\n        \"till_number\": \"108900\",\n        \"latitude\": 10.905925,\n        \"longitude\": 29.637732\n    }","options":{"raw":{"language":"json"}}},"url":"https://feedlink-210643547921.herokuapp.com/api/users/1/","urlObject":{"protocol":"https","path":["api","users","1",""],"host":["feedlink-210643547921","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"5244e37e-5029-42db-92ab-32a5cba083da","name":"Update users","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"    {\n        \"id\": 8,\n        \"first_name\": \"Kevushey\",\n        \"last_name\": \"Ouumma\",\n        \"email\": \"ouma@gmail.com\",\n        \"role\": \"recycler\",\n        \"profile_picture\": \"\",\n        \"address\": \"\",\n        \"till_number\": \"\",\n        \"latitude\": null,\n        \"longitude\": null\n    }","options":{"raw":{"language":"json"}}},"url":"https://feedlink-210643547921.herokuapp.com/api/users/8/"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Allow","value":"GET, PUT, PATCH, DELETE, HEAD, OPTIONS"},{"key":"Content-Length","value":"180"},{"key":"Content-Type","value":"application/json"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Date","value":"Fri, 19 Sep 2025 13:46:48 GMT"},{"key":"Nel","value":"{\"report_to\":\"heroku-nel\",\"response_headers\":[\"Via\"],\"max_age\":3600,\"success_fraction\":0.01,\"failure_fraction\":0.1}"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Report-To","value":"{\"group\":\"heroku-nel\",\"endpoints\":[{\"url\":\"https://nel.heroku.com/reports?s=K%2Bt52QuLMKjNmsFV9urlagTdzsn79O5c5XXBzIKI85k%3D\\u0026sid=1b10b0ff-8a76-4548-befa-353fc6c6c045\\u0026ts=1758289608\"}],\"max_age\":3600}"},{"key":"Reporting-Endpoints","value":"heroku-nel=\"https://nel.heroku.com/reports?s=K%2Bt52QuLMKjNmsFV9urlagTdzsn79O5c5XXBzIKI85k%3D&sid=1b10b0ff-8a76-4548-befa-353fc6c6c045&ts=1758289608\""},{"key":"Server","value":"Heroku"},{"key":"Vary","value":"Accept, origin"},{"key":"Via","value":"1.1 heroku-router"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 8,\n    \"first_name\": \"Kevushey\",\n    \"last_name\": \"Ouumma\",\n    \"email\": \"ouma@gmail.com\",\n    \"role\": \"recycler\",\n    \"profile_picture\": \"\",\n    \"address\": \"\",\n    \"till_number\": \"\",\n    \"latitude\": null,\n    \"longitude\": null\n}"},{"id":"b1117d57-4dda-41c3-8e95-5971dbb38323","name":"Update user","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"  {\n        \"id\": 2,\n        \"first_name\": \"Selam\",\n        \"last_name\": \"Weldet\",\n        \"email\": \"selam@gmail.com\",\n        \"role\": \"producer\",\n        \"profile_picture\": \"\",\n        \"address\": \"Korongo\",\n        \"till_number\": \"123456\",\n        \"latitude\": 10.905925,\n        \"longitude\": 29.637732\n    }","options":{"raw":{"language":"json"}}},"url":"https://feedlink-210643547921.herokuapp.com/api/users/2/"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Allow","value":"GET, PUT, PATCH, DELETE, HEAD, OPTIONS"},{"key":"Content-Length","value":"201"},{"key":"Content-Type","value":"application/json"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Date","value":"Fri, 26 Sep 2025 04:25:58 GMT"},{"key":"Nel","value":"{\"report_to\":\"heroku-nel\",\"response_headers\":[\"Via\"],\"max_age\":3600,\"success_fraction\":0.01,\"failure_fraction\":0.1}"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Report-To","value":"{\"group\":\"heroku-nel\",\"endpoints\":[{\"url\":\"https://nel.heroku.com/reports?s=b3i%2BPSqpcgPfdWb62VwLvj3dPV%2Ftku20y4d0l7bc8AI%3D\\u0026sid=1b10b0ff-8a76-4548-befa-353fc6c6c045\\u0026ts=1758860758\"}],\"max_age\":3600}"},{"key":"Reporting-Endpoints","value":"heroku-nel=\"https://nel.heroku.com/reports?s=b3i%2BPSqpcgPfdWb62VwLvj3dPV%2Ftku20y4d0l7bc8AI%3D&sid=1b10b0ff-8a76-4548-befa-353fc6c6c045&ts=1758860758\""},{"key":"Server","value":"Heroku"},{"key":"Vary","value":"Accept, origin"},{"key":"Via","value":"1.1 heroku-router"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 2,\n    \"first_name\": \"Selam\",\n    \"last_name\": \"Weldet\",\n    \"email\": \"selam@gmail.com\",\n    \"role\": \"producer\",\n    \"profile_picture\": \"\",\n    \"address\": \"Korongo\",\n    \"till_number\": \"123456\",\n    \"latitude\": 10.905925,\n    \"longitude\": 29.637732\n}"}],"_postman_id":"b83fce82-171e-48e7-9f17-caae978b7482"},{"name":"New Request","id":"d6b16f51-812e-4756-a0d6-3d85e466dced","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"d6b16f51-812e-4756-a0d6-3d85e466dced"}],"id":"a368cb64-e902-4ea3-bcb4-f47f3acf46ee","_postman_id":"a368cb64-e902-4ea3-bcb4-f47f3acf46ee","description":""},{"name":"Inventory","item":[{"name":"Get listings","event":[{"listen":"test","script":{"id":"adf825b4-35fe-461d-ad87-1ce36fd432e0","exec":["pm.test(\"Response time is less than 5000ms\", function () {","    pm.expect(pm.response.responseTime).to.be.below(5000);","});","","","pm.test(\"Response body contains required fields\", function () {","    const responseData = pm.response.json();","","    pm.expect(responseData).to.be.an('array').that.is.not.empty;","","    responseData.forEach(function(item) {","        pm.expect(item).to.have.all.keys(","            'listing_id', ","            'product_type', ","            'category', ","            'description', ","            'quantity', ","            'original_price', ","            'expiry_date', ","            'discounted_price', ","            'image', ","            'image_url', ","            'status', ","            'created_at', ","            'updated_at', ","            'upload_method', ","            'pickup_window_duration', ","            'unit', ","            'producer'","        );","    });","});","","","pm.test(\"Each listing_id must be a number\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData).to.be.an('array').that.is.not.empty;","    responseData.forEach(function(listing) {","        pm.expect(listing.listing_id).to.be.a('number');","    });","});","","","pm.test(\"Product type is a string\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData).to.be.an('array').that.is.not.empty;","    responseData.forEach(function(item) {","        pm.expect(item.product_type).to.be.a('string');","    });","});","","","pm.test(\"Category is a string or null\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData).to.be.an('array');","    responseData.forEach(function(listing) {","        pm.expect(listing.category).to.satisfy(function(value) {","            return typeof value === 'string' || value === null;","        });","    });","});",""],"type":"text/javascript","packages":{},"requests":{}}}],"id":"e76c55ad-8915-4224-9213-698a40ddd0dc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\n  \n    \"email\":\"semhalestifanos35@gmail.com\",\n    \"password\":\"12345\"\n   \n}"},"url":"https://feedlink-210643547921.herokuapp.com/api/listings/","urlObject":{"protocol":"https","path":["api","listings",""],"host":["feedlink-210643547921","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"f79c1e49-3610-483e-bc03-68d2ae9f96d0","name":"New Request","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\n  \n    \"email\":\"semhalestifanos35@gmail.com\",\n    \"password\":\"12345\"\n   \n}"},"url":"https://feedlink-210643547921.herokuapp.com/api/listings/"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Allow","value":"GET, POST, HEAD, OPTIONS"},{"key":"Content-Length","value":"3062"},{"key":"Content-Type","value":"application/json"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Date","value":"Fri, 19 Sep 2025 13:18:49 GMT"},{"key":"Nel","value":"{\"report_to\":\"heroku-nel\",\"response_headers\":[\"Via\"],\"max_age\":3600,\"success_fraction\":0.01,\"failure_fraction\":0.1}"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Report-To","value":"{\"group\":\"heroku-nel\",\"endpoints\":[{\"url\":\"https://nel.heroku.com/reports?s=KS1QN%2F7ssQyt2WMmtS7ePrJkZONrOBS%2FDjiRnptJ%2B0Y%3D\\u0026sid=1b10b0ff-8a76-4548-befa-353fc6c6c045\\u0026ts=1758287929\"}],\"max_age\":3600}"},{"key":"Reporting-Endpoints","value":"heroku-nel=\"https://nel.heroku.com/reports?s=KS1QN%2F7ssQyt2WMmtS7ePrJkZONrOBS%2FDjiRnptJ%2B0Y%3D&sid=1b10b0ff-8a76-4548-befa-353fc6c6c045&ts=1758287929\""},{"key":"Server","value":"Heroku"},{"key":"Vary","value":"Accept, origin"},{"key":"Via","value":"1.1 heroku-router"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"listing_id\": 1,\n        \"product_type\": \"edible\",\n        \"category\": \"Fruits\",\n        \"description\": \"This is going to be expired after 2 days\",\n        \"quantity\": \"25.00\",\n        \"original_price\": \"70.00\",\n        \"expiry_date\": \"2025-09-05T15:13:00Z\",\n        \"discounted_price\": \"50.00\",\n        \"image\": null,\n        \"image_url\": \"https://theloopywhisk.com/wp-content/uploads/2024/08/Gluten-Free-Sandwich-Bread_1200px-2.jpg\",\n        \"status\": \"available\",\n        \"created_at\": \"2025-09-19T12:13:53.530770Z\",\n        \"updated_at\": \"2025-09-19T12:13:53.530779Z\",\n        \"upload_method\": \"manual\",\n        \"pickup_window_duration\": \"2025-09-19T17:13:00Z\",\n        \"unit\": \"kg\",\n        \"producer\": 1\n    },\n    {\n        \"listing_id\": 2,\n        \"product_type\": \"inedible\",\n        \"category\": \"\",\n        \"description\": \"\",\n        \"quantity\": \"200.00\",\n        \"original_price\": null,\n        \"expiry_date\": null,\n        \"discounted_price\": null,\n        \"image\": \"https://feedlink-210643547921.herokuapp.com/media/listing_images/wastebin.jpg\",\n        \"image_url\": \"\",\n        \"status\": \"available\",\n        \"created_at\": \"2025-09-19T12:22:42.848359Z\",\n        \"updated_at\": \"2025-09-19T12:22:42.848374Z\",\n        \"upload_method\": \"manual\",\n        \"pickup_window_duration\": \"2025-09-19T17:21:00Z\",\n        \"unit\": \"kg\",\n        \"producer\": 1\n    },\n    {\n        \"listing_id\": 3,\n        \"product_type\": \"inedible\",\n        \"category\": \"\",\n        \"description\": \"organic waste\",\n        \"quantity\": \"500.00\",\n        \"original_price\": null,\n        \"expiry_date\": null,\n        \"discounted_price\": null,\n        \"image\": \"https://feedlink-210643547921.herokuapp.com/media/listing_images/wastebin_YVkiVYS.jpg\",\n        \"image_url\": \"\",\n        \"status\": \"available\",\n        \"created_at\": \"2025-09-19T12:23:28.541219Z\",\n        \"updated_at\": \"2025-09-19T12:23:28.541234Z\",\n        \"upload_method\": \"manual\",\n        \"pickup_window_duration\": \"2025-09-19T17:21:00Z\",\n        \"unit\": \"kg\",\n        \"producer\": 1\n    },\n    {\n        \"listing_id\": 4,\n        \"product_type\": \"edible\",\n        \"category\": \"Drink\",\n        \"description\": \"Different kinds of drinks\",\n        \"quantity\": \"6.00\",\n        \"original_price\": \"50.00\",\n        \"expiry_date\": \"2025-09-22T19:20:00Z\",\n        \"discounted_price\": \"10.00\",\n        \"image\": \"https://feedlink-210643547921.herokuapp.com/media/listing_images/africass.png\",\n        \"image_url\": \"\",\n        \"status\": \"available\",\n        \"created_at\": \"2025-09-19T12:23:28.708673Z\",\n        \"updated_at\": \"2025-09-19T12:23:28.708686Z\",\n        \"upload_method\": \"manual\",\n        \"pickup_window_duration\": \"2025-09-22T15:26:00Z\",\n        \"unit\": \"L\",\n        \"producer\": 1\n    },\n    {\n        \"listing_id\": 5,\n        \"product_type\": \"inedible\",\n        \"category\": \"\",\n        \"description\": \"organic waste\",\n        \"quantity\": \"800.00\",\n        \"original_price\": null,\n        \"expiry_date\": null,\n        \"discounted_price\": null,\n        \"image\": \"https://feedlink-210643547921.herokuapp.com/media/listing_images/wastebin_irB13Va.jpg\",\n        \"image_url\": \"\",\n        \"status\": \"available\",\n        \"created_at\": \"2025-09-19T12:24:02.916213Z\",\n        \"updated_at\": \"2025-09-19T12:24:02.916227Z\",\n        \"upload_method\": \"manual\",\n        \"pickup_window_duration\": \"2025-09-19T17:21:00Z\",\n        \"unit\": \"kg\",\n        \"producer\": 1\n    },\n    {\n        \"listing_id\": 6,\n        \"product_type\": \"edible\",\n        \"category\": \"Fruits\",\n        \"description\": \"This is going to be expired after 2 days\",\n        \"quantity\": \"25.00\",\n        \"original_price\": \"70.00\",\n        \"expiry_date\": \"2025-09-05T15:13:00Z\",\n        \"discounted_price\": \"50.00\",\n        \"image\": null,\n        \"image_url\": \"https://theloopywhisk.com/wp-content/uploads/2024/08/Gluten-Free-Sandwich-Bread_1200px-2.jpg\",\n        \"status\": \"available\",\n        \"created_at\": \"2025-09-19T12:30:58.211728Z\",\n        \"updated_at\": \"2025-09-19T12:30:58.211736Z\",\n        \"upload_method\": \"manual\",\n        \"pickup_window_duration\": \"2025-09-19T17:13:00Z\",\n        \"unit\": \"kg\",\n        \"producer\": 1\n    }\n]"}],"_postman_id":"e76c55ad-8915-4224-9213-698a40ddd0dc"},{"name":"Post listings","event":[{"listen":"test","script":{"id":"69a06edc-91cb-4a6c-850c-fe8641d1748f","exec":["pm.test(\"Response status code is 201\", function () {","    pm.expect(pm.response.code).to.equal(201);","});","","pm.test(\"Response time is less than 2000ms\", function () {","    pm.expect(pm.response.responseTime).to.be.below(2000);","});","","pm.test(\"Content-Type header is 'application/json'\", function () {","    pm.expect(pm.response.headers.get('Content-Type')).to.eql('application/json');","});","","pm.test(\"Validate field types for each object in the response\", function () {","    const responseData = pm.response.json();","","    pm.expect(responseData).to.be.an('object');","","    pm.expect(responseData.listing_id).to.be.a('number');","    pm.expect(responseData.product_type).to.be.a('string');","    pm.expect(responseData.category).to.be.a('string');","    pm.expect(responseData.description).to.be.a('string');","    pm.expect(responseData.quantity).to.be.a('string');","    pm.expect(responseData.original_price).to.be.a('string');","    pm.expect(responseData.expiry_date).to.be.a('string');","    pm.expect(responseData.discounted_price).to.be.a('string');","    pm.expect(responseData.image).to.satisfy(value => value === null || typeof value === 'object');","    pm.expect(responseData.image_url).to.be.a('string');","    pm.expect(responseData.status).to.be.a('string');","    pm.expect(responseData.created_at).to.be.a('string');","    pm.expect(responseData.updated_at).to.be.a('string');","    pm.expect(responseData.upload_method).to.be.a('string');","    pm.expect(responseData.pickup_window_duration).to.be.a('string');","    pm.expect(responseData.unit).to.be.a('string');","    pm.expect(responseData.producer).to.be.a('number');","});","","pm.test(\"Response contains a valid listing_id as a non-negative integer\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData).to.be.an('object');","    pm.expect(responseData.listing_id).to.exist.and.to.be.a('number').and.to.be.at.least(0, \"listing_id should be a non-negative integer\");","});",""],"type":"text/javascript","packages":{},"requests":{}}}],"id":"fb02085d-0aa3-46f8-b365-95d6b9d8d7c7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":" {\n        \"listing_id\": 1,\n        \"product_type\": \"edible\",\n        \"category\": \"Fruits\",\n        \"description\": \"This is going to be expired after 2 days\",\n        \"quantity\": \"25.00\",\n        \"original_price\": \"70.00\",\n        \"expiry_date\": \"2025-09-05T15:13:00Z\",\n        \"discounted_price\": \"50.00\",\n        \"image\": null,\n        \"image_url\": \"https://theloopywhisk.com/wp-content/uploads/2024/08/Gluten-Free-Sandwich-Bread_1200px-2.jpg\",\n        \"status\": \"available\",\n        \"created_at\": \"2025-09-19T12:13:53.530770Z\",\n        \"updated_at\": \"2025-09-19T12:13:53.530779Z\",\n        \"upload_method\": \"manual\",\n        \"pickup_window_duration\": \"2025-09-19T17:13:00Z\",\n        \"unit\": \"kg\",\n        \"producer\": 1\n    }","options":{"raw":{"language":"json"}}},"url":"https://feedlink-210643547921.herokuapp.com/api/listings/","urlObject":{"protocol":"https","path":["api","listings",""],"host":["feedlink-210643547921","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"4c5fc712-f8b9-4583-8407-34d33177e741","name":"New Request","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":" {\n        \"listing_id\": 1,\n        \"product_type\": \"edible\",\n        \"category\": \"Fruits\",\n        \"description\": \"This is going to be expired after 2 days\",\n        \"quantity\": \"25.00\",\n        \"original_price\": \"70.00\",\n        \"expiry_date\": \"2025-09-05T15:13:00Z\",\n        \"discounted_price\": \"50.00\",\n        \"image\": null,\n        \"image_url\": \"https://theloopywhisk.com/wp-content/uploads/2024/08/Gluten-Free-Sandwich-Bread_1200px-2.jpg\",\n        \"status\": \"available\",\n        \"created_at\": \"2025-09-19T12:13:53.530770Z\",\n        \"updated_at\": \"2025-09-19T12:13:53.530779Z\",\n        \"upload_method\": \"manual\",\n        \"pickup_window_duration\": \"2025-09-19T17:13:00Z\",\n        \"unit\": \"kg\",\n        \"producer\": 1\n    }","options":{"raw":{"language":"json"}}},"url":"https://feedlink-210643547921.herokuapp.com/api/listings/"},"status":"Created","code":201,"_postman_previewlanguage":null,"header":[{"key":"Allow","value":"GET, POST, HEAD, OPTIONS"},{"key":"Content-Length","value":"550"},{"key":"Content-Type","value":"application/json"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Date","value":"Fri, 19 Sep 2025 13:20:46 GMT"},{"key":"Nel","value":"{\"report_to\":\"heroku-nel\",\"response_headers\":[\"Via\"],\"max_age\":3600,\"success_fraction\":0.01,\"failure_fraction\":0.1}"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Report-To","value":"{\"group\":\"heroku-nel\",\"endpoints\":[{\"url\":\"https://nel.heroku.com/reports?s=XZq7MqM47LCRCwDprAhG3%2Fs%2FPPf5dEaszaAfS%2FdKaUg%3D\\u0026sid=1b10b0ff-8a76-4548-befa-353fc6c6c045\\u0026ts=1758288045\"}],\"max_age\":3600}"},{"key":"Reporting-Endpoints","value":"heroku-nel=\"https://nel.heroku.com/reports?s=XZq7MqM47LCRCwDprAhG3%2Fs%2FPPf5dEaszaAfS%2FdKaUg%3D&sid=1b10b0ff-8a76-4548-befa-353fc6c6c045&ts=1758288045\""},{"key":"Server","value":"Heroku"},{"key":"Vary","value":"Accept, origin"},{"key":"Via","value":"1.1 heroku-router"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"}],"cookie":[],"responseTime":null,"body":"{\n    \"listing_id\": 7,\n    \"product_type\": \"edible\",\n    \"category\": \"Fruits\",\n    \"description\": \"This is going to be expired after 2 days\",\n    \"quantity\": \"25.00\",\n    \"original_price\": \"70.00\",\n    \"expiry_date\": \"2025-09-05T15:13:00Z\",\n    \"discounted_price\": \"50.00\",\n    \"image\": null,\n    \"image_url\": \"https://theloopywhisk.com/wp-content/uploads/2024/08/Gluten-Free-Sandwich-Bread_1200px-2.jpg\",\n    \"status\": \"available\",\n    \"created_at\": \"2025-09-19T13:20:46.012269Z\",\n    \"updated_at\": \"2025-09-19T13:20:46.012279Z\",\n    \"upload_method\": \"manual\",\n    \"pickup_window_duration\": \"2025-09-19T17:13:00Z\",\n    \"unit\": \"kg\",\n    \"producer\": 1\n}"}],"_postman_id":"fb02085d-0aa3-46f8-b365-95d6b9d8d7c7"},{"name":"Patch listings","event":[{"listen":"test","script":{"id":"bab5a5c6-b601-43f2-b457-9d0238851fe1","exec":["let responseJSON = null;","let isJson = false;","try {","    const contentType = pm.response.headers.get(\"Content-Type\") || \"\";","    if (contentType.includes(\"application/json\")) {","        responseJSON = pm.response.json();","        isJson = true;","    }","} catch (e) {","    isJson = false;","}","pm.test(\"Response code is 200 or 404\", function () {","    pm.expect(pm.response.code).to.be.oneOf([200, 404]);","});","pm.test(\"Response time is less than 3000ms\", function () {","    if (pm.response.code === 200) {","        pm.expect(pm.response.responseTime).to.be.below(3000);","    } else {","        pm.expect(true).to.be.true;","    }","});","pm.test(\"Response body is not empty\", function () {","    if (pm.response.code === 200) {","        pm.expect(isJson, \"Response must be valid JSON on 200\").to.be.true;","        pm.expect(responseJSON).to.not.be.empty;","    } else {","        pm.expect(true).to.be.true;","    }","});","pm.test(\"Content-Type header is application/json\", function () {","    const contentType = pm.response.headers.get(\"Content-Type\") || \"\";","    if (pm.response.code === 200) {","        pm.expect(contentType).to.include(\"application/json\");","    } else {","        if (contentType) {","            pm.expect(contentType).to.include(\"application/json\");","        }","    }","});","pm.test(\"All required fields are present and of correct type\", function () {","    if (pm.response.code === 200) {","        pm.expect(isJson).to.be.true;","        const requiredFields = [","            'listing_id', 'product_type', 'category', 'description', 'quantity',","            'original_price', 'expiry_date', 'discounted_price', 'image', 'image_url',","            'status', 'created_at', 'updated_at', 'upload_method', 'pickup_window_duration',","            'unit', 'producer'","        ];","        pm.expect(responseJSON).to.have.all.keys(requiredFields);","        pm.expect(responseJSON.listing_id).to.be.a('number');","        pm.expect(responseJSON.product_type).to.be.a('string');","        pm.expect(responseJSON.category).to.be.a('string');","        pm.expect(responseJSON.description).to.be.a('string');","        pm.expect(responseJSON.quantity).to.be.a('string');","        pm.expect(responseJSON.original_price).to.be.a('string');","        pm.expect(responseJSON.expiry_date).to.be.a('string');","        pm.expect(responseJSON.discounted_price).to.be.a('string');","        pm.expect(responseJSON.image).to.satisfy((val) => val === null || typeof val === 'string');","        pm.expect(responseJSON.image_url).to.be.a('string');","        pm.expect(responseJSON.status).to.be.a('string');","        pm.expect(responseJSON.created_at).to.be.a('string');","        pm.expect(responseJSON.updated_at).to.be.a('string');","        pm.expect(responseJSON.upload_method).to.be.a('string');","        pm.expect(responseJSON.pickup_window_duration).to.be.a('string');","        pm.expect(responseJSON.unit).to.be.a('string');","        pm.expect(responseJSON.producer).to.be.a('number');","    } else {","        pm.expect(true).to.be.true;","    }","});","","","","","",""],"type":"text/javascript","packages":{},"requests":{}}}],"id":"e9e58c90-d70f-4ada-9cb1-db577de882ad","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":" {\n        \"listing_id\": 1,\n        \"product_type\": \"inedible\",\n        \"category\": \"Fruits\",\n        \"description\": \"This is going to be expired after 2 days\",\n        \"quantity\": \"25.00\",\n        \"original_price\": \"70.00\",\n        \"expiry_date\": \"2025-09-05T15:13:00Z\",\n        \"discounted_price\": \"50.00\",\n        \"image\": null,\n        \"image_url\": \"https://theloopywhisk.com/wp-content/uploads/2024/08/Gluten-Free-Sandwich-Bread_1200px-2.jpg\",\n        \"status\": \"available\",\n        \"created_at\": \"2025-09-19T12:13:53.530770Z\",\n        \"updated_at\": \"2025-09-19T12:13:53.530779Z\",\n        \"upload_method\": \"manual\",\n        \"pickup_window_duration\": \"2025-09-19T17:13:00Z\",\n        \"unit\": \"kg\",\n        \"producer\": 1\n    }","options":{"raw":{"language":"json"}}},"url":"https://feedlink-210643547921.herokuapp.com/api/listings/160/","urlObject":{"protocol":"https","path":["api","listings","160",""],"host":["feedlink-210643547921","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"4ac50f98-3705-404f-8f81-bb6f7986bd3f","name":"New Request","originalRequest":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":" {\n        \"listing_id\": 1,\n        \"product_type\": \"inedible\",\n        \"category\": \"Fruits\",\n        \"description\": \"This is going to be expired after 2 days\",\n        \"quantity\": \"25.00\",\n        \"original_price\": \"70.00\",\n        \"expiry_date\": \"2025-09-05T15:13:00Z\",\n        \"discounted_price\": \"50.00\",\n        \"image\": null,\n        \"image_url\": \"https://theloopywhisk.com/wp-content/uploads/2024/08/Gluten-Free-Sandwich-Bread_1200px-2.jpg\",\n        \"status\": \"available\",\n        \"created_at\": \"2025-09-19T12:13:53.530770Z\",\n        \"updated_at\": \"2025-09-19T12:13:53.530779Z\",\n        \"upload_method\": \"manual\",\n        \"pickup_window_duration\": \"2025-09-19T17:13:00Z\",\n        \"unit\": \"kg\",\n        \"producer\": 1\n    }","options":{"raw":{"language":"json"}}},"url":"https://feedlink-210643547921.herokuapp.com/api/listings/1/"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Allow","value":"GET, PUT, PATCH, DELETE, HEAD, OPTIONS"},{"key":"Content-Length","value":"552"},{"key":"Content-Type","value":"application/json"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Date","value":"Fri, 19 Sep 2025 13:22:51 GMT"},{"key":"Nel","value":"{\"report_to\":\"heroku-nel\",\"response_headers\":[\"Via\"],\"max_age\":3600,\"success_fraction\":0.01,\"failure_fraction\":0.1}"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Report-To","value":"{\"group\":\"heroku-nel\",\"endpoints\":[{\"url\":\"https://nel.heroku.com/reports?s=eBTTYc6g5OaGBtV71hVQGOiD%2FWjojh1TkK%2FPoyoVuq0%3D\\u0026sid=1b10b0ff-8a76-4548-befa-353fc6c6c045\\u0026ts=1758288171\"}],\"max_age\":3600}"},{"key":"Reporting-Endpoints","value":"heroku-nel=\"https://nel.heroku.com/reports?s=eBTTYc6g5OaGBtV71hVQGOiD%2FWjojh1TkK%2FPoyoVuq0%3D&sid=1b10b0ff-8a76-4548-befa-353fc6c6c045&ts=1758288171\""},{"key":"Server","value":"Heroku"},{"key":"Vary","value":"Accept, origin"},{"key":"Via","value":"1.1 heroku-router"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"}],"cookie":[],"responseTime":null,"body":"{\n    \"listing_id\": 1,\n    \"product_type\": \"inedible\",\n    \"category\": \"Fruits\",\n    \"description\": \"This is going to be expired after 2 days\",\n    \"quantity\": \"25.00\",\n    \"original_price\": \"70.00\",\n    \"expiry_date\": \"2025-09-05T15:13:00Z\",\n    \"discounted_price\": \"50.00\",\n    \"image\": null,\n    \"image_url\": \"https://theloopywhisk.com/wp-content/uploads/2024/08/Gluten-Free-Sandwich-Bread_1200px-2.jpg\",\n    \"status\": \"available\",\n    \"created_at\": \"2025-09-19T12:13:53.530770Z\",\n    \"updated_at\": \"2025-09-19T13:22:51.311282Z\",\n    \"upload_method\": \"manual\",\n    \"pickup_window_duration\": \"2025-09-19T17:13:00Z\",\n    \"unit\": \"kg\",\n    \"producer\": 1\n}"}],"_postman_id":"e9e58c90-d70f-4ada-9cb1-db577de882ad"},{"name":"Upload csv","event":[{"listen":"test","script":{"id":"017f7ac0-c950-4701-b764-01aace9ec39b","exec":["var responseJSON = pm.response.json();","","pm.test(\"Response status code is 400 and Content-Type is application/json\", function () {","    pm.response.to.have.status(400);","    pm.expect(pm.response.headers.get('Content-Type')).to.include('application/json');","});","","pm.test(\"Response time is less than 3000ms\", function () {","    pm.expect(pm.response.responseTime).to.be.below(3000);","});","","pm.test(\"Response body is not empty\", function () {","    pm.expect(responseJSON).to.not.be.empty;","});","","pm.test(\"Each error object has required fields with correct types\", function () {","    if (responseJSON.errors && Array.isArray(responseJSON.errors)) {","        responseJSON.errors.forEach(function(error) {","            pm.expect(error).to.have.property('row').that.is.an('object');","            pm.expect(error.row).to.have.all.keys('product_type', 'category', 'description', 'quantity', 'original_price', 'discounted_price', 'expiry_date', 'image_url', 'pickup_window_duration', 'unit', 'upload_method');","","            pm.expect(error.row.product_type).to.exist.and.to.be.a('string');","            pm.expect(error.row.category).to.exist.and.to.be.a('string');","            pm.expect(error.row.description).to.exist.and.to.be.a('string');","            pm.expect(error.row.quantity).to.exist.and.to.be.a('string');","            pm.expect(error.row.original_price).to.exist.and.to.be.a('string');","            pm.expect(error.row.discounted_price).to.exist.and.to.be.a('string');","            pm.expect(error.row.expiry_date).to.exist.and.to.be.a('string');","            pm.expect(error.row.image_url).to.exist.and.to.be.a('string');","            pm.expect(error.row.pickup_window_duration).to.exist.and.to.be.a('string');","            pm.expect(error.row.unit).to.exist.and.to.be.a('string');","            pm.expect(error.row.upload_method).to.exist.and.to.be.a('string');","        });","    }","});",""],"type":"text/javascript","packages":{},"requests":{}}}],"id":"c597c8a7-db20-4021-9ec7-13e93aac1249","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"csv_file","type":"file","uuid":"440a3872-2a30-4e1f-b1fb-1039e4ff4ba9","src":"yhSBPAxN2/c92.csv"}]},"url":"https://feedlink-210643547921.herokuapp.com/api/listings/upload-csv/","urlObject":{"protocol":"https","path":["api","listings","upload-csv",""],"host":["feedlink-210643547921","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"765fe2b2-b829-4240-8017-73482299043b","name":"New Request","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"csv_file","type":"file","uuid":"440a3872-2a30-4e1f-b1fb-1039e4ff4ba9","src":"yhSBPAxN2/c92.csv"}]},"url":"https://feedlink-210643547921.herokuapp.com/api/listings/upload-csv/"},"status":"Multi-Status (WebDAV) (RFC 4918)","code":207,"_postman_previewlanguage":null,"header":[{"key":"Allow","value":"POST, OPTIONS"},{"key":"Content-Length","value":"394"},{"key":"Content-Type","value":"application/json"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Date","value":"Fri, 19 Sep 2025 13:46:11 GMT"},{"key":"Nel","value":"{\"report_to\":\"heroku-nel\",\"response_headers\":[\"Via\"],\"max_age\":3600,\"success_fraction\":0.01,\"failure_fraction\":0.1}"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Report-To","value":"{\"group\":\"heroku-nel\",\"endpoints\":[{\"url\":\"https://nel.heroku.com/reports?s=01LJl7tjwImEDxmFozT5IiTU0f2vbVqvR3XNq4J8Q8E%3D\\u0026sid=1b10b0ff-8a76-4548-befa-353fc6c6c045\\u0026ts=1758289571\"}],\"max_age\":3600}"},{"key":"Reporting-Endpoints","value":"heroku-nel=\"https://nel.heroku.com/reports?s=01LJl7tjwImEDxmFozT5IiTU0f2vbVqvR3XNq4J8Q8E%3D&sid=1b10b0ff-8a76-4548-befa-353fc6c6c045&ts=1758289571\""},{"key":"Server","value":"Heroku"},{"key":"Vary","value":"Accept, origin"},{"key":"Via","value":"1.1 heroku-router"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"}],"cookie":[],"responseTime":null,"body":"{\n    \"created\": [],\n    \"errors\": [\n        {\n            \"row\": {\n                \"product_type\": \"edible\",\n                \"category\": \"Vegetables\",\n                \"description\": \"Fresh tomatoes\",\n                \"quantity\": \"10.5\",\n                \"original_price\": \"50\",\n                \"discounted_price\": \"40\",\n                \"expiry_date\": \"2025-12-31T18:00:00Z\",\n                \"image_url\": \"https://example.com/tomatoes.jpg\",\n                \"pickup_window_duration\": \"2025-09-09T12:18:00Z\",\n                \"unit\": \"kg\",\n                \"upload_method\": \"csv\"\n            },\n            \"errors\": {\n                \"producer\": [\n                    \"This field is required.\"\n                ]\n            }\n        }\n    ]\n}"}],"_postman_id":"c597c8a7-db20-4021-9ec7-13e93aac1249"}],"id":"0de9349c-ac5a-428a-851b-20458b825233","_postman_id":"0de9349c-ac5a-428a-851b-20458b825233","description":""}]}