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
curl --location --request POST '{B2B_Backend_URL}/api/v1/notifications/{notification_pk}/resend/ \
--header 'Authorization: Token {token} \
--header 'Content-Type: application/json'
Example Response (200 OK)
{
"id": 2081,
"template": 3,
"context": {
"quotation": {
"id": 1750,
"name": "test",
"user": {
"id": 663,
"email": "[email protected]",
"last_name": "Doe",
"first_name": "John"
},
"number": "321321321",
"status": "approved",
"net_amount": "10400.00",
"total_amount": "10400.00"
}
},
"user": 663,
"is_sent": true,
"created_at": "2025-01-16T14:13:31.702033Z",
"modified_at": "2025-01-16T14:13:46.902663Z"
}
Last updated
Was this helpful?