{"info":{"_postman_id":"d6dc9715-2742-4d8b-a70a-1fb389dc7344","name":"SafeHavenConnect API","description":"<html><head></head><body><h1 id=\"safehavenconnect-api-documentation\">SafeHavenConnect API Documentation</h1>\n<p>The <strong>SafeHavenConnect API</strong> provides programmatic access to a centralized database of organizations, resources, and events supporting survivors of domestic abuse. This API enables developers to build applications that can search, filter, and retrieve up-to-date information about shelters, mental health programs, legal aid, and community events.</p>\n<hr>\n<h2 id=\"base-url\">Base URL</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>https://backend.safehavenconnect.me/api\n</code></pre><hr>\n<h2 id=\"getting-started\">Getting Started</h2>\n<ul>\n<li><strong>No authentication required</strong> for GET (read) requests.</li>\n<li>All requests and responses use <strong>JSON</strong> format.</li>\n<li>Use any HTTP client (Postman, curl, axios, etc.).</li>\n<li>POST, PUT, DELETE requests require admin permissions.</li>\n</ul>\n<hr>\n<h2 id=\"endpoints-overview\">Endpoints Overview</h2>\n<ul>\n<li><code>/organizations</code> — List and search organizations</li>\n<li><code>/resources</code> — List and search resources</li>\n<li><code>/events</code> — List and search events</li>\n</ul>\n<hr>\n<h2 id=\"filtering-sorting-and-pagination\">Filtering, Sorting, and Pagination</h2>\n<p>All list endpoints support advanced querying via URL query parameters:</p>\n<h3 id=\"filtering\">Filtering</h3>\n<ul>\n<li>Filter by any field using query parameters.</li>\n<li>Example: <code>GET /organizations?city=Austin&amp;state=TX</code></li>\n</ul>\n<h3 id=\"sorting\">Sorting</h3>\n<ul>\n<li>Sort results by any field using the <code>sort</code> parameter.</li>\n<li>Prefix with <code>-</code> for descending order.</li>\n<li>Example: <code>GET /resources?sort=-createdAt</code></li>\n</ul>\n<h3 id=\"pagination\">Pagination</h3>\n<ul>\n<li>Use <code>limit</code> and <code>offset</code> for pagination.</li>\n<li>Example: <code>GET /events?limit=10&amp;offset=20</code></li>\n</ul>\n<hr>\n<h2 id=\"example-request\">Example Request</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET /organizations?city=Houston&amp;sort=name&amp;limit=5\n</code></pre><hr>\n<h2 id=\"rate-limits\">Rate Limits</h2>\n<ul>\n<li>No enforced rate limits currently.</li>\n<li>Rate limit headers are included in all responses:<ul>\n<li><code>X-RateLimit-Limit</code></li>\n<li><code>X-RateLimit-Remaining</code></li>\n<li><code>X-RateLimit-Reset</code></li>\n</ul>\n</li>\n</ul>\n<hr>\n<h2 id=\"error-handling\">Error Handling</h2>\n<ul>\n<li>Standard HTTP status codes are used.</li>\n<li>401 Unauthorized for restricted endpoints.</li>\n<li>404 Not Found for missing resources.</li>\n<li>400 Bad Request for invalid parameters.</li>\n</ul>\n<hr>\n<h2 id=\"contact--support\">Contact &amp; Support</h2>\n<p>For questions or support, contact the SafeHavenConnect team or visit the project repository/documentation site.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"SafeHavenConnect API Documentation","slug":"safehavenconnect-api-documentation"}],"owner":"48794305","collectionId":"d6dc9715-2742-4d8b-a70a-1fb389dc7344","publishedId":"2sB3WjzjPd","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2025-10-26T02:58:16.000Z"},"item":[{"name":"https://backend.safehavenconnect.me/api/organizations","event":[{"listen":"test","script":{"id":"8e233741-ccb6-4fcd-a622-aaeefc0b50fd","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","pm.test(\"Response is JSON\", function () {\r","    pm.response.to.be.json;\r","});\r","\r","pm.test(\"Response is an array\", function () {\r","    const data = pm.response.json();\r","    pm.expect(data).to.be.an(\"array\");\r","});\r","\r","pm.test(\"Each organization has required fields\", function () {\r","    const orgs = pm.response.json();\r","    if (orgs.length > 0) {\r","        const org = orgs[0];\r","        pm.expect(org).to.have.property(\"id\");\r","        pm.expect(org).to.have.property(\"name\");\r","        pm.expect(org).to.have.property(\"location\");\r","        pm.expect(org).to.have.property(\"organization_type\");\r","    }\r","});\r",""],"type":"text/javascript","packages":{},"requests":{}}}],"id":"33df64d3-541e-41ef-957f-738d6cb68a74","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://backend.safehavenconnect.me/api/organizations","description":"<p>Testing organizations endpoint</p>\n","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d6dc9715-2742-4d8b-a70a-1fb389dc7344","id":"d6dc9715-2742-4d8b-a70a-1fb389dc7344","name":"SafeHavenConnect API","type":"collection"}},"urlObject":{"protocol":"https","path":["api","organizations"],"host":["backend","safehavenconnect","me"],"query":[],"variable":[]}},"response":[],"_postman_id":"33df64d3-541e-41ef-957f-738d6cb68a74"},{"name":"https://backend.safehavenconnect.me/api/events","event":[{"listen":"test","script":{"id":"24ff99a9-deb9-4665-bad9-a3e1cde80812","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","pm.test(\"Response has JSON array\", function () {\r","    const jsonData = pm.response.json();\r","    pm.expect(jsonData).to.be.an(\"array\");\r","});\r","\r","pm.test(\"Each event has required fields\", function () {\r","    const events = pm.response.json();\r","    if (events.length > 0) {\r","        const e = events[0];\r","        pm.expect(e).to.have.property(\"id\");\r","        pm.expect(e).to.have.property(\"name\");\r","        pm.expect(e).to.have.property(\"location\");\r","    }\r","});\r",""],"type":"text/javascript","packages":{},"requests":{}}}],"id":"f8af86b5-5593-4629-a552-9fe407b175ef","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://backend.safehavenconnect.me/api/events","description":"<p>Test for events endpoint</p>\n","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d6dc9715-2742-4d8b-a70a-1fb389dc7344","id":"d6dc9715-2742-4d8b-a70a-1fb389dc7344","name":"SafeHavenConnect API","type":"collection"}},"urlObject":{"protocol":"https","path":["api","events"],"host":["backend","safehavenconnect","me"],"query":[],"variable":[]}},"response":[],"_postman_id":"f8af86b5-5593-4629-a552-9fe407b175ef"},{"name":"https://backend.safehavenconnect.me/api/resources","event":[{"listen":"test","script":{"id":"edbe01de-d52a-494d-ab20-5bd01bbe3c34","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","pm.test(\"Response is JSON\", function () {\r","    pm.response.to.be.json;\r","});\r","\r","pm.test(\"Response is an array\", function () {\r","    const data = pm.response.json();\r","    pm.expect(data).to.be.an(\"array\");\r","});\r","\r","pm.test(\"Each resource has required fields\", function () {\r","    const resources = pm.response.json();\r","    if (resources.length > 0) {\r","        const r = resources[0];\r","        pm.expect(r).to.have.property(\"id\");\r","        pm.expect(r).to.have.property(\"title\");\r","        pm.expect(r).to.have.property(\"organization_name\");\r","        pm.expect(r).to.have.property(\"topic\");\r","        pm.expect(r).to.have.property(\"location\");\r","    }\r","});\r","\r","pm.test(\"Optional fields are valid when present\", function () {\r","    const resources = pm.response.json();\r","    if (resources.length > 0) {\r","        const r = resources[0];\r","        if (r.description) pm.expect(r.description).to.be.a(\"string\");\r","        if (r.resource_url) pm.expect(r.resource_url).to.be.a(\"string\");\r","    }\r","});\r",""],"type":"text/javascript","packages":{},"requests":{}}}],"id":"0236530f-af41-49eb-9caa-808757f7615a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://backend.safehavenconnect.me/api/resources","description":"<p>Resources endpoint test</p>\n","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d6dc9715-2742-4d8b-a70a-1fb389dc7344","id":"d6dc9715-2742-4d8b-a70a-1fb389dc7344","name":"SafeHavenConnect API","type":"collection"}},"urlObject":{"protocol":"https","path":["api","resources"],"host":["backend","safehavenconnect","me"],"query":[],"variable":[]}},"response":[],"_postman_id":"0236530f-af41-49eb-9caa-808757f7615a"}],"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":"{{token}}"}]}},"event":[{"listen":"prerequest","script":{"id":"f80d84f6-d09c-4b2e-ad69-5920e76a9244","type":"text/javascript","requests":{},"exec":[""]}},{"listen":"test","script":{"id":"8bbe8d4f-be2b-4b4e-ace1-1e4898a52e8b","type":"text/javascript","requests":{},"exec":[""]}}],"variable":[{"key":"baseUrl","value":"https://farming-simulator.pstmn.io"}]}