Return multiple objects in JSON reply array in Request / Reply map

Hello

 

I'm trying to return contact objects in a JSON reply array using Scribe Online. The use case is essentially a postcode will be passed to the Scribe endpoint and then the postcode be used to query for contact records in D365CRM for possible matches.

 

Would like to return the following to the calling application:

{
"results": [
{
"dob": null,
"uniqueid": "xxxxxxx",
"firstname": "John",
"lastname": "Doe",
"addresses": [
{
"addressline1": "34 Stoney Street",
"addressline2": null,
"city": null,
"postcode": "NG11NB"
}
]
},
{
"dob": null,
"uniqueid": "xxxxxxx",
"firstname": "Frank",
"lastname": "Doe",
"addresses": [
{
"addressline1": "34 Stoney Street",
"addressline2": null,
"city": null,
"postcode": "NG11NB"
}
]
}
]
}

I know it's possible to return single records, but is it possible to return multiple? Are there other better approaches to achieve the same outcome?

 

Help appreciated!,

 

KR,

 

IW

(5) Answers

Login