> This page is for version Experimental.
> For other versions, use one of these documentation indexes:
> - 2026-07 (default): https://developer-stage.shipbob.dev/2026-07/llms.txt
> - 2026-01: https://developer-stage.shipbob.dev/2026-01/llms.txt
> - 2025-07: https://developer-stage.shipbob.dev/2025-07/llms.txt
> - v2.0: https://developer-stage.shipbob.dev/v2.0/llms.txt
> - v1.0: https://developer-stage.shipbob.dev/v1.0/llms.txt
> - Experimental: https://developer-stage.shipbob.dev/experimental/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developer-stage.shipbob.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer-stage.shipbob.dev/_mcp/server.

# Get Purchase Order


GET https://sandbox-api.shipbob.com/Experimental/purchase-orders/{id}

Returns the purchase order and its line items. Responds 404 when it does not exist or belongs to another merchant.


Reference: https://developer-stage.shipbob.dev/experimental/api/receiving/get-purchase-order

## Authentication

- `Authorization` header (bearer token, required) — Authentication using Personal Access Token (PAT) token
- `Authorization` header (bearer token, required) — OAuth2 authentication using JWT tokens

## Request

### Path parameters

- `id` (long, required) — Id of the purchase order

## Response

### 200

OK

- `created_at` (datetime, optional) — When the purchase order was created (UTC).
- `external_reference` (string, optional, nullable) — The merchant's own reference, unique among the merchant's non-cancelled purchase orders.
- `line_items` (list of Receiving.V3.PurchaseOrderLineItemViewModel, optional, nullable) — The expected line items.
- `notes` (string, optional, nullable) — Free-text notes.
- `purchase_order_id` (long, optional) — Unique id of the purchase order.
- `status` (Receiving.V3.PurchaseOrderStatusViewModel, optional) — A purchase order status.
- `supplier` (Receiving.V3.PurchaseOrderSupplierViewModel, optional, nullable) — The supplier, or null when none is set.
- `updated_at` (datetime, optional) — When the purchase order was last changed (UTC).

## Errors

### 401 Unauthorized Error

Authorization missing or invalid

- `any`

### 403 Forbidden Error

The provided credentials are not authorized to access this resource

- `any`

### 404 Not Found Error

Not Found

- `detail` (string, optional, nullable)
- `instance` (string, optional, nullable)
- `status` (integer, optional, nullable)
- `title` (string, optional, nullable)
- `type` (string, optional, nullable)

## Types

### Receiving.V3.PurchaseOrderLineItemViewModel

An expected line item on a purchase order.

- `description` (string, optional, nullable) — Free-text description.
- `expiration_date` (date, optional, nullable) — Lot expiration date.
- `external_sku` (string, optional, nullable) — The merchant's SKU for the item.
- `inventory_id` (integer, optional, nullable) — ShipBob inventory id, when known.
- `lot_number` (string, optional, nullable) — Lot number.
- `purchase_order_line_item_id` (long, optional) — Unique id of the line item.
- `qty_expected` (integer, optional) — Expected quantity.

### Receiving.V3.PurchaseOrderStatusViewModel

A purchase order status.

- `id` (integer, optional) — 1 Draft, 2 Open, 3 PartiallyReceived, 4 Closed, 5 Cancelled.
- `name` (string, optional, nullable) — Status name.

### Receiving.V3.PurchaseOrderSupplierViewModel

The supplier a purchase order is placed with.

- `id` (integer, optional) — Supplier id.
- `name` (string, optional, nullable) — Supplier name; null when it could not be resolved.

## Examples

**Response**

```json
{
  "created_at": "2019-08-24T14:15:22+00:00",
  "external_reference": "string",
  "line_items": [
    {
      "description": "string",
      "expiration_date": "2027-01-31",
      "external_sku": "string",
      "inventory_id": 0,
      "lot_number": "string",
      "purchase_order_line_item_id": 0,
      "qty_expected": 0
    }
  ],
  "notes": "string",
  "purchase_order_id": 0,
  "status": {
    "id": 1,
    "name": "Draft"
  },
  "supplier": {
    "id": 0,
    "name": "string"
  },
  "updated_at": "2019-08-24T14:15:22+00:00"
}
```

**SDK Code**

```python default
import requests

url = "https://sandbox-api.shipbob.com/Experimental/purchase-orders/1"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript default
const url = 'https://sandbox-api.shipbob.com/Experimental/purchase-orders/1';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go default
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://sandbox-api.shipbob.com/Experimental/purchase-orders/1"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby default
require 'uri'
require 'net/http'

url = URI("https://sandbox-api.shipbob.com/Experimental/purchase-orders/1")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java default
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://sandbox-api.shipbob.com/Experimental/purchase-orders/1")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php default
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://sandbox-api.shipbob.com/Experimental/purchase-orders/1', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp default
using RestSharp;

var client = new RestClient("https://sandbox-api.shipbob.com/Experimental/purchase-orders/1");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift default
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://sandbox-api.shipbob.com/Experimental/purchase-orders/1")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```