{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/growvib-com/json-schema/growvib-com-agent-order-schema.json",
  "title": "AgentOrder",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/growvib-com-openapi.json#/components/schemas/AgentOrder",
  "properties": {
    "charged_usd": {
      "type": "number"
    },
    "created_at": {
      "format": "date-time",
      "type": "string"
    },
    "delivery": {
      "description": "What an agent can know about progress without guessing. Delivery is gradual once it starts (remains counts down) and completion time is not estimated.",
      "properties": {
        "listed_start": {
          "description": "The start window the option lists in the catalog, as the buyer reads it (0-15 Minutes, 0-6 Hours, Instant; the same text get_service shows as start_within); absent when the listing states none.",
          "type": "string"
        },
        "note": {
          "type": "string"
        },
        "start_overdue": {
          "description": "Set only while an active order has not started past its listed window; never once delivery has started, and never on a per-post subscription (its clock is the target's next post).",
          "type": "boolean"
        },
        "start_within_minutes": {
          "description": "That window's upper bound in minutes (an Instant claim counts as 60, the catalog's own hour). When the option states no label, the bound of its start bucket (instant 60, fast 180, moderate 1440). Absent for slow (more than a day, no bound) and when nothing is listed.",
          "type": "integer"
        },
        "started": {
          "description": "Delivery has begun: a start count was recorded or units have arrived.",
          "type": "boolean"
        },
        "waiting_for_post": {
          "description": "On a per-post subscription only: true while the order is active and no post has been covered yet. Not a stall: delivery starts when the target publishes its next post.",
          "type": "boolean"
        }
      },
      "type": "object"
    },
    "link": {
      "format": "uri",
      "type": "string"
    },
    "option_label": {
      "type": "string"
    },
    "order_id": {
      "format": "uuid",
      "type": "string"
    },
    "quantity": {
      "type": "integer"
    },
    "refill_eligible_until": {
      "description": "Present while the order can still be topped up under its guarantee.",
      "format": "date-time",
      "type": "string"
    },
    "remains": {
      "description": "Units still to deliver; absent until delivery has begun.",
      "type": [
        "integer",
        "null"
      ]
    },
    "service_id": {
      "format": "uuid",
      "type": "string"
    },
    "service_name": {
      "type": "string"
    },
    "start_count": {
      "description": "The target's public counter when delivery began; absent until then.",
      "type": [
        "integer",
        "null"
      ]
    },
    "status": {
      "enum": [
        "PENDING",
        "SUBMITTED",
        "PROCESSING",
        "COMPLETED",
        "PARTIALLY_COMPLETED",
        "CANCELED",
        "FAILED",
        "PARTIALLY_FAILED",
        "REFUNDED",
        "PARTIALLY_REFUNDED"
      ],
      "type": "string"
    },
    "tracking_code": {
      "type": "string"
    },
    "updated_at": {
      "format": "date-time",
      "type": "string"
    }
  },
  "type": "object"
}