npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

simpl.fi-api-client

v1.3.3

Published

A TypeScript client for interacting with the Simpli.fi API

Readme

Simpli.fi API Client

This package provides a TypeScript client for interacting with the Simpli.fi API. It allows you to manage campaigns, ads, geo-fences, and perform various operations related to the Simpli.fi platform.

NPM Package

Installation

npm i simpl.fi-api-client
# or
bun add simpl.fi-api-client

Usage

First, import the SimplifiClient:

import { SimplifiClient } from 'simplifi-api-client';

Then, create an instance of the client:

const client = new SimplifiClient({
  appApiKey: 'YOUR_APP_API_KEY',
  userApiKey: 'YOUR_USER_API_KEY',
  orgId: 'YOUR_ORGANIZATION_ID', // Optional, can be provided in method calls
  debug: false // Optional, set to true for detailed logging
});

You can also use environment variables for configuration:

const client = new SimplifiClient({});

This assumes you have set the following environment variables:

  • APP_API_TOKEN
  • USER_API_KEY

Campaign Operations

List Campaigns

const campaigns = await client.listCampaigns({
  orgId: 'YOUR_ORG_ID', // Optional if provided in constructor
  listParams: {
    filter: { status: 'active' },
    include: ['budget_flights'],
    sort: '-created_at'
  }
});

Create Campaign

const newCampaign = await client.createCampaign({
  orgId: 'YOUR_ORG_ID', // Optional if provided in constructor
  campaignData: {
    name: 'New Campaign',
    status: 'active',
    // ... other campaign properties
  }
});

Update Campaign

const updatedCampaign = await client.updateCampaign({
  orgId: 'YOUR_ORG_ID', // Optional if provided in constructor
  campaignId: 123,
  campaignData: {
    name: 'Updated Campaign Name',
    // ... other properties to update
  }
});

Delete Campaign

await client.deleteCampaign({
  orgId: 'YOUR_ORG_ID', // Optional if provided in constructor
  campaignId: 123
});

Other Campaign Operations

await client.activateCampaign({ orgId: 'ORG_ID', campaignId: 123 });
await client.pauseCampaign({ orgId: 'ORG_ID', campaignId: 123 });
await client.endCampaign({ orgId: 'ORG_ID', campaignId: 123 });
const copiedCampaign = await client.copyCampaign({ orgId: 'ORG_ID', campaignId: 123 });

Ad Operations

const ads = await client.listAds({ orgId: 'ORG_ID', campaignId: 123 });
const newAd = await client.createAd({ orgId: 'ORG_ID', campaignId: 123, ad: { /* ad data */ } });
await client.updateAd({ orgId: 'ORG_ID', campaignId: 123, adId: 456, ad: { /* update data */ } });
await client.pauseAd({ orgId: 'ORG_ID', campaignId: 123, adId: 456 });
await client.verifyClickTag({ orgId: 'ORG_ID', campaignId: 123, adId: 456 });
const bulkAds = await client.getBulkAds({ orgId: 'ORG_ID', campaignId: 123, adIds: [456, 789] });

Geo-Fence Operations

const geoFences = await client.getGeoFences({ orgId: 'ORG_ID', campaignId: 123 });
await client.deleteGeoFence({ orgId: 'ORG_ID', campaignId: 123, geoFenceId: 456 });
const updatedGeoFence = await client.updateGeoFence({
  orgId: 'ORG_ID',
  campaignId: 123,
  geoFenceId: 456,
  geoFence: { /* geo-fence data */ }
});
const replacedGeoFences = await client.replaceGeoFences({
  orgId: 'ORG_ID',
  campaignId: 123,
  geoFences: [/* array of geo-fence data */]
});

Land Use Operations

const allLandUses = await client.getAllLandUses({ orgId: 'ORG_ID' });
const singleLandUse = await client.getSingleLandUse({ orgId: 'ORG_ID', landUseId: 1 });

Error Handling

The client throws errors for various scenarios, including configuration issues and API errors. Always wrap your API calls in try-catch blocks:

try {
  const campaigns = await client.listCampaigns({ orgId: 'ORG_ID' });
} catch (error) {
  console.error('Error fetching campaigns:', error.message);
}

TypeScript Support

This client is written in TypeScript and provides type definitions for all methods and responses.

Contributing

Contributions are welcome! Please submit pull requests with any enhancements, bug fixes, or additional features.

License

This project is licensed under the MIT License.