Skip to content
This repository has been archived by the owner on Apr 23, 2021. It is now read-only.

Latest commit

 

History

History
100 lines (66 loc) · 3.03 KB

V1LocationsApi.md

File metadata and controls

100 lines (66 loc) · 3.03 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.

\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]