> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.mercoa.com/embedded-ap-ar/api-reference/entity/user/notifications/find/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.mercoa.com/_mcp/server. # Get All GET https://api.mercoa.com/entity/{entityId}/user/{userId}/notifications Reference: https://docs.mercoa.com/embedded-ap-ar/api-reference/entity/user/notifications/find ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Request ### Path parameters - `entityId` (string, required) — Entity ID or Entity ForeignID - `userId` (string, required) — User ID or User ForeignID ### Query parameters - `startDate` (datetime, optional) — Start date for notification created on date filter. - `endDate` (datetime, optional) — End date for notification created date filter. - `orderDirection` (enum, optional) — Direction to order notifications by. Defaults to asc. - Allowed values: `ASC`, `DESC` - `limit` (integer, optional) — Number of invoices to return. Limit can range between 1 and 100, and the default is 10. - `startingAfter` (string, optional) — The ID of the notification to start after. If not provided, the first page of invoices will be returned. - `notificationType` (enum, optional) — The type of notification to filter by. - Allowed values: `INVOICE_APPROVAL_NEEDED`, `INVOICE_APPROVED`, `INVOICE_REJECTED`, `INVOICE_SCHEDULED`, `INVOICE_PENDING`, `INVOICE_PAID`, `INVOICE_CANCELED`, `INVOICE_CREATED`, `INVOICE_EMAILED`, `INVOICE_FAILED`, `COUNTERPARTY_ONBOARDING_COMPLETED` - `status` (enum, optional) — The status of the notification to filter by. - Allowed values: `PENDING`, `SENT`, `READ`, `FAILED` ## Response ### 200 - `count` (integer, required) — Total number of notifications for the given start and end date filters. This value is not limited by the limit parameter. It is provided so that you can determine how many pages of results are available. - `hasMore` (boolean, required) — True if there are more notifications available for the given start and end date filters. - `data` (list of object, required) - `id` (string, required) - `type` (enum, required) - Allowed values: `INVOICE_APPROVAL_NEEDED`, `INVOICE_APPROVED`, `INVOICE_REJECTED`, `INVOICE_SCHEDULED`, `INVOICE_PENDING`, `INVOICE_PAID`, `INVOICE_CANCELED`, `INVOICE_CREATED`, `INVOICE_EMAILED`, `INVOICE_FAILED`, `COUNTERPARTY_ONBOARDING_COMPLETED` - `status` (enum, required) - Allowed values: `PENDING`, `SENT`, `READ`, `FAILED` - `createdAt` (datetime, required) - `invoiceId` (string, optional) — The invoice ID that this notification is related to. This field is only present for notifications related to invoices. ## Errors ### 400 Bad Request - `errorName` ("BadRequest", required) - `content` (string, required) ### 401 Unauthorized - `errorName` ("Unauthorized", required) - `content` (string, required) ### 403 Forbidden - `errorName` ("Forbidden", required) - `content` (string, required) ### 404 Not Found - `errorName` ("NotFound", required) - `content` (string, required) ### 409 Conflict - `errorName` ("Conflict", required) - `content` (string, required) ### 500 Internal Server Error - `errorName` ("InternalServerError", required) - `content` (string, required) ### 501 Unimplemented - `errorName` ("Unimplemented", required) - `content` (string, required) ## Examples **Response** ```json { "count": 2, "hasMore": false, "data": [ { "id": "notif_7df2974a-4069-454c-912f-7e58ebe030fb", "type": "INVOICE_APPROVAL_NEEDED", "status": "SENT", "createdAt": "2024-01-01T00:00:00Z", "invoiceId": "in_26e7b5d3-a739-4b23-9ad9-6aaa085f47a9" }, { "id": "notif_958c4ffb-dc06-494c-a0e0-1b4946c6bb0f", "type": "INVOICE_APPROVED", "status": "SENT", "createdAt": "2024-01-01T00:00:00Z", "invoiceId": "in_26e7b5d3-a739-4b23-9ad9-6aaa085f47a9" } ] } ``` **SDK Code** ```python Default import requests url = "https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/user/user_e24fc81c-c5ee-47e8-af42-4fe29d895506/notifications" headers = {"Authorization": "Bearer "} response = requests.get(url, headers=headers) print(response.json()) ``` ```typescript Default import { MercoaClient } from "@mercoa/javascript"; const client = new MercoaClient({ token: "YOUR_TOKEN" }); await client.entity.user.notifications.find("ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", "user_e24fc81c-c5ee-47e8-af42-4fe29d895506"); ``` ```go Default package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/user/user_e24fc81c-c5ee-47e8-af42-4fe29d895506/notifications" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Default require 'uri' require 'net/http' url = URI("https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/user/user_e24fc81c-c5ee-47e8-af42-4fe29d895506/notifications") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body ``` ```java Default import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/user/user_e24fc81c-c5ee-47e8-af42-4fe29d895506/notifications") .header("Authorization", "Bearer ") .asString(); ``` ```php Default request('GET', 'https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/user/user_e24fc81c-c5ee-47e8-af42-4fe29d895506/notifications', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` ```csharp Default using RestSharp; var client = new RestClient("https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/user/user_e24fc81c-c5ee-47e8-af42-4fe29d895506/notifications"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer "); IRestResponse response = client.Execute(request); ``` ```swift Default import Foundation let headers = ["Authorization": "Bearer "] let request = NSMutableURLRequest(url: NSURL(string: "https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/user/user_e24fc81c-c5ee-47e8-af42-4fe29d895506/notifications")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```