> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.partnerpage.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.partnerpage.io/_mcp/server.

# Update a location

PATCH https://v1.api.partnerpage.io/api/directory/private/v1alpha/directories/{directoryId}/entries/partners/{entryId}/locations/{locationId}/
Content-Type: application/json

Update location details

Reference: https://docs.partnerpage.io/api-reference/entry/partner-entry/locations/update-a-location

## Authentication

- `Authorization` header (required) (prefixed with ` Token   `) — Your API key, sent as `Authorization: Token <your API key>`

## Request

### Path parameters

- `directoryId` (string, required) — id of the directory
- `entryId` (string, required) — id of the Partner entry
- `locationId` (string, required) — id of the Location

### Body (application/json)

This endpoint expects a PatchedPartnerLocationRequest.

- `country` (integer, optional)
- `region` (integer, optional, nullable)
- `city` (integer, optional, nullable)
- `order` (integer, optional)

## Response

### 200

Successful operation

- `id` (string, required)
- `title` (string, required)
- `order` (integer, required)
- `country` (integer, required)
- `countryName` (string, required)
- `region` (integer, required, nullable)
- `regionName` (string, required, nullable)
- `city` (integer, required, nullable)
- `cityName` (string, required, nullable)

## Errors

### 400 Bad Request Error

Invalid place or duplicate location

- `any`

### 404 Not Found Error

Location not found

- `any`

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "id": "string",
  "title": "string",
  "order": 1,
  "country": 1,
  "countryName": "string",
  "region": 1,
  "regionName": "string",
  "city": 1,
  "cityName": "string"
}
```

**SDK Code**

```python
import requests

url = "https://v1.api.partnerpage.io/api/directory/private/v1alpha/directories/directoryId/entries/partners/entryId/locations/locationId/"

payload = {}
headers = {
    "Authorization": "Token  <apiKey>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://v1.api.partnerpage.io/api/directory/private/v1alpha/directories/directoryId/entries/partners/entryId/locations/locationId/';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Token  <apiKey>', 'Content-Type': 'application/json'},
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```