Check credentials and see which store this key belongs to
GET
/me
const url = 'https://api.oletapp.com/your-store/v1/me';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.oletapp.com/your-store/v1/me \ --header 'Authorization: Bearer <token>'A connection test: returns the store name and domain prefix this key belongs to, plus the scopes it was granted and its own id and name.
Requires scope: any
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Check credentials and see which store this key belongs to
Media typeapplication/json
object
data
required
object
domain_prefix
required
The retailer’s domain prefix, e.g. https://api.oletapp.com/{domain_prefix}/v1.
string
key
required
object
id
required
string
name
required
string
scopes
required
The scopes this key or app connection was granted.
Array<string>
store_name
required
The retailer’s store name.
string
Examplegenerated
{ "data": { "domain_prefix": "example", "key": { "id": "example", "name": "example" }, "scopes": [ "example" ], "store_name": "example" }}default
Section titled “default”An error response.
Media typeapplication/json
object
error
required
object
code
required
A machine-readable error code, e.g. VALIDATION_FAILED.
string
fields
Array<object>
object
field
required
string
message
required
string
message
required
A plain-English sentence describing what went wrong.
string
Example
{ "error": { "code": "UNAUTHORIZED" }}