> For the complete documentation index, see [llms.txt](https://docs.terminal.africa/tship/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.terminal.africa/tship/shipment/arrange-pickup-and-delivery-for-shipment.md).

# Arrange Pickup & Delivery for Shipment

## /shipments/pickup

<mark style="color:green;">`POST`</mark> `https://api.terminal.africa/v1/shipments/pickup`

This endpoint books a shipment with pickup and delivery. You can include Priority Pickup or defer collection using Scheduled Pickup. See the [pickup workflow](/tship/guides/pickup-workflow.md) and [Pickups API reference](/tship/pickups.md).

#### Pickup Options

Fetch `pickup_options` through [Get Rates for Shipment](/tship/rate/get-rates-for-shipment-1.md). Sending `priority_pickup` books collection automatically; sending `scheduled_pickup` defers collection until you call [Schedule Pickup](/tship/pickups/schedule-pickup.md). Priority Pickup requires no separate rate request or rider-rate ID.

```json
{
    "rate_id": "RT-EXAMPLE",
    "pickup_option": "priority_pickup"
}
```

#### Headers

| Name                                            | Type   | Description                      |
| ----------------------------------------------- | ------ | -------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Set value to `Bearer SECRET_KEY` |
| Content-Type                                    | String | Set value to `application/json`  |

#### Request Body

| Name                                       | Type      | Description                                                                                                                        |
| ------------------------------------------ | --------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| dropoff\_id                                | *String*  | Unique reference for a drop-off location. Required only with `pickup_option: "dropoff"`.                                           |
| duty\_payer                                | *Enum*    | Indicate if payer for import duties is ***account\_holder, sender*** or ***receiver***.                                            |
| rate\_id<mark style="color:red;">\*</mark> | *String*  | Unique reference of selected rate.                                                                                                 |
| shipment\_id                               | *String*  | Unique id of existing draft shipment. If ***shipment\_id*** is not provided, a new shipment is generated automatically.            |
| pickup\_option                             | *String*  | Select `pickup`, `priority_pickup`, `scheduled_pickup` or `dropoff` from the rate's pickup\_options. Omit for the regular process. |
| purchase\_insurance                        | *Boolean* | Use this to indicate if insurance coverage should be provided for the shipment.                                                    |
| cash\_to\_collect                          | *Number*  | Cash to be collected by riders. Required if ***rate\_id*** passed is a ***cash\_on\_delivery*** rate                               |

{% hint style="warning" %}
A successful shipment booking can include `data.metadata.priority_pickup_error` when the rider could not be arranged. Show this warning and its hub drop-off instructions; the shipment remains booked and the failed rider fare is not charged.
{% endhint %}

{% tabs %}
{% tab title="200 Pickup for shipment arranged successfully." %}

```
{
    status: true,
    message: 'Pickup for shipment arranged successfully.',
    data: {
			address_from: {
				address_id: 'AD-00632494667',	
				city: 'Lagos',
				coordinates: {
						lat: 6.5969424,
						lng: 3.3542992
				},	
				country: 'NGA',
				email: 'augustus_obi@shipmonk.ng',
				first_name: 'Augustus',
				id: 'd799c2679e644279b59fe661ac8fa488',
				is_residential: true,
				last_name: 'Obi',
				line1: '1121 Allen Avenue, Ikeja',
				line2: '',
				metadata: {
					my_app_customer_id: 11234
				},
				name: 'Augustus Obi',
				phone: '+2348122340000',
				state: 'Lagos',
				zip: '121006'			
			},
			address_return: {
				address_id: 'AD-00632494667',	
				city: 'Lagos',
				coordinates: {
						lat: 6.5969424,
						lng: 3.3542992
				},	
				country: 'NGA',
				email: 'augustus_obi@shipmonk.ng',
				first_name: 'Augustus',
				id: 'd799c2679e644279b59fe661ac8fa488',
				is_residential: true,
				last_name: 'Obi',
				line1: '1121 Allen Avenue, Ikeja',
				line2: '',
				metadata: {
					my_app_customer_id: 11234
				},
				name: 'Augustus Obi',
				phone: '+2348122340000',
				state: 'Lagos',
				zip: '121006'		
			},
			address_to: {
				address_id: 'AD-95918335217',	
				city: 'London',
				coordinates: {
						lat: 43.653226,
						lng: -79.3831843
				},	
				country: 'GBR',
				email: 'timothy@shipmonk.ng',
				first_name: 'Timothy',
				id: 'S3YLVnGo9eKpMMbEQcWjgCraLqnNY2Oy',
				is_residential: true,
				last_name: 'Odunubi',
				line1: '45 Greenwich Lane, London',
				line2: '',
				metadata: {
					my_app_customer_id: 10567
				},
				name: 'Timothy Odunubi',
				phone: '+447514022567',
				state: '',
				zip: 'SE5 4HB'		
			},
			events: [{
				created_at: '2021-07-10T02:25:30.421Z',
				description: 'Shipment arranged by Augsustus Obi',
				location: 'Lagos-NG',
				status: 'confirmed'
			}],
			extras: {
				tracking_number: '12945827642',
				tracking_url: 'https://www.dhl.com/global-en/home/tracking/tracking-express.html?submit=1&tracking-id=12945827642'
			},
			id: 'BUbL05Ecprhc2q17Xh9woRSwNpXJehay',
			metadata: {},
			parcel: {
				description: true,
				id: 'Zt4Xh2pbbCmeVcr5YH9lsFHGqoW3i5w3',
				items: [{
					description: 'Shoes purchased from Shipmonk Store',
					name: 'Rubber Boots',
					currency: 'NGN',
					value: 25000',
					weight: 2.5
					quantity: 1
				}],
				metadata: {},		
				packaging: 'LsuiGzcYlz4dKRYnEXeobJu9gnVbQVXN',
				parcel_id: 'PC-25164820699',
				total_weight: 2.51,
				weight: 2.5,
				weight_unit: 'kg'		
			},
			rate: 'bQVMwQZndHbIq6PQD5oiaGWxetLCXGkp',
			shipment_id: 'SH-40208776515',
			status: 'confirmed',
			created_at: '2021-07-13T20:25:53.011Z',
			updated_at: '2021-07-13T20:25:53.011Z'
    }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.terminal.africa/tship/shipment/arrange-pickup-and-delivery-for-shipment.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
