Notifications

This page contains the logic that governs the retrieval of notification

Get All Notifications

GET {{url}}/v1/notifications/all

Return all users' notifications

Query Parameters

NameTypeDescription

sort

String

Arrange the data returned in a specific order, either in ascending or descending order, based on one or more fields.

fields

String

Transaction fields or key values separated with comas, to be returned by the transaction data E.g source, dev_mode, products_price

page

String

Page of the transaction to be returned. The default is 1 (first page).

limit

String

The number of results to be returned. The default is 10

Headers

NameTypeDescription

Authorization*

String

"Bearer <YOUR_API_KEY>"

{
    "status": "success",
    "code": 200,
    "count": 15,
    "message": "Data retrieved successfully",
    "data": [
        {
            "_id": "648486d0aca8a884f6a1be29",
            "user": "618559827c7b9bcfbcb8b073",
            "message": "You have been reported by Vicolas concerning transaction: TEST-224480220.",
            "isRead": false,
            "context": "dispute",
            "contextData": {
                "_id": "648486d0aca8a884f6a1be27",
                "dispute_id": "741710194",
                "trans_id": "64792a1dc792f00da9c747dd"
            },
            "source": "developer",
            "dev_mode": "live",
            "createdAt": "2023-06-10T14:21:04.990Z",
            "updatedAt": "2023-06-10T14:21:04.990Z"
        },
    ]
}

Get A Single Notification

GET {{url}}/v1/notifications/all/:id

Return a notification data specified in the path variable id

Path Parameters

NameTypeDescription

id*

String

Notification _id

Headers

NameTypeDescription

Authorization*

String

"Bearer <YOUR_API_KEY>"

{
    "status": "fail",
    "error": {
        "statusCode": 404,
        "status": "fail",
        "isOperational": true
    },
    "message": "No record with that ID found."
J}

Last updated