{
  "openapi": "3.0.3",
  "info": {
    "title": "Affix API",
    "description": "The affixapi.com API documentation.\n\n# Introduction\nAffix API is an OAuth 2.1 application that allows developers to access\ncustomer data, without developers needing to manage or maintain\nintegrations; or collect login credentials or API keys from users for these\nthird party systems.\n\n# OAuth 2.1\nAffix API follows the [OAuth 2.1 spec](https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-08).\n\nAs an OAuth application, Affix API handles not only both the collection of\nsensitive user credentials or API keys, but also builds and maintains the\nintegrations with the providers, so you don't have to.\n\n# How to obtain an access token\nin order to get started, you must:\n  - register a `client_id`\n  - direct your user to the sign in flow  (`https://connect.affixapi.com`\n    [with the appropriate query\n    parameters](https://github.com/affixapi/starter-kit/tree/master/connect))\n  - capture `authorization_code` we will send to your redirect URI after\n    the sign in flow is complete and exchange that `authorization_code` for\n    a Bearer token\n\n# Sandbox keys (xhr mode)\n### dev\n```\neyJhbGciOiJFUzI1NiIsImtpZCI6Ims5RmxwSFR1YklmZWNsUU5QRVZzeFcxazFZZ0Zfbk1BWllOSGVuOFQxdGciLCJ0eXAiOiJKV1MifQ.eyJwcm92aWRlciI6InNhbmRib3giLCJzY29wZXMiOlsiLzIwMjMtMDMtMDEveGhyL2NvbXBhbnkiLCIvMjAyMy0wMy0wMS94aHIvZW1wbG95ZWUiLCIvMjAyMy0wMy0wMS94aHIvZW1wbG95ZWVzIiwiLzIwMjMtMDMtMDEveGhyL2dyb3VwcyIsIi8yMDIzLTAzLTAxL3hoci9pZGVudGl0eSIsIi8yMDIzLTAzLTAxL3hoci9wYXlydW5zIiwiLzIwMjMtMDMtMDEveGhyL3BheXJ1bnMvOnBheXJ1bl9pZCIsIi8yMDIzLTAzLTAxL3hoci90aW1lLW9mZi1iYWxhbmNlcyIsIi8yMDIzLTAzLTAxL3hoci90aW1lLW9mZi1lbnRyaWVzIiwiLzIwMjMtMDMtMDEveGhyL3RpbWVzaGVldHMiLCIvMjAyMy0wMy0wMS94aHIvd29yay1sb2NhdGlvbnMiXSwidG9rZW4iOiIzODIzNTNlMi05N2ZiLTRmMWEtOTYxYy0zZDI5OTViNzYxMTUiLCJpYXQiOjE3MTE4MTA3MTQsImlzcyI6InB1YmxpY2FwaS1pbnRlcm1lZGlhdGUuZGV2LmVuZ2luZWVyaW5nLmFmZml4YXBpLmNvbSIsInN1YiI6InhociIsImF1ZCI6IjNGREFFREY5LTFEQ0E0RjU0LTg3OTQ5RjZBLTQxMDI3NjQzIn0.zUJPaT6IxcIdr8b9iO6u-Rr5I-ohTHPYTrQGrgOFghbEbovItiwr9Wk479GnJVJc3WR8bxAwUMAE4Ul6Okdk6Q\n```\n\n#### `employees` endpoint sample:\n```\ncurl --fail \\\n  -X GET \\\n  -H 'Authorization: Bearer eyJhbGciOiJFUzI1NiIsImtpZCI6Ims5RmxwSFR1YklmZWNsUU5QRVZzeFcxazFZZ0Zfbk1BWllOSGVuOFQxdGciLCJ0eXAiOiJKV1MifQ.eyJwcm92aWRlciI6InNhbmRib3giLCJzY29wZXMiOlsiLzIwMjMtMDMtMDEveGhyL2NvbXBhbnkiLCIvMjAyMy0wMy0wMS94aHIvZW1wbG95ZWUiLCIvMjAyMy0wMy0wMS94aHIvZW1wbG95ZWVzIiwiLzIwMjMtMDMtMDEveGhyL2dyb3VwcyIsIi8yMDIzLTAzLTAxL3hoci9pZGVudGl0eSIsIi8yMDIzLTAzLTAxL3hoci9wYXlydW5zIiwiLzIwMjMtMDMtMDEveGhyL3BheXJ1bnMvOnBheXJ1bl9pZCIsIi8yMDIzLTAzLTAxL3hoci90aW1lLW9mZi1iYWxhbmNlcyIsIi8yMDIzLTAzLTAxL3hoci90aW1lLW9mZi1lbnRyaWVzIiwiLzIwMjMtMDMtMDEveGhyL3RpbWVzaGVldHMiLCIvMjAyMy0wMy0wMS94aHIvd29yay1sb2NhdGlvbnMiXSwidG9rZW4iOiIzODIzNTNlMi05N2ZiLTRmMWEtOTYxYy0zZDI5OTViNzYxMTUiLCJpYXQiOjE3MTE4MTA3MTQsImlzcyI6InB1YmxpY2FwaS1pbnRlcm1lZGlhdGUuZGV2LmVuZ2luZWVyaW5nLmFmZml4YXBpLmNvbSIsInN1YiI6InhociIsImF1ZCI6IjNGREFFREY5LTFEQ0E0RjU0LTg3OTQ5RjZBLTQxMDI3NjQzIn0.zUJPaT6IxcIdr8b9iO6u-Rr5I-ohTHPYTrQGrgOFghbEbovItiwr9Wk479GnJVJc3WR8bxAwUMAE4Ul6Okdk6Q' \\\n  'https://dev.api.affixapi.com/2023-03-01/xhr/employees'\n```\n\n### prod\n```\neyJhbGciOiJFUzI1NiIsImtpZCI6Ims5RmxwSFR1YklmZWNsUU5QRVZzeFcxazFZZ0Zfbk1BWllOSGVuOFQxdGciLCJ0eXAiOiJKV1MifQ.eyJwcm92aWRlciI6InNhbmRib3giLCJzY29wZXMiOlsiLzIwMjMtMDMtMDEveGhyL2NvbXBhbnkiLCIvMjAyMy0wMy0wMS94aHIvZW1wbG95ZWUiLCIvMjAyMy0wMy0wMS94aHIvZW1wbG95ZWVzIiwiLzIwMjMtMDMtMDEveGhyL2dyb3VwcyIsIi8yMDIzLTAzLTAxL3hoci9pZGVudGl0eSIsIi8yMDIzLTAzLTAxL3hoci9wYXlydW5zIiwiLzIwMjMtMDMtMDEveGhyL3BheXJ1bnMvOnBheXJ1bl9pZCIsIi8yMDIzLTAzLTAxL3hoci90aW1lLW9mZi1iYWxhbmNlcyIsIi8yMDIzLTAzLTAxL3hoci90aW1lLW9mZi1lbnRyaWVzIiwiLzIwMjMtMDMtMDEveGhyL3RpbWVzaGVldHMiLCIvMjAyMy0wMy0wMS94aHIvd29yay1sb2NhdGlvbnMiXSwidG9rZW4iOiIzYjg4MDc2NC1kMGFmLTQ5ZDAtOGM5OS00YzIwYjE2MTJjOTMiLCJpYXQiOjE3MTE4MTA4NTgsImlzcyI6InB1YmxpY2FwaS1pbnRlcm1lZGlhdGUucHJvZC5lbmdpbmVlcmluZy5hZmZpeGFwaS5jb20iLCJzdWIiOiJ4aHIiLCJhdWQiOiIwOEJCMDgxRS1EOUFCNEQxNC04REY5OTIzMy02NjYxNUNFOSJ9.n3pJmmfegU21Tko_TyUyCHi4ITvfd75T8NFFTHmf1r8AI8yCUYTWdfNjyZZWcZD6z50I3Wsk2rAd8GDWXn4vlg\n```\n\n#### `employees` endpoint sample:\n```\ncurl --fail \\\n  -X GET \\\n  -H 'Authorization: Bearer eyJhbGciOiJFUzI1NiIsImtpZCI6Ims5RmxwSFR1YklmZWNsUU5QRVZzeFcxazFZZ0Zfbk1BWllOSGVuOFQxdGciLCJ0eXAiOiJKV1MifQ.eyJwcm92aWRlciI6InNhbmRib3giLCJzY29wZXMiOlsiLzIwMjMtMDMtMDEveGhyL2NvbXBhbnkiLCIvMjAyMy0wMy0wMS94aHIvZW1wbG95ZWUiLCIvMjAyMy0wMy0wMS94aHIvZW1wbG95ZWVzIiwiLzIwMjMtMDMtMDEveGhyL2dyb3VwcyIsIi8yMDIzLTAzLTAxL3hoci9pZGVudGl0eSIsIi8yMDIzLTAzLTAxL3hoci9wYXlydW5zIiwiLzIwMjMtMDMtMDEveGhyL3BheXJ1bnMvOnBheXJ1bl9pZCIsIi8yMDIzLTAzLTAxL3hoci90aW1lLW9mZi1iYWxhbmNlcyIsIi8yMDIzLTAzLTAxL3hoci90aW1lLW9mZi1lbnRyaWVzIiwiLzIwMjMtMDMtMDEveGhyL3RpbWVzaGVldHMiLCIvMjAyMy0wMy0wMS94aHIvd29yay1sb2NhdGlvbnMiXSwidG9rZW4iOiIzYjg4MDc2NC1kMGFmLTQ5ZDAtOGM5OS00YzIwYjE2MTJjOTMiLCJpYXQiOjE3MTE4MTA4NTgsImlzcyI6InB1YmxpY2FwaS1pbnRlcm1lZGlhdGUucHJvZC5lbmdpbmVlcmluZy5hZmZpeGFwaS5jb20iLCJzdWIiOiJ4aHIiLCJhdWQiOiIwOEJCMDgxRS1EOUFCNEQxNC04REY5OTIzMy02NjYxNUNFOSJ9.n3pJmmfegU21Tko_TyUyCHi4ITvfd75T8NFFTHmf1r8AI8yCUYTWdfNjyZZWcZD6z50I3Wsk2rAd8GDWXn4vlg' \\\n  'https://api.affixapi.com/2023-03-01/xhr/employees'\n```\n\n# Compression\nWe support `brotli`, `gzip`, and `deflate` compression algorithms.\n\nTo enable, pass the `Accept-Encoding` header with one or all of the values:\n`br`, `gzip`, `deflate`, or `identity` (no compression)\n\nIn the response, you will receive the `Content-Encoding` response header\nindicating the compression algorithm used in the data payload to enable you\nto decompress the result. If the `Accept-Encoding: identity` header was\npassed, no `Content-Encoding` response header is sent back, as no\ncompression algorithm was used.\n\n# Webhooks\nAn exciting feature for HR/Payroll modes are webhooks.\n\nIf enabled, your `webhook_uri` is set on your `client_id` for the\nrespective environment: `dev | prod`\n\nWebhooks are configured to make live requests to the underlying integration\n1x/hr, and if a difference is detected since the last request, we will send a\nrequest to your `webhook_uri` with this shape:\n\n```\n{\n\n  added: <api.v20230301.Employees>[\n    <api.v20230301.Employee>{\n      ...,\n      date_of_birth: '2010-08-06',\n      display_full_name: 'Daija Rogahn',\n      employee_number: '57993',\n      employment_status: 'pending',\n      employment_type: 'other',\n      employments: [\n        {\n          currency: 'eur',\n          effective_date: '2022-02-25',\n          employment_type: 'other',\n          job_title: 'Dynamic Implementation Manager',\n          pay_frequency: 'semimonthly',\n          pay_period: 'YEAR',\n          pay_rate: 96000,\n        },\n      ],\n      first_name: 'Daija',\n      ...\n    }\n  ],\n  removed: [],\n  updated: [\n    <api.v20230301.Employee>{\n      ...,\n      date_of_birth: '2009-11-09',\n      display_full_name: 'Lourdes Stiedemann',\n      employee_number: '63189',\n      employment_status: 'leave',\n      employment_type: 'full_time',\n      employments: [\n        {\n          currency: 'gbp',\n          effective_date: '2023-01-16',\n          employment_type: 'full_time',\n          job_title: 'Forward Brand Planner',\n          pay_frequency: 'semimonthly',\n          pay_period: 'YEAR',\n          pay_rate: 86000,\n        },\n      ],\n      first_name: 'Lourdes',\n    }\n  ]\n}\n```\n\nthe following headers will be sent with webhook requests:\n\n```\nx-affix-api-signature: ab8474e609db95d5df3adc39ea3add7a7544bd215c5c520a30a650ae93a2fba7\n\nx-affix-api-origin:  webhooks-employees-webhook\n\nuser-agent:  affixapi.com\n```\n\nBefore trusting the payload, you should sign the payload and verify the\nsignature matches the signature sent by the `affixapi.com` service.\n\nThis secures that the data sent to your `webhook_uri` is from the\n`affixapi.com` server.\n\nThe signature is created by combining the signing secret (your\n`client_secret`) with the body of the request sent using a standard\nHMAC-SHA256 keyed hash.\n\nThe signature can be created via:\n  - create an `HMAC` with your `client_secret`\n  - update the `HMAC` with the payload\n  - get the hex digest -> this is the signature\n\nSample `typescript` code that follows this recipe:\n\n```\nimport { createHmac } from 'crypto';\n\nexport const computeSignature = ({\n  str,\n  signingSecret,\n}: {\n  signingSecret: string;\n  str: string;\n}): string => {\n  const hmac = createHmac('sha256', signingSecret);\n  hmac.update(str);\n  const signature = hmac.digest('hex');\n\n  return signature;\n};\n```\n\nWhile verifying the Affix API signature header should be your primary\nmethod of confirming validity, you can also whitelist our outbound webhook\nstatic IP addresses.\n\n```\ndev:\n  - 52.210.169.82\n  - 52.210.38.77\n  - 3.248.135.204\n\nprod:\n  - 52.51.160.102\n  - 54.220.83.244\n  - 3.254.213.171\n```\n\n## Rate limits\nOpen endpoints (not gated by an API key) (applied at endpoint level):\n  - 15 requests every 1 minute (by IP address)\n  - 25 requests every 5 minutes (by IP address)\n\nGated endpoints (require an API key) (applied at endpoint level):\n  - 40 requests every 1 minute (by IP address)\n  - 40 requests every 5 minutes (by `client_id`)\n\nThings to keep in mind:\n  - Open endpoints (not gated by an API key) will likely be called by your\n    users, not you, so rate limits generally would not apply to you.\n  - As a developer, rate limits are applied at the endpoint granularity.\n    - For example, say the rate limits below are 10 requests per minute by ip.\n      from that same ip, within 1 minute, you get:\n      - 10 requests per minute on `/orders`,\n      - another 10 requests per minute on `/items`,\n      - and another 10 requests per minute on `/identity`,\n      - for a total of 30 requests per minute.\n",
    "contact": {
      "email": "developers@affixapi.com"
    },
    "termsOfService": "https://affixapi.com/terms-and-conditions",
    "x-logo": {
      "uri": "https://media.licdn.com/dms/image/D4E0BAQG0eRUQzmxDjQ/company-logo_100_100/0/1680762091788?e=1698883200&v=beta&t=ITsfWc2YmsMBFBtNdSNMB0kdBTKt-eGHjYeWhxDM6qg",
      "altText": "Affix API logo"
    },
    "version": "2023-03-01"
  },
  "servers": [
    {
      "url": "https://api.affixapi.com",
      "description": "Production server (EU)"
    },
    {
      "url": "https://dev.api.affixapi.com",
      "description": "Development server (EU)"
    }
  ],
  "tags": [
    {
      "name": "Core",
      "description": "Operations related to obtaining core information about the Affix API\nplatform\n"
    },
    {
      "name": "Management",
      "description": "Operations related to obtaining, getting information on, or\ndisconnecting, an access token\n"
    },
    {
      "name": "XHR (Vertically-integrated)",
      "description": "Operations related to retrieving end customer data from a customer's\ncredentials login, for data migrations, or continuous integrations.\n"
    }
  ],
  "paths": {
    "/providers": {
      "get": {
        "x-public": true,
        "x-amazon-apigateway-integration": {
          "type": "mock"
        },
        "operationId": "providers",
        "summary": "Providers",
        "description": "Retrieve the api modes (official, xhr) and providers for the respective modes\n",
        "tags": [
          "Core"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProvidersResponse"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/2023-03-01/management/client": {
      "get": {
        "security": [
          {
            "basic": []
          }
        ],
        "x-public": true,
        "x-amazon-apigateway-integration": {
          "type": "mock"
        },
        "operationId": "client",
        "summary": "Client",
        "description": "View client attributes\n",
        "tags": [
          "Management"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "security": [
          {
            "basic": []
          }
        ],
        "x-public": true,
        "x-amazon-apigateway-integration": {
          "type": "mock"
        },
        "operationId": "updateClient",
        "summary": "Update client",
        "description": "Update attributes of the client.  Update the `name`, `client_secret`, or\n`webhook_uri` of the client\n",
        "tags": [
          "Management"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClientRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationError"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/2023-03-01/management/tokens": {
      "get": {
        "security": [
          {
            "basic": []
          }
        ],
        "x-public": true,
        "x-amazon-apigateway-integration": {
          "type": "mock"
        },
        "operationId": "tokens",
        "summary": "Tokens",
        "description": "View tokens and token status for respective client\n",
        "tags": [
          "Management"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokensResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/2023-03-01/management/token": {
      "post": {
        "x-public": true,
        "x-amazon-apigateway-integration": {
          "type": "mock"
        },
        "operationId": "token",
        "summary": "Create token",
        "description": "Exchange an `authorization_code` for an `access_token` after receiving on from the `redirect_uri` you specifiy after a successful user connection\n",
        "tags": [
          "Management"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TokenRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/2023-03-01/management/introspect": {
      "get": {
        "security": [
          {
            "access-token": []
          }
        ],
        "x-public": true,
        "x-amazon-apigateway-integration": {
          "type": "mock"
        },
        "operationId": "introspect",
        "summary": "Inspect token",
        "description": "Retrieve data about the token, such as `scopes`, `mode`, `provider`, and if it is active\n",
        "tags": [
          "Management"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntrospectResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/2023-03-01/management/disconnect": {
      "post": {
        "security": [
          {
            "access-token": []
          }
        ],
        "x-public": true,
        "x-amazon-apigateway-integration": {
          "type": "mock"
        },
        "operationId": "disconnect",
        "summary": "Disconnect token",
        "description": "Disconnect the token. A disconnected token will no longer return data. Data requests with a disconnected token will return a 403 Forbidden\n",
        "tags": [
          "Management"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DisconnectResponse"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/2023-03-01/xhr/company": {
      "get": {
        "security": [
          {
            "access-token": []
          }
        ],
        "x-public": true,
        "x-amazon-apigateway-integration": {
          "type": "mock"
        },
        "operationId": "xhrCompanies20230301",
        "summary": "Company",
        "description": "Retrieve company information\n",
        "tags": [
          "XHR (Vertically-integrated)",
          "2023-03-01"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Companies20230301Response"
                }
              }
            }
          },
          "202": {
            "$ref": "#/components/responses/Accepted"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          }
        }
      }
    },
    "/2023-03-01/xhr/employees": {
      "get": {
        "security": [
          {
            "access-token": []
          }
        ],
        "x-public": true,
        "x-amazon-apigateway-integration": {
          "type": "mock"
        },
        "operationId": "xhrEmployees20230301",
        "summary": "Employees",
        "description": "List the individuals (employees, contractors, accountants, and others)\nlisted in the HRIS/Payroll software\n",
        "tags": [
          "XHR (Vertically-integrated)",
          "2023-03-01"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "employment_status",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/EmploymentStatusNotNullNotNullable"
            },
            "description": "Optional query parameter. Use to enable server-side filtering of the\n`employment_status` attribute. Will only include individuals with that\nattribute explicitly set (ie if an individuals has a `null`, it will\nnot be returned if this parameter is set)\n"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Employees20230301Response"
                }
              }
            }
          },
          "202": {
            "$ref": "#/components/responses/Accepted"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          }
        }
      }
    },
    "/2023-03-01/xhr/groups": {
      "get": {
        "security": [
          {
            "access-token": []
          }
        ],
        "x-public": true,
        "x-amazon-apigateway-integration": {
          "type": "mock"
        },
        "operationId": "xhrGroups20230301",
        "summary": "Groups",
        "description": "The Group object is used to represent any subset of employees, such as\nPayGroup, Team, or Department. Employees can be in multiple Groups.\n",
        "tags": [
          "XHR (Vertically-integrated)",
          "2023-03-01"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Groups20230301Response"
                }
              }
            }
          },
          "202": {
            "$ref": "#/components/responses/Accepted"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          }
        }
      }
    },
    "/2023-03-01/xhr/identity": {
      "get": {
        "security": [
          {
            "access-token": []
          }
        ],
        "x-public": true,
        "x-amazon-apigateway-integration": {
          "type": "mock"
        },
        "operationId": "xhrIdentity20230301",
        "summary": "Identity",
        "description": "List information of the user for the respective account\n",
        "tags": [
          "XHR (Vertically-integrated)",
          "2023-03-01"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdentityResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/2023-03-01/xhr/payruns": {
      "get": {
        "security": [
          {
            "access-token": []
          }
        ],
        "x-public": true,
        "x-amazon-apigateway-integration": {
          "type": "mock"
        },
        "operationId": "xhrPayruns20230301",
        "summary": "Payruns",
        "description": "List all the pay runs that occurred during the respective period.\n\nSupported integrations:\n  - brain payroll\n  - brightpay connect\n  - deel\n  - gusto\n  - justworks\n  - moorepay\n  - onpay\n  - oyster\n  - parolla.ie\n  - paycircle\n  - payfit\n  - pento.io\n  - quickbooks online\n  - remote.com\n  - sageone\n  - shape payroll\n  - simplepay.ie\n  - staffology\n  - xero uk\n",
        "tags": [
          "XHR (Vertically-integrated)",
          "2023-03-01"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "start_date",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/StartDate"
            },
            "description": "The start date of the search period"
          },
          {
            "in": "query",
            "name": "end_date",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/EndDate"
            },
            "description": "The end date of the search period"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Payruns20230301Response"
                }
              }
            }
          },
          "202": {
            "$ref": "#/components/responses/Accepted"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          }
        }
      }
    },
    "/2023-03-01/xhr/payruns/{payrun_id}": {
      "parameters": [
        {
          "name": "payrun_id",
          "in": "path",
          "required": true,
          "description": "The id of the payrun.",
          "schema": {
            "$ref": "#/components/schemas/string"
          }
        }
      ],
      "get": {
        "security": [
          {
            "access-token": []
          }
        ],
        "x-public": true,
        "x-amazon-apigateway-integration": {
          "type": "mock"
        },
        "operationId": "xhrPayslips20230301",
        "summary": "Payslips",
        "description": "Retrieves payslips from a specific payrun.\n\nSupported integrations:\n  - brain payroll\n  - brightpay connect\n  - deel\n  - gusto\n  - justworks\n  - moorepay\n  - onpay\n  - oyster\n  - parolla.ie\n  - paycircle\n  - payfit\n  - pento.io\n  - quickbooks online\n  - remote.com\n  - sageone\n  - shape payroll\n  - simplepay.ie\n  - staffology\n  - xero uk\n",
        "tags": [
          "XHR (Vertically-integrated)",
          "2023-03-01"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Payslips20230301Response"
                }
              }
            }
          },
          "202": {
            "$ref": "#/components/responses/Accepted"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          }
        }
      }
    },
    "/2023-03-01/xhr/timesheets": {
      "get": {
        "security": [
          {
            "access-token": []
          }
        ],
        "x-public": true,
        "x-amazon-apigateway-integration": {
          "type": "mock"
        },
        "operationId": "xhrTimesheets20230301",
        "summary": "Timesheets",
        "description": "Retrieve Timesheets\n",
        "tags": [
          "XHR (Vertically-integrated)",
          "2023-03-01"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "start_date",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/StartDate"
            },
            "description": "The start date of the search period"
          },
          {
            "in": "query",
            "name": "end_date",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/EndDate"
            },
            "description": "The end date of the search period"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Timesheets20230301Response"
                }
              }
            }
          },
          "202": {
            "$ref": "#/components/responses/Accepted"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          }
        }
      }
    },
    "/2023-03-01/xhr/time-off-entries": {
      "get": {
        "security": [
          {
            "access-token": []
          }
        ],
        "x-public": true,
        "x-amazon-apigateway-integration": {
          "type": "mock"
        },
        "operationId": "xhrTimeOffEntries20230301",
        "summary": "Time off entries",
        "description": "Retrieve time off / absence entries\n",
        "tags": [
          "XHR (Vertically-integrated)",
          "2023-03-01"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "start_date",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/StartDate"
            },
            "description": "The start date of the search period"
          },
          {
            "in": "query",
            "name": "end_date",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/EndDate"
            },
            "description": "The end date of the search period"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeOffEntries20230301Response"
                }
              }
            }
          },
          "202": {
            "$ref": "#/components/responses/Accepted"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          }
        }
      }
    },
    "/2023-03-01/xhr/time-off-balances": {
      "get": {
        "security": [
          {
            "access-token": []
          }
        ],
        "x-public": true,
        "x-amazon-apigateway-integration": {
          "type": "mock"
        },
        "operationId": "xhrTimeOffBalances20230301",
        "summary": "Time off balances",
        "description": "Retrieve all time off balances.\n",
        "tags": [
          "XHR (Vertically-integrated)",
          "2023-03-01"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeOffBalances20230301Response"
                }
              }
            }
          },
          "202": {
            "$ref": "#/components/responses/Accepted"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          }
        }
      }
    },
    "/2023-03-01/xhr/work-locations": {
      "get": {
        "security": [
          {
            "access-token": []
          }
        ],
        "x-public": true,
        "x-amazon-apigateway-integration": {
          "type": "mock"
        },
        "operationId": "xhrWorkLocations20230301",
        "summary": "Work locations",
        "description": "The Location object is used to represent an address that can be associated\nwith an employee\n",
        "tags": [
          "XHR (Vertically-integrated)",
          "2023-03-01"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkLocations20230301Response"
                }
              }
            }
          },
          "202": {
            "$ref": "#/components/responses/Accepted"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "access-token": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header",
        "description": "Token HTTP authentication. Allowed headers-- Authorization: Bearer\n```shell\n  Authorization: Bearer {TOKEN}\n```\n"
      },
      "basic": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header",
        "description": "Basic HTTP authentication. Base64 of `client_id:client_secret`. Since there can be many `client_secret` values, any current `client_secret` sufficies\nAllowed headers-- Authorization: Basic\n```shell\n  Authorization: Basic ZGVtbzpwQDU1dzByZA==\n```\n"
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Bad Request",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                },
                "validation_error": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "TooManyRequests": {
        "description": "Rate Limited / Too Many Requests",
        "headers": {
          "Retry-After": {
            "schema": {
              "type": "integer"
            },
            "description": "Retry your call after the specified amount of seconds"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/MessageResponse"
            }
          }
        }
      },
      "InternalServerError": {
        "description": "Server Error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/MessageResponse"
            }
          }
        }
      },
      "ServiceUnavailable": {
        "description": "Service Unavailable (retry your request after a short period)",
        "headers": {
          "Retry-After": {
            "schema": {
              "type": "integer"
            },
            "description": "Retry your call after the specified amount of seconds"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/MessageResponse"
            }
          }
        }
      },
      "AuthenticationError": {
        "description": "Authentication Error",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "code",
                "error",
                "message"
              ],
              "properties": {
                "error": {
                  "type": "string",
                  "description": "The type of error",
                  "enum": [
                    "authentication_error"
                  ]
                },
                "message": {
                  "type": "string",
                  "description": "A descriptive description of the error\n",
                  "example": "Your password is incorrect"
                },
                "code": {
                  "type": "string",
                  "enum": [
                    "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",
                    "insufficient_permission // not enough privileges (ie not an admin, or not enough provider scopes on a provider api token for the Affix scopes requested)"
                  ]
                }
              }
            }
          }
        }
      },
      "Conflict": {
        "description": "Not Found",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "error"
              ],
              "properties": {
                "code": {
                  "type": "string",
                  "description": "The authorization code insert that caused a conflict\n"
                },
                "token": {
                  "type": "string",
                  "description": "The access token insert that caused a conflict\n"
                },
                "error": {
                  "type": "string",
                  "enum": [
                    "conflict"
                  ],
                  "description": "The description of the type of error, ie conflict of two requests of the the same authorization code\n"
                }
              }
            }
          }
        }
      },
      "NotImplemented": {
        "description": "Not Implemented",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/MessageResponse"
            }
          }
        }
      },
      "NotFound": {
        "description": "Not Found",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/IdAndMessageResponse"
            }
          }
        }
      },
      "Forbidden": {
        "description": "Forbidden",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/MessageResponse"
            }
          }
        }
      },
      "Accepted": {
        "description": "Accepted + pending (async job started)",
        "headers": {
          "Retry-After": {
            "schema": {
              "type": "integer"
            },
            "description": "Retry your call after the specified amount of seconds"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/MessageResponse"
            }
          }
        }
      }
    },
    "schemas": {
      "EmploymentStatusNotNullNotNullable": {
        "type": "string",
        "example": "active",
        "enum": [
          "active",
          "inactive",
          "pending",
          "leave"
        ]
      },
      "StartDate": {
        "type": "string",
        "format": "date",
        "example": "2021-01-01"
      },
      "EndDate": {
        "type": "string",
        "format": "date",
        "example": "2021-12-31"
      },
      "string": {
        "type": "string"
      },
      "ScopesRequest": {
        "type": "string",
        "enum": [
          "/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",
          "/2023-03-01/xhr/work-locations"
        ]
      },
      "ModeRequest": {
        "type": "string",
        "enum": [
          "official",
          "xhr"
        ]
      },
      "MessageResponse": {
        "type": "object",
        "required": [
          "message"
        ],
        "properties": {
          "message": {
            "type": "string"
          }
        }
      },
      "ProviderRequest": {
        "type": "string",
        "enum": [
          "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",
          "buk",
          "employment hero",
          "epe",
          "factorialhr",
          "fourthhr",
          "greythr",
          "gusto",
          "itrent",
          "justworks",
          "keypay",
          "kontek.se",
          "onpay",
          "oysterhr",
          "paycircle",
          "pento.io",
          "peoplehr",
          "quickbooks online",
          "remote.com",
          "runa",
          "sageone",
          "shape payroll",
          "simplepay.ie",
          "sunfish",
          "talenox",
          "talentoz",
          "unity",
          "zenergy",
          "zoho",
          "zucchetti"
        ]
      },
      "ModeResponse": {
        "type": "string",
        "enum": [
          "official",
          "xhr"
        ]
      },
      "ProviderResponse": {
        "type": "string",
        "enum": [
          "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",
          "buk",
          "employment hero",
          "epe",
          "factorialhr",
          "fourthhr",
          "greythr",
          "gusto",
          "itrent",
          "justworks",
          "keypay",
          "kontek.se",
          "onpay",
          "oysterhr",
          "paycircle",
          "pento.io",
          "peoplehr",
          "quickbooks online",
          "remote.com",
          "runa",
          "sageone",
          "shape payroll",
          "simplepay.ie",
          "sunfish",
          "talenox",
          "talentoz",
          "unity",
          "zenergy",
          "zoho",
          "zucchetti"
        ]
      },
      "ProvidersResponse": {
        "type": "array",
        "example": [
          {
            "mode": "official",
            "providers": [
              "bamboohr",
              "breathe",
              "cezanne",
              "charliehr",
              "deel",
              "deputy",
              "employment hero",
              "factorialhr",
              "hailyhr",
              "hibob",
              "humaans",
              "iris cascade",
              "moorepay",
              "oysterhr",
              "parolla.ie",
              "payfit",
              "peoplehr",
              "personio.de",
              "planday",
              "remote.com",
              "sagehr",
              "saplinghr",
              "simplepay.ie",
              "staffology",
              "xero uk"
            ]
          },
          {
            "mode": "xhr",
            "providers": [
              "bamboohr",
              "brightpay connect",
              "buk",
              "deel",
              "deputy",
              "employment hero",
              "epe",
              "factorialhr",
              "fourthhr",
              "greythr",
              "gusto",
              "hibob",
              "itrent",
              "justworks",
              "keypay",
              "kontek.se",
              "moorepay",
              "nmbrs",
              "onpay",
              "oysterhr",
              "parolla.ie",
              "pento.io",
              "peoplehr",
              "personio.de",
              "quickbooks online",
              "remote.com",
              "runa",
              "sageone",
              "shape payroll",
              "simplepay.ie",
              "sunfish",
              "talenox",
              "talentoz",
              "unity",
              "xero uk",
              "zenergy",
              "zoho",
              "zucchetti"
            ]
          }
        ],
        "items": {
          "type": "object",
          "required": [
            "mode",
            "providers"
          ],
          "properties": {
            "mode": {
              "type": "string",
              "example": "xhr",
              "$ref": "#/components/schemas/ModeResponse"
            },
            "providers": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/ProviderResponse"
              }
            }
          }
        }
      },
      "ClientResponse": {
        "type": "object",
        "required": [
          "client_id",
          "client_secret",
          "name",
          "redirect_uris"
        ],
        "properties": {
          "client_id": {
            "readOnly": true,
            "description": "The client ID you received when you first created the application",
            "example": "00000000-00000000-00000000-00000000",
            "type": "string"
          },
          "client_secret": {
            "description": "The client secret(s). It is an array datatype to allow for rotation\nof secrets without downtime for your customers\n",
            "example": [
              "ffffffff-ffffffff-ffffffff-ffffffff",
              "aaaaaaaa-aaaaaaaa-aaaaaaaa-aaaaaaaa"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "redirect_uris": {
            "description": "Indicates the URI to return the user to after authorization is\ncomplete, which is the endpoint on your server to receive the\nauthorization_code.\n\nMust be identical to the redirect URI provided in the original link.\n\nPlease email me after signup and I will set both your client secret\nand redirect_uri (required) when you reach out.\n",
            "example": [
              "https://app.your-company.com",
              "https://dev.app.your-company.com"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "name": {
            "description": "Name of your app that shows up in the Affix Connect application\n",
            "type": "string",
            "example": "Your App"
          },
          "webhook_uri": {
            "description": "If enabled, webhooks will be sent to this endpoint\n",
            "type": "string",
            "example": "https://webhooks.your-company.com/aaaaaaaa-aaaaaaaa-aaaaaaaa-aaaaaaaa",
            "nullable": true
          }
        }
      },
      "ClientRequest": {
        "type": "object",
        "required": [
          "client_secret",
          "name",
          "redirect_uris"
        ],
        "properties": {
          "client_secret": {
            "description": "The client secret(s). It is an array datatype to allow for rotation\nof secrets without downtime for your customers\n",
            "example": [
              "ffffffff-ffffffff-ffffffff-ffffffff",
              "aaaaaaaa-aaaaaaaa-aaaaaaaa-aaaaaaaa"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "redirect_uris": {
            "description": "Indicates the URI to return the user to after authorization is\ncomplete, which is the endpoint on your server to receive the\nauthorization_code.\n\nMust be identical to the redirect URI provided in the original link.\n\nPlease email me after signup and I will set both your client secret\nand redirect_uri (required) when you reach out.\n",
            "example": [
              "https://app.your-company.com",
              "https://dev.app.your-company.com"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "name": {
            "description": "Name of your app that shows up in the Affix Connect application\n",
            "type": "string",
            "example": "Your App"
          },
          "webhook_uri": {
            "description": "If enabled, webhooks will be sent to this endpoint\n",
            "type": "string",
            "example": "https://webhooks.your-company.com/aaaaaaaa-aaaaaaaa-aaaaaaaa-aaaaaaaa",
            "nullable": true
          }
        }
      },
      "ScopesResponse": {
        "type": "string",
        "enum": [
          "/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",
          "/2023-03-01/xhr/work-locations"
        ]
      },
      "TokensResponse": {
        "type": "array",
        "items": {
          "type": "object",
          "required": [
            "token",
            "scopes",
            "mode",
            "provider",
            "valid"
          ],
          "properties": {
            "token": {
              "description": "The client ID you received when you first created the application",
              "example": "00000000-00000000-00000000-00000000",
              "type": "string"
            },
            "scopes": {
              "readOnly": true,
              "description": "One or more scope values indicating which parts of the user's account\nyou wish to access.\n\nNote, slight deviation from the OAuth 2.1 spec in that the param is\nscopes (plural) is used vs scope (singular)\n",
              "example": [
                "/2023-03-01/payroll/employees",
                "/2023-03-01/payroll/identity",
                "/2023-03-01/payroll/payruns",
                "/2023-03-01/payroll/payruns/:payrun_id"
              ],
              "type": "array",
              "items": {
                "type": "string",
                "$ref": "#/components/schemas/ScopesResponse"
              }
            },
            "created_at": {
              "description": "When the token was created (`/token` invocation)\n",
              "type": "string",
              "format": "date-time",
              "example": "2023-08-09T08:09:40.724Z"
            },
            "mode": {
              "description": "The Affix API integration mode",
              "example": "payroll",
              "$ref": "#/components/schemas/ModeResponse"
            },
            "provider": {
              "description": "The provider of the user's account you wish to access",
              "example": "oysterhr",
              "$ref": "#/components/schemas/ProviderResponse"
            },
            "valid": {
              "description": "if the token is valid or not",
              "example": true,
              "type": "boolean"
            }
          }
        }
      },
      "IdAndMessageResponse": {
        "type": "object",
        "required": [
          "message",
          "id"
        ],
        "properties": {
          "message": {
            "type": "string",
            "description": "A description of the error"
          },
          "id": {
            "type": "string",
            "description": "The id of the entity that the id applies. For example, the transaction id"
          }
        }
      },
      "TokenRequest": {
        "type": "object",
        "required": [
          "client_id",
          "client_secret",
          "grant_type",
          "redirect_uri",
          "code"
        ],
        "properties": {
          "client_id": {
            "writeOnly": true,
            "description": "The client ID you received when you first created the application",
            "example": "00000000-00000000-00000000-00000000",
            "type": "string"
          },
          "client_secret": {
            "writeOnly": true,
            "description": "The client secret. Since there can be multiple `client_secret`s\n(to allow for rotation of secrets without downtime to your\ncustomers), any current `client_secret` is valid\n\nPlease email me after signup and I will set both your client secret\nand redirect_uri (required) when you reach out.\n",
            "example": "ffffffff-ffffffff-ffffffff-ffffffff",
            "type": "string"
          },
          "grant_type": {
            "writeOnly": true,
            "description": "This is a hardcoded value required by the OAuth 2.1 spec",
            "example": "authorization_code",
            "type": "string",
            "enum": [
              "authorization_code"
            ]
          },
          "code": {
            "writeOnly": true,
            "description": "This is the code you received in the query string",
            "example": "Y2xpZW50IzkzMTU4MGQwLWYwYjctNGJiOC1iYmZmLWI4MTNlYzMxNTVjYXxjb2RlIzE1MmIwYjk3LTg2ZWMtNDZlNC1hZDUyLWY5ZTAxNzE2MDIwNAo=",
            "type": "string"
          },
          "redirect_uri": {
            "writeOnly": true,
            "description": "Indicates the URI to return the user to after authorization is\ncomplete, which is the endpoint on your server to receive the\nauthorization_code.\n\nMust be identical to the redirect URI provided in the original link.\n\nPlease email me after signup and I will set both your client secret\nand redirect_uri (required) when you reach out.\n",
            "example": "https://example.com",
            "type": "string"
          }
        }
      },
      "TokenResponse": {
        "type": "object",
        "required": [
          "access_token",
          "scopes",
          "token_type",
          "mode",
          "provider"
        ],
        "properties": {
          "access_token": {
            "readOnly": true,
            "description": "The issued access_token",
            "example": "Y2xpZW50IzkzMTU4MGQwLWYwYjctNGJiOC1iYmZmLWI4MTNlYzMxNTVjYXx0b2tlbiM4ZDY5NzMwZi1kNzI1LTQ1ZjYtYTVlOC1mZmQ0NWE3ZjhkNDE=",
            "type": "string"
          },
          "mode": {
            "readOnly": true,
            "description": "The Affix API integration mode",
            "example": "payroll",
            "$ref": "#/components/schemas/ModeResponse"
          },
          "provider": {
            "readOnly": true,
            "description": "The provider of the user's account you wish to access",
            "example": "oysterhr",
            "$ref": "#/components/schemas/ProviderResponse"
          },
          "scopes": {
            "readOnly": true,
            "description": "One or more scope values indicating which parts of the user's account\nyou wish to access.\n\nNote, slight deviation from the OAuth 2.1 spec in that the param is\nscopes (plural) is used vs scope (singular)\n",
            "example": [
              "identity",
              "census"
            ],
            "type": "array",
            "items": {
              "type": "string",
              "$ref": "#/components/schemas/ScopesResponse"
            }
          },
          "token_type": {
            "readOnly": true,
            "description": "The token type to pass in the `Authorization` header",
            "example": "Bearer",
            "type": "string",
            "enum": [
              "Bearer"
            ]
          }
        }
      },
      "IntrospectResponse": {
        "type": "object",
        "required": [
          "client_id",
          "provider",
          "mode",
          "scopes"
        ],
        "properties": {
          "client_id": {
            "readOnly": true,
            "description": "The client ID you received when you first created the application",
            "example": "00000000-00000000-00000000-00000000",
            "type": "string"
          },
          "mode": {
            "readOnly": true,
            "description": "The Affix API integration mode",
            "example": "payroll-employer",
            "$ref": "#/components/schemas/ModeResponse"
          },
          "provider": {
            "readOnly": true,
            "description": "The provider of the user's account you wish to access",
            "example": "oysterhr",
            "$ref": "#/components/schemas/ProviderResponse"
          },
          "scopes": {
            "readOnly": true,
            "description": "One or more scope values indicating which parts of the user's account\nyou wish to access.\n\nNote, slight deviation from the OAuth 2.1 spec in that the param is\nscopes (plural) is used vs scope (singular)\n",
            "example": [
              "identity",
              "census"
            ],
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScopesResponse"
            }
          }
        }
      },
      "DisconnectResponse": {
        "type": "object",
        "required": [
          "disconnected"
        ],
        "properties": {
          "disconnected": {
            "readOnly": true,
            "description": "The access token has been disconnected and is no longer allowed to be used by your application",
            "example": true,
            "type": "boolean",
            "enum": [
              true
            ]
          }
        }
      },
      "addressResponse": {
        "type": "object",
        "nullable": true,
        "required": [
          "street_address",
          "locality",
          "administrative_area",
          "country",
          "post_code"
        ],
        "properties": {
          "street_address": {
            "example": "221 S Main Street",
            "nullable": true,
            "type": "string"
          },
          "locality": {
            "example": "Yuma",
            "nullable": true,
            "type": "string"
          },
          "administrative_area": {
            "example": "AZ",
            "description": "The administrative area of the address. If US or CA, the two-letter\nstate or province abbreviation. Else, the province /\nadministrative area; such as, `Dublin 2` or `County Cork`\n",
            "nullable": true,
            "type": "string"
          },
          "country": {
            "description": "The ISO-3166-2 two-letter abbreviation of the country.\nReference https://en.wikipedia.org/wiki/ISO_3166-2 for more details\n",
            "example": "IE",
            "nullable": true,
            "type": "string",
            "enum": [
              null,
              "BZ",
              "CA",
              "CR",
              "GT",
              "MX",
              "PA",
              "SV",
              "US",
              "AR",
              "BR",
              "CL",
              "CO",
              "PE",
              "AT",
              "BE",
              "CH",
              "CY",
              "CZ",
              "DE",
              "DK",
              "EE",
              "ES",
              "FI",
              "FR",
              "GB",
              "GR",
              "IE",
              "IM",
              "IS",
              "IT",
              "LI",
              "LT",
              "LU",
              "LV",
              "MK",
              "NL",
              "NO",
              "PL",
              "PT",
              "RO",
              "RU",
              "SE",
              "SK",
              "BD",
              "CN",
              "HK",
              "ID",
              "IL",
              "IN",
              "JP",
              "KR",
              "KZ",
              "MO",
              "MY",
              "PH",
              "PK",
              "PS",
              "SA",
              "SG",
              "TH",
              "TJ",
              "TM",
              "TR",
              "TW",
              "VN",
              "ZA",
              "AU",
              "NZ"
            ]
          },
          "post_code": {
            "example": "30691",
            "nullable": true,
            "type": "string"
          }
        }
      },
      "CompanyResponse": {
        "type": "object",
        "required": [
          "id",
          "remote_id",
          "legal_name",
          "display_name",
          "tax_id",
          "address"
        ],
        "properties": {
          "id": {
            "description": "The Affix-assigned id of the abscence",
            "example": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
            "type": "string",
            "nullable": true
          },
          "remote_id": {
            "description": "the remote system-assigned id of the abscence",
            "example": "19202938",
            "type": "string",
            "nullable": true
          },
          "legal_name": {
            "type": "string",
            "nullable": true,
            "example": "Affix"
          },
          "display_name": {
            "type": "string",
            "nullable": true,
            "example": "Affix API Limited"
          },
          "tax_id": {
            "type": "string",
            "nullable": true,
            "example": "12-3456789"
          },
          "address": {
            "$ref": "#/components/schemas/addressResponse"
          }
        }
      },
      "Companies20230301Response": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/CompanyResponse"
        }
      },
      "employment-status-not-nullRequest": {
        "type": "string",
        "nullable": true,
        "example": "active",
        "enum": [
          "active",
          "inactive",
          "pending",
          "leave"
        ]
      },
      "address-no-non-nullRequest": {
        "type": "object",
        "nullable": true,
        "required": [
          "street_address",
          "locality",
          "administrative_area",
          "country",
          "post_code"
        ],
        "properties": {
          "street_address": {
            "example": "221 S Main Street",
            "nullable": true,
            "type": "string"
          },
          "locality": {
            "example": "Yuma",
            "nullable": true,
            "type": "string"
          },
          "administrative_area": {
            "example": "AZ",
            "description": "The administrative area of the address. If US or CA, the two-letter\nstate or province abbreviation. Else, the province /\nadministrative area; such as, `Dublin 2` or `County Cork`\n",
            "nullable": true,
            "type": "string"
          },
          "country": {
            "description": "The ISO-3166-2 two-letter abbreviation of the country.\nReference https://en.wikipedia.org/wiki/ISO_3166-2 for more details\n",
            "example": "IE",
            "nullable": true,
            "type": "string",
            "enum": [
              "BZ",
              "CA",
              "CR",
              "GT",
              "MX",
              "PA",
              "SV",
              "US",
              "AR",
              "BR",
              "CL",
              "CO",
              "PE",
              "AT",
              "BE",
              "CH",
              "CY",
              "CZ",
              "DE",
              "DK",
              "EE",
              "ES",
              "FI",
              "FR",
              "GB",
              "GR",
              "IE",
              "IM",
              "IS",
              "IT",
              "LI",
              "LT",
              "LU",
              "LV",
              "MK",
              "NL",
              "NO",
              "PL",
              "PT",
              "RO",
              "RU",
              "SE",
              "SK",
              "BD",
              "CN",
              "HK",
              "ID",
              "IL",
              "IN",
              "JP",
              "KR",
              "KZ",
              "MO",
              "MY",
              "PH",
              "PK",
              "PS",
              "SA",
              "SG",
              "TH",
              "TJ",
              "TM",
              "TR",
              "TW",
              "VN",
              "ZA",
              "AU",
              "NZ"
            ]
          },
          "post_code": {
            "example": "30691",
            "nullable": true,
            "type": "string"
          }
        }
      },
      "location-no-non-nullRequest": {
        "type": "object",
        "nullable": true,
        "required": [
          "id",
          "remote_id",
          "type",
          "name",
          "address"
        ],
        "properties": {
          "id": {
            "description": "The Affix-assigned id of the individual",
            "example": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
            "type": "string",
            "nullable": true
          },
          "remote_id": {
            "description": "the remote system-assigned id of the individual",
            "example": "19202938",
            "type": "string",
            "nullable": true
          },
          "name": {
            "description": "System assigned description of the location",
            "example": "NYC Office",
            "type": "string",
            "nullable": true
          },
          "type": {
            "example": "office",
            "description": "The location's type. In cases where there is no clear mapping, the\noriginal value passed through will be returned.\n",
            "type": "string",
            "nullable": true
          },
          "address": {
            "$ref": "#/components/schemas/address-no-non-nullRequest"
          }
        }
      },
      "employment-history-no-non-nullRequest": {
        "type": "object",
        "required": [
          "job_title",
          "effective_date",
          "group_id",
          "group_remote_id",
          "group_name",
          "manager_id",
          "manager_remote_id"
        ],
        "properties": {
          "job_title": {
            "example": "Software Developer",
            "type": "string"
          },
          "effective_date": {
            "example": "2020-10-11",
            "type": "string",
            "format": "date"
          },
          "group_id": {
            "example": "4B9bKBpX5tnwjiG93TAqF7ci",
            "nullable": true,
            "type": "string"
          },
          "group_remote_id": {
            "example": "49",
            "nullable": true,
            "type": "string"
          },
          "group_name": {
            "example": "Engineering",
            "nullable": true,
            "type": "string"
          },
          "manager_id": {
            "type": "string",
            "nullable": true
          },
          "manager_remote_id": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "currency-not-nullRequest": {
        "type": "string",
        "example": "eur",
        "nullable": true,
        "enum": [
          "usd",
          "gbp",
          "eur",
          "sek",
          "cad"
        ]
      },
      "compensation-history-no-non-nullRequest": {
        "type": "object",
        "required": [
          "pay_rate",
          "pay_period",
          "pay_frequency",
          "employment_type",
          "currency",
          "effective_date",
          "notes"
        ],
        "properties": {
          "pay_rate": {
            "example": 85000,
            "type": "number"
          },
          "pay_period": {
            "example": "year",
            "type": "string"
          },
          "pay_frequency": {
            "example": "semimonthly",
            "type": "string",
            "enum": [
              "year",
              "weekly",
              "biweekly",
              "semimonthly",
              "monthly",
              "other"
            ]
          },
          "employment_type": {
            "example": "full_time",
            "type": "string",
            "enum": [
              "full_time",
              "part_time",
              "contractor",
              "other"
            ]
          },
          "currency": {
            "example": "eur",
            "$ref": "#/components/schemas/currency-not-nullRequest"
          },
          "effective_date": {
            "example": "2020-10-11",
            "type": "string",
            "format": "date"
          },
          "notes": {
            "example": "Salary Adjustment",
            "type": "string"
          }
        }
      },
      "group-no-null-enumRequest": {
        "type": "object",
        "example": {
          "id": "4B9bKBpX5tnwjiG93TAqF7ci",
          "remote_id": "df6c28e8",
          "name": "backend",
          "type": "team"
        },
        "required": [
          "id",
          "remote_id",
          "name",
          "type"
        ],
        "properties": {
          "id": {
            "example": "4B9bKBpX5tnwjiG93TAqF7ci",
            "nullable": true,
            "type": "string"
          },
          "remote_id": {
            "example": "49",
            "nullable": true,
            "type": "string"
          },
          "name": {
            "example": "Customer Success",
            "nullable": true,
            "type": "string"
          },
          "type": {
            "example": "TEAM",
            "nullable": true,
            "type": "string",
            "enum": [
              "department",
              "team",
              "cost_centre",
              "pay_group"
            ]
          }
        }
      },
      "groups-no-null-enumRequest": {
        "type": "array",
        "nullable": true,
        "example": [
          {
            "id": "4B9bKBpX5tnwjiG93TAqF7ci",
            "remote_id": "df6c28e8",
            "name": "backend",
            "type": "team"
          },
          {
            "id": "132Xpnw2a38aaQG93TAqF7ci",
            "remote_id": "355c65922637",
            "name": "engineering",
            "type": "department"
          }
        ],
        "items": {
          "$ref": "#/components/schemas/group-no-null-enumRequest"
        }
      },
      "CreateEmployeeRequest": {
        "type": "object",
        "required": [
          "first_name",
          "last_name"
        ],
        "properties": {
          "employee_number": {
            "nullable": true,
            "example": "2",
            "type": "string"
          },
          "first_name": {
            "description": "the first name of the individual",
            "example": "Greg",
            "type": "string"
          },
          "last_name": {
            "description": "the last name of the individual",
            "example": "Hirsch",
            "type": "string"
          },
          "display_full_name": {
            "example": "Hirsch",
            "nullable": true,
            "type": "string"
          },
          "nationality": {
            "example": "Irish",
            "nullable": true,
            "type": "string"
          },
          "job_title": {
            "example": "Software developer",
            "nullable": true,
            "type": "string"
          },
          "work_email": {
            "description": "the work email of the individual",
            "example": "greg@affixapi.com",
            "nullable": true,
            "type": "string"
          },
          "personal_email": {
            "description": "the personal email of the individual",
            "example": "greg@gmail.com",
            "nullable": true,
            "type": "string"
          },
          "mobile_phone_number": {
            "description": "+1234567890",
            "example": "Hirsch",
            "nullable": true,
            "type": "string"
          },
          "tax_id": {
            "example": "1234567890",
            "nullable": true,
            "type": "string"
          },
          "gender": {
            "example": "male",
            "nullable": true,
            "type": "string",
            "enum": [
              "male",
              "female",
              "not_specified"
            ]
          },
          "ethnicity": {
            "nullable": true,
            "example": "white",
            "type": "string",
            "enum": [
              "asian",
              "black",
              "hispanic",
              "mixed",
              "not_specified",
              "other",
              "white"
            ]
          },
          "marital_status": {
            "nullable": true,
            "example": "single",
            "type": "string",
            "description": "`other` option can include co-habitating, civil partnership,\nseparated, widowed, etc\n",
            "enum": [
              "single",
              "married",
              "divorced",
              "not_specified",
              "other"
            ]
          },
          "date_of_birth": {
            "example": "1990-11-10",
            "nullable": true,
            "type": "string",
            "format": "date"
          },
          "employment_status": {
            "$ref": "#/components/schemas/employment-status-not-nullRequest"
          },
          "employment_type": {
            "nullable": true,
            "example": "full_time",
            "type": "string",
            "enum": [
              "full_time",
              "part_time",
              "contractor",
              "other"
            ]
          },
          "start_date": {
            "example": "2020-10-11",
            "nullable": true,
            "type": "string",
            "format": "date"
          },
          "termination_date": {
            "example": "2021-10-12",
            "nullable": true,
            "type": "string",
            "format": "date"
          },
          "avatar": {
            "example": "http://alturl.com/h2h8m",
            "nullable": true,
            "type": "string"
          },
          "home_location": {
            "$ref": "#/components/schemas/address-no-non-nullRequest"
          },
          "work_location": {
            "$ref": "#/components/schemas/location-no-non-nullRequest"
          },
          "manager": {
            "nullable": true,
            "type": "object",
            "required": [
              "first_name",
              "last_name",
              "id",
              "work_email",
              "remote_id"
            ],
            "properties": {
              "first_name": {
                "nullable": true,
                "type": "string"
              },
              "last_name": {
                "nullable": true,
                "type": "string"
              },
              "id": {
                "type": "string"
              },
              "work_email": {
                "nullable": true,
                "type": "string"
              },
              "remote_id": {
                "nullable": true,
                "type": "string"
              }
            }
          },
          "bank_account": {
            "nullable": true,
            "type": "object",
            "required": [
              "account_number",
              "bank_name",
              "bic",
              "holder_name",
              "iban"
            ],
            "properties": {
              "account_number": {
                "nullable": true,
                "type": "string"
              },
              "bank_name": {
                "nullable": true,
                "type": "string"
              },
              "bic": {
                "nullable": true,
                "type": "string"
              },
              "holder_name": {
                "nullable": true,
                "type": "string"
              },
              "iban": {
                "nullable": true,
                "type": "string"
              }
            }
          },
          "employment_history": {
            "nullable": true,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/employment-history-no-non-nullRequest"
            }
          },
          "compensation_history": {
            "nullable": true,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/compensation-history-no-non-nullRequest"
            }
          },
          "custom_fields": {
            "nullable": true,
            "type": "object",
            "example": {
              "t_shirt_size": "medium"
            }
          },
          "groups": {
            "$ref": "#/components/schemas/groups-no-null-enumRequest"
          },
          "dependents": {
            "nullable": true,
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "name",
                "relationship"
              ],
              "properties": {
                "name": {
                  "nullable": true,
                  "type": "string"
                },
                "relationship": {
                  "nullable": true,
                  "type": "string"
                }
              }
            }
          },
          "emergency_contacts": {
            "nullable": true,
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "first_name",
                "last_name",
                "relationship",
                "mobile_phone_number",
                "primary_contact"
              ],
              "properties": {
                "first_name": {
                  "nullable": true,
                  "type": "string"
                },
                "last_name": {
                  "nullable": true,
                  "type": "string"
                },
                "relationship": {
                  "nullable": true,
                  "type": "string"
                },
                "mobile_phone_number": {
                  "nullable": true,
                  "type": "string"
                },
                "primary_contact": {
                  "nullable": true,
                  "type": "boolean"
                }
              }
            }
          }
        }
      },
      "employment-statusResponse": {
        "type": "string",
        "nullable": true,
        "example": "active",
        "enum": [
          null,
          "active",
          "inactive",
          "pending",
          "leave"
        ]
      },
      "locationResponse": {
        "type": "object",
        "nullable": true,
        "required": [
          "id",
          "remote_id",
          "type",
          "name",
          "address"
        ],
        "properties": {
          "id": {
            "description": "The Affix-assigned id of the individual",
            "example": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
            "type": "string",
            "nullable": true
          },
          "remote_id": {
            "description": "the remote system-assigned id of the individual",
            "example": "19202938",
            "type": "string",
            "nullable": true
          },
          "name": {
            "description": "System assigned description of the location",
            "example": "NYC Office",
            "type": "string",
            "nullable": true
          },
          "type": {
            "example": "office",
            "description": "The location's type. In cases where there is no clear mapping, the\noriginal value passed through will be returned.\n",
            "type": "string",
            "nullable": true
          },
          "address": {
            "$ref": "#/components/schemas/addressResponse"
          }
        }
      },
      "employment-historyResponse": {
        "type": "object",
        "required": [
          "job_title",
          "effective_date",
          "group_id",
          "group_remote_id",
          "group_name",
          "manager_id",
          "manager_remote_id"
        ],
        "properties": {
          "job_title": {
            "example": "Software Developer",
            "nullable": true,
            "type": "string"
          },
          "effective_date": {
            "example": "2020-10-11",
            "nullable": true,
            "type": "string",
            "format": "date"
          },
          "group_id": {
            "example": "4B9bKBpX5tnwjiG93TAqF7ci",
            "nullable": true,
            "type": "string"
          },
          "group_remote_id": {
            "example": "49",
            "nullable": true,
            "type": "string"
          },
          "group_name": {
            "example": "Engineering",
            "nullable": true,
            "type": "string"
          },
          "manager_id": {
            "type": "string",
            "nullable": true
          },
          "manager_remote_id": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "CurrencyResponse": {
        "type": "string",
        "example": "eur",
        "nullable": true,
        "enum": [
          null,
          "usd",
          "gbp",
          "eur",
          "sek",
          "cad"
        ]
      },
      "compensation-historyResponse": {
        "type": "object",
        "required": [
          "pay_rate",
          "pay_period",
          "pay_frequency",
          "employment_type",
          "currency",
          "effective_date",
          "notes"
        ],
        "properties": {
          "pay_rate": {
            "example": 85000,
            "nullable": true,
            "type": "number"
          },
          "pay_period": {
            "example": "year",
            "nullable": true,
            "type": "string"
          },
          "pay_frequency": {
            "example": "semimonthly",
            "nullable": true,
            "type": "string",
            "enum": [
              "year",
              "weekly",
              "biweekly",
              "semimonthly",
              "monthly",
              "other",
              null
            ]
          },
          "employment_type": {
            "example": "full_time",
            "nullable": true,
            "type": "string",
            "enum": [
              "full_time",
              "part_time",
              "contractor",
              "other",
              null
            ]
          },
          "currency": {
            "example": "eur",
            "$ref": "#/components/schemas/CurrencyResponse"
          },
          "effective_date": {
            "example": "2020-10-11",
            "nullable": true,
            "type": "string",
            "format": "date"
          },
          "notes": {
            "example": "Salary Adjustment",
            "nullable": true,
            "type": "string"
          }
        }
      },
      "groupResponse": {
        "type": "object",
        "example": {
          "id": "4B9bKBpX5tnwjiG93TAqF7ci",
          "remote_id": "df6c28e8",
          "name": "backend",
          "type": "team"
        },
        "required": [
          "id",
          "remote_id",
          "name",
          "type"
        ],
        "properties": {
          "id": {
            "example": "4B9bKBpX5tnwjiG93TAqF7ci",
            "nullable": true,
            "type": "string"
          },
          "remote_id": {
            "example": "49",
            "nullable": true,
            "type": "string"
          },
          "name": {
            "example": "Customer Success",
            "nullable": true,
            "type": "string"
          },
          "type": {
            "example": "TEAM",
            "nullable": true,
            "type": "string",
            "enum": [
              null,
              "department",
              "team",
              "cost_centre",
              "pay_group"
            ]
          }
        }
      },
      "Groups20230301Response": {
        "type": "array",
        "nullable": true,
        "example": [
          {
            "id": "4B9bKBpX5tnwjiG93TAqF7ci",
            "remote_id": "df6c28e8",
            "name": "backend",
            "type": "team"
          },
          {
            "id": "132Xpnw2a38aaQG93TAqF7ci",
            "remote_id": "355c65922637",
            "name": "engineering",
            "type": "department"
          }
        ],
        "items": {
          "$ref": "#/components/schemas/groupResponse"
        }
      },
      "EmployeeResponse": {
        "type": "object",
        "required": [
          "id",
          "remote_id",
          "employee_number",
          "first_name",
          "last_name",
          "display_full_name",
          "nationality",
          "job_title",
          "work_email",
          "personal_email",
          "mobile_phone_number",
          "tax_id",
          "gender",
          "ethnicity",
          "marital_status",
          "date_of_birth",
          "employment_status",
          "employment_type",
          "start_date",
          "remote_created_at",
          "termination_date",
          "avatar",
          "home_location",
          "work_location",
          "manager",
          "bank_account",
          "employment_history",
          "compensation_history",
          "custom_fields",
          "groups",
          "dependents",
          "emergency_contacts"
        ],
        "properties": {
          "id": {
            "description": "The Affix-assigned id of the individual",
            "example": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
            "type": "string",
            "readOnly": true
          },
          "remote_id": {
            "description": "the remote system-assigned id of the individual",
            "example": "19202938",
            "type": "string",
            "readOnly": true
          },
          "employee_number": {
            "nullable": true,
            "example": "2",
            "type": "string"
          },
          "first_name": {
            "description": "the first name of the individual",
            "example": "Greg",
            "type": "string"
          },
          "last_name": {
            "description": "the last name of the individual",
            "example": "Hirsch",
            "type": "string"
          },
          "display_full_name": {
            "example": "Hirsch",
            "nullable": true,
            "type": "string"
          },
          "nationality": {
            "example": "Irish",
            "nullable": true,
            "type": "string"
          },
          "job_title": {
            "example": "Software developer",
            "nullable": true,
            "type": "string"
          },
          "work_email": {
            "description": "the work email of the individual",
            "example": "greg@affixapi.com",
            "nullable": true,
            "type": "string"
          },
          "personal_email": {
            "description": "the personal email of the individual",
            "example": "greg@gmail.com",
            "nullable": true,
            "type": "string"
          },
          "mobile_phone_number": {
            "description": "+1234567890",
            "example": "Hirsch",
            "nullable": true,
            "type": "string"
          },
          "tax_id": {
            "example": "1234567890",
            "nullable": true,
            "type": "string"
          },
          "gender": {
            "example": "male",
            "nullable": true,
            "type": "string",
            "enum": [
              "male",
              "female",
              "not_specified",
              null
            ]
          },
          "ethnicity": {
            "nullable": true,
            "example": "white",
            "type": "string",
            "enum": [
              null,
              "asian",
              "black",
              "hispanic",
              "mixed",
              "not_specified",
              "other",
              "white"
            ]
          },
          "marital_status": {
            "nullable": true,
            "example": "single",
            "type": "string",
            "description": "`other` option can include co-habitating, civil partnership,\nseparated, widowed, etc\n",
            "enum": [
              "single",
              "married",
              "divorced",
              "not_specified",
              "other",
              null
            ]
          },
          "date_of_birth": {
            "example": "1990-11-10",
            "nullable": true,
            "type": "string",
            "format": "date"
          },
          "employment_status": {
            "$ref": "#/components/schemas/employment-statusResponse"
          },
          "employment_type": {
            "nullable": true,
            "example": "full_time",
            "type": "string",
            "enum": [
              null,
              "full_time",
              "part_time",
              "contractor",
              "other"
            ]
          },
          "start_date": {
            "example": "2020-10-11",
            "nullable": true,
            "type": "string",
            "format": "date"
          },
          "remote_created_at": {
            "example": "2020-10-11",
            "nullable": true,
            "type": "string",
            "format": "date",
            "readOnly": true
          },
          "termination_date": {
            "example": "2021-10-12",
            "nullable": true,
            "type": "string",
            "format": "date"
          },
          "avatar": {
            "example": "http://alturl.com/h2h8m",
            "nullable": true,
            "type": "string"
          },
          "home_location": {
            "$ref": "#/components/schemas/addressResponse"
          },
          "work_location": {
            "$ref": "#/components/schemas/locationResponse"
          },
          "manager": {
            "nullable": true,
            "type": "object",
            "required": [
              "first_name",
              "last_name",
              "id",
              "work_email",
              "remote_id"
            ],
            "properties": {
              "first_name": {
                "nullable": true,
                "type": "string"
              },
              "last_name": {
                "nullable": true,
                "type": "string"
              },
              "id": {
                "type": "string",
                "description": "the Affix-assigned ID of the individual. Nullable if the\nsystem only reports the name of the manager; not their ID\n",
                "nullable": true
              },
              "work_email": {
                "nullable": true,
                "type": "string"
              },
              "remote_id": {
                "nullable": true,
                "type": "string"
              }
            }
          },
          "bank_account": {
            "nullable": true,
            "type": "object",
            "required": [
              "account_number",
              "bank_name",
              "bic",
              "holder_name",
              "iban"
            ],
            "properties": {
              "account_number": {
                "nullable": true,
                "type": "string"
              },
              "bank_name": {
                "nullable": true,
                "type": "string"
              },
              "bic": {
                "nullable": true,
                "type": "string"
              },
              "holder_name": {
                "nullable": true,
                "type": "string"
              },
              "iban": {
                "nullable": true,
                "type": "string"
              }
            }
          },
          "employment_history": {
            "nullable": true,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/employment-historyResponse"
            }
          },
          "compensation_history": {
            "nullable": true,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/compensation-historyResponse"
            }
          },
          "custom_fields": {
            "nullable": true,
            "type": "object",
            "example": {
              "t_shirt_size": "medium"
            }
          },
          "groups": {
            "$ref": "#/components/schemas/Groups20230301Response"
          },
          "dependents": {
            "nullable": true,
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "name",
                "relationship"
              ],
              "properties": {
                "name": {
                  "nullable": true,
                  "type": "string"
                },
                "relationship": {
                  "nullable": true,
                  "type": "string"
                }
              }
            }
          },
          "emergency_contacts": {
            "nullable": true,
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "first_name",
                "last_name",
                "relationship",
                "mobile_phone_number",
                "primary_contact"
              ],
              "properties": {
                "first_name": {
                  "nullable": true,
                  "type": "string"
                },
                "last_name": {
                  "nullable": true,
                  "type": "string"
                },
                "relationship": {
                  "nullable": true,
                  "type": "string"
                },
                "mobile_phone_number": {
                  "nullable": true,
                  "type": "string"
                },
                "primary_contact": {
                  "nullable": true,
                  "type": "boolean"
                }
              }
            }
          }
        }
      },
      "Employees20230301Response": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/EmployeeResponse"
        }
      },
      "IdentityResponse": {
        "type": "object",
        "required": [
          "name",
          "email",
          "phone_number"
        ],
        "properties": {
          "name": {
            "description": "The name of the individual for the respective account, if known",
            "example": "Laurine Barton",
            "type": "string"
          },
          "email": {
            "description": "The email of the individual for the respective account, if known",
            "example": "laurine.barton@me.com",
            "type": "string"
          },
          "phone_number": {
            "description": "The phone number of the individual for the respective account, if known.\nNullable for tokens created prior to 2023-03-05\n",
            "example": 14150000000,
            "type": "string",
            "nullable": true
          }
        }
      },
      "policy-typeResponse": {
        "type": "string",
        "example": "vacation",
        "enum": [
          null,
          "bereavement",
          "holiday",
          "jury_duty",
          "personal",
          "sick",
          "vacation",
          "volunteer"
        ],
        "nullable": true
      },
      "TimeOffEntryResponse": {
        "type": "object",
        "required": [
          "id",
          "remote_id",
          "employee_id",
          "employee_remote_id",
          "start_date",
          "end_date",
          "amount",
          "unit",
          "status",
          "employee_note",
          "policy_id",
          "policy_remote_id",
          "policy_name",
          "policy_type",
          "remote_created_at",
          "remote_modified_at"
        ],
        "properties": {
          "id": {
            "description": "The Affix-assigned id of the time off entry",
            "example": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
            "type": "string"
          },
          "remote_id": {
            "description": "the remote system-assigned id of the time off entry",
            "example": "19202938",
            "type": "string"
          },
          "employee_id": {
            "description": "the Affix-assigned id of the individual",
            "example": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
            "type": "string"
          },
          "employee_remote_id": {
            "description": "the remote system-assigned id of the individual",
            "example": "19202938",
            "type": "string"
          },
          "start_date": {
            "example": "2020-10-11",
            "nullable": true,
            "type": "string",
            "format": "date"
          },
          "end_date": {
            "example": "2020-10-14",
            "nullable": true,
            "type": "string",
            "format": "date"
          },
          "amount": {
            "type": "number",
            "multipleOf": 0.1,
            "example": 3
          },
          "unit": {
            "type": "string",
            "example": "days",
            "enum": [
              null,
              "hours",
              "days",
              "months"
            ]
          },
          "status": {
            "type": "string",
            "nullable": true,
            "example": "approved",
            "enum": [
              null,
              "approved",
              "pending",
              "rejected"
            ]
          },
          "employee_note": {
            "type": "string",
            "nullable": true,
            "example": "Visiting my family"
          },
          "policy_id": {
            "description": "The Affix-assigned id of the policy",
            "example": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
            "type": "string",
            "nullable": true
          },
          "policy_remote_id": {
            "description": "The remote system-assigned id of the policy",
            "example": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
            "type": "string",
            "nullable": true
          },
          "policy_name": {
            "description": "The name of the policy, as assigned by the remote system",
            "type": "string",
            "example": "Comp/In Lieu Time",
            "nullable": true
          },
          "policy_type": {
            "$ref": "#/components/schemas/policy-typeResponse"
          },
          "remote_created_at": {
            "example": "2020-10-11",
            "nullable": true,
            "type": "string",
            "format": "date"
          },
          "remote_modified_at": {
            "example": "2020-10-12",
            "nullable": true,
            "type": "string",
            "format": "date"
          }
        }
      },
      "TimeOffEntries20230301Response": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/TimeOffEntryResponse"
        }
      },
      "TimesheetResponse": {
        "type": "object",
        "required": [
          "id",
          "remote_id",
          "employee_id",
          "employee_remote_id",
          "start_time",
          "end_time",
          "hours_worked",
          "remote_created_at",
          "remote_modified_at"
        ],
        "properties": {
          "id": {
            "description": "The Affix-assigned id of the time off entry",
            "example": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
            "type": "string"
          },
          "remote_id": {
            "description": "the remote system-assigned id of the time off entry",
            "example": "19202938",
            "type": "string"
          },
          "employee_id": {
            "description": "the Affix-assigned id of the individual",
            "example": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
            "type": "string"
          },
          "employee_remote_id": {
            "description": "the remote system-assigned id of the individual",
            "example": "19202938",
            "type": "string"
          },
          "start_time": {
            "example": "2020-10-11T08:00:00Z",
            "nullable": true,
            "type": "string",
            "format": "date-time"
          },
          "end_time": {
            "example": "2020-10-11T17:00:00Z",
            "nullable": true,
            "type": "string",
            "format": "date-time"
          },
          "hours_worked": {
            "type": "number",
            "multipleOf": 0.1,
            "example": 8
          },
          "remote_created_at": {
            "example": "2020-10-11",
            "nullable": true,
            "type": "string",
            "format": "date"
          },
          "remote_modified_at": {
            "example": "2020-10-12",
            "nullable": true,
            "type": "string",
            "format": "date"
          }
        }
      },
      "Timesheets20230301Response": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/TimesheetResponse"
        }
      },
      "TimeOffBalanceResponse": {
        "type": "object",
        "required": [
          "employee_id",
          "employee_remote_id",
          "balance",
          "used",
          "policy_id",
          "policy_remote_id",
          "policy_type",
          "policy_name",
          "remote_created_at",
          "remote_modified_at"
        ],
        "properties": {
          "employee_id": {
            "description": "The Affix-assigned id of the individual",
            "example": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
            "type": "string"
          },
          "employee_remote_id": {
            "description": "the remote system-assigned id of the individual",
            "example": "19202938",
            "type": "string"
          },
          "balance": {
            "type": "number",
            "nullable": true,
            "example": 24.5
          },
          "used": {
            "type": "number",
            "nullable": true,
            "example": 12
          },
          "policy_id": {
            "description": "The Affix-assigned id of the policy",
            "example": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
            "type": "string",
            "nullable": true
          },
          "policy_remote_id": {
            "description": "The remote system-assigned id of the policy",
            "example": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
            "type": "string",
            "nullable": true
          },
          "policy_name": {
            "description": "The name of the policy, as assigned by the remote system",
            "type": "string",
            "example": "Comp/In Lieu Time",
            "nullable": true
          },
          "policy_type": {
            "$ref": "#/components/schemas/policy-typeResponse"
          },
          "remote_created_at": {
            "example": "2020-10-11",
            "nullable": true,
            "type": "string",
            "format": "date"
          },
          "remote_modified_at": {
            "example": "2020-10-11",
            "nullable": true,
            "type": "string",
            "format": "date"
          }
        }
      },
      "TimeOffBalances20230301Response": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/TimeOffBalanceResponse"
        }
      },
      "WorkLocations20230301Response": {
        "type": "array",
        "description": "Work locations",
        "items": {
          "$ref": "#/components/schemas/locationResponse"
        }
      },
      "payrun-typeResponse": {
        "nullable": true,
        "example": "regular",
        "type": "string",
        "enum": [
          "regular",
          "one_time",
          "off_cycle",
          "correction",
          "reversal",
          null
        ]
      },
      "PayrunResponse": {
        "type": "object",
        "required": [
          "id",
          "remote_id",
          "state",
          "type",
          "start_date",
          "end_date",
          "payment_date"
        ],
        "properties": {
          "id": {
            "description": "The Affix-assigned id of the individual",
            "example": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
            "type": "string"
          },
          "remote_id": {
            "description": "the remote system-assigned id of the payrun",
            "example": "19202938",
            "type": "string"
          },
          "state": {
            "example": "paid",
            "nullable": true,
            "type": "string",
            "enum": [
              "paid",
              "pending",
              null
            ]
          },
          "type": {
            "$ref": "#/components/schemas/payrun-typeResponse"
          },
          "start_date": {
            "nullable": true,
            "example": "2020-01-01",
            "type": "string",
            "format": "date",
            "description": "Payrun period start date"
          },
          "end_date": {
            "nullable": true,
            "example": "2020-01-31",
            "type": "string",
            "format": "date",
            "description": "Payrun period end date"
          },
          "payment_date": {
            "nullable": true,
            "example": "2020-01-27",
            "type": "string",
            "format": "date",
            "description": "Payment date / check date"
          }
        }
      },
      "Payruns20230301Response": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/PayrunResponse"
        }
      },
      "currency-not-nullResponse": {
        "type": "string",
        "example": "eur",
        "nullable": true,
        "enum": [
          "usd",
          "gbp",
          "eur",
          "sek",
          "cad"
        ]
      },
      "PayslipResponse": {
        "type": "object",
        "required": [
          "id",
          "remote_id",
          "employee_id",
          "employee_remote_id",
          "payrun_id",
          "payrun_remote_id",
          "payrun_type",
          "currency",
          "gross_pay",
          "net_pay",
          "start_date",
          "end_date",
          "payment_date",
          "earnings",
          "contributions",
          "deductions",
          "taxes",
          "reimbursements"
        ],
        "properties": {
          "id": {
            "description": "The Affix-assigned id of the payslip",
            "example": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
            "type": "string",
            "nullable": true
          },
          "remote_id": {
            "description": "the remote system-assigned id of the payrun",
            "example": "19202938",
            "type": "string",
            "nullable": true
          },
          "employee_id": {
            "type": "string",
            "example": "d2f972d0-2526-434b-9409-4c3b468e08f0"
          },
          "employee_remote_id": {
            "type": "string",
            "example": "19202938"
          },
          "payrun_id": {
            "type": "string",
            "example": "35347df1-95e7-46e2-93cc-66f1191edca5"
          },
          "payrun_remote_id": {
            "type": "string",
            "example": "19202938"
          },
          "payrun_type": {
            "$ref": "#/components/schemas/payrun-typeResponse"
          },
          "currency": {
            "$ref": "#/components/schemas/currency-not-nullResponse"
          },
          "gross_pay": {
            "type": "number",
            "example": 134267,
            "nullable": true,
            "description": "if USD/EUR/GBP, in cent"
          },
          "net_pay": {
            "type": "number",
            "nullable": true,
            "description": "if USD/EUR/GBP, in cent",
            "example": 86578
          },
          "start_date": {
            "example": "2020-01-01",
            "type": "string",
            "format": "date"
          },
          "end_date": {
            "example": "2020-01-31",
            "type": "string",
            "format": "date"
          },
          "payment_date": {
            "example": "2020-01-27",
            "type": "string",
            "format": "date"
          },
          "earnings": {
            "type": "array",
            "nullable": true,
            "example": [
              {
                "amount": 100234,
                "name": "SALARY",
                "hours": 80
              },
              {
                "amount": 834234,
                "name": "OVERTIME",
                "hours": 8
              }
            ],
            "items": {
              "type": "object",
              "description": "The breakdown of gross pay",
              "required": [
                "name",
                "amount",
                "hours"
              ],
              "properties": {
                "name": {
                  "type": "string",
                  "example": "salary"
                },
                "amount": {
                  "type": "number",
                  "description": "if USD/EUR/GBP, in cent",
                  "example": 834234
                },
                "hours": {
                  "type": "number",
                  "description": "hours, if applicable",
                  "example": 80,
                  "nullable": true
                }
              }
            }
          },
          "contributions": {
            "type": "array",
            "example": [
              {
                "name": "Private Health Insurance (Employer)",
                "amount": 13454
              },
              {
                "name": "Transportation allowance benefit (Employer)",
                "amount": 3454
              },
              {
                "name": "Other (Employer)",
                "amount": 3454
              }
            ],
            "nullable": true,
            "description": "Items paid by the employer that are not included in gross pay,\nsuch as employer-paid portion of private health insurance\n",
            "items": {
              "type": "object",
              "required": [
                "name",
                "amount"
              ],
              "properties": {
                "name": {
                  "type": "string",
                  "example": "Private Health Insurance (Employer)"
                },
                "amount": {
                  "type": "number",
                  "description": "if USD/EUR/GBP, in cent",
                  "example": 3454
                }
              }
            }
          },
          "deductions": {
            "type": "array",
            "nullable": true,
            "example": [
              {
                "name": "Transportation allowance benefit",
                "amount": 3454
              },
              {
                "name": "Private Health Insurance (Employee)",
                "amount": 3454
              }
            ],
            "items": {
              "type": "object",
              "required": [
                "name",
                "amount"
              ],
              "properties": {
                "name": {
                  "type": "string",
                  "example": "Private Insurance Premium (Employee)"
                },
                "amount": {
                  "type": "number",
                  "description": "if USD/EUR/GBP, in cent",
                  "example": 3454
                }
              }
            }
          },
          "taxes": {
            "type": "array",
            "nullable": true,
            "example": [
              {
                "name": "PRSI",
                "amount": 725,
                "employer_tax": false
              },
              {
                "name": "PSC (Class S)",
                "amount": 125,
                "employer_tax": false
              },
              {
                "name": "Income Tax",
                "amount": 10025,
                "employer_tax": false
              },
              {
                "name": "Payroll Tax",
                "amount": 10025,
                "employer_tax": true
              }
            ],
            "items": {
              "type": "object",
              "required": [
                "name",
                "amount",
                "employer_tax"
              ],
              "properties": {
                "name": {
                  "type": "string",
                  "example": "Income Tax"
                },
                "amount": {
                  "type": "number",
                  "example": 10025,
                  "description": "if USD/EUR/GBP, in cent"
                },
                "employer_tax": {
                  "type": "boolean",
                  "nullable": true
                }
              }
            }
          },
          "reimbursements": {
            "type": "array",
            "nullable": true,
            "example": [
              {
                "name": "Slack seat",
                "amount": 725
              }
            ],
            "items": {
              "type": "object",
              "required": [
                "name",
                "amount"
              ],
              "properties": {
                "name": {
                  "type": "string",
                  "example": "Slack seat"
                },
                "amount": {
                  "type": "number",
                  "example": 10025,
                  "description": "if USD/EUR/GBP, in cent"
                }
              }
            }
          }
        }
      },
      "Payslips20230301Response": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/PayslipResponse"
        }
      }
    }
  }
}
