# Purchase Credit Memos _(Realtime-enabled)_

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

```
eOne/core/v1.0/purchaseCreditMemos
```

Read and write unposted Purchase Credit Memos. The source is the `Purchase Header` filtered to `Document Type = Credit Memo`, so the document type is stamped for you on insert. You never send it. Mirrors the Purchase Invoices endpoint; POST a full credit memo as a single deep insert with its `purchaseCreditMemoLines`.

## Resolving the vendor

Three ways to point a credit memo at a vendor, all of which set `Buy-from Vendor No.`: send `vendorNumber` directly, send `vendorId`, or send `vendorIntegrationId`, your external key, looked up against the [resolver](https://eonesolutions.github.io/eone-bc-integration/resolvers.md) on the Vendor. An unknown `vendorIntegrationId` is rejected with an error rather than silently ignored. `vendorCrMemoNumber` carries the supplier's own credit-memo reference and is independent of the vendor lookup.

## Deep insert with lines

`POST` `/purchaseCreditMemos`

```
{
  "vendorIntegrationId": "ACME-001",
  "vendorCrMemoNumber": "CR-7781",
  "integrationId": "store-cm-42",
  "purchaseCreditMemoLines": [
    { "itemNumber": "1000", "quantity": 2, "directUnitCost": 50 }
  ]
}
```

## Currency translation

`currencyCode` follows the ISO convention: the blank local currency (LCY) round-trips as the empty string, and a foreign ISO code is translated to and from the Business Central currency code on read and write.

## Bound actions

`release` performs a manual release and `reopen` returns a released credit memo to Open. `post` releases the credit memo on its way through, so use `release` when you want it released and left unposted for a person to check.

`POST` `/purchaseCreditMemos({id})/Microsoft.NAV.release`

The bound action `post` sets `Invoice := true` and runs Purch.-Post, turning the credit memo into a posted document.

`POST` `/purchaseCreditMemos({id})/Microsoft.NAV.post`

`archive` / `cancel` snapshot a version and keep the credit memo open, or archive then delete it (soft delete). See [Archiving & cancelling](https://eonesolutions.github.io/eone-bc-integration/archive.md).

> **Caution:** Posting is irreversible from this endpoint, once posted, the unposted credit memo is gone and the record moves to [posted documents](https://eonesolutions.github.io/eone-bc-integration/posted-documents.md). The header totals (`totalAmountExcludingTax`, `totalTaxAmount`, `totalAmountIncludingTax`) are computed from the lines and are read-only.

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

## Purchase 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; assigned by the number series if omitted. |
| `integrationId` | EONE Integration Id | Your external key. |
| `vendorCrMemoNumber` | Vendor Cr. Memo No. | Supplier's own credit-memo reference. |
| `vendorNumber` | Buy-from Vendor No. | Vendor on the credit memo. |
| `vendorName` | Buy-from Vendor Name | _(ro)_ |
| `vendorIntegrationId` | vendorIntegrationId | Resolves the vendor by its Integration Id. _(res)_ |
| `postingDate` | Posting Date |  |
| `documentDate` | Document Date |  |
| `currencyCode` | currencyCode | ISO code; blank LCY round-trips as the empty string. _(cur)_ |
| `paymentTermsCode` | Payment Terms Code |  |
| `reasonCode` | Reason Code | Supplementary source code used to trace this document. |
| `paymentMethodCode` | Payment Method Code |  |
| `purchaserCode` | Purchaser Code |  |
| `locationCode` | Location Code |  |
| `pricesIncludeTax` | Prices Including VAT |  |
| `buyFromContact` | Buy-from Contact No. | Number of your contact at the vendor. |
| `payToContact` | Pay-to Contact No. | Contact who sends the invoice, when different from the buy-from contact. |
| `payToAddressLine1` | Pay-to Address | Remit-to address of the pay-to vendor. |
| `payToAddressLine2` | Pay-to Address 2 |  |
| `payToCity` | Pay-to City |  |
| `payToCounty` | Pay-to County |  |
| `payToPostCode` | Pay-to Post Code |  |
| `payToCountryRegionCode` | Pay-to Country/Region Code |  |
| `shipToCode` | Ship-to Code | Order-address code selecting a saved receiving address; also used for drop shipment. |
| `shipToName` | Ship-to Name |  |
| `shipToAddressLine1` | Ship-to Address | Address the items are shipped/received to. |
| `shipToAddressLine2` | Ship-to Address 2 |  |
| `shipToCity` | Ship-to City |  |
| `shipToCounty` | Ship-to County |  |
| `shipToPostCode` | Ship-to Post Code |  |
| `shipToCountryRegionCode` | Ship-to Country/Region Code |  |
| `shipToContact` | Ship-to Contact |  |
| `shipmentMethodCode` | Shipment Method Code | Delivery terms (Incoterms), such as FOB, for the receipt. |
| `vatRegistrationNumber` | VAT Registration No. |  |
| `taxLiable` | Tax Liable | Whether this vendor charges you sales tax on purchases. |
| `taxAreaCode` | Tax Area Code | Tax area used to calculate and post sales tax for this purchase. |
| `shortcutDimension1Code` | Shortcut Dimension 1 Code | Shortcut dimension 1. 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 | Computed from lines. _(ro)_ |
| `totalTaxAmount` | totalTaxAmount | Computed from lines. _(ro)_ |
| `totalAmountIncludingTax` | totalAmountIncludingTax | Computed from lines. _(ro)_ |
| `lastModifiedDateTime` | SystemModifiedAt | _(ro)_ |

## Related pages

Collections nested under this endpoint:

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