{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cavuno-com/json-schema/cavuno-com-create-distribution-feed-body-schema.json",
  "title": "CreateDistributionFeedBody",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cavuno-com-distribution-api-openapi.yml#/components/schemas/CreateDistributionFeedBody",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80,
      "description": "The feed's name, at most 80 characters. A custom feed's URL slug is derived from it on create and never changes."
    },
    "template": {
      "type": "string",
      "enum": [
        "indeed",
        "jooble",
        "careerjet",
        "jora",
        "jobrapido",
        "custom"
      ],
      "description": "The XML format: one aggregator (`indeed`, `jooble`, `careerjet`, `jora`, `jobrapido`) or `custom`, whose element names you choose with `customFieldNames`."
    },
    "sourceRule": {
      "type": "string",
      "enum": [
        "own",
        "all"
      ],
      "description": "Which published jobs the feed carries: `own` or `all` (Backfill included). Defaults to the template's default: `own` for `indeed`, `all` otherwise."
    },
    "filter": {
      "$ref": "#/$defs/DistributionFeedFilter"
    },
    "customFieldNames": {
      "$ref": "#/$defs/DistributionFeedCustomFieldNames"
    },
    "contactEmail": {
      "type": "string",
      "maxLength": 254,
      "description": "`indeed` template only: the contact address written into the feed as `<email>`. Feed URLs are public, so it is never filled in for you. Ignored for other templates."
    }
  },
  "required": [
    "name",
    "template"
  ],
  "additionalProperties": false,
  "$defs": {
    "DistributionFeedCustomFieldNames": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "root": {
          "type": "string",
          "maxLength": 64,
          "description": "Element name for `root` (default `source`)."
        },
        "publisher": {
          "type": "string",
          "maxLength": 64,
          "description": "Element name for `publisher` (default `publisher`)."
        },
        "publisherurl": {
          "type": "string",
          "maxLength": 64,
          "description": "Element name for `publisherurl` (default `publisherurl`)."
        },
        "lastbuilddate": {
          "type": "string",
          "maxLength": 64,
          "description": "Element name for `lastbuilddate` (default `lastBuildDate`)."
        },
        "job": {
          "type": "string",
          "maxLength": 64,
          "description": "Element name for `job` (default `job`)."
        },
        "referencenumber": {
          "type": "string",
          "maxLength": 64,
          "description": "Element name for `referencenumber` (default `referencenumber`)."
        },
        "title": {
          "type": "string",
          "maxLength": 64,
          "description": "Element name for `title` (default `title`)."
        },
        "url": {
          "type": "string",
          "maxLength": 64,
          "description": "Element name for `url` (default `url`)."
        },
        "company": {
          "type": "string",
          "maxLength": 64,
          "description": "Element name for `company` (default `company`)."
        },
        "date": {
          "type": "string",
          "maxLength": 64,
          "description": "Element name for `date` (default `date`)."
        },
        "expirationdate": {
          "type": "string",
          "maxLength": 64,
          "description": "Element name for `expirationdate` (default `expirationdate`)."
        },
        "description": {
          "type": "string",
          "maxLength": 64,
          "description": "Element name for `description` (default `description`)."
        },
        "location": {
          "type": "string",
          "maxLength": 64,
          "description": "Element name for `location` (default `location`)."
        },
        "city": {
          "type": "string",
          "maxLength": 64,
          "description": "Element name for `city` (default `city`)."
        },
        "state": {
          "type": "string",
          "maxLength": 64,
          "description": "Element name for `state` (default `state`)."
        },
        "country": {
          "type": "string",
          "maxLength": 64,
          "description": "Element name for `country` (default `country`)."
        },
        "jobtype": {
          "type": "string",
          "maxLength": 64,
          "description": "Element name for `jobtype` (default `jobtype`)."
        },
        "remotetype": {
          "type": "string",
          "maxLength": 64,
          "description": "Element name for `remotetype` (default `remotetype`)."
        },
        "seniority": {
          "type": "string",
          "maxLength": 64,
          "description": "Element name for `seniority` (default `seniority`)."
        },
        "category": {
          "type": "string",
          "maxLength": 64,
          "description": "Element name for `category` (default `category`)."
        },
        "salary": {
          "type": "string",
          "maxLength": 64,
          "description": "Element name for `salary` (default `salary`)."
        }
      },
      "additionalProperties": false,
      "description": "`custom` template only: element names that replace the defaults. A name starts with a letter or `_` and holds letters, digits, `-`, `_` or `.`; names that share a parent must differ. A blank name keeps the default. Ignored for other templates."
    },
    "DistributionFeedFilter": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "employmentTypes": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "full_time",
              "part_time",
              "contract",
              "internship",
              "temporary",
              "volunteer",
              "other"
            ]
          },
          "maxItems": 50,
          "description": "Only jobs with one of these employment types. At most 50 values."
        },
        "remoteOptions": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "on_site",
              "hybrid",
              "remote"
            ]
          },
          "maxItems": 50,
          "description": "Only jobs with one of these workplace types. At most 50 values."
        },
        "seniorityLevels": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "entry_level",
              "associate",
              "mid_level",
              "senior",
              "lead",
              "principal",
              "director",
              "executive"
            ]
          },
          "maxItems": 50,
          "description": "Only jobs with one of these seniority levels. At most 50 values."
        },
        "categories": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "maxItems": 50,
          "description": "Only jobs with one of these category slugs (normalized the way category URLs are). At most 50 values."
        },
        "featuredOnly": {
          "type": "boolean",
          "description": "Only featured jobs."
        }
      },
      "additionalProperties": false
    }
  }
}