API - prisync.com

This version is deprecated.
Please refer to Prisync API Documentation (v2.0.0)

Welcome to Prisync API Documentation.

In this document we briefly explain our API.


API Endpoint(s)

Prisync API V1 provides a single endpoint covering all your data in your account.

Note:

  • This is first version of our API, which provides all the data in a single endpoint for the sake of simplicity. We are working on the 2nd version and will announce when it becomes production ready.

Resource: GET getdata

Returns the data containing all products on your account. This data includes details of each product and each competitor’s details.

Resource URL

http://prisync.com/api/getdata/email/[ACCOUNT_EMAIL]/api_key/[API_KEY]

Resource Information

Response Format JSON
Requires authentication? Yes
Rate limited? Yes
Requests per hour 15

Resource Parameters

ACCOUNT_EMAIL Email address that you use to login to your Prisync account.

example: name.surname@company.com
API_KEY Your API key. If you still do not have it, please shoot us an email.

example: BTu87739209cjskwoio

Response Details

Name Type Value
name String Name of the product.

Example: Electronic Color Whiteboard CCB3200W
product_code String If you set a code (or commonly called as SKU code) to your product, it will be shown here.

Example: SKU7833
product_cost String If you set a cost to your product, it will be shown here.

Example: 3799.00
min_price Float Minimum price for this product among your competitors.

Example: 4644.92
max_price Float Maximum price for this product among your competitors.

Example: 5416.60
avg_price Float Example: 4889.25
smart_price Float This the SmartPrice which calculated by assigned rule for your product. For further information: SmartPrice

Example: 4999.00
urls Array of URL Objects A set of competitor details

Tip-1: For details of the URL object, please refer to the table below.

Tip-2: Check out the section min/max/average prices for each product instead of redoing the calculation

URL Object
Name Type Value
site String Base URL of competitor’s website.

Example: worldvideopros.com.au
price Number Competitor price for the product.

Example: 4220.99
currency String Currency of competitor website.

Example: USD
url String URL of the product belonging to the competitor.

Example: https://www.worldvideopros.com.au/p-7593-vista-ccb3200w-electronic-whiteboard-2-screen-colour-widescreen-model.aspx
last_check String The last datetime that Prisync retrieved this competitor.
(Format: YYYY-MM-DD HH:MM:SS)

Example: 2014-03-27 11:22:21
in_stock Number Stock information (1: in stock, 0: no stock.)

Example: 1
change_day Float Daily price change of this competitor for the product.

Example: 2.50
weekly_avg Float Weekly average of prices of this competitor for the product.

Example: 1991.00
monthly_avg Float Monthly average of prices of this competitor for the product.

Example: 2159.00
last_changed String Datetime indicating the last price change date.
(Format: DD/MM/YYYY)

Example: 26/03/2014
old_price Float Last known price before the detected price change.

Example: 4218.49

Example Request

GET
http://prisync.com/api/getdata/email/name.surname@company.com/api_key/BTu87739209cjskwoio

Example Result

{
    "name": "Electronic Color Whiteboard CCB3200W",
    "product_code": "SKU7833",
    "product_cost": "3799.00",
    "min_price": 4644.92,
    "max_price": 5416.6,
    "avg_price": 4889.25,
    "smart_price": 4999.00,
    "urls": [{
        "site": "worldvideopros.com.au",
        "price": 4850.56,
        "currency": "AUD",
        "url": "https://www.worldvideopros.com.au/p-7593-vista-ccb3200w-electronic-whiteboard-2-screen-colour-widescreen-model.aspx",
        "last_check": "2015-07-01 11:48:40",
        "in_stock": 1,
        "change_day": "0",
        "weekly_avg": "2288.00,",
        "monthly_avg": "2288.00,",
        "last_changed": null,
        "old_price": null
    }, {
        "site": "officecenter.com.au",
        "price": 5416.6,
        "currency": "AUD",
        "url": "http://www.officecenter.com.au/panasonic-ccb3200w-wide-screen-colour",
        "last_check": "2015-07-01 11:21:39",
        "in_stock": 1,
        "change_day": "0",
        "weekly_avg": "2555.00,",
        "monthly_avg": "2555.00,",
        "last_changed": "25/05/2015",
        "old_price": 0
    }, {
        "site": "visualsales.com.au",
        "price": 4644.92,
        "currency": "AUD",
        "url": "http://www.visualsales.com.au/whiteboards-flipcharts/electronic-whiteboards/colour-electronic-whiteboards/abi-ccb3200w-widescreen-format-2-screen/",
        "last_check": "2015-07-01 11:56:10",
        "in_stock": 1,
        "change_day": "0",
        "weekly_avg": "2191.00,",
        "monthly_avg": "2132.83,",
        "last_changed": "23/06/2015",
        "old_price": 0
    }, {
        "site": "whiteboardsales.com.au",
        "price": 4644.92,
        "currency": "AUD",
        "url": "http://whiteboardsales.com.au/product/abi-ccb3200w-electronic-whiteboard/",
        "last_check": "2015-07-01 11:59:07",
        "in_stock": 1,
        "change_day": "0",
        "weekly_avg": "2191.00,",
        "monthly_avg": "1841.99,",
        "last_changed": "23/06/2015",
        "old_price": 0
    }]
}

