Transitioning from the TPDI API to the Planet Orders and Subscriptions APIs

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. Use these examples as a starting point and adapt them to your own collection, geometry, assets, and filters.

  1. 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 you adapt this JSON, update the collection_id, geometry, product_bundle, and item_ids to match your requirements. To find the item_ids to order, use Item Search. If your existing TPDI orders contain additional options, look them up in the TPDI API Reference and find their equivalent in the Orders API reference. For example scripts, see the Orders API example notebooks.

  1. 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"
          }
        }
      }
    ]
  }
}

The equivalent subscription through the Subscriptions API is:

{
    "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. To see which assets your productBundle includes, see Product bundles.

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. For example scripts, see the Subscriptions API example notebooks.

Was this article helpful?
1 out of 1 found this helpful

Comments

2 comments
  • I'm not sure if this is expected behaviour. The planet api return 404 on subscription id's created by tpdi endpoint.

    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?

    0
  • Hi,

    it works exactly as you found out. While IDs in the two APIs are different, the name of the Planet native subscription contains the TPDI subscription ID.

    With best regards and apologies for the late reply,

    Marjan.

    1

Please sign in to leave a comment.