Skip to content
  • Why WPGetAPI?
  • Examples
  • Pricing
  • Plugins
    • PRO Plugin
    • API to Posts Plugin
    • OAuth 2.0 Plugin
  • Docs
  • Support
    • Frequently Asked Questions
    • Feature Request
    • Support Ticket
  • account_circle
PRO Plugin
Howdy! How can we help you?
  • Introduction

    • Quick Start
    • Frequently Asked Questions
    • Will this work with my API?
    • Understanding API docs
    • Step by Step Example
  • Setup

    • Setup Page
    • Endpoint Page
    • Parameters - Query String
    • Parameters - Headers
    • Parameters - Body POST
    • Shortcode
    • Template Tag
    • Gutenberg Block
  • Connecting your API

    • API Key in Headers
    • API Key in Query String
    • Authentication & Authorization
  • Output API Data

    • Format API to HTML
    • Format API to HTML Table
    • Format API to Image Gallery
    • Format JSON Data
  • Integrations

    • Send form data to API
    • WPForms to API
    • Gravity Forms to API
    • Contact Form 7 to API
    • WooCommerce to API
    • WooCommerce API Product Sync
    • wpDataTables to API
    • Connect WordPress to OpenAI
    • Connect RapidAPI to WordPress
    • Connect Zoho CRM to WordPress
    • Page Builders (Elementor, DIVI)
    • Formidable Forms to API
    • Elementor Form to API
    • JetFormBuilder to API
    • Fluent Forms to API
    • WS Form to API
    • Ninja Tables to API
    • Easy Digital Downloads(EDD) API Product Sync
    • Ultimate Member Forms to API
  • Tips & Tricks

    • Filters & Action Hooks
    • Code Snippets Plugin
    • Troubleshooting
    • Code Snippets
  • PRO Plugin

    • Installation
    • Actions
    • Tokens
    • Caching
    • Nested data
    • Chaining API calls
    • Dynamic Variables
    • Format API to HTML
    • Call API on user registration
    • Using AJAX to trigger API call
    • Base64 Encoding
    • Licensing
    • Filters & Action Hooks
  • OAuth 2.0 Plugin

    • Installation
    • How it works
    • Grant Type - Client Credentials
    • Grant Type - Authorization Code
    • Licensing
  • API to Posts Plugin

    • Installation
    • Getting Started
    • Multiple Endpoints
    • Mapping Fields
    • Filters & Action Hooks
    • Pagination

The API to Posts plugin allows you to setup multiple endpoints and create custom posts or WooCommerce products from these multiple endpoints.

When we talk about ‘multiple endpoints’, there are a few different scenarios that need to be considered and you should follow the one that matches your situation.

Keep in mind that there are thousand and thousands of APIs available and all of them are setup and structured differently, so careful consideration needs to be made here.

Please check out the article on how to get started with the API to Posts plugin.

Let’s look at the different scenarios that the API to Posts plugin supports.

Multiple Endpoints – Unrelated Products

In this scenario, you might have an endpoint that imports products from Supplier A and then you have another endpoint that imports products from Supplier B. The products from each supplier are unrelated and you want to create WooCommerce products from every product within both endpoints.

In this case, the endpoints are unrelated so nothing special is required in the setup. You simply set up both endpoints and run the importer and creator for each endpoint.

Multiple Endpoints – Same Products

Within this scenario, we are using multiple endpoints but the endpoints are returning data for the same products, albeit different data from each endpoint.

Here, there are two paths that we can follow.

1 – All endpoints contain list of items

In this scenario, you might have an API with a ‘main’ endpoint that contains a list of all products and includes limited information such as just the name of each product, a description of the product and an ID. The API also has a ‘prices’ endpoint that contains the same full list of products but only contains pricing information and an ID. There is also an ‘images’ endpoint that contains all images and an ID for each product.

When setting up these multiple endpoints, the Unique Item Key field must contain exactly the same value.

You should setup your first endpoint, run the post creator and then do the same for your other endpoints.

2 – A ‘list’ endpoint and a ‘detail’ endpoint

This is the most complicated scenario to set up, but is really fairly simple.

In this scenario, your API contains a main endpoint with a list of products or items. It could be 5 products or it could be 5,000. The data for each product is limited and only contains information such as just the name of each product, a description and an ID.

There is also a second endpoint that calls an individual product and this endpoint contains the ‘detailed’ product information such as category, pricing, images and other data. When calling this detail endpoint, we need to pass a product id or an item id and then call this endpoint once for each product within the main list endpoint.

Main Endpoint

Because the API data is a list of multiple items/products, we want to set the Data Type to Multiple Items.

Firstly we need to add our main endpoint and run the Importer and Post Creator for this endpoint. We now have all of the products imported and the posts/products have been created within WordPress.

The Unique Item Key that is set within this endpoint will also be used within the next ‘detail’ endpoint.

Detail Endpoint

We set the second endpoint Data Type to Detail and when this is selected, you will see that a new field shows up called Linked Endpoint. Select your main endpoint from here and these endpoints will become linked. This detail endpoint now uses the Unique Item Key from the main endpoint.

We now need to go back into the endpoint settings to this detail endpoint and set where we want to pass the Unique Item Key. We use (importer:item_key) to signify where this should be – as shown below.

Each API will be setup differently however, and some APIs will require the item_key to be in the endpoint, the headers or the Body POST Fields

An example of this might be if your full endpoint URL looked like this: https://yourapi.com/v1/product/4567 where 4567 is the product id. In this case you would add the item_key like so: https://yourapi.com/v1/product/(importer:item_key)

On this page
contact_support

Still not sure?

APIs can be daunting and sometimes downright confusing.

But we are here to help! Our support is amazing and we can assist you with any setup required and ensure your API integrations are a success!

Ask Us Anything

Connect your WordPress website to external APIs without writing a single line of code. Send data from WordPress to your API or display data from your API within WordPress.

Support

  • Documentation
  • Support Ticket
  • Refund Policy
  • Contact Us
  • About Us
  • Affiliates

Articles

  • Quick Start Guide
  • WooCommerce Orders to API
  • WooCommerce API Products Sync
  • Contact Form 7 to API
  • WPForms to API
  • Gravity Forms to API
  • WordPress to RapidAPI

WordPress API Plugins

  • Free WPGetAPI Plugin
  • PRO Plugin
  • API to Posts Plugin Plugin
  • OAuth 2.0 Authorization Plugin

© 2025 WPGetAPI. All Rights Reserved.

"*" indicates required fields

Name*
This field is for validation purposes and should be left unchanged.