Skip to content

Latest commit

 

History

History
70 lines (50 loc) · 1.88 KB

LocationsApi.md

File metadata and controls

70 lines (50 loc) · 1.88 KB

Square.Connect.Api.LocationsApi

All URIs are relative to https://connect.squareup.com

Method HTTP request Description
ListLocations GET /v2/locations ListLocations

ListLocations

ListLocationsResponse ListLocations ()

ListLocations

Provides the details for all of a business's locations. Most other Connect API endpoints have a required location_id path parameter. The id field of the Location objects returned by this endpoint correspond to that location_id parameter.

Example

using System;
using System.Diagnostics;
using Square.Connect.Api;
using Square.Connect.Client;
using Square.Connect.Model;

namespace Example
{
    public class ListLocationsExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new LocationsApi();

            try
            {
                // ListLocations
                ListLocationsResponse result = apiInstance.ListLocations();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LocationsApi.ListLocations: " + e.Message );
            }
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

ListLocationsResponse

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]