# Customers _(Realtime-enabled)_

`GET` `POST` `PATCH` `DELETE` _(Table: Customer)_

```
eOne/core/v1.0/customers
```

Read and write the customer master. Resolve a customer by its number or by `integrationId`.

## Create

`POST` `/customers`

```
{
  "displayName": "Contoso Ltd",
  "integrationId": "CRM-5567",
  "currencyCode": "USD"
}
```

`currencyCode` takes an ISO code; Business Central stores the local currency as a blank code and the endpoint translates both ways.

> **Caution:** PATCHing `number` **renames** the customer (carrying its ledger history) rather than creating a new one.

## Salesperson

`salespersonCode` gives you the code only. Expand `salesperson` to read the assigned rep's name, job title, commission percentage, phone number, email, and `integrationId` inline, so SmartConnect can map the rep onto an order or a CRM record without a second call to [Salespersons/Purchasers](https://eonesolutions.github.io/eone-bc-integration/core-salespersonPurchasers.md):

```
GET /customers(<id>)?$expand=salesperson
```

The relation is one-to-one and follows the customer's `salespersonCode`, so `salesperson` comes back empty when the customer has no rep assigned. It is read-only: assign the rep by writing `salespersonCode` on the customer, and maintain the salesperson record itself on its own endpoint.

## Customs identifiers

Cross-border shipping needs the customer identified to customs, not only to the tax authority. Two columns cover it:

- `taxRegistrationNumber`: the customer's VAT registration number.
- `eoriNumber`: the customer's EORI (Economic Operators Registration and Identification) number, the identifier a business trading with or through the EU and UK is registered under.

Both are plain standard Business Central fields with no validation beyond length, so an invalid number is accepted and only rejected downstream by the carrier. Leave `eoriNumber` blank for domestic-only customers. A carrier's commercial invoice is normally assembled from these two plus the order's `transactionType` / `transportMethod` / `vatCountryRegionCode` (see [Sales Orders](https://eonesolutions.github.io/eone-bc-integration/core-salesOrders.md)) and the item's `tariffNo` / `countryRegionOfOriginCode` (see [Items](https://eonesolutions.github.io/eone-bc-integration/core-items.md)).

> **Note:** Dimension columns `shortcutDimension1Code`–`8Code` are writable here — see [Dimensions](https://eonesolutions.github.io/eone-bc-integration/dimensions.md).

## Customers fields

_API column → BC field._

**Legend**

- _(req)_ required on create
- _(res)_ resolver
- _(cur)_ currency-translated
- _(ro)_ read-only
- _(ext)_ added to this endpoint by another extension (BC field name shown; its API column name is not known here)

| API | BC field | Notes |
| --- | --- | --- |
| `id` | SystemId | BC record GUID. _(ro)_ |
| `bcCompanyId` | bcCompanyId | The company this row belongs to - the same GUID that appears in the request URL. Present on every endpoint so a store pooling several companies can keep them apart without relying on which URL it called. _(ro)_ |
| `bcCompanyName` | bcCompanyName | The name of the company this row belongs to. _(ro)_ |
| `number` | No. | Primary key. PATCH renames. |
| `integrationId` | EONE Integration Id | Your external key. |
| `displayName` | Name | Customer name. _(req)_ |
| `name2` | Name 2 |  |
| `type` | Contact Type | Company or Person. |
| `addressLine1` | Address |  |
| `addressLine2` | Address 2 |  |
| `city` | City |  |
| `county` | County |  |
| `countryRegionCode` | Country/Region Code |  |
| `postalCode` | Post Code |  |
| `phoneNumber` | Phone No. |  |
| `email` | E-Mail |  |
| `website` | Home Page |  |
| `salespersonCode` | Salesperson Code |  |
| `currencyCode` | currencyCode | ISO code; blank = LCY. Translated. _(cur)_ |
| `paymentTermsCode` | Payment Terms Code |  |
| `shipmentMethodCode` | Shipment Method Code |  |
| `paymentMethodCode` | Payment Method Code |  |
| `taxLiable` | Tax Liable |  |
| `taxAreaCode` | Tax Area Code |  |
| `taxAreaDisplayName` | taxAreaDisplayName | Display name. _(ro)_ |
| `taxRegistrationNumber` | VAT Registration No. |  |
| `eoriNumber` | EORI Number | Economic Operators Registration and Identification number, the customs identifier a business trading with or through the EU and UK is registered under. Together with taxRegistrationNumber it is what a carrier's commercial invoice and customs declaration need for a cross-border consignment; leave it blank for domestic-only customers. |
| `genBusPostingGroup` | Gen. Bus. Posting Group |  |
| `customerPostingGroup` | Customer Posting Group |  |
| `vatBusPostingGroup` | VAT Bus. Posting Group |  |
| `primaryContactNo` | Primary Contact No. |  |
| `contactName` | Contact |  |
| `locationCode` | Location Code | Default location. |
| `blocked` | Blocked |  |
| `pricesIncludingVAT` | Prices Including VAT |  |
| `customerPriceGroup` | Customer Price Group |  |
| `customerDiscGroup` | Customer Disc. Group |  |
| `allowLineDisc` | Allow Line Disc. |  |
| `invoiceDiscCode` | Invoice Disc. Code |  |
| `creditLimit` | Credit Limit (LCY) |  |
| `balance` | Balance (LCY) | _(ro)_ |
| `balanceDue` | Balance Due (LCY) | Overdue amount. _(ro)_ |
| `privacyBlocked` | Privacy Blocked |  |
| `languageCode` | Language Code |  |
| `mobilePhoneNo` | Mobile Phone No. |  |
| `gln` | GLN | Global Location Number. |
| `registrationNumber` | Registration Number |  |
| `partnerType` | Partner Type | Company or Person. |
| `shippingAgentCode` | Shipping Agent Code |  |
| `shippingAgentServiceCode` | Shipping Agent Service Code |  |
| `shippingAdvice` | Shipping Advice | Partial or Complete. |
| `combineShipments` | Combine Shipments |  |
| `territoryCode` | Territory Code |  |
| `responsibilityCenter` | Responsibility Center |  |
| `shortcutDimension1Code` | shortcutDimension1Code | See Dimensions. |
| `shortcutDimension2Code` | shortcutDimension2Code | See Dimensions. |
| `shortcutDimension3Code` | shortcutDimension3Code | Shortcut dimension 3. See Dimensions. |
| `shortcutDimension4Code` | shortcutDimension4Code | Shortcut dimension 4. See Dimensions. |
| `shortcutDimension5Code` | shortcutDimension5Code | Shortcut dimension 5. See Dimensions. |
| `shortcutDimension6Code` | shortcutDimension6Code | Shortcut dimension 6. See Dimensions. |
| `shortcutDimension7Code` | shortcutDimension7Code | Shortcut dimension 7. See Dimensions. |
| `shortcutDimension8Code` | shortcutDimension8Code | Shortcut dimension 8. See Dimensions. |
| `createdDateTime` | SystemCreatedAt | _(ro)_ |
| `lastModifiedDateTime` | SystemModifiedAt | _(ro)_ |

## Related pages

Collections nested under this endpoint:

- [Customer Salesperson](https://eonesolutions.github.io/eone-bc-integration/core-salesperson.md)
- [Ship-to Addresses (customer)](https://eonesolutions.github.io/eone-bc-integration/core-shipToAddresses.md)
