Getting Started - Grasshopper Labs API
Retailer / Shipper Integration

Get up and running with the Grasshopper API in six steps.

This guide walks retailers and shippers through everything required to integrate with the Grasshopper platform: authentication, creating orders, subscribing to lifecycle webhooks, and retrieving final delivery assets like POD and images.

Overview

The Grasshopper Retailer Integration enables shippers to programmatically create and manage orders inside Grasshopper, with full lifecycle visibility from order creation through final delivery.

Through a combination of REST APIs and event-driven webhooks, your system can:

  • Create final-mile orders via Grasshopper's external APIs
  • Assign orders to manifests for planning and execution
  • Track orders and individual line items across their full lifecycle
  • Receive real-time updates via webhook events
  • Retrieve POD, signatures, and delivery images once orders reach terminal status

Who this guide is for

Integration Developers

Building the connection between your OMS/ERP and Grasshopper.

Solution Architects

Designing order flow, lifecycle tracking, and asset retrieval.

Product & Operations

Owning the end-to-end retailer-to-delivery workflow.

The Integration Lifecycle

Every retailer integration follows the same six-step path. Each step builds on the last.

1

Shipper Setup

Carrier configures the shipper inside Grasshopper.

2

API User

Create a dedicated user for authentication.

3

Authenticate

Exchange credentials for an access token.

4

Create Orders

POST new final-mile orders to the API.

5

Subscribe to Webhooks

Receive lifecycle updates in real-time.

6

Retrieve Assets

Download POD & images on terminal status.

Step 1: Configure the Shipper in Grasshopper

SETUP Shipper / Retailer Configuration

Before any API integration begins, the shipper must be created and configured inside the Grasshopper UI. This step is performed by the carrier within their Grasshopper environment.

Required Information

The carrier will collect and configure the following:

  • Primary contact first name
  • Primary contact last name
  • Primary contact email address
  • Company name
  • Company address
  • Any additional retailer configuration fields required by the carrier workflow
Why this matters

This configuration establishes the shipper as an active entity in Grasshopper and is what binds your integration to the correct business account. The retailer.identifier used in order creation must match this configured shipper.

Step 2: Create an API User

SETUP Dedicated API User Account

Once the shipper exists in Grasshopper, create a dedicated user under that shipper's users to handle API authentication. A valid user profile is required before any API access can begin.

Required Credentials

  • email — used as the username for token generation
  • password — used as the secret for authentication
Use a dedicated integration email

The email on this API user will also receive system-generated order-creation confirmations. These notifications can't currently be disabled, so use a system or integration mailbox (e.g. api-integration@yourcompany.com) instead of a personal day-to-day inbox.

What else this user can do

The API user profile behaves exactly like any other Grasshopper user. It can also:

  • Log in to the shipper UI when needed
  • Validate credentials during testing
  • Trigger password resets (sent to the email above)

Step 3: Authenticate

API Obtain an Access Token

Authentication must be completed before any API access begins. Use the API user credentials created in Step 2 to obtain an access token.

POST {{url}}/api/rest/auth

Request

Send credentials as application/x-www-form-urlencoded:

curl --location -g '{{url}}/api/rest/auth' \
  --data-urlencode 'user_name={{username}}' \
  --data-urlencode 'password={{password}}'

Behavior

  • Valid credentials: Grasshopper returns the authentication tokens required for subsequent API requests
  • Invalid credentials: the request is rejected and the integration must not proceed with additional API calls
Reference Documentation

Full schema and examples: Postman Authentication Docs →

Step 4: Create an Order

API Order Creation

The Order Creation API allows retailers to create new final-mile orders in Grasshopper for operational planning, manifest assignment, and downstream delivery execution.

POST {{url}}/api/orders

Required Headers

  • Content-Type: application/json
  • Authorization: {{access_token}}

Example Request

curl --location -g '{{url}}/api/orders' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: {{access_token}}' \
  --data-raw '{
    "order": {
      "retailer": { "identifier": "gh3test" },
      "service_level": "WG",
      "ref_order_number": "1123456",
      "sales_order_number": "<optional>",
      "freight_tracking_number": "<optional>",
      "customer": {
        "first_name": "Ori",
        "last_name": "Anavim",
        "address": {
          "address1": "123 Main",
          "city": "Charlotte",
          "state": "NC",
          "zip": "28277"
        },
        "phone1": { "number": "987-858-8558" },
        "email": "ori@email.com"
      },
      "total_insurance_coverage": 0,
      "line_items": [
        {
          "quantity": 1,
          "weight": 123,
          "cube": 33,
          "sku": "item_sku-1",
          "tracking_number": "item_serial-1234",
          "serial_number": "item_serial-1234",
          "category": "Misc",
          "name": "item-description-test",
          "vendor": "vendor-name-123",
          "freight_info": { "is_fob": true, "vendor_info": {} }
        }
      ],
      "note": "sample order note"
    }
  }'

Behavior

  • A valid authenticated request creates a new final-mile order in Grasshopper
  • The order becomes available for manifest assignment, lifecycle tracking, and delivery
  • Items submitted under line_items participate in lifecycle tracking alongside the order
Confirmation pattern

Standard practice: rely on the order_created webhook event as the confirmation that an order was successfully accepted by Grasshopper. Subscribe to order_created and use it to reconcile created orders on your side.

PO Number uniqueness is not enforced

The ref_order_number field (often used as the PO number) is not enforced as unique by Grasshopper. The system allows multiple orders with the same value. If you require deduplication, enforce it on your side before submission.

Reference Documentation

Full schema, all fields, and live examples: POST Create New Order [Final Mile Only] →

