Skip to content

vincentgreninja/closeio-api-scripts

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

closeio-api-scripts

Example Python scripts for interacting with Close through its API using the closeio_api Python client.

Install basic dependencies

Before you start, you should already have git, python (2.7) and virtualenv installed. For OS X users, we recommend Homebrew.

Setup

  1. git clone https://github.com/closeio/closeio-api-scripts.git
  2. cd closeio-api-scripts
  3. virtualenv venv
  4. . venv/bin/activate
  5. pip install -r requirements.txt

Running a script

Example:

python scripts/run_leads_deleted_report.py -k MYAPIKEY 
...

If you have any questions, please contact support@close.com.


Documentation for individual scripts

How to run the CSV importing script

The script will look for your CSV to have specific column names (case insensitive). All columns are optional. All columns not listed below will be imported as custom fields.

  • company (multiple contacts will be grouped if rows have the same company
  • url (must start with http:// or https://)
  • status (defaults to "potential")
  • contact (full name of contact)
  • title (job title of contact)
  • email (must be a valid email address)
  • phone (must be a valid phone number, and must start with a "+" if it's a non-US number)
  • mobile_phone
  • fax
  • address (street address)
  • city
  • state (2 letter abbreviation)
  • zip
  • country (2 letter abbreviation)
  • (any additional fields will be added as custom fields)

Multiple contacts will be grouped in the same lead if multiple rows have the same value in the "company" column.

  1. Make sure (if you haven't already in Setup) you're in the closeio-api directory and you have activated your virtual environment by running . venv/bin/activate.

  2. Run the import script: ./scripts/csv_to_cio.py --api_key YOUR_API_KEY_HERE ~/path/to/your/leads.csv

You can generate an API Key from Settings in Close.

About

Useful example scripts using the Close API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%