Notification

Notification is used to notify the creator of a quotation by email whenever the quotation is updated. All actions are listed below.

  • Creating quotation

  • Updating quantity of quotation item

  • Deleting quotation item

  • Creating quotation item

  • Changing quotation status to sending approval request

  • Rejecting quotation

  • Approving quotation

List Notifications

Notifications are fetched by the following endpoint which supports user, template, is_sent, limit filters.

Example Request

curl --location '{host}api/v1/notifications/?user=1&is_sent=true&template=6&limit=100' \
--header 'Authorization: Token {Token}'

Example Response (200 OK)

{
    "count": 56,
    "next": null,
    "previous": null,
    "results": [
        {
            "id": 311,
            "template": 6,
            "context": {
                "quotation": {
                    "id": 131,
                    "name": "erp_code task test19",
                    "user": {
                        "id": 1,
                        "email": "[email protected]",
                        "last_name": "Doe",
                        "first_name": "John"
                    },
                    "number": "079768239",
                    "status": "approved",
                    "net_amount": "505444797.85",
                    "total_amount": "505444797.85"
                }
            },
            "user": 1,
            "is_sent": true,
            "created_at": "2024-01-24T07:02:56.896243Z",
            "modified_at": "2024-01-24T07:03:11.940575Z"
        },
        ...
    ]
}

Resend Notifications

This endpoint is used to resend a notification that has the is_sent flag set to false.

Request Parameters

Parameter
Type
Description

notification_pk

integer

Primary key (ID) of the notification to resend.

Example Request

Example Response (200 OK)

Last updated

Was this helpful?