{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/blacksky/json-schema/blacksky-list-tasking-order-opportunities-v2-response-schema.json",
  "title": "ListTaskingOrderOpportunitiesV2Response",
  "description": "The cost estimation.\n",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/blacksky-tasking-api-openapi.yml#/components/schemas/ListTaskingOrderOpportunitiesV2Response",
  "required": [
    "errors",
    "results"
  ],
  "type": "object",
  "properties": {
    "results": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "index": {
            "type": "number",
            "description": "The geometry index number. Indexing starts from zero.\n",
            "format": "int32"
          },
          "opportunities": {
            "type": "object",
            "properties": {
              "features": {
                "type": "array",
                "description": "GeoJSON features.\n",
                "items": {
                  "$ref": "#/$defs/OpportunitiesV2ResponseFeature"
                }
              },
              "status": {
                "type": "string",
                "description": "The status of the tasking opportunities search."
              },
              "type": {
                "type": "string",
                "description": "The type of GeoJSON object. The only allowed value is `FeatureCollection`.\n",
                "enum": [
                  "FeatureCollection"
                ]
              }
            }
          }
        },
        "description": "Results for each of the specified geometries.\n"
      }
    },
    "errors": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/BatchEndpointErrorDetail"
      }
    }
  },
  "$defs": {
    "BatchEndpointErrorDetail": {
      "required": [
        "details",
        "index",
        "message"
      ],
      "type": "object",
      "properties": {
        "index": {
          "type": "number",
          "description": "The failed geometry index number.\n"
        },
        "message": {
          "type": "string",
          "description": "The error message associated with the failed geometry."
        },
        "details": {
          "type": "string",
          "description": "Error message details."
        }
      },
      "description": "Errors associated with individual geometries returned by batch endpoints, including validation failures due to AOI size or vertex-count limits.\n"
    },
    "OpportunitiesV2ResponseFeature": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "The type of GeoJSON object. The only allowed value is `Feature`.\n",
          "enum": [
            "Feature"
          ]
        },
        "geometry": {
          "allOf": [
            {
              "type": "object",
              "description": "The geometry of the tasking opportunity."
            },
            {
              "$ref": "#/$defs/OrderingGeometry"
            }
          ]
        },
        "properties": {
          "type": "object",
          "additionalProperties": true,
          "description": "The metadata properties of the tasking opportunity."
        },
        "id": {
          "type": "string",
          "description": "The ID of the tasking opportunity."
        }
      },
      "description": "A tasking opportunity."
    },
    "OrderingGeometry": {
      "required": [
        "coordinates",
        "type"
      ],
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "The type of geometry.",
          "enum": [
            "Polygon",
            "Point"
          ]
        },
        "coordinates": {
          "description": "The coordinates.",
          "oneOf": [
            {
              "type": "array",
              "items": {
                "type": "array",
                "items": {
                  "minItems": 2,
                  "type": "array",
                  "items": {
                    "type": "number",
                    "format": "double"
                  }
                }
              }
            },
            {
              "type": "array",
              "items": {
                "type": "number",
                "format": "double"
              }
            }
          ]
        },
        "crs": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "description": "The parameter defining the CRS."
            },
            "properties": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The name of the CRS."
                }
              }
            }
          },
          "description": "The CRS of the order."
        }
      },
      "description": "The geometry in the GeoJSON format.\n"
    }
  }
}