---
title: "Pickups"
description: "Schedule carrier pickups (recolecciones), check their status, and cancel them when needed."
---

A pickup (recolección) asks the carrier to collect your packages at an address, on a date, within a time window. Schedule, check, and cancel pickups with any carrier through the same API.

:::warning
Pickup management works in LIVE mode only. With an `sk_test_` key, scheduling, listing, viewing, cancelling, or refreshing a pickup returns `400 LIVE_MODE_REQUIRED`. You can call `/v1/pickups/carriers` in either mode.
:::

## The lifecycle

```text
PENDING → CONFIRMED → IN_PROGRESS → COMPLETED
                 ↘ CANCELLED
                 ↘ FAILED
```

## Endpoints

| Method | Path | Description |
| --- | --- | --- |
| `POST` | `/v1/pickups` | Schedule a pickup |
| `GET` | `/v1/pickups` | List pickups (filterable) |
| `GET` | `/v1/pickups/carriers` | Carriers with pickup support |
| `GET` | `/v1/pickups/:id` | Pickup detail |
| `PATCH` | `/v1/pickups/:id/cancel` | Cancel a pickup |
| `POST` | `/v1/pickups/:id/refresh-status` | Fetch the latest status from the carrier |

## Schedule a pickup

### Body parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `carrierCode` | `string` | - | A carrier with pickup support (GET /v1/pickups/carriers). |
| `pickupDate` | `string` | - | ISO date (YYYY-MM-DD), today or later. |
| `readyTime` | `string` | - | HH:mm time from which the packages are ready. |
| `closingTime` | `string` | - | HH:mm closing time. It must be later than readyTime. |
| `packageCount` | `number` | - | Number of packages (1–999). |
| `totalWeight` | `number` | - | Total weight in kg (minimum 0.1). |
| `contactName` | `string` | - | The person who will meet the courier. |
| `contactPhone` | `string` | - | Contact phone number. |
| `pickupAddressId?` | `string` | - | A saved address in your organization. |
| `specialInstructions?` | `string` | - | Instructions for the courier (up to 500 characters). |
| `shipmentIds?` | `string[]` | - | Valid LIVE labels from the same carrier and account. Supply at least one distinct shipment ID. Omit this field for a standalone pickup. |

```bash
curl -X POST https://api.sendit.mx/v1/pickups \
  -H "X-API-Key: sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "carrierCode": "DHL",
    "pickupAddressId": "clx_origin_address",
    "pickupDate": "2030-07-20",
    "readyTime": "09:00",
    "closingTime": "18:00",
    "packageCount": 5,
    "totalWeight": 12.5,
    "contactName": "Juan Pérez",
    "contactPhone": "+525512345678",
    "specialInstructions": "Ring the bell twice, ask for Juan.",
    "shipmentIds": ["clxship001", "clxship002"]
  }'
```

```json
{
  "success": true,
  "data": {
    "id": "clxpickup_xyz",
    "carrierCode": "DHL",
    "pickupDate": "2030-07-20",
    "readyTime": "09:00",
    "closingTime": "18:00",
    "packageCount": 5,
    "totalWeight": "12.5",
    "status": "CONFIRMED",
    "confirmationNumber": "DHL-A1B2C3D4",
    "confirmedAt": "2026-07-17T10:30:00.000Z"
  }
}
```

Keep the `confirmationNumber`. It is the reference the carrier recognizes if you need to sort something out by phone.

## Check which carriers pick up

```text
GET /v1/pickups/carriers
```

```json
{
  "success": true,
  "data": []
}
```

## List and filter

```text
GET /v1/pickups?carrierCode=DHL&status=CONFIRMED&dateFrom=2026-07-01&dateTo=2026-07-31
```

| Filter | Description |
| --- | --- |
| `carrierCode` | By carrier |
| `status` | By lifecycle status |
| `dateFrom` / `dateTo` | Pickup-date range (ISO) |

Pagination follows the page model described in [Pagination & filtering](/en/api-conventions/pagination-and-filtering).

## Cancel a pickup

```bash
curl -X PATCH https://api.sendit.mx/v1/pickups/clxpickup_xyz/cancel \
  -H "X-API-Key: sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{ "reason": "Packages will not be ready in time" }'
```

The `FAILED`, `CANCELLED` and `COMPLETED` states are final. Cancelling a pickup in any of these states returns `400`.

## Refresh the status

```text
POST /v1/pickups/:id/refresh-status
```

Queries the carrier directly and updates the local record. Use it when you need a status fresher than the last sync.


Linked labels use their original connection. A carrier can accept a booking even if the request times out. Confirm the outcome with support before requesting another visit.

## Handle errors

| Code | When it happens | How to resolve it |
| --- | --- | --- |
| `400 INVALID_INPUT` | The date, time window, address, or carrier is invalid | Correct the input and try again |
| `400 LIVE_MODE_REQUIRED` | You tried to manage a pickup in TEST mode | Switch to an `sk_live_` key |
| `404 RESOURCE_NOT_FOUND` | The pickup does not exist or belongs to another organization | Check the `id` |
