API ReferenceAccounting
Customer · customer
Portable accounting customer / contact contract. name is the stable cross-system anchor; currencyCode matters for Cin7 Core writes, and address fields matter most for QuickBooks writes.
Entity type:
customer· Methods: GET · POST
Portable accounting customer / contact contract. name is the stable cross-system anchor; currencyCode matters for Cin7 Core writes, and address fields matter most for QuickBooks writes.
Endpoints
GET /unified/{accountId}/customer # List normalized customer records
POST /unified/{accountId}/customer # Create / push one customerSchema
| Field | Type | Required | Description |
|---|---|---|---|
externalId | string | Yes | Stable source customer identifier. Used as the idempotency key on writes. |
name | string | Yes | Best available display / contact name for the customer. |
firstName | string | — | Given name for person-style contacts. |
lastName | string | — | Family name for person-style contacts. |
email | string · email | — | Primary email address. |
phone | string | — | Primary phone number. |
companyName | string | — | Company or business name when distinct from display name. |
notes | string | — | Customer note or memo. |
address | object | — | Primary billing or mailing address. |
address.line1 | string | — | Street address, first line. |
address.line2 | string | — | Street address, second line. |
address.city | string | — | City or locality. |
address.state | string | — | State, province, or region. |
address.postalCode | string | — | ZIP or postal code. |
address.country | string | — | Country name or code. |
active | boolean | — | Whether the customer / contact is active. |
currencyCode | string · ISO 4217 | — | Preferred 3-letter currency code when available. |
Example object
{
"externalId": "cus_8Kz2n41",
"name": "Harvest Market Ltd.",
"firstName": "Elena",
"lastName": "Chen",
"email": "elena@harvestmarket.com",
"phone": "+1 415 555 0134",
"companyName": "Harvest Market Ltd.",
"notes": "Wholesale account, NET-30 terms.",
"address": {
"line1": "210 Mission St",
"city": "San Francisco",
"state": "CA",
"postalCode": "94105",
"country": "US"
},
"active": true,
"currencyCode": "USD"
}The same shape is used as the POST request body and returned by GET reads — reads from
every connected system are normalized to it.
Requests
curl "https://api.linktoany.com/unified/{accountId}/customer?pageSize=10" \
-H "accept: application/json" \
-H "authorization: Bearer ak_<your_api_key>"const page = await client.records.list(accountId, 'customer', {
pageSize: 10,
});
for (const customer of page.data) {
console.log(customer);
}
// Or walk every page — the SDK follows the cursor for you
for await (const customer of client.records.iterate(accountId, 'customer')) {
await save(customer);
}curl -X POST "https://api.linktoany.com/unified/{accountId}/customer" \
-H "accept: application/json" \
-H "authorization: Bearer ak_<your_api_key>" \
-H "content-type: application/json" \
-d '{"externalId":"cus_8Kz2n41","name":"Harvest Market Ltd.","firstName":"Elena","lastName":"Chen","email":"elena@harvestmarket.com","phone":"+1 415 555 0134","companyName":"Harvest Market Ltd.","notes":"Wholesale account, NET-30 terms.","address":{"line1":"210 Mission St","city":"San Francisco","state":"CA","postalCode":"94105","country":"US"},"active":true,"currencyCode":"USD"}'await client.records.create(accountId, 'customer', {
externalId: 'cus_8Kz2n41',
name: 'Harvest Market Ltd.',
firstName: 'Elena',
lastName: 'Chen',
email: 'elena@harvestmarket.com',
phone: '+1 415 555 0134',
companyName: 'Harvest Market Ltd.',
notes: 'Wholesale account, NET-30 terms.',
address: {
line1: '210 Mission St',
city: 'San Francisco',
state: 'CA',
postalCode: '94105',
country: 'US'
},
active: true,
currencyCode: 'USD'
});Supported systems
| System | Read | Write | Auth | Rate limit |
|---|---|---|---|---|
| Xero | Yes | Yes | OAuth 2.0 | 1 req / s |
| QuickBooks Online | Yes | Yes | OAuth 2.0 | 10 req / s · 100 req / min |
| Cin7 Core | — | Yes | API key | 10 req / s · 100 req / min |