{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/curacel/json-schema/curacel-job-loss-purchase-data-schema.json",
  "title": "JobLossPurchaseData",
  "description": "Data for buying job loss insurance",
  "x-generated": "2026-11-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/curacel-openapi-openapi.yml#/components/schemas/JobLossPurchaseData",
  "type": "object",
  "required": [
    "product_code",
    "customer_ref",
    "policy_start_date"
  ],
  "properties": {
    "product_code": {
      "type": "string",
      "description": "The code of an approved, non-archived product available to the authenticated partner."
    },
    "customer_ref": {
      "type": "string",
      "description": "The reference of a customer belonging to the authenticated partner."
    },
    "payment_type": {
      "type": "string",
      "enum": [
        "wallet",
        "web_link",
        "card"
      ],
      "description": "How the order will be paid. If omitted, the authenticated partner's configured payment option is used."
    },
    "policy_start_date": {
      "type": "string",
      "format": "date",
      "description": "the start date of the intended policy coverage"
    },
    "asset_ref": {
      "type": [
        "string",
        "null"
      ],
      "description": "An external reference stored on the order and included in relevant webhooks."
    },
    "asset_value": {
      "type": "number",
      "format": "float",
      "description": "The customer's net monthly income. Either this field or net_income must be supplied."
    },
    "employer": {
      "type": "string",
      "description": "The name of the customer's employer"
    },
    "job_role": {
      "type": "string",
      "description": "The role of the user in the company"
    },
    "employment_date": {
      "type": "string",
      "format": "date",
      "description": "employment date"
    },
    "gross_income": {
      "type": "number",
      "format": "float",
      "description": "Gross monthly income before taxes or deductions"
    },
    "net_income": {
      "type": "number",
      "format": "float",
      "description": "Net monthly income after taxes or deductions. Either this field or asset_value must be supplied."
    },
    "attachments": {
      "type": "array",
      "items": {
        "type": "integer"
      },
      "description": "Optional attachment IDs. Each attachment must belong to the authenticated partner and must not already be attached to another resource."
    },
    "broker_premium_rate": {
      "type": "number",
      "format": "float",
      "description": "For brokers only. The premium rate for the product."
    },
    "broker_taxes": {
      "type": "number",
      "format": "float",
      "description": "For brokers only. A percentage of the premium to be added as tax"
    },
    "premium_frequency": {
      "type": "string",
      "enum": [
        "monthly",
        "quarterly",
        "annually"
      ]
    },
    "employee_letter_attachment_id": {
      "type": "integer",
      "description": "The ID of the employment letter attachment."
    },
    "gross_income_currency": {
      "type": "string",
      "minLength": 3,
      "maxLength": 3,
      "description": "The three-character currency code used for gross income."
    },
    "net_income_currency": {
      "type": "string",
      "minLength": 3,
      "maxLength": 3,
      "description": "The three-character currency code used for net income."
    },
    "next_of_kin": {
      "type": "array",
      "maxItems": 1,
      "description": "Optional. When supplied, every listed field is required.",
      "items": {
        "type": "object",
        "required": [
          "first_name",
          "last_name",
          "email",
          "phone",
          "relationship"
        ],
        "properties": {
          "first_name": {
            "type": "string"
          },
          "last_name": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "phone": {
            "type": "string"
          },
          "relationship": {
            "type": "string",
            "description": "Your relationship with the beneficiary"
          }
        }
      }
    },
    "child_partner_id": {
      "type": "string",
      "description": "The key of a child partner belonging to the authenticated parent partner."
    }
  }
}