{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/4dayweek-io/json-schema/4dayweek-io-v2-job-schema.json",
  "title": "V2Job",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/4dayweek-io-openapi.yaml#/components/schemas/V2Job",
  "type": "object",
  "required": [
    "id",
    "slug",
    "title",
    "url",
    "work_arrangement",
    "is_remote",
    "posted_at"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "UUID string"
    },
    "slug": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "description": {
      "type": "string",
      "description": "Plain text only."
    },
    "url": {
      "type": "string",
      "format": "uri"
    },
    "category": {
      "type": "string"
    },
    "role": {
      "type": "string"
    },
    "level": {
      "type": "string"
    },
    "contract_type": {
      "type": "string",
      "enum": [
        "permanent",
        "contract",
        "freelance"
      ]
    },
    "schedule_type": {
      "type": "string"
    },
    "hours_per_week_min": {
      "type": "integer"
    },
    "hours_per_week_max": {
      "type": "integer"
    },
    "work_arrangement": {
      "type": "string",
      "enum": [
        "onsite",
        "hybrid",
        "remote"
      ]
    },
    "is_remote": {
      "type": "boolean"
    },
    "office_locations": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/V2JobLocation"
      }
    },
    "remote_allowed": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/V2JobLocation"
      }
    },
    "timezones": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "salary_min": {
      "type": "integer",
      "format": "int64",
      "description": "In smallest currency unit (e.g. cents for USD). 8000000 = $80,000.\nNote: the salary_min/salary_max query *filters* accept whole dollars\n(e.g. 80000), but *response* values are in cents.\n"
    },
    "salary_max": {
      "type": "integer",
      "format": "int64"
    },
    "salary_currency": {
      "type": "string"
    },
    "salary_period": {
      "type": "string",
      "enum": [
        "year",
        "month",
        "hour"
      ]
    },
    "skills": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/V2Tag"
      }
    },
    "stack": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/V2Tag"
      }
    },
    "tools": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/V2Tag"
      }
    },
    "posted_at": {
      "type": "string",
      "format": "date-time",
      "description": "RFC3339 UTC timestamp."
    },
    "expires_at": {
      "type": "string",
      "format": "date-time",
      "description": "RFC3339 UTC timestamp. Omitted when unknown."
    },
    "company": {
      "$ref": "#/$defs/V2Company"
    }
  },
  "$defs": {
    "V2Company": {
      "type": "object",
      "required": [
        "id",
        "slug",
        "name",
        "url"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "slug": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "website": {
          "type": "string",
          "format": "uri"
        },
        "logo_url": {
          "type": "string",
          "format": "uri"
        },
        "short_description": {
          "type": "string"
        },
        "country": {
          "type": "string"
        },
        "employees": {
          "type": "integer",
          "format": "int64"
        },
        "schedule_type": {
          "type": "string"
        },
        "hours_full_time": {
          "type": "integer",
          "format": "int64"
        },
        "remote_level": {
          "type": "string",
          "description": "Office-presence policy: fully-remote, hybrid, or onsite. Worldwide hiring is a separate boolean below (post-2026-05-25)."
        },
        "hires_worldwide": {
          "type": "boolean",
          "description": "True when the company accepts applicants from any country (no geographic restriction). Orthogonal to remote_level — a fully-remote company can be country-restricted or globally-hiring."
        },
        "work_life_score": {
          "type": "integer"
        }
      }
    },
    "V2JobLocation": {
      "type": "object",
      "properties": {
        "city": {
          "type": "string"
        },
        "state": {
          "type": "string"
        },
        "country": {
          "type": "string"
        },
        "continent": {
          "type": "string"
        },
        "region": {
          "type": "string"
        }
      }
    },
    "V2Tag": {
      "type": "object",
      "required": [
        "name",
        "slug"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "slug": {
          "type": "string"
        }
      }
    }
  }
}