# Sales Credit Memos _(Realtime-enabled)_

`GET` `POST` `PATCH` `DELETE` _(Table: Sales Header)_

```
eOne/core/v1.0/salesCreditMemos
```

Same shape as Sales Invoices, plus two credit-memo-only fields for binding the invoice being credited.

## Apply to the original invoice

Bind the apply-to invoice with either field:

- `appliesToInvoiceNumber`: the Business Central posted-invoice document number.
- `appliesToInvoiceIntegrationId`: your external key; the endpoint looks up the posted invoice (whose Id was threaded on at post time) and sets the apply-to for you.

```
POST /salesCreditMemos
{
  "customerIntegrationId": "CRM-5567",
  "appliesToInvoiceIntegrationId": "SHOP-INV-9001",
  "salesCreditMemoLines": [ { "itemNumber": "1000", "quantity": 1 } ]
}
```

## The work description

`workDescription` is the free-text note on the document, the same text the Work Description box shows on the sales credit memo in Business Central. Send it on create or update and SmartConnect replaces the whole note, send an empty string to clear it, and leave it out to keep what is already there. Every read returns it.

## Bound actions

`release` / `reopen` (reopen returns a released document to Open) and `post` (post redirects to the resulting posted credit memo). `archive` / `cancel` snapshot a version and keep it open, or archive then delete (soft delete). See [Archiving & cancelling](https://eonesolutions.github.io/eone-bc-integration/archive.md).

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

## Sales 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)_ |
| `number` | No. | Document number. |
| `integrationId` | EONE Integration Id | The store's credit-memo external key; round-trips. See Integration Id. |
| `externalDocumentNumber` | External Document No. |  |
| `yourReference` | Your Reference |  |
| `workDescription` | workDescription | The document's free-text work description. Sending it replaces the whole note, an empty string clears it, and omitting it leaves what is already there. |
| `customerNumber` | Sell-to Customer No. | Resolves the sell-to customer. |
| `customerName` | Sell-to Customer Name | _(ro)_ |
| `customerIntegrationId` | customerIntegrationId | Resolver — looks up Customer by its `EONE Integration Id` and sets the sell-to customer. See resolvers. _(res)_ |
| `contactNumber` | Sell-to Contact No. |  |
| `billToCustomerNumber` | Bill-to Customer No. |  |
| `appliesToInvoiceNumber` | Applies-to Doc. No. | Binds the apply-to invoice by BC posted-invoice No.; forces Applies-to Doc. Type = Invoice. _(res)_ |
| `appliesToInvoiceIntegrationId` | appliesToInvoiceIntegrationId | Resolver — looks up the posted Sales Invoice Header by its `EONE Integration Id` and sets the apply-to invoice. See posted documents. _(res)_ |
| `postingDate` | Posting Date |  |
| `documentDate` | Document Date |  |
| `dueDate` | Due Date |  |
| `currencyCode` | currencyCode | ISO currency code; blank LCY is translated to/from the ISO code. _(cur)_ |
| `paymentTermsCode` | Payment Terms Code |  |
| `reasonCode` | Reason Code | Supplementary source code used to trace this document. |
| `paymentMethodCode` | Payment Method Code |  |
| `shipmentMethodCode` | Shipment Method Code |  |
| `pricesIncludeTax` | Prices Including VAT |  |
| `salespersonCode` | Salesperson Code |  |
| `locationCode` | Location Code |  |
| `sellToAddressLine1` | Sell-to Address |  |
| `sellToAddressLine2` | Sell-to Address 2 |  |
| `sellToCity` | Sell-to City |  |
| `sellToCounty` | Sell-to County |  |
| `sellToCountryRegionCode` | Sell-to Country/Region Code |  |
| `sellToPostCode` | Sell-to Post Code |  |
| `phoneNumber` | Sell-to Phone No. |  |
| `email` | Sell-to E-Mail |  |
| `billToName` | Bill-to Name |  |
| `billToAddressLine1` | Bill-to Address |  |
| `billToAddressLine2` | Bill-to Address 2 |  |
| `billToCity` | Bill-to City |  |
| `billToCounty` | Bill-to County |  |
| `billToCountryRegionCode` | Bill-to Country/Region Code |  |
| `billToPostCode` | Bill-to Post Code |  |
| `shipToName` | Ship-to Name |  |
| `shipToAddressLine1` | Ship-to Address |  |
| `shipToAddressLine2` | Ship-to Address 2 |  |
| `shipToCity` | Ship-to City |  |
| `shipToCounty` | Ship-to County |  |
| `shipToCountryRegionCode` | Ship-to Country/Region Code |  |
| `shipToPostCode` | Ship-to Post Code |  |
| `shipToContact` | Ship-to Contact |  |
| `shipToCode` | Ship-to Code | Saved ship-to address code. Setting it (the Alternate option) copies that customer ship-to address onto the document. |
| `shipToOptions` | shipToOptions | Write-only control: Default, Alternate, or Custom. Default copies the sell-to (customer) address into ship-to; Custom clears Ship-to Code so you can write ship-to fields freely; Alternate leaves the current ship-to in place so you can set a shipToCode. Reads back blank. _(res)_ |
| `billToOptions` | billToOptions | Write-only control: set to Customer to copy the sell-to (customer) address into the bill-to fields. Reads back blank. |
| `vatRegistrationNumber` | VAT Registration No. |  |
| `taxLiable` | Tax Liable |  |
| `taxAreaCode` | Tax Area Code |  |
| `genBusPostingGroup` | Gen. Bus. Posting Group | General business posting group. Defaults from the sell-to customer when the customer is resolved; set it only to override the customer's configured posting setup for this document. |
| `vatBusPostingGroup` | VAT Bus. Posting Group |  |
| `shortcutDimension1Code` | Shortcut Dimension 1 Code | See dimensions. |
| `shortcutDimension2Code` | Shortcut Dimension 2 Code | Shortcut dimension 2. See Dimensions. |
| `shortcutDimension3Code` | EONE Shortcut Dim 3 Code | Shortcut dimension 3. See Dimensions. |
| `shortcutDimension4Code` | EONE Shortcut Dim 4 Code | Shortcut dimension 4. See Dimensions. |
| `shortcutDimension5Code` | EONE Shortcut Dim 5 Code | Shortcut dimension 5. See Dimensions. |
| `shortcutDimension6Code` | EONE Shortcut Dim 6 Code | Shortcut dimension 6. See Dimensions. |
| `shortcutDimension7Code` | EONE Shortcut Dim 7 Code | Shortcut dimension 7. See Dimensions. |
| `shortcutDimension8Code` | EONE Shortcut Dim 8 Code | Shortcut dimension 8. See Dimensions. |
| `dimensionSetId` | Dimension Set ID | The dimension set this record carries. Join it to the dimensionSetEntries endpoint to resolve the full set of dimension codes and values, including any beyond the eight shortcut dimension columns. _(ro)_ |
| `status` | Status | _(ro)_ |
| `totalAmountExcludingTax` | totalAmountExcludingTax | Calculated from lines. _(ro)_ |
| `totalTaxAmount` | totalTaxAmount | Calculated from lines. _(ro)_ |
| `totalAmountIncludingTax` | totalAmountIncludingTax | Calculated from lines. _(ro)_ |
| `lastModifiedDateTime` | SystemModifiedAt | _(ro)_ |

## Related pages

Collections nested under this endpoint:

- [Sales Credit Memo Lines](https://eonesolutions.github.io/eone-bc-integration/core-salesCreditMemoLines.md)
