# Posted Customer Credit Memos _(Realtime-enabled)_

`GET` _(Table: EONE Posted Ledger Doc)_

```
eOne/core/v1.0/postedCustomerCreditMemos
```

Read-only posted customer credit memos as they hit the customer ledger, a **webhook source**: subscribe to be pushed the "credit memo posted" event. Captures both documents posted through a sales/purchase document and through the journal-wrapper endpoint.

## The "posted" event

You are pushed one notification on **postedCustomerCreditMemos** when a credit memo is posted. `integrationId` carries the originating credit memo/order key; `amount`, `remainingAmount` and `status` reflect the credit memo at posting time.

For **live settlement**, how much has been paid and whether it is closed, watch the [postedCustomerPayments](https://eonesolutions.github.io/eone-bc-integration/core-postedCustomerPayments.md) feed, whose `applications` report each credit memo's resulting balance. This feed is the "created" event; the payment feed is settlement truth.

## Subscribing

Register a subscription against the entity set; Business Central notifies your endpoint when a row changes. The notification carries the record id. GET it to read the current values.

```
POST /subscriptions
{
  "resource": "/postedCustomerCreditMemos",
  "notificationUrl": "https://your-endpoint",
  "clientState": "<secret>"
}
```

## Status

`status` is the human-readable settlement state (**Open**, **Partially Settled**, or **Settled**) computed from the ledger entry, so you write status back without interpreting raw open/remaining-amount semantics. `remainingAmount` and `settledAmount` carry the figures behind it.

> **Note:** These feeds are projected from the customer/vendor ledger by a background job (enable **Posted Document Events** on the eOne Integration Setup page). The base ledger tables are not change-tracked, so posting stays fast; notifications arrive on the next projection run.

## Retention

The projection is a short-lived event feed, not a store: rows are purged by the background job once their posting date is older than the configured retention window, **7 days by default** (options 7, 14, 28 on the setup page, or via the `integrationSetup` API). The backfill only seeds documents within that window, and a purge sends subscribers a delete notification. Consume and reconcile within the window.

## Posted Customer Credit Memos 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)_ |
| `integrationId` | Integration Id | Originating credit memo's eOne integration key. _(ro)_ |
| `documentNumber` | Document No. | Posted credit memo document number. _(ro)_ |
| `externalDocumentNumber` | External Document No. | _(ro)_ |
| `customerNumber` | Party No. | Customer the document posted against. _(ro)_ |
| `customerIntegrationId` | Party Integration Id | The customer's eOne integration key. _(ro)_ |
| `postingDate` | Posting Date | _(ro)_ |
| `documentDate` | Document Date | _(ro)_ |
| `dueDate` | Due Date | _(ro)_ |
| `currencyCode` | currencyCode | ISO code; blank is LCY. _(cur)_ |
| `originalAmount` | Original Amount | Credit memo amount at posting time. _(ro)_ |
| `amount` | Amount | _(ro)_ |
| `remainingAmount` | Remaining Amount | Outstanding balance at posting time. _(ro)_ |
| `settledAmount` | Settled Amount | Amount settled at posting time. _(ro)_ |
| `status` | Status | Open, Partially Settled or Settled. _(ro)_ |
| `closedDate` | Closed Date | _(ro)_ |
| `transactionNumber` | Transaction No. | _(ro)_ |
| `createdDateTime` | SystemCreatedAt | _(ro)_ |
| `lastModifiedDateTime` | SystemModifiedAt | Changes here fire the webhook. _(ro)_ |
