# Warehouse Receipts

`GET` _(Table: Warehouse Receipt Header)_

```
eOne/core/v1.0/warehouseReceipts
```

The inbound mirror of [warehouse shipments](https://eonesolutions.github.io/eone-bc-integration/core-warehouseShipments.md), receive purchase orders through a warehouse, or carry a van's pickup run, then post the receipt.

> **Caution:** As with shipments, you do not POST a receipt here, create one with the `createWarehouseReceipt` action on a [purchase order](https://eonesolutions.github.io/eone-bc-integration/core-purchaseOrders.md), or `createPickupLoad` on a [sales return order](https://eonesolutions.github.io/eone-bc-integration/core-salesReturnOrders.md).

## How a receipt is created

Release the purchase order, then call the action. The order's **location must have Require Receive enabled**, or the call errors:

```
POST /purchaseOrders(<id>)/Microsoft.NAV.release
POST /purchaseOrders(<id>)/Microsoft.NAV.createWarehouseReceipt
```

The response redirects to the new `warehouseReceipt`. GET it and `$expand=warehouseReceiptLines` to see what is expected.

## A receipt is also the inbound vehicle load

In the own-fleet route model a vehicle's load **is** a warehouse document: a [warehouse shipment](https://eonesolutions.github.io/eone-bc-integration/core-warehouseShipments.md) when the van delivers, and a **warehouse receipt** when it picks up. `createPickupLoad` on a sales return order assembles several released return orders into one receipt and stamps the route onto it, so a pickup run needs no separate run or trip entity.

`$expand=routeStops` for the ordered collections on the run. See [Route Stops](https://eonesolutions.github.io/eone-bc-integration/core-routeStops.md).

### Fields the route model needs, and where they come from

Business Central gives the warehouse *shipment* header a shipping agent, a shipping agent service, and a shipment date. The **receipt header has none of them** (its posting date is a general-ledger date, not a date of handling) so eOne adds the equivalents:

| Column | What it carries |
| --- | --- |
| `integrationId` | the planner's route or trip id for this load |
| `shippingAgentCode` / `shippingAgentServiceCode` | the vehicle collecting the load |
| `receiptDate` | the route date the load is collected on |
| `totalWeight` / `totalVolume` | rollups of the receipt lines, for vehicle capacity |

`totalWeight` and `totalVolume` are in the company's mass and volume units. Business Central carries no unit on the value, so map them to whatever unit the planner expects.

> **Note:** These columns are read-only here. The route planner sets them through `createPickupLoad`; a warehouse user sees them on the native Warehouse Receipt page, together with the route stops, but does not edit them. Route data is integration-owned.

## Bound actions

Invoke with `POST /warehouseReceipts(<id>)/Microsoft.NAV.<action>`:

- `post`: receives the whole document. Returns `204` rather than redirecting, because one receipt can post several source documents.

```
POST /warehouseReceipts(<id>)/Microsoft.NAV.post
```

`$expand=warehouseReceiptLines` to see the expected lines and trace each back to its source order. See [Warehouse Receipt Lines](https://eonesolutions.github.io/eone-bc-integration/core-warehouseReceiptLines.md).

## Warehouse Receipts 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. | Warehouse receipt number. _(ro)_ |
| `integrationId` | EONE Integration Id | eOne integration external identifier. For a pickup/route load this carries the external planner's route or trip id. _(ro)_ |
| `locationCode` | Location Code | Location the items are received into. _(ro)_ |
| `zoneCode` | Zone Code | _(ro)_ |
| `binCode` | Bin Code | _(ro)_ |
| `documentStatus` | Document Status | Open / Partially Received / Completely Received. _(ro)_ |
| `assignedUserId` | Assigned User ID | Warehouse employee responsible. _(ro)_ |
| `postingDate` | Posting Date | _(ro)_ |
| `vendorShipmentNumber` | Vendor Shipment No. | The vendor's shipment number; written to the source document on posting. _(ro)_ |
| `shippingAgentCode` | EONE Shipping Agent Code | The vehicle collecting this load, modelled as a shipping agent. The Warehouse Receipt Header has no native carrier field, so eOne carries it. See shippingAgents. _(ro)_ |
| `shippingAgentServiceCode` | EONE Shipping Agent Svc Code | The shipping agent service that identifies the individual vehicle or run. _(ro)_ |
| `receiptDate` | EONE Receipt Date | The route date this pickup load is collected on - the inbound counterpart of a warehouse shipment's shipmentDate. Business Central has no native date of handling on a receipt, so eOne carries it. _(ro)_ |
| `totalWeight` | EONE Total Weight | Sum of the warehouse receipt lines' weight, in the company's mass unit (e.g. kg or lb). No unit is carried on the value — map it to the unit the planner expects. Used for vehicle capacity. _(ro)_ |
| `totalVolume` | EONE Total Volume | Sum of the warehouse receipt lines' cubage, in the company's volume unit. No unit is carried on the value. Used for vehicle capacity. _(ro)_ |
| `createdDateTime` | SystemCreatedAt | _(ro)_ |
| `lastModifiedDateTime` | SystemModifiedAt | _(ro)_ |

## Related pages

Collections nested under this endpoint:

- [Warehouse Receipt Lines](https://eonesolutions.github.io/eone-bc-integration/core-warehouseReceiptLines.md)
- [Route Stops](https://eonesolutions.github.io/eone-bc-integration/core-routeStops.md)
