# Manage Purchase Orders

Purchase orders help you manage inventory replenishment from suppliers. Create orders, track deliveries, and automatically update inventory when products arrive.

## Available Operations

ShipStation provides comprehensive purchase order management through the following endpoints:

### Retrieve Purchase Orders

- **[List & Get Purchase Orders](/purchase-orders/list)** - Retrieve all purchase orders with filtering, or get details for a specific order
  - `GET /v2/purchase_orders` - List purchase orders with pagination
  - `GET /v2/purchase_orders/{purchase_order_id}` - Get detailed information


### Create & Update Orders

- **[Create Purchase Orders](/purchase-orders/create)** - Create new orders to suppliers
  - `POST /v2/purchase_orders` - Create a purchase order with products
- **[Update Purchase Orders](/purchase-orders/update)** - Modify orders and change status
  - `PUT /v2/purchase_orders/{purchase_order_id}` - Update all order details (draft status only)
  - `POST /v2/purchase_orders/{purchase_order_id}/shipping_details` - Update shipping details (open status only)
  - `POST /v2/purchase_orders/{purchase_order_id}/status` - Update order status


### Receive Products

- **[Receive Products](/purchase-orders/receive)** - Record product receipts and update inventory
  - `POST /v2/purchase_orders/{purchase_order_id}/receives` - Receive products from an order


### Print Documents

- **[Purchase Order Documents](/purchase-orders/print-documents)** - Generate PDF documents for purchase orders
  - `GET /v2/purchase_orders/{purchase_order_id}/documents/order_summary` - Print order summary
  - `GET /v2/purchase_orders/{purchase_order_id}/documents/received_summary` - Print received products summary


## Purchase Order Lifecycle

Purchase orders follow a specific workflow:

1. **Create** - Set up a new purchase order with products and supplier information
2. **Order** - Mark as `open` when sent to supplier
3. **Receive** - Record product receipts as they arrive. Automatically marked as `received` when all products are in
4. **Complete** - Marked as `closed` when the purchase order has been fully processed.


### Status Flow

| Status | Description | Next Steps |
|  --- | --- | --- |
| `draft` | Initial state after creation | Review and finalize details, then mark as `open` when sent to supplier and awaiting delivery |
| `open` | Order finalized and ready | Wait for shipment, then use receive endpoint to record arrivals |
| `receiving` | Partially received | Continue receiving remaining products |
| `received` | All products received | Mark as `closed` when no further action needed |
| `cancelled` | Order cancelled | No further action possible |


## Key Features

### Automatic Inventory Updates

When you receive products through the `/receives` endpoint:

- Inventory levels automatically increase at the specified location
- Purchase order status updates based on receipt completion


### Flexible Product Management

- Order multiple products in a single purchase order
- Track costs, supplier SKUs
- Support for lot numbers and expiration dates
- Handle rejected or damaged items


### Supplier Integration

- Link to suppliers via `supplier_id`
- Track carrier and tracking information
- Add custom reference numbers


## Getting Started

### Prerequisites

Before creating purchase orders, you should:

1. Set up your [suppliers](/suppliers/overview) with contact information
2. Configure your [inventory warehouses](/manage-inventory-warehouses)
3. Create [inventory locations](/manage-inventory-locations) where products will be received


### Basic Workflow

1. **Create a Supplier**

```http
POST /v2/suppliers
{
  "supplier_name": "Acme Widgets Inc",
  "supplier_email": "orders@acmewidgets.com"
}
```
2. **Create a Purchase Order**

```http
POST /v2/purchase_orders
{
  "supplier_id": "se-567",
  "products": [
    { "sku": "WIDGET-001", "quantity": 100, "cost": 9.99 }
  ]
}
```
3. **Mark as Ordered**

```http
POST /v2/purchase_orders/se-234/status
{
  "status": "open"
}
```
4. **Receive Products**

```http
POST /v2/purchase_orders/se-234/receives
{
  "product_receives": [
    {
      "sku": "WIDGET-001",
      "inventory_location_id": "se-12345",
      "received_quantity": 100
    }
  ]
}
```
5. **Close Purchase Order**

```http
POST /v2/purchase_orders/se-234/status
{
  "status": "closed"
}
```


## Related Resources

- [Manage Suppliers](/suppliers/overview) - Set up supplier information
- [Manage Inventory Levels](/manage-inventory-levels) - Track inventory after receiving
- [Manage Inventory Locations](/manage-inventory-locations) - Configure receiving locations