Package io.voucherify.client.api
Class PublicationsApi
java.lang.Object
io.voucherify.client.api.PublicationsApi
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreatePublication(Boolean joinOnce, PublicationsCreateRequestBody publicationsCreateRequestBody) Create Publication This method selects vouchers that are suitable for publication, adds a publish entry and returns the publication.createPublication1(Customer customer, Boolean joinOnce, String voucher, CreatePublicationCampaign campaign, String sourceId, Object metadata) Create Publication This method selects vouchers that are suitable for publication, adds a publish entry and returns the publication.okhttp3.CallcreatePublication1Async(Customer customer, Boolean joinOnce, String voucher, CreatePublicationCampaign campaign, String sourceId, Object metadata, ApiCallback<PublicationsCreateResponseBody> _callback) Create Publication (asynchronously) This method selects vouchers that are suitable for publication, adds a publish entry and returns the publication.okhttp3.CallcreatePublication1Call(Customer customer, Boolean joinOnce, String voucher, CreatePublicationCampaign campaign, String sourceId, Object metadata, ApiCallback _callback) Build call for createPublication1createPublication1WithHttpInfo(Customer customer, Boolean joinOnce, String voucher, CreatePublicationCampaign campaign, String sourceId, Object metadata) Create Publication This method selects vouchers that are suitable for publication, adds a publish entry and returns the publication.okhttp3.CallcreatePublicationAsync(Boolean joinOnce, PublicationsCreateRequestBody publicationsCreateRequestBody, ApiCallback<PublicationsCreateResponseBody> _callback) Create Publication (asynchronously) This method selects vouchers that are suitable for publication, adds a publish entry and returns the publication.okhttp3.CallcreatePublicationCall(Boolean joinOnce, PublicationsCreateRequestBody publicationsCreateRequestBody, ApiCallback _callback) Build call for createPublicationcreatePublicationWithHttpInfo(Boolean joinOnce, PublicationsCreateRequestBody publicationsCreateRequestBody) Create Publication This method selects vouchers that are suitable for publication, adds a publish entry and returns the publication.intlistPublications(Integer limit, Integer page, ParameterOrderListPublications order, String campaign, String customer, String voucher, ParameterResultListPublications result, ParameterVoucherTypeListPublications voucherType, Boolean isReferralCode, ParameterFiltersListPublications filters, String sourceId) List Publications Retrieve a list of publications.okhttp3.CalllistPublicationsAsync(Integer limit, Integer page, ParameterOrderListPublications order, String campaign, String customer, String voucher, ParameterResultListPublications result, ParameterVoucherTypeListPublications voucherType, Boolean isReferralCode, ParameterFiltersListPublications filters, String sourceId, ApiCallback<PublicationsListResponseBody> _callback) List Publications (asynchronously) Retrieve a list of publications.okhttp3.CalllistPublicationsCall(Integer limit, Integer page, ParameterOrderListPublications order, String campaign, String customer, String voucher, ParameterResultListPublications result, ParameterVoucherTypeListPublications voucherType, Boolean isReferralCode, ParameterFiltersListPublications filters, String sourceId, ApiCallback _callback) Build call for listPublicationslistPublicationsWithHttpInfo(Integer limit, Integer page, ParameterOrderListPublications order, String campaign, String customer, String voucher, ParameterResultListPublications result, ParameterVoucherTypeListPublications voucherType, Boolean isReferralCode, ParameterFiltersListPublications filters, String sourceId) List Publications Retrieve a list of publications.voidsetApiClient(ApiClient apiClient) voidsetCustomBaseUrl(String customBaseUrl) voidsetHostIndex(int hostIndex)
-
Constructor Details
-
PublicationsApi
public PublicationsApi() -
PublicationsApi
-
-
Method Details
-
getApiClient
-
setApiClient
-
getHostIndex
public int getHostIndex() -
setHostIndex
public void setHostIndex(int hostIndex) -
getCustomBaseUrl
-
setCustomBaseUrl
-
createPublicationCall
public okhttp3.Call createPublicationCall(Boolean joinOnce, PublicationsCreateRequestBody publicationsCreateRequestBody, ApiCallback _callback) throws ApiException Build call for createPublication- Parameters:
joinOnce- Through this flag, you can control if a particular person gets only one and always the same code even if the app sends multiple publication requests. It means that if you have a referral program, a referrer is assigned only to one code if an integration sends publication requests more than once for the same customer. (optional)publicationsCreateRequestBody- Specify the publication parameters. (optional)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
createPublication
public PublicationsCreateResponseBody createPublication(Boolean joinOnce, PublicationsCreateRequestBody publicationsCreateRequestBody) throws ApiException Create Publication This method selects vouchers that are suitable for publication, adds a publish entry and returns the publication. A voucher is suitable for publication when its active and hasnt been published yet. 🚧 Clearly define the source of the voucher You must clearly define which source you want to publish the voucher code from. It can either be a code from a campaign or a specific voucher identified by a code. 🚧 Publish multiple vouchers In case you want to publish multiple vouchers within a single publication, you need to specify the campaign name and number of vouchers you want to publish. 📘 Auto-update campaign In case you want to ensure the number of publishable codes increases automatically with the number of customers, you should use an **auto-update** campaign.- Parameters:
joinOnce- Through this flag, you can control if a particular person gets only one and always the same code even if the app sends multiple publication requests. It means that if you have a referral program, a referrer is assigned only to one code if an integration sends publication requests more than once for the same customer. (optional)publicationsCreateRequestBody- Specify the publication parameters. (optional)- Returns:
- PublicationsCreateResponseBody
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
createPublicationWithHttpInfo
public ApiResponse<PublicationsCreateResponseBody> createPublicationWithHttpInfo(Boolean joinOnce, PublicationsCreateRequestBody publicationsCreateRequestBody) throws ApiException Create Publication This method selects vouchers that are suitable for publication, adds a publish entry and returns the publication. A voucher is suitable for publication when its active and hasnt been published yet. 🚧 Clearly define the source of the voucher You must clearly define which source you want to publish the voucher code from. It can either be a code from a campaign or a specific voucher identified by a code. 🚧 Publish multiple vouchers In case you want to publish multiple vouchers within a single publication, you need to specify the campaign name and number of vouchers you want to publish. 📘 Auto-update campaign In case you want to ensure the number of publishable codes increases automatically with the number of customers, you should use an **auto-update** campaign.- Parameters:
joinOnce- Through this flag, you can control if a particular person gets only one and always the same code even if the app sends multiple publication requests. It means that if you have a referral program, a referrer is assigned only to one code if an integration sends publication requests more than once for the same customer. (optional)publicationsCreateRequestBody- Specify the publication parameters. (optional)- Returns:
- ApiResponse<PublicationsCreateResponseBody>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
createPublicationAsync
public okhttp3.Call createPublicationAsync(Boolean joinOnce, PublicationsCreateRequestBody publicationsCreateRequestBody, ApiCallback<PublicationsCreateResponseBody> _callback) throws ApiException Create Publication (asynchronously) This method selects vouchers that are suitable for publication, adds a publish entry and returns the publication. A voucher is suitable for publication when its active and hasnt been published yet. 🚧 Clearly define the source of the voucher You must clearly define which source you want to publish the voucher code from. It can either be a code from a campaign or a specific voucher identified by a code. 🚧 Publish multiple vouchers In case you want to publish multiple vouchers within a single publication, you need to specify the campaign name and number of vouchers you want to publish. 📘 Auto-update campaign In case you want to ensure the number of publishable codes increases automatically with the number of customers, you should use an **auto-update** campaign.- Parameters:
joinOnce- Through this flag, you can control if a particular person gets only one and always the same code even if the app sends multiple publication requests. It means that if you have a referral program, a referrer is assigned only to one code if an integration sends publication requests more than once for the same customer. (optional)publicationsCreateRequestBody- Specify the publication parameters. (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
-
createPublication1Call
public okhttp3.Call createPublication1Call(Customer customer, Boolean joinOnce, String voucher, CreatePublicationCampaign campaign, String sourceId, Object metadata, ApiCallback _callback) throws ApiException Build call for createPublication1- Parameters:
customer- Contains information about the customer to whom the publication was directed. (required)joinOnce- Through this flag, you can control if a particular person gets only one and always the same code even if the app sends multiple publication requests. It means that if you have a referral program, a referrer is assigned only to one code if an integration sends publication requests more than once for the same customer. (optional)voucher- Code of voucher being published. (optional)campaign- Create publication with campaign. (optional)sourceId- The merchants publication ID if it is different from the Voucherify publication ID. Its an optional tracking identifier of a publication. It is really useful in case of an integration between multiple systems. It can be a publication ID from a CRM system, database or 3rd-party service. If source_id is provided only 1 voucher can be published per request. (optional)metadata- The metadata object stores all custom attributes assigned to the publication. A set of key/value pairs that you can attach to a publication object. It can be useful for storing additional information about the publication in a structured format. (optional)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
createPublication1
public PublicationsCreateResponseBody createPublication1(Customer customer, Boolean joinOnce, String voucher, CreatePublicationCampaign campaign, String sourceId, Object metadata) throws ApiException Create Publication This method selects vouchers that are suitable for publication, adds a publish entry and returns the publication. A voucher is suitable for publication when its active and hasnt been published yet. ❗️ Limited access Access to this endpoint is limited. This endpoint is designed for specific integrations and the API keys need to be configured to access this endpoint. Navigate to the **Dashboard** → **Project Settings** → **General** → **Integration Keys** to set up a pair of API keys and use them to send the request. 🚧 Clearly define the source of the voucher You must clearly define which source you want to publish the voucher code from. It can either be a code from a campaign or a specific voucher identified by a code. 🚧 Publish multiple vouchers This endpoint does not support the publishing of multiple vouchers from a single campaign. In case you want to publish multiple vouchers within a single publication, you need to use a dedicated endpoint. 📘 Auto-update campaign In case you want to ensure the number of publishable codes increases automatically with the number of customers, you should use an **auto-update** campaign. # Example Request ❗️ Required Query param voucher OR campaign MUST be filled out. If you provide both, campaign param will be skipped.- Parameters:
customer- Contains information about the customer to whom the publication was directed. (required)joinOnce- Through this flag, you can control if a particular person gets only one and always the same code even if the app sends multiple publication requests. It means that if you have a referral program, a referrer is assigned only to one code if an integration sends publication requests more than once for the same customer. (optional)voucher- Code of voucher being published. (optional)campaign- Create publication with campaign. (optional)sourceId- The merchants publication ID if it is different from the Voucherify publication ID. Its an optional tracking identifier of a publication. It is really useful in case of an integration between multiple systems. It can be a publication ID from a CRM system, database or 3rd-party service. If source_id is provided only 1 voucher can be published per request. (optional)metadata- The metadata object stores all custom attributes assigned to the publication. A set of key/value pairs that you can attach to a publication object. It can be useful for storing additional information about the publication in a structured format. (optional)- Returns:
- PublicationsCreateResponseBody
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
createPublication1WithHttpInfo
public ApiResponse<PublicationsCreateResponseBody> createPublication1WithHttpInfo(Customer customer, Boolean joinOnce, String voucher, CreatePublicationCampaign campaign, String sourceId, Object metadata) throws ApiException Create Publication This method selects vouchers that are suitable for publication, adds a publish entry and returns the publication. A voucher is suitable for publication when its active and hasnt been published yet. ❗️ Limited access Access to this endpoint is limited. This endpoint is designed for specific integrations and the API keys need to be configured to access this endpoint. Navigate to the **Dashboard** → **Project Settings** → **General** → **Integration Keys** to set up a pair of API keys and use them to send the request. 🚧 Clearly define the source of the voucher You must clearly define which source you want to publish the voucher code from. It can either be a code from a campaign or a specific voucher identified by a code. 🚧 Publish multiple vouchers This endpoint does not support the publishing of multiple vouchers from a single campaign. In case you want to publish multiple vouchers within a single publication, you need to use a dedicated endpoint. 📘 Auto-update campaign In case you want to ensure the number of publishable codes increases automatically with the number of customers, you should use an **auto-update** campaign. # Example Request ❗️ Required Query param voucher OR campaign MUST be filled out. If you provide both, campaign param will be skipped.- Parameters:
customer- Contains information about the customer to whom the publication was directed. (required)joinOnce- Through this flag, you can control if a particular person gets only one and always the same code even if the app sends multiple publication requests. It means that if you have a referral program, a referrer is assigned only to one code if an integration sends publication requests more than once for the same customer. (optional)voucher- Code of voucher being published. (optional)campaign- Create publication with campaign. (optional)sourceId- The merchants publication ID if it is different from the Voucherify publication ID. Its an optional tracking identifier of a publication. It is really useful in case of an integration between multiple systems. It can be a publication ID from a CRM system, database or 3rd-party service. If source_id is provided only 1 voucher can be published per request. (optional)metadata- The metadata object stores all custom attributes assigned to the publication. A set of key/value pairs that you can attach to a publication object. It can be useful for storing additional information about the publication in a structured format. (optional)- Returns:
- ApiResponse<PublicationsCreateResponseBody>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
createPublication1Async
public okhttp3.Call createPublication1Async(Customer customer, Boolean joinOnce, String voucher, CreatePublicationCampaign campaign, String sourceId, Object metadata, ApiCallback<PublicationsCreateResponseBody> _callback) throws ApiException Create Publication (asynchronously) This method selects vouchers that are suitable for publication, adds a publish entry and returns the publication. A voucher is suitable for publication when its active and hasnt been published yet. ❗️ Limited access Access to this endpoint is limited. This endpoint is designed for specific integrations and the API keys need to be configured to access this endpoint. Navigate to the **Dashboard** → **Project Settings** → **General** → **Integration Keys** to set up a pair of API keys and use them to send the request. 🚧 Clearly define the source of the voucher You must clearly define which source you want to publish the voucher code from. It can either be a code from a campaign or a specific voucher identified by a code. 🚧 Publish multiple vouchers This endpoint does not support the publishing of multiple vouchers from a single campaign. In case you want to publish multiple vouchers within a single publication, you need to use a dedicated endpoint. 📘 Auto-update campaign In case you want to ensure the number of publishable codes increases automatically with the number of customers, you should use an **auto-update** campaign. # Example Request ❗️ Required Query param voucher OR campaign MUST be filled out. If you provide both, campaign param will be skipped.- Parameters:
customer- Contains information about the customer to whom the publication was directed. (required)joinOnce- Through this flag, you can control if a particular person gets only one and always the same code even if the app sends multiple publication requests. It means that if you have a referral program, a referrer is assigned only to one code if an integration sends publication requests more than once for the same customer. (optional)voucher- Code of voucher being published. (optional)campaign- Create publication with campaign. (optional)sourceId- The merchants publication ID if it is different from the Voucherify publication ID. Its an optional tracking identifier of a publication. It is really useful in case of an integration between multiple systems. It can be a publication ID from a CRM system, database or 3rd-party service. If source_id is provided only 1 voucher can be published per request. (optional)metadata- The metadata object stores all custom attributes assigned to the publication. A set of key/value pairs that you can attach to a publication object. It can be useful for storing additional information about the publication in a structured format. (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
-
listPublicationsCall
public okhttp3.Call listPublicationsCall(Integer limit, Integer page, ParameterOrderListPublications order, String campaign, String customer, String voucher, ParameterResultListPublications result, ParameterVoucherTypeListPublications voucherType, Boolean isReferralCode, ParameterFiltersListPublications filters, String sourceId, ApiCallback _callback) throws ApiException Build call for listPublications- 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)order- Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. (optional)campaign- Filters by a given campaign name. (optional)customer- Filters by a unique customer ID. (optional)voucher- Filters by a given voucher code. (optional)result- Filters by a publication result. (optional)voucherType- Filters by a voucher type. (optional)isReferralCode- This filter works only for the true option. If set to true, the query returns only publications of codes from referral campaigns. (optional)filters- Filters for listing publications. (optional)sourceId- Using this endpoint with a particular publication source_id, which was sent with the original request to create a publication, returns in the response, exactly the same code published initially because the code was assigned to the given publication. As a result, you can use this endpoint as a reference and return a code that was assigned in a publication by using a particular source_id. (optional)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
listPublications
public PublicationsListResponseBody listPublications(Integer limit, Integer page, ParameterOrderListPublications order, String campaign, String customer, String voucher, ParameterResultListPublications result, ParameterVoucherTypeListPublications voucherType, Boolean isReferralCode, ParameterFiltersListPublications filters, String sourceId) throws ApiException List Publications Retrieve a list of publications. To return a **particular** publication, you can use the source_id query parameter and provide the source_id of the publication you are looking for specifically. # Pagination 🚧 Important! If you want to scroll through a huge set of records, it is recommended to use the Exports API. This API will return an error page_over_limit if you reach a page above 1000. # Filter Query The filters query parameter allows for joining multiple parameters with logical operators. The syntax looks as follows: ## Operators: ## Examples- 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)order- Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. (optional)campaign- Filters by a given campaign name. (optional)customer- Filters by a unique customer ID. (optional)voucher- Filters by a given voucher code. (optional)result- Filters by a publication result. (optional)voucherType- Filters by a voucher type. (optional)isReferralCode- This filter works only for the true option. If set to true, the query returns only publications of codes from referral campaigns. (optional)filters- Filters for listing publications. (optional)sourceId- Using this endpoint with a particular publication source_id, which was sent with the original request to create a publication, returns in the response, exactly the same code published initially because the code was assigned to the given publication. As a result, you can use this endpoint as a reference and return a code that was assigned in a publication by using a particular source_id. (optional)- Returns:
- PublicationsListResponseBody
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
listPublicationsWithHttpInfo
public ApiResponse<PublicationsListResponseBody> listPublicationsWithHttpInfo(Integer limit, Integer page, ParameterOrderListPublications order, String campaign, String customer, String voucher, ParameterResultListPublications result, ParameterVoucherTypeListPublications voucherType, Boolean isReferralCode, ParameterFiltersListPublications filters, String sourceId) throws ApiException List Publications Retrieve a list of publications. To return a **particular** publication, you can use the source_id query parameter and provide the source_id of the publication you are looking for specifically. # Pagination 🚧 Important! If you want to scroll through a huge set of records, it is recommended to use the Exports API. This API will return an error page_over_limit if you reach a page above 1000. # Filter Query The filters query parameter allows for joining multiple parameters with logical operators. The syntax looks as follows: ## Operators: ## Examples- 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)order- Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. (optional)campaign- Filters by a given campaign name. (optional)customer- Filters by a unique customer ID. (optional)voucher- Filters by a given voucher code. (optional)result- Filters by a publication result. (optional)voucherType- Filters by a voucher type. (optional)isReferralCode- This filter works only for the true option. If set to true, the query returns only publications of codes from referral campaigns. (optional)filters- Filters for listing publications. (optional)sourceId- Using this endpoint with a particular publication source_id, which was sent with the original request to create a publication, returns in the response, exactly the same code published initially because the code was assigned to the given publication. As a result, you can use this endpoint as a reference and return a code that was assigned in a publication by using a particular source_id. (optional)- Returns:
- ApiResponse<PublicationsListResponseBody>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
listPublicationsAsync
public okhttp3.Call listPublicationsAsync(Integer limit, Integer page, ParameterOrderListPublications order, String campaign, String customer, String voucher, ParameterResultListPublications result, ParameterVoucherTypeListPublications voucherType, Boolean isReferralCode, ParameterFiltersListPublications filters, String sourceId, ApiCallback<PublicationsListResponseBody> _callback) throws ApiException List Publications (asynchronously) Retrieve a list of publications. To return a **particular** publication, you can use the source_id query parameter and provide the source_id of the publication you are looking for specifically. # Pagination 🚧 Important! If you want to scroll through a huge set of records, it is recommended to use the Exports API. This API will return an error page_over_limit if you reach a page above 1000. # Filter Query The filters query parameter allows for joining multiple parameters with logical operators. The syntax looks as follows: ## Operators: ## Examples- 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)order- Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. (optional)campaign- Filters by a given campaign name. (optional)customer- Filters by a unique customer ID. (optional)voucher- Filters by a given voucher code. (optional)result- Filters by a publication result. (optional)voucherType- Filters by a voucher type. (optional)isReferralCode- This filter works only for the true option. If set to true, the query returns only publications of codes from referral campaigns. (optional)filters- Filters for listing publications. (optional)sourceId- Using this endpoint with a particular publication source_id, which was sent with the original request to create a publication, returns in the response, exactly the same code published initially because the code was assigned to the given publication. As a result, you can use this endpoint as a reference and return a code that was assigned in a publication by using a particular source_id. (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
-