Class TransactionalWhatsAppApi

java.lang.Object
software.xdev.brevo.client.BaseApi
software.xdev.brevo.api.TransactionalWhatsAppApi

public class TransactionalWhatsAppApi extends BaseApi
  • Constructor Details

    • TransactionalWhatsAppApi

      public TransactionalWhatsAppApi()
    • TransactionalWhatsAppApi

      public TransactionalWhatsAppApi(ApiClient apiClient)
  • Method Details

    • getWhatsappEventReport

      public GetWhatsappEventReport getWhatsappEventReport(@Nullable Long limit, @Nullable Long offset, @Nullable String startDate, @Nullable String endDate, @Nullable Long days, @Nullable String contactNumber, @Nullable String event, @Nullable String sort) throws ApiException
      Get all your WhatsApp activity (unaggregated events) This endpoint will show the unaggregated statistics for WhatsApp activity (30 days by default if `startDate` and `endDate` or `days` is not passed. The date range can not exceed 90 days)
      Parameters:
      limit - Number limitation for the result returned (optional, default to 2500)
      offset - Beginning point in the list to retrieve from (optional, default to 0)
      startDate - **Mandatory if endDate is used.** Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional)
      endDate - **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional)
      days - Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ (optional)
      contactNumber - Filter results for specific contact (WhatsApp Number with country code. Example, 85264318721) (optional)
      event - Filter the report for a specific event type (optional)
      sort - Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc)
      Returns:
      GetWhatsappEventReport
      Throws:
      ApiException - if fails to make API call
    • getWhatsappEventReport

      public GetWhatsappEventReport getWhatsappEventReport(@Nullable Long limit, @Nullable Long offset, @Nullable String startDate, @Nullable String endDate, @Nullable Long days, @Nullable String contactNumber, @Nullable String event, @Nullable String sort, Map<String,String> additionalHeaders) throws ApiException
      Get all your WhatsApp activity (unaggregated events) This endpoint will show the unaggregated statistics for WhatsApp activity (30 days by default if `startDate` and `endDate` or `days` is not passed. The date range can not exceed 90 days)
      Parameters:
      limit - Number limitation for the result returned (optional, default to 2500)
      offset - Beginning point in the list to retrieve from (optional, default to 0)
      startDate - **Mandatory if endDate is used.** Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional)
      endDate - **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional)
      days - Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ (optional)
      contactNumber - Filter results for specific contact (WhatsApp Number with country code. Example, 85264318721) (optional)
      event - Filter the report for a specific event type (optional)
      sort - Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc)
      additionalHeaders - additionalHeaders for this call
      Returns:
      GetWhatsappEventReport
      Throws:
      ApiException - if fails to make API call
    • sendWhatsappMessage

      public SendWhatsappMessage201Response sendWhatsappMessage(@Nonnull SendWhatsappMessageRequest sendWhatsappMessageRequest) throws ApiException
      Send a WhatsApp message This endpoint is used to send a WhatsApp message. <br/>(**The first message you send using the API must contain a Template ID. You must create a template on WhatsApp on the Brevo platform to fetch the Template ID.**)
      Parameters:
      sendWhatsappMessageRequest - Values to send WhatsApp message (required)
      Returns:
      SendWhatsappMessage201Response
      Throws:
      ApiException - if fails to make API call
    • sendWhatsappMessage

      public SendWhatsappMessage201Response sendWhatsappMessage(@Nonnull SendWhatsappMessageRequest sendWhatsappMessageRequest, Map<String,String> additionalHeaders) throws ApiException
      Send a WhatsApp message This endpoint is used to send a WhatsApp message. <br/>(**The first message you send using the API must contain a Template ID. You must create a template on WhatsApp on the Brevo platform to fetch the Template ID.**)
      Parameters:
      sendWhatsappMessageRequest - Values to send WhatsApp message (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      SendWhatsappMessage201Response
      Throws:
      ApiException - if fails to make API call
    • invokeAPI

      public <T> T invokeAPI(String url, String method, Object request, com.fasterxml.jackson.core.type.TypeReference<T> returnType, Map<String,String> additionalHeaders) throws ApiException
      Description copied from class: BaseApi
      Directly invoke the API for the given URL. Useful if the API returns direct links/URLs for subsequent requests.
      Specified by:
      invokeAPI in class BaseApi
      Parameters:
      url - The URL for the request, either full URL or only the path.
      method - The HTTP method for the request.
      request - The request object.
      returnType - The return type.
      additionalHeaders - Additional headers for the request.
      Returns:
      The API response in the specified type.
      Throws:
      ApiException - if fails to make API call.