Zoho Inventory API - List All Item Groups returns invalid JSON
Hello,
I have been using Zoho Inventory API, I raised this problem to your team nearly a year ago and had to work around it, but it seems your system is still returning an invalid JSON response.
The details:
When using the Inventory API resource for Item Group "GET /itemgroups/" the response received is not in the format described by the API docs. The doc
here describes a JSON where the item groups are returned as a collection, as so:
- {
- "code": 0,
- "message": "success",
- "itemgroups": [
- {
- "group_id": 622547000000193091,
- "group_name": "Bags",
- "product_type": "goods",
- ........
- },
- {...},
- {...}
- ]
- }
Which would be fine, except instead of the documented format I receive a response with JSON in the following form:
- {
- "code": 0,
- "message": "success",
- "itemgroups": {
- "group_id": 622547000000193091,
- "group_name": "Bags",
- "product_type": "goods",
- ........
- },
- "itemgroups": {
- ......
- },
- "itemgroups": {
- ......
- },
- "itemgroups": [
- {
- "group_id": 622547000000193091,
- "group_name": "Bags",
- "product_type": "goods",
- ........
- },
- {...},
- {...}
- ]
- }
As you can see the response I receive has the 'item_groups' field repeated as an object of each Item Group, and also receive an 'item_groups' field as a collection of each Item Group.
Using a statically typed language I have no reliable way of parsing this absurd deviation of a JSON response. I haven't event been able to parse the content with third party tools because it is simply an invalid JSON.
I imagine this response is an error because I don't believe any other resources provide this kind of response.
Please issue a fix because I have hit a wall because of this problem.
Thanks,
Sam Morrison