---
title: "Create ERP Purchase Order Receipt"
method: POST
path: "/erp/purchase-order-receipts"
tags: ["erp", "Purchase Order Receipts"]
---

# Create ERP Purchase Order Receipt

`POST /erp/purchase-order-receipts`

## Request

- Base URL: `https://production.trackstarhq.com`
- URL: `https://production.trackstarhq.com/erp/purchase-order-receipts`
- Auth: none required

Records a goods-receipt event against an existing purchase order. The
parent purchase order is identified by `purchase_order_id` in the
request body. Get the required, optional, and integration specific
fields by calling the [integrations](/api-reference/mgmt/integrations)
endpoint.

## Headers

- `x-trackstar-api-key` string, required
- `x-trackstar-access-token` string, required
- `Idempotency-Key` string

## Request body

- CreateerpPurchaseOrderReceiptInputSchema
  - `trackstar_tags` unknown[], nullable: A list of custom tags associated with the resource. A tag can be either a string or a dictionary with one key-value pair.
    - unknown
  - `purchase_order_id` string, required: ID of the parent purchase order this receipt records against.
  - `line_items` ErpPurchaseOrderReceiptCreateLineItemlinnworks[], required: Items included in this receipt. Splits into one entry per (item, lot, bin) triple — a 100-unit receipt of one item booked into two lots (60 + 40) across two bins emits one entry per (lot, bin).
    - `line_item_id` string, required
    - `item_id` string, required
    - `quantity` number, required

## Response `200`

Successful response

- ErpCreatePurchaseOrderReceiptResponse
  - `data` CreateErpPurchaseOrderReceiptResponseDataSchema
    - `id` string, required: The unique ID of the receipt transaction in the ERP.
    - `purchase_order_id` string, required: ID of the parent purchase order this receipt records against.
    - `created_date` string, date-time, required: The date the purchase order receipt was created.
    - `updated_date` string, date-time, required: The date the purchase order receipt was last updated.
    - `receipt_number` string, nullable, required: The user-facing identifier of the receipt as assigned by the ERP.
    - `received_date` string, date-time, required: Date the receipt was recorded in the ERP.
    - `location_id` string, nullable, required: ID of the location the receipt was booked into.
    - `notes` string[], required: List of free-form notes recorded on the receipt.
    - `line_items` ErpPurchaseOrderReceiptLineItem[], required: Items included in this receipt. Splits into one entry per (item, lot, bin) triple — a 100-unit receipt of one item booked into two lots (60 + 40) across two bins emits one entry per (lot, bin).
      - `receipt_line_item_id` string, required: ID of the line within the receipt record.
      - `line_item_id` string, nullable, required: ID of the source purchase-order line that this receipt line fulfills. Joins back to the parent purchase order's `line_items[*].line_item_id`. Null when the ERP doesn't expose the link.
      - `item_id` string, required: ID of the inventory item received.
      - `sku` string, required: SKU / item number of the item received.
      - `quantity` number, required: Quantity received on this line.
      - `lot_id` string, nullable, required: ID of the lot this line was booked into. Null for non-lot-tracked items.
      - `lot_name` string, nullable, required: Human-readable name of the lot this line was booked into.
      - `expiration_date` string, date-time, nullable, required: Expiration date of the lot this line was booked into.
      - `bin_id` string, nullable, required: ID of the bin this line was booked into. Null for non-bin-tracked items.
      - `bin_name` string, nullable, required: Human-readable name of the bin this line was booked into.
    - `custom_fields` object, required: Per-account custom fields defined on the purchase order receipt. Keys are the field names as defined in the ERP; each value carries the raw value, its declared type, and a human-readable label.
    - `external_system_url` string, nullable, required: URL link to the purchase order receipt in the external system (WMS/Freight etc).
    - `trackstar_tags` unknown[], nullable, required: A list of custom tags associated with the resource. A tag can be either a string or a dictionary with one key-value pair.
      - unknown
    - `additional_fields` object, required: Integration-specific fields
    - `trackstar_created_date` string, date-time, required
    - `trackstar_updated_date` string, date-time, required
  - `id` string, required: The ID of the object that has been created or modified
  - `unused_fields` string[], required: Unused fields

## Other responses

- `422`: Validation error

## Changes

- **2026-11-03** `f9f948f2a7b3`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/trackstarhq/apis/trackstar-api/changes/erp/purchase-order-receipts/post.md)

---

[API](https://skmtc.dev/trackstarhq/apis/trackstar-api.md) - [All operations](https://skmtc.dev/trackstarhq/apis/trackstar-api/llms.txt) - [OpenAPI document](https://skmtc.dev/trackstarhq/apis/trackstar-api/revisions/08647f790594?raw)
