Skip to content

Latest commit

 

History

History
1152 lines (876 loc) · 45.8 KB

File metadata and controls

1152 lines (876 loc) · 45.8 KB

EcommerceApi

All URIs are relative to https://api.brevo.com/v3

Method HTTP request Description
createBatchOrder POST /orders/status/batch Create orders in batch
createOrder POST /orders/status Managing the status of the order
createProductAlert POST /products/{id}/alerts/{type} Create a product alert for a contact
createUpdateBatchCategory POST /categories/batch Create categories in batch
createUpdateBatchProducts POST /products/batch Create products in batch
createUpdateCategory POST /categories Create/Update a category
createUpdateProduct POST /products Create/Update a product
ecommerceActivatePost POST /ecommerce/activate Activate the eCommerce app
ecommerceAttributionMetricsConversionSourceConversionSourceIdGet GET /ecommerce/attribution/metrics/{conversionSource}/{conversionSourceId} Get detailed attribution metrics for a single Brevo campaign or workflow
ecommerceAttributionMetricsGet GET /ecommerce/attribution/metrics Get attribution metrics for one or more Brevo campaigns or workflows
ecommerceAttributionProductsConversionSourceConversionSourceIdGet GET /ecommerce/attribution/products/{conversionSource}/{conversionSourceId} Get attributed product sales for a single Brevo campaign or workflow
ecommerceConfigDisplayCurrencyGet GET /ecommerce/config/displayCurrency Get the ISO 4217 compliant display currency code for your Brevo account
getCategories GET /categories Return all your categories
getCategoryInfo GET /categories/{id} Get a category details
getOrders GET /orders Get order details
getProductInfo GET /products/{id} Get a product's details
getProducts GET /products Return all your products
setConfigDisplayCurrency POST /ecommerce/config/displayCurrency Set the ISO 4217 compliant display currency code for your Brevo account

createBatchOrder

createBatchOrder(orderBatch)

Create orders in batch

Create multiple orders at one time instead of one order at a time

Example

// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.EcommerceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");

// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");

