• Example searches: “transaction”, “CreateOrder”, “/v2/locations”, “inventory”, “delete customer”

You are viewing an old version of the API
Create location

POST /v2/locations

Creates a location.

Creating new locations allows for separate configuration of receipt layouts, item prices, and sales reports. Developers can use locations to separate sales activity through applications that integrate with Square from sales activity elsewhere in a seller's account. Locations created programmatically with the Locations API last forever and are visible to the seller for their own management. Therefore, ensure that each location has a sensible and unique name.


Permissions
MERCHANT_PROFILE_WRITE
Guide
Create a location
Try in API Explorer
Name Description
location
Location

The initial values of the location being created. The name field is required and must be unique within a seller account. All other fields are optional, but any information you care about for the location should be included. The remaining fields are automatically added based on the data from the main location.

Response Fields

Name Description
errors
Error [ ]

Information about errors encountered during the request.

location
Location

The newly created Location object.

Examples

You are viewing an old version of the API
POST /v2/locations
cURL
  • cURL
  • Ruby
  • Python
  • C#
  • Java
  • PHP
  • Node.js
curl https://connect.squareup.com/v2/locations \
  -X POST \
  -H 'Square-Version: 2022-09-21' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "location": {
      "name": "Midtown",
      "description": "Midtown Atlanta store",
      "address": {
        "address_line_1": "1234 Peachtree St. NE",
        "locality": "Atlanta",
        "administrative_district_level_1": "GA",
        "postal_code": "30309"
      }
    }
  }'
Response JSON
{
  "location": {
    "id": "3Z4V4WHQK64X9",
    "name": "Midtown",
    "address": {
      "address_line_1": "1234 Peachtree St. NE",
      "locality": "Atlanta",
      "administrative_district_level_1": "GA",
      "postal_code": "30309"
    },
    "timezone": "America/New_York",
    "capabilities": [
      "CREDIT_CARD_PROCESSING"
    ],
    "status": "ACTIVE",
    "created_at": "2022-02-19T17:58:25Z",
    "merchant_id": "3MYCJG5GVYQ8Q",
    "country": "US",
    "language_code": "en-US",
    "currency": "USD",
    "type": "PHYSICAL",
    "description": "Midtown Atlanta store",
    "coordinates": {
      "latitude": 33.7889,
      "longitude": -84.3841
    },
    "business_name": "Jet Fuel Coffee",
    "mcc": "7299"
  }
}