Entity

Search entities

GET
Search all entities with the given filters. If no filters are provided, all entities will be returned.

Query parameters

paymentMethodsbooleanOptional
If true, will include entity payment methods as part of the response
isCustomerbooleanOptional
If true, only entities with a direct relationship to the requesting organization will be returned. If false or not provided, all entities will be returned.
foreignIdstringOptional
ID used to identify this entity in your system
statusenumOptional
isPayeebooleanOptional
If true, entities that are marked as payees will be returned. If false or not provided, entities that are marked as payees will not be returned.
isPayorbooleanOptional
If true or not provided, entities that are marked as payors will be returned. If false, entities that are marked as payors will not be returned.
namestringOptional
Filter entities by name. Partial matches are supported.
limitintegerOptional
Number of entities to return. Limit can range between 1 and 100, and the default is 10.
startingAfterstringOptional
The ID of the entity to start after. If not provided, the first page of entities will be returned.

Response

This endpoint returns an object
count
integer
Total number of entities for the given 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
True if there are more entities available for the given filters.
data
list of objects
GET
1curl -G https://api.mercoa.com/entity \
2 -H "Authorization: Bearer <token>" \
3 -d isCustomer=true \
4 -d foreignId=MY-DB-ID-12345 \
5 -d paymentMethods=true
200
Retrieved
1{
2 "count": 1,
3 "hasMore": false,
4 "data": [
5 {
6 "acceptedTos": true,
7 "accountType": "business",
8 "createdAt": "2024-01-01T00:00:00Z",
9 "email": "customer@acme.com",
10 "id": "ent_8545a84e-a45f-41bf-bdf1-33b42a55812c",
11 "isCustomer": true,
12 "isPayee": false,
13 "isPayor": true,
14 "name": "Acme Inc.",
15 "profile": {
16 "business": {
17 "legalBusinessName": "Acme Inc.",
18 "taxIDProvided": true,
19 "email": "customer@acme.com",
20 "businessType": "llc",
21 "phone": {
22 "countryCode": "1",
23 "number": "4155551234"
24 },
25 "address": {
26 "addressLine1": "123 Main St",
27 "city": "San Francisco",
28 "stateOrProvince": "CA",
29 "postalCode": "94105",
30 "addressLine2": "Unit 1",
31 "country": "US"
32 },
33 "ownersProvided": true
34 }
35 },
36 "status": "verified",
37 "updatedAt": "2024-01-02T00:00:00Z",
38 "foreignId": "MY-DB-ID-12345",
39 "paymentMethods": [
40 {
41 "type": "bankAccount",
42 "accountName": "My Checking Account",
43 "accountNumber": "99988767623",
44 "accountType": "CHECKING",
45 "bankName": "Chase",
46 "createdAt": "2021-01-01T00:00:00Z",
47 "id": "pm_4794d597-70dc-4fec-b6ec-c5988e759769",
48 "isDefaultDestination": true,
49 "isDefaultSource": true,
50 "routingNumber": "12345678",
51 "status": "VERIFIED",
52 "supportedCurrencies": [
53 "USD"
54 ],
55 "updatedAt": "2021-01-01T00:00:00Z"
56 }
57 ]
58 }
59 ]
60}