Skip to content

Latest commit

 

History

History
124 lines (76 loc) · 4.22 KB

LocationsApi.md

File metadata and controls

124 lines (76 loc) · 4.22 KB

{{classname}}

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

CreateLocation

CreateLocationResponse CreateLocation(ctx, body) CreateLocation

Creates a location.

Required Parameters

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. |

Return type

CreateLocationResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ListLocations

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.

Required Parameters

This endpoint does not need any parameter.

Return type

ListLocationsResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RetrieveLocation

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.

Required Parameters

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.

Return type

RetrieveLocationResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdateLocation

UpdateLocationResponse UpdateLocation(ctx, body, locationId) UpdateLocation

Updates a location.

Required Parameters

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. |

Return type

UpdateLocationResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]