sdk.order.create()

elements.sdk.api.order

Create a data order.

Create a new order to acquire data from an external data provider. Orders specify the data source, product specification, and optionally a clipping geometry.

Parameters

  • data_source_id (str) - The ID of the data source to order from
  • product_spec_name (str) - The name of the product specification
  • scene_id (str) - The scene ID to order
  • [Optional] clip_geom (BaseGeometry) - Shapely geometry to clip the order to
  • [Optional] metadata (dict) - Additional metadata for the order

Returns

Order - The created order object

Example(s)

from shapely.geometry import Polygon

# Create an order without clipping
order = await sdk.order.create(
    data_source_id="planet-imagery",
    product_spec_name="analytic_udm2",
    scene_id="20230615_123456_ssc1"
)

# Create an order with a clipping geometry
clip_polygon = Polygon([
    (-122.5, 37.7),
    (-122.5, 37.8),
    (-122.4, 37.8),
    (-122.4, 37.7),
    (-122.5, 37.7)
])

order = await sdk.order.create(
    data_source_id="planet-imagery",
    product_spec_name="analytic_udm2",
    scene_id="20230615_123456_ssc1",
    clip_geom=clip_polygon,
    metadata={"project": "my-project"}
)

# Output (Order)
id: "order-uuid-here"
state: PENDING
data_source_id: "planet-imagery"