Skip to content

Connecting to UPC Database#

First Steps with UPC Database#

Set up an account with UPC Database.

Cost

There are both free and paid options for this API.

Rate Limits

There are no known rate limits for this API.

How to Connect DataDistillr to UPC Database#

To set up a data source connect for UPC Database, you will need to have:

  • A unique name for your data source connection to be used in queries
  • An API token generated through your UPC Database account

Data Source Form#

To locate the UPC Database form, follow the steps in Connecting Your Data to DataDistillr. When you get to the window to choose the data source type, select API as shown below.

Data Source Wizard

On the API screen, select UPC Database from the list of API forms.

List of APIs

The following form will appear. Instructions are below on how to find the information required to fill each on the UPC Database API form.

Once you have filled out all the fields, press the green 'Save' button, and your API will be connected!

UPC Database Form

Name#

Enter any name that will help you recognize this data source within your query window.

Acceptable Characters Include

  • lowercase alphanumeric characters
  • underscores

API Key#

An API key is generated within your account page. The following steps will navigate you to its location. Once created, copy the key and enter it in the UPC Database form under 'API key'.

While in the UPC Database home page, click the Your Account drop down menu and then click on Dashboard.

Home Page

This page displays your account information. Click on API Keys in the sidebar.

Dashboard

In this page you can create and remove tokens from your account.

API Key

Endpoints#

The table below shows a list of endpoints available to connect within the DataDistillr application. If you need to connect to any endpoints not listed in the table below, please use the Custom API Form.

Endpoint Required Optional Description
/product/{id} id Get product information for a particular item
/search/ query Search for a product based on item parameters
/currency/latest base Retrieve a list of currently supported currencies by the currency API
/currency/history base
date
Retrieve a list of historically supported currencies by the currency API
/currency/symbols Retrieve a list of currencies symbols of the currency API

The endpoints above will display as follows in the nav tree once your API has successfully connected.

UPC Database Endpoints

Sample Queries#

The following queries are intended to help you get started, and make life simpler querying within your API.

For the following examples, suppose that my UPC Database API data source was called myupcdbapi and I want to query an endpoint. In the FROM clause, the endpoint goes after the UPC Database data source name.

FROM Clause

FROM `myupcdbapi`.`<ENDPOINT>`

Get Product#

With this endpoint you can search information about a SKU with the ID of the product.

SELECT *
FROM `myupcdbapi`.`/product/:id`
WHERE `id` = '0786162004864' LIMIT 1000

Search for Product#

With this endpoint you can search products with keywords.

SELECT *
FROM `myupcdbapi`.`/search`
WHERE `query` = 'Gum' LIMIT 1000

Retrieve List of The Latest Currency#

With this endpoint you can get the currencies that are supported.

SELECT *
FROM `myupcdbapi`.`/currency/latest`
WHERE `base` = 'USD' LIMIT 1000

Retrieve List of Historic Currency#

With this endpoint you can get the currencies that were supported throughout history .

SELECT *
FROM `myupcdbapi`.`/currency/history`
WHERE `base` = 'USD'
  AND `date` = '2010-12-15' LIMIT 1000

Retrieve List of Currency Symbols#

With this endpoint you can get the symbols of the currencies.

SELECT *
FROM `myupcdbapi`.`/currency/symbols` LIMIT 1000