POST /cid/refresh
Downloads the latest CID (International Classification of Diseases) codes from DATASUS (Brazilian Ministry of Health data system) and updates the database.Request
No parameters required. This endpoint fetches data from the remote DATASUS source.Response
Success message with the total number of CID codes processed
Example Request
cURL
JavaScript
Example Response
200 OK
Implementation Details
This endpoint:- Connects to the DATASUS remote server
- Downloads the latest CID code database
- Parses the data (typically HTML format)
- Updates or inserts codes into the local database
- Returns the total count of processed codes
Use Cases
- Initial database population with CID codes
- Periodic updates to keep CID codes current
- Sync with official DATASUS database after updates
For loading CID codes from a local file instead of remote download, use
POST /cid/refresh-local.Error Responses
| Status Code | Description |
|---|---|
| 200 | CID codes successfully refreshed |
| 500 | Error connecting to DATASUS or parsing data |
This operation requires network connectivity to DATASUS servers. Ensure firewall rules allow outbound connections.