All URIs are relative to https://api.flipdish.co
| Method | HTTP request | Description |
|---|---|---|
| createVoucher | POST /api/v1.0/vouchers/{appId} | |
| getVoucherByCode | GET /api/v1.0/{appId}/vouchers/code/{code} | |
| getVoucherById | GET /api/v1.0/vouchers/{voucherId} | |
| getVoucherStatsById | GET /api/v1.0/vouchers/stats/{voucherId} | |
| getVoucherValidityPeriods | GET /api/v1.0/{appId}/vouchers/{voucherId}/validity-periods | |
| getVouchers | GET /api/v1.0/{appId}/vouchers/summaries | |
| getVouchersByCustomerForApp | GET /api/v1.0/vouchers/{appId}/customer/{customerId} | |
| setVoucherValidityPeriodsSimplified | POST /api/v1.0/{appId}/vouchers/{voucherId}/validity-periods-simplified | |
| updateVoucher | POST /api/v1.0/vouchers/{voucherId} | |
| updateVoucherUsage | POST /api/v1.0/{appId}/vouchers/{voucherId}/usage |
RestApiResultVoucherWithStats createVoucher(appId, voucher)
// Import classes:
//import com.flipdish.apiclient.ApiClient;
//import com.flipdish.apiclient.ApiException;
//import com.flipdish.apiclient.Configuration;
//import com.flipdish.apiclient.auth.*;
//import com.flipdish.apiclient.api.VouchersApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");
VouchersApi apiInstance = new VouchersApi();
String appId = "appId_example"; // String |
CreateVoucher voucher = new CreateVoucher(); // CreateVoucher |
try {
RestApiResultVoucherWithStats result = apiInstance.createVoucher(appId, voucher);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling VouchersApi#createVoucher");
e.printStackTrace();
}| Name | Type | Description | Notes |
|---|---|---|---|
| appId | String | ||
| voucher | CreateVoucher |
- Content-Type: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
- Accept: application/json, text/json, application/xml, text/xml
RestApiResultVoucher getVoucherByCode(appId, code)
// Import classes:
//import com.flipdish.apiclient.ApiClient;
//import com.flipdish.apiclient.ApiException;
//import com.flipdish.apiclient.Configuration;
//import com.flipdish.apiclient.auth.*;
//import com.flipdish.apiclient.api.VouchersApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");
VouchersApi apiInstance = new VouchersApi();
String appId = "appId_example"; // String |
String code = "code_example"; // String |
try {
RestApiResultVoucher result = apiInstance.getVoucherByCode(appId, code);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling VouchersApi#getVoucherByCode");
e.printStackTrace();
}| Name | Type | Description | Notes |
|---|---|---|---|
| appId | String | ||
| code | String |
- Content-Type: Not defined
- Accept: application/json, text/json, application/xml, text/xml
RestApiResultVoucherWithStats getVoucherById(voucherId)
// Import classes:
//import com.flipdish.apiclient.ApiClient;
//import com.flipdish.apiclient.ApiException;
//import com.flipdish.apiclient.Configuration;
//import com.flipdish.apiclient.auth.*;
//import com.flipdish.apiclient.api.VouchersApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");
VouchersApi apiInstance = new VouchersApi();
Integer voucherId = 56; // Integer |
try {
RestApiResultVoucherWithStats result = apiInstance.getVoucherById(voucherId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling VouchersApi#getVoucherById");
e.printStackTrace();
}| Name | Type | Description | Notes |
|---|---|---|---|
| voucherId | Integer |
- Content-Type: Not defined
- Accept: application/json, text/json, application/xml, text/xml
RestApiArrayResultVoucherDataPoint getVoucherStatsById(voucherId, aggregateDataBy, dataPointLimit)
// Import classes:
//import com.flipdish.apiclient.ApiClient;
//import com.flipdish.apiclient.ApiException;
//import com.flipdish.apiclient.Configuration;
//import com.flipdish.apiclient.auth.*;
//import com.flipdish.apiclient.api.VouchersApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");
VouchersApi apiInstance = new VouchersApi();
Integer voucherId = 56; // Integer |
String aggregateDataBy = "aggregateDataBy_example"; // String |
Integer dataPointLimit = 56; // Integer |
try {
RestApiArrayResultVoucherDataPoint result = apiInstance.getVoucherStatsById(voucherId, aggregateDataBy, dataPointLimit);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling VouchersApi#getVoucherStatsById");
e.printStackTrace();
}| Name | Type | Description | Notes |
|---|---|---|---|
| voucherId | Integer | ||
| aggregateDataBy | String | [enum: Daily, Weekly, Monthly] | |
| dataPointLimit | Integer | [optional] |
RestApiArrayResultVoucherDataPoint
- Content-Type: Not defined
- Accept: application/json, text/json, application/xml, text/xml
getVoucherValidityPeriods(appId, voucherId)
// Import classes:
//import com.flipdish.apiclient.ApiClient;
//import com.flipdish.apiclient.ApiException;
//import com.flipdish.apiclient.Configuration;
//import com.flipdish.apiclient.auth.*;
//import com.flipdish.apiclient.api.VouchersApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");
VouchersApi apiInstance = new VouchersApi();
String appId = "appId_example"; // String |
Integer voucherId = 56; // Integer |
try {
apiInstance.getVoucherValidityPeriods(appId, voucherId);
} catch (ApiException e) {
System.err.println("Exception when calling VouchersApi#getVoucherValidityPeriods");
e.printStackTrace();
}| Name | Type | Description | Notes |
|---|---|---|---|
| appId | String | ||
| voucherId | Integer |
null (empty response body)
- Content-Type: Not defined
- Accept: application/json, text/json, application/xml, text/xml
RestApiPaginationResultVoucherSummary getVouchers(appId, pageIndex, pageSize, searchCodes, statusSearch, typeSearch, subTypeSearch, storeIds, channelRestrictions)
// Import classes:
//import com.flipdish.apiclient.ApiClient;
//import com.flipdish.apiclient.ApiException;
//import com.flipdish.apiclient.Configuration;
//import com.flipdish.apiclient.auth.*;
//import com.flipdish.apiclient.api.VouchersApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");
VouchersApi apiInstance = new VouchersApi();
String appId = "appId_example"; // String |
Integer pageIndex = 56; // Integer |
Integer pageSize = 56; // Integer |
List<String> searchCodes = Arrays.asList("searchCodes_example"); // List<String> |
List<String> statusSearch = Arrays.asList("statusSearch_example"); // List<String> |
List<String> typeSearch = Arrays.asList("typeSearch_example"); // List<String> |
List<String> subTypeSearch = Arrays.asList("subTypeSearch_example"); // List<String> |
List<Integer> storeIds = Arrays.asList(56); // List<Integer> |
List<String> channelRestrictions = Arrays.asList("channelRestrictions_example"); // List<String> |
try {
RestApiPaginationResultVoucherSummary result = apiInstance.getVouchers(appId, pageIndex, pageSize, searchCodes, statusSearch, typeSearch, subTypeSearch, storeIds, channelRestrictions);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling VouchersApi#getVouchers");
e.printStackTrace();
}| Name | Type | Description | Notes |
|---|---|---|---|
| appId | String | ||
| pageIndex | Integer | [optional] | |
| pageSize | Integer | [optional] | |
| searchCodes | List<String> | [optional] | |
| statusSearch | List<String> | [optional] [enum: Valid, NotYetValid, Expired, Used, Disabled] | |
| typeSearch | List<String> | [optional] [enum: PercentageDiscount, LumpDiscount, AddItem, CreditNote, FreeDelivery] | |
| subTypeSearch | List<String> | [optional] [enum: None, SignUp, Loyalty, Loyalty25, Retention, SecondaryRetention, Custom] | |
| storeIds | List<Integer> | [optional] | |
| channelRestrictions | List<String> | [optional] [enum: Ios, Android, Web, Kiosk, Pos, Google] |
RestApiPaginationResultVoucherSummary
- Content-Type: Not defined
- Accept: application/json, text/json, application/xml, text/xml
RestApiArrayResultVoucherSummary getVouchersByCustomerForApp(appId, customerId)
// Import classes:
//import com.flipdish.apiclient.ApiClient;
//import com.flipdish.apiclient.ApiException;
//import com.flipdish.apiclient.Configuration;
//import com.flipdish.apiclient.auth.*;
//import com.flipdish.apiclient.api.VouchersApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");
VouchersApi apiInstance = new VouchersApi();
String appId = "appId_example"; // String |
Integer customerId = 56; // Integer |
try {
RestApiArrayResultVoucherSummary result = apiInstance.getVouchersByCustomerForApp(appId, customerId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling VouchersApi#getVouchersByCustomerForApp");
e.printStackTrace();
}| Name | Type | Description | Notes |
|---|---|---|---|
| appId | String | ||
| customerId | Integer |
RestApiArrayResultVoucherSummary
- Content-Type: Not defined
- Accept: application/json, text/json, application/xml, text/xml
setVoucherValidityPeriodsSimplified(appId, voucherId, request)
// Import classes:
//import com.flipdish.apiclient.ApiClient;
//import com.flipdish.apiclient.ApiException;
//import com.flipdish.apiclient.Configuration;
//import com.flipdish.apiclient.auth.*;
//import com.flipdish.apiclient.api.VouchersApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");
VouchersApi apiInstance = new VouchersApi();
String appId = "appId_example"; // String |
Integer voucherId = 56; // Integer |
SetVoucherValidityPeriodsSimplifiedRequest request = new SetVoucherValidityPeriodsSimplifiedRequest(); // SetVoucherValidityPeriodsSimplifiedRequest |
try {
apiInstance.setVoucherValidityPeriodsSimplified(appId, voucherId, request);
} catch (ApiException e) {
System.err.println("Exception when calling VouchersApi#setVoucherValidityPeriodsSimplified");
e.printStackTrace();
}| Name | Type | Description | Notes |
|---|---|---|---|
| appId | String | ||
| voucherId | Integer | ||
| request | SetVoucherValidityPeriodsSimplifiedRequest |
null (empty response body)
- Content-Type: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
- Accept: application/json, text/json, application/xml, text/xml
RestApiResultVoucherWithStats updateVoucher(voucherId, voucher, storeId, percentValue, lumpValue, maxDiscountAmount)
// Import classes:
//import com.flipdish.apiclient.ApiClient;
//import com.flipdish.apiclient.ApiException;
//import com.flipdish.apiclient.Configuration;
//import com.flipdish.apiclient.auth.*;
//import com.flipdish.apiclient.api.VouchersApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");
VouchersApi apiInstance = new VouchersApi();
Integer voucherId = 56; // Integer |
UpdateVoucher voucher = new UpdateVoucher(); // UpdateVoucher |
List<Integer> storeId = Arrays.asList(56); // List<Integer> |
Integer percentValue = 56; // Integer |
Double lumpValue = 3.4D; // Double |
Double maxDiscountAmount = 3.4D; // Double |
try {
RestApiResultVoucherWithStats result = apiInstance.updateVoucher(voucherId, voucher, storeId, percentValue, lumpValue, maxDiscountAmount);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling VouchersApi#updateVoucher");
e.printStackTrace();
}| Name | Type | Description | Notes |
|---|---|---|---|
| voucherId | Integer | ||
| voucher | UpdateVoucher | ||
| storeId | List<Integer> | [optional] | |
| percentValue | Integer | [optional] | |
| lumpValue | Double | [optional] | |
| maxDiscountAmount | Double | [optional] |
- Content-Type: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
- Accept: application/json, text/json, application/xml, text/xml
updateVoucherUsage(appId, voucherId, voucherUsage)
// Import classes:
//import com.flipdish.apiclient.ApiClient;
//import com.flipdish.apiclient.ApiException;
//import com.flipdish.apiclient.Configuration;
//import com.flipdish.apiclient.auth.*;
//import com.flipdish.apiclient.api.VouchersApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");
VouchersApi apiInstance = new VouchersApi();
String appId = "appId_example"; // String |
Integer voucherId = 56; // Integer |
UpdateVoucherUsage voucherUsage = new UpdateVoucherUsage(); // UpdateVoucherUsage |
try {
apiInstance.updateVoucherUsage(appId, voucherId, voucherUsage);
} catch (ApiException e) {
System.err.println("Exception when calling VouchersApi#updateVoucherUsage");
e.printStackTrace();
}| Name | Type | Description | Notes |
|---|---|---|---|
| appId | String | ||
| voucherId | Integer | ||
| voucherUsage | UpdateVoucherUsage |
null (empty response body)
- Content-Type: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
- Accept: application/json, text/json, application/xml, text/xml