> For the complete documentation index, see [llms.txt](https://fincart.gitbook.io/fincart-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fincart.gitbook.io/fincart-api/apis/set-pickup-location-as-default.md).

# Set Pickup Location As Default

### Set Pickup Location As Default

Sets a specific merchant pickup location as the default location.

**Method:** `PATCH` **Endpoint:** `https://api.dev.fincart.io/merchant/locations/{locationId}/default`

***

#### Path Parameters

| Parameter    | Type   | Required | Description                                             |
| ------------ | ------ | -------- | ------------------------------------------------------- |
| `locationId` | string | Yes      | The unique ID of the pickup location to set as default. |

**Example:** `685403218153cbdceab3aa2f`

***

#### Request Headers

| Header          | Value              | Required | Description                          |
| --------------- | ------------------ | -------- | ------------------------------------ |
| `Authorization` | `<api_key>`        | Yes      | Merchant API key for authentication. |
| `Content-Type`  | `application/json` | Yes      | Must be `application/json`.          |

> **Authentication format:** The `Authorization` header uses the format `<publicKey>:<signature>:<nonce>`.

***

#### Request Body

No request body is required for this endpoint.

***

#### Response

**200 — Success**

```json
{
  “status”: “success”,
  “msg”: “Merchant location set as default”,
  “body”: {
    “_id”: “685403218153cbdceab3aa2f”
  }
}
```

| Field      | Type   | Description                                     |
| ---------- | ------ | ----------------------------------------------- |
| `status`   | string | `“success”` when the operation completes.       |
| `msg`      | string | Human-readable confirmation message.            |
| `body._id` | string | The ID of the location that was set as default. |

***

#### Example Request

```bash
curl --location --request PATCH \
  ’https://api.dev.fincart.io/merchant/locations/685403218153cbdceab3aa2f/default' \
  --header ‘Authorization: <your_api_key>’ \
  --header ‘Content-Type: application/json’
```

***

#### Notes

* This endpoint requires no body — only the `locationId` in the URL path.
* Only one location can be the default at a time. Calling this endpoint on a new location will replace the previous default.

***
