This quick start guide will take you through making your first requests with Shopper APIs.
About the APIs
- The APIs are only available as RESTful as of now.
- The API is versioned. We will release updates periodically.
- Apps must explicitly use the specific APP_ID while using these APIs.
- The Storefront API itself is unauthenticated, meaning all users have read-only access without a username or password.
- The API enforces a rate limit.
Authentication
The Shopper API uses API Keys to authenticate requests. You can view and manage your API keys from here.
API keys provide access to private data, so keep them safe! API keys should not be shared in publicly accessible areas such as GitHub and client-side code.
API requests must be sent over HTTPS. Requests made over plain HTTP will be rejected. Authentication is required for API requests.
One must obtain the API Key and the API Secret from the dashboard to authenticate Shopper API endpoints.
- API Key
- API Secret
- Application ID
API Keys
Security Scheme Type | Value | Description |
---|---|---|
Header parameter name: | api-key | API Key |
Header parameter name: | api-secret | API Secret |
Header parameter name: | app-id | Application ID |
Test Authentication
You can test authentication with Shopper.com.
Request:
Definition: GET https://api.shopper.com/v1/user/
Headers: api-key: API Key, api-secret: API Secret, app-id: My Application ID
Response
{
"country": "US",
"profile_name": "Dan Owens",
"user_name": "dan.owens",
"u_id": "5fd651ewscf2fd0011b5cdbe",
"email": "d.ownes@gmail.com",
"description": "Dreamer, explorer and optimist. Love to read 📚, occasionally sip good coffee ☕ and always ready to scale rocks ⛰️.n",
"is_private": false,
"avatar": "https://cdn.shopper.com/shopper-v2/demo/assets/user_profile/5fd65100dcf2fd0011b5cdbe1641289178131.png",
"cover_image": "https://cdn.shopper.com/shopper-v2/demo/assets/user_profile/ec3ad308-2d30-4690-b08d-767b7897a1a1.jpg",
"statistics": {
"followers": 100000,
"following": 1000,
"product_count": 120,
"collection_count": 10
},
"social_channels": [
{
"channel": "youtube",
"link": "https://www.youtube.com/_"
}
]
}
HTTP Status Codes
Please see below all the global errors for the Shopper APIs.
401 - API key invalid
If you receive this error, either your API key is invalid or you are trying to access the wrong data set. Or the user does not have the necessary credentials.
403 - No permissions access the resource
You are not allowed to access this resource.
Although the request was valid, the server is refusing to respond. It may be because the user does not have the necessary permissions to access the resource.
404 - Resource not found
The requested resource could not be located.
The error indicates that a specific resource does not exist. It is possible that the resource has been moved or deleted, or that your request contains a typo.
500 - Server error, please contact support
The generic error message is displayed when an unexpected condition arises and a more specific message is not appropriate. For more information, please contact our support.
The error indicates that our server has encountered a problem. It is rare that this occurs, but please contact support@shopper.com if you encounter this issue.