Create location
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.
Name | Description |
---|---|
location
|
The initial values of the location being created. The |
Response Fields
Name | Description |
---|---|
errors
|
Information about errors encountered during the request. |
location
|
The newly created |
Examples
- cURL
- Ruby
- Python
- C#
- Java
- PHP
- Node.js
curl https://connect.squareup.com/v2/locations \
-X POST \
-H 'Square-Version: 2023-01-19' \
-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"
}
}
}'
{
"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"
}
}