Step 5: Subscribe to Lifecycle Webhooks

EVENTS Real-Time Lifecycle Tracking

Grasshopper tracks status at two levels and emits webhook events at both levels so your system always has an accurate picture of where each order and item is in its lifecycle.

Order vs. Item Status

  • Item-level status — each individual line item has its own independent lifecycle
  • Order-level status — an aggregated view of all items on the order; the order reflects the least advanced state across its items
Example

If an order has 5 items and 4 are Received but 1 is still Pending Arrival, the order status remains Pending Arrival. Only when all 5 items reach Received does the order transition.

Rule of thumb: use item-level events for precise tracking and order-level events for high-level milestones.

Order-Level Events

EventDescription
order_createdOrder created in Grasshopper
order_complete_stopOrder completed (Delivered / Rejected / Delivery Failed / Damaged)
order_updatedOrder information has been updated
order_status_changedOrder status was changed
tracking_changedTracking entry was added
notes_addedNote was added to the order
notes_updatedNote was updated
delivery_changedDelivery date was changed
pickup_date_schedule_changedPickup date was changed
expected_arrival_changedExpected arrival was changed
order_estimated_arrival_changedEstimated arrival time changed
customer_information_changedCustomer information changed on the order
service_level_changedService level changed
asset_addedImage was added to the order
asset_removedImage was removed from the order
arrive_on_siteDriver team arrived at the consignee

Item-Level Events

EventDescription
item_status_changedLine item status was changed
item_damagedIndividual line item was marked as damaged
item_addedItem was added
item_removedItem was removed
item_updatedItem was updated
item_rejectedIndividual line item was rejected
item_failed_deluxItem did not pass deluxe process

Subscribing to Webhooks

To register a webhook subscription, provide:

  • Topic name — one of the supported topics above
  • MethodPOST, PUT, or PATCH
  • URL — your endpoint that will receive the event payload

Payload Structure

Webhook payloads contain two top-level sections:

  • msg_info — metadata about the webhook delivery (event context, message info)
  • order — the Grasshopper order data relevant to the event, including order info, delivery, customer, retailer, line_items, tracking, assets, notes, and item-level tracking
Build for idempotency

Events are asynchronous, may be retried, and may arrive multiple times for the same lifecycle change. Your receiver must process events idempotently and handle duplicate deliveries safely. Use the payload identifiers to correlate updates with your records.

Webhook Resources

Step 6: Retrieve POD & Delivery Assets

API Final Delivery Artifacts

Once an order reaches a terminal status, you can retrieve final delivery artifacts including Proof of Delivery (POD), signatures, and delivery images.

Terminal Statuses

An order is considered terminal when no further operational updates are expected:

DELIVERED
CUSTOMER_PICKUP
CANCELLED
REJECTED
DAMAGED
RETURNED
DELIVERY_FAILED
DISPOSED
MOVED_TO_GIMS
PICKUP_FAILED

Successful completion    Failure outcome    Other terminal state

Download POD

POST /api/orders/:id/download_pod

Returns the POD document as a binary file stream. Use after the order reaches a terminal status (typically DELIVERED).

Response Codes

  • 200 OK — POD file returned as binary stream
  • 404 — POD not found or not yet available
  • 403 — Unauthorized access
  • 400 — Invalid request

Download Images & Related Assets

GET /orders/{order_id}/images

Returns all images and related assets associated with an order: POD photos, signatures, damage photos, inspection photos, and more. Assets come back as URLs (7-day expiry), not binary files.

Sample Response

{
  "status": "ok",
  "data": [
    {
      "id": "6489cfd7977ae68383fd6b9f",
      "original_file_name": "signature.png",
      "key": "orders/22200039622/1-06142023-103359565.png",
      "type": 1,
      "file_type": "image/png",
      "date": "2023-06-14T14:33:59.731Z",
      "url": "https://dlr-imgs.s3.amazonaws.com/orders/...",
      "user": {
        "first_name": "Ces",
        "last_name": "Driver",
        "full_name": "Ces Driver"
      }
    }
  ]
}

Asset Type Reference

The type field on each asset identifies what it is. The most common types:

IDType
0General
1Signature [Accept]
2Signature [Reject]
4Delivery Location
5Damage Product
7Accept Product
11Item Inspection
13Bill of Lading
25Arrive on Site
26eSignature POD

Full list of 38 asset types available in the Postman documentation.

Asset availability & URL expiry

Assets may not be available immediately when the terminal status webhook fires. Allow a short delay and implement retry logic. Asset URLs are public-access and automatically generated upon request, valid for 7 days. ePODs are generated as PDFs on the fly. If you need long-term retention, persist the assets on your side.

Recommended pattern

Trigger asset retrieval when you receive a terminal-status webhook event. Implement retry logic in case assets aren't immediately ready. Store the POD and images locally for customer service, claims, and billing workflows.

Reference Documentation

POD Download API: Postman Docs →

Status Reference

Use this reference when interpreting order_status_changed and item_status_changed webhook events.

Immediate Scheduling Eligible

These statuses indicate readiness for planning or scheduling:

PENDING_CARRIER_PICKUP
CONSOLIDATION_DOCK
PENDING_RETURN
FULFILLED (Received)
RESERVED

Note: FULFILLED is equivalent to Received in Grasshopper terminology and means items have been physically received into the warehouse / network.

For the full list of statuses and tracking events, see Types & Statuses →

Resources & Next Steps

Everything you need to keep building.

You're ready to integrate

Start in staging: staging.grasshopperlabs.io. Use your Grasshopper credentials as client_id (email) and client_secret (password) for the API. When you're ready to move to production, reach out to your Grasshopper team.