The account and token a request runs as
GET
/me
const url = 'https://app.currentpim.se/api/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://app.currentpim.se/api/v1/me \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”The account, its workspace, roles and the token’s abilities.
Media typeapplication/json
object
data
required
object
id
integer
name
string
workspace
object
id
string
name
string
slug
string
roles
Array<string>
token
object
name
string
abilities
Array<string>
expires_at
string | null format: date-time
Example
{ "data": { "token": { "abilities": [ "catalog:read" ] } }}No valid token (missing, revoked, expired, or the account is deactivated).
Media typeapplication/json
object
message
required
string
errors
Problems by field, e.g. values.price._._ or items.0.identifier (422 only).
object
key
additional properties
Array<string>
Example generated
{ "message": "example", "errors": { "additionalProperty": [ "example" ] }}The token lacks the ability or the account the permission.
Media typeapplication/json
object
message
required
string
errors
Problems by field, e.g. values.price._._ or items.0.identifier (422 only).
object
key
additional properties
Array<string>
Example generated
{ "message": "example", "errors": { "additionalProperty": [ "example" ] }}More than the allowed requests a minute for this token; Retry-After says when to try again.
Media typeapplication/json
object
message
required
string
errors
Problems by field, e.g. values.price._._ or items.0.identifier (422 only).
object
key
additional properties
Array<string>
Example generated
{ "message": "example", "errors": { "additionalProperty": [ "example" ] }}