Skip to main content

Get All Notifications API

Overview

Retrieve all notifications for a specific user with optional filtering, pagination, and search capabilities.

API Details

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

Optional Filters

ParameterTypeDescriptionExample
skipIntegerSkips n notifications from the cursor (pagination)0
is_readIntegerRead status of the notification (0 = unread, 1 = read)0
limitIntegerMaximum number of notifications to return (pagination)5
sortingStringField to sort notifications bycreated_date
start_dateLongStart date (epoch timestamp)1756622800
end_dateLongEnd date (epoch timestamp)1756623000
query_filterStringCustom query filter"refund"
search_keywordStringSearch notifications using a keyword"refund"
is_user_nullBooleanFilter notifications where user ID is nullfalse
target_sub_typeIntegerTarget subtype for notification filtering2

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 = Success
    • 0 = 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_id parameter 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 skip and limit parameters
  • The is_read filter 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_keyword parameter
  • Notifications are sorted by default, but custom sorting can be applied