# Purchase Return Orders _(Realtime-enabled)_

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

```
eOne/core/v1.0/purchaseReturnOrders
```

Read and write purchase return orders, goods returned to a vendor. The source is the `Purchase Header` filtered to `Document Type = Return Order`, so the document type is stamped for you on insert; you never set it. POST a complete return in one call: the header plus its `purchaseReturnOrderLines` as a child collection (deep insert). The store key round-trips through `integrationId`.

## Resolve the vendor

Three ways to point a return at a vendor, in addition to the native `vendorNumber` (Buy-from Vendor No.): set `vendorIntegrationId` to look the vendor up by its [Integration Id](https://eonesolutions.github.io/eone-bc-integration/integration-id.md) and have Business Central fill `vendorNumber` for you. See [resolver fields](https://eonesolutions.github.io/eone-bc-integration/resolvers.md) for how this pattern works. If `vendorIntegrationId` matches no vendor, the call errors.

## Currency translation

`currencyCode` is translated, not stored verbatim: the local currency reads back as blank LCY and an ISO code maps to the matching Business Central currency. Send the ISO code (e.g. `"USD"`) for a foreign currency, or blank/omit it for the company's local currency.

## Create a return order

`POST` `/purchaseReturnOrders`

```
{
  "vendorIntegrationId": "VEND-001",
  "vendorAuthorizationNumber": "RMA-7788",
  "purchaseReturnOrderLines": [
    { "itemNumber": "1000", "quantity": 2, "directUnitCost": 15.00 }
  ]
}
```

## Bound actions

`release` performs a manual release and `reopen` returns a released document to Open. `post` ships and invoices the return. It posts the return shipment *and* the credit memo in one step.

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

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

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

> **Caution:** `post` sets both `Ship` and `Invoice` and runs Purch.-Post, producing posted documents you can no longer edit through this endpoint. Inspect the result via [posted documents](https://eonesolutions.github.io/eone-bc-integration/posted-documents.md).

> **Note:** Line totals (`amountExcludingTax`, `amountIncludingTax`, `netAmount`) and the header `totalAmountExcludingTax` / `totalAmountIncludingTax` are calculated and read-only, Business Central sums the lines.

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

## Purchase Return Orders 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 | Your external key. |
| `vendorAuthorizationNumber` | Vendor Authorization No. | RMA / vendor authorization reference. |
| `vendorCrMemoNumber` | Vendor Cr. Memo No. | Supplier's own credit-memo reference for the return. Business Central requires it before a return order can be invoiced, so the post action fails without it. |
| `vendorNumber` | Buy-from Vendor No. | Buy-from vendor; the document's vendor. |
| `vendorName` | Buy-from Vendor Name | _(ro)_ |
| `vendorIntegrationId` | vendorIntegrationId | Resolves the vendor by Integration Id and sets vendorNumber. _(res)_ |
| `postingDate` | Posting Date |  |
| `documentDate` | Document Date |  |
| `currencyCode` | currencyCode | ISO code; blank = local currency (LCY translated). _(cur)_ |
| `paymentTermsCode` | Payment Terms Code |  |
| `reasonCode` | Reason Code | Supplementary source code used to trace this document. |
| `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 | Calculated from lines. _(ro)_ |
| `totalAmountIncludingTax` | totalAmountIncludingTax | Calculated from lines. _(ro)_ |
| `lastModifiedDateTime` | SystemModifiedAt | _(ro)_ |

## Related pages

Collections nested under this endpoint:

- [Purchase Return Order Lines](https://eonesolutions.github.io/eone-bc-integration/core-purchaseReturnOrderLines.md)
