{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/acculynx/json-schema/acculynx-company-user-schema.json",
  "title": "companyUser",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/acculynx-users-api-openapi.yml#/components/schemas/companyUser",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique ID of the Company User.",
      "format": "uuid"
    },
    "displayName": {
      "type": "string",
      "description": "The display name of the user."
    },
    "firstName": {
      "type": "string",
      "description": "The user's first name."
    },
    "lastName": {
      "type": "string",
      "description": "The user's last name."
    },
    "initials": {
      "type": "string",
      "description": "The user's initials."
    },
    "role": {
      "$ref": "#/$defs/companyUserRole"
    },
    "status": {
      "type": "string",
      "enum": [
        "Active",
        "Inactive",
        "Archived",
        "Deleted"
      ],
      "description": "the status of this user account."
    },
    "phone": {
      "type": "string",
      "description": "The user's phone number."
    },
    "mobilePhone": {
      "type": "string",
      "description": "The user's mobile phone number."
    },
    "email": {
      "type": "string",
      "description": "The user's email address."
    },
    "_link": {
      "type": "string",
      "description": "The unique URI of the AccuLynx User."
    }
  },
  "$defs": {
    "companyUserRole": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "The id/enum value of the user role."
        },
        "name": {
          "type": "string",
          "enum": [
            "Company Administrator",
            "Location Administrator",
            "Manager",
            "Office",
            "Sales",
            "Crew"
          ],
          "description": "The name of the role."
        }
      }
    }
  }
}