Class ReferralsApi

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

public class ReferralsApi extends Object
  • Constructor Details

    • ReferralsApi

      public ReferralsApi()
    • ReferralsApi

      public ReferralsApi(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)
    • referralsAddHoldersCall

      public okhttp3.Call referralsAddHoldersCall(String memberId, ReferralsMembersHoldersCreateInBulkRequestBody referralsMembersHoldersCreateInBulkRequestBody, ApiCallback _callback) throws ApiException
      Build call for referralsAddHolders
      Parameters:
      memberId - Unique referral code or its identifier. (required)
      referralsMembersHoldersCreateInBulkRequestBody - Specify the customer data to be upserted as redeemable holders. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • referralsAddHolders

      public ReferralsMembersHoldersCreateInBulkResponseBody referralsAddHolders(String memberId, ReferralsMembersHoldersCreateInBulkRequestBody referralsMembersHoldersCreateInBulkRequestBody) throws ApiException
      Add Referral Code Holders Adds new holders to a referral code as **referees**. The data sent in the request is upserted into the customer data. If the request returns an error even for one customer, you have to resend the whole request. Customer data is upserted if the data for all customers is correct. To use this endpoint, you must have the following permissions: - Create and modify Customers and Segments (customers.modify) - Publish Voucher (vouchers.publish) 👍 To add a holder as a referer, use the Create Publication endpoint. 📘 Alternative endpoint This endpoint is an alternative to the Add Referral Code Holders endpoint. The URL was re-designed to retrieve the referral member holders without providing the campaignId as a path paremeter.
      Parameters:
      memberId - Unique referral code or its identifier. (required)
      referralsMembersHoldersCreateInBulkRequestBody - Specify the customer data to be upserted as redeemable holders. (optional)
      Returns:
      ReferralsMembersHoldersCreateInBulkResponseBody
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • referralsAddHoldersWithHttpInfo

      public ApiResponse<ReferralsMembersHoldersCreateInBulkResponseBody> referralsAddHoldersWithHttpInfo(String memberId, ReferralsMembersHoldersCreateInBulkRequestBody referralsMembersHoldersCreateInBulkRequestBody) throws ApiException
      Add Referral Code Holders Adds new holders to a referral code as **referees**. The data sent in the request is upserted into the customer data. If the request returns an error even for one customer, you have to resend the whole request. Customer data is upserted if the data for all customers is correct. To use this endpoint, you must have the following permissions: - Create and modify Customers and Segments (customers.modify) - Publish Voucher (vouchers.publish) 👍 To add a holder as a referer, use the Create Publication endpoint. 📘 Alternative endpoint This endpoint is an alternative to the Add Referral Code Holders endpoint. The URL was re-designed to retrieve the referral member holders without providing the campaignId as a path paremeter.
      Parameters:
      memberId - Unique referral code or its identifier. (required)
      referralsMembersHoldersCreateInBulkRequestBody - Specify the customer data to be upserted as redeemable holders. (optional)
      Returns:
      ApiResponse<ReferralsMembersHoldersCreateInBulkResponseBody>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • referralsAddHoldersAsync

      public okhttp3.Call referralsAddHoldersAsync(String memberId, ReferralsMembersHoldersCreateInBulkRequestBody referralsMembersHoldersCreateInBulkRequestBody, ApiCallback<ReferralsMembersHoldersCreateInBulkResponseBody> _callback) throws ApiException
      Add Referral Code Holders (asynchronously) Adds new holders to a referral code as **referees**. The data sent in the request is upserted into the customer data. If the request returns an error even for one customer, you have to resend the whole request. Customer data is upserted if the data for all customers is correct. To use this endpoint, you must have the following permissions: - Create and modify Customers and Segments (customers.modify) - Publish Voucher (vouchers.publish) 👍 To add a holder as a referer, use the Create Publication endpoint. 📘 Alternative endpoint This endpoint is an alternative to the Add Referral Code Holders endpoint. The URL was re-designed to retrieve the referral member holders without providing the campaignId as a path paremeter.
      Parameters:
      memberId - Unique referral code or its identifier. (required)
      referralsMembersHoldersCreateInBulkRequestBody - Specify the customer data to be upserted as redeemable holders. (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
    • referralsAddHolders1Call

      public okhttp3.Call referralsAddHolders1Call(String campaignId, String memberId, ReferralsMembersHoldersCreateInBulkRequestBody referralsMembersHoldersCreateInBulkRequestBody, ApiCallback _callback) throws ApiException
      Build call for referralsAddHolders1
      Parameters:
      campaignId - Unique identifier of a referral program campaign. (required)
      memberId - Unique referral code or its identifier. (required)
      referralsMembersHoldersCreateInBulkRequestBody - Specify the customer data to be upserted as redeemable holders. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • referralsAddHolders1

      public ReferralsMembersHoldersCreateInBulkResponseBody referralsAddHolders1(String campaignId, String memberId, ReferralsMembersHoldersCreateInBulkRequestBody referralsMembersHoldersCreateInBulkRequestBody) throws ApiException
      Add Referral Code Holders Adds new holders to a referral code as **referees**. The data sent in the request is upserted into the customer data. If the request returns an error even for one customer, you have to resend the whole request. Customer data is upserted if the data for all customers is correct. To use this endpoint, you must have the following permissions: - Create and modify Customers and Segments (customers.modify) - Publish Voucher (vouchers.publish) 👍 To add a holder as a referer, use the Create Publication endpoint.
      Parameters:
      campaignId - Unique identifier of a referral program campaign. (required)
      memberId - Unique referral code or its identifier. (required)
      referralsMembersHoldersCreateInBulkRequestBody - Specify the customer data to be upserted as redeemable holders. (optional)
      Returns:
      ReferralsMembersHoldersCreateInBulkResponseBody
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • referralsAddHolders1WithHttpInfo

      public ApiResponse<ReferralsMembersHoldersCreateInBulkResponseBody> referralsAddHolders1WithHttpInfo(String campaignId, String memberId, ReferralsMembersHoldersCreateInBulkRequestBody referralsMembersHoldersCreateInBulkRequestBody) throws ApiException
      Add Referral Code Holders Adds new holders to a referral code as **referees**. The data sent in the request is upserted into the customer data. If the request returns an error even for one customer, you have to resend the whole request. Customer data is upserted if the data for all customers is correct. To use this endpoint, you must have the following permissions: - Create and modify Customers and Segments (customers.modify) - Publish Voucher (vouchers.publish) 👍 To add a holder as a referer, use the Create Publication endpoint.
      Parameters:
      campaignId - Unique identifier of a referral program campaign. (required)
      memberId - Unique referral code or its identifier. (required)
      referralsMembersHoldersCreateInBulkRequestBody - Specify the customer data to be upserted as redeemable holders. (optional)
      Returns:
      ApiResponse<ReferralsMembersHoldersCreateInBulkResponseBody>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • referralsAddHolders1Async

      public okhttp3.Call referralsAddHolders1Async(String campaignId, String memberId, ReferralsMembersHoldersCreateInBulkRequestBody referralsMembersHoldersCreateInBulkRequestBody, ApiCallback<ReferralsMembersHoldersCreateInBulkResponseBody> _callback) throws ApiException
      Add Referral Code Holders (asynchronously) Adds new holders to a referral code as **referees**. The data sent in the request is upserted into the customer data. If the request returns an error even for one customer, you have to resend the whole request. Customer data is upserted if the data for all customers is correct. To use this endpoint, you must have the following permissions: - Create and modify Customers and Segments (customers.modify) - Publish Voucher (vouchers.publish) 👍 To add a holder as a referer, use the Create Publication endpoint.
      Parameters:
      campaignId - Unique identifier of a referral program campaign. (required)
      memberId - Unique referral code or its identifier. (required)
      referralsMembersHoldersCreateInBulkRequestBody - Specify the customer data to be upserted as redeemable holders. (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
    • referralsCodeHoldersCall

      public okhttp3.Call referralsCodeHoldersCall(String campaignId, String memberId, Integer limit, ParameterOrderListRedeemables order, String startingAfterId, ParameterFiltersListReferralsRedeemableHolders filters, ApiCallback _callback) throws ApiException
      Build call for referralsCodeHolders
      Parameters:
      campaignId - Unique identifier of a referral program campaign. (required)
      memberId - Unique referral code or its identifier. (required)
      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)
      order - Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. (optional)
      startingAfterId - A cursor for pagination. It retrieves the events starting after an event with the given ID. (optional)
      filters - Filters for listing customer redeemables. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • referralsCodeHolders

      public ReferralsMembersHoldersListResponseBody referralsCodeHolders(String campaignId, String memberId, Integer limit, ParameterOrderListRedeemables order, String startingAfterId, ParameterFiltersListReferralsRedeemableHolders filters) throws ApiException
      List Referral Code Holders Retrieves all the redeemables that have been assigned to the customer. To use this endpoint, you must have the following permissions: - Read Customers (customers.details.read)
      Parameters:
      campaignId - Unique identifier of a referral program campaign. (required)
      memberId - Unique referral code or its identifier. (required)
      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)
      order - Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. (optional)
      startingAfterId - A cursor for pagination. It retrieves the events starting after an event with the given ID. (optional)
      filters - Filters for listing customer redeemables. (optional)
      Returns:
      ReferralsMembersHoldersListResponseBody
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • referralsCodeHoldersWithHttpInfo

      public ApiResponse<ReferralsMembersHoldersListResponseBody> referralsCodeHoldersWithHttpInfo(String campaignId, String memberId, Integer limit, ParameterOrderListRedeemables order, String startingAfterId, ParameterFiltersListReferralsRedeemableHolders filters) throws ApiException
      List Referral Code Holders Retrieves all the redeemables that have been assigned to the customer. To use this endpoint, you must have the following permissions: - Read Customers (customers.details.read)
      Parameters:
      campaignId - Unique identifier of a referral program campaign. (required)
      memberId - Unique referral code or its identifier. (required)
      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)
      order - Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. (optional)
      startingAfterId - A cursor for pagination. It retrieves the events starting after an event with the given ID. (optional)
      filters - Filters for listing customer redeemables. (optional)
      Returns:
      ApiResponse<ReferralsMembersHoldersListResponseBody>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • referralsCodeHoldersAsync

      public okhttp3.Call referralsCodeHoldersAsync(String campaignId, String memberId, Integer limit, ParameterOrderListRedeemables order, String startingAfterId, ParameterFiltersListReferralsRedeemableHolders filters, ApiCallback<ReferralsMembersHoldersListResponseBody> _callback) throws ApiException
      List Referral Code Holders (asynchronously) Retrieves all the redeemables that have been assigned to the customer. To use this endpoint, you must have the following permissions: - Read Customers (customers.details.read)
      Parameters:
      campaignId - Unique identifier of a referral program campaign. (required)
      memberId - Unique referral code or its identifier. (required)
      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)
      order - Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. (optional)
      startingAfterId - A cursor for pagination. It retrieves the events starting after an event with the given ID. (optional)
      filters - Filters for listing customer redeemables. (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
    • referralsCodeHolders1Call

      public okhttp3.Call referralsCodeHolders1Call(String memberId, Integer limit, ParameterOrderListRedeemables order, String startingAfterId, ParameterFiltersListReferralsRedeemableHolders filters, ApiCallback _callback) throws ApiException
      Build call for referralsCodeHolders1
      Parameters:
      memberId - Unique referral code or its identifier. (required)
      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)
      order - Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. (optional)
      startingAfterId - A cursor for pagination. It retrieves the events starting after an event with the given ID. (optional)
      filters - Filters for listing customer redeemables. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • referralsCodeHolders1

      public ReferralsMembersHoldersListResponseBody referralsCodeHolders1(String memberId, Integer limit, ParameterOrderListRedeemables order, String startingAfterId, ParameterFiltersListReferralsRedeemableHolders filters) throws ApiException
      List Referral Code Holders Retrieves the holders of the referral code from a referral campaign. To use this endpoint, you must have the following permissions: - Read Customers (customers.details.read) 📘 Alternative endpoint This endpoint is an alternative to the List Member Holders endpoint. The URL was re-designed to retrieve the referral member holders without providing the campaignId as a path paremeter.
      Parameters:
      memberId - Unique referral code or its identifier. (required)
      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)
      order - Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. (optional)
      startingAfterId - A cursor for pagination. It retrieves the events starting after an event with the given ID. (optional)
      filters - Filters for listing customer redeemables. (optional)
      Returns:
      ReferralsMembersHoldersListResponseBody
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • referralsCodeHolders1WithHttpInfo

      public ApiResponse<ReferralsMembersHoldersListResponseBody> referralsCodeHolders1WithHttpInfo(String memberId, Integer limit, ParameterOrderListRedeemables order, String startingAfterId, ParameterFiltersListReferralsRedeemableHolders filters) throws ApiException
      List Referral Code Holders Retrieves the holders of the referral code from a referral campaign. To use this endpoint, you must have the following permissions: - Read Customers (customers.details.read) 📘 Alternative endpoint This endpoint is an alternative to the List Member Holders endpoint. The URL was re-designed to retrieve the referral member holders without providing the campaignId as a path paremeter.
      Parameters:
      memberId - Unique referral code or its identifier. (required)
      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)
      order - Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. (optional)
      startingAfterId - A cursor for pagination. It retrieves the events starting after an event with the given ID. (optional)
      filters - Filters for listing customer redeemables. (optional)
      Returns:
      ApiResponse<ReferralsMembersHoldersListResponseBody>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • referralsCodeHolders1Async

      public okhttp3.Call referralsCodeHolders1Async(String memberId, Integer limit, ParameterOrderListRedeemables order, String startingAfterId, ParameterFiltersListReferralsRedeemableHolders filters, ApiCallback<ReferralsMembersHoldersListResponseBody> _callback) throws ApiException
      List Referral Code Holders (asynchronously) Retrieves the holders of the referral code from a referral campaign. To use this endpoint, you must have the following permissions: - Read Customers (customers.details.read) 📘 Alternative endpoint This endpoint is an alternative to the List Member Holders endpoint. The URL was re-designed to retrieve the referral member holders without providing the campaignId as a path paremeter.
      Parameters:
      memberId - Unique referral code or its identifier. (required)
      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)
      order - Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. (optional)
      startingAfterId - A cursor for pagination. It retrieves the events starting after an event with the given ID. (optional)
      filters - Filters for listing customer redeemables. (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
    • referralsRemoveHolderCall

      public okhttp3.Call referralsRemoveHolderCall(String memberId, String holderId, ApiCallback _callback) throws ApiException
      Build call for referralsRemoveHolder
      Parameters:
      memberId - Unique referral code or its identifier. (required)
      holderId - Unique identifier of a redeemable holder. (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • referralsRemoveHolder

      public void referralsRemoveHolder(String memberId, String holderId) throws ApiException
      Remove Referral Card Holder Removes the holder from a referral card. You can remove a referee only. To use this endpoint, you must have the following permissions: - Create and modify Customers and Segments (customers.modify) - Publish Voucher (vouchers.publish) 📘 Alternative endpoint This endpoint is an alternative to the Remove Referral Card Holder endpoint. The URL was re-designed to retrieve the referral member holders without providing the campaignId as a path paremeter.
      Parameters:
      memberId - Unique referral code or its identifier. (required)
      holderId - Unique identifier of a redeemable holder. (required)
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • referralsRemoveHolderWithHttpInfo

      public ApiResponse<Void> referralsRemoveHolderWithHttpInfo(String memberId, String holderId) throws ApiException
      Remove Referral Card Holder Removes the holder from a referral card. You can remove a referee only. To use this endpoint, you must have the following permissions: - Create and modify Customers and Segments (customers.modify) - Publish Voucher (vouchers.publish) 📘 Alternative endpoint This endpoint is an alternative to the Remove Referral Card Holder endpoint. The URL was re-designed to retrieve the referral member holders without providing the campaignId as a path paremeter.
      Parameters:
      memberId - Unique referral code or its identifier. (required)
      holderId - Unique identifier of a redeemable holder. (required)
      Returns:
      ApiResponse<Void>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • referralsRemoveHolderAsync

      public okhttp3.Call referralsRemoveHolderAsync(String memberId, String holderId, ApiCallback<Void> _callback) throws ApiException
      Remove Referral Card Holder (asynchronously) Removes the holder from a referral card. You can remove a referee only. To use this endpoint, you must have the following permissions: - Create and modify Customers and Segments (customers.modify) - Publish Voucher (vouchers.publish) 📘 Alternative endpoint This endpoint is an alternative to the Remove Referral Card Holder endpoint. The URL was re-designed to retrieve the referral member holders without providing the campaignId as a path paremeter.
      Parameters:
      memberId - Unique referral code or its identifier. (required)
      holderId - Unique identifier of a redeemable holder. (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
    • referralsRemoveHolder1Call

      public okhttp3.Call referralsRemoveHolder1Call(String campaignId, String memberId, String holderId, ApiCallback _callback) throws ApiException
      Build call for referralsRemoveHolder1
      Parameters:
      campaignId - Unique identifier of a referral program campaign. (required)
      memberId - Unique referral code or its identifier. (required)
      holderId - Unique identifier of a redeemable holder. (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • referralsRemoveHolder1

      public void referralsRemoveHolder1(String campaignId, String memberId, String holderId) throws ApiException
      Remove Referral Card Holder Removes the holder from a referral card. You can remove a referee only. To use this endpoint, you must have the following permissions: - Create and modify Customers and Segments (customers.modify) - Publish Voucher (vouchers.publish)
      Parameters:
      campaignId - Unique identifier of a referral program campaign. (required)
      memberId - Unique referral code or its identifier. (required)
      holderId - Unique identifier of a redeemable holder. (required)
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • referralsRemoveHolder1WithHttpInfo

      public ApiResponse<Void> referralsRemoveHolder1WithHttpInfo(String campaignId, String memberId, String holderId) throws ApiException
      Remove Referral Card Holder Removes the holder from a referral card. You can remove a referee only. To use this endpoint, you must have the following permissions: - Create and modify Customers and Segments (customers.modify) - Publish Voucher (vouchers.publish)
      Parameters:
      campaignId - Unique identifier of a referral program campaign. (required)
      memberId - Unique referral code or its identifier. (required)
      holderId - Unique identifier of a redeemable holder. (required)
      Returns:
      ApiResponse<Void>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • referralsRemoveHolder1Async

      public okhttp3.Call referralsRemoveHolder1Async(String campaignId, String memberId, String holderId, ApiCallback<Void> _callback) throws ApiException
      Remove Referral Card Holder (asynchronously) Removes the holder from a referral card. You can remove a referee only. To use this endpoint, you must have the following permissions: - Create and modify Customers and Segments (customers.modify) - Publish Voucher (vouchers.publish)
      Parameters:
      campaignId - Unique identifier of a referral program campaign. (required)
      memberId - Unique referral code or its identifier. (required)
      holderId - Unique identifier of a redeemable holder. (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