# Notifications

Notifications

## Search for notifications on a tenant

> Search for notifications on a tenant

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Notifications","description":"Notifications"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Accesstoken recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"NotificationResponse":{"description":"Example response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationResponseSchema"}}}}},"schemas":{"NotificationResponseSchema":{"title":"NotificationResponseSchema","type":"object","required":["messageType","recipient","message","subject","state","errorText","notificationUid","customerUid","orderUid","serviceOrderUid","serviceEventUid","tenantUserUid","supplierUid","receivementUid","purchaseOrderUid","createdBy","createdAt","lastModifiedBy","lastModifiedAt"],"properties":{"messageType":{"$ref":"#/components/schemas/MessageTypeENUM"},"recipient":{"type":"string"},"message":{"type":"string"},"subject":{"type":"string"},"state":{"$ref":"#/components/schemas/NotificationStateENUM"},"errorText":{"type":"string"},"notificationUid":{"$ref":"#/components/schemas/UID"},"customerUid":{"$ref":"#/components/schemas/OptionalUID"},"orderUid":{"$ref":"#/components/schemas/OptionalUID"},"serviceOrderUid":{"$ref":"#/components/schemas/OptionalUID"},"serviceEventUid":{"$ref":"#/components/schemas/OptionalUID"},"tenantUserUid":{"$ref":"#/components/schemas/OptionalUID"},"supplierUid":{"$ref":"#/components/schemas/OptionalUID"},"receivementUid":{"$ref":"#/components/schemas/OptionalUID"},"purchaseOrderUid":{"$ref":"#/components/schemas/OptionalUID"},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"lastModifiedBy":{"type":"string"},"lastModifiedAt":{"type":"string","format":"date-time"}}},"MessageTypeENUM":{"title":"MessageTypeENUM","type":"string","enum":["EMAIL","SMS"]},"NotificationStateENUM":{"title":"NotificationStateENUM","type":"string","enum":["NOT_STARTED","IN_PROGRESS","COMPLETE","FAILED"]},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"SortDirectionENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| ASC | Sort in ascending order|\n| DESC | Sort in descending order|\n","enum":["ASC","DESC"],"title":"SortDirectionENUM","type":"string"},"NotificationSearchSchema":{"title":"NotificationSearchSchema","type":"object","properties":{"messageType":{"$ref":"#/components/schemas/MessageTypeENUM"},"recipient":{"type":"string"},"message":{"type":"string"},"state":{"$ref":"#/components/schemas/NotificationStateENUM"},"errorText":{"type":"string"},"organizationUid":{"$ref":"#/components/schemas/UID"},"storeUid":{"$ref":"#/components/schemas/UID"},"customerUid":{"$ref":"#/components/schemas/UID"},"orderUid":{"$ref":"#/components/schemas/UID"},"serviceOrderUid":{"$ref":"#/components/schemas/UID"},"tenantUserUid":{"$ref":"#/components/schemas/UID"},"supplierUid":{"$ref":"#/components/schemas/UID"},"receivementUid":{"$ref":"#/components/schemas/UID"},"purchaseOrderUid":{"$ref":"#/components/schemas/UID"},"fromDateTime":{"type":"string","format":"date-time"},"toDateTime":{"type":"string","format":"date-time"},"query":{"type":"string","description":"Generic search. Searches both in messages an in recipient"}}}},"parameters":{"pageSizeQuery":{"description":"The number of items per page in a result set.","in":"query","name":"pageSize","required":false,"schema":{"type":"integer"}},"pageNumberQuery":{"description":"Reference to a specific page in a result set.","in":"query","name":"pageNumber","required":false,"schema":{"type":"integer"}},"sortByQuery":{"description":"Defines which field the resource list is sorted by.","in":"query","name":"sortBy","required":false,"schema":{"type":"string"}},"sortDirectionQuery":{"description":"Reference to a sort direction","explode":false,"in":"query","name":"sortDirection","schema":{"$ref":"#/components/schemas/SortDirectionENUM"},"style":"form"}},"requestBodies":{"NotificationSearchRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationSearchSchema"}}}}}},"paths":{"/tenants/{tenantUid}/notifications/search":{"post":{"summary":"Search for notifications on a tenant","operationId":"post-tenants-notifications-search","responses":{"200":{"$ref":"#/components/responses/NotificationResponse"}},"parameters":[{"$ref":"#/components/parameters/pageSizeQuery"},{"$ref":"#/components/parameters/pageNumberQuery"},{"$ref":"#/components/parameters/sortByQuery"},{"$ref":"#/components/parameters/sortDirectionQuery"}],"requestBody":{"$ref":"#/components/requestBodies/NotificationSearchRequest"},"description":"Search for notifications on a tenant","tags":["Notifications"]}}}}
```

## List notifications for a store

> List notifications for a store

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Notifications","description":"Notifications"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"NotificationListResponse":{"description":"Example response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/NotificationResponseSchema"}},"paging":{"$ref":"#/components/schemas/Paging"}},"required":["items","paging"]}}}}},"schemas":{"NotificationResponseSchema":{"title":"NotificationResponseSchema","type":"object","required":["messageType","recipient","message","subject","state","errorText","notificationUid","customerUid","orderUid","serviceOrderUid","serviceEventUid","tenantUserUid","supplierUid","receivementUid","purchaseOrderUid","createdBy","createdAt","lastModifiedBy","lastModifiedAt"],"properties":{"messageType":{"$ref":"#/components/schemas/MessageTypeENUM"},"recipient":{"type":"string"},"message":{"type":"string"},"subject":{"type":"string"},"state":{"$ref":"#/components/schemas/NotificationStateENUM"},"errorText":{"type":"string"},"notificationUid":{"$ref":"#/components/schemas/UID"},"customerUid":{"$ref":"#/components/schemas/OptionalUID"},"orderUid":{"$ref":"#/components/schemas/OptionalUID"},"serviceOrderUid":{"$ref":"#/components/schemas/OptionalUID"},"serviceEventUid":{"$ref":"#/components/schemas/OptionalUID"},"tenantUserUid":{"$ref":"#/components/schemas/OptionalUID"},"supplierUid":{"$ref":"#/components/schemas/OptionalUID"},"receivementUid":{"$ref":"#/components/schemas/OptionalUID"},"purchaseOrderUid":{"$ref":"#/components/schemas/OptionalUID"},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"lastModifiedBy":{"type":"string"},"lastModifiedAt":{"type":"string","format":"date-time"}}},"MessageTypeENUM":{"title":"MessageTypeENUM","type":"string","enum":["EMAIL","SMS"]},"NotificationStateENUM":{"title":"NotificationStateENUM","type":"string","enum":["NOT_STARTED","IN_PROGRESS","COMPLETE","FAILED"]},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"Paging":{"description":"totalCount The total number of items in the result set.\n\npageSize The number of items per page.\n\npageNumber The current page in the result set.","properties":{"pageNumber":{"type":"integer"},"pageSize":{"type":"integer"},"totalCount":{"type":"integer"}},"required":["totalCount","pageSize","pageNumber"],"title":"Paging","type":"object"},"SortDirectionENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| ASC | Sort in ascending order|\n| DESC | Sort in descending order|\n","enum":["ASC","DESC"],"title":"SortDirectionENUM","type":"string"}},"parameters":{"pageSizeQuery":{"description":"The number of items per page in a result set.","in":"query","name":"pageSize","required":false,"schema":{"type":"integer"}},"pageNumberQuery":{"description":"Reference to a specific page in a result set.","in":"query","name":"pageNumber","required":false,"schema":{"type":"integer"}},"sortByQuery":{"description":"Defines which field the resource list is sorted by.","in":"query","name":"sortBy","required":false,"schema":{"type":"string"}},"sortDirectionQuery":{"description":"Reference to a sort direction","explode":false,"in":"query","name":"sortDirection","schema":{"$ref":"#/components/schemas/SortDirectionENUM"},"style":"form"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/notifications":{"get":{"summary":"List notifications for a store","tags":["Notifications"],"responses":{"200":{"$ref":"#/components/responses/NotificationListResponse"}},"operationId":"get-tenants-stores-notifications","description":"List notifications for a store","parameters":[{"$ref":"#/components/parameters/pageSizeQuery"},{"$ref":"#/components/parameters/pageNumberQuery"},{"$ref":"#/components/parameters/sortByQuery"},{"$ref":"#/components/parameters/sortDirectionQuery"}]}}}}
```

