Conversation Detail API - Division ID

We’ve come across an odd behaviour in the Conversation Details API and need a bit of a steer on whether it’s intended or a bug in the API.

DivisionID comes through as either an Array of Strings (if multiple division IDs exist) or a single String value (where there is only one).

For example:
"divisionIds":["4a93f08a-49f2-4852-8578-13d9758bcbec","5e7722a8-83ce-4d90-af3e-54603097d4a4"]
And
"divisionIds":"4a93f08a-49f2-4852-8578-13d9758bcbec"
Are both returned.

Typically, with JSON Arrays, in an array with a single value, the array would look like this instead:
"divisionIds":["4a93f08a-49f2-4852-8578-13d9758bcbec"]

This is causing our JSON interpreter to “throw a wobbly” (it’s a technical term!) – We can code around it if necessary in the short term, but it’s going to be messy.

Anyone know if this is a bug, known or otherwise, or intended behaviour?

That's definitely a bug; data types in API contracts are supposed to be explicit and shouldn't variably return different types. Please open a case with PureCloud Care to report this so the fix can be prioritized.

Hi Tim, thanks for the reply. Will get this raised.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.