getCompanies
Retrieve an array of Logistiqo companies by accessing this endpoint. The server will respond with an array of JSON objects that represent the respective companies.
/logistiqo/rest/api/v-1/company/get
Usage and SDK Samples
curl -X GET\
-H "X-API-Key: [[apiKey]]"\
-H "Authorization: Basic [[basicHash]]"\
-H "Accept: application/json"\
"https://your-subdomain.logistiqo.com/logistiqo/rest/api/v-1/company/get"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CompanyApi;
import java.io.File;
import java.util.*;
public class CompanyApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: BasicAuth
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
BasicAuth.setUsername("YOUR USERNAME");
BasicAuth.setPassword("YOUR PASSWORD");
CompanyApi apiInstance = new CompanyApi();
try {
array[CompanyObject] result = apiInstance.getCompanies();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CompanyApi#getCompanies");
e.printStackTrace();
}
}
}
import io.swagger.client.api.CompanyApi;
public class CompanyApiExample {
public static void main(String[] args) {
CompanyApi apiInstance = new CompanyApi();
try {
array[CompanyObject] result = apiInstance.getCompanies();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CompanyApi#getCompanies");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Key"];
// Configure HTTP basic authorization (authentication scheme: BasicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];
CompanyApi *apiInstance = [[CompanyApi alloc] init];
// Retrieve an array of Logistiqo companies by accessing this endpoint. The server will respond with an array of JSON objects that represent the respective companies.
[apiInstance getCompaniesWithCompletionHandler:
^(array[CompanyObject] output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var LogistiqoApi = require('logistiqo_api');
var defaultClient = LogistiqoApi.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['X-API-Key'] = "Token"
// Configure HTTP basic authorization: BasicAuth
var BasicAuth = defaultClient.authentications['BasicAuth'];
BasicAuth.username = 'YOUR USERNAME'
BasicAuth.password = 'YOUR PASSWORD'
var api = new LogistiqoApi.CompanyApi()
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.getCompanies(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class getCompaniesExample
{
public void main()
{
// Configure API key authorization: ApiKeyAuth
Configuration.Default.ApiKey.Add("X-API-Key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("X-API-Key", "Bearer"); // Configure HTTP basic authorization: BasicAuth
Configuration.Default.Username = "YOUR_USERNAME";
Configuration.Default.Password = "YOUR_PASSWORD";
var apiInstance = new CompanyApi();
try
{
// Retrieve an array of Logistiqo companies by accessing this endpoint. The server will respond with an array of JSON objects that represent the respective companies.
array[CompanyObject] result = apiInstance.getCompanies();
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling CompanyApi.getCompanies: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');// Configure HTTP basic authorization: BasicAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');
$api_instance = new Swagger\Client\ApiCompanyApi();
try {
$result = $api_instance->getCompanies();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CompanyApi->getCompanies: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CompanyApi;
# Configure API key authorization: ApiKeyAuth
$WWW::SwaggerClient::Configuration::api_key->{'X-API-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-API-Key'} = "Bearer";# Configure HTTP basic authorization: BasicAuth
$WWW::SwaggerClient::Configuration::username = 'YOUR_USERNAME';
$WWW::SwaggerClient::Configuration::password = 'YOUR_PASSWORD';
my $api_instance = WWW::SwaggerClient::CompanyApi->new();
eval {
my $result = $api_instance->getCompanies();
print Dumper($result);
};
if ($@) {
warn "Exception when calling CompanyApi->getCompanies: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: ApiKeyAuth
swagger_client.configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-API-Key'] = 'Bearer'# Configure HTTP basic authorization: BasicAuth
swagger_client.configuration.username = 'YOUR_USERNAME'
swagger_client.configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = swagger_client.CompanyApi()
try:
# Retrieve an array of Logistiqo companies by accessing this endpoint. The server will respond with an array of JSON objects that represent the respective companies.
api_response = api_instance.get_companies()
pprint(api_response)
except ApiException as e:
print("Exception when calling CompanyApi->getCompanies: %s\n" % e)