Package software.xdev.brevo.api
Class ContactsApi
java.lang.Object
software.xdev.brevo.client.BaseApi
software.xdev.brevo.api.ContactsApi
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddContactToList(Long listId, AddContactToListRequest addContactToListRequest) Add existing contacts to a listaddContactToList(Long listId, AddContactToListRequest addContactToListRequest, Map<String, String> additionalHeaders) Add existing contacts to a listvoidcreateAttribute(String attributeCategory, String attributeName, CreateAttribute createAttribute) Create contact attributevoidcreateAttribute(String attributeCategory, String attributeName, CreateAttribute createAttribute, Map<String, String> additionalHeaders) Create contact attributecreateContact(CreateContact createContact) Create a contactcreateContact(CreateContact createContact, Map<String, String> additionalHeaders) Create a contactvoidcreateDoiContact(CreateDoiContact createDoiContact) Create Contact via DOI (Double-Opt-In) FlowvoidcreateDoiContact(CreateDoiContact createDoiContact, Map<String, String> additionalHeaders) Create Contact via DOI (Double-Opt-In) FlowcreateFolder(CreateUpdateFolder createFolder) Create a foldercreateFolder(CreateUpdateFolder createFolder, Map<String, String> additionalHeaders) Create a foldercreateList(CreateList createList) Create a listcreateList(CreateList createList, Map<String, String> additionalHeaders) Create a listvoiddeleteAttribute(String attributeCategory, String attributeName) Delete an attributevoiddeleteAttribute(String attributeCategory, String attributeName, Map<String, String> additionalHeaders) Delete an attributevoiddeleteContact(GetContactInfoIdentifierParameter identifier) Delete a contactvoiddeleteContact(GetContactInfoIdentifierParameter identifier, Map<String, String> additionalHeaders) Delete a contactvoiddeleteFolder(Long folderId) Delete a folder (and all its lists)voiddeleteFolder(Long folderId, Map<String, String> additionalHeaders) Delete a folder (and all its lists)voiddeleteList(Long listId) Delete a listvoiddeleteList(Long listId, Map<String, String> additionalHeaders) Delete a listList all attributesgetAttributes(Map<String, String> additionalHeaders) List all attributesgetContactInfo(GetContactInfoIdentifierParameter identifier, String startDate, String endDate) Get a contact's details Along with the contact details, this endpoint will show the statistics of contact for the recent 90 days by default.getContactInfo(GetContactInfoIdentifierParameter identifier, String startDate, String endDate, Map<String, String> additionalHeaders) Get a contact's details Along with the contact details, this endpoint will show the statistics of contact for the recent 90 days by default.getContacts(Long limit, Long offset, String modifiedSince, String createdSince, String sort, Long segmentId, List<Long> listIds) Get all the contactsgetContacts(Long limit, Long offset, String modifiedSince, String createdSince, String sort, Long segmentId, List<Long> listIds, Map<String, String> additionalHeaders) Get all the contactsGet contacts in a listgetContactsFromList(Long listId, String modifiedSince, Long limit, Long offset, String sort, Map<String, String> additionalHeaders) Get contacts in a listgetContactStats(GetContactInfoIdentifierParameter identifier, String startDate, String endDate) Get email campaigns' statistics for a contactgetContactStats(GetContactInfoIdentifierParameter identifier, String startDate, String endDate, Map<String, String> additionalHeaders) Get email campaigns' statistics for a contactReturns a folder's detailsReturns a folder's detailsgetFolderLists(Long folderId, Long limit, Long offset, String sort) Get lists in a foldergetFolderLists(Long folderId, Long limit, Long offset, String sort, Map<String, String> additionalHeaders) Get lists in a foldergetFolders(Long limit, Long offset, String sort) Get all foldersGet all foldersGet a list's detailsGet a list's detailsGet all the listsGet all the listsgetSegments(Long limit, Long offset, String sort) Get all the segmentsGet all the segmentsimportContacts(RequestContactImport requestContactImport) Import contacts It returns the background process ID which on completion calls the notify URL that you have set in the input.importContacts(RequestContactImport requestContactImport, Map<String, String> additionalHeaders) Import contacts It returns the background process ID which on completion calls the notify URL that you have set in the input.<T> TinvokeAPI(String url, String method, Object request, com.fasterxml.jackson.core.type.TypeReference<T> returnType, Map<String, String> additionalHeaders) Directly invoke the API for the given URL.removeContactFromList(Long listId, RemoveContactFromListRequest contactEmails) Delete a contact from a listremoveContactFromList(Long listId, RemoveContactFromListRequest contactEmails, Map<String, String> additionalHeaders) Delete a contact from a listrequestContactExport(RequestContactExport requestContactExport) Export contacts It returns the background process ID which on completion calls the notify URL that you have set in the input.requestContactExport(RequestContactExport requestContactExport, Map<String, String> additionalHeaders) Export contacts It returns the background process ID which on completion calls the notify URL that you have set in the input.voidupdateAttribute(String attributeCategory, String attributeName, UpdateAttribute updateAttribute) Update contact attributevoidupdateAttribute(String attributeCategory, String attributeName, UpdateAttribute updateAttribute, Map<String, String> additionalHeaders) Update contact attributevoidupdateBatchContacts(UpdateBatchContacts updateBatchContacts) Update multiple contactsvoidupdateBatchContacts(UpdateBatchContacts updateBatchContacts, Map<String, String> additionalHeaders) Update multiple contactsvoidupdateContact(GetContactInfoIdentifierParameter identifier, UpdateContact updateContact) Update a contactvoidupdateContact(GetContactInfoIdentifierParameter identifier, UpdateContact updateContact, Map<String, String> additionalHeaders) Update a contactvoidupdateFolder(Long folderId, CreateUpdateFolder updateFolder) Update a foldervoidupdateFolder(Long folderId, CreateUpdateFolder updateFolder, Map<String, String> additionalHeaders) Update a foldervoidupdateList(Long listId, UpdateList updateList) Update a listvoidupdateList(Long listId, UpdateList updateList, Map<String, String> additionalHeaders) Update a listMethods inherited from class software.xdev.brevo.client.BaseApi
getApiClient, invokeAPI, invokeAPI, invokeAPI, invokeAPI, invokeAPI, invokeAPI, setApiClient
-
Constructor Details
-
ContactsApi
public ContactsApi() -
ContactsApi
-
-
Method Details
-
addContactToList
public PostContactInfo addContactToList(Long listId, AddContactToListRequest addContactToListRequest) throws ApiException Add existing contacts to a list- Parameters:
listId- Id of the list (required)addContactToListRequest- Emails addresses OR IDs of the contacts (required)- Returns:
- PostContactInfo
- Throws:
ApiException- if fails to make API call
-
addContactToList
public PostContactInfo addContactToList(Long listId, AddContactToListRequest addContactToListRequest, Map<String, String> additionalHeaders) throws ApiExceptionAdd existing contacts to a list- Parameters:
listId- Id of the list (required)addContactToListRequest- Emails addresses OR IDs of the contacts (required)additionalHeaders- additionalHeaders for this call- Returns:
- PostContactInfo
- Throws:
ApiException- if fails to make API call
-
createAttribute
public void createAttribute(String attributeCategory, String attributeName, CreateAttribute createAttribute) throws ApiException Create contact attribute- Parameters:
attributeCategory- Category of the attribute (required)attributeName- Name of the attribute (required)createAttribute- Values to create an attribute (required)- Throws:
ApiException- if fails to make API call
-
createAttribute
public void createAttribute(String attributeCategory, String attributeName, CreateAttribute createAttribute, Map<String, String> additionalHeaders) throws ApiExceptionCreate contact attribute- Parameters:
attributeCategory- Category of the attribute (required)attributeName- Name of the attribute (required)createAttribute- Values to create an attribute (required)additionalHeaders- additionalHeaders for this call- Throws:
ApiException- if fails to make API call
-
createContact
Create a contact- Parameters:
createContact- Values to create a contact (required)- Returns:
- CreateUpdateContactModel
- Throws:
ApiException- if fails to make API call
-
createContact
public CreateUpdateContactModel createContact(CreateContact createContact, Map<String, String> additionalHeaders) throws ApiExceptionCreate a contact- Parameters:
createContact- Values to create a contact (required)additionalHeaders- additionalHeaders for this call- Returns:
- CreateUpdateContactModel
- Throws:
ApiException- if fails to make API call
-
createDoiContact
Create Contact via DOI (Double-Opt-In) Flow- Parameters:
createDoiContact- Values to create the Double opt-in (DOI) contact (required)- Throws:
ApiException- if fails to make API call
-
createDoiContact
public void createDoiContact(CreateDoiContact createDoiContact, Map<String, String> additionalHeaders) throws ApiExceptionCreate Contact via DOI (Double-Opt-In) Flow- Parameters:
createDoiContact- Values to create the Double opt-in (DOI) contact (required)additionalHeaders- additionalHeaders for this call- Throws:
ApiException- if fails to make API call
-
createFolder
Create a folder- Parameters:
createFolder- Name of the folder (required)- Returns:
- CreateModel
- Throws:
ApiException- if fails to make API call
-
createFolder
public CreateModel createFolder(CreateUpdateFolder createFolder, Map<String, String> additionalHeaders) throws ApiExceptionCreate a folder- Parameters:
createFolder- Name of the folder (required)additionalHeaders- additionalHeaders for this call- Returns:
- CreateModel
- Throws:
ApiException- if fails to make API call
-
createList
Create a list- Parameters:
createList- Values to create a list (required)- Returns:
- CreateModel
- Throws:
ApiException- if fails to make API call
-
createList
public CreateModel createList(CreateList createList, Map<String, String> additionalHeaders) throws ApiExceptionCreate a list- Parameters:
createList- Values to create a list (required)additionalHeaders- additionalHeaders for this call- Returns:
- CreateModel
- Throws:
ApiException- if fails to make API call
-
deleteAttribute
Delete an attribute- Parameters:
attributeCategory- Category of the attribute (required)attributeName- Name of the existing attribute (required)- Throws:
ApiException- if fails to make API call
-
deleteAttribute
public void deleteAttribute(String attributeCategory, String attributeName, Map<String, String> additionalHeaders) throws ApiExceptionDelete an attribute- Parameters:
attributeCategory- Category of the attribute (required)attributeName- Name of the existing attribute (required)additionalHeaders- additionalHeaders for this call- Throws:
ApiException- if fails to make API call
-
deleteContact
Delete a contact- Parameters:
identifier- Email (urlencoded) OR ID of the contact (required)- Throws:
ApiException- if fails to make API call
-
deleteContact
public void deleteContact(GetContactInfoIdentifierParameter identifier, Map<String, String> additionalHeaders) throws ApiExceptionDelete a contact- Parameters:
identifier- Email (urlencoded) OR ID of the contact (required)additionalHeaders- additionalHeaders for this call- Throws:
ApiException- if fails to make API call
-
deleteFolder
Delete a folder (and all its lists)- Parameters:
folderId- Id of the folder (required)- Throws:
ApiException- if fails to make API call
-
deleteFolder
Delete a folder (and all its lists)- Parameters:
folderId- Id of the folder (required)additionalHeaders- additionalHeaders for this call- Throws:
ApiException- if fails to make API call
-
deleteList
Delete a list- Parameters:
listId- Id of the list (required)- Throws:
ApiException- if fails to make API call
-
deleteList
Delete a list- Parameters:
listId- Id of the list (required)additionalHeaders- additionalHeaders for this call- Throws:
ApiException- if fails to make API call
-
getAttributes
List all attributes- Returns:
- GetAttributes
- Throws:
ApiException- if fails to make API call
-
getAttributes
List all attributes- Parameters:
additionalHeaders- additionalHeaders for this call- Returns:
- GetAttributes
- Throws:
ApiException- if fails to make API call
-
getContactInfo
public GetExtendedContactDetails getContactInfo(GetContactInfoIdentifierParameter identifier, String startDate, String endDate) throws ApiException Get a contact's details Along with the contact details, this endpoint will show the statistics of contact for the recent 90 days by default. To fetch the earlier statistics, please use Get contact campaign stats ``https://developers.brevo.com/reference/contacts-7#getcontactstats`` endpoint with the appropriate date ranges.- Parameters:
identifier- Email (urlencoded) OR ID of the contact OR its SMS attribute value (required)startDate- **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate (optional)endDate- **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. (optional)- Returns:
- GetExtendedContactDetails
- Throws:
ApiException- if fails to make API call
-
getContactInfo
public GetExtendedContactDetails getContactInfo(GetContactInfoIdentifierParameter identifier, String startDate, String endDate, Map<String, String> additionalHeaders) throws ApiExceptionGet a contact's details Along with the contact details, this endpoint will show the statistics of contact for the recent 90 days by default. To fetch the earlier statistics, please use Get contact campaign stats ``https://developers.brevo.com/reference/contacts-7#getcontactstats`` endpoint with the appropriate date ranges.- Parameters:
identifier- Email (urlencoded) OR ID of the contact OR its SMS attribute value (required)startDate- **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate (optional)endDate- **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. (optional)additionalHeaders- additionalHeaders for this call- Returns:
- GetExtendedContactDetails
- Throws:
ApiException- if fails to make API call
-
getContactStats
public GetContactCampaignStats getContactStats(GetContactInfoIdentifierParameter identifier, String startDate, String endDate) throws ApiException Get email campaigns' statistics for a contact- Parameters:
identifier- Email (urlencoded) OR ID of the contact (required)startDate- **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate (optional)endDate- **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Maximum difference between startDate and endDate should not be greater than 90 days (optional)- Returns:
- GetContactCampaignStats
- Throws:
ApiException- if fails to make API call
-
getContactStats
public GetContactCampaignStats getContactStats(GetContactInfoIdentifierParameter identifier, String startDate, String endDate, Map<String, String> additionalHeaders) throws ApiExceptionGet email campaigns' statistics for a contact- Parameters:
identifier- Email (urlencoded) OR ID of the contact (required)startDate- **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate (optional)endDate- **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Maximum difference between startDate and endDate should not be greater than 90 days (optional)additionalHeaders- additionalHeaders for this call- Returns:
- GetContactCampaignStats
- Throws:
ApiException- if fails to make API call
-
getContacts
public GetContacts getContacts(Long limit, Long offset, String modifiedSince, String createdSince, String sort, Long segmentId, List<Long> listIds) throws ApiException Get all the contacts- Parameters:
limit- Number of documents per page (optional, default to 50)offset- Index of the first document of the page (optional, default to 0)modifiedSince- Filter (urlencoded) the contacts 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 contacts 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)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)segmentId- Id of the segment. **Either listIds or segmentId can be passed.** (optional)listIds- Ids of the list. **Either listIds or segmentId can be passed.** (optional)- Returns:
- GetContacts
- Throws:
ApiException- if fails to make API call
-
getContacts
public GetContacts getContacts(Long limit, Long offset, String modifiedSince, String createdSince, String sort, Long segmentId, List<Long> listIds, Map<String, String> additionalHeaders) throws ApiExceptionGet all the contacts- Parameters:
limit- Number of documents per page (optional, default to 50)offset- Index of the first document of the page (optional, default to 0)modifiedSince- Filter (urlencoded) the contacts 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 contacts 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)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)segmentId- Id of the segment. **Either listIds or segmentId can be passed.** (optional)listIds- Ids of the list. **Either listIds or segmentId can be passed.** (optional)additionalHeaders- additionalHeaders for this call- Returns:
- GetContacts
- Throws:
ApiException- if fails to make API call
-
getContactsFromList
public GetContacts getContactsFromList(Long listId, String modifiedSince, Long limit, Long offset, String sort) throws ApiException Get contacts in a list- Parameters:
listId- Id of the list (required)modifiedSince- Filter (urlencoded) the contacts 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)limit- Number of documents per page (optional, default to 50)offset- Index of the first document of 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)- Returns:
- GetContacts
- Throws:
ApiException- if fails to make API call
-
getContactsFromList
public GetContacts getContactsFromList(Long listId, String modifiedSince, Long limit, Long offset, String sort, Map<String, String> additionalHeaders) throws ApiExceptionGet contacts in a list- Parameters:
listId- Id of the list (required)modifiedSince- Filter (urlencoded) the contacts 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)limit- Number of documents per page (optional, default to 50)offset- Index of the first document of 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)additionalHeaders- additionalHeaders for this call- Returns:
- GetContacts
- Throws:
ApiException- if fails to make API call
-
getFolder
Returns a folder's details- Parameters:
folderId- id of the folder (required)- Returns:
- GetFolder
- Throws:
ApiException- if fails to make API call
-
getFolder
Returns a folder's details- Parameters:
folderId- id of the folder (required)additionalHeaders- additionalHeaders for this call- Returns:
- GetFolder
- Throws:
ApiException- if fails to make API call
-
getFolderLists
public GetFolderLists getFolderLists(Long folderId, Long limit, Long offset, String sort) throws ApiException Get lists in a folder- Parameters:
folderId- Id of the folder (required)limit- Number of documents per page (optional, default to 10)offset- Index of the first document of 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)- Returns:
- GetFolderLists
- Throws:
ApiException- if fails to make API call
-
getFolderLists
public GetFolderLists getFolderLists(Long folderId, Long limit, Long offset, String sort, Map<String, String> additionalHeaders) throws ApiExceptionGet lists in a folder- Parameters:
folderId- Id of the folder (required)limit- Number of documents per page (optional, default to 10)offset- Index of the first document of 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)additionalHeaders- additionalHeaders for this call- Returns:
- GetFolderLists
- Throws:
ApiException- if fails to make API call
-
getFolders
Get all folders- Parameters:
limit- Number of documents per page (required)offset- Index of the first document of the page (required)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:
- GetFolders
- Throws:
ApiException- if fails to make API call
-
getFolders
public GetFolders getFolders(Long limit, Long offset, String sort, Map<String, String> additionalHeaders) throws ApiExceptionGet all folders- Parameters:
limit- Number of documents per page (required)offset- Index of the first document of the page (required)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:
- GetFolders
- Throws:
ApiException- if fails to make API call
-
getList
Get a list's details- Parameters:
listId- Id of the list (required)startDate- **Mandatory if endDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a specific list id. **Prefer to pass your timezone in date-time format for accurate result** (optional)endDate- **Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a specific list id. **Prefer to pass your timezone in date-time format for accurate result** (optional)- Returns:
- GetExtendedList
- Throws:
ApiException- if fails to make API call
-
getList
public GetExtendedList getList(Long listId, String startDate, String endDate, Map<String, String> additionalHeaders) throws ApiExceptionGet a list's details- Parameters:
listId- Id of the list (required)startDate- **Mandatory if endDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a specific list id. **Prefer to pass your timezone in date-time format for accurate result** (optional)endDate- **Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a specific list id. **Prefer to pass your timezone in date-time format for accurate result** (optional)additionalHeaders- additionalHeaders for this call- Returns:
- GetExtendedList
- Throws:
ApiException- if fails to make API call
-
getLists
Get all the lists- Parameters:
limit- Number of documents per page (optional, default to 10)offset- Index of the first document of 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)- Returns:
- GetLists
- Throws:
ApiException- if fails to make API call
-
getLists
public GetLists getLists(Long limit, Long offset, String sort, Map<String, String> additionalHeaders) throws ApiExceptionGet all the lists- Parameters:
limit- Number of documents per page (optional, default to 10)offset- Index of the first document of 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)additionalHeaders- additionalHeaders for this call- Returns:
- GetLists
- Throws:
ApiException- if fails to make API call
-
getSegments
Get all the segments- Parameters:
limit- Number of documents per page (optional, default to 10)offset- Index of the first document of 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)- Returns:
- GetSegments
- Throws:
ApiException- if fails to make API call
-
getSegments
public GetSegments getSegments(Long limit, Long offset, String sort, Map<String, String> additionalHeaders) throws ApiExceptionGet all the segments- Parameters:
limit- Number of documents per page (optional, default to 10)offset- Index of the first document of 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)additionalHeaders- additionalHeaders for this call- Returns:
- GetSegments
- Throws:
ApiException- if fails to make API call
-
importContacts
public CreatedProcessId importContacts(RequestContactImport requestContactImport) throws ApiException Import contacts It returns the background process ID which on completion calls the notify URL that you have set in the input.- Parameters:
requestContactImport- Values to import contacts in Brevo. To know more about the expected format, please have a look at ``https://help.brevo.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns`` (required)- Returns:
- CreatedProcessId
- Throws:
ApiException- if fails to make API call
-
importContacts
public CreatedProcessId importContacts(RequestContactImport requestContactImport, Map<String, String> additionalHeaders) throws ApiExceptionImport contacts It returns the background process ID which on completion calls the notify URL that you have set in the input.- Parameters:
requestContactImport- Values to import contacts in Brevo. To know more about the expected format, please have a look at ``https://help.brevo.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns`` (required)additionalHeaders- additionalHeaders for this call- Returns:
- CreatedProcessId
- Throws:
ApiException- if fails to make API call
-
removeContactFromList
public PostContactInfo removeContactFromList(Long listId, RemoveContactFromListRequest contactEmails) throws ApiException Delete a contact from a list- Parameters:
listId- Id of the list (required)contactEmails- Emails adresses OR IDs of the contacts OR 'all' true (required)- Returns:
- PostContactInfo
- Throws:
ApiException- if fails to make API call
-
removeContactFromList
public PostContactInfo removeContactFromList(Long listId, RemoveContactFromListRequest contactEmails, Map<String, String> additionalHeaders) throws ApiExceptionDelete a contact from a list- Parameters:
listId- Id of the list (required)contactEmails- Emails adresses OR IDs of the contacts OR 'all' true (required)additionalHeaders- additionalHeaders for this call- Returns:
- PostContactInfo
- Throws:
ApiException- if fails to make API call
-
requestContactExport
public CreatedProcessId requestContactExport(RequestContactExport requestContactExport) throws ApiException Export contacts It returns the background process ID which on completion calls the notify URL that you have set in the input. File will be available in csv.- Parameters:
requestContactExport- Values to request a contact export (required)- Returns:
- CreatedProcessId
- Throws:
ApiException- if fails to make API call
-
requestContactExport
public CreatedProcessId requestContactExport(RequestContactExport requestContactExport, Map<String, String> additionalHeaders) throws ApiExceptionExport contacts It returns the background process ID which on completion calls the notify URL that you have set in the input. File will be available in csv.- Parameters:
requestContactExport- Values to request a contact export (required)additionalHeaders- additionalHeaders for this call- Returns:
- CreatedProcessId
- Throws:
ApiException- if fails to make API call
-
updateAttribute
public void updateAttribute(String attributeCategory, String attributeName, UpdateAttribute updateAttribute) throws ApiException Update contact attribute- Parameters:
attributeCategory- Category of the attribute (required)attributeName- Name of the existing attribute (required)updateAttribute- Values to update an attribute (required)- Throws:
ApiException- if fails to make API call
-
updateAttribute
public void updateAttribute(String attributeCategory, String attributeName, UpdateAttribute updateAttribute, Map<String, String> additionalHeaders) throws ApiExceptionUpdate contact attribute- Parameters:
attributeCategory- Category of the attribute (required)attributeName- Name of the existing attribute (required)updateAttribute- Values to update an attribute (required)additionalHeaders- additionalHeaders for this call- Throws:
ApiException- if fails to make API call
-
updateBatchContacts
Update multiple contacts- Parameters:
updateBatchContacts- Values to update multiple contacts (required)- Throws:
ApiException- if fails to make API call
-
updateBatchContacts
public void updateBatchContacts(UpdateBatchContacts updateBatchContacts, Map<String, String> additionalHeaders) throws ApiExceptionUpdate multiple contacts- Parameters:
updateBatchContacts- Values to update multiple contacts (required)additionalHeaders- additionalHeaders for this call- Throws:
ApiException- if fails to make API call
-
updateContact
public void updateContact(GetContactInfoIdentifierParameter identifier, UpdateContact updateContact) throws ApiException Update a contact- Parameters:
identifier- Email (urlencoded) OR ID of the contact (required)updateContact- Values to update a contact (required)- Throws:
ApiException- if fails to make API call
-
updateContact
public void updateContact(GetContactInfoIdentifierParameter identifier, UpdateContact updateContact, Map<String, String> additionalHeaders) throws ApiExceptionUpdate a contact- Parameters:
identifier- Email (urlencoded) OR ID of the contact (required)updateContact- Values to update a contact (required)additionalHeaders- additionalHeaders for this call- Throws:
ApiException- if fails to make API call
-
updateFolder
Update a folder- Parameters:
folderId- Id of the folder (required)updateFolder- Name of the folder (required)- Throws:
ApiException- if fails to make API call
-
updateFolder
public void updateFolder(Long folderId, CreateUpdateFolder updateFolder, Map<String, String> additionalHeaders) throws ApiExceptionUpdate a folder- Parameters:
folderId- Id of the folder (required)updateFolder- Name of the folder (required)additionalHeaders- additionalHeaders for this call- Throws:
ApiException- if fails to make API call
-
updateList
Update a list- Parameters:
listId- Id of the list (required)updateList- Values to update a list (required)- Throws:
ApiException- if fails to make API call
-
updateList
public void updateList(Long listId, UpdateList updateList, Map<String, String> additionalHeaders) throws ApiExceptionUpdate a list- Parameters:
listId- Id of the list (required)updateList- Values to update a list (required)additionalHeaders- additionalHeaders for this call- 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 ApiExceptionDescription copied from class:BaseApiDirectly invoke the API for the given URL. Useful if the API returns direct links/URLs for subsequent requests.- Specified by:
invokeAPIin classBaseApi- 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.
-