{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/curacel/json-schema/curacel-gadget-purchase-data-schema.json",
  "title": "GadgetPurchaseData",
  "description": "Data for buying Gadget 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/GadgetPurchaseData",
  "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 value or price of the gadget. Required when the product uses relative-premium calculation."
    },
    "gadget_type": {
      "type": "string",
      "description": "The type of gadget."
    },
    "gadget_name": {
      "type": "string",
      "description": "The name (model and brand) of the gadget."
    },
    "imei": {
      "type": "number",
      "format": "integer",
      "description": "The IMEI or serial number of the gadget"
    },
    "date_purchased": {
      "type": "string",
      "format": "date",
      "description": "Date when the gadget was purchased"
    },
    "attachments": {
      "type": "array",
      "items": {
        "type": "integer"
      },
      "description": "Optionally upload the following files via the attachments API - Picture of device - Receipt of Ownership Then supply their IDs as an array. Each attachment must belong to the authenticated partner and must not already be attached to another resource."
    },
    "beneficiaries": {
      "type": "array",
      "maxItems": 5,
      "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"
          }
        }
      }
    },
    "receipt_of_ownership_attachment_id": {
      "type": "integer",
      "description": "The id of the attachment to receipt of ownership"
    },
    "picture_of_device_attachment_id": {
      "type": "integer",
      "description": "The id of the attachent of device attachment"
    },
    "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"
      ]
    },
    "child_partner_id": {
      "type": "string",
      "description": "The key of a child partner belonging to the authenticated parent partner."
    }
  }
}