Tokens

GET /2023-03-01/management/tokens

View tokens and token status for respective client

Responses

  • 200 application/json

    Success

    Hide response attributes Show response attributes object
    • token string Required

      The client ID you received when you first created the application

    • scopes array[string] Required

      One or more scope values indicating which parts of the user's account you wish to access.

      Note, slight deviation from the OAuth 2.1 spec in that the param is scopes (plural) is used vs scope (singular)

      Values are /2023-03-01/official/company, /2023-03-01/official/employee, /2023-03-01/official/employees, /2023-03-01/official/groups, /2023-03-01/official/identity, /2023-03-01/official/time-off-balances, /2023-03-01/official/time-off-entries, /2023-03-01/official/timesheets, /2023-03-01/official/work-locations, /2023-03-01/xhr/company, /2023-03-01/xhr/employee, /2023-03-01/xhr/employees, /2023-03-01/xhr/groups, /2023-03-01/xhr/identity, /2023-03-01/xhr/payruns, /2023-03-01/xhr/payruns/:payrun_id, /2023-03-01/xhr/time-off-balances, /2023-03-01/xhr/time-off-entries, /2023-03-01/xhr/timesheets, or /2023-03-01/xhr/work-locations.

    • created_at string(date-time)

      When the token was created (/token invocation)

    • mode string Required

      Values are official or xhr.

    • provider string Required

      Values are sandbox, bamboohr, breathe, cezanne, charliehr, deel, deputy, hailyhr, hibob, humaans, iris cascade, moorepay, nmbrs, parolla.ie, payfit, personio.de, planday, sagehr, saplinghr, staffology, xero uk, brain payroll, brightpay connect, employment hero, factorialhr, fourthhr, gusto, itrent, justworks, onpay, oysterhr, paycircle, pento.io, peoplehr, remote.com, sageone, shape payroll, simplepay.ie, quickbooks online, or zoho.

    • valid boolean Required

      if the token is valid or not

  • 400 application/json

    Bad Request

    Hide response attributes Show response attributes object
  • 404 application/json

    Not Found

    Hide response attributes Show response attributes object
    • message string Required

      A description of the error

    • id string Required

      The id of the entity that the id applies. For example, the transaction id

  • 409 application/json

    Not Found

    Hide response attributes Show response attributes object
    • code string

      The authorization code insert that caused a conflict

    • token string

      The access token insert that caused a conflict

    • error string Required

      The description of the type of error, ie conflict of two requests of the the same authorization code

      Value is conflict.

  • 429 application/json

    Rate Limited / Too Many Requests

    Hide headers attribute Show headers attribute
    • Retry your call after the specified amount of seconds

    Hide response attribute Show response attribute object
  • 500 application/json

    Server Error

    Hide response attribute Show response attribute object
GET /2023-03-01/management/tokens
curl \
 -X GET https://api.affixapi.com/2023-03-01/management/tokens \
 -H "Authorization: $API_KEY"
Response examples (200)
[
  {
    "token": "00000000-00000000-00000000-00000000",
    "scopes": [
      "/2023-03-01/payroll/employees",
      "/2023-03-01/payroll/identity",
      "/2023-03-01/payroll/payruns",
      "/2023-03-01/payroll/payruns/:payrun_id"
    ],
    "created_at": "2023-08-09T08:09:40.724Z",
    "mode": "xhr",
    "provider": "sandbox",
    "valid": true
  }
]
Response examples (400)
{
  "message": "string",
  "validation_error": "string"
}
Response examples (404)
{
  "message": "string",
  "id": "string"
}
Response examples (409)
{
  "code": "string",
  "token": "string",
  "error": "conflict"
}
Response examples (429)
# Headers
Retry-After: 42

# Payload
{
  "message": "string"
}
Response examples (500)
{
  "message": "string"
}