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

You are viewing an old version of the API
Update location

PUT /v2/locations/{location_id}

Updates a location.


Permissions
MERCHANT_PROFILE_WRITE
Guide
Update a location
Try in API Explorer
Name Description
location_id
string

Required

The ID of the location to update.

Name Description
location
Location

The Location object with only the fields to update.

Response Fields

Name Description
errors
Error [ ]

Information about errors encountered during the request.

location
Location

The updated Location object.

Examples

You are viewing an old version of the API
PUT /v2/locations/{location_id}
cURL
  • cURL
  • Ruby
  • Python
  • C#
  • Java
  • PHP
  • Node.js
curl https://connect.squareup.com/v2/locations/3Z4V4WHQK64X9 \
  -X PUT \
  -H 'Square-Version: 2022-09-21' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "location": {
      "description": "Midtown Atlanta store - Open weekends",
      "business_hours": {
        "periods": [
          {
            "day_of_week": "FRI",
            "start_local_time": "07:00",
            "end_local_time": "18:00"
          },
          {
            "day_of_week": "SAT",
            "start_local_time": "07:00",
            "end_local_time": "18:00"
          },
          {
            "day_of_week": "SUN",
            "start_local_time": "09:00",
            "end_local_time": "15:00"
          }
        ]
      }
    }
  }'
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 - Open weekends",
    "coordinates": {
      "latitude": 33.7889,
      "longitude": -84.3841
    },
    "business_hours": {
      "periods": [
        {
          "day_of_week": "FRI",
          "start_local_time": "07:00",
          "end_local_time": "18:00"
        },
        {
          "day_of_week": "SAT",
          "start_local_time": "07:00",
          "end_local_time": "18:00"
        },
        {
          "day_of_week": "SUN",
          "start_local_time": "09:00",
          "end_local_time": "15:00"
        }
      ]
    },
    "business_name": "Jet Fuel Coffee",
    "mcc": "7299"
  }
}