{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/argyle/refs/heads/main/json-schema/employment.json",
  "title": "Employment",
  "type": "object",
  "example": {
    "id": "0183d52a-d3b2-331d-c753-3662a20e352b",
    "user": "018051aa-f7a9-a0db-2f38-6cfa325e9d69",
    "account": "0187c66e-e7e5-811c-b006-2232f00f426a",
    "created_at": "2023-01-30T12:53:24.561Z",
    "employer": "Whole Goods",
    "employment_status": "active",
    "origin": "retrieved"
  },
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Unique ID of the employment.\n\nCan be used to filter the following data sets:\n- [Identities](/api-reference/identities#list)\n- [Paystubs](/api-reference/paystubs#list)\n- [Payroll Documents](/api-reference/payroll-documents#list)\n"
    },
    "account": {
      "type": "string",
      "format": "uuid",
      "description": "ID of the account associated with the employment."
    },
    "user": {
      "type": "string",
      "format": "uuid",
      "description": "ID of the user associated with the employment."
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)) when the employment object was created."
    },
    "employer": {
      "type": "string",
      "description": "Employer name on the most recent <a href=\"/api-reference/paystubs#object-employer\">paystub</a> associated with the employment."
    },
    "employment_status": {
      "type": "string",
      "enum": [
        "active",
        "inactive",
        "terminated"
      ],
      "description": "Job status of the employment.\n\n`inactive` and `terminated` definitions vary by Item and can overlap.\n`inactive` typically indicates the employee left voluntarily, is on leave, or has not been active for a certain period of time.\n`terminated` typically indicates the employee is no longer employed. Specific reasons for termination, if available, are returned in the `termination_reason` field.\n\nWe recommend using data from the `/paystubs` and `/gigs` endpoints to construct a more wholistic timeline of employment history.\n"
    },
    "origin": {
      "type": "string",
      "enum": [
        "retrieved",
        "acquired"
      ],
      "description": "Whether the employment was defined by the connected payroll system or paystubs.\n\n- `retrieved` \u2014 Employment defined by the connected payroll system.\n- `acquired` \u2014 Employment defined by retrieved paystubs.\n"
    }
  }
}