RPV | 2020-01-15 12:09:42 UTC | #1
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?
tim.smith | 2020-01-15 18:22:50 UTC | #2
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.
RPV | 2020-01-16 09:26:15 UTC | #3
Hi Tim, thanks for the reply. Will get this raised.
system | 2020-02-16 09:26:18 UTC | #4
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 6885