EcommerceApi apiInstance = new EcommerceApi();
OrderBatch orderBatch = new OrderBatch(); // OrderBatch | 
try {
    apiInstance.createBatchOrder(orderBatch);
} catch (ApiException e) {
    System.err.println("Exception when calling EcommerceApi#createBatchOrder");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
orderBatch OrderBatch

Return type

null (empty response body)

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

createOrder

createOrder(order)

Managing the status of the order

Manages the transactional status of the order

Example

// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.EcommerceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");

// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");

EcommerceApi apiInstance = new EcommerceApi();
Order order = new Order(); // Order | 
try {
    apiInstance.createOrder(order);
} catch (ApiException e) {
    System.err.println("Exception when calling EcommerceApi#createOrder");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
order Order

Return type

null (empty response body)

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

createProductAlert

createProductAlert(id, type, contactIdentifiers)

Create a product alert for a contact

Example

// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.EcommerceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");

// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");

EcommerceApi apiInstance = new EcommerceApi();
String id = "id_example"; // String | Product ID
String type = "type_example"; // String | Alert type
ContactIdentifiers contactIdentifiers = new ContactIdentifiers(); // ContactIdentifiers | Contact identifier to associate the alert with (at least one is required). Priority is given to `ext_id` > `email` > `sms`
try {
    apiInstance.createProductAlert(id, type, contactIdentifiers);
} catch (ApiException e) {
    System.err.println("Exception when calling EcommerceApi#createProductAlert");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id String Product ID
type String Alert type [enum: back_in_stock]
contactIdentifiers ContactIdentifiers Contact identifier to associate the alert with (at least one is required). Priority is given to `ext_id` > `email` > `sms`

Return type

null (empty response body)

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

createUpdateBatchCategory

CreateUpdateBatchCategoryModel createUpdateBatchCategory(createUpdateBatchCategory)

Create categories in batch

Example

// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.EcommerceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");

// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");

EcommerceApi apiInstance = new EcommerceApi();
CreateUpdateBatchCategory createUpdateBatchCategory = new CreateUpdateBatchCategory(); // CreateUpdateBatchCategory | Values to create a batch of categories
try {
    CreateUpdateBatchCategoryModel result = apiInstance.createUpdateBatchCategory(createUpdateBatchCategory);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling EcommerceApi#createUpdateBatchCategory");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
createUpdateBatchCategory CreateUpdateBatchCategory Values to create a batch of categories

Return type

CreateUpdateBatchCategoryModel

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

createUpdateBatchProducts

CreateUpdateBatchProductsModel createUpdateBatchProducts(createUpdateBatchProducts)

Create products in batch

Example

// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.EcommerceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");

// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");

EcommerceApi apiInstance = new EcommerceApi();
CreateUpdateBatchProducts createUpdateBatchProducts = new CreateUpdateBatchProducts(); // CreateUpdateBatchProducts | Values to create a batch of products
try {
    CreateUpdateBatchProductsModel result = apiInstance.createUpdateBatchProducts(createUpdateBatchProducts);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling EcommerceApi#createUpdateBatchProducts");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
createUpdateBatchProducts CreateUpdateBatchProducts Values to create a batch of products

Return type

CreateUpdateBatchProductsModel

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

createUpdateCategory

CreateCategoryModel createUpdateCategory(createUpdateCategory)

Create/Update a category

Example

// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.EcommerceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");

// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");

EcommerceApi apiInstance = new EcommerceApi();
CreateUpdateCategory createUpdateCategory = new CreateUpdateCategory(); // CreateUpdateCategory | Values to create/update a category
try {
    CreateCategoryModel result = apiInstance.createUpdateCategory(createUpdateCategory);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling EcommerceApi#createUpdateCategory");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
createUpdateCategory CreateUpdateCategory Values to create/update a category

Return type

CreateCategoryModel

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

createUpdateProduct

CreateProductModel createUpdateProduct(createUpdateProduct)

Create/Update a product

Example

// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.EcommerceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");

// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");

EcommerceApi apiInstance = new EcommerceApi();
CreateUpdateProduct createUpdateProduct = new CreateUpdateProduct(); // CreateUpdateProduct | Values to create/update a product
try {
    CreateProductModel result = apiInstance.createUpdateProduct(createUpdateProduct);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling EcommerceApi#createUpdateProduct");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
createUpdateProduct CreateUpdateProduct Values to create/update a product

Return type

CreateProductModel

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

ecommerceActivatePost

ecommerceActivatePost()

Activate the eCommerce app

Getting access to Brevo eCommerce.

Example

// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.EcommerceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");

// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");

EcommerceApi apiInstance = new EcommerceApi();
try {
    apiInstance.ecommerceActivatePost();
} catch (ApiException e) {
    System.err.println("Exception when calling EcommerceApi#ecommerceActivatePost");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

null (empty response body)

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

ecommerceAttributionMetricsConversionSourceConversionSourceIdGet

InlineResponse2008 ecommerceAttributionMetricsConversionSourceConversionSourceIdGet(conversionSource, conversionSourceId)

Get detailed attribution metrics for a single Brevo campaign or workflow

Example

// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.EcommerceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");

// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");

EcommerceApi apiInstance = new EcommerceApi();
String conversionSource = "conversionSource_example"; // String | The Brevo campaign type or workflow type for which data will be retrieved
String conversionSourceId = "conversionSourceId_example"; // String | The Brevo campaign or automation workflow id for which data will be retrieved
try {
    InlineResponse2008 result = apiInstance.ecommerceAttributionMetricsConversionSourceConversionSourceIdGet(conversionSource, conversionSourceId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling EcommerceApi#ecommerceAttributionMetricsConversionSourceConversionSourceIdGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
conversionSource String The Brevo campaign type or workflow type for which data will be retrieved [enum: email_campaign, sms_campaign, automation_workflow_email, automation_workflow_sms]
conversionSourceId String The Brevo campaign or automation workflow id for which data will be retrieved

Return type

InlineResponse2008

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

ecommerceAttributionMetricsGet

InlineResponse2007 ecommerceAttributionMetricsGet(periodFrom, periodTo, emailCampaignId, smsCampaignId, automationWorkflowEmailId, automationWorkflowSmsId)

Get attribution metrics for one or more Brevo campaigns or workflows

Example

// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.EcommerceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");

// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");

EcommerceApi apiInstance = new EcommerceApi();
OffsetDateTime periodFrom = OffsetDateTime.now(); // OffsetDateTime | When getting metrics for a specific period, define the starting datetime in RFC3339 format
OffsetDateTime periodTo = OffsetDateTime.now(); // OffsetDateTime | When getting metrics for a specific period, define the end datetime in RFC3339 format
List<String> emailCampaignId = Arrays.asList("emailCampaignId_example"); // List<String> | The email campaign ID(s) to get metrics for
List<String> smsCampaignId = Arrays.asList("smsCampaignId_example"); // List<String> | The SMS campaign ID(s) to get metrics for
List<String> automationWorkflowEmailId = Arrays.asList("automationWorkflowEmailId_example"); // List<String> | The automation workflow ID(s) to get email attribution metrics for
List<String> automationWorkflowSmsId = Arrays.asList("automationWorkflowSmsId_example"); // List<String> | The automation workflow ID(s) to get SMS attribution metrics for
try {
    InlineResponse2007 result = apiInstance.ecommerceAttributionMetricsGet(periodFrom, periodTo, emailCampaignId, smsCampaignId, automationWorkflowEmailId, automationWorkflowSmsId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling EcommerceApi#ecommerceAttributionMetricsGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
periodFrom OffsetDateTime When getting metrics for a specific period, define the starting datetime in RFC3339 format [optional]
periodTo OffsetDateTime When getting metrics for a specific period, define the end datetime in RFC3339 format [optional]
emailCampaignId List<String> The email campaign ID(s) to get metrics for [optional]
smsCampaignId List<String> The SMS campaign ID(s) to get metrics for [optional]
automationWorkflowEmailId List<String> The automation workflow ID(s) to get email attribution metrics for [optional]
automationWorkflowSmsId List<String> The automation workflow ID(s) to get SMS attribution metrics for [optional]

Return type

InlineResponse2007

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

ecommerceAttributionProductsConversionSourceConversionSourceIdGet

InlineResponse2009 ecommerceAttributionProductsConversionSourceConversionSourceIdGet(conversionSource, conversionSourceId)

Get attributed product sales for a single Brevo campaign or workflow

Example

// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.EcommerceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");

// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");

EcommerceApi apiInstance = new EcommerceApi();
String conversionSource = "conversionSource_example"; // String | The Brevo campaign or automation workflow type for which data will be retrieved
String conversionSourceId = "conversionSourceId_example"; // String | The Brevo campaign or automation workflow id for which data will be retrieved
try {
    InlineResponse2009 result = apiInstance.ecommerceAttributionProductsConversionSourceConversionSourceIdGet(conversionSource, conversionSourceId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling EcommerceApi#ecommerceAttributionProductsConversionSourceConversionSourceIdGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
conversionSource String The Brevo campaign or automation workflow type for which data will be retrieved [enum: email_campaign, sms_campaign, automation_workflow_email, automation_workflow_sms]
conversionSourceId String The Brevo campaign or automation workflow id for which data will be retrieved

Return type

InlineResponse2009

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

ecommerceConfigDisplayCurrencyGet

InlineResponse2006 ecommerceConfigDisplayCurrencyGet()

Get the ISO 4217 compliant display currency code for your Brevo account

Example

// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.EcommerceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");

// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");

EcommerceApi apiInstance = new EcommerceApi();
try {
    InlineResponse2006 result = apiInstance.ecommerceConfigDisplayCurrencyGet();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling EcommerceApi#ecommerceConfigDisplayCurrencyGet");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

InlineResponse2006

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

getCategories

GetCategories getCategories(limit, offset, sort, ids, name, modifiedSince, createdSince, isDeleted)

Return all your categories

Example

// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.EcommerceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");

// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");

EcommerceApi apiInstance = new EcommerceApi();
Long limit = 50L; // Long | Number of documents per page
Long offset = 0L; // Long | Index of the first document in the page
String sort = "desc"; // String | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
List<String> ids = Arrays.asList("ids_example"); // List<String> | Filter by category ids
String name = "name_example"; // String | Filter by category name
String modifiedSince = "modifiedSince_example"; // String | 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.** 
String createdSince = "createdSince_example"; // String | 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.** 
Object isDeleted = null; // Object | Filter categories by their deletion status. If `false` is passed, only categories that are not deleted will be returned. 
try {
    GetCategories result = apiInstance.getCategories(limit, offset, sort, ids, name, modifiedSince, createdSince, isDeleted);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling EcommerceApi#getCategories");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
limit Long Number of documents per page [optional] [default to 50]
offset Long Index of the first document in the page [optional] [default to 0]
sort String Sort the results in the ascending/descending order of record creation. Default order is descending if `sort` is not passed [optional] [default to desc] [enum: asc, desc]
ids List<String> Filter by category ids [optional]
name String Filter by category name [optional]
modifiedSince String 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 String 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]
isDeleted Object Filter categories by their deletion status. If `false` is passed, only categories that are not deleted will be returned. [optional]

Return type

GetCategories

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

getCategoryInfo

GetCategoryDetails getCategoryInfo(id)

Get a category details

Example

// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.EcommerceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");

// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");

EcommerceApi apiInstance = new EcommerceApi();
String id = "id_example"; // String | Category ID
try {
    GetCategoryDetails result = apiInstance.getCategoryInfo(id);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling EcommerceApi#getCategoryInfo");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id String Category ID

Return type

GetCategoryDetails

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

getOrders

GetOrders getOrders(limit, offset, sort, modifiedSince, createdSince)

Get order details

Get all the orders

Example

// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.EcommerceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");

// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");

EcommerceApi apiInstance = new EcommerceApi();
Long limit = 50L; // Long | Number of documents per page
Long offset = 0L; // Long | Index of the first document in the page
String sort = "desc"; // String | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
String modifiedSince = "modifiedSince_example"; // String | 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.** 
String createdSince = "createdSince_example"; // String | 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.** 
try {
    GetOrders result = apiInstance.getOrders(limit, offset, sort, modifiedSince, createdSince);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling EcommerceApi#getOrders");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
limit Long Number of documents per page [optional] [default to 50]
offset Long Index of the first document in the page [optional] [default to 0]
sort String Sort the results in the ascending/descending order of record creation. Default order is descending if `sort` is not passed [optional] [default to desc] [enum: asc, desc]
modifiedSince String 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 String 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]

Return type

GetOrders

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

getProductInfo

GetProductDetails getProductInfo(id)

Get a product's details

Example

// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.EcommerceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");

// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");

EcommerceApi apiInstance = new EcommerceApi();
String id = "id_example"; // String | Product ID
try {
    GetProductDetails result = apiInstance.getProductInfo(id);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling EcommerceApi#getProductInfo");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id String Product ID

Return type

GetProductDetails

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

getProducts

GetProducts getProducts(limit, offset, sort, ids, name, priceLte, priceGte, priceLt, priceGt, priceEq, priceNe, categories, modifiedSince, createdSince, isDeleted)

Return all your products

Example

// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.EcommerceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");

// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");

EcommerceApi apiInstance = new EcommerceApi();
Long limit = 50L; // Long | Number of documents per page
Long offset = 0L; // Long | Index of the first document in the page
String sort = "desc"; // String | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
List<String> ids = Arrays.asList("ids_example"); // List<String> | Filter by product ids
String name = "name_example"; // String | Filter by product name, minimum 3 characters should be present for search
BigDecimal priceLte = new BigDecimal(); // BigDecimal | Price filter for products less than and equals to particular amount
BigDecimal priceGte = new BigDecimal(); // BigDecimal | Price filter for products greater than and equals to particular amount
BigDecimal priceLt = new BigDecimal(); // BigDecimal | Price filter for products less than particular amount
BigDecimal priceGt = new BigDecimal(); // BigDecimal | Price filter for products greater than particular amount
BigDecimal priceEq = new BigDecimal(); // BigDecimal | Price filter for products equals to particular amount
BigDecimal priceNe = new BigDecimal(); // BigDecimal | Price filter for products not equals to particular amount
List<String> categories = Arrays.asList("categories_example"); // List<String> | Filter by category ids
String modifiedSince = "modifiedSince_example"; // String | 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.** 
String createdSince = "createdSince_example"; // String | 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.** 
Object isDeleted = null; // Object | Filter products by their deletion status. If `false` is passed, only products that are not deleted will be returned. 
try {
    GetProducts result = apiInstance.getProducts(limit, offset, sort, ids, name, priceLte, priceGte, priceLt, priceGt, priceEq, priceNe, categories, modifiedSince, createdSince, isDeleted);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling EcommerceApi#getProducts");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
limit Long Number of documents per page [optional] [default to 50]
offset Long Index of the first document in the page [optional] [default to 0]
sort String Sort the results in the ascending/descending order of record creation. Default order is descending if `sort` is not passed [optional] [default to desc] [enum: asc, desc]
ids List<String> Filter by product ids [optional]
name String Filter by product name, minimum 3 characters should be present for search [optional]
priceLte BigDecimal Price filter for products less than and equals to particular amount [optional]
priceGte BigDecimal Price filter for products greater than and equals to particular amount [optional]
priceLt BigDecimal Price filter for products less than particular amount [optional]
priceGt BigDecimal Price filter for products greater than particular amount [optional]
priceEq BigDecimal Price filter for products equals to particular amount [optional]
priceNe BigDecimal Price filter for products not equals to particular amount [optional]
categories List<String> Filter by category ids [optional]
modifiedSince String 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 String 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]
isDeleted Object Filter products by their deletion status. If `false` is passed, only products that are not deleted will be returned. [optional]

Return type

GetProducts

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

setConfigDisplayCurrency

SetConfigDisplayCurrency setConfigDisplayCurrency(setConfigDisplayCurrency)

Set the ISO 4217 compliant display currency code for your Brevo account

Example

// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.EcommerceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");

// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");

EcommerceApi apiInstance = new EcommerceApi();
SetConfigDisplayCurrency setConfigDisplayCurrency = new SetConfigDisplayCurrency(); // SetConfigDisplayCurrency | set ISO 4217 compliant display currency code payload
try {
    SetConfigDisplayCurrency result = apiInstance.setConfigDisplayCurrency(setConfigDisplayCurrency);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling EcommerceApi#setConfigDisplayCurrency");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
setConfigDisplayCurrency SetConfigDisplayCurrency set ISO 4217 compliant display currency code payload

Return type

SetConfigDisplayCurrency

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json