Account
Use this endpoint to check that a key works and to see which account and permissions it has. It needs no particular permission, so it is a good first call and a good health check.
Get the customer and API key for this request
GET /v1/me
| Property | Value |
|---|---|
| URL | https://api.rephut.com/v1/me |
| Permission | Any valid key |
| Access | Read: counts towards the read limit and works while your account is on hold |
| Idempotency-Key | Not used |
| Success | 200 OK |
Headers
| Header | Required | Value |
|---|---|---|
Authorization |
Yes | Bearer <your API key>. See Authentication. |
Response
200 with data, an object with the fields below.
| Field | Type | Description |
|---|---|---|
customer |
object | The account the key belongs to. |
customer.id |
string | Your account id. |
customer.name |
string | Your company name, as we have it on file. |
apiKey |
object | The key that made this request. |
apiKey.id |
string | Key id. |
apiKey.name |
string | The name you gave the key in the portal. |
apiKey.keyPrefix |
string | The first characters of the key, as shown in the portal. They can't be used to authenticate. |
apiKey.scopes |
array of strings | The key's permissions, for example orders:read. See Authentication. |
Errors
| Code | HTTP status | Meaning |
|---|---|---|
invalid_api_key |
401 | The API key is missing, malformed, revoked or no longer valid. |
account_action_required |
403 | Sign in to the portal and finish the required account steps first. |
api_not_enabled |
403 | API access is not enabled for this account. |
validation_failed |
422 | The input is not valid. details lists each field and the reason. |
rate_limited |
429 | Too many requests. Wait for the number of seconds in Retry-After. |
internal_error |
500 | Unexpected error. Quote X-Request-Id when you contact support. |
Handle errors by code. See Errors.