All URIs are relative to https://api.messente.com/v1
| Method | HTTP request | Description |
|---|---|---|
| getPricelist | GET /pricelist | Get pricelist for account |
| getPrices | GET /prices | Get pricing for a specific country |
String getPricelist(username, password)
Get pricelist for account
// Import classes:
import com.messente.ApiClient;
import com.messente.ApiException;
import com.messente.Configuration;
import com.messente.auth.*;
import com.messente.models.*;
import com.messente.api.PricingApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.messente.com/v1");
// Configure API key authorization: apiPassword
ApiKeyAuth apiPassword = (ApiKeyAuth) defaultClient.getAuthentication("apiPassword");
apiPassword.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiPassword.setApiKeyPrefix("Token");
// Configure API key authorization: apiUsername
ApiKeyAuth apiUsername = (ApiKeyAuth) defaultClient.getAuthentication("apiUsername");
apiUsername.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiUsername.setApiKeyPrefix("Token");
PricingApi apiInstance = new PricingApi(defaultClient);
String username = "username_example"; // String | The API username
String password = "password_example"; // String | The API password
try {
String result = apiInstance.getPricelist(username, password);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PricingApi#getPricelist");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| username | String | The API username | |
| password | String | The API password |
String
- Content-Type: Not defined
- Accept: text/plain
| Status code | Description | Response headers |
|---|---|---|
| 200 | Both errors and success responses are returned as plain text with HTTP status 200. Unsuccessful responses contain the error code, while successful ones contain the pricelist in CSV format. | - |
Price getPrices(username, password, country, format)
Get pricing for a specific country
// Import classes:
import com.messente.ApiClient;
import com.messente.ApiException;
import com.messente.Configuration;
import com.messente.auth.*;
import com.messente.models.*;
import com.messente.api.PricingApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.messente.com/v1");
// Configure API key authorization: apiPassword
ApiKeyAuth apiPassword = (ApiKeyAuth) defaultClient.getAuthentication("apiPassword");
apiPassword.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiPassword.setApiKeyPrefix("Token");
// Configure API key authorization: apiUsername
ApiKeyAuth apiUsername = (ApiKeyAuth) defaultClient.getAuthentication("apiUsername");
apiUsername.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiUsername.setApiKeyPrefix("Token");
PricingApi apiInstance = new PricingApi(defaultClient);
String username = "username_example"; // String | The API username
String password = "password_example"; // String | The API password
String country = "EE"; // String | The country code, for which to get the prices
String format = "format_example"; // String | The format of the response. Can be either 'json' or 'xml'. If not specified, defaults to 'json'.
try {
Price result = apiInstance.getPrices(username, password, country, format);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PricingApi#getPrices");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| username | String | The API username | |
| password | String | The API password | |
| country | String | The country code, for which to get the prices | |
| format | String | The format of the response. Can be either 'json' or 'xml'. If not specified, defaults to 'json'. | [optional] |
- Content-Type: Not defined
- Accept: application/json, application/xml, text/plain; charset=utf-8
| Status code | Description | Response headers |
|---|---|---|
| 200 | Unsuccessful responses are returned as plain text with an error code, while successful ones contain either JSON or XML depending on the user's choice. | - |