API Reference
Notifications are sent to users when an event occurs in the system related to them. Notifications are sent to users via email.
Notification Types
Notifications are sent for the following events:
Event | Description | Default Recipient |
---|---|---|
INVOICE_APPROVAL_NEEDED | An invoice is created and needs approval | The designated approver(s) of the invoice |
INVOICE_APPROVED | An invoice is approved | Invoice Creator |
INVOICE_REJECTED | An invoice is rejected | Invoice Creator |
INVOICE_SCHEDULED | An invoice is scheduled for payment | None |
INVOICE_PENDING | An invoice payment has initiated | None |
INVOICE_PAID | An invoice is marked as paid | Invoice Creator |
INVOICE_CANCELED | An invoice is marked as canceled | None |
INVOICE_CREATED | A new invoice is created by any means (email, upload, etc.) | None |
INVOICE_EMAILED | A new invoice is emailed to the email inbox | None |
INVOICE_FAILED | An invoice payment failed | Invoice Creator |
Changing Notification Recipients
The default recipients for each notification type can be changed by updating the policy for that notification type. You can also do this using the Admin Dashboard
For example, to change the recipients of the INVOICE_APPROVED
notification type to always notify any user with the role admin
Disabling Notifications
To disable notifications for a notification type, set disabled
to true
in the request body. You can also do this using the Admin Dashboard
Disabling Notifications for a Specific User
To disable notifications for a specific user, set disabled
to true
in the request body. You can also do this using the Admin Dashboard
Viewing Notifications for a User
To view notifications for a user, use the get all notifications endpoint.
Customizing Notifications
Currently, you can customize the link that is included in the notification email. The default link will open up an standalone web page that displays the Mercoa inbox and invoice. You can customize this link to point to your own website or application.
You can use the Admin Dashboard to customize the link, or you can use the update notification configuration endpoint to customize the link for a specific notification type.