# Integration Setup

`GET` _(Table: EONE Integration Setup)_

```
eOne/core/v1.0/integrationSetups
```

Read and write the single eOne Integration Setup record over the API, flip the feature switches (Ledger Documents, Bank / G/L Entries, Expenses, Raw Journals, Inventory Adjustments, Warehouse, Item Availability), Posted Document Events + retention, and the shipping Fulfilment Mode without driving the UI. Built primarily for automated configuration and testing.

## A configuration singleton

`integrationSetups` returns exactly one row. PATCH it to change a setting; the same behavioural side effects as the setup page apply (jobs are re-scheduled, snapshots re-projected). For example, enable the posting-event feeds and set a 14-day retention:

```
PATCH /integrationSetups(<id>)
{ "postedDocEventsEnabled": true, "postedDocRetention": "Days14" }
```

The per-endpoint processing config and archive/cancel enablement are their own writable APIs, [endpointSetups](https://eonesolutions.github.io/eone-bc-integration/core-endpointSetups.md) and [documentArchiveSettings](https://eonesolutions.github.io/eone-bc-integration/core-documentArchiveSettings.md).

`bankGLEntriesEnabled` is the switch for [bankGLEntries](https://eonesolutions.github.io/eone-bc-integration/core-bankGLEntries.md) and its lines. It is separate from `ledgerDocumentsEnabled`, which covers the party-facing wrappers only, so a harness standing up a bank/G/L company sets that one field rather than turning ledger documents on for it.

`fulfilmentMode` decides what `markShipped` on [salesOrders](https://eonesolutions.github.io/eone-bc-integration/core-salesOrders.md) does after stamping the carrier details, record only, release the order, or post the ship (the default). It lives here rather than on `endpointSetups` because it is not a staged journal-wrapper document: there is no journal, approval, or background job behind it. See [Shipping & dispatch](https://eonesolutions.github.io/eone-bc-integration/shipping-dispatch.md).

> **Note:** The licensing fields are deliberately **not** exposed here. A subscription token is a secret, so licensing stays a provisioning concern, not an API write.

## Integration Setup 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)_ |
| `ledgerDocumentsEnabled` | Ledger Docs Enabled | Whether this company imports party-facing ledger documents (customer/vendor/employee payments, refunds, credit memos, invoices). Off blocks those endpoints and their pages. Bank/G/L entries have their own switch. |
| `bankGLEntriesEnabled` | Bank GL Entries Enabled | Whether this company imports bank/G/L entries - party-less journal documents for bank fees, accruals and adjustments. Off blocks the bankGLEntries endpoint and its bankGLEntryLines collection. |
| `expensesEnabled` | Expenses Enabled | Whether this company imports employee expenses. Off blocks the expenses endpoints and the Expense pages; the employees master feed is unaffected. |
| `rawJournalsEnabled` | Raw Journals Enabled | Whether this company accepts general journal lines written straight through the journals endpoints, with no staged document in front of them. |
| `inventoryAdjustmentsEnabled` | Inv. Adjustments Enabled | Whether this company imports inventory adjustments. Off blocks the inventoryAdjustments endpoints and the Inventory Adjustments pages. |
| `warehouseEnabled` | Warehouse Enabled | Whether the integration may create and post warehouse shipments and receipts. Reading the warehouse feeds is always allowed, so this gates only the post, createWarehouseShipment and createWarehouseReceipt actions. |
| `availabilityEnabled` | Availability Enabled | Whether the item availability snapshot is maintained. Doubles as the Item Availability feature switch: off also blocks the availability feed and query, because a dormant snapshot would keep serving the figures it held when it was switched off. |
| `availabilityGranularity` | Availability Granularity | Per location or company-wide. |
| `availabilityBasis` | Availability Basis | Formula for the published Available Quantity. |
| `includeBlockedItems` | Include Blocked Items | Whether blocked items appear in the availability snapshot. |
| `includeInTransitLocations` | Include In-Transit Locations | Whether in-transit locations are included (per-location mode). |
| `includeBlankLocation` | Include Blank Location | Whether blank-location inventory is published as its own row. |
| `rejectDuplicateIntegrationIds` | Reject Duplicate Integr. Ids | Whether a payment, refund, credit memo, invoice, expense or bank/G/L entry is rejected when its integrationId already belongs to a staged or processed document. On by default, so a retried call cannot create a second financial document. |
| `rejectDuplicateDocuments` | Reject Duplicate Documents | Whether a sales or purchase document is rejected when its integrationId is already on an open document of the same type, or on a document that type has been posted into. On by default, so a retried call cannot create a second order. |
| `postedDocEventsEnabled` | Posted Doc Events Enabled | Whether posted customer/vendor/employee documents are projected for the posting-event webhook feeds. |
| `postedDocsIdOnly` | Posted Docs Id Only | Whether only posted documents that carry an Integration Id are projected. |
| `postedDocRetention` | Posted Doc Retention | How long a projected posted-document row is kept before purge (7, 14 or 28 days). |
| `docEventsEnabled` | Doc Events Enabled | Whether named document-lifecycle events are recorded and published on the documentEvents webhook feed. |
| `docStatusEventsEnabled` | Doc Status Events Enabled | Whether posted-document status events (closed on full application, reopened on unapplication) are also recorded. Requires Document Events. |
| `docEventRetention` | Doc Event Retention | How long a document-event row is kept before the daily purge removes it (7, 14 or 28 days). |
| `fulfilmentMode` | Fulfilment Mode | What the markShipped action on salesOrders does after stamping the carrier details: Record Only (stamp and stop), Release Order (stamp, then release so a user or a later post ships it), or Post Shipment (stamp, then post the ship only - the default). Not on endpointSetups because it is not a staged journal-wrapper document; it needs no journal, approval, or background job. |
| `lastModifiedDateTime` | SystemModifiedAt | _(ro)_ |
