Get All Notifications API
Overview
Retrieve all notifications for a specific user with optional filtering, pagination, and search capabilities.
API Details
- Method: GET
- URL: https://api.gafapay.com:8443/gafapay/v3/notification/notification
- Content-Type: application/json
- companyid: 59388167894b4d10a04fe5da3b8a2104
- requestid: be08f79e-7eac-40e1-acbe-00f6ae7b8f7b
- Authorization: Token required
Endpoint
GET https://api.gafapay.com:8443/gafapay/v3/notification/notification?user_id={user_id}
Query Parameters
- user_id (String, required): The unique identifier of the user to retrieve notifications for
- Example:
fb8f09210e0f46b7b4262d77f5b6c273
- Example:
Optional Filters
| Parameter | Type | Description | Example |
|---|---|---|---|
skip | Integer | Skips n notifications from the cursor (pagination) | 0 |
is_read | Integer | Read status of the notification (0 = unread, 1 = read) | 0 |
limit | Integer | Maximum number of notifications to return (pagination) | 5 |
sorting | String | Field to sort notifications by | created_date |
start_date | Long | Start date (epoch timestamp) | 1756622800 |
end_date | Long | End date (epoch timestamp) | 1756623000 |
query_filter | String | Custom query filter | "refund" |
search_keyword | String | Search notifications using a keyword | "refund" |
is_user_null | Boolean | Filter notifications where user ID is null | false |
target_sub_type | Integer | Target subtype for notification filtering | 2 |
Headers
authorization: Token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJmYjhmMDkyMTBlMGY0NmI3YjQyNjJkNzdmNWI2YzI3MyIsInJvbGVzIjpbIlJPTEVfQ1VTVE9NRVIiXSwiZXhwIjoxNzU3MTYwNzEzfQ.b3RU1QWT7N7WQQJ5kHAO2yptdnEO6vr-7GwdCAGUpCA
companyid: 59388167894b4d10a04fe5da3b8a2104
requestid: be08f79e-7eac-40e1-acbe-00f6ae7b8f7b
Response
{
"success": 1,
"error": [],
"data": {
"notifications": [
{
"id": "a0d7f0f30fb24aa68fa34fd256945e40",
"user_id": "fb8f09210e0f46b7b4262d77f5b6c273",
"target_type_info": {
"target_sub_type": 2,
"target_type": 1
},
"is_read": null,
"notification_title": "Refund Money",
"notification_body": "Vous avez été remboursé par Sport shop de 10.00 FCFA.",
"notification_type": 2,
"notification_event_type": 27,
"txn_id": "fbfc7835ae9e494e8f5888e2ee3e9d0c",
"created_date": 1756622876,
"updated_date": 1756622876,
"meta_data": null
}
]
}
}
Response Fields
- success (integer): Response status indicator
1= Success0= Failure
- error (array): Array of error messages (empty on success)
- data (object): Response data object
- notifications (array): Array of notification objects
Notification Object Fields
- id (string): Unique notification identifier
- user_id (string): ID of the user who owns this notification
- target_type_info (object): Target type information
- target_sub_type (integer): Target subtype identifier
- target_type (integer): Target type identifier
- is_read (boolean|null): Whether the notification has been read
- notification_title (string): Title of the notification
- notification_body (string): Body/content of the notification
- notification_type (integer): Type of notification
- notification_event_type (integer): Event type identifier
- txn_id (string): Associated transaction ID
- created_date (long): Creation timestamp
- updated_date (long): Last update timestamp
- meta_data (object|null): Additional metadata for the notification
Example Usage
curl --location 'https://api.gafapay.com:8443/gafapay/v3/notification/notification?user_id=fb8f09210e0f46b7b4262d77f5b6c273' \
--header 'authorization: Token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJmYjhmMDkyMTBlMGY0NmI3YjQyNjJkNzdmNWI2YzI3MyIsInJvbGVzIjpbIlJPTEVfQ1VTVE9NRVIiXSwiZXhwIjoxNzU3MTYwNzEzfQ.b3RU1QWT7N7WQQJ5kHAO2yptdnEO6vr-7GwdCAGUpCA' \
--header 'companyid: 59388167894b4d10a04fe5da3b8a2104' \
--header 'requestid: be08f79e-7eac-40e1-acbe-00f6ae7b8f7b'
Notes
- The
user_idparameter is required to retrieve notifications for a specific user - Use optional filters to customize the notification results based on your requirements
- Pagination can be implemented using
skipandlimitparameters - The
is_readfilter helps distinguish between read and unread notifications - Date filtering can be used to get notifications within specific time ranges
- Search functionality is available through the
search_keywordparameter - Notifications are sorted by default, but custom sorting can be applied