{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"13f20a0b-9bf3-4c28-870e-bb97d149f666","name":"HBDRP INTEGRATION","description":"# HBDRP Integration API\n\n> **Postman collection for all HBDRP Integration API endpoints** — birth & death registration, authentication, status lookups, and real-time callback events for third-party systems.\n\n---\n\n## Base URL\n\n| Scope | Base URL |\n| --- | --- |\n| **Integration APIs** | `{{base_url}}/api/v1/UserManagementService/integrations/` |\n\n---\n\n## How the Registration Flow Works\n\nWhen a third-party system submits a **birth** or **death** record, a unique **document number** is always generated and returned immediately in the API response — regardless of the record's status. This document number is the record's identifier and is used to track its current state throughout the flow.\n\nFrom there, the record moves through **review → verification → registration → approval & numbering → certification** before it is final. At every stage change after submission:\n\n- A **callback event** is sent to your configured `callback_url`\n- The current status can always be pulled via the **status lookup endpoint**\n\n**Steps 2 through 6 each fire a callback event. Step 1 (Submitted) fires no callback — the document number is returned directly in the API response.**\n\nThere are exactly **six** callback events, and no others: `MARKED_COMPLETE`, `VERIFIED`, `DUPLICATE_REJECTED`, `PUSHED_TO_REGISTRATION`, `COMPLETED`, `CERTIFIED`.\n\n### The Flow at a Glance\n\n```\nSubmitted\n   |\n   ▼\nOfficer Review .......... (MARKED_COMPLETE)\n   |\n   ▼\nDuplicate Verification .. (VERIFIED ✔ / DUPLICATE_REJECTED ✗)\n   |\n   ▼\nPushed to Registration .. (PUSHED_TO_REGISTRATION)\n   |\n   ▼\nApproval & Numbering .... (COMPLETED)\n   |\n   ▼\nCertification ........... (CERTIFIED ★ terminal success)\n```\n\n| Stage | Callback Event | Meaning |\n| --- | --- | --- |\n| 1. Submitted | — none — | Record received, document number generated and returned in the API response |\n| 2. Officer Review | `MARKED_COMPLETE` | Officer reviewed the record and moved it to verification |\n| 3. Duplicate Verification | `VERIFIED` / `DUPLICATE_REJECTED` | Checked against existing records |\n| 4. Pushed to Registration | `PUSHED_TO_REGISTRATION` | Moved into the main registration pipeline |\n| 5. Approval & Numbering | `COMPLETED` | All approval levels passed; registration number (UBNC) generated |\n| 6. Certification | `CERTIFIED` | Certificate issued — terminal, successful end state |\n\n> ⚠️ **`DUPLICATE_REJECTED`** ends the flow — the record does **not** continue to registration.\n\n### COMPLETED vs CERTIFIED — Important\n\n- **`COMPLETED`** means the record has passed all approval levels and the registration number / UBNC has been generated. It does **not** mean a certificate has been issued. At this point the certification record exists but is still pending.\n- **`CERTIFIED`** is the terminal success event. It fires later, when the certifying officer formally issues the certificate. Integrators expecting a final \"certificate issued\" signal must listen for **`CERTIFIED`**, not `COMPLETED`.\n- Both `COMPLETED` and `CERTIFIED` carry `registration_no`, `ubnc` and `certificate_number` — these three fields always hold the **same** value.\n- **`APPROVED`** is **not** a callback event and is never sent to your `callback_url`. It appears only as a *polling stage* returned by the status lookup endpoint. Use the `COMPLETED` callback to be notified of this stage.\n\nStatus can always be checked directly via:\n\n- `GET /integrations/registrations/birth/{documentNumber}`\n- `GET /integrations/registrations/death/{documentNumber}`\n\n### Callback Delivery Behaviour\n\n- Callbacks are `POST`ed to the institution's configured `callback_url`.\n- Headers sent with each callback: `Content-Type`, `Accept`, `X-Event-Type`, `X-Document-Number`, `X-Timestamp`.\n- Failed deliveries retry with exponential backoff: **1 min, 5 min, 15 min, 30 min, 60 min** (5 attempts total). Respond with any **2xx** status to acknowledge.\n\n> 📁 See the \"Callback Events Documentation\" folder (under **BETA**) for the full flow reference — including the complete event table, callback delivery requirements, and a step-by-step breakdown of each stage.\n\n---\n\n## Getting Started\n\n### 1. Environment Setup\n\nCreate a new environment in Postman and add the following variables:\n\n| Variable | Description | Example |\n| --- | --- | --- |\n| `base_url` | Your API base URL | `https://bdrbeta.npontu.com` |\n| `token` | Your API authentication token (for Integration APIs) | — |\n| `selected_affiliation` | Your selected affiliation | `REGISTRY` · `DISTRICT` · `REGION` · `NATIONAL` |\n\n### 2. Authentication\n\n**Integration APIs (Third-Party)**\n\n| Method | How it works |\n| --- | --- |\n| **Legacy** | Send a long-lived `api_token` in the `Token` or `Authorization: Bearer` header on **every** request. |\n| **Preferred** | Call `POST /integrations/auth/token` with `api_token` → receive an `access_token` (60 min TTL) and a `refresh_token`. Send `Authorization: Bearer` on each request. Before 60 min, call `POST /integrations/auth/refresh` with the `refresh_token` in the body to get new tokens. |\n\n**Middleware:** `apiConsumer` — automatically injects `user_id` and `source_institution_code`.\n\n### 3. Headers Configuration\n\nAll requests require:\n\n``` http\nContent-Type: application/json\nAccept: application/json\nToken: {{token}}\n# — or —\nAuthorization: Bearer {{token}}\n```\n\n> For Integration APIs, use the `access_token` when using the token-refresh flow.\n\n---\n\n## Request Guidelines\n\n### Request Body\n\n- All request bodies must be in **JSON** format.\n- For fields requiring specific values, use the **Utility** endpoint to fetch valid options.\n- Required fields are marked with comments.\n\n### Common Utility Types\n\n`REGION` · `DISTRICT` · `REGISTRY` · `TOWN` · `NATIONAL_ID` · `GENDER` · `MARITAL_STATUS` · `EDUCATIONAL_LEVEL` · `RELIGION` · `NATIONALITY` · `INFORMANT_TYPE` · `BIRTH_TYPE` · `BIRTH_ATTENDANT` · `PLACE_OF_BIRTH`\n\n### Rate Limiting\n\n| API Type | Policy |\n| --- | --- |\n| **Integration APIs** | Per-consumer rate limiting (configurable per `ApiConsumer`) |\n| **Admin APIs** | Standard rate limiting |\n\n---\n\n## Collection Structure\n\n| Folder | Contents |\n| --- | --- |\n| **Auth (Token & Refresh)** | Get Access Token, Refresh Token |\n| **Birth Registrations** | Create / Update / Get Birth Record |\n| **Death Registrations** | Create / Get Death Record |\n| **Callback Events Documentation** | Full flow reference & event payload examples |\n\n---\n\n## Support\n\nFor additional support, please contact our support team.","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"26097188","team":4747714,"collectionId":"13f20a0b-9bf3-4c28-870e-bb97d149f666","publishedId":"2sB2qZE2N9","public":true,"publicUrl":"https://documenter-api.postman.tech/view/26097188/2sB2qZE2N9","privateUrl":"https://go.postman.co/documentation/26097188-13f20a0b-9bf3-4c28-870e-bb97d149f666","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":""},{"name":"title","value":""}],"appearance":{"default":"light","themes":[{"name":"dark","logo":null,"colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"FF6C37"}},{"name":"light","logo":null,"colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"}}]}},"version":"8.12.3","publishDate":"2025-05-20T17:13:19.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"","description":""},"logos":{"logoLight":null,"logoDark":null}},"statusCode":200},"environments":[],"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/357a75e07ac3315d915942c60f26de5a5b6af510fac0177818f31c4c2d2b381c","favicon":""},"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"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/2sB2qZE2N9"}