All URIs are relative to https://connect.squareup.com/
Method | HTTP request | Description |
---|---|---|
CreateLocation | Post /v2/locations | CreateLocation |
ListLocations | Get /v2/locations | ListLocations |
RetrieveLocation | Get /v2/locations/{location_id} | RetrieveLocation |
UpdateLocation | Put /v2/locations/{location_id} | UpdateLocation |
CreateLocationResponse CreateLocation(ctx, body) CreateLocation
Creates a location.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
body | CreateLocationRequest | An object containing the fields to POST for the request. |
See the corresponding object definition for field details. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListLocationsResponse ListLocations(ctx, ) ListLocations
Provides information of all locations of a business. Many Square API endpoints require a location_id
parameter. The id
field of the Location
objects returned by this endpoint correspond to that location_id
parameter.
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RetrieveLocationResponse RetrieveLocation(ctx, locationId) RetrieveLocation
Retrieves details of a location. You can specify "main" as the location ID to retrieve details of the main location.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
locationId | string | The ID of the location to retrieve. If you specify the string "main", then the endpoint returns the main location. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateLocationResponse UpdateLocation(ctx, body, locationId) UpdateLocation
Updates a location.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
body | UpdateLocationRequest | An object containing the fields to POST for the request. |
See the corresponding object definition for field details. | locationId | string| The ID of the location to update. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]