As part of the transition away from the TPDI API for Planet data, this article shows example mappings for a PlanetScope order and subscription in the Planet Insights Platform APIs. These examples are intended as a starting point and should be adapted to match your own collection, geometry, assets, and filters.
- Transitioning a PlanetScope order from TPDI API to Planet Insights Platform Orders API
For a PlanetScope TPDI order like this:
{
"name": "My PSScene Order",
"collectionId": "<optional>",
"input": {
"provider": "PLANET",
"bounds": {
"geometry": {
"type": "Polygon",
"coordinates": [
[
[ 12.44693, 41.870072 ],
[ 12.54100, 41.870072 ],
[ 12.54100, 41.917096 ],
[ 12.44693, 41.917096 ],
[ 12.44693, 41.870072 ]
]
]
}
},
"data": [
{
"itemType": "PSScene",
"productBundle": "analytic_sr_udm2",
"harmonizeTo": "NONE",
"itemIds": [
"20260111_102817_73_2531"
]
}
]
}
}The equivalent order through Orders API is:
{
"name": "My PSScene Order",
"products": [
{
"item_ids": [
"20260111_102817_73_2531"
],
"item_type": "PSScene",
"product_bundle": "analytic_sr_udm2"
}
],
"hosting": {
"sentinel_hub": {
"collection_id": "<optional>"
}
},
"tools": [
{
"clip": {
"aoi": {
"coordinates": [
[
[ 12.44693, 41.870072 ],
[ 12.54100, 41.870072 ],
[ 12.54100, 41.917096 ],
[ 12.44693, 41.917096 ],
[ 12.44693, 41.870072 ]
]
],
"type": "Polygon"
}
}
}
]
}When adapting this JSON for your own use, please make sure to update the collection_id, geometry, product_bundle, and item_ids to match your specific requirements. To find the item_ids to order, please use Item Search. If your existing TPDI orders contain additional options, please look them up in the TPDI API Reference and find their equivalent in the Orders API reference. You can find some example scripts here.
Transitioning a PlanetScope TPDI Subscription to Planet Insights Platform Subscriptions API
For a PlanetScope TPDI subscription like this:
{
"name": "My PSScene Subscription",
"collectionId": "<optional>",
"input": {
"provider": "PLANET",
"bounds": {
"geometry": {
"type": "Polygon",
"coordinates": [
[
[ 12.44693, 41.870072 ],
[ 12.54100, 41.870072 ],
[ 12.54100, 41.917096 ],
[ 12.44693, 41.917096 ],
[ 12.44693, 41.870072 ]
]
]
}
},
"data": [
{
"itemType": "PSScene",
"productBundle": "analytic_sr_udm2",
"harmonizeTo": "NONE",
"dataFilter": {
"timeRange": {
"from": "2023-06-01T00:00:00Z",
"to": "2023-06-01T23:59:59Z"
}
}
}
]
}
}An equivalent Planet subscriptions would be:
{
"name": "My PSScene Subscription",
"source": {
"type": "catalog",
"parameters": {
"item_types": [
"PSScene"
],
"asset_types": [
"ortho_analytic_4b_sr",
"ortho_udm2",
"ortho_analytic_4b_xml"
],
"time_range_type": "acquired",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[ 12.44693, 41.870072 ],
[ 12.54100, 41.870072 ],
[ 12.54100, 41.917096 ],
[ 12.44693, 41.917096 ],
[ 12.44693, 41.870072 ]
]
]
},
"start_time": "2023-06-01T00:00:00Z",
"end_time": "2023-06-01T23:59:59Z"
}
},
"hosting": {
"type": "sentinel_hub",
"parameters": {
"collection_id": "<optional>"
}
}
}Key changes for Subscriptions include updating the collection_id, geometry, start_time, and end_time. Note that the TPDI productBundle is replaced by the asset_types list in the Subscriptions API. Please refer to https://docs.planet.com/develop/apis/orders/product_bundles/ to see which assets your productBundle includes.
If your existing TPDI subscriptions contain additional options, please look them up in the TPDI API Reference and find their equivalent in the Subscriptions API reference. You can find some example scripts here.
Comments
It seems that the TPDI subscriptions and Planet's native Subscriptions API are different subscription IDs.
A subscription ID created through the TPDI endpoint is not be found when queried against the Planet Subscriptions API. Seems they are not interchangeable
Using the Planet Subscriptions API (not the TPDI endpoint) I've been doing GET lookup using the "subscription.name" or name contains, and this then picks up the subscription, which then provides the planet subscription ID.
Let me know the thoughts on this?
Please sign in to leave a comment.