Class EcommerceApi

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

public class EcommerceApi extends BaseApi
  • Constructor Details

    • EcommerceApi

      public EcommerceApi()
    • EcommerceApi

      public EcommerceApi(ApiClient apiClient)
  • Method Details

    • createBatchOrder

      public CreatedBatchId createBatchOrder(@Nonnull OrderBatch orderBatch) throws ApiException
      Create orders in batch Create multiple orders at one time instead of one order at a time
      Parameters:
      orderBatch - (required)
      Returns:
      CreatedBatchId
      Throws:
      ApiException - if fails to make API call
    • createBatchOrder

      public CreatedBatchId createBatchOrder(@Nonnull OrderBatch orderBatch, Map<String,String> additionalHeaders) throws ApiException
      Create orders in batch Create multiple orders at one time instead of one order at a time
      Parameters:
      orderBatch - (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      CreatedBatchId
      Throws:
      ApiException - if fails to make API call
    • createOrder

      public void createOrder(@Nonnull Order order) throws ApiException
      Managing the status of the order Manages the transactional status of the order
      Parameters:
      order - (required)
      Throws:
      ApiException - if fails to make API call
    • createOrder

      public void createOrder(@Nonnull Order order, Map<String,String> additionalHeaders) throws ApiException
      Managing the status of the order Manages the transactional status of the order
      Parameters:
      order - (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • createUpdateBatchCategory

      public CreateUpdateBatchCategoryModel createUpdateBatchCategory(@Nonnull CreateUpdateBatchCategory createUpdateBatchCategory) throws ApiException
      Create categories in batch
      Parameters:
      createUpdateBatchCategory - Values to create a batch of categories (required)
      Returns:
      CreateUpdateBatchCategoryModel
      Throws:
      ApiException - if fails to make API call
    • createUpdateBatchCategory

      public CreateUpdateBatchCategoryModel createUpdateBatchCategory(@Nonnull CreateUpdateBatchCategory createUpdateBatchCategory, Map<String,String> additionalHeaders) throws ApiException
      Create categories in batch
      Parameters:
      createUpdateBatchCategory - Values to create a batch of categories (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      CreateUpdateBatchCategoryModel
      Throws:
      ApiException - if fails to make API call
    • createUpdateBatchProducts

      public CreateUpdateBatchProductsModel createUpdateBatchProducts(@Nonnull CreateUpdateBatchProducts createUpdateBatchProducts) throws ApiException
      Create products in batch
      Parameters:
      createUpdateBatchProducts - Values to create a batch of products (required)
      Returns:
      CreateUpdateBatchProductsModel
      Throws:
      ApiException - if fails to make API call
    • createUpdateBatchProducts

      public CreateUpdateBatchProductsModel createUpdateBatchProducts(@Nonnull CreateUpdateBatchProducts createUpdateBatchProducts, Map<String,String> additionalHeaders) throws ApiException
      Create products in batch
      Parameters:
      createUpdateBatchProducts - Values to create a batch of products (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      CreateUpdateBatchProductsModel
      Throws:
      ApiException - if fails to make API call
    • createUpdateCategory

      public CreateCategoryModel createUpdateCategory(@Nonnull CreateUpdateCategory createUpdateCategory) throws ApiException
      Create/Update a category
      Parameters:
      createUpdateCategory - Values to create/update a category (required)
      Returns:
      CreateCategoryModel
      Throws:
      ApiException - if fails to make API call
    • createUpdateCategory

      public CreateCategoryModel createUpdateCategory(@Nonnull CreateUpdateCategory createUpdateCategory, Map<String,String> additionalHeaders) throws ApiException
      Create/Update a category
      Parameters:
      createUpdateCategory - Values to create/update a category (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      CreateCategoryModel
      Throws:
      ApiException - if fails to make API call
    • createUpdateProduct

      public CreateProductModel createUpdateProduct(@Nonnull CreateUpdateProduct createUpdateProduct) throws ApiException
      Create/Update a product
      Parameters:
      createUpdateProduct - Values to create/update a product (required)
      Returns:
      CreateProductModel
      Throws:
      ApiException - if fails to make API call
    • createUpdateProduct

      public CreateProductModel createUpdateProduct(@Nonnull CreateUpdateProduct createUpdateProduct, Map<String,String> additionalHeaders) throws ApiException
      Create/Update a product
      Parameters:
      createUpdateProduct - Values to create/update a product (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      CreateProductModel
      Throws:
      ApiException - if fails to make API call
    • ecommerceActivatePost

      public void ecommerceActivatePost() throws ApiException
      Activate the eCommerce app Getting access to Brevo eCommerce.
      Throws:
      ApiException - if fails to make API call
    • ecommerceActivatePost

      public void ecommerceActivatePost(Map<String,String> additionalHeaders) throws ApiException
      Activate the eCommerce app Getting access to Brevo eCommerce.
      Parameters:
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • ecommerceAttributionMetricsConversionSourceConversionSourceIdGet

      public EcommerceAttributionMetricsConversionSourceConversionSourceIdGet200Response ecommerceAttributionMetricsConversionSourceConversionSourceIdGet(@Nonnull String conversionSource, @Nonnull String conversionSourceId) throws ApiException
      Get detailed attribution metrics for a single Brevo campaign or workflow
      Parameters:
      conversionSource - The Brevo campaign type or workflow type for which data will be retrieved (required)
      conversionSourceId - The Brevo campaign or automation workflow id for which data will be retrieved (required)
      Returns:
      EcommerceAttributionMetricsConversionSourceConversionSourceIdGet200Response
      Throws:
      ApiException - if fails to make API call
    • ecommerceAttributionMetricsConversionSourceConversionSourceIdGet

      public EcommerceAttributionMetricsConversionSourceConversionSourceIdGet200Response ecommerceAttributionMetricsConversionSourceConversionSourceIdGet(@Nonnull String conversionSource, @Nonnull String conversionSourceId, Map<String,String> additionalHeaders) throws ApiException
      Get detailed attribution metrics for a single Brevo campaign or workflow
      Parameters:
      conversionSource - The Brevo campaign type or workflow type for which data will be retrieved (required)
      conversionSourceId - The Brevo campaign or automation workflow id for which data will be retrieved (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      EcommerceAttributionMetricsConversionSourceConversionSourceIdGet200Response
      Throws:
      ApiException - if fails to make API call
    • ecommerceAttributionMetricsGet

      public EcommerceAttributionMetricsGet200Response ecommerceAttributionMetricsGet(@Nullable OffsetDateTime periodFrom, @Nullable OffsetDateTime periodTo, @Nullable List<String> emailCampaignId, @Nullable List<String> smsCampaignId, @Nullable List<String> automationWorkflowEmailId, @Nullable List<String> automationWorkflowSmsId) throws ApiException
      Get attribution metrics for one or more Brevo campaigns or workflows
      Parameters:
      periodFrom - When getting metrics for a specific period, define the starting datetime in RFC3339 format (optional)
      periodTo - When getting metrics for a specific period, define the end datetime in RFC3339 format (optional)
      emailCampaignId - The email campaign ID(s) to get metrics for (optional)
      smsCampaignId - The SMS campaign ID(s) to get metrics for (optional)
      automationWorkflowEmailId - The automation workflow ID(s) to get email attribution metrics for (optional)
      automationWorkflowSmsId - The automation workflow ID(s) to get SMS attribution metrics for (optional)
      Returns:
      EcommerceAttributionMetricsGet200Response
      Throws:
      ApiException - if fails to make API call
    • ecommerceAttributionMetricsGet

      public EcommerceAttributionMetricsGet200Response ecommerceAttributionMetricsGet(@Nullable OffsetDateTime periodFrom, @Nullable OffsetDateTime periodTo, @Nullable List<String> emailCampaignId, @Nullable List<String> smsCampaignId, @Nullable List<String> automationWorkflowEmailId, @Nullable List<String> automationWorkflowSmsId, Map<String,String> additionalHeaders) throws ApiException
      Get attribution metrics for one or more Brevo campaigns or workflows
      Parameters:
      periodFrom - When getting metrics for a specific period, define the starting datetime in RFC3339 format (optional)
      periodTo - When getting metrics for a specific period, define the end datetime in RFC3339 format (optional)
      emailCampaignId - The email campaign ID(s) to get metrics for (optional)
      smsCampaignId - The SMS campaign ID(s) to get metrics for (optional)
      automationWorkflowEmailId - The automation workflow ID(s) to get email attribution metrics for (optional)
      automationWorkflowSmsId - The automation workflow ID(s) to get SMS attribution metrics for (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      EcommerceAttributionMetricsGet200Response
      Throws:
      ApiException - if fails to make API call
    • ecommerceAttributionProductsConversionSourceConversionSourceIdGet

      public EcommerceAttributionProductsConversionSourceConversionSourceIdGet200Response ecommerceAttributionProductsConversionSourceConversionSourceIdGet(@Nonnull String conversionSource, @Nonnull String conversionSourceId) throws ApiException
      Get attributed product sales for a single Brevo campaign or workflow
      Parameters:
      conversionSource - The Brevo campaign or automation workflow type for which data will be retrieved (required)
      conversionSourceId - The Brevo campaign or automation workflow id for which data will be retrieved (required)
      Returns:
      EcommerceAttributionProductsConversionSourceConversionSourceIdGet200Response
      Throws:
      ApiException - if fails to make API call
    • ecommerceAttributionProductsConversionSourceConversionSourceIdGet

      public EcommerceAttributionProductsConversionSourceConversionSourceIdGet200Response ecommerceAttributionProductsConversionSourceConversionSourceIdGet(@Nonnull String conversionSource, @Nonnull String conversionSourceId, Map<String,String> additionalHeaders) throws ApiException
      Get attributed product sales for a single Brevo campaign or workflow
      Parameters:
      conversionSource - The Brevo campaign or automation workflow type for which data will be retrieved (required)
      conversionSourceId - The Brevo campaign or automation workflow id for which data will be retrieved (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      EcommerceAttributionProductsConversionSourceConversionSourceIdGet200Response
      Throws:
      ApiException - if fails to make API call
    • ecommerceConfigDisplayCurrencyGet

      public EcommerceConfigDisplayCurrencyGet200Response ecommerceConfigDisplayCurrencyGet() throws ApiException
      Get the ISO 4217 compliant display currency code for your Brevo account
      Returns:
      EcommerceConfigDisplayCurrencyGet200Response
      Throws:
      ApiException - if fails to make API call
    • ecommerceConfigDisplayCurrencyGet

      public EcommerceConfigDisplayCurrencyGet200Response ecommerceConfigDisplayCurrencyGet(Map<String,String> additionalHeaders) throws ApiException
      Get the ISO 4217 compliant display currency code for your Brevo account
      Parameters:
      additionalHeaders - additionalHeaders for this call
      Returns:
      EcommerceConfigDisplayCurrencyGet200Response
      Throws:
      ApiException - if fails to make API call
    • getCategories

      public GetCategories getCategories(@Nullable Long limit, @Nullable Long offset, @Nullable String sort, @Nullable List<String> ids, @Nullable String name, @Nullable String modifiedSince, @Nullable String createdSince) throws ApiException
      Return all your categories
      Parameters:
      limit - Number of documents per page (optional, default to 50)
      offset - Index of the first document in the page (optional, default to 0)
      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)
      ids - Filter by category ids (optional)
      name - Filter by category name (optional)
      modifiedSince - Filter (urlencoded) the categories modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** (optional)
      createdSince - Filter (urlencoded) the categories created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** (optional)
      Returns:
      GetCategories
      Throws:
      ApiException - if fails to make API call
    • getCategories

      public GetCategories getCategories(@Nullable Long limit, @Nullable Long offset, @Nullable String sort, @Nullable List<String> ids, @Nullable String name, @Nullable String modifiedSince, @Nullable String createdSince, Map<String,String> additionalHeaders) throws ApiException
      Return all your categories
      Parameters:
      limit - Number of documents per page (optional, default to 50)
      offset - Index of the first document in the page (optional, default to 0)
      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)
      ids - Filter by category ids (optional)
      name - Filter by category name (optional)
      modifiedSince - Filter (urlencoded) the categories modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** (optional)
      createdSince - Filter (urlencoded) the categories created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      GetCategories
      Throws:
      ApiException - if fails to make API call
    • getCategoryInfo

      public GetCategoryDetails getCategoryInfo(@Nonnull String id) throws ApiException
      Get a category details
      Parameters:
      id - Category ID (required)
      Returns:
      GetCategoryDetails
      Throws:
      ApiException - if fails to make API call
    • getCategoryInfo

      public GetCategoryDetails getCategoryInfo(@Nonnull String id, Map<String,String> additionalHeaders) throws ApiException
      Get a category details
      Parameters:
      id - Category ID (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      GetCategoryDetails
      Throws:
      ApiException - if fails to make API call
    • getOrders

      public void getOrders(@Nullable Long limit, @Nullable Long offset, @Nullable String sort, @Nullable String modifiedSince, @Nullable String createdSince) throws ApiException
      Get order details Get all the orders
      Parameters:
      limit - Number of documents per page (optional, default to 50)
      offset - Index of the first document in the page (optional, default to 0)
      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)
      modifiedSince - Filter (urlencoded) the orders modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** (optional)
      createdSince - Filter (urlencoded) the orders created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** (optional)
      Throws:
      ApiException - if fails to make API call
    • getOrders

      public void getOrders(@Nullable Long limit, @Nullable Long offset, @Nullable String sort, @Nullable String modifiedSince, @Nullable String createdSince, Map<String,String> additionalHeaders) throws ApiException
      Get order details Get all the orders
      Parameters:
      limit - Number of documents per page (optional, default to 50)
      offset - Index of the first document in the page (optional, default to 0)
      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)
      modifiedSince - Filter (urlencoded) the orders modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** (optional)
      createdSince - Filter (urlencoded) the orders created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** (optional)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • getProductInfo

      public GetProductDetails getProductInfo(@Nonnull String id) throws ApiException
      Get a product's details
      Parameters:
      id - Product ID (required)
      Returns:
      GetProductDetails
      Throws:
      ApiException - if fails to make API call
    • getProductInfo

      public GetProductDetails getProductInfo(@Nonnull String id, Map<String,String> additionalHeaders) throws ApiException
      Get a product's details
      Parameters:
      id - Product ID (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      GetProductDetails
      Throws:
      ApiException - if fails to make API call
    • getProducts

      public GetProducts getProducts(@Nullable Long limit, @Nullable Long offset, @Nullable String sort, @Nullable List<String> ids, @Nullable String name, @Nullable BigDecimal priceLte, @Nullable BigDecimal priceGte, @Nullable BigDecimal priceLt, @Nullable BigDecimal priceGt, @Nullable BigDecimal priceEq, @Nullable BigDecimal priceNe, @Nullable List<String> categories, @Nullable String modifiedSince, @Nullable String createdSince) throws ApiException
      Return all your products
      Parameters:
      limit - Number of documents per page (optional, default to 50)
      offset - Index of the first document in the page (optional, default to 0)
      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)
      ids - Filter by product ids (optional)
      name - Filter by product name, minimum 3 characters should be present for search (optional)
      priceLte - Price filter for products less than and equals to particular amount (optional)
      priceGte - Price filter for products greater than and equals to particular amount (optional)
      priceLt - Price filter for products less than particular amount (optional)
      priceGt - Price filter for products greater than particular amount (optional)
      priceEq - Price filter for products equals to particular amount (optional)
      priceNe - Price filter for products not equals to particular amount (optional)
      categories - Filter by product categories (optional)
      modifiedSince - Filter (urlencoded) the orders modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** (optional)
      createdSince - Filter (urlencoded) the orders created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** (optional)
      Returns:
      GetProducts
      Throws:
      ApiException - if fails to make API call
    • getProducts

      public GetProducts getProducts(@Nullable Long limit, @Nullable Long offset, @Nullable String sort, @Nullable List<String> ids, @Nullable String name, @Nullable BigDecimal priceLte, @Nullable BigDecimal priceGte, @Nullable BigDecimal priceLt, @Nullable BigDecimal priceGt, @Nullable BigDecimal priceEq, @Nullable BigDecimal priceNe, @Nullable List<String> categories, @Nullable String modifiedSince, @Nullable String createdSince, Map<String,String> additionalHeaders) throws ApiException
      Return all your products
      Parameters:
      limit - Number of documents per page (optional, default to 50)
      offset - Index of the first document in the page (optional, default to 0)
      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)
      ids - Filter by product ids (optional)
      name - Filter by product name, minimum 3 characters should be present for search (optional)
      priceLte - Price filter for products less than and equals to particular amount (optional)
      priceGte - Price filter for products greater than and equals to particular amount (optional)
      priceLt - Price filter for products less than particular amount (optional)
      priceGt - Price filter for products greater than particular amount (optional)
      priceEq - Price filter for products equals to particular amount (optional)
      priceNe - Price filter for products not equals to particular amount (optional)
      categories - Filter by product categories (optional)
      modifiedSince - Filter (urlencoded) the orders modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** (optional)
      createdSince - Filter (urlencoded) the orders created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      GetProducts
      Throws:
      ApiException - if fails to make API call
    • setConfigDisplayCurrency

      public EcommerceConfigDisplayCurrencyGet200Response setConfigDisplayCurrency(@Nullable EcommerceConfigDisplayCurrencyGet200Response ecommerceConfigDisplayCurrencyGet200Response) throws ApiException
      Set the ISO 4217 compliant display currency code for your Brevo account
      Parameters:
      ecommerceConfigDisplayCurrencyGet200Response - set ISO 4217 compliant display currency code payload (optional)
      Returns:
      EcommerceConfigDisplayCurrencyGet200Response
      Throws:
      ApiException - if fails to make API call
    • setConfigDisplayCurrency

      public EcommerceConfigDisplayCurrencyGet200Response setConfigDisplayCurrency(@Nullable EcommerceConfigDisplayCurrencyGet200Response ecommerceConfigDisplayCurrencyGet200Response, Map<String,String> additionalHeaders) throws ApiException
      Set the ISO 4217 compliant display currency code for your Brevo account
      Parameters:
      ecommerceConfigDisplayCurrencyGet200Response - set ISO 4217 compliant display currency code payload (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      EcommerceConfigDisplayCurrencyGet200Response
      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.