{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/indeed/json-schema/indeed-patch-employer-payload-schema.json",
  "title": "PatchEmployerPayload",
  "description": "Response payload from a successful employer create or update operation.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/indeed-employers-api-openapi.yml#/components/schemas/PatchEmployerPayload",
  "type": "object",
  "properties": {
    "employer": {
      "$ref": "#/$defs/Employer"
    },
    "success": {
      "type": "boolean",
      "description": "Whether the operation succeeded."
    },
    "errors": {
      "type": "array",
      "description": "Any errors encountered during the operation.",
      "items": {
        "$ref": "#/$defs/ApiError"
      }
    }
  },
  "$defs": {
    "Address": {
      "type": "object",
      "description": "A physical address.",
      "properties": {
        "streetAddress": {
          "type": "string",
          "description": "Street address line."
        },
        "streetAddress2": {
          "type": "string",
          "description": "Additional street address information."
        },
        "city": {
          "type": "string",
          "description": "City name."
        },
        "state": {
          "type": "string",
          "description": "State, province, or region."
        },
        "postalCode": {
          "type": "string",
          "description": "Postal or ZIP code."
        },
        "country": {
          "type": "string",
          "description": "ISO 3166-1 alpha-2 country code."
        }
      }
    },
    "ApiError": {
      "type": "object",
      "description": "An error returned by the Indeed API.",
      "properties": {
        "code": {
          "type": "string",
          "description": "A machine-readable error code."
        },
        "message": {
          "type": "string",
          "description": "A human-readable description of the error."
        },
        "field": {
          "type": "string",
          "description": "The field that caused the error, if applicable."
        }
      }
    },
    "CountrySpecificAttributes": {
      "type": "object",
      "description": "Country-scoped employer attributes. Provide an ISO 3166-1 two-letter country code to specify the country.",
      "required": [
        "country"
      ],
      "properties": {
        "country": {
          "type": "string",
          "description": "ISO 3166-1 alpha-2 country code.",
          "pattern": "^[A-Z]{2}$"
        },
        "websiteUrl": {
          "type": "string",
          "format": "uri",
          "description": "The employer's website URL for this country."
        },
        "phoneNumber": {
          "type": "string",
          "description": "The employer's contact phone number for this country."
        },
        "address": {
          "$ref": "#/$defs/Address"
        }
      }
    },
    "Employer": {
      "type": "object",
      "description": "An employer entity on Indeed representing a company or organization that posts jobs and manages candidates.",
      "required": [
        "id",
        "employerName"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "A globally unique employer identifier. For ATS partners, this typically combines the ATS system identifier with the employer's internal ID."
        },
        "employerName": {
          "type": "string",
          "description": "The display name of the employer as it appears on Indeed job listings and company pages."
        },
        "employerType": {
          "type": "string",
          "description": "The type of employer entity.",
          "enum": [
            "DIRECT_EMPLOYER",
            "STAFFING_AGENCY",
            "RECRUITING_FIRM"
          ]
        },
        "employerAttributes": {
          "$ref": "#/$defs/EmployerAttributes"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp when the employer was created on Indeed."
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp when the employer was last updated."
        }
      }
    },
    "EmployerAttributes": {
      "type": "object",
      "description": "Additional attributes for an employer, including both global and country-specific settings.",
      "properties": {
        "employerType": {
          "type": "string",
          "description": "The type classification of the employer.",
          "enum": [
            "DIRECT_EMPLOYER",
            "STAFFING_AGENCY",
            "RECRUITING_FIRM"
          ]
        },
        "countrySpecificAttributes": {
          "type": "array",
          "description": "Attributes that vary by country, such as website URLs, phone numbers, and locale-specific information.",
          "items": {
            "$ref": "#/$defs/CountrySpecificAttributes"
          }
        },
        "localeSpecificAttributes": {
          "type": "array",
          "description": "Locale-specific employer attributes.",
          "items": {
            "$ref": "#/$defs/LocaleSpecificAttributes"
          }
        }
      }
    },
    "LocaleSpecificAttributes": {
      "type": "object",
      "description": "Locale-specific employer attributes for multilingual support.",
      "properties": {
        "locale": {
          "type": "string",
          "description": "IETF BCP 47 language tag."
        },
        "employerName": {
          "type": "string",
          "description": "Localized employer name."
        },
        "employerDescription": {
          "type": "string",
          "description": "Localized employer description."
        }
      }
    }
  }
}