Entity

Create entity

POST

Request

This endpoint expects an object.
isCustomer
booleanRequired
If this entity has a direct relationship with your organization (e.g your direct customer or client), set this to true. Otherwise, set to false (e.g your customer's vendors).
accountType
enumRequired
Allowed values: businessindividual
profile
objectRequired
isPayor
booleanRequired
If this entity will be paying invoices, set this to true.
isPayee
booleanRequired
If this entity will be receiving payments, set this to true.
foreignId
stringOptional
The ID used to identify this entity in your system. This ID must be unique across all entities in your system.
emailTo
stringOptional
Sets the email address to which to send invoices to be added to the Invoice Inbox. Only provide the local-part/username of the email address, do not include the @domain.com
emailToAlias
list of stringsOptional
Email inbox alias addresses. Used when forwarding emails to the emailTo address from an alias. Include the full email address.
logo
stringOptional
Base64 encoded PNG image data for the entity logo.

Response

This endpoint returns an object
id
string
name
string
email
string
isCustomer
boolean
True if this entity has a direct relationship with your organization.
accountType
enum
Allowed values: businessindividual
profile
object
status
enum
acceptedTos
boolean
True if this entity has accepted the terms of service.
isPayor
boolean
True if this entity can pay invoices.
isPayee
boolean
True if this entity can receive payments.
createdAt
datetime
updatedAt
datetime
foreignId
stringOptional
The ID used to identify this entity in your system
emailTo
stringOptional
Local-part/username of the email address to which to send invoices to be added to the Invoice Inbox.
emailToAlias
list of stringsOptional
Email inbox alias addresses. Used when forwarding emails to the emailTo address from an alias.
POST
1curl -X POST https://api.mercoa.com/entity \
2 -H "Authorization: Bearer <token>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "isCustomer": true,
6 "accountType": "business",
7 "profile": {
8 "business": {
9 "legalBusinessName": "Acme Inc.",
10 "email": "customer@acme.com",
11 "businessType": "llc",
12 "phone": {
13 "countryCode": "1",
14 "number": "4155551234"
15 },
16 "website": "http://www.acme.com",
17 "address": {
18 "addressLine1": "123 Main St",
19 "city": "San Francisco",
20 "stateOrProvince": "CA",
21 "postalCode": "94105",
22 "addressLine2": "Unit 1",
23 "country": "US"
24 },
25 "taxId": {
26 "ein": {
27 "number": "12-3456789"
28 }
29 }
30 }
31 },
32 "isPayor": true,
33 "isPayee": false,
34 "foreignId": "MY-DB-ID-12345"
35}'
200
Successful
1{
2 "id": "ent_8545a84e-a45f-41bf-bdf1-33b42a55812c",
3 "name": "Acme Inc.",
4 "email": "customer@acme.com",
5 "isCustomer": true,
6 "accountType": "business",
7 "profile": {
8 "business": {
9 "legalBusinessName": "Acme Inc.",
10 "taxIDProvided": true,
11 "email": "customer@acme.com",
12 "businessType": "llc",
13 "phone": {
14 "countryCode": "1",
15 "number": "4155551234"
16 },
17 "address": {
18 "addressLine1": "123 Main St",
19 "city": "San Francisco",
20 "stateOrProvince": "CA",
21 "postalCode": "94105",
22 "addressLine2": "Unit 1",
23 "country": "US"
24 },
25 "ownersProvided": true
26 }
27 },
28 "status": "verified",
29 "acceptedTos": true,
30 "isPayor": true,
31 "isPayee": false,
32 "createdAt": "2024-01-01T00:00:00Z",
33 "updatedAt": "2024-01-02T00:00:00Z",
34 "foreignId": "MY-DB-ID-12345"
35}