---
api: 'Merchant API'
---

# Update a location

Update details of a specific location, based on its ID. 

Only the fields provided in the request will be updated. Any omitted fields will retain their current values.

:::note
The value of the location's `type` parameter cannot be updated. If the `type` in the request body doesn't match the location's current `type`, the request fails.
:::

:::warning [Updating physical location details]
When updating a physical location, always specify `"type": "physical"` in the request body. If the `type` parameter is omitted, the request is processed as an online location update, and the physical `details` fields in the request body are silently ignored.
:::

## Endpoint

PATCH `/api/locations/{location_id}`

## Request body

## Returns

### 200

Location updated

## Error responses

| HTTP status code | Description |
| --- | --- |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 422 | Unprocessable entity |
| 500 | Internal Server Error |
