> 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-group/get-all/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.mercoa.com/_mcp/server. # Get All Groups GET https://api.mercoa.com/entityGroups Get all entity groups. If using a JWT, will return all groups the entity is part of. If using an API key, will return all groups for the organization. Reference: https://docs.mercoa.com/embedded-ap-ar/api-reference/entity-group/get-all ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Request ### Query parameters - `limit` (integer, optional) — The maximum number of results to return. Defaults to 1. Max is 20. - `startingAfter` (string, optional) - `search` (string, optional) — Search entity groups by name. This will perform a case-insensitive search on the group name. ## Response ### 200 - `count` (integer, required) - `hasMore` (boolean, required) - `data` (list of object, required) - `id` (string, required) - `entities` (list of object, required) - `id` (string, required) - `name` (string, required) - `email` (string, required) - `isCustomer` (boolean, required) — True if this entity has a direct relationship with your organization. - `accountType` (enum, required) - Allowed values: `business`, `individual` - `profile` (object, required) - `business` (object, optional) — Will be set if the entity is a business - `legalBusinessName` (string, required) - `taxIDProvided` (boolean, required) - `email` (string, optional) - `businessType` (enum, optional) - Allowed values: `soleProprietorship`, `unincorporatedAssociation`, `trust`, `publicCorporation`, `privateCorporation`, `llc`, `partnership`, `unincorporatedNonProfit`, `incorporatedNonProfit` - `phone` (object, optional) - `countryCode` (string, required) - `number` (string, required) - `doingBusinessAs` (string, optional) - `website` (string, optional) - `description` (string, optional) - `address` (object, optional) - `addressLine1` (string, required) - `city` (string, required) - `stateOrProvince` (string, required) — State or province code. Must be in the format XX. - `postalCode` (string, required) — Postal code. Must be in the format XXXXX or XXXXX-XXXX. - `addressLine2` (string, optional) - `country` (string, optional) - `ownersProvided` (boolean, optional) — True if all representatives have been provided for this business. - `taxId` (object, optional) - `ein` (object, required) - `number` (string, required) — Must be in the format XX-XXXXXXX. - `formationDate` (datetime, optional) - `industryCodes` (object, optional) - `mcc` (string, optional) - `averageMonthlyTransactionVolume` (double, optional) - `averageTransactionSize` (double, optional) - `maxTransactionSize` (double, optional) - `individual` (object, optional) — Will be set if the entity is a individual - `name` (object, required) - `firstName` (string, required) - `lastName` (string, required) - `middleName` (string, optional) - `suffix` (string, optional) - `birthDateProvided` (boolean, required) - `governmentIDProvided` (boolean, required) - `email` (string, optional) - `phone` (object, optional) - `countryCode` (string, required) - `number` (string, required) - `address` (object, optional) - `addressLine1` (string, required) - `city` (string, required) - `stateOrProvince` (string, required) — State or province code. Must be in the format XX. - `postalCode` (string, required) — Postal code. Must be in the format XXXXX or XXXXX-XXXX. - `addressLine2` (string, optional) - `country` (string, optional) - `status` (enum, required) - Allowed values: `unverified`, `pending`, `resubmit`, `review`, `verified`, `failed` - `acceptedTos` (boolean, required) — True if this entity has accepted the terms of service. - `isPayor` (boolean, required) — True if this entity can pay invoices. - `isPayee` (boolean, required) — True if this entity can receive payments. - `isNetworkPayor` (boolean, required) — True if this entity is available as a payor to any entity on your platform. Otherwise this entity will only be available as a payor to entities that have a direct relationship with this entity. - `isNetworkPayee` (boolean, required) — True if this entity is available as a payee to any entity on your platform. Otherwise this entity will only be available as a payee to entities that have a direct relationship with this entity. - `createdAt` (datetime, required) - `updatedAt` (datetime, required) - `foreignId` (string, optional) — The ID used to identify this entity in your system - `emailTo` (string, optional) — Local-part/username of the email address to which to send invoices to be added to the Invoice Inbox. - `emailToAlias` (list of string, optional) — Email inbox alias addresses. Used when forwarding emails to the emailTo address from an alias. - `logo` (string, optional) — URL for the entity logo - `oatfiStatus` (string, optional) — The OatFi status of this entity - `oatfiUnderwritingResponse` (map from string to string, optional) — The OatFi underwriting response of this entity - `metadata` (map from string to string, optional) — Simple key/value metadata associated with this entity. For more complex metadata, use the Metadata API. - `metadata` (map from string to string, required) - `foreignId` (string, optional) - `name` (string, optional) - `emailToName` (string, optional) ## 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": 3, "hasMore": false, "data": [ { "id": "entg_a3582b70-fd04-4888-9185-a640ae9048be", "entities": [ { "id": "ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", "name": "Acme Inc.", "email": "customer@acme.com", "isCustomer": true, "accountType": "business", "profile": { "business": { "legalBusinessName": "Acme Inc.", "taxIDProvided": true, "email": "customer@acme.com", "businessType": "llc", "phone": { "countryCode": "1", "number": "4155551234" }, "address": { "addressLine1": "123 Main St", "city": "San Francisco", "stateOrProvince": "CA", "postalCode": "94105", "addressLine2": "Unit 1", "country": "US" }, "ownersProvided": true, "taxId": { "ein": { "number": "12-3456789" } } } }, "status": "verified", "acceptedTos": true, "isPayor": true, "isPayee": false, "isNetworkPayor": false, "isNetworkPayee": false, "createdAt": "2024-01-01T00:00:00Z", "updatedAt": "2024-01-02T00:00:00Z", "foreignId": "MY-DB-ID-12345" }, { "id": "ent_21661ac1-a2a8-4465-a6c0-64474ba8181d", "name": "Big Box Store", "email": "vendor@bigboxstore.com", "isCustomer": false, "accountType": "business", "profile": { "business": { "legalBusinessName": "Big Box Store", "taxIDProvided": false, "email": "vendor@bigboxstore.com", "businessType": "publicCorporation", "ownersProvided": false } }, "status": "unverified", "acceptedTos": false, "isPayor": false, "isPayee": true, "isNetworkPayor": false, "isNetworkPayee": false, "createdAt": "2024-01-01T00:00:00Z", "updatedAt": "2024-01-02T00:00:00Z", "foreignId": "MY-DB-ID-90909" } ], "metadata": { "key1": "value1" }, "foreignId": "your-group-id", "name": "AcmeConglomerate", "emailToName": "acmegroup" } ] } ``` **SDK Code** ```python Default import requests url = "https://api.mercoa.com/entityGroups" 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.entityGroup.getAll(); ``` ```go Default package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.mercoa.com/entityGroups" 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/entityGroups") 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/entityGroups") .header("Authorization", "Bearer ") .asString(); ``` ```php Default request('GET', 'https://api.mercoa.com/entityGroups', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` ```csharp Default using RestSharp; var client = new RestClient("https://api.mercoa.com/entityGroups"); 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/entityGroups")! 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() ```