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 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
customHeadersRecord<string, any>RequiredDefault: {}
Filters and pagination configurations applied to the retrieved notifications.
Returns
ResponsePromiseResponsePromise<AdminNotificationsListRes>RequiredResolves to the list of notifications with pagination fields.
ResponsePromiseResponsePromise<AdminNotificationsListRes>Requiredresend
Resend a previously sent notifications, with the same data but optionally to a different address.
Example
Parameters
idstringRequiredThe details necessary to resend the notification.
customHeadersRecord<string, any>RequiredDefault: {}
Returns
ResponsePromiseResponsePromise<AdminNotificationsRes>RequiredResolves to the notification's details.
ResponsePromiseResponsePromise<AdminNotificationsRes>Required