All URIs are relative to https://jsapi-integration.us-east-1.elasticbeanstalk.com
Method | HTTP request | Description |
---|---|---|
GetCountries | GET /location/countries | Get a list of countries |
GetCountryByGeoLocation | GET /location/geolocation/country | Get the iso3 code of your country |
GetCountryStates | GET /location/countries/{country_code_iso3}/states | Get a list of a country's states |
GetCurrencyByGeoLocation | GET /location/geolocation/currency | Get the currency information of your country |
List GetCountries ()
Get a list of countries
Permissions Needed: ANY
using System;
using System.Diagnostics;
using com.knetikcloud.Api;
using com.knetikcloud.Client;
using com.knetikcloud.Model;
namespace Example
{
public class GetCountriesExample
{
public void main()
{
// Configure OAuth2 access token for authorization: oauth2_client_credentials_grant
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
// Configure OAuth2 access token for authorization: oauth2_password_grant
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new LocationsApi();
try
{
// Get a list of countries
List<CountryResource> result = apiInstance.GetCountries();
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling LocationsApi.GetCountries: " + e.Message );
}
}
}
}
This endpoint does not need any parameter.
oauth2_client_credentials_grant, oauth2_password_grant
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
string GetCountryByGeoLocation ()
Get the iso3 code of your country
Determined by geo ip location.
Permissions Needed: ANY
using System;
using System.Diagnostics;
using com.knetikcloud.Api;
using com.knetikcloud.Client;
using com.knetikcloud.Model;
namespace Example
{
public class GetCountryByGeoLocationExample
{
public void main()
{
// Configure OAuth2 access token for authorization: oauth2_client_credentials_grant
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
// Configure OAuth2 access token for authorization: oauth2_password_grant
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new LocationsApi();
try
{
// Get the iso3 code of your country
string result = apiInstance.GetCountryByGeoLocation();
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling LocationsApi.GetCountryByGeoLocation: " + e.Message );
}
}
}
}
This endpoint does not need any parameter.
string
oauth2_client_credentials_grant, oauth2_password_grant
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List GetCountryStates (string countryCodeIso3)
Get a list of a country's states
Permissions Needed: ANY
using System;
using System.Diagnostics;
using com.knetikcloud.Api;
using com.knetikcloud.Client;
using com.knetikcloud.Model;
namespace Example
{
public class GetCountryStatesExample
{
public void main()
{
// Configure OAuth2 access token for authorization: oauth2_client_credentials_grant
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
// Configure OAuth2 access token for authorization: oauth2_password_grant
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new LocationsApi();
var countryCodeIso3 = countryCodeIso3_example; // string | The iso3 code of the country
try
{
// Get a list of a country's states
List<StateResource> result = apiInstance.GetCountryStates(countryCodeIso3);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling LocationsApi.GetCountryStates: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
countryCodeIso3 | string | The iso3 code of the country |
oauth2_client_credentials_grant, oauth2_password_grant
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CurrencyResource GetCurrencyByGeoLocation ()
Get the currency information of your country
Determined by geo ip location, currency to country mapping and a fallback setting.
Permissions Needed: ANY
using System;
using System.Diagnostics;
using com.knetikcloud.Api;
using com.knetikcloud.Client;
using com.knetikcloud.Model;
namespace Example
{
public class GetCurrencyByGeoLocationExample
{
public void main()
{
// Configure OAuth2 access token for authorization: oauth2_client_credentials_grant
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
// Configure OAuth2 access token for authorization: oauth2_password_grant
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new LocationsApi();
try
{
// Get the currency information of your country
CurrencyResource result = apiInstance.GetCurrencyByGeoLocation();
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling LocationsApi.GetCurrencyByGeoLocation: " + e.Message );
}
}
}
}
This endpoint does not need any parameter.
oauth2_client_credentials_grant, oauth2_password_grant
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]