# ReadyDocs

ReadyDocs is a document-generation API that enables customers to create standardized packing slips using predefined templates.

ReadyDocs provides a library of approximately 140 packing slip templates, including generic templates that can be used for customer orders. Documents are generated programmatically by submitting order and shipment data to the ReadyDocs API.

> Note: ReadyDocs is a subscription-based feature, and usage is metered. This feature must be enabled by EasyPost
  Support before it can be used. Requests are authenticated using an EasyPost API key.

Supported document types include:

- `packing_slip`

Supported output types include:

- `PDF`: Returns the generated PDF.
- `JSON`: Returns the generated PDF encoded in Base64 within a JSON response.
- `S3`: Returns a JSON response containing a link to the generated PDF stored in S3.

---

## ReadyDocs Object

| Property | Type | Description |
|----------|------|-------------|
| object | string | Object type. Always “Document”. |
| mode | string | "test" or ”production” |
| reference | string | Status of the document generation request (e.g., ”created”) |
| status | string | Carrier associated with the rate (e.g., USPS, FedEx). |
| document_type | string | The generated document type. (e.g., ”packing_slip”) |
| format | string | Output format of the generated document (e.g., ”pdf”) |
| file_url | string | URL where the generated document can be accessed. |
| messages | array | Messages related to document generation. |
| created_at | datetime | Timestamp when the document was created. |

Example Object:

```json
{
  "object": "Document",
  "mode": "test",
  "reference": null,
  "status": "created",
  "document_type": "packing_slip",
  "format": "pdf",
  "file_url": "https://eformz-doclib.s3.us-west-2.amazonaws.com/files/doclib/20260813/packslip_1786654215217.pdf",
  "messages": [],
  "created_at": "2026-08-13T20:50:14.870Z"
}
```

## ReadyDoc Order Object

| Property | Type | Description |
|----------|------|-------------|
| ship_to | object | Destination recipient details for the order. |
| ship_to.address | object | Destination address object. |
| ship_to.address.name | string | Recipient name. |
| ship_from.address | object | Origin address object. |
| ship_from.address.name | string | Sender name. |
| bill_to.address | object | Billing address object. |
| bill_to.address.name | string | Billing contact name. |
| customer_service.phone | string | Customer support phone number. |
| po_number | string | Purchase order number associated with the order. |
| order_lines.line | array of objects | Array of order line items. |
| order_lines.line.item_id | string | Line item identifier. |
| order_lines.line.description | string | Line item description. |
| order_lines.line.qty.ord | integer | Quantity ordered. |

---

## Create a Document

### Example: POST /alpha/readydocs/packslip

#### cURL

```shell
curl -X POST https://api.easypost.com/alpha/readydocs/packslip \
  -u "EASYPOST_API_KEY": \
  -H 'Content-Type: application/json' \
  --data-binary @- <<'JSON'
{
  "pack_slip_data": {
    "pack_slip": {
      "project": "hsn_8x11",
      "output_type": "S3",
      "order": {
        "ship_to": {
          "address": {
            "name": "Dr. Steve Brule",
            "company": "EasyPost",
            "street1": "417 Montgomery Street",
            "street2": "5th Floor",
            "city": "San Francisco",
            "state": "CA",
            "zip": "94104",
            "country": "US",
            "phone": "4155559999",
            "email": "dr_steve_brule@example.com"
          }
        },
        "ship_from": {
          "address": {
            "name": "EasyPost",
            "company": "EasyPost",
            "street1": "417 Montgomery Street",
            "street2": "5th Floor",
            "city": "San Francisco",
            "state": "CA",
            "zip": "94104",
            "country": "US",
            "phone": "4155559999",
            "email": "support@example.com"
          }
        },
        "bill_to": {
          "address": {
            "name": "Dr. Steve Brule",
            "street1": "179 N Harbor Dr",
            "city": "Redondo Beach",
            "state": "CA",
            "zip": "90277",
            "country": "US",
            "phone": "8575551212",
            "email": "dr_steve_brule@example.com"
          }
        },
        "customer_service": {
          "phone": "4155559999",
          "email": "support@example.com",
          "website": "https://www.example.com"
        },
        "customer_id": "customer_123",
        "customer_order": "order_123",
        "order_number": "123456",
        "po_number": "PO-123456",
        "invoice_number": "INV-123456",
        "warehouse_id": "warehouse_123",
        "ship_date": "08/11/2026",
        "order_date": "08/10/2026",
        "delivery_date": "08/14/2026",
        "ship_method": "Ground",
        "pay_method": "Credit Card",
        "order_message": "Thank you for your order.",
        "sub_total": "$25.00",
        "sales_tax": "$2.00",
        "shipping_handling": "$5.00",
        "credit": "$0.00",
        "total": "$32.00",
        "currency_uom": "$",
        "sales_person": "Steve Brule",
        "order_lines": {
          "line": [
            {
              "item_id": "item_123",
              "upc": "012345678905",
              "merchant_sku": "SKU-123",
              "customer_part_number": "PART-123",
              "description": "T-shirt",
              "item_style": "Blue / Medium",
              "qty": {
                "ord": 2,
                "ship": 2,
                "bo": 0,
                "uom": "each"
              },
              "unit_price": "$12.50",
              "total_price": "$25.00",
              "gift_message": "Happy Birthday!"
            }
          ]
        }
      },
      "shipping_label": {
        "data": "test",
        "format": "PNG",
        "encoding": "base64"
      },
      "print_commands": {
        "print": {
          "type": "text",
          "encoding": "base64",
          "encoding_character_set": "UTF-8",
          "data": "test",
          "size": "4x6",
          "format": "ZPL"
        }
      },
      "image": {
        "char_set": "ISO-8859-1",
        "image_data": "/9j/4AAQS.......QhCA/",
        "image_format": "JPEG"
      }
    }
  }
}
JSON
```

Creates a packing slip using a predefined ReadyDocs template.

The `project` identifies the packing slip template to generate. ReadyDocs supports vendor-specific templates as well as generic packing slip templates.