All URIs are relative to https://api.brevo.com/v3
Method | HTTP request | Description |
---|---|---|
companiesAttributesGet | GET /companies/attributes | Get company attributes |
companiesGet | GET /companies | Get all companies |
companiesIdDelete | DELETE /companies/{id} | Delete a company |
companiesIdGet | GET /companies/{id} | Get a company |
companiesIdPatch | PATCH /companies/{id} | Update a company |
companiesLinkUnlinkIdPatch | PATCH /companies/link-unlink/{id} | Link and Unlink company with contacts and deals |
companiesPost | POST /companies | Create a company |
CompanyAttributes companiesAttributesGet()
Get company attributes
// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.CompaniesApi;
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");
CompaniesApi apiInstance = new CompaniesApi();
try {
CompanyAttributes result = apiInstance.companiesAttributesGet();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CompaniesApi#companiesAttributesGet");
e.printStackTrace();
}
This endpoint does not need any parameter.
- Content-Type: application/json
- Accept: application/json
CompaniesList companiesGet(filters, linkedContactsIds, linkedDealsIds, page, limit, sort, sortBy)
Get all companies
// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.CompaniesApi;
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");
CompaniesApi apiInstance = new CompaniesApi();
String filters = "filters_example"; // String | Filter by attrbutes. If you have filter for owner on your side please send it as {\"attributes.owner\":\"5b1a17d914b73d35a76ca0c7\"}
Long linkedContactsIds = 789L; // Long | Filter by linked contacts ids
String linkedDealsIds = "linkedDealsIds_example"; // String | Filter by linked deals ids
Long page = 789L; // Long | Index of the first document of the page
Long limit = 50L; // Long | Number of documents per page
String sort = "sort_example"; // String | Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed
String sortBy = "sortBy_example"; // String | The field used to sort field names.
try {
CompaniesList result = apiInstance.companiesGet(filters, linkedContactsIds, linkedDealsIds, page, limit, sort, sortBy);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CompaniesApi#companiesGet");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
filters | String | Filter by attrbutes. If you have filter for owner on your side please send it as {"attributes.owner":"5b1a17d914b73d35a76ca0c7"} | [optional] |
linkedContactsIds | Long | Filter by linked contacts ids | [optional] |
linkedDealsIds | String | Filter by linked deals ids | [optional] |
page | Long | Index of the first document of the page | [optional] |
limit | Long | Number of documents per page | [optional] [default to 50] |
sort | String | Sort the results in the ascending/descending order. Default order is descending by creation if `sort` is not passed | [optional] [enum: asc, desc] |
sortBy | String | The field used to sort field names. | [optional] |
- Content-Type: application/json
- Accept: application/json
companiesIdDelete(id)
Delete a company
// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.CompaniesApi;
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");
CompaniesApi apiInstance = new CompaniesApi();
String id = "id_example"; // String |
try {
apiInstance.companiesIdDelete(id);
} catch (ApiException e) {
System.err.println("Exception when calling CompaniesApi#companiesIdDelete");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
id | String |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
Company companiesIdGet(id)
Get a company
// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.CompaniesApi;
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");
CompaniesApi apiInstance = new CompaniesApi();
String id = "id_example"; // String |
try {
Company result = apiInstance.companiesIdGet(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CompaniesApi#companiesIdGet");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
id | String |
- Content-Type: application/json
- Accept: application/json
Company companiesIdPatch(id, body)
Update a company
// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.CompaniesApi;
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");
CompaniesApi apiInstance = new CompaniesApi();
String id = "id_example"; // String |
Body4 body = new Body4(); // Body4 | Updated company details.
try {
Company result = apiInstance.companiesIdPatch(id, body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CompaniesApi#companiesIdPatch");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
id | String | ||
body | Body4 | Updated company details. |
- Content-Type: application/json
- Accept: application/json
companiesLinkUnlinkIdPatch(id, body)
Link and Unlink company with contacts and deals
// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.CompaniesApi;
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");
CompaniesApi apiInstance = new CompaniesApi();
String id = "id_example"; // String |
Body5 body = new Body5(); // Body5 | Linked / Unlinked contacts and deals ids.
try {
apiInstance.companiesLinkUnlinkIdPatch(id, body);
} catch (ApiException e) {
System.err.println("Exception when calling CompaniesApi#companiesLinkUnlinkIdPatch");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
id | String | ||
body | Body5 | Linked / Unlinked contacts and deals ids. |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
InlineResponse2002 companiesPost(body)
Create a company
// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.CompaniesApi;
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");
CompaniesApi apiInstance = new CompaniesApi();
Body3 body = new Body3(); // Body3 | Company create data.
try {
InlineResponse2002 result = apiInstance.companiesPost(body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CompaniesApi#companiesPost");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | Body3 | Company create data. |
- Content-Type: application/json
- Accept: application/json