Code Examples (Python)

Get number of products in your account
import urllib2
import json
api_url = "http://prisync.com/api/getdata/email/[ACCOUNT_EMAIL]/api_key/[API_KEY]"
response = urllib2.urlopen(api_url)
products = json.loads(response.read())

# Print number of products
#
# Sample API response:
#     There are  5210  products in the panel.

print "There are ", len(products), " products in your panel"


Getting all products of your account
# Print number of products
#
# Sample API response:
#     There are  5210  products in the panel.

import urllib2
import json

api_url = "http://prisync.com/api/getdata/email/[ACCOUNT_EMAIL]/api_key/[API_KEY]"
response = urllib2.urlopen(api_url)
products = json.loads(response.read())

print "There are ", len(products), " products in your panel"


Traversing products
# Print all products names
#
# Sample API response:
#     Citizen BM22110-57E
#     Esprit time Barton
#     GANT W10846
#     Hamilton H70555523
#     Hugo Boss 1512927
#     ...

import urllib2
import json

api_url = "http://prisync.com/api/getdata/email/[ACCOUNT_EMAIL]/api_key/[API_KEY]"
response = urllib2.urlopen(api_url)
products = json.loads(response.read())

for product in products:
    print product["name"]


Getting details of a product
# Get minimum, maximum and average prices of all products
#
# Sample API response:
#     Product Name              Minimum Price   Average Price   Maximum Price
#     Citizen BM22110-57E       1229.15         1529.15         1629.15
#     Esprit time Barton         313.25          383.25          403.25
#     GANT W10846                509.85          549.85          599.00
#     Hamilton H70555523        1319.90         1619.90         1919.90
#     Hugo Boss 1512927          949.65         1049.65         1149.00
#     ...

import urllib2
import json

api_url = "http://prisync.com/api/getdata/email/[ACCOUNT_EMAIL]/api_key/[API_KEY]"
response = urllib2.urlopen(api_url)
products = json.loads(response.read())

header_row = ["Product Name", "Minimum Price", "Average Price", "Maximum Price"]
print "\t".join(header_row)
for product in products:
    print "\t".join([product["name"], str(product["min_price"]), str(product["avg_price"]), str(product["max_price"])])


Traversing competitor details
# Get competitor prices and stock info for all products
#
# Sample API response:
#       Citizen BM22110-57E
#               amazon.co.uk            1229.15   1
#               Elite Watch World       1399.00   1
#               mywatchworld-wholesale  1243.15   1
#               Allwatches.com          1629.15   0
#       Esprit time Barton
#               amazon.co.uk            313.25    1
#               Elite Watch World       399.99    1
#               mywatchworld-wholesale  344.30    0
#               Allwatches.com          403.25    0
#     ...
import urllib2
import json

api_url = "http://prisync.com/api/getdata/email/[ACCOUNT_EMAIL]/api_key/[API_KEY]"
response = urllib2.urlopen(api_url)
products = json.loads(response.read())

for product in products:
    print product["name"]
    for competitor in product["urls"]:
        print "\t",competitor["site"], competitor["price"], competitor["in_stock"]