Check Exist Push Token Device
This endpoint verifies whether a push notification token already exists for a specified device. It is used to determine if a device has been registered to receive push notifications before attempting to register or update it. The response returns a boolean indicating the existence of the token/device combination.
Endpoint
GET /settings/pushExist
Authentication
Bearer token required. Obtain via:
POST https://api.banking.netevia.dev/api/auth/v2
Include in header: Authorization: Bearer {token}
Token lifetime: 10 minutes. Refresh via POST /api/auth/refresh.
When to use
Use this endpoint before registering a new push notification token to avoid duplicate registrations. It is also useful during app re-installs or device migrations to check whether an existing token record needs to be updated or removed. This check helps maintain accurate device-to-token mappings for reliable push notification delivery.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| deviceId | string | No | The unique identifier of the device to check. |
| pushToken | string | No | The push notification token associated with the device. |
Response
200 OK
| Field | Type | Description |
|---|---|---|
| value | boolean | true if the push token/device combination exists; false otherwise. |
{
"value": true
}Error Codes
| Code | When it happens |
|---|---|
| 400 | Missing required fields or validation error |
| 401 | Token missing, expired, or invalid |
| 403 | Insufficient permissions |
| 404 | Resource not found |
| 500 | Internal server error |
Common Mistakes
- Passing a
deviceIdorpushTokenthat has not yet been registered will return{ "value": false }— this is not an error, it simply means no record exists. - Omitting both query parameters will result in an indeterminate lookup; always supply at least one to get a meaningful result.
Related Endpoints
POST /settings/pushToken— Register or update a push notification token for a device.DELETE /settings/pushToken— Remove a push notification token for a device.
Example
curl -X GET "https://api.banking.netevia.dev/settings/pushExist?deviceId=device-abc-123&pushToken=fcm-token-xyz-789" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json"