# Update Address

## /addresses/:address\_id

<mark style="color:orange;">`PUT`</mark> `https://api.terminal.africa/v1/addresses/:address_id`

This endpoint allows you to update an existing address.

#### Path Parameters

| Name                                          | Type   | Description                   |
| --------------------------------------------- | ------ | ----------------------------- |
| address\_id<mark style="color:red;">\*</mark> | String | Unique identifier for address |

#### 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                                                                                                          |
| ----------------------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------- |
| city<mark style="color:red;">\*</mark>    | String  | Address city.                                                                                                        |
| country<mark style="color:red;">\*</mark> | String  | ISO 2 country code for address.                                                                                      |
| email                                     | String  | Email of person at address.                                                                                          |
| first\_name                               | String  | First name of person at address. Required for arranging pickup / delivery.                                           |
| is\_residential                           | Boolean | Indicates if address is a residential address or not. Defaults to ***true***.                                        |
| last\_name                                | String  | Last name of person at address. Required for arranging pickup / delivery.                                            |
| line1                                     | String  | Street address. Required for arranging pickup / delivery.                                                            |
| line2                                     | String  | Second line of street address                                                                                        |
| metadata                                  | Object  | Additional information for an address.                                                                               |
| name                                      | String  | Full name of person at address                                                                                       |
| phone                                     | String  | Phone number of person at address. Must match country provided in address. Required for arranging pickup / delivery. |
| state                                     | String  | Address state                                                                                                        |
| zip                                       | String  | Zip / Postal code. Required for arranging pickup / delivery.                                                         |

{% tabs %}
{% tab title="200: OK Address updated successfully." %}

```javascript
{
	status: true,
	message: 'Address updated successfully',
	data: {
		city: 'Lagos',
		coordinates: { lat: 6.5969424, lng: 3.3542992 },
		country: 'NG',
		email: 'augustus_obi@shipmonk.ng',
		first_name: 'Augustus',
		is_residential: true,
		last_name: 'Obi',
		line1: '1121 Allen Avenue, Ikeja',
		line2: '',
		metadata: {
			my_app_customer_id: 11234
		},		
		phone: '+2348122340000',
		state: 'Lagos',
		zip: '121006',
		address_id: 'AD-00632494667',
		created_at: 2022-05-23T00:00:01.223Z,
		updated_at: 2022-05-23T00:00:01.223Z,
	}
}
```

{% endtab %}
{% endtabs %}
