Skip to main content

Hello,


I’m trying to use the Subscription API to acquire PlanetScope data. When using the Request Builder, i get a weird error: Published DateRange Filter ‘gt’ or ‘gte’ value must be in the future.

Here is the request example (api key is removed):


curl -X POST https://services.sentinel-hub.com/api/v1/dataimport/subscriptions  -H 'Content-Type: application/json'  -H 'Authorization: Bearer eyJraWQiOiJzaCIsImFsZyI6IlJTMjU2In0.eyJzdWIiOiI1NTM2MWQwZS1iMTM0LTQ4ZTgtOWYyOS0zZjIwZDE4N2EwMDAiLCJhdWQiOiIwZjYxZDM4NS01YzhiLTQ0ZjktYTE1NC0yYWRmNTFkNTAxNDEiLCJqdGkiOiJmZGJmZGQ1ZS1jYWNkLTRkYTAtYTJlYS1jMjMzMmY5MjFlMjMiLCJleHAiOjE2NDczMDkwMDEsIm5hbWUiOiJEYXJpbyBWdWxqYW5rbyIsImVtYWlsIjoiZ29sZkAzZC1lbXMuY29tIiwiZ2l2ZW5fbmFtZSI6IkRhcmlvIiwiZmFtaWx5X25hbWUiOiJWdWxqYW5rbyIsInNpZCI6ImE5NTc5MzEyLTc5ZTctNDk2YS05NjI5LWZhZjAwNTI1YzdjMiIsIm9yZyI6IjNkMzEzOTdmLTc3MGEtNGY5OC05MzU4LTg0ZTkxODQ5MTc0NSIsImRpZCI6MSwiYWlkIjoiMmNkNmNlNDUtZmQ4Ny00OWUxLWIwN2YtMzQ0ZWEyM2E1NDVhIiwiZCI6eyIxIjp7InJhIjp7InJhZyI6MX0sInQiOjEzMDAwfX19.INkdELtJyrIC1Yi9XBLLvY3a4i0f5ZEZRDSKJf68tay3TgKCIPFUyq1ye6DwtDPxbgj_c1BC-vDumrPcgPb6wCwdVJMdoxMEEl7vFt-vap8J_h-3APJokFc4ij1UKJys6M3km-f_p656fZAxwAjoqDH6vresXp63hf2xg-NAZVRTTg9aBV0ycGFTbFIpAyaRZbSqJe_CBIbkhyNBnxXmH4XP3FyV44n-9nRmnAWyv6s4hX13_NHIdefxglH9KUTpIfbCKxvAnbZhlcZyarrb9dQ-AYzMcbsHYWLfiVCoOgp3WbDI3Yl4EEqDoYho9mG-1DN-LuDt8-ae1twap2BP6w'  -d '{  "input": {    "provider": "PLANET",    "planetApiKey": "xxxx",    "bounds": {      "bbox":          15.882444,        45.772193,        15.904513,        45.785632      ]    },    "data":        {        "itemType": "PSScene4Band",        "productBundle": "analytic_sr_udm2",        "dataFilter": {          "timeRange": {            "from": "2022-01-01T00:00:00Z",            "to": ""          },          "maxCloudCoverage": 10        },        "harmonizeTo": "NONE"      }    ]  },  "name": "Planet Sub v1"}'

whichs respons that the subscription is CREATED. But then when trying to confirm it (with start option in the request builder GUI or through CLI):


curl -X POST https://services.sentinel-hub.com/api/v1/dataimport/subscriptions/6fe56e6b-a736-46c7-81d0-72a5345e6176/confirm  -H 'Content-Type: application/json'  -H 'Authorization: Bearer eyJraWQiOiJzaCIsImFsZyI6IlJTMjU2In0.eyJzdWIiOiI1NTM2MWQwZS1iMTM0LTQ4ZTgtOWYyOS0zZjIwZDE4N2EwMDAiLCJhdWQiOiIwZjYxZDM4NS01YzhiLTQ0ZjktYTE1NC0yYWRmNTFkNTAxNDEiLCJqdGkiOiJmZGJmZGQ1ZS1jYWNkLTRkYTAtYTJlYS1jMjMzMmY5MjFlMjMiLCJleHAiOjE2NDczMDkwMDEsIm5hbWUiOiJEYXJpbyBWdWxqYW5rbyIsImVtYWlsIjoiZ29sZkAzZC1lbXMuY29tIiwiZ2l2ZW5fbmFtZSI6IkRhcmlvIiwiZmFtaWx5X25hbWUiOiJWdWxqYW5rbyIsInNpZCI6ImE5NTc5MzEyLTc5ZTctNDk2YS05NjI5LWZhZjAwNTI1YzdjMiIsIm9yZyI6IjNkMzEzOTdmLTc3MGEtNGY5OC05MzU4LTg0ZTkxODQ5MTc0NSIsImRpZCI6MSwiYWlkIjoiMmNkNmNlNDUtZmQ4Ny00OWUxLWIwN2YtMzQ0ZWEyM2E1NDVhIiwiZCI6eyIxIjp7InJhIjp7InJhZyI6MX0sInQiOjEzMDAwfX19.INkdELtJyrIC1Yi9XBLLvY3a4i0f5ZEZRDSKJf68tay3TgKCIPFUyq1ye6DwtDPxbgj_c1BC-vDumrPcgPb6wCwdVJMdoxMEEl7vFt-vap8J_h-3APJokFc4ij1UKJys6M3km-f_p656fZAxwAjoqDH6vresXp63hf2xg-NAZVRTTg9aBV0ycGFTbFIpAyaRZbSqJe_CBIbkhyNBnxXmH4XP3FyV44n-9nRmnAWyv6s4hX13_NHIdefxglH9KUTpIfbCKxvAnbZhlcZyarrb9dQ-AYzMcbsHYWLfiVCoOgp3WbDI3Yl4EEqDoYho9mG-1DN-LuDt8-ae1twap2BP6w'

Screenshot from 2022-03-14 22-36-14


I have read in the docs that “To” parameter should be set to " " for the ongoing subscription but I have also tried to set it to a different date in the future but get the same error (from above).


What am I missing?

This is probably due to your Planet account not beeing configured yet, as you did not follow-up with the steps requested.

Can you try now?


You were right! Thanks. Weird error response for invalid key though.


Reply