{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"d3cdfbab-1fa8-45db-a81d-d8d44f08a862","name":"Drdogood Partners","description":"## DrDoGood Partners API (Postman Collection)\n\n### Purpose\n\nThis collection is the partner-facing API surface for interacting with the DrDoGood platform. It contains endpoints for:\n\n- Discovering providers, facilities, specialties, care types, and insurers\n    \n- Creating and checking users\n    \n- Booking a provider or facility service (PRE and POST payment modes)\n    \n- Insurance-covered facility bookings\n    \n- Partner admin dashboard (invoices, wallet, config)\n    \n- Outbound webhook event reference\n    \n\n### Base URL & environments\n\nAll requests use the collection variable `{{baseUrl}}`.\n\n### Authentication\n\n- Header: `drdogood-partner-key: {{drdogood-partner-key}}`\n    \n\n---\n\n## Payment Modes\n\nYour partner account is configured with one of two payment modes:\n\n| Mode | How it works |\n| --- | --- |\n| **PRE** | DDG collects payment from the end user via a `paymentUrl`. Booking is PENDING until paid. Your `serviceFee` is credited to your DDG wallet on payment confirmation. |\n| **POST** | You charge your patient directly. DDG confirms the booking immediately as ACCEPTED. DDG invoices you monthly for the DDG service fee (+ facility cost if no insurance). |\n\n---\n\n## Insurance Support (facility bookings only)\n\nPass `insuranceId` + `policyId` on `book-facility-service` to indicate the patient is covered:\n\n1. `GET /api/v1/insurances` — list active insurers\n    \n2. `GET /api/v1/facilities?insurance=NHIS` — filter facilities that accept the insurer\n    \n3. `POST /api/v1/book-facility-service` — pass `insuranceId` + `policyId`\n    \n\nWhen insurance is used:\n\n- Facility cost is waived (insurer pays facility directly)\n    \n- DDG service fee still applies — collected via `paymentUrl` (PRE) or monthly invoice (POST)\n    \n- Booking gets `paymentMethod: \"INSURANCE\"`, `insurance: { insuranceId, policyId, covered: true }`\n    \n\n---\n\n## Outbound Webhooks (DDG sends to your webhookUrl)\n\nAll events share this envelope:\n\n``` json\n{\n  \"id\": \"uuid\",\n  \"type\": \"booking.confirmed\",\n  \"apiVersion\": \"2026-06\",\n  \"timestamp\": \"ISO 8601\",\n  \"partnerId\": \"your-partner-id\",\n  \"data\": { ... }\n}\n\n ```\n\nHeaders: `X-DDG-Signature: sha256=`, `X-DDG-Event-ID:`\n\n| Event | Fired when |\n| --- | --- |\n| `booking.created` | PRE mode — payment request created, `paymentUrl` in data |\n| `booking.confirmed` | Booking ACCEPTED (payment received for PRE; immediately for POST) |\n| `booking.active` | Service started at startTime |\n| `booking.cancelled` | Booking cancelled |\n| `appointment.created` | PRE mode — appointment payment request created |\n| `appointment.accepted` | Appointment confirmed |\n| `appointment.active` | Consultation in progress |\n| `appointment.completed` | Consultation ended |\n| `appointment.cancelled` | Appointment cancelled |\n| `invoice.generated` | Monthly invoice ready (POST mode partners only) |\n\nDeduplicate using `X-DDG-Event-ID`. Verify signature: `sha256=HMAC(whsec, rawBody)`.\n\n---\n\n## Booking Flows\n\n**Facility — PRE mode:**\n\n1. GET `/api/v1/insurances` (if insurance) + GET `/api/v1/facilities?insurance=NHIS`\n    \n2. GET `/api/v1/facilities/:id` — get services + locations\n    \n3. POST `/api/v1/book-facility-service` → receive `paymentUrl`\n    \n4. Direct patient to `paymentUrl` → receive `booking.confirmed` webhook when paid\n    \n\n**Facility — POST mode:**\n\n1. GET `/api/v1/facilities/:id`\n    \n2. POST `/api/v1/book-facility-service` → booking immediately `CONFIRMED`\n    \n3. Receive `invoice.generated` webhook at month-end — pay via partner dashboard\n    \n\n**Provider — PRE mode:**\n\n1. GET `/api/v1/providers/:id` — check availability\n    \n2. POST `/api/v1/book-provider/:id` → receive `paymentUrl`\n    \n\n**Quick Booking (PRE only — POST mode returns 400):**\n\n1. POST `/api/v1/quick-book-provider` — blast to available doctors\n    \n2. Receive `appointment.accepted` webhook when a doctor accepts\n    \n\n---\n\n## Care Types\n\n1 = Primary Care | 2 = Sexual Health | 3 = Diabetes | 4 = Skin/nails/hair | 5 = Weight loss | 6 = Mental Health\n\n## Test Users\n\n- User 1: uid=`user_demo_001`, John Eyo, +233256468382 (male)\n    \n- User 2: uid=`user_demo_002`, Ama Asante, +233244123456 (female)","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"32449940","team":6272886,"collectionId":"d3cdfbab-1fa8-45db-a81d-d8d44f08a862","publishedId":"2sBXwvHnkF","public":true,"publicUrl":"https://docs.drdogood.health","privateUrl":"https://go.postman.co/documentation/32449940-d3cdfbab-1fa8-45db-a81d-d8d44f08a862","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"034a47"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":""},{"name":"title","value":""}],"appearance":{"default":"system_default","themes":[{"name":"dark","logo":"https://content.pstmn.io/41488e60-a34a-4951-b1fd-d4abc19e67e5/RERHLVdodC5wbmc=","colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"034a47"}},{"name":"light","logo":"https://content.pstmn.io/6044e2a0-931b-4d8e-8c81-08e0e880a46a/RERHLUdybi5wbmc=","colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"034a47"}}]}},"version":"8.11.6","publishDate":"2026-06-18T17:32:12.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"","description":""},"logos":{"logoLight":"https://content.pstmn.io/6044e2a0-931b-4d8e-8c81-08e0e880a46a/RERHLUdybi5wbmc=","logoDark":"https://content.pstmn.io/41488e60-a34a-4951-b1fd-d4abc19e67e5/RERHLVdodC5wbmc="}},"statusCode":200},"environments":[{"name":"PRODUCTION","id":"5cf56fee-d487-4a83-a08e-4ca078bf779b","owner":"32449940","values":[{"key":"BASE_URL","value":"https://api.drdogood.health","enabled":true,"type":"default"},{"key":"DDG_KEY","value":"","enabled":true,"type":"default"},{"key":"DDG_ADMIN_KEY","value":"YppOV9Q5FH5qR0g1Lv0iYhcv8JwwyjQeFs5dcpydQpiwx25ucO","enabled":true,"type":"secret"},{"key":"partner_token","value":"","enabled":true,"type":"any"},{"key":"token","value":"","enabled":true,"type":"default"}],"published":true}],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/9697e7525144132fc24cf6020a0bb4ed88f85d6e4e54d8ab66fbf002b1ae9758","favicon":"https://drdogood.health/favicon.ico"},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"},{"label":"PRODUCTION","value":"32449940-5cf56fee-d487-4a83-a08e-4ca078bf779b"}],"canonicalUrl":"https://docs.drdogood.health/view/metadata/2sBXwvHnkF"}