Exporting Contacts
When exporting contacts, you can make any of the following requests, using optional filter parameters to retrieve a specific collection of active contact records from a specified contact database. In the response, contacts are sorted in order of descending Added On date.
API Requests |
Description |
Parameters (to Restrict Results) |
GET /v1/contacts |
Retrieve a list of contacts matching the supplied search criteria |
- contactDBId: Contact database ID (required)
- limit: Limit of number of contacts to retrieve
- offset: Value by which to offset the set of returned contacts.
- fromAddedOn: Start date in the Added On date range (in the format yyyy-mm-dd or yyyy-mm-dd hh:mm:ss)
- toAddedOn: End date in the Added On date range (in the format yyyy-mm-dd or yyyy-mm-dd hh:mm:ss)
- fromUpdatedOn: Start date in the Updated On date range (in the format yyyy-mm-dd or yyyy-mm-dd hh:mm:ss)
- toUpdatedOn: End date in the Updated On date range (in the format yyyy-mm-dd or yyyy-mm-dd hh:mm:ss)
- includeTags: Whether to include tags; supplying a value of 0 or false omits the tags property and improves the performance of the query.
- includeLists: Whether to include lists; supplying a value of 0 or false omits the lists property and improves the performance of the query.
- includeTalentForms: Whether to include Talent Forms; supplying a value of 0 or false omits the talentForms property and improves the performance of the query.
- jobIds: Specified job lists; separate each list with a pipe character (|).
- contactIds: Contact lists to include; separate each list with a pipe character (|).
- eventIds: Event lists to include; separate each list with a pipe character (|).
- globalStatuses: Global statuses to include; separate each status with a pipe character (|).
- listStatuses: Global statuses to include; separate each status with a pipe character (|).
|
HEAD /v1/contacts |
Retrieve meta-information for the supplied contact search criteria |
GET /v1/contacts/{contactId}/resumes |
Retrieve the resume for a specific contact |
contactId: Contact ID (of the specific contact for whom to retrieve a resume) |
HEAD /v1/contacts/{contactId}/resumes |
Retrieve meta-information for a specific contact resume |
GET /v1/contacts/resumes |
Retrieve resumes for contacts matching the supplied search criteria |
- contactDBId: Contact database ID (required)
- limit: Limit of number of contacts to retrieve
- offset: Value by which to offset the set of returned contacts.
- fromAddedOn: Start date in the Added On date range (in the format yyyy-mm-dd or yyyy-mm-dd hh:mm:ss)
- toAddedOn: End date in the Added On date range (in the format yyyy-mm-dd or yyyy-mm-dd hh:mm:ss)
- fromUpdatedOn: Start date in the Updated On date range (in the format yyyy-mm-dd or yyyy-mm-dd hh:mm:ss)
- toUpdatedOn: End date in the Updated On date range (in the format yyyyy-mm-dd or yyyy-mm-dd hh:mm:ss
- Whether to include tags; supplying a value of 0 or false omits the tags property and improves the performance of the query.
- includeLists: Whether to include lists; supplying a value of 0 or false omits the lists property and improves the performance of the query.
- jobIds: Specified job lists; separate each list with a pipe character (|).
- contactIds: Contact lists to include; separate each list with a pipe character (|).
- eventIds: Event lists to include; separate each list with a pipe character (|).
- globalStatuses: Global statuses to include; separate each status with a pipe character (|).
- listStatuses: Global statuses to include; separate each status with a pipe character (|).
- talentFormIds: Pipe (|) delimited list of talent forms associated with the contact record.
|
HEAD /v1/contacts/resumes |
Retrieve meta-information for the supplied contact resume search criteria |
POST /v1/contacts/export |
Creates a new contact export request to be processed asynchronously. Use this call to export more than 10,000 contacts at one time.
Note: Contact resumes are not included in responses to asynchronous calls.
|
Request parameters:
- contactDBId: Contact database ID (required)
- fromAddedOn: Start date in the Added On date range (in the format yyyy-mm-dd or yyyy-mm-dd hh:mm:ss)
- toAddedOn: End date in the Added On date range (in the format yyyy-mm-dd or yyyy-mm-dd hh:mm:ss)
- fromUpdatedOn: Start date in the Updated On date range (in the format yyyy-mm-dd or yyyy-mm-dd hh:mm:ss)
- toUpdatedOn: End date in the Updated On date range (in the format yyyy-mm-dd or yyyy-mm-dd hh:mm:ss)
- includeTags: Whether to include tags; supplying a value of 0 or false omits the tags property and improves the performance of the query.
- includeLists: Whether to include lists; supplying a value of 0 or false omits the lists property and improves the performance of the query.
|
GET /v1/contacts/export/{exportId} |
Retrieves a specific contact export payload. |
exportId: Unique identifier (export ID) for the export request; for example, 0f8fad5b-d9cb-469f-a165-70867728950e |
GET /v1/contacts/expunged |
Retrieves a list of contacts who have been deactivated or deleted within a specified time period. |
Request parameters:
- contactDBId: Contact database ID (required)
- limit: Limit of number of contacts to retrieve
- offset: Value by which to offset the set of returned contacts.
- fromUpdatedOn: Start date in the Updated On date range (in the format yyyy-mm-dd or yyyy-mm-dd hh:mm:ss)
- toUpdatedOn: End date in the Updated On date range (in the format yyyy-mm-dd or yyyy-mm-dd hh:mm:ss)
- expunge: Whether to retrieve only contacts that have been flagged to be expunged from the system. Supplying a value of true retrieves only contacts flagged to be expunged.
|
HEAD /v1/contacts/expunged |
Retrieves meta-information for the supplied contact search criteria. |
POST /v1/contacts/search |
Search for contacts using a filter or ListIds in a similar way to the contact grid in SmashFly Console |
Request Parameters:
- ContactDBId: Contact Database Id (required).
- VisibleFields: a list of fieldnames to return a value for.
- SortColumn: fieldname to sort the data by.
- SortDirection: order to sort the data by ascending or descending.
- PageSize: the upper limit of contacts to return in the request.
- PageNumber: the page number retrieve contacts from.
- Filter: a list of filter objects each made up of a FieldName, Value and Operator parameters.
- ListIds: a list of List Ids for Job, Event or Contact Lists to filter by.
- OFCCP_Job: State if the search should be recorded for OFCCP compliance.
|
For a list of parameters and the ability to test each request, refer to https://api.smashfly.com/ContactAPI/help, and select the specific request. For sample requests and responses, refer to Sample Requests and Responses.