# Payload Objects

This page documents every payload object schema used by webhook events. Each object is documented once and referenced by the events that use it. See the [Event Catalog](https://docs.partssource.com/documentation/webhooks/event-catalog) for the full list of events and example payloads.

***

## Order

An order with line item and pricing details.

**Used by:** [`order.created`](https://docs.partssource.com/documentation/event-catalog#ordercreated)

| Field               | JSON Key                | Type    | Required | Description                         |
| ------------------- | ----------------------- | ------- | -------- | ----------------------------------- |
| OrderId             | `order_id`              | long    | Yes      | Unique identifier for the order     |
| LineItemId          | `line_item_id`          | long    | Yes      | Unique identifier for the line item |
| PurchaseOrderNumber | `purchase_order_number` | string  | No       | Purchase order number               |
| UnitPrice           | `unit_price`            | decimal | Yes      | Unit price for the line item        |
| Quantity            | `quantity`              | int     | Yes      | Quantity of items ordered           |

## OrderApproval

An order approval submission with status and amount details.

**Used by:** [`order.approval.submitted`](https://docs.partssource.com/documentation/event-catalog#orderapprovalsubmitted)

| Field        | JSON Key        | Type           | Required | Description                         |
| ------------ | --------------- | -------------- | -------- | ----------------------------------- |
| LineItemId   | `line_item_id`  | long           | Yes      | Unique identifier for the line item |
| SubmittedAt  | `submitted_at`  | DateTimeOffset | No       | Date/time when submitted            |
| ApprovalType | `approval_type` | string         | No       | Type of approval required           |
| TotalAmount  | `total_amount`  | decimal        | No       | Total amount requiring approval     |

## OrderLineBackordered

A line item backorder notification with reason details.

**Used by:** [`order.line.backordered`](https://docs.partssource.com/documentation/event-catalog#orderlinebackordered)

| Field           | JSON Key           | Type           | Required | Description                         |
| --------------- | ------------------ | -------------- | -------- | ----------------------------------- |
| LineItemId      | `line_item_id`     | long           | Yes      | Unique identifier for the line item |
| BackorderedAt   | `backordered_at`   | DateTimeOffset | No       | Date/time when backordered          |
| BackorderReason | `backorder_reason` | string         | No       | Reason for backorder                |

## OrderLineNoSale

A line item marked as no sale, with reason details.

**Used by:** [`order.line.nosale`](https://docs.partssource.com/documentation/event-catalog#orderlinenosale)

| Field        | JSON Key         | Type   | Required | Description                         |
| ------------ | ---------------- | ------ | -------- | ----------------------------------- |
| LineItemId   | `line_item_id`   | long   | Yes      | Unique identifier for the line item |
| NoSaleReason | `no_sale_reason` | string | No       | Reason for no sale                  |

## OrderLineEstimatedShipDate

An estimated ship date assignment or update for a line item.

**Used by:** [`order.line.estimated_ship_date.created`](https://docs.partssource.com/documentation/event-catalog#orderlineestimated_ship_datecreated), [`order.line.estimated_ship_date.updated`](https://docs.partssource.com/documentation/event-catalog#orderlineestimated_ship_dateupdated)

| Field                     | JSON Key                       | Type           | Required | Description                         |
| ------------------------- | ------------------------------ | -------------- | -------- | ----------------------------------- |
| LineItemId                | `line_item_id`                 | long           | Yes      | Unique identifier for the line item |
| EstimatedShipDate         | `estimated_ship_date`          | DateTimeOffset | No       | The estimated ship date             |
| PreviousEstimatedShipDate | `previous_estimated_ship_date` | DateTimeOffset | No       | The previous estimated ship date    |
| ReasonDescription         | `reason_description`           | string         | No       | Human-readable reason description   |

## Shipment

A shipment with tracking and delivery details.

**Used by:** [`order.shipment.shipped`](https://docs.partssource.com/documentation/event-catalog#ordershipmentshipped)

| Field                 | JSON Key                  | Type           | Required | Description                         |
| --------------------- | ------------------------- | -------------- | -------- | ----------------------------------- |
| LineItemId            | `line_item_id`            | long           | Yes      | Unique identifier for the line item |
| TrackingNumber        | `tracking_number`         | string         | No       | Shipment tracking number            |
| Carrier               | `carrier`                 | string         | No       | Shipping carrier                    |
| ShippedAt             | `shipped_at`              | DateTimeOffset | No       | Date/time when shipped              |
| EstimatedDeliveryDate | `estimated_delivery_date` | DateTime       | No       | Estimated delivery date             |
