Skip to content

Latest commit

 

History

History
96 lines (64 loc) · 2.66 KB

V1LocationsApi.md

File metadata and controls

96 lines (64 loc) · 2.66 KB

SquareConnect.V1LocationsApi

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

Method HTTP request Description
listLocations GET /v1/me/locations ListLocations
retrieveBusiness GET /v1/me RetrieveBusiness

listLocations

Note: This endpoint is deprecated.

[V1Merchant] listLocations()

ListLocations

Provides details for all business locations associated with a Square account, including the Square-assigned object ID for the location. --- - Deprecation date: 2019-11-20 - Retirement date: 2020-11-18 - Migration guide ---

Example

var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new SquareConnect.V1LocationsApi();
apiInstance.listLocations().then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

This endpoint does not need any parameter.

Return type

[V1Merchant]

Authorization

oauth2

HTTP request headers

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

retrieveBusiness

Note: This endpoint is deprecated.

V1Merchant retrieveBusiness()

RetrieveBusiness

Get the general information for a business. --- - Deprecation date: 2019-11-20 - Retirement date: 2020-11-18 - Migration guide ---

Example

var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new SquareConnect.V1LocationsApi();
apiInstance.retrieveBusiness().then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

This endpoint does not need any parameter.

Return type

V1Merchant

Authorization

oauth2

HTTP request headers

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