API Documentation for Storeino
Authentication
To interact with the Storeino API, you must first obtain an access token using your clientId and clientSecret.
You can find these credentials in the Storeino Developer Portal.
Step 1: Obtain Access & Refresh Tokens
Send a GET request to the authentication endpoint with your clientId and clientSecret as query parameters:
GET /api/stores/authentication?clientId=YOUR_CLIENT_ID&clientSecret=YOUR_CLIENT_SECRETExample Response:
json
{
"refreshToken": "REFRESH_TOKEN",
"accessToken": "ACCESS_TOKEN",
"expireTime": 86400
}- Use the
accessTokenin thex-auth-tokenheader for all subsequent API requests:x-auth-token: ACCESS_TOKEN
Step 2: Refresh Access Token
When your access token expires, you can use the refreshToken to obtain a new access token.
Send a POST request to the same endpoint, adding refresh=true as a query parameter, and include your refreshToken in the request body:
POST /api/stores/authentication?clientId=YOUR_CLIENT_ID&clientSecret=YOUR_CLIENT_SECRET&refresh=trueRequest Body:
json
{
"refreshToken": "REFRESH_TOKEN"
}Example Response:
json
{
"accessToken": "NEW_ACCESS_TOKEN",
"expireTime": 86400
}Example Usage
bash
curl --location --request GET 'https://api-stores.storeino.com/api/stores/authentication?clientId=YOUR_CLIENT_ID&clientSecret=YOUR_CLIENT_SECRET'For authenticated requests, add the access token to your headers:
bash
curl --location 'https://api-stores.storeino.com/api/products' \
--header 'x-auth-token: ACCESS_TOKEN'Notes
- Both
clientIdandclientSecretare required for authentication. - The
accessTokenis used for all protected API endpoints. - Use the
refreshTokento obtain a new access token without re-sending your credentials.