API reference
Public nominee or campaign code lookup
Finds an approved nominee or public voting campaign by code or slug using the current public visibility and active-category boundary.
https://sparkglim.net/api/participants/searchAccess model
- Access model
- Public access with validation
- Documented availability
- Implemented in source
Availability is verified from source, not a live production guarantee.
Return only the records permitted by account, campaign and visibility settings.
Parameters
| Name | Type | Validation |
|---|---|---|
codeRequiredThe existing resource credential or verification code required by this endpoint; never publish a real OTP or ticket secret. | string | Validation: nominee/participant/campaign code or campaign slug; q accepted as alias. |
Request
Examples describe the contract and are not executed. Use authorized test records; never paste a real secret into these pages.
GET /api/participants/search?code=EXAMPLE HTTP/1.1
Host: sparkglim.netResponse
{
"success": true,
"resultType": "nominee",
"participant": {
"id": "11111111-1111-4111-8111-111111111111",
"name": "Example nominee",
"bio": null,
"category": null,
"vote_count": null,
"show_vote_count": false,
"participant_code": "EXAMPLE",
"nominee_code": null,
"image_url": null
},
"campaign": {
"id": "11111111-1111-4111-8111-111111111111",
"title": "Example awards",
"slug": "example-awards",
"status": "approved",
"campaign_type": "voting",
"vote_price": 1,
"image_url": null,
"banner_url": null
}
}{
"error": "No nominee or digital voting campaign found for this code"
}Validation, permissions, unavailable records and temporary service failures use the handler’s HTTP status and error payload.
Limits & retries
This Web handler has no dedicated limiter in its source; upstream controls may apply.
Source compatibility
Authorized operations require account-specific testing.
app/api/participants/search/route.ts