{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/blacksky/json-schema/blacksky-create-v2-order-request-schema.json",
  "title": "CreateV2OrderRequest",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/blacksky-orders-api-openapi.yml#/components/schemas/CreateV2OrderRequest",
  "required": [
    "dataProduct",
    "displayName",
    "featureCollection",
    "params"
  ],
  "type": "object",
  "properties": {
    "dataProduct": {
      "type": "string",
      "description": "The data product ID.",
      "format": "uuid"
    },
    "displayName": {
      "$ref": "#/$defs/OrderDisplayName"
    },
    "tags": {
      "$ref": "#/$defs/Tags"
    },
    "budgetId": {
      "type": [
        "string",
        "null"
      ],
      "description": "The ID of the budget selected for this order. Credit consumption is recorded when the order reaches a [consumption event](https://docs.up42.com/developers/api-budgets#consumption-events) associated with a specific status.\n",
      "format": "uuid"
    },
    "params": {
      "type": "object",
      "additionalProperties": true,
      "description": "Order parameters, excluding spatial geometry handled in the `featureCollection` object.\n"
    },
    "featureCollection": {
      "$ref": "#/$defs/OrderingFeatureCollection"
    }
  },
  "$defs": {
    "OrderDisplayName": {
      "maxLength": 200,
      "minLength": 1,
      "type": "string",
      "description": "A human-readable name that describes the order."
    },
    "OrderingFeature": {
      "required": [
        "type"
      ],
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "The type of geometry. The only allowed value is `Feature`.\n",
          "enum": [
            "Feature"
          ]
        },
        "geometry": {
          "$ref": "#/$defs/OrderingGeometry"
        },
        "properties": {
          "type": "object"
        }
      },
      "description": "A spatially bounded GeoJSON feature.\n"
    },
    "OrderingFeatureCollection": {
      "required": [
        "features",
        "type"
      ],
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "The type of GeoJSON object. The only allowed value is `FeatureCollection`.\n",
          "enum": [
            "FeatureCollection"
          ]
        },
        "features": {
          "type": "array",
          "description": "GeoJSON features.\n",
          "items": {
            "$ref": "#/$defs/OrderingFeature"
          }
        }
      },
      "description": "A GeoJSON feature collection.\n"
    },
    "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"
    },
    "Tag": {
      "maxLength": 180,
      "minLength": 1,
      "type": "string",
      "description": "A tag that consists of letters, numbers, spaces, and special characters (`.`, `-`, `_`, `/`, `:`).\n"
    },
    "Tags": {
      "maxItems": 30,
      "type": "array",
      "description": "A list of tags that categorize the order. A tag can consist of letters, numbers, spaces, and special characters (`.`, `-`, `_`, `/`, `:`).\n",
      "items": {
        "$ref": "#/$defs/Tag"
      }
    }
  }
}