# Get the available pickup times

> The dates and time windows in which the carrier can pick up a shipment.

`GET https://services.parcelparcel.com/partners-api/v1/shipments/{shipmentId}/pickup/slots`

This endpoint shows when the carrier can pick up a shipment: per date, the start times and the end times you can choose. Use one of these slots when you [schedule](https://www.parcelparcel.com/api-docs/schedule-pickup/) or [reschedule](https://www.parcelparcel.com/api-docs/reschedule-pickup/) a pickup.

Replace `{shipmentId}` with the `id` that you got in the response when you [created the shipment](https://www.parcelparcel.com/api-docs/create-shipment/).

You can only use shipments of your own account. A shipment of another account gives the same `404` as an unknown id.

## Header

Add the following headers:

| Name         | Value                          |
| :----------- | :----------------------------- |
| Content-Type | application/json               |
| X-PP-API     | `{YourAPIKey}@{YourAPISecret}` |

Don't have an API Key and API Secret yet? Check our [Authentication](https://www.parcelparcel.com/api-docs/authentication/) page to see how to get them in under a minute.

## Body

This endpoint does not need a request body.

## Query Parameters

| Name     | Type   | Description                                                                         |
| :------- | :----- | :---------------------------------------------------------------------------------- |
| fromDate | string | The first date you want slots for. Format: `YYYY-MM-DD`. Optional, defaults to today. |

## Response

The response body is a JSON object with the following elements:

| Name             | Value             | Comments                                                                                                           |
| :--------------- | :---------------- | :----------------------------------------------------------------------------------------------------------------- |
| shipmentId       | (int)             | The id of the shipment.                                                                                            |
| timezone         | (string)          | The time zone of all times in the response, for example `Europe/Amsterdam`.                                        |
| slots            | (array)           | One entry per date on which the carrier can pick up.                                                               |
| slots.date       | (string)          | The date. Format: `YYYY-MM-DD`.                                                                                    |
| slots.times      | (array)           | The time windows on this date.                                                                                     |
| slots.times.from | (string)          | A start time you can use as `timeFrom`, for example `09:00`.                                                       |
| slots.times.to   | (array of string) | The end times you can use as `timeTo` with this start time, for example `["13:00", "17:00"]`.                     |

We only list days and times that can really be booked with the carrier. To schedule a pickup, pick one `date`, one `from` of that date as `timeFrom` and one of its `to` values as `timeTo`.

### Status codes

| Status code     | Meaning                                                                                      |
| :-------------- | :------------------------------------------------------------------------------------------- |
| 200 OK          | The response has the available slots.                                                        |
| 400 Bad Request | `fromDate` is not a valid date in the format `YYYY-MM-DD`, or it is in the past.             |
| 404 Not Found   | We could not find the shipment in your account. Make sure that the `shipmentId` is correct.  |
| 409 Conflict    | The carrier already has the parcel, the shipment is cancelled, or no pickup can be planned for this shipment. See `message`. |

Errors have the same format as in [Schedule a pickup](https://www.parcelparcel.com/api-docs/schedule-pickup/#errors).

## Examples

Don't know how to test these requests? Check [our guide](https://www.parcelparcel.com/api-docs/postman-guide/).

### Request example - Get pickup times from 1 December

```bash cURL
curl --location --request GET 'https://services.parcelparcel.com/partners-api/v1/shipments/1588448/pickup/slots?fromDate=2026-12-01' \
--header 'X-PP-API: {YourAPIKey}@{YourAPISecret}' \
--header 'Content-Type: application/json'
```
```http HTTP
GET /partners-api/v1/shipments/1588448/pickup/slots?fromDate=2026-12-01 HTTP/1.1
Host: services.parcelparcel.com
X-PP-API: {YourAPIKey}@{YourAPISecret}
Content-Type: application/json
```

Don't forget to change the **X-PP-API** element in the header, or this request will not work. Leave out `fromDate` to get the slots from today.

### Response example - Available pickup times (200)

```json
{
  "shipmentId": 1588448,
  "timezone": "Europe/Amsterdam",
  "slots": [
    {
      "date": "2026-12-01",
      "times": [
        {
          "from": "09:00",
          "to": ["13:00", "14:00", "17:00"]
        }
      ]
    },
    {
      "date": "2026-12-02",
      "times": [
        {
          "from": "09:00",
          "to": ["13:00", "14:00", "17:00"]
        },
        {
          "from": "13:00",
          "to": ["17:00"]
        }
      ]
    }
  ]
}
```

### Response example - fromDate in the past (400)

```json
{
  "error": "invalid_pickup",
  "message": "The pickup is not valid.",
  "errors": [
    {
      "field": "fromDate",
      "message": "fromDate cannot be in the past."
    }
  ]
}
```

### Response example - Shipment not found (404)

```json
"Shipment not found"
```
