# Purchase Credit Memo Lines _(Realtime-enabled)_

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

```
eOne/core/v1.0/purchaseCreditMemoLines
```

The line items of a purchase credit memo, one row per item, G/L account, resource, or charge, carrying quantity, unit price, line discount, location, and dimensions. Deep-insertable when you create the document.

## Nested under the document

These lines belong to a single purchase credit memo. Write them nested at `/purchaseCreditMemos(<id>)/purchaseCreditMemoLines`, or **deep-insert** the whole purchase credit memo in one `POST`. The parent key is stamped onto each line for you, so you never send it. `sequence` (the Business Central line number) is optional: omit it and each line takes the next number (10000, 20000, …) in the order sent; supply it only to target or re-order a specific line.

## Set the item without a lookup

`itemNumber` writes the line's item by its Business Central number, a [resolver](https://eonesolutions.github.io/eone-bc-integration/resolvers.md) shortcut, an alternative to wiring the line `type` and number by hand. `type` selects what the line points at (item, G/L account, resource, charge, or comment). The eight `shortcutDimension{1..8}Code` columns are writable per line. See [Dimensions](https://eonesolutions.github.io/eone-bc-integration/dimensions.md).

> **Note:** `binCode` is honoured only on **non-directed, Bin-Mandatory** locations. Directed put-away & pick (full WMS) locations are handled through the warehouse documents, not here.

> **Note:** Revenue/expense **deferral** is exposed with flat `deferralCode` / `deferralAmount` / `deferralStartDate` / `numberOfPeriods` columns: set `deferralCode` to attach Business Central's deferral template to the line. The resulting schedule is engine-managed. Do not write the per-period rows directly.

## Purchase Credit Memo Lines 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)_ |
| `documentNumber` | Document No. | Parent credit memo number; stamped automatically. _(ro)_ |
| `documentId` | documentId | GUID of the parent credit memo. _(ro)_ |
| `integrationId` | EONE Integration Id | Your external key for the line. |
| `sequence` | Line No. | Line ordering within the document. |
| `lineType` | Type | Line type (e.g. Item, G/L Account). |
| `lineObjectNumber` | No. | The number of the item, account, etc. for the line type. |
| `itemNumber` | itemNumber | Convenience setter: forces Type = Item and sets No. _(res)_ |
| `description` | Description |  |
| `description2` | Description 2 |  |
| `unitOfMeasureCode` | Unit of Measure Code |  |
| `quantity` | Quantity |  |
| `directUnitCost` | Direct Unit Cost |  |
| `discountAmount` | Line Discount Amount |  |
| `discountPercent` | Line Discount % |  |
| `amountExcludingTax` | Line Amount | _(ro)_ |
| `taxCode` | Tax Group Code |  |
| `taxPercent` | VAT % | _(ro)_ |
| `amountIncludingTax` | Amount Including VAT | _(ro)_ |
| `netAmount` | Amount | _(ro)_ |
| `invoiceDiscountAllocation` | Inv. Discount Amount | Invoice discount amount allocated to the line. _(ro)_ |
| `netTaxAmount` | netTaxAmount | Tax on the net line amount (amount including tax minus net amount). _(ro)_ |
| `itemVariantCode` | Variant Code |  |
| `locationCode` | Location Code |  |
| `locationIntegrationId` | locationIntegrationId | Resolve the line location by its Integration Id instead of locationCode. See locations. _(res)_ |
| `binCode` | Bin Code | Bin at the line location. Applies only at non-directed Bin Mandatory locations; directed (WMS) locations assign bins on warehouse documents. |
| `itemReferenceNumber` | Item Reference No. | Item cross-reference for the line: a barcode (UPC/EAN/GTIN) or customer/vendor item number. See item references. |
| `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)_ |
| `deferralCode` | deferralCode | Assigns a Business Central deferral template to this line so the amount is recognized across multiple periods; Business Central generates the schedule from the template. Clear it to remove the schedule. The line must post to G/L (Item, G/L Account, Resource, Charge, Fixed Asset). |
| `deferralAmountToDefer` | deferralAmountToDefer | Optional override of the total amount to defer for this line; defaults to the line amount. Only applies when deferralCode is set. |
| `deferralStartDate` | deferralStartDate | Optional override of the first period's posting date; defaults from the template and the document posting date. Only applies when deferralCode is set. |
| `deferralNoOfPeriods` | deferralNoOfPeriods | Optional override of the number of periods the amount is spread over; defaults from the template. Only applies when deferralCode is set. |
| `deferralCalcMethod` | deferralCalcMethod | Read-only. How the amount is distributed across periods, taken from the deferral template. Assign a different template to change it. _(ro)_ |
| `deferralScheduleDescription` | deferralScheduleDescription | Read-only description of the generated deferral schedule. _(ro)_ |
| `lastModifiedDateTime` | SystemModifiedAt | _(ro)_ |

## Related pages

Nested under [Purchase Credit Memos](https://eonesolutions.github.io/eone-bc-integration/core-purchaseCreditMemos.md).
