Skip to content

Your account

GET
/v1/auth/me
curl --request GET \
--url https://api.avtopodatki.si/v1/auth/me \
--header 'Authorization: Bearer <token>'

Your account: email, the companies you belong to with their plans, permissions and limits, and whether your account or a company is suspended.

Works even when your account or company is suspended, so an app can show why instead of a bare error. Also a quick way to check that your access token is valid.

Successful Response

Media typeapplication/json
AuthUser

Your account and what it can access.

object
id
required
Id

Your account id.

string format: uuid
email
Email
Any of:
string
role
required
Role

Session type; authenticated for a signed-in user.

string
roles
Roles

Special roles, e.g. operator, which has access to every API.

Array<string>
is_operator
required
Is Operator

Whether the account is an operator.

boolean
two_factor_required
Two Factor Required

This session skipped the second factor it needs: the account has one, or is staff (who act as an ordinary user until they pass it). Other routes answer 403 two_factor_required until it is completed.

boolean
trial
Trial

Whether this is trial access.

boolean
access_expires_at
Access Expires At

When your access ends; null if it does not. Afterwards signing in and every request return 403 access_expired.

Any of:
string format: date-time
access_expired
Access Expired

Whether access_expires_at has passed.

boolean
limits
Limits

The company’s monthly limits (credits, exports, …) and this month’s use. Null if you are not metered.

Any of:
Array<object>
LimitOut

One monthly limit of the company and this month’s use of it.

object
meter
required
Meter

credits: spent by API calls (dashboard calls spend none). exports: catalogue exports from the dashboard or the API. full_exports: full listings exports (the listings integration’s Excel file), likewise. vin_lookups: reserved, nothing spends it yet.

string
monthly_limit
required
Monthly Limit

Null: unlimited.

Any of:
integer
used
required
Used
integer
remaining
required
Remaining

Null: unlimited.

Any of:
integer
resets_at
required
Resets At
string format: date-time
permissions
Permissions

What you may use, for the company your requests act for (see default_org_id). An operator reaches everything, whatever this lists.

Array<object>
PermissionOut

One permission a company holds.

object
permission
required
Permission

area.action, e.g. market.read, or integration.<slug>.

string
conditions
Conditions

What narrows the data it reaches, e.g. {"sites": ["avtonet"]}. Empty: no narrowing.

object
key
additional properties
any
channels
required
Channels

Where it applies: dashboard, api or both.

Array<string>
full_name
Full Name
Any of:
string
locale
Locale
string
default: sl
staff_role
Staff Role

operator or admin for platform staff; null otherwise.

Any of:
string
disabled
Disabled

Your account is suspended: every API except this one and logout returns 403 account_disabled.

boolean
disabled_at
Disabled At
Any of:
string format: date-time
disabled_reason
Disabled Reason
Any of:
string
organizations
Organizations

Companies you belong to. The access fields above (trial, access_expires_at, limits, permissions) are those of the company the request acts for.

Array<object>
OrganizationOut

A company you belong to, its plan and what it may use.

object
id
required
Id
string format: uuid
name
required
Name
string
type
required
Type

dealer, parts_seller, data_customer or enterprise.

string
role
required
Role

Your role in it: owner, developer (also manages the API keys) or employee (null for an operator acting for it).

Any of:
string
plan_code
Plan Code
Any of:
string
status
Status

trialing, active, past_due, canceled or expired.

Any of:
string
permissions
Permissions

Everything the company may use.

Array<object>
PermissionOut

One permission a company holds.

object
permission
required
Permission

area.action, e.g. market.read, or integration.<slug>.

string
conditions
Conditions

What narrows the data it reaches, e.g. {"sites": ["avtonet"]}. Empty: no narrowing.

object
key
additional properties
any
channels
required
Channels

Where it applies: dashboard, api or both.

Array<string>
current_period_end
Current Period End

When the company’s access ends; null if it does not.

Any of:
string format: date-time
integrations
Integrations
Array<string>
limits
Limits

Each monthly limit and this month’s use. Null if you are not metered.

Any of:
Array<object>
LimitOut

One monthly limit of the company and this month’s use of it.

object
meter
required
Meter

credits: spent by API calls (dashboard calls spend none). exports: catalogue exports from the dashboard or the API. full_exports: full listings exports (the listings integration’s Excel file), likewise. vin_lookups: reserved, nothing spends it yet.

string
monthly_limit
required
Monthly Limit

Null: unlimited.

Any of:
integer
used
required
Used
integer
remaining
required
Remaining

Null: unlimited.

Any of:
integer
resets_at
required
Resets At
string format: date-time
disabled
Disabled

The company’s access is suspended: every API returns 403 organization_disabled for it. You can still sign in and read this.

boolean
disabled_at
Disabled At
Any of:
string format: date-time
disabled_reason
Disabled Reason
Any of:
string
default_org_id
Default Org Id

The company requests act for when you send no X-Org-Id header: your only one. Null if you belong to several — then send X-Org-Id.

Any of:
string format: uuid

Example

{
"two_factor_required": false,
"trial": false,
"access_expired": false,
"limits": [
{
"meter": "credits"
}
],
"permissions": [
{
"permission": "market.read",
"channels": [
"dashboard",
"api"
]
}
],
"locale": "sl",
"disabled": false,
"organizations": [
{
"permissions": [
{
"permission": "market.read",
"channels": [
"dashboard",
"api"
]
}
],
"limits": [
{
"meter": "credits"
}
],
"disabled": false
}
]
}