This is a Singer tap that produces JSON-formatted data from the Klaviyo API following the Singer spec.
This tap:
- Pulls raw data from the Klaviyo metrics API
- Outputs the schema for each resource
- Incrementally pulls data based on the input state for incremental endpoints
- Updates full tables for global exclusions and lists endpoints
-
Install
> virtualenv -p python3 venv > source venv/bin/activate > pip install tap-klaviyo
-
Create the config file
Create a JSON file containing your API key or client ID and client Secret and start date.
{ "api_key": "pk_XYZ", "start_date": "2017-01-01T00:00:00Z", "client_id": "client_id", "client_secret": "client_secret", }
-
[Optional] Create the initial state file
You can provide JSON file that contains a date for the metrics endpoints to force the application to only fetch events since those dates. If you omit the file it will fetch all commits and issues.
{ "bookmarks": { "receive": { "since": "2017-04-01T00:00:00Z" }, "open": { "since": "2017-04-01T00:00:00Z" } } }
-
[Optional] Run discover command and save catalog into catalog file
tap-klaviyo --config config.json --discover
-
Run the application
tap-klaviyo
can be run with:tap-klaviyo --config config.json [--state state.json] [--catalog catalog.json]