API ReferenceRestaurant
Customer · customer
Portable restaurant customer contract. firstName and lastName are optional for read portability, but Square and Clover write targets require a given name.
Entity type:
customer· Methods: GET · POST
Portable restaurant customer contract. firstName and lastName are optional for read portability, but Square and Clover write targets require a given name.
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 name for the customer. |
firstName | string | — | Given name. Required by some target systems such as Square and Clover. |
lastName | string | — | Family name. |
email | string · email | — | Primary email address. |
phone | string | — | Primary phone number. |
companyName | string | — | Business or company name when available. |
notes | string | — | Customer note or memo. |
address | object | — | Primary address when available. |
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. |
marketingAllowed | boolean | — | Whether the customer permits marketing communications when the source exposes it. |
Example object
{
"externalId": "cus_51b8d02",
"name": "Priya Natarajan",
"firstName": "Priya",
"lastName": "Natarajan",
"email": "priya@example.com",
"phone": "+1 646 555 0102",
"marketingAllowed": true
}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://dev.flow.staging.linktoany.com/api/1.0/standalone-link-engine-service/unified/{accountId}/customer?mappingKey={readKey}&pageSize=50" \
-H "authorization: Bearer <token>"curl -X POST "https://dev.flow.staging.linktoany.com/api/1.0/standalone-link-engine-service/unified/{accountId}/customer?mappingKey={writeKey}" \
-H "authorization: Bearer <token>" \
-H "content-type: application/json" \
-d '{"externalId":"cus_51b8d02","name":"Priya Natarajan","firstName":"Priya","lastName":"Natarajan","email":"priya@example.com","phone":"+1 646 555 0102","marketingAllowed":true}'Supported systems
| System | Read | Write | Auth | Rate limit |
|---|---|---|---|---|
| Square | Yes | Yes | OAuth 2.0 | 5 req / s |
| Clover (Asia Pacific) | Yes | Yes | API token | 5 req / 6s |
| Clover (US) | Yes | Yes | API token | 10 req / s · 100 req / min |