---
title: "Data Sources - External Web API"
url: "https://support.niftyimages.com/en/article/9d05cb90-5097-4fb7-a39e-72747ab14383"
language: "en"
last_updated: "2026-05-07T15:31:59.726Z"
---

# Data Sources - External Web API

NiftyImages’ External Web API functionality allows you to power your images with real-time data pulled directly from your systems at the moment the image is rendered.

![](https://cdn-assets.productfruits.com/78fb8434-b537-4754-88f4-6727b856da1f)

  

  

  

  

  

## **Overview**

This is part of the broader **Data Sources** framework in NiftyImages, which supports both internal data (Data Stores/CSV) and external, real-time integrations.

## **What You Can Do (Capabilities)**

External Web APIs unlock fully dynamic, real-time personalization across all NiftyImages image types.

### Real-Time Personalization at Open

-   Render content based on **live data at the moment of email open or page load**
-   Ensure accuracy for:
-   -   Pricing
    -   Inventory availability
    -   Loyalty points
    -   Event timing or status

### Parameter-Driven Data Retrieval

-   Pass dynamic parameters via the image URL, such as:
-   -   customer\_id
    -   email
    -   zip\_code
    -   product\_id or sku
-   Use these parameters to return **user-specific or context-specific data**

### Power Any Image Type

External API data can be used across:

-   Personalized Images
-   Countdown Timers (dynamic end dates)
-   Charts (live metrics)
-   Maps (location-based data)
-   Weather API connection
-   Rule Sets (decisioning based on API response)

### Dynamic Content Use Cases

-   Loyalty dashboards (points, tier status)
-   Product blocks (price, availability, image)
-   Localized content (weather, nearest store)
-   Live content feeds (blog posts, sports scores, news)
-   Offer personalization (next-best product, recommendations)

### “Set It and Forget It” Automation

-   One image URL can continuously update as backend data changes
-   No need to resend emails or rebuild campaigns

## **What You Need to Set It Up**

To successfully connect an External Web API in NiftyImages, you’ll need the following:

### 1\. API Endpoint

-   A publicly accessible HTTP/HTTPS endpoint
-   Example:
-   [https://api.yoursite.com/customer-data](https://api.yoursite.com/customer-data)

### 2\. Supported Request Method

-   Typically:
-   -   GET (most common)
    -   POST (if required by your system)

### 3\. Query Parameters

Define what data NiftyImages will pass into your API:

-   Examples:
-   -   customer\_id=12345
    -   zip=30309
    -   sku=ABC123

These parameters usually come from:

-   ESP merge tags
-   Static values
-   URL parameters in the image source

### 4\. API Response Format

Your API must return structured data (typically JSON):

**Example:**

{

"first\_name": "Jenny",

"loyalty\_points": 1240,

"tier": "Gold",

"next\_reward": "Free Drink",

"store\_city": "Atlanta"

}

This data is then mapped into your NiftyImages template.

### 5\. Data Mapping in NiftyImages

Inside NiftyImages, you will:

-   Map API response fields → image variables
-   Example:
-   -   loyalty\_points → text layer
    -   tier → badge or label
    -   store\_city → location text

## Configuration in NiftyImages

When setting up an External Web API Data Source, you will configure:

-   API endpoint URL
-   Request method (GET/POST/PUT)
-   Query parameters (dynamic or static)
-   Headers (for authentication if needed)
-   Response field mappings
-   Optional fallback values (if API fails or data is missing)

## When to Use External Web API vs Data Store

Use **External Web API** when:

-   Data must be **real-time**
-   Values change frequently (pricing, inventory, scores)
-   You already have an existing API

Use **Data Store (CSV)** when:

-   Data updates periodically (not instantly)
-   You want simpler setup without API dependencies
-   You prefer syncing data via uploads or tools like Zapier

  

Setup in NiftyImages:

![](https://cdn-assets.productfruits.com/09751c2d-d9da-4708-ae91-1cb113e5241c)

Custom Scripts:

![](https://cdn-assets.productfruits.com/64e4de03-e923-4028-bea0-09c36091746d)

Sample data mapping:

![](https://cdn-assets.productfruits.com/35da07a2-62f1-49be-97f9-b1e46d5c8149)
