postCompanies
This API allows you to add companies. You need to provide a valid JSON request body with the company information.
# Companies
/logistiqo/rest/api/v-1/company
Usage and SDK Samples
curl -X POST\
-H "X-API-Key: [[apiKey]]"\
-H "Authorization: Basic [[basicHash]]"\
-H "Content-Type: application/json"\
"https://your-subdomain.logistiqo.com/logistiqo/rest/api/v-1/company"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CompaniesApi;
import java.io.File;
import java.util.*;
public class CompaniesApiExample {
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");
CompaniesApi apiInstance = new CompaniesApi();
array[CompanyObject] body = ; // array[CompanyObject] |
try {
apiInstance.postCompanies(body);
} catch (ApiException e) {
System.err.println("Exception when calling CompaniesApi#postCompanies");
e.printStackTrace();
}
}
}
import io.swagger.client.api.CompaniesApi;
public class CompaniesApiExample {
public static void main(String[] args) {
CompaniesApi apiInstance = new CompaniesApi();
array[CompanyObject] body = ; // array[CompanyObject] |
try {
apiInstance.postCompanies(body);
} catch (ApiException e) {
System.err.println("Exception when calling CompaniesApi#postCompanies");
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"];
array[CompanyObject] *body = ; //
CompaniesApi *apiInstance = [[CompaniesApi alloc] init];
// This API allows you to add companies. You need to provide a valid JSON request body with the company information.
[apiInstance postCompaniesWith:body
completionHandler: ^(NSError* error) {
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.CompaniesApi()
var body = ; // {{array[CompanyObject]}}
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
api.postCompanies(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class postCompaniesExample
{
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 CompaniesApi();
var body = new array[CompanyObject](); // array[CompanyObject] |
try
{
// This API allows you to add companies. You need to provide a valid JSON request body with the company information.
apiInstance.postCompanies(body);
}
catch (Exception e)
{
Debug.Print("Exception when calling CompaniesApi.postCompanies: " + 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\ApiCompaniesApi();
$body = ; // array[CompanyObject] |
try {
$api_instance->postCompanies($body);
} catch (Exception $e) {
echo 'Exception when calling CompaniesApi->postCompanies: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CompaniesApi;
# 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::CompaniesApi->new();
my $body = [WWW::SwaggerClient::Object::array[CompanyObject]->new()]; # array[CompanyObject] |
eval {
$api_instance->postCompanies(body => $body);
};
if ($@) {
warn "Exception when calling CompaniesApi->postCompanies: $@\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.CompaniesApi()
body = # array[CompanyObject] |
try:
# This API allows you to add companies. You need to provide a valid JSON request body with the company information.
api_instance.post_companies(body)
except ApiException as e:
print("Exception when calling CompaniesApi->postCompanies: %s\n" % e)
Parameters
Name | Description |
---|---|
body * |