> For the complete documentation index, see [llms.txt](https://apidocs.akinon.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidocs.akinon.com/b2b/notification.md).

# 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)**

```json
{
    "count": 56,
    "next": null,
    "previous": null,
    "results": [
        {
            "id": 311,
            "template": 6,
            "context": {
                "quotation": {
                    "id": 131,
                    "name": "erp_code task test19",
                    "user": {
                        "id": 1,
                        "email": "akinon@akinon.com",
                        "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**

<table><thead><tr><th width="174.48828125">Parameter</th><th width="144.2890625">Type</th><th>Description</th></tr></thead><tbody><tr><td>notification_pk</td><td>integer</td><td>Primary key (ID) of the notification to resend.</td></tr></tbody></table>

**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)**

```json
{
  "id": 2081,
  "template": 3,
  "context": {
	"quotation": {
  	"id": 1750,
  	"name": "test",
  	"user": {
    	"id": 663,
    	"email": "example@example.com",
    	"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"
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://apidocs.akinon.com/b2b/notification.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
