AdminNotificationsResource
This class is used to send requests to Admin Notification API Routes. All its method
are available in the JS Client under the medusa.admin.notifications
property.
All methods in this class require user authentication.
Notifications are sent to customers to inform them of new updates. For example, a notification can be sent to the customer when their order is place or its state is updated. The notification's type, such as an email or SMS, is determined by the notification provider installed on the Medusa backend.
Methods
list
Retrieve a list of notifications. The notifications can be filtered by fields such as event_name
or resource_type
passed in the query
parameter.
The notifications can also be paginated.
Example
To list notifications:
To specify relations that should be retrieved within the notifications:
By default, only the first 50
records are retrieved. You can control pagination by specifying the limit
and offset
properties:
Parameters
customHeaders
Record<string, any>RequiredDefault: {}
Filters and pagination configurations applied to the retrieved notifications.
Returns
ResponsePromise
ResponsePromise<AdminNotificationsListRes>RequiredResolves to the list of notifications with pagination fields.
ResponsePromise
ResponsePromise<AdminNotificationsListRes>Requiredresend
Resend a previously sent notifications, with the same data but optionally to a different address.
Example
Parameters
id
stringRequiredThe details necessary to resend the notification.
customHeaders
Record<string, any>RequiredDefault: {}
Returns
ResponsePromise
ResponsePromise<AdminNotificationsRes>RequiredResolves to the notification's details.
ResponsePromise
ResponsePromise<AdminNotificationsRes>Required