# Salespersons/Purchasers _(Realtime-enabled)_

`GET` `POST` `PATCH` `DELETE` _(Table: Salesperson/Purchaser)_

```
eOne/core/v1.0/salespersonPurchasers
```

Read and write salesperson and purchaser records. In Business Central salespeople and purchasers share a **single table**, so both kinds of record are exposed through this one entity. There is no separate purchasers endpoint.

Use this when an eOne integration map needs to push sales reps or buyers into Business Central, or stamp them with an external [integrationId](https://eonesolutions.github.io/eone-bc-integration/integration-id.md) for round-tripping.

## The key is `code`, not the id

Although the OData key is `SystemId`, the real primary key of the underlying table is `code`. Send `code` on every create.

`POST` `/salespersonPurchasers`

```
{
  "code": "JR",
  "name": "Jim Reed",
  "integrationId": "CRM-5567"
}
```

> **Caution:** Changing `code` on a PATCH **renames** the record (the underlying row is renamed and its references repointed) rather than creating a new one. This is non-standard. Treat `code` as immutable unless you intend a rename.

## Salespersons/Purchasers 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; the OData key. _(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)_ |
| `code` | Code | The real primary key. Required on create; changing it on PATCH renames the record. |
| `integrationId` | EONE Integration Id | Your external key. |
| `name` | Name | Display name. |
| `jobTitle` | Job Title |  |
| `commissionPercent` | Commission % | Commission percentage. |
| `phoneNumber` | Phone No. |  |
| `email` | E-Mail |  |
| `privacyBlocked` | Privacy Blocked | Blocks the record for privacy/GDPR purposes. |
| `createdDateTime` | SystemCreatedAt | _(ro)_ |
| `lastModifiedDateTime` | SystemModifiedAt | _(ro)_ |
