Brand Studio docs
Engineering manualSchema reference

Brand Studio selected-plan quote response

Declared schema: schemas/selected-plan-quote-response.schema.json

Source: schemas/selected-plan-quote-response.schema.json. This is the complete declaration, including nested definitions and constraints. Its presence is not evidence that a runtime producer or consumer validates against it.

All schemas · Data structures and lineage

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://mirrorfactory.com/schemas/selected-plan-quote-response.schema.json",
  "title": "Brand Studio selected-plan quote response",
  "description": "The ready or needs-review no-spend response returned by POST /api/query-manifest for a selected plan.",
  "oneOf": [
    {
      "$ref": "#/$defs/ready"
    },
    {
      "$ref": "#/$defs/needsReview"
    }
  ],
  "$defs": {
    "accountSummary": {
      "description": "Authenticated account pricing outside the canonical execution plan/hash. Source and provider USD limits remain independent.",
      "type": "object",
      "required": [
        "account_id",
        "unlimited_account",
        "credits"
      ],
      "properties": {
        "account_id": {
          "type": "string",
          "pattern": "^[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$"
        },
        "unlimited_account": {
          "type": "boolean"
        },
        "credits": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      },
      "if": {
        "properties": {
          "unlimited_account": {
            "const": true
          }
        }
      },
      "then": {
        "properties": {
          "credits": {
            "const": 0
          }
        }
      },
      "additionalProperties": false
    },
    "issue": {
      "type": "object",
      "required": [
        "item_id",
        "reason"
      ],
      "properties": {
        "item_id": {
          "type": "string",
          "minLength": 1
        },
        "reason": {
          "type": "string",
          "minLength": 1
        },
        "detail": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "manifestLegUnit": {
      "type": "object",
      "required": [
        "unit",
        "provider",
        "est_cost_usd",
        "status",
        "groups",
        "plan_hash"
      ],
      "properties": {
        "unit": {
          "type": "string",
          "minLength": 1
        },
        "provider": {
          "type": "string",
          "minLength": 1
        },
        "est_cost_usd": {
          "type": "number",
          "minimum": 0
        },
        "status": {
          "const": "approved_scope"
        },
        "groups": {
          "type": "array"
        },
        "plan_hash": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        }
      },
      "additionalProperties": false
    },
    "manifest": {
      "type": "object",
      "required": [
        "schema_version",
        "plan_source",
        "domain",
        "plan_hash",
        "execution_plan",
        "legs",
        "total_est_cost_usd",
        "unpriced_entries"
      ],
      "properties": {
        "schema_version": {
          "const": "query-manifest-v1"
        },
        "plan_source": {
          "const": "reserved_execution_plan"
        },
        "domain": {
          "type": "string",
          "minLength": 1
        },
        "plan_hash": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "execution_plan": {
          "$ref": "selected-plan-execution.schema.json"
        },
        "legs": {
          "type": "object",
          "additionalProperties": {
            "type": "object",
            "required": [
              "planned",
              "blocked"
            ],
            "properties": {
              "planned": {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/manifestLegUnit"
                }
              },
              "blocked": {
                "type": "array"
              }
            },
            "additionalProperties": false
          }
        },
        "total_est_cost_usd": {
          "type": "number",
          "minimum": 0
        },
        "unpriced_entries": {
          "const": 0
        }
      },
      "additionalProperties": false
    },
    "ready": {
      "type": "object",
      "required": [
        "status",
        "ok",
        "issues",
        "plan",
        "manifest",
        "spend_enabled",
        "account_summary"
      ],
      "properties": {
        "status": {
          "const": "ready"
        },
        "ok": {
          "const": true
        },
        "issues": {
          "type": "array",
          "maxItems": 0
        },
        "plan": {
          "$ref": "selected-plan-execution.schema.json"
        },
        "manifest": {
          "$ref": "#/$defs/manifest"
        },
        "spend_enabled": {
          "type": "boolean"
        },
        "account_summary": {
          "$ref": "#/$defs/accountSummary"
        },
        "alpha_allowance": {
          "type": "object"
        },
        "capabilities": {
          "type": "object"
        },
        "reason": {
          "type": "null"
        },
        "item_availability": {
          "type": "object"
        },
        "provider_funds_checked_at": {
          "type": [
            "string",
            "null"
          ]
        },
        "provider_funds_expires_at": {
          "type": [
            "string",
            "null"
          ]
        },
        "refresh_plan": {
          "type": "object"
        }
      },
      "additionalProperties": false
    },
    "needsReview": {
      "type": "object",
      "required": [
        "status",
        "ok",
        "issues",
        "manifest",
        "spend_enabled"
      ],
      "properties": {
        "status": {
          "const": "needs_review"
        },
        "ok": {
          "const": false
        },
        "issues": {
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/$defs/issue"
          }
        },
        "plan": {
          "$ref": "selected-plan-execution.schema.json"
        },
        "manifest": {
          "type": "null"
        },
        "spend_enabled": {
          "type": "boolean"
        }
      },
      "additionalProperties": false
    }
  }
}