{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aura-historia-com/json-schema/aura-historia-com-woocommerce-product-webhook-upsert-data-schema.json",
  "title": "WoocommerceProductWebhookUpsertData",
  "description": "WooCommerce product payload accepted for `product.created` and `product.updated`.\nEvery event requires `id`. `status: publish` captures an UPSERT and requires nonblank `name` and `permalink`.\n`status: trash`, `draft`, `pending`, or `private` captures a DELETE and requires only `id`; missing or\nunsupported status is authorized ignored input and also requires only `id`. `type: variation` is\nauthorized ignored input whatever its status and requires only `id`.\n",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aura-historia-com-openapi.yml#/components/schemas/WoocommerceProductWebhookUpsertData",
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "integer",
      "format": "int64",
      "minimum": 0,
      "description": "WooCommerce product identifier. It is converted to the internal `sourceListingId`."
    },
    "type": {
      "type": [
        "string",
        "null"
      ],
      "description": "Optional WooCommerce product type. `variation` marks a variation of a parent product and makes\nthe event authorized ignored input whatever its status. Other or missing types follow `status`.\n"
    },
    "name": {
      "type": "string",
      "description": "Nonblank product title required only when `status: publish` captures an UPSERT."
    },
    "permalink": {
      "type": "string",
      "format": "uri",
      "description": "Public URL required only when `status: publish` captures an UPSERT."
    },
    "description": {
      "type": [
        "string",
        "null"
      ],
      "description": "Optional WooCommerce product-description field. Accepted but ignored; it is not mapped to Aura's canonical description and is omitted from persisted source evidence."
    },
    "short_description": {
      "type": [
        "string",
        "null"
      ],
      "description": "Optional WooCommerce short-description field. Accepted but ignored; it is not mapped to Aura's canonical description and is omitted from persisted source evidence."
    },
    "price": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^(?:[0-9]+(?:\\.[0-9]+)?|)$",
      "description": "Optional WooCommerce price string for a captured `status: publish` UPSERT.\nIntake writes current raw-values schema `1` with `MACHINE_DECIMAL`. A nonblank value must be an untrimmed unsigned ASCII decimal\n(`digits` or `digits.digits`): no whitespace, signs, grouping separators, or currency symbols. A nonblank\n`SET` requires the listing source's configured `woocommerceCurrency`. Fractional digits beyond the configured\ncurrency minor-unit scale are accepted only when every excess digit is `0`; a nonzero excess digit is\nrejected rather than truncated. A blank source string maps to `CLEAR`.\n"
    },
    "status": {
      "type": [
        "string",
        "null"
      ],
      "description": "Optional WooCommerce product status string.\n`publish` captures an UPSERT and requires nonblank `name` and `permalink`. `draft`, `pending`,\n`private`, and `trash` capture a DELETE and require only `id`. Unsupported or missing status is\nauthorized ignored input: it causes no destructive write and does not require `name` or `permalink`.\n"
    },
    "stock_status": {
      "type": [
        "string",
        "null"
      ],
      "description": "Optional WooCommerce stock-status string.\nFor `publish`, `instock` maps to `IN_STOCK`, `outofstock` to `OUT_OF_STOCK`, and\n`onbackorder` to `BACK_ORDER`. Missing or unsupported stock status never implies a sale.\n"
    },
    "date_modified_gmt": {
      "type": [
        "string",
        "null"
      ],
      "description": "Optional WooCommerce product modification timestamp. When the topic/status maps to raw capture, accepted forms are no-offset GMT interpreted as UTC, RFC3339 `Z`, and RFC3339 `+00:00`; malformed or nonzero-offset values are rejected. A valid value establishes provider source order; omit it when no source-ordering guarantee is available."
    },
    "images": {
      "type": "array",
      "description": "Optional list of WooCommerce product images. Missing payload fields are treated as an empty list.",
      "items": {
        "$ref": "#/$defs/WoocommerceProductWebhookImageData"
      }
    }
  },
  "$defs": {
    "WoocommerceProductWebhookImageData": {
      "type": "object",
      "description": "Image object extracted from a WooCommerce product payload.",
      "required": [
        "src"
      ],
      "properties": {
        "src": {
          "type": "string",
          "format": "uri",
          "description": "Absolute URL of a product image."
        }
      }
    }
  }
}