I am using the subscription API for subscribing AOI to Planet but getting BAD Request in response
Request:
POST https://services.sentinel-hub.com/api/v1/dataimport/subscriptions
{
"name": "Headland-HL1",
"collectionId": "4f7d7518-9333-MASKED",
"provider": "PLANET",
"input": {
"bounds": {
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
118.5200492301355,
-20.35358590810601,
0.0
],
[
118.525520243307,
-20.35208216090831,
0.0
],
[
118.5315806188978,
-20.35010044578434,
0.0
],
[
118.5367336293801,
-20.34862457841812,
0.0
],
[
118.5366380365892,
-20.34592213640495,
0.0
],
[
118.5342566976348,
-20.34370844044746,
0.0
],
[
118.5177951152882,
-20.34922553133238,
0.0
],
[
118.5200492301355,
-20.35358590810601,
0.0
]
]
]
},
"properties": {}
},
"data": [
{
"dataFilter": {
"timeRange": {
"from": "2021-12-28T00: 00: 00Z",
"to": "2024-01-30T23: 59: 59Z"
},
"maxCloudCoverage": 100.0
},
"itemType": "PSScene4Band",
"productBundle": "analytic_sr_udm2",
"harmonizeTo": "NONE"
}
],
"planetApiKey": "xxx",
"provider": "PLANET"
}
}
Response:
{
"error": {
"status": 400,
"reason": "Bad Request",
"message": "Band mismatch. Ordered [band "B1" (source = "B1", bandIndex = 1 and bitDepth = 16), band "B2" (source = "B2", bandIndex = 1 and bitDepth = 16), band "B3" (source = "B3", bandIndex = 1 and bitDepth = 16), band "B4" (source = "B4", bandIndex = 1 and bitDepth = 16), band "UDM" (source = "UDM", bandIndex = 1 and bitDepth = , band "UDM2_Clear" (source = "UDM2_Clear", bandIndex = 1 and bitDepth = , band "UDM2_Cloud" (source = "UDM2_Cloud", bandIndex = 1 and bitDepth = , band "UDM2_Confidence" (source = "UDM2_Confidence", bandIndex = 1 and bitDepth = , band "UDM2_HeavyHaze" (source = "UDM2_HeavyHaze", bandIndex = 1 and bitDepth = , band "UDM2_LightHaze" (source = "UDM2_LightHaze", bandIndex = 1 and bitDepth = , band "UDM2_Shadow" (source = "UDM2_Shadow", bandIndex = 1 and bitDepth = , band "UDM2_Snow" (source = "UDM2_Snow", bandIndex = 1 and bitDepth = 8)] but collection contains [band "B1" (source = "B1", bandIndex = 1 and bitDepth = 16), band "B2" (source = "B2", bandIndex = 1 and bitDepth = 16), band "B3" (source = "B3", bandIndex = 1 and bitDepth = 16), band "B4" (source = "B4", bandIndex = 1 and bitDepth = 16), band "UDM" (source = "UDM", bandIndex = 1 and bitDepth = , band "UDM2_Clear" (source = "UDM2_Clear", bandIndex = 1 and bitDepth = , band "UDM2_Cloud" (source = "UDM2_Cloud", bandIndex = 1 and bitDepth = , band "UDM2_Confidence" (source = "UDM2_Confidence", bandIndex = 1 and bitDepth = , band "UDM2_HeavyHaze" (source = "UDM2_HeavyHaze", bandIndex = 1 and bitDepth = , band "UDM2_LightHaze" (source = "UDM2_LightHaze", bandIndex = 1 and bitDepth = , band "UDM2_Shadow" (source = "UDM2_Shadow", bandIndex = 1 and bitDepth = , band "UDM2_Snow" (source = "UDM2_Snow", bandIndex = 1 and bitDepth = 8)]",
"code": "COMMON_BAD_PAYLOAD"
}
}
Problem is that the collection was already being used for analytic_sr_udm2
data and the message in response
“message”: Band mismatch. Ordered … vs collection contains …
itself show the same band configuration. So there shouldn’t be an issue with subscription.
I have tried the similar collection for subscription with the web portal there it created the subscription successfully but via API it is throwing the error.