Logo
API Documentation

Summary

The Rest API allows user application to connect to Streetpricer system using json. The general steps are as follow:

  • Login
  • List, create, update and delete operation
  • Logout

Streetprice API has requests rate limit for requests from clients, limit is 50 requests per minute, limits are returning in response header to let clients know their current limits

  • X-RateLimit-Limit - Limit per minute for current client.
  • X-RateLimit-Remaining - Remaining requests for the current client is allowed in the current minute.
  • Logout

API

Login

Method & Url:
Parameter:
  • username: user login email
  • password: user password
Return value:
Authentication token

Example:

curl -d "username=user@email.com&password=pass123" -X POST https://api.streetpricer.com/api/v1/auth/token
                                        

will return:

{ "token": "authtoken"}
                                        

Logout

Method & Url:
Header:
Authorization: Bearer authtoken

Example:

curl -H 'Authorization: Bearer authtoken' -X DELETE https://api.streetpricer.com/api/v1/auth/token
                                        

List All Stores

Method & Url:
Header:
Authorization: Bearer authtoken
Return value:
Array of stores

Example:

curl -H 'Authorization: Bearer authtoken' -X GET https://api.streetpricer.com/api/v1/stores
                                        

will return:

[{"EbayUserID":"ebaystore","AIScan":1,"Amazon":0,"AutoPrice":1,"AutoLock":0}]
                                        

List a Store

Method & Url:
Header:
Authorization: Bearer authtoken
Return value:
Store detail

Example:

curl -H 'Authorization: Bearer authtoken' -X GET https://api.streetpricer.com/api/v1/stores/ebaystore
                                        

will return:

{"EbayUserID":"ebaystore","AIScan":1,"Amazon":0,"AutoPrice":1,"AutoLock":0}
                                        

Update a Store

Method & Url:
Parameter:
  • AIScan: 0 or 1 (optional)
  • Amazon: 0 or 1 (optional)
  • AutoPrice: 0 or 1 (optional)
  • Autolock: 0 or 1 (optional)

Note: At least one of the parameter is needed

Header:
Authorization: Bearer authtoken
Return value:
Success (OK) or failure message (Not Found)

Example:

curl -d "AIScan=1&Amazon=1&AutoPrice=1&Autolock=0" -H 'Authorization: Bearer authtoken' -X POST https://api.streetpricer.com/api/v1/stores/ebaystore
                                        

will return:

{ "message": "OK"}
                                        

Get All Products

Method & Url:
Parameter:
  • page: integer (default 1)
Header:
Authorization: Bearer authtoken
Return value:
  • items: an array of products in the store for the page
  • total_page: total page of the products in the store
  • total_records: total of the products in the store
  • page: the current page

Example:

curl -H 'Authorization: Bearer authtoken' -X GET https://api.streetpricer.com/api/v1/stores/ebaystore/items?page=1
                                        

will return:


    {
    "items": [{"ID":123456,"EbayUserID":"ebaystore","Site":"Australia","SKU":"ABC-123","Active":1, ...}],
    "total_page":100,
    "total_records":19969,
    "page":1
    }
                                        

Get Item Detail

Method & Url:
Parameter:
  • CompetitorDetail: 0 or 1
Header:
Authorization: Bearer authtoken
Return value:
A product detail
Note:
If there is no item matching the SKU or Item ID, a list of all item will be returned

Example:

curl -H 'Authorization: Bearer authtoken' -X GET https://api.streetpricer.com/api/v1/stores/ebaystore/items/ABC-123
                                        

will return:

[{"ID":123456,"EbayUserID":"ebaystore","Site":"Australia","SKU":"ABC-123","Active":1, ...}]
                                        

Update an Item

Method & Url:
Parameter:
  • SKU: SKU string
  • Title: Product title
  • Keywords: Keywords (eBay Search String)
  • CompetitorItemIDList: Competitor Item ID separated by commas.
  • withItemSpecificsScan: 0 or 1
  • withKeywordsScan: 0 or 1
  • withAIScan: 0 or 1
  • AutoPrice: 0 or 1
  • AutoPriceRule#:
  • FloorPrice: Floor Price
  • Price: Selling price
  • CeilingPrice: Ceiling Price
  • Brand: GTINs - Brand
  • MPN: GTINs - MPN
  • UPC: GTINs - UPC
  • EAN: GTINs - EAN
  • ISBN: GTINs - ISBN
  • EPID: GTINs - EPID
  • ASIN: GTINs - ASIN
  • IPN: GTINs - IPN
Header:
Authorization: Bearer authtoken
Return value:
Number of item being updated

Example:

curl -H 'Authorization: Bearer authtoken' -X POST https://api.streetpricer.com/api/v1/stores/ebaystore/items/ABC-123
                                        

will return:

{"message":"1 updated"}
                                        

Add an Item

Method & Url:
Parameter:
  • ItemID: eBay Item ID [mandatory]
  • SKU: SKU string [mandatory]
  • Title: Product title [mandatory]
  • Keywords: Keywords (eBay Search String)
  • CompetitorItemIDList: Competitor Item ID separated by commas.
  • withItemSpecificsScan: 0 or 1
  • withKeywordsScan: 0 or 1
  • withAIScan: 0 or 1
  • AutoPrice: 0 or 1
  • AutoPriceRule#:
  • FloorPrice: Floor Price
  • Price: Selling price
  • CeilingPrice: Ceiling Price
  • Brand: GTINs - Brand
  • MPN: GTINs - MPN
  • UPC: GTINs - UPC
  • EAN: GTINs - EAN
  • ISBN: GTINs - ISBN
  • EPID: GTINs - EPID
  • ASIN: GTINs - ASIN
  • IPN: GTINs - IPN
Header:
Authorization: Bearer authtoken
Return value:
Detail of the product added

Example:

curl -d 'Active=0&ListingStatus=Completed&Price=200.2&SKU=mysku&Title=testtitle' -H 'Authorization: Bearer authtoken' -X PUT https://api.streetpricer.com/api/v1/stores/ebaystore/items
                                        

will return:

{"Result":"OK","Status":"in_queue"}
                                        

Remove an Item

Method & Url:
Header:
Authorization: Bearer authtoken
Return value:
Number of product deleted

Example:

curl -H 'Authorization: Bearer authtoken' -X DELETE https://api.streetpricer.com/api/v1/stores/ebaystore/items/mysku
                                        

will return:

{"message":"1 deleted"}