{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cpz-lab-com/json-schema/cpz-lab-com-order-approval-schema.json",
  "title": "OrderApproval",
  "description": "An order from a confirm_orders credential, held for the owner. Approve or reject in the app; resubmit POST /orders with approval_id once approved.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cpz-lab-com-openapi.yml#/components/schemas/OrderApproval",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "status": {
      "type": "string",
      "enum": [
        "pending",
        "approved",
        "rejected",
        "consumed",
        "placed",
        "failed"
      ]
    },
    "effective_status": {
      "type": "string",
      "enum": [
        "pending",
        "approved",
        "rejected",
        "consumed",
        "placed",
        "failed",
        "expired"
      ]
    },
    "summary": {
      "type": "object"
    },
    "broker": {
      "type": [
        "string",
        "null"
      ]
    },
    "environment": {
      "type": [
        "string",
        "null"
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time"
    },
    "decided_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "consumed_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "completed_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "result_status": {
      "type": [
        "integer",
        "null"
      ]
    },
    "error": {
      "type": [
        "string",
        "null"
      ]
    }
  }
}