## Send notification to recipient

> Send notification to recipient. If any of the optional fields customerUid, orderUid and serviceOrderUid is given in request, the ids MUST refer to an existing uid in the flow database.

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Notifications","description":"Notifications"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Accesstoken recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"NotificationResponse":{"description":"Example response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationResponseSchema"}}}}},"schemas":{"NotificationResponseSchema":{"title":"NotificationResponseSchema","type":"object","required":["messageType","recipient","message","subject","state","errorText","notificationUid","customerUid","orderUid","serviceOrderUid","serviceEventUid","tenantUserUid","supplierUid","receivementUid","purchaseOrderUid","createdBy","createdAt","lastModifiedBy","lastModifiedAt"],"properties":{"messageType":{"$ref":"#/components/schemas/MessageTypeENUM"},"recipient":{"type":"string"},"message":{"type":"string"},"subject":{"type":"string"},"state":{"$ref":"#/components/schemas/NotificationStateENUM"},"errorText":{"type":"string"},"notificationUid":{"$ref":"#/components/schemas/UID"},"customerUid":{"$ref":"#/components/schemas/OptionalUID"},"orderUid":{"$ref":"#/components/schemas/OptionalUID"},"serviceOrderUid":{"$ref":"#/components/schemas/OptionalUID"},"serviceEventUid":{"$ref":"#/components/schemas/OptionalUID"},"tenantUserUid":{"$ref":"#/components/schemas/OptionalUID"},"supplierUid":{"$ref":"#/components/schemas/OptionalUID"},"receivementUid":{"$ref":"#/components/schemas/OptionalUID"},"purchaseOrderUid":{"$ref":"#/components/schemas/OptionalUID"},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"lastModifiedBy":{"type":"string"},"lastModifiedAt":{"type":"string","format":"date-time"}}},"MessageTypeENUM":{"title":"MessageTypeENUM","type":"string","enum":["EMAIL","SMS"]},"NotificationStateENUM":{"title":"NotificationStateENUM","type":"string","enum":["NOT_STARTED","IN_PROGRESS","COMPLETE","FAILED"]},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"GeneralNotificationRequestSchema":{"title":"GeneralNotificationRequestSchema","type":"object","required":["messageType","recipient","message"],"properties":{"messageType":{"$ref":"#/components/schemas/MessageTypeENUM"},"recipient":{"type":"string"},"subject":{"type":"string"},"message":{"type":"string"},"notificationUid":{"$ref":"#/components/schemas/UID"},"customerUid":{"$ref":"#/components/schemas/UID"},"orderUid":{"$ref":"#/components/schemas/UID"},"purchaseOrderUid":{"$ref":"#/components/schemas/UID"}}}},"requestBodies":{"NotificationRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneralNotificationRequestSchema"}}}}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/notifications":{"post":{"summary":"Send notification to recipient","operationId":"post-tenants-stores-notifications","responses":{"200":{"$ref":"#/components/responses/NotificationResponse"}},"requestBody":{"$ref":"#/components/requestBodies/NotificationRequest"},"description":"Send notification to recipient. If any of the optional fields customerUid, orderUid and serviceOrderUid is given in request, the ids MUST refer to an existing uid in the flow database.","tags":["Notifications"]}}}}
```


---

# Agent Instructions: 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:

```
GET https://docs.flowretail.com/docs/developers/api-documentation/notifications.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
