Developers
Integrate your visits with Salud en Ruta
Send home doctor and nursing visits from your own system, track their status in real time with webhooks and download consented reports. Everything you need to integrate without having to call us.
Most visited
- First call in 5 minutesCatalogue, create a visit, read it back and receive your first webhook in the sandbox.
- Sandbox and simulatorAn isolated environment with fictitious data where visits move forward on their own.
- WebhooksEvents, sample payloads and signature verification in five languages.
- AuthenticationAPI keys, scopes, rotation and what to do if a key leaks.
- Patients and privacyWhich patient data we receive, which we return and which we never do.
- API referenceEvery endpoint, parameter and schema, generated from openapi.json.
Your first call
With a test key (srd_test_…), request the catalogue of service types you can order:
curl "https://sandbox-api.saludenruta.es/api/integrations/v1/catalog" \
-H "X-Api-Key: $SERAD_API_KEY"- Test (sandbox)
https://sandbox-api.saludenruta.es/api/integrations/v1- Production
https://api.saludenruta.es/api/integrations/v1
All documentation
Get started
- Introduction to the integration API
What the Salud en Ruta API lets you do, who it is for, the lifecycle of a visit and what is out of scope.
- Getting started
How to get API access and build your first end-to-end integration in five minutes against the sandbox: catalogue, create a visit, read it back and receive a webhook.
- Production and sandbox environments
Differences between production and the sandbox, key prefixes, the X-Serad-Environment header, why identifiers differ between environments and the go-live checklist.
- Authentication and security
How to authenticate calls with X-Api-Key, what each scope allows, how keys are rotated and revoked, best practices and what to do if a key leaks.
Guides
- Service catalogue
What GET /catalog returns — service types you can order and the professional each one needs, end insurers for intermediaries and whether the case number is required — and how to use it.
- Visits
Create visits (every field, priorities, appointments, address and patient), read and list them with filters and pagination, get the estimated arrival time, cancel them and download the care report.
- Patients and privacy
How we identify patients, which of their data we return (only what you sent) and which we never return, and how health data and reports are handled under the GDPR.
- Webhooks
Events we send you and when, the payload of each one, how to verify the HMAC-SHA256 signature in Node.js, Python, PHP, Java and C#, retries, deduplication and how to test your receiver.
- Idempotency
How to use the Idempotency-Key header to retry creating a visit without duplicates, how long it lasts and what the 409 responses mean.
- Rate limits
How many requests per minute each key allows, the X-RateLimit headers, what happens when you exceed the limit (429 and Retry-After) and how to retry properly.
- Errors
The error format (RFC 9457), what each HTTP status means and the list of API error types with their cause and fix.
- Sandbox and simulator
How the sandbox works, the simulator that moves visits forward, manual mode with X-Sandbox-Simulation, the /sandbox/visits/{id}/advance and /sandbox/reset endpoints, and the recommended test scenarios.
Reference
- API reference
Every endpoint, parameter, body, response and schema of API v1, generated from its OpenAPI specification.
- Code samples
Copy-ready samples in curl, JavaScript/TypeScript, Python, PHP, Java and C# to create, read and cancel visits and to verify webhooks.
Resources
- Changelog and versioning
How we version the API, what counts as a compatible change, how we announce changes and the changelog since v1.
- Frequently asked questions
Quick answers to the most common questions when integrating with the Salud en Ruta API.
- Technical support
How to reach the Salud en Ruta technical team for integration questions, keys and webhooks, incidents and urgent visits.
Something missing or not matching what you see? Email our technical team: info@saludenruta.es.
