Class CampaignsApi

java.lang.Object
io.voucherify.client.api.CampaignsApi

public class CampaignsApi extends Object
  • Constructor Details

    • CampaignsApi

      public CampaignsApi()
    • CampaignsApi

      public CampaignsApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • getHostIndex

      public int getHostIndex()
    • setHostIndex

      public void setHostIndex(int hostIndex)
    • getCustomBaseUrl

      public String getCustomBaseUrl()
    • setCustomBaseUrl

      public void setCustomBaseUrl(String customBaseUrl)
    • addVoucherWithSpecificCodeToCampaignCall

      public okhttp3.Call addVoucherWithSpecificCodeToCampaignCall(String campaignId, String code, CampaignsVouchersCreateRequestBody campaignsVouchersCreateRequestBody, ApiCallback _callback) throws ApiException
      Build call for addVoucherWithSpecificCodeToCampaign
      Parameters:
      campaignId - The campaign ID or name of the campaign to which voucher will be added. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. (required)
      code - A custom **code** that identifies the voucher. (required)
      campaignsVouchersCreateRequestBody - Specify the voucher parameters that you would like to overwrite. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • addVoucherWithSpecificCodeToCampaign

      public CampaignsVouchersCreateResponseBody addVoucherWithSpecificCodeToCampaign(String campaignId, String code, CampaignsVouchersCreateRequestBody campaignsVouchersCreateRequestBody) throws ApiException
      Add Voucher with Specific Code to Campaign This method gives a possibility to add a new voucher to an existing campaign. The voucher definition will be inherited from the definition kept in the campaign profile. However, you are able to overwrite a few properties inherited from the campaign.
      Parameters:
      campaignId - The campaign ID or name of the campaign to which voucher will be added. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. (required)
      code - A custom **code** that identifies the voucher. (required)
      campaignsVouchersCreateRequestBody - Specify the voucher parameters that you would like to overwrite. (optional)
      Returns:
      CampaignsVouchersCreateResponseBody
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • addVoucherWithSpecificCodeToCampaignWithHttpInfo

      public ApiResponse<CampaignsVouchersCreateResponseBody> addVoucherWithSpecificCodeToCampaignWithHttpInfo(String campaignId, String code, CampaignsVouchersCreateRequestBody campaignsVouchersCreateRequestBody) throws ApiException
      Add Voucher with Specific Code to Campaign This method gives a possibility to add a new voucher to an existing campaign. The voucher definition will be inherited from the definition kept in the campaign profile. However, you are able to overwrite a few properties inherited from the campaign.
      Parameters:
      campaignId - The campaign ID or name of the campaign to which voucher will be added. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. (required)
      code - A custom **code** that identifies the voucher. (required)
      campaignsVouchersCreateRequestBody - Specify the voucher parameters that you would like to overwrite. (optional)
      Returns:
      ApiResponse<CampaignsVouchersCreateResponseBody>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • addVoucherWithSpecificCodeToCampaignAsync

      public okhttp3.Call addVoucherWithSpecificCodeToCampaignAsync(String campaignId, String code, CampaignsVouchersCreateRequestBody campaignsVouchersCreateRequestBody, ApiCallback<CampaignsVouchersCreateResponseBody> _callback) throws ApiException
      Add Voucher with Specific Code to Campaign (asynchronously) This method gives a possibility to add a new voucher to an existing campaign. The voucher definition will be inherited from the definition kept in the campaign profile. However, you are able to overwrite a few properties inherited from the campaign.
      Parameters:
      campaignId - The campaign ID or name of the campaign to which voucher will be added. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. (required)
      code - A custom **code** that identifies the voucher. (required)
      campaignsVouchersCreateRequestBody - Specify the voucher parameters that you would like to overwrite. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
    • addVouchersToCampaignCall

      public okhttp3.Call addVouchersToCampaignCall(String campaignId, Integer vouchersCount, CampaignsVouchersCreateInBulkRequestBody campaignsVouchersCreateInBulkRequestBody, ApiCallback _callback) throws ApiException
      Build call for addVouchersToCampaign
      Parameters:
      campaignId - The campaign ID or name of the campaign to which voucher(s) will be added. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. (required)
      vouchersCount - Number of vouchers that should be added. (optional)
      campaignsVouchersCreateInBulkRequestBody - Specify the voucher parameters that you would like to overwrite. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • addVouchersToCampaign

      public CampaignsVouchersCreateCombinedResponseBody addVouchersToCampaign(String campaignId, Integer vouchersCount, CampaignsVouchersCreateInBulkRequestBody campaignsVouchersCreateInBulkRequestBody) throws ApiException
      Add Vouchers to Campaign This method gives the possibility to push new vouchers to an existing campaign. New vouchers will inherit properties from the campaign profile. However, it is possible to overwrite some of them in the request body. If you provide an optional code_config parameter with a voucher code configuration, then it will be used to generate new voucher codes. Otherwise, the voucher code configuration from the campaign will be used. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
      Parameters:
      campaignId - The campaign ID or name of the campaign to which voucher(s) will be added. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. (required)
      vouchersCount - Number of vouchers that should be added. (optional)
      campaignsVouchersCreateInBulkRequestBody - Specify the voucher parameters that you would like to overwrite. (optional)
      Returns:
      CampaignsVouchersCreateCombinedResponseBody
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • addVouchersToCampaignWithHttpInfo

      public ApiResponse<CampaignsVouchersCreateCombinedResponseBody> addVouchersToCampaignWithHttpInfo(String campaignId, Integer vouchersCount, CampaignsVouchersCreateInBulkRequestBody campaignsVouchersCreateInBulkRequestBody) throws ApiException
      Add Vouchers to Campaign This method gives the possibility to push new vouchers to an existing campaign. New vouchers will inherit properties from the campaign profile. However, it is possible to overwrite some of them in the request body. If you provide an optional code_config parameter with a voucher code configuration, then it will be used to generate new voucher codes. Otherwise, the voucher code configuration from the campaign will be used. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
      Parameters:
      campaignId - The campaign ID or name of the campaign to which voucher(s) will be added. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. (required)
      vouchersCount - Number of vouchers that should be added. (optional)
      campaignsVouchersCreateInBulkRequestBody - Specify the voucher parameters that you would like to overwrite. (optional)
      Returns:
      ApiResponse<CampaignsVouchersCreateCombinedResponseBody>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • addVouchersToCampaignAsync

      public okhttp3.Call addVouchersToCampaignAsync(String campaignId, Integer vouchersCount, CampaignsVouchersCreateInBulkRequestBody campaignsVouchersCreateInBulkRequestBody, ApiCallback<CampaignsVouchersCreateCombinedResponseBody> _callback) throws ApiException
      Add Vouchers to Campaign (asynchronously) This method gives the possibility to push new vouchers to an existing campaign. New vouchers will inherit properties from the campaign profile. However, it is possible to overwrite some of them in the request body. If you provide an optional code_config parameter with a voucher code configuration, then it will be used to generate new voucher codes. Otherwise, the voucher code configuration from the campaign will be used. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
      Parameters:
      campaignId - The campaign ID or name of the campaign to which voucher(s) will be added. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. (required)
      vouchersCount - Number of vouchers that should be added. (optional)
      campaignsVouchersCreateInBulkRequestBody - Specify the voucher parameters that you would like to overwrite. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
    • createCampaignCall

      public okhttp3.Call createCampaignCall(CampaignsCreateRequestBody campaignsCreateRequestBody, ApiCallback _callback) throws ApiException
      Build call for createCampaign
      Parameters:
      campaignsCreateRequestBody - Specify the details of the campaign that you would like to create. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • createCampaign

      public CampaignsCreateResponseBody createCampaign(CampaignsCreateRequestBody campaignsCreateRequestBody) throws ApiException
      Create Campaign Method to create a batch of vouchers aggregated in one campaign. You can choose a variety of voucher types and define a unique pattern for generating codes. 📘 Global uniqueness All campaign codes are unique across the whole project. Voucherify will not allow you to generate 2 campaigns with the same coupon code. 🚧 Code generation status This is an asynchronous action; you cant read or modify a newly created campaign until the code generation is completed. See the creation_status field in the campaign object description. 🚧 Standalone Vouchers and Campaigns In version [v20241004](https://support.voucherify.io/article/23-whats-new-in-voucherify#v20241004), standalone vouchers created through the Voucherify dashboard create a campaign for that voucher. However, you cannot create a standalone discount or gift voucher campaign with the type: STANDALONE through the API. Voucherify developers work on adding that feature. Follow the [Voucherify Release Notes](https://support.voucherify.io/article/23-whats-new-in-voucherify#v20241004) for more details about released features.
      Parameters:
      campaignsCreateRequestBody - Specify the details of the campaign that you would like to create. (optional)
      Returns:
      CampaignsCreateResponseBody
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • createCampaignWithHttpInfo

      public ApiResponse<CampaignsCreateResponseBody> createCampaignWithHttpInfo(CampaignsCreateRequestBody campaignsCreateRequestBody) throws ApiException
      Create Campaign Method to create a batch of vouchers aggregated in one campaign. You can choose a variety of voucher types and define a unique pattern for generating codes. 📘 Global uniqueness All campaign codes are unique across the whole project. Voucherify will not allow you to generate 2 campaigns with the same coupon code. 🚧 Code generation status This is an asynchronous action; you cant read or modify a newly created campaign until the code generation is completed. See the creation_status field in the campaign object description. 🚧 Standalone Vouchers and Campaigns In version [v20241004](https://support.voucherify.io/article/23-whats-new-in-voucherify#v20241004), standalone vouchers created through the Voucherify dashboard create a campaign for that voucher. However, you cannot create a standalone discount or gift voucher campaign with the type: STANDALONE through the API. Voucherify developers work on adding that feature. Follow the [Voucherify Release Notes](https://support.voucherify.io/article/23-whats-new-in-voucherify#v20241004) for more details about released features.
      Parameters:
      campaignsCreateRequestBody - Specify the details of the campaign that you would like to create. (optional)
      Returns:
      ApiResponse<CampaignsCreateResponseBody>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • createCampaignAsync

      public okhttp3.Call createCampaignAsync(CampaignsCreateRequestBody campaignsCreateRequestBody, ApiCallback<CampaignsCreateResponseBody> _callback) throws ApiException
      Create Campaign (asynchronously) Method to create a batch of vouchers aggregated in one campaign. You can choose a variety of voucher types and define a unique pattern for generating codes. 📘 Global uniqueness All campaign codes are unique across the whole project. Voucherify will not allow you to generate 2 campaigns with the same coupon code. 🚧 Code generation status This is an asynchronous action; you cant read or modify a newly created campaign until the code generation is completed. See the creation_status field in the campaign object description. 🚧 Standalone Vouchers and Campaigns In version [v20241004](https://support.voucherify.io/article/23-whats-new-in-voucherify#v20241004), standalone vouchers created through the Voucherify dashboard create a campaign for that voucher. However, you cannot create a standalone discount or gift voucher campaign with the type: STANDALONE through the API. Voucherify developers work on adding that feature. Follow the [Voucherify Release Notes](https://support.voucherify.io/article/23-whats-new-in-voucherify#v20241004) for more details about released features.
      Parameters:
      campaignsCreateRequestBody - Specify the details of the campaign that you would like to create. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
    • deleteCampaignCall

      public okhttp3.Call deleteCampaignCall(String campaignId, Boolean force, ApiCallback _callback) throws ApiException
      Build call for deleteCampaign
      Parameters:
      campaignId - You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. (required)
      force - If this flag is set to true, the campaign and related vouchers will be removed permanently. If it is set to false or not set at all, the campaign and related vouchers will be moved to the bin. Going forward, the user will be able to create the next campaign with exactly the same name. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • deleteCampaign

      public CampaignsDeleteResponseBody deleteCampaign(String campaignId, Boolean force) throws ApiException
      Delete Campaign Deletes a campaign and all related vouchers. This action cannot be undone. Also, this method immediately removes any redemptions on the voucher. If the force parameter is set to false or not set at all, the campaign and all related vouchers will be moved to the bin. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
      Parameters:
      campaignId - You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. (required)
      force - If this flag is set to true, the campaign and related vouchers will be removed permanently. If it is set to false or not set at all, the campaign and related vouchers will be moved to the bin. Going forward, the user will be able to create the next campaign with exactly the same name. (optional)
      Returns:
      CampaignsDeleteResponseBody
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • deleteCampaignWithHttpInfo

      public ApiResponse<CampaignsDeleteResponseBody> deleteCampaignWithHttpInfo(String campaignId, Boolean force) throws ApiException
      Delete Campaign Deletes a campaign and all related vouchers. This action cannot be undone. Also, this method immediately removes any redemptions on the voucher. If the force parameter is set to false or not set at all, the campaign and all related vouchers will be moved to the bin. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
      Parameters:
      campaignId - You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. (required)
      force - If this flag is set to true, the campaign and related vouchers will be removed permanently. If it is set to false or not set at all, the campaign and related vouchers will be moved to the bin. Going forward, the user will be able to create the next campaign with exactly the same name. (optional)
      Returns:
      ApiResponse<CampaignsDeleteResponseBody>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • deleteCampaignAsync

      public okhttp3.Call deleteCampaignAsync(String campaignId, Boolean force, ApiCallback<CampaignsDeleteResponseBody> _callback) throws ApiException
      Delete Campaign (asynchronously) Deletes a campaign and all related vouchers. This action cannot be undone. Also, this method immediately removes any redemptions on the voucher. If the force parameter is set to false or not set at all, the campaign and all related vouchers will be moved to the bin. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
      Parameters:
      campaignId - You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. (required)
      force - If this flag is set to true, the campaign and related vouchers will be removed permanently. If it is set to false or not set at all, the campaign and related vouchers will be moved to the bin. Going forward, the user will be able to create the next campaign with exactly the same name. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
    • disableCampaignCall

      public okhttp3.Call disableCampaignCall(String campaignId, ApiCallback _callback) throws ApiException
      Build call for disableCampaign
      Parameters:
      campaignId - The campaign ID or name of the campaign being disabled. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • disableCampaign

      public Object disableCampaign(String campaignId) throws ApiException
      Disable Campaign There are various times when youll want to manage a campaigns accessibility. This can be done by two API methods for managing the campaign state - *enable* and *disable*. Sets campaign state to **inactive**. The vouchers in this campaign can no longer be redeemed.
      Parameters:
      campaignId - The campaign ID or name of the campaign being disabled. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. (required)
      Returns:
      Object
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • disableCampaignWithHttpInfo

      public ApiResponse<Object> disableCampaignWithHttpInfo(String campaignId) throws ApiException
      Disable Campaign There are various times when youll want to manage a campaigns accessibility. This can be done by two API methods for managing the campaign state - *enable* and *disable*. Sets campaign state to **inactive**. The vouchers in this campaign can no longer be redeemed.
      Parameters:
      campaignId - The campaign ID or name of the campaign being disabled. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. (required)
      Returns:
      ApiResponse<Object>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • disableCampaignAsync

      public okhttp3.Call disableCampaignAsync(String campaignId, ApiCallback<Object> _callback) throws ApiException
      Disable Campaign (asynchronously) There are various times when youll want to manage a campaigns accessibility. This can be done by two API methods for managing the campaign state - *enable* and *disable*. Sets campaign state to **inactive**. The vouchers in this campaign can no longer be redeemed.
      Parameters:
      campaignId - The campaign ID or name of the campaign being disabled. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. (required)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
    • enableCampaignCall

      public okhttp3.Call enableCampaignCall(String campaignId, ApiCallback _callback) throws ApiException
      Build call for enableCampaign
      Parameters:
      campaignId - The campaign ID or name of the campaign being enabled. You can either pass the campaign ID, which was assigned by Voucherify or the name of the campaign as the path parameter value. (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • enableCampaign

      public Object enableCampaign(String campaignId) throws ApiException
      Enable Campaign There are various times when youll want to manage a campaigns accessibility. This can be done by two API methods for managing the campaign state - *enable* and *disable*. Sets campaign state to **active**. The vouchers in this campaign can be redeemed - only if the redemption occurs after the start date of the campaign and voucher and the voucher and campaign are not expired.
      Parameters:
      campaignId - The campaign ID or name of the campaign being enabled. You can either pass the campaign ID, which was assigned by Voucherify or the name of the campaign as the path parameter value. (required)
      Returns:
      Object
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • enableCampaignWithHttpInfo

      public ApiResponse<Object> enableCampaignWithHttpInfo(String campaignId) throws ApiException
      Enable Campaign There are various times when youll want to manage a campaigns accessibility. This can be done by two API methods for managing the campaign state - *enable* and *disable*. Sets campaign state to **active**. The vouchers in this campaign can be redeemed - only if the redemption occurs after the start date of the campaign and voucher and the voucher and campaign are not expired.
      Parameters:
      campaignId - The campaign ID or name of the campaign being enabled. You can either pass the campaign ID, which was assigned by Voucherify or the name of the campaign as the path parameter value. (required)
      Returns:
      ApiResponse<Object>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • enableCampaignAsync

      public okhttp3.Call enableCampaignAsync(String campaignId, ApiCallback<Object> _callback) throws ApiException
      Enable Campaign (asynchronously) There are various times when youll want to manage a campaigns accessibility. This can be done by two API methods for managing the campaign state - *enable* and *disable*. Sets campaign state to **active**. The vouchers in this campaign can be redeemed - only if the redemption occurs after the start date of the campaign and voucher and the voucher and campaign are not expired.
      Parameters:
      campaignId - The campaign ID or name of the campaign being enabled. You can either pass the campaign ID, which was assigned by Voucherify or the name of the campaign as the path parameter value. (required)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
    • getCampaignCall

      public okhttp3.Call getCampaignCall(String campaignId, ApiCallback _callback) throws ApiException
      Build call for getCampaign
      Parameters:
      campaignId - You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • getCampaign

      public CampaignsGetResponseBody getCampaign(String campaignId) throws ApiException
      Get Campaign Retrieves the campaign with the given campaign ID or campaign name.
      Parameters:
      campaignId - You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. (required)
      Returns:
      CampaignsGetResponseBody
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • getCampaignWithHttpInfo

      public ApiResponse<CampaignsGetResponseBody> getCampaignWithHttpInfo(String campaignId) throws ApiException
      Get Campaign Retrieves the campaign with the given campaign ID or campaign name.
      Parameters:
      campaignId - You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. (required)
      Returns:
      ApiResponse<CampaignsGetResponseBody>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • getCampaignAsync

      public okhttp3.Call getCampaignAsync(String campaignId, ApiCallback<CampaignsGetResponseBody> _callback) throws ApiException
      Get Campaign (asynchronously) Retrieves the campaign with the given campaign ID or campaign name.
      Parameters:
      campaignId - You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. (required)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
    • importVouchersToCampaignCall

      public okhttp3.Call importVouchersToCampaignCall(String campaignId, List<CampaignsImportVoucherItem> campaignsImportVoucherItem, ApiCallback _callback) throws ApiException
      Build call for importVouchersToCampaign
      Parameters:
      campaignId - The ID of an existing campaign to which youre importing the codes. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. (required)
      campaignsImportVoucherItem - Discount type, expiration date and the remaining attributes will be taken from the Campaign settings. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • importVouchersToCampaign

      public CampaignsImportCreateResponseBody importVouchersToCampaign(String campaignId, List<CampaignsImportVoucherItem> campaignsImportVoucherItem) throws ApiException
      Import Vouchers to Campaign Imports vouchers to an **existing** campaign. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
      Parameters:
      campaignId - The ID of an existing campaign to which youre importing the codes. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. (required)
      campaignsImportVoucherItem - Discount type, expiration date and the remaining attributes will be taken from the Campaign settings. (optional)
      Returns:
      CampaignsImportCreateResponseBody
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • importVouchersToCampaignWithHttpInfo

      public ApiResponse<CampaignsImportCreateResponseBody> importVouchersToCampaignWithHttpInfo(String campaignId, List<CampaignsImportVoucherItem> campaignsImportVoucherItem) throws ApiException
      Import Vouchers to Campaign Imports vouchers to an **existing** campaign. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
      Parameters:
      campaignId - The ID of an existing campaign to which youre importing the codes. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. (required)
      campaignsImportVoucherItem - Discount type, expiration date and the remaining attributes will be taken from the Campaign settings. (optional)
      Returns:
      ApiResponse<CampaignsImportCreateResponseBody>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • importVouchersToCampaignAsync

      public okhttp3.Call importVouchersToCampaignAsync(String campaignId, List<CampaignsImportVoucherItem> campaignsImportVoucherItem, ApiCallback<CampaignsImportCreateResponseBody> _callback) throws ApiException
      Import Vouchers to Campaign (asynchronously) Imports vouchers to an **existing** campaign. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
      Parameters:
      campaignId - The ID of an existing campaign to which youre importing the codes. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. (required)
      campaignsImportVoucherItem - Discount type, expiration date and the remaining attributes will be taken from the Campaign settings. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
    • importVouchersToCampaignUsingCsvCall

      public okhttp3.Call importVouchersToCampaignUsingCsvCall(String campaignId, File _file, ApiCallback _callback) throws ApiException
      Build call for importVouchersToCampaignUsingCsv
      Parameters:
      campaignId - The campaign ID or name of the campaign being enabled. You can either pass the campaign ID, which was assigned by Voucherify or the name of the campaign as the path parameter value. (required)
      _file - File path. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • importVouchersToCampaignUsingCsv

      public CampaignsImportCsvCreateResponseBody importVouchersToCampaignUsingCsv(String campaignId, File _file) throws ApiException
      Import Vouchers to Campaign by CSV Imports vouchers to an **existing** campaign. The CSV file has to include headers in the first line. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
      Parameters:
      campaignId - The campaign ID or name of the campaign being enabled. You can either pass the campaign ID, which was assigned by Voucherify or the name of the campaign as the path parameter value. (required)
      _file - File path. (optional)
      Returns:
      CampaignsImportCsvCreateResponseBody
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • importVouchersToCampaignUsingCsvWithHttpInfo

      public ApiResponse<CampaignsImportCsvCreateResponseBody> importVouchersToCampaignUsingCsvWithHttpInfo(String campaignId, File _file) throws ApiException
      Import Vouchers to Campaign by CSV Imports vouchers to an **existing** campaign. The CSV file has to include headers in the first line. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
      Parameters:
      campaignId - The campaign ID or name of the campaign being enabled. You can either pass the campaign ID, which was assigned by Voucherify or the name of the campaign as the path parameter value. (required)
      _file - File path. (optional)
      Returns:
      ApiResponse<CampaignsImportCsvCreateResponseBody>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • importVouchersToCampaignUsingCsvAsync

      public okhttp3.Call importVouchersToCampaignUsingCsvAsync(String campaignId, File _file, ApiCallback<CampaignsImportCsvCreateResponseBody> _callback) throws ApiException
      Import Vouchers to Campaign by CSV (asynchronously) Imports vouchers to an **existing** campaign. The CSV file has to include headers in the first line. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
      Parameters:
      campaignId - The campaign ID or name of the campaign being enabled. You can either pass the campaign ID, which was assigned by Voucherify or the name of the campaign as the path parameter value. (required)
      _file - File path. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
    • listCampaignsCall

      public okhttp3.Call listCampaignsCall(Integer limit, Integer page, ParameterCampaignType campaignType, ParameterExpandListCampaigns expand, ParameterOrderListCampaigns order, ParameterFiltersListCampaigns filters, ApiCallback _callback) throws ApiException
      Build call for listCampaigns
      Parameters:
      limit - Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. (optional)
      page - Which page of results to return. The lowest value is 1. (optional)
      campaignType - This attribute allows filtering by campaign type. (optional)
      expand - Includes an expanded categories object in the response. If the [Areas and Stores](https://support.voucherify.io/article/623-areas-and-stores) Enterprise feature is enabled, add access_settings_assignments to return assigned areas and stores. (optional)
      order - Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. (optional)
      filters - Filters the results by campaign status or whether the campaign is a referral campaign. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • listCampaigns

      List Campaigns Retrieve a list of campaigns in a project. The campaigns are returned sorted by creation date, with the most recent campaigns appearing first. When you get a list of campaigns, you can optionally specify query parameters to customize the amount of campaigns returned per call using limit, which page of campaigns to return using page, sort the campaigns using the order query parameter and filter the results by the campaign_type. This method will return an error when trying to return a limit of more than 100 campaigns.
      Parameters:
      limit - Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. (optional)
      page - Which page of results to return. The lowest value is 1. (optional)
      campaignType - This attribute allows filtering by campaign type. (optional)
      expand - Includes an expanded categories object in the response. If the [Areas and Stores](https://support.voucherify.io/article/623-areas-and-stores) Enterprise feature is enabled, add access_settings_assignments to return assigned areas and stores. (optional)
      order - Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. (optional)
      filters - Filters the results by campaign status or whether the campaign is a referral campaign. (optional)
      Returns:
      CampaignsListResponseBody
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • listCampaignsWithHttpInfo

      List Campaigns Retrieve a list of campaigns in a project. The campaigns are returned sorted by creation date, with the most recent campaigns appearing first. When you get a list of campaigns, you can optionally specify query parameters to customize the amount of campaigns returned per call using limit, which page of campaigns to return using page, sort the campaigns using the order query parameter and filter the results by the campaign_type. This method will return an error when trying to return a limit of more than 100 campaigns.
      Parameters:
      limit - Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. (optional)
      page - Which page of results to return. The lowest value is 1. (optional)
      campaignType - This attribute allows filtering by campaign type. (optional)
      expand - Includes an expanded categories object in the response. If the [Areas and Stores](https://support.voucherify.io/article/623-areas-and-stores) Enterprise feature is enabled, add access_settings_assignments to return assigned areas and stores. (optional)
      order - Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. (optional)
      filters - Filters the results by campaign status or whether the campaign is a referral campaign. (optional)
      Returns:
      ApiResponse<CampaignsListResponseBody>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • listCampaignsAsync

      public okhttp3.Call listCampaignsAsync(Integer limit, Integer page, ParameterCampaignType campaignType, ParameterExpandListCampaigns expand, ParameterOrderListCampaigns order, ParameterFiltersListCampaigns filters, ApiCallback<CampaignsListResponseBody> _callback) throws ApiException
      List Campaigns (asynchronously) Retrieve a list of campaigns in a project. The campaigns are returned sorted by creation date, with the most recent campaigns appearing first. When you get a list of campaigns, you can optionally specify query parameters to customize the amount of campaigns returned per call using limit, which page of campaigns to return using page, sort the campaigns using the order query parameter and filter the results by the campaign_type. This method will return an error when trying to return a limit of more than 100 campaigns.
      Parameters:
      limit - Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. (optional)
      page - Which page of results to return. The lowest value is 1. (optional)
      campaignType - This attribute allows filtering by campaign type. (optional)
      expand - Includes an expanded categories object in the response. If the [Areas and Stores](https://support.voucherify.io/article/623-areas-and-stores) Enterprise feature is enabled, add access_settings_assignments to return assigned areas and stores. (optional)
      order - Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. (optional)
      filters - Filters the results by campaign status or whether the campaign is a referral campaign. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
    • updateCampaignCall

      public okhttp3.Call updateCampaignCall(String campaignId, CampaignsUpdateRequestBody campaignsUpdateRequestBody, ApiCallback _callback) throws ApiException
      Build call for updateCampaign
      Parameters:
      campaignId - You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. (required)
      campaignsUpdateRequestBody - Specify the campaign parameters to be updated. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • updateCampaign

      public CampaignsUpdateResponseBody updateCampaign(String campaignId, CampaignsUpdateRequestBody campaignsUpdateRequestBody) throws ApiException
      Update Campaign Updates the specified campaign by setting the values of the parameters passed in the request body. Any parameters not provided in the payload will be left unchanged. Fields other than the ones listed in the request body wont be modified. Even if provided, they will be silently skipped. ## Vouchers will be affected This method will update vouchers aggregated in the campaign. It will affect all vouchers that are not published or redeemed yet.
      Parameters:
      campaignId - You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. (required)
      campaignsUpdateRequestBody - Specify the campaign parameters to be updated. (optional)
      Returns:
      CampaignsUpdateResponseBody
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • updateCampaignWithHttpInfo

      public ApiResponse<CampaignsUpdateResponseBody> updateCampaignWithHttpInfo(String campaignId, CampaignsUpdateRequestBody campaignsUpdateRequestBody) throws ApiException
      Update Campaign Updates the specified campaign by setting the values of the parameters passed in the request body. Any parameters not provided in the payload will be left unchanged. Fields other than the ones listed in the request body wont be modified. Even if provided, they will be silently skipped. ## Vouchers will be affected This method will update vouchers aggregated in the campaign. It will affect all vouchers that are not published or redeemed yet.
      Parameters:
      campaignId - You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. (required)
      campaignsUpdateRequestBody - Specify the campaign parameters to be updated. (optional)
      Returns:
      ApiResponse<CampaignsUpdateResponseBody>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • updateCampaignAsync

      public okhttp3.Call updateCampaignAsync(String campaignId, CampaignsUpdateRequestBody campaignsUpdateRequestBody, ApiCallback<CampaignsUpdateResponseBody> _callback) throws ApiException
      Update Campaign (asynchronously) Updates the specified campaign by setting the values of the parameters passed in the request body. Any parameters not provided in the payload will be left unchanged. Fields other than the ones listed in the request body wont be modified. Even if provided, they will be silently skipped. ## Vouchers will be affected This method will update vouchers aggregated in the campaign. It will affect all vouchers that are not published or redeemed yet.
      Parameters:
      campaignId - You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. (required)
      campaignsUpdateRequestBody - Specify the campaign parameters to be updated. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object