Records
Address records individually — fetch, upsert, or delete by id. Writes are durable, versioned, and reflected in search immediately on every region the index is deployed to.
GET /v1/indexes/{indexName}/records/{recordId}
Fetch a single record by id
Returns the full record stored under recordId from the index's currently-active version. Returns null if the record doesn't exist (e.g. it was deleted by a prior call).
Record ids are returned in search results — fetch them once, then address records by id from then on.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
indexName | path | string | yes | The index name. |
recordId | path | string | yes | The record's id (returned in search results). |
Example request
curl -X GET \
'https://api.eztype.io/v1/indexes/{indexName}/records/{recordId}'Responses
200 — The record, or null if not found.
{
"id": "x1lGy50Bcp0W2C44-Se-",
"title": "JANE SMITH",
"weight": 1,
"latitude": "37.7749",
"longitude": "-122.4194",
"data": {
"specialty": "Family Medicine"
}
}404 — Record not found.
PUT /v1/indexes/{indexName}/records/{recordId}
Upsert a single record
Insert or update a record by id. The change produces a new version (e.g. v3.42) and is reflected in search immediately on every region where the index is active.
The id field in the request body is overwritten by the URL path — the path is authoritative.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
indexName | path | string | yes | The index name. |
recordId | path | string | yes | The record id to upsert under. |
Request body
{
"title": "JANE SMITH",
"weight": 5,
"data": {
"specialty": "Family Medicine"
}
}Example request
curl -X PUT \
'https://api.eztype.io/v1/indexes/{indexName}/records/{recordId}' \
-H 'Content-Type: application/json' \
-d '{
"title": "JANE SMITH",
"weight": 5,
"data": {
"specialty": "Family Medicine"
}
}'Responses
200 — Upsert applied. Response includes the new version id.
{
"resultCode": "SUCCESS",
"message": "OK",
"indexVersion": "3.42"
}DELETE /v1/indexes/{indexName}/records/{recordId}
Delete a single record by id
Delete a record. The deletion is durable across all future versions of the index, and is reflected in search immediately on every region the index is deployed to.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
indexName | path | string | yes | The index name. |
recordId | path | string | yes | The record id to delete. |
Example request
curl -X DELETE \
'https://api.eztype.io/v1/indexes/{indexName}/records/{recordId}'Responses
200 — Delete applied.
{
"resultCode": "SUCCESS",
"message": "OK",
"indexVersion": "3.43"
}