Work locations

GET /2023-03-01/xhr/work-locations

The Location object is used to represent an address that can be associated with an employee

Responses

  • 200 application/json

    Success

    Hide response attributes Show response attributes object | null
    • id string | null Required

      The Affix-assigned id of the individual

    • remote_id string | null Required

      the remote system-assigned id of the individual

    • name string | null Required

      System assigned description of the location

    • type string | null Required

      The location's type. In cases where there is no clear mapping, the original value passed through will be returned.

    • address object | null Required
      Hide address attributes Show address attributes object | null
      • street_address string | null Required
      • locality string | null Required
      • administrative_area string | null Required

        The administrative area of the address. If US or CA, the two-letter state or province abbreviation. Else, the province / administrative area; such as, Dublin 2 or County Cork

      • country string | null Required

        The ISO-3166-2 two-letter abbreviation of the country. Reference https://en.wikipedia.org/wiki/ISO_3166-2 for more details

        Values are null, BZ, CA, CR, GT, MX, PA, SV, US, AR, BR, CL, PE, AT, BE, CH, CY, CZ, DE, DK, EE, ES, FI, FR, GB, GR, IE, IM, IS, IT, LI, LT, LU, LV, NL, NO, PL, RO, RU, SE, SK, CN, HK, ID, IL, IN, JP, KR, MO, MY, PH, PS, SG, TH, TR, TW, VN, ZA, AU, or NZ.

      • post_code string | null Required
  • 202 application/json

    Accepted + pending (async job started)

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

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

    Authentication Error

    Hide response attributes Show response attributes object
    • error string Required

      The type of error

      Value is authentication_error.

    • message string Required

      A descriptive description of the error

    • code string Required

      Values are incorrect_username_or_password, incorrect_mfa_or_otp, reauthentication_required // cookies are now expired, additional_account_setup_required // password reset, etc, captcha_challenge // amazon type1 captcha challenge (currently unsovable), no_valid_accounts // not used currently but reserved for future use, or insufficient_permission // not enough privileges (ie not an admin, or not enough provider scopes on a provider api token for the Affix scopes requested).

  • 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
  • 501 application/json

    Not Implemented

    Hide response attribute Show response attribute object
GET /2023-03-01/xhr/work-locations
curl \
 -X GET https://dev.api.affixapi.com/2023-03-01/xhr/work-locations \
 -H "Authorization: $API_KEY"
Response examples (200)
[
  {
    "id": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
    "remote_id": "19202938",
    "name": "NYC Office",
    "type": "office",
    "address": {
      "street_address": "221 S Main Street",
      "locality": "Yuma",
      "administrative_area": "AZ",
      "country": "IE",
      "post_code": "30691"
    }
  }
]
Response examples (202)
# Headers
Retry-After: 42

# Payload
{
  "message": "string"
}
Response examples (401)
{
  "error": "authentication_error",
  "message": "Your password is incorrect",
  "code": "incorrect_username_or_password"
}
Response examples (429)
# Headers
Retry-After: 42

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