DataPack API sample scripts

Of course a developer can build almost any custom solution using the Data Pack API from Rakuten PopShops. If you want to utilize some pre-built scripts, here are some examples to get you started.

IMPORTANT: POPSHOPS CLASS You need to paste this code into a document named popshops.php for these scripts to work. It is a "class" script that is included in the scripts. It basically is a Rakuten PopShops API class that helps those scripts talk to the API. You would just copy and paste it into a file in the same folder as the script you use.

  • Create a test file on your server with ".php" as the extension.
  • Create a file named "popshops.php" on your server in the SAME directory
  • Copy the script you have chosen into your test file and save
  • Copy the script below of the "PopShops class" into your popshops.php file (this will be an "include" in your script so it has to be in the same directory)
  • Open your catalog (the list of merchants) in your Data Pack account and select the merchants you want to be part of your site
  • Copy your catalog API key and your account API key from that catalog admin page
  • Paste those at the top of your file replacing the API keys that are currently in there
  • View your sample site (domain name /directory / file name .php)

View script

Back to top

1. v2 API Coupons and deals script

Use this script to build a deals site or section of your site. Please note, this script is for Rakuten PopShops v2 API only.

You can call deals into your site. Here is a script that you can tweak that will bring deals in and show various categories. This is based on several hundred merchants. Note that this script is imperfect.

View script | View deals example

Back to top

2. v2 API Product search script

Use this script to build a dynamic niche site. Please note, this script is for Rakuten PopShops v2 API only.

Build a niche storefront based on keywords with multiple categories. This example is a bridesmaid dress shop. To build this storefront, the following merchants were used: American Bridal, Macys, Bridal Online Store,, TJ Formal, House of Brides,

View script | View shopping example