# AfterShip

> Connect your AfterShip account to detect couriers, create shipment trackings, and check delivery status.

App · E-Commerce · 4 actions. Web page: https://docs.lodol.com/docs/integrations/aftership

## Actions

### Create tracking

Start tracking a shipment.

**Inputs**

- Tracking number (`tracking_number`, text, required): Tracking number issued by the courier.
- Slug (`slug`, text, required): Courier slug, for example 'ups' or 'fedex'. Use detect_courier to find it.
- Title (`title`, text): Optional title for the tracking, for example an order number.
- Order ID (`order_id`, text): Optional order ID to associate with the tracking.

**Outputs**

- `id` (text): AfterShip tracking ID. Use with get_tracking.
- `tag` (text): Initial tracking status, for example 'Pending'

**Example output**

```json
{
  "id": "5b7f1a2e4c3d2a0011f5f2a1",
  "tag": "Pending"
}
```

### Detect courier

Identify the likely courier(s) for a tracking number.

**Inputs**

- Tracking number (`tracking_number`, text, required): Tracking number to identify the courier for.

**Outputs**

- `couriers` (list): Couriers that could match the tracking number

**Example output**

```json
{
  "couriers": [
    {
      "name": "UPS",
      "slug": "ups"
    }
  ]
}
```

### Get tracking

Look up a shipment's current status and checkpoint history.

**Inputs**

- Tracking ID (`tracking_id`, text, required): The tracking's AfterShip ID (not the courier tracking number) -- returned as 'id' by create_tracking and list_trackings.

**Outputs**

- `checkpoints` (list): Tracking event history, oldest first
- `expected_delivery` (text): Latest estimated delivery date/time, if known
- `id` (text): AfterShip tracking ID
- `slug` (text): Courier slug
- `tag` (text): Current status, for example 'InTransit' or 'Delivered'
- `tracking_number` (text): Tracking number

**Example output**

```json
{
  "checkpoints": [
    {
      "checkpoint_time": "2026-01-28T10:00:00Z",
      "location": "Louisville, KY",
      "message": "Departed from facility",
      "tag": "InTransit"
    }
  ],
  "expected_delivery": "2026-02-01T10:00:00-05:00",
  "id": "5b7f1a2e4c3d2a0011f5f2a1",
  "slug": "ups",
  "tag": "InTransit",
  "tracking_number": "1Z999AA10123456784"
}
```

### List trackings

List the shipments currently being tracked in your AfterShip account.

**Inputs**: None.

**Outputs**

- `trackings` (list): List of tracked shipments

**Example output**

```json
{
  "trackings": [
    {
      "id": "5b7f1a2e4c3d2a0011f5f2a1",
      "slug": "ups",
      "tag": "InTransit",
      "tracking_number": "1Z999AA10123456784"
    }
  ]
}
```
