Documents
Try it
Section titled “Try it”GET /:handle/documents/:idRetrieve a single document by its ID. Returns all indexed fields.
Path parameters
Section titled “Path parameters”| Parameter | Type | Description |
|---|---|---|
handle | string | Index handle as configured in config.yaml |
id | string | Document ID (objectID) |
Response
Section titled “Response”Returns the full document as a JSON object with all indexed fields:
{ "objectID": "498", "title": "Stirling Castle", "description": "A medieval castle in Stirling, Scotland.", "country": "Scotland", "coordinates": { "lat": 56.124, "lon": -3.947 }}Examples
Section titled “Examples”curl "https://search-api-elysia-production.up.railway.app/collections/documents/498"Error responses
Section titled “Error responses”| Status | Condition |
|---|---|
401 | Missing or invalid bearer token |
404 | Index handle or document not found |