Skip to content

Latest commit

 

History

History
82 lines (57 loc) · 2.55 KB

CompanyApi.md

File metadata and controls

82 lines (57 loc) · 2.55 KB

Spy\MsbcRestClient\CompanyApi

All URIs are relative to https://api.businesscentral.dynamics.com/v2.0/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/Production/ODataV4/Company('XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'), except if the operation defines another base path.

Method HTTP request Description
getCompanies() GET /companies

getCompanies()

getCompanies($select): \Spy\MsbcRestClient\Model\CompaniesListResponse

URI(s):

Example

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


// Configure Bearer authorization: bearerAuth
$config = Spy\MsbcRestClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Spy\MsbcRestClient\Api\CompanyApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$select = 'select_example'; // string

$hostIndex = 0;
$variables = [
    'tenantID' => 'YOUR_VALUE',
    'environment' => 'YOUR_VALUE',
];

try {
    $result = $apiInstance->getCompanies($select, $hostIndex, $variables);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CompanyApi->getCompanies: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
select string [optional]
hostIndex null int Host index. Defaults to null. If null, then the library will use $this->hostIndex instead
variables array Associative array of variables to pass to the host. Defaults to empty array. [optional]

Return type

\Spy\MsbcRestClient\Model\CompaniesListResponse

Authorization

bearerAuth

HTTP request headers

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

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