All URIs are relative to https://api.voucherify.io
Method | HTTP request | Description |
---|---|---|
validateStackedDiscounts | POST /v1/validations | Validate Stackable Discounts |
ValidationsValidateResponseBody validateStackedDiscounts(validationsValidateRequestBody)
Validate Stackable Discounts
Verify redeemables provided in the request. This method is designed for server side integration which means that it is accessible only through private keys.
// Import classes:
import voucherify.client.ApiClient;
import voucherify.client.ApiException;
import voucherify.client.Configuration;
import voucherify.client.auth.*;
import voucherify.client.models.*;
import voucherify.client.api.ValidationsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.voucherify.io");
// Configure API key authorization: X-App-Id
ApiKeyAuth X-App-Id = (ApiKeyAuth) defaultClient.getAuthentication("X-App-Id");
X-App-Id.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-App-Id.setApiKeyPrefix("Token");
// Configure API key authorization: X-App-Token
ApiKeyAuth X-App-Token = (ApiKeyAuth) defaultClient.getAuthentication("X-App-Token");
X-App-Token.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-App-Token.setApiKeyPrefix("Token");
ValidationsApi apiInstance = new ValidationsApi(defaultClient);
ValidationsValidateRequestBody validationsValidateRequestBody = new ValidationsValidateRequestBody(); // ValidationsValidateRequestBody |
try {
ValidationsValidateResponseBody result = apiInstance.validateStackedDiscounts(validationsValidateRequestBody);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ValidationsApi#validateStackedDiscounts");
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 |
---|---|---|---|
validationsValidateRequestBody | ValidationsValidateRequestBody | [optional] |
ValidationsValidateResponseBody
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Depending on your project settings: all redeemables must be valid or just one must be valid to result as valid validation. See https://support.voucherify.io/article/604-stacking-rules#application-rules | - |