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

You are viewing an old version of the API
Create location BETA

POST /v2/locations

Creates a location.


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. Unspecified fields will be set to default values using existing location data.

Response Fields

Name Description
errors
Error [ ]

Information on errors encountered during the request.

location
Location

The newly created Location.

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: 2021-05-13' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "location": {
      "name": "New location name",
      "description": "My new location.",
      "facebook_url": null,
      "address": {
        "address_line_1": "1234 Peachtree St. NE",
        "administrative_district_level_1": "GA",
        "locality": "Atlanta",
        "postal_code": "30309"
      }
    }
  }'
Response JSON
{
  "location": {
    "id": "LOCATION_ID",
    "name": "New location name",
    "address": {
      "address_line_1": "1234 Peachtree St. NE",
      "locality": "Atlanta",
      "administrative_district_level_1": "GA",
      "postal_code": "30309"
    },
    "capabilities": [
      "CREDIT_CARD_PROCESSING"
    ],
    "status": "ACTIVE",
    "created_at": "2019-07-19T17:58:25Z",
    "merchant_id": "MERCHANT_ID",
    "country": "US",
    "language_code": "en-US",
    "currency": "USD",
    "type": "PHYSICAL",
    "description": "My new location.",
    "website_url": "examplewebsite.com",
    "twitter_username": "twitter",
    "instagram_username": "instagram",
    "coordinates": {
      "latitude": 33.788567,
      "longitude": -84.466947
    },
    "mcc": "1234"
  }
}

Share Feedback

Thanks for visiting the Square API documentation. What's on your mind?