> ## Documentation Index
> Fetch the complete documentation index at: https://docs.launchmystore.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Location

> Create an inventory location (warehouse)

<Warning>
  There is **no** `POST /api/v1/locations.json` endpoint, and the OAuth App
  API exposes no location/warehouse CRUD. Inventory locations are managed
  only through the merchant dashboard surface documented below, which is
  authenticated with a merchant session (JWT) — **not** with an OAuth app
  access token. Installed apps cannot create locations.
</Warning>

# Create Location

Inventory locations are modeled as **warehouses**. A new warehouse is created
through the merchant endpoint `POST /warehouse/add-warehouse`.

**Authentication:** merchant session, allowed roles `MERCHANT`,
`STAFF_ADMIN`, `SUPER_ADMIN`, `MANAGER`. An active store subscription is
required; warehouse count is capped by plan tier.

## Body Parameters

<ParamField body="warehouseName" type="string" required>
  Location name.
</ParamField>

<ParamField body="warehouseType" type="string">
  `Primary` or `Secondary`.
</ParamField>

<ParamField body="contactPerson" type="string" required>
  Name of the contact person for this location.
</ParamField>

<ParamField body="mobileNumber" type="string" required>
  Contact phone number.
</ParamField>

<ParamField body="address" type="string" required>
  Street address.
</ParamField>

<ParamField body="area" type="string" required>
  Area / locality.
</ParamField>

<ParamField body="city" type="string" required>
  City.
</ParamField>

<ParamField body="state" type="string" required>
  State / province.
</ParamField>

<ParamField body="pinCode" type="string">
  Postal / PIN code.
</ParamField>

<ParamField body="gstNumber" type="string">
  Tax registration number (optional).
</ParamField>

<ParamField body="localPickupEnabled" type="boolean" default="false">
  When `true`, this warehouse is offered as a local "Pickup" option at
  checkout for buyers whose destination country matches.
</ParamField>

<ParamField body="pickupHours" type="string">
  Pickup hours shown at checkout (when local pickup is enabled).
</ParamField>

<ParamField body="pickupInstructions" type="string">
  Pickup instructions shown at checkout (when local pickup is enabled).
</ParamField>

## Response

The created warehouse is returned directly under `data` in the standard
response envelope.

<ResponseExample>
  ```json theme={null}
  {
    "status": 201,
    "state": "success",
    "message": null,
    "data": {
      "warehouseId": "8c6b1d2e-3f4a-5b6c-9f1c-2e7a3b4d4f5a",
      "warehouseName": "West Coast Warehouse",
      "warehouseType": "Secondary",
      "contactPerson": "John Doe",
      "mobileNumber": "+1234567890",
      "address": "789 Shipping Blvd",
      "area": "Downtown",
      "city": "Seattle",
      "state": "Washington",
      "pinCode": "98101",
      "localPickupEnabled": false,
      "storeId": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
      "createdAt": "2024-01-20T14:30:00Z",
      "updatedAt": "2024-01-20T14:30:00Z"
    },
    "pagination": null
  }
  ```
</ResponseExample>
