SquareConnect\V1LocationsApi

November 20, 2019 ยท View on GitHub

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

MethodHTTP requestDescription
listLocationsGET /v1/me/locationsListLocations
retrieveBusinessGET /v1/meRetrieveBusiness

listLocations

Note: This endpoint is deprecated.

\SquareConnect\Model\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

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new SquareConnect\Api\V1LocationsApi();

try {
    $result = $apiInstance->listLocations();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling V1LocationsApi->listLocations: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

This endpoint does not need any parameter.

Return type

\SquareConnect\Model\V1Merchant[]

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]

retrieveBusiness

Note: This endpoint is deprecated.

\SquareConnect\Model\V1Merchant retrieveBusiness()

RetrieveBusiness

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

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new SquareConnect\Api\V1LocationsApi();

try {
    $result = $apiInstance->retrieveBusiness();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling V1LocationsApi->retrieveBusiness: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

This endpoint does not need any parameter.

Return type

\SquareConnect\Model\V1Merchant

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]