status field indicates whether the request succeeded or failed.
Success responses
GET — list
Returned when a GET request has noparamKey (or the query returns multiple documents).
query object, the response also includes a message field:
Always
"success" for successful responses.Array of matching documents. Each document includes its Firestore document ID
as
id alongside all stored fields.Present only on param+query GET responses. Contains a human-readable count of matched documents.
GET — single document
Returned when a GET request includes aparamKey and the document is found.
The matched document, including its Firestore document ID as
id.POST — create
PUT / PATCH / DELETE
A human-readable confirmation of the operation performed.
Error responses
Validation error — missing fields
Returned when required fields are absent from the request body.Validation error — extra fields
Returned when the request body includes fields not defined in the collection schema.Not found — GET by param
Returned when a single-document GET finds no matching document.Firestore error
Returned when Firestore itself returns an error.The error
status value is not consistent across error types. Validation
errors use uppercase "ERROR". Runtime and Firestore errors use lowercase
"error". Check for both values when handling errors in your client code.All status values
All status values
| Value | When used |
|---|---|
"success" | The request completed successfully. |
"error" | A runtime error occurred, such as a missing document or a Firestore error. |
"ERROR" | A validation error occurred, such as missing or disallowed fields in the request body. |