This API Documentation is targeted at developers and can be used to create bespoke solutions for merchants who do not use Shopify.


If you are a Shopify user, we suggest using the Shopify integration, found here.

Full API Documentation

Launch the full Influence.io API documentation below:

Requirements

You must be on the Reward Plus plan, or have the Influence.io Bolt-on enabled on your REVIEWS.io account to access the Platform API.

Where to locate your Influence.io API Keys

You can find your API Key from the Influence.io dashboard.

  • Go to Settings >> __PLATFORM__ Settings >> Platform API Settings.

  • Where __PLATFORM__ Settings is API Settings or Shopify Settings

  • Send the API Key with every request in a x-api-key header.

Platform API

Platform API is designed to interact with the Influence.io platform directly, allowing you to create customers, orders, products etc.

Customer Example: Retrieve a list of customers

GET: https://platform.api.influence.io/v1/customers

Order Example: Create an order

POST: https://platform.api.influence.io/v1/orders

Product Example: Update or create a product

PUT: https://platform.api.influence.io/v1/products/{productId}

Launcher API

The Launcher API is designed to be used to build widgets upon. This is the foundational API for all of our widgets.

Accessing the Launcher API

The base URL for the Launcher API is https://launcher.api.influence.io

JavaScript

const shopKey = "example-com"; 
const apiKey = "EXAMPLE_API_KEY"
const customerEmail = "example@example.com";
const customerId = "external-123";
const hmac = createHmac("sha256", apiKey)
.update(shopKey + customerEmail + customerId)
.digest("hex");

PHP

$shopKey = "example-com"; 
$apiKey = "EXAMPLE_API_KEY"
$customerEmail = "example@example.com";
$customerId = "external-123";
$hmac = hash_hmac("sha256", shopKey . customerEmail . customerId, apiKey);

Shopify Liquid

<div class="influenceio-widgets-init" 
data-shop="{{ shop.permanent_domain }}"
data-base-url="{{ shop.metafields['influenceio'].baseUrl }}"
{% if customer %}
data-customer-email="{{ customer.email | escape }}"
data-customer-id="{{ customer.id | escape }}"
data-customer-digest="{{ shop.permanent_domain | append: customer.email | append: customer.id | hmac_sha256: shop.metafields['influenceio'].secret }}"
{% endif %}
></div>

If you are using the "Headless" widget, you can access the data-customer-digest property that is automatically generated when a customer logs into your Shopify store.

Customer Digest

For some endpoints, you will need to provide a digest generated with some customer details and your API key.

The digest is a SHA256 HMAC hash. Concatenate your shop key, customer email and customer external ID as a string and generate the HMAC hash using your API Key.

Webhooks

Influence.io has the ability to push events to you via webhooks when things happen on our system. The below table is a list of all topics we support. Each topic also has its own page which describes the body of the webhook.

Supported Webhook Topics

Webhook Topic

Description

customers/updated

Triggered when a customer is updated.

customers/tier_changed

Triggered when a customer's tier has changed.

points/earned

Triggered when a customer has earned points.

points/redeemed

Triggered when a customer has redeemed points.

referrals/started

Triggered when a referral process has started. The webhook body will contain details about who was referred as well as which customer the referral belongs to. A referral is considered started when the customer's friend submits their email address.

referrals/completed

Triggered when a referral process has completed. A referral is considered completed once the friend has completed an order with either the discount code awarded from starting a referral or using the email which they submitted to start the referral process.

Did this answer your question?