{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rallyprop-ai/json-schema/rallyprop-ai-opportunity-detail-schema.json",
  "title": "OpportunityDetail",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/rallyprop-ai-openapi-openapi.json#/components/schemas/OpportunityDetail",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "data",
    "meta"
  ],
  "properties": {
    "data": {
      "$ref": "#/$defs/Opportunity"
    },
    "meta": {
      "$ref": "#/$defs/RequestMeta"
    }
  },
  "$defs": {
    "Opportunity": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "source",
        "title",
        "summary",
        "description",
        "status",
        "status_display",
        "organization",
        "program",
        "funding",
        "dates",
        "classifications",
        "eligibility",
        "contacts",
        "value_estimate",
        "relationships",
        "created_at",
        "updated_at"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "source": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "code",
            "name",
            "opportunity_id",
            "url"
          ],
          "properties": {
            "code": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "opportunity_id": {
              "type": "string"
            },
            "url": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        },
        "title": {
          "type": "string"
        },
        "summary": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Source text. May contain HTML. Sanitize before rendering."
        },
        "status": {
          "type": "string",
          "description": "Known values: forecast, pre_release, open, closing_soon, closed, awarded, cancelled, archived. Unknown values can appear; render them."
        },
        "status_display": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "organization": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "agency",
            "sub_agency",
            "issuing_office"
          ],
          "properties": {
            "agency": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "sub_agency": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "issuing_office": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        },
        "program": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "solicitation_id",
            "solicitation_title",
            "contract_class"
          ],
          "properties": {
            "type": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "solicitation_id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "solicitation_title": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "contract_class": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        },
        "funding": {
          "anyOf": [
            {
              "type": "null"
            },
            {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "currency",
                "amount_min",
                "amount_max",
                "display"
              ],
              "properties": {
                "currency": {
                  "type": "string",
                  "const": "USD"
                },
                "amount_min": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "amount_max": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "display": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              }
            }
          ]
        },
        "dates": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "posted_at",
            "opens_at",
            "closes_at",
            "response_at"
          ],
          "properties": {
            "posted_at": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "opens_at": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "closes_at": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "response_at": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        },
        "classifications": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "keywords",
            "technology_areas",
            "tech_taxonomy",
            "naics_codes",
            "set_aside_types"
          ],
          "properties": {
            "keywords": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "technology_areas": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "tech_taxonomy": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "naics_codes": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "set_aside_types": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        },
        "eligibility": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "requirements",
            "geographic_scope"
          ],
          "properties": {
            "requirements": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "geographic_scope": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        },
        "contacts": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "name",
              "email",
              "phone",
              "role"
            ],
            "properties": {
              "name": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "email": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "phone": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "role": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          }
        },
        "value_estimate": {
          "const": null
        },
        "relationships": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "parent_id",
            "canonical_id"
          ],
          "properties": {
            "parent_id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "canonical_id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "RequestMeta": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "request_id"
      ],
      "properties": {
        "request_id": {
          "type": "string"
        }
      }
    }
  }
}