Manifest Guide

Manifests, often referred to as ScanForms at EasyPost, serve as a crucial checklist of packages awaiting carrier pickup. Although the terms are often used interchangeably, they have subtle differences:

  • Manifest: A general term for a document that lists all shipments ready for pickup.
  • ScanForm: A specific type of manifest that includes a scannable barcode used by carriers to acknowledge receipt of the shipments.

Essential for advance notification, these documents streamline the pickup process and are required by some carriers before end-of-day pickups. Utilizing manifests, even when not required, improves operational efficiency by providing a consolidated form that details all shipments for pickup.


Prerequisites

  1. Sign up for an EasyPost account or log in to an existing account.
  2. Webhook URLs need to be set up for both Test and Production Modes.
  3. Utilize one of EasyPost's official client libraries.
  4. Review the Getting Started Guide to familiarize yourself with the basic functionalities of EasyPost.

ScanForm Object

In EasyPost, the ScanForm Object is used to create a manifest. When a shipment or batch is created for individual packages, they can be included in the ScanForm Object.

Requirements

To ensure successful ScanForm creation:

  • Refunded shipments cannot be added.
  • All shipments must have the same origin_address.
  • The label_date of shipments must be on or after the date of the ScanForm generation.
  • ScanForms cannot be updated post-creation; new shipments necessitate a new ScanForm.
  • A shipment can only be included in one ScanForm.
  • Shipments must be listed as an array.

For detailed information on using the ScanForm Object, please visit the ScanForm section of the API Docs.

Attributes

The ScanForm object contains the following attributes that provide detailed information about the manifest:

  • id: Unique identifier of the ScanForm, which should be recorded for documentation purposes
  • object: Type of object, which will always be ScanForm.
  • status: Current status of the ScanForm. Possible values are "creating", "created", or "failed".
  • message: Field where errors are explained.
  • address: Origin address of the shipments.
  • tracking_codes: Tracking codes associated with all shipments in the ScanForm.
  • form_url: URL of ScanForm document.
  • form_file_type: File format of the ScanForm document.
  • batch_id: ID of the associated batch, if shipments were batched before being included in the ScanForm. Visit the API Docs to learn more about batches.
  • created_at: Timestamp indicating when the ScanForm was created.
  • updated_at: Timestamp of the latest update to the ScanForm.

Step 1: Create a ScanForm

This is a simple example of creating a ScanForm, but many users will first create a Batch, see the Batch Guide for more information.

Note: A Batch is created in the background for shipments as an intermediate process to creating ScanForms. ScanForms can be created for one or a group of shipments. It is recommended to keep each batch under 1,000 shipments. This best practice helps avoid timeout errors during the batch buying process.

Creating a ScanForm

POST /scan_forms
1curl -X POST https://api.easypost.com/v2/scan_forms \
2  -u "EASYPOST_API_KEY": \
3  -H 'Content-Type: application/json' \
4  -d '{
5    "shipments": [
6      {
7        "id": "shp_..."
8      },
9      {
10        "id": "shp_..."
11      }
12    ]
13  }'

Step 2: Receive Webhook

Upon completion of the ScanForm:

  • EasyPost will send an Event to the Webhook URLs.
  • The event to look for is scan_form.created in the Event’s description field.

Review the Webhooks Guide for information on handling Events.


Webhook POST JSON

{
  "result": {
    "id": "sf_...",
    "object": "ScanForm",
    "created_at": "2015-09-30T21:00:55Z",
    "updated_at": "2015-09-30T21:00:57Z",
    "tracking_codes": [
      "9405536897846194850412",
      "9400136897846194907281",
      "9400136897846194977529"
    ],
    "address": {
      "id": "adr_tyRwEd23",
      "object": "Address",
      "created_at": "2015-09-30T21:00:55Z",
      "updated_at": "2015-09-30T21:00:55Z",
      "name": "George Costanza",
      "company": "Vandelay Industries",
      "street1": "1 E 161st St.",
      "street2": null,
      "city": "Bronx",
      "state": "NY",
      "zip": "10451",
      "country": "US",
      "phone": null,
      "email": null,
      "mode": "test",
      "carrier_facility": null,
      "residential": null,
      "federal_tax_id": null,
      "state_tax_id": null,
      "verifications": {}
    },
    "status": "created",
    "message": null,
    "form_url": "https://easypost-files.s3-us-west-2.amazonaws.com/...2c0cb9.pdf",
    "form_file_type": null,
    "batch_id": "batch_...",
    "confirmation": null
  },
  "description": "scan_form.created",
  "mode": "test",
  "previous_attributes": {},
  "created_at": "2015-09-30T21:00:57Z",
  "pending_urls": [],
  "completed_urls": ["https://www.example.com/easypost-webhook"],
  "updated_at": "2015-09-30T21:00:57Z",
  "id": "evt_...",
  "user_id": "user_...",
  "status": "in_queue",
  "object": "Event"
}

Additional Resources

Support and Troubleshooting

EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform.

Please visit the API Docs or the Help Center for more information.