v1

latestOpenAPI 3.0.12026-07-24204977.5 KB
Authentication

Login

There is a clean Login and Logout process associated with the Authentication process. Before you can Login, you need to obtain credentials from ShopBack - provided after registering a set of valid merchant details.

post/auth/login

Headers

X-ShopBack-Idempotent-Idstring
Example:faa5e09a-8cf3-43f7-8309-d94deb426e66

Idempotent Id for the request. If this is absent, every request will be treated as unique and will be processed as such. (This is optional for now, but will be made required in the future)

Request body

usernamestring required

This will be the merchant ID provided by ShopBack

passwordstring required

This will be the merchant secret proviced by ShopBack. TK_ for Sandbox, PK_ for Production

Example request

{
  "username": "abcde-12345-abcde12345",
  "password": "TK_sandbox123"
}

Response

successful operation

tokenstring

Auth token provided by ShopBack to the merchant

expiresAtstring date-time

Token expiry

Example response

{
  "token": "local-RUZvpBJr56eC5X0ZVXog4TnZ3Rp8GsF9UWZyWv9o7iM",
  "expiresAt": "2019-01-05T20:18:32.651+05:30"
}
All 20 operations