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
Example:
curl -d "username=user@email.com&password=pass123" -X POST https://api.streetpricer.com/api/v1/auth/token
will return:
{ "token": "authtoken"}
Example:
curl -H 'Authorization: Bearer authtoken' -X DELETE https://api.streetpricer.com/api/v1/auth/token
Example:
curl -H 'Authorization: Bearer authtoken' -X GET https://api.streetpricer.com/api/v1/amazon/stores
will return:
[{"SellingPartnerID":"SellingPartnerID","MarketplaceID":MarketplaceID,"AutoPrice":1,"DefaultCurrency":USD}]
Example:
curl -H 'Authorization: Bearer authtoken' -X GET https://api.streetpricer.com/api/v1/amazon/stores/MarketplaceID/SellingPartnerID
will return:
{"SellingPartnerID":"SellingPartnerID","MarketplaceID":MarketplaceID,"AutoPrice":1,"DefaultCurrency":USD}
Example:
curl -H 'Authorization: Bearer authtoken' -X GET https://api.streetpricer.com/api/v1/amazon/stores/MarketplaceID/SellingPartnerID/items?page=1
will return:
{
"items": [{"ID":123456,"SellingPartnerID":"SellingPartnerID","MarketplaceID":"MarketplaceID","SKU":"ABC-123","Active":1, ...}],
"total_page":100,
"total_records":19969,
"page":1
}
Example:
curl -H 'Authorization: Bearer authtoken' -X GET https://api.streetpricer.com/api/v1/amazon/stores/MarketplaceID/SellingPartnerID/items/ABC-123
will return:
[{"ID":123456,"SellingPartnerID":"SellingPartnerID","MarketplaceID":"MarketplaceID","SKU":"ABC-123","Active":1, ...}]
Example:
curl -H 'Authorization: Bearer authtoken' -X GET https://api.streetpricer.com/api/v1/amazon/stores/MarketplaceID/SellingPartnerID/items/ABC-123
will return:
{"message":"1 updated"}
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, ...}]
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}]
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}
Note: At least one of the parameter is needed
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"}
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
}
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, ...}]
Example:
curl -H 'Authorization: Bearer authtoken' -X PUT https://api.streetpricer.com/api/v1/stores/ebaystore/items/ABC-123
will return:
{"message":"1 updated"}
Example:
curl -d 'Active=0&ListingStatus=Completed&Price=200.2&SKU=mysku&Title=testtitle' -H 'Authorization: Bearer authtoken' -X POST https://api.streetpricer.com/api/v1/stores/ebaystore/items
will return:
{"Result":"OK","Status":"in_queue"}
Example:
curl -H 'Authorization: Bearer authtoken' -X DELETE https://api.streetpricer.com/api/v1/stores/ebaystore/items/mysku
will return:
{"message":"1 deleted"}
Example:
curl -H 'Authorization: Bearer authtoken' -X GET https://api.streetpricer.com/api/v1/walmart/stores
will return:
[{"SellingPartnerID":"SellingPartnerID","MarketplaceID":MarketplaceID,"AutoPrice":1,"DefaultCurrency":USD}]
Example:
curl -H 'Authorization: Bearer authtoken' -X GET https://api.streetpricer.com/api/v1/stores/MarketplaceID/SellingPartnerID
will return:
{"SellingPartnerID":"SellingPartnerID","MarketplaceID":MarketplaceID,"AutoPrice":1,"DefaultCurrency":USD}
Example:
curl -H 'Authorization: Bearer authtoken' -X GET https://api.streetpricer.com/api/v1/stores/MarketplaceID/SellingPartnerID/items?page=1
will return:
{
"items": [{"ID":123456,"SellingPartnerID":"SellingPartnerID","MarketplaceID":"MarketplaceID","SKU":"ABC-123","Active":1, ...}],
"total_page":100,
"total_records":19969,
"page":1
}
Example:
curl -H 'Authorization: Bearer authtoken' -X GET https://api.streetpricer.com/api/v1/walmart/stores/MarketplaceID/SellingPartnerID/items/ABC-123
will return:
[{"ID":123456,"SellingPartnerID":"SellingPartnerID","MarketplaceID":"MarketplaceID","SKU":"ABC-123","Active":1, ...}]
Example:
curl -H 'Authorization: Bearer authtoken' -X GET https://api.streetpricer.com/api/v1/walmart/stores/MarketplaceID/SellingPartnerID/items/ABC-123
will return:
{"message":"1 updated"}