On-add-context 400 Bad Request

Hi @Integrationsupport Team,

We sent the Care Context payload to the ABDM server, and we are getting Response Code 202.

API: v0.5/links/link/add-contexts
Request Body

{
“requestId”: “aed4a7d6-a6c4-4f2d-992d-33b89df25b68”,
“timestamp”: “2023-12-11T05:20:19.3266857Z”,
“link”: {
“accessToken”: “eyJhbGciOiJSUzUxMiJ9.eyJzdWIiOiJzd2FwbmlsZ29ubmFkZV8zQHNieCIsInJlcXVlc3RlclR5cGUiOiJISVAiLCJyZXF1ZXN0ZXJJZCI6IlNVTUEiLCJwYXRpZW50SWQiOiJzd2FwbmlsZ29ubmFkZV8zQHNieCIsInNlc3Npb25JZCI6IjYzODhkYzM5LWVhN2MtNDllZC1hZmM2LTYzMWMzYjM3YTMxNCIsImV4cCI6MTcwMjM1NzkxOCwiaWF0IjoxNzAyMjcxNTE4fQ.IJ2Pxm6TZR9QBXbz2ADvjOpQAqrpyAvaUnAvfbH-jnxP7BU1kSMMwnVZPyNAMW-tVVqzSPZXX910h3VZ5mi15v3GumUbIX1HJur7C4wbP6POBJGBQaABTAy5SJ6A4cbXPsMrweBipM7UYBePs6W1ycJpwWerr4h9MWdSCgfOcKHbVMsp-XCxL_Vkwg120MTZKa_3–s-AKgacFzgt43n1eHrYdFdedHvVW44YpSq0l9UK8-x0AOdYlkOgojnj2yEKA6YUDPhug8Y8ExF59b-XiF7U8eCHZIZ7OgV5U_dB1AAGSc49PZD9dTCKX6CvGUMjQFjDKMGKotIxttNsy3TqQ”,
“patient”: {
“referenceNumber”: “swapnilgonnade_3@sbx”,
“display”: “record for swapnil demo”,
“careContexts”: {
“referenceNumber”: “SUMA-022877”,
“display”: “testing purpose for demographics”
}
}
}
}

The response from the ABDM server is shown below.

API: v0.5/links/link/on-add-contexts
Response Body:

{
“requestId”: “666f7f6a-4cbd-4a88-b56b-d9a0cbab64e4”,
“error”: {
“code”: 2500,
“message”: “Cannot deserialize instance of java.util.ArrayList<in.projecteka.consentmanager.clients.model.CareContextRepresentation> out of START_OBJECT token\n at [Source: (io.netty.buffer.ByteBufInputStream); line: 1, column: 846] (through reference chain: in.projecteka.consentmanager.link.link.model.LinkRequest[“link”]->in.projecteka.consentmanager.link.link.model.Link[“patient”]->in.projecteka.consentmanager.clients.model.PatientRepresentation[“careContexts”])”
},
“timestamp”: [
2023,
12,
11,
5,
17,
21,
368443000
],
“resp”: {
“requestId”: “d224d76d-2b2b-461c-ade1-5d626accd237”
}
}

Can you please check and let us know.

Hi
Use list for carecontext