Quantcast
Channel: WHMCS Community Forums
Viewing all articles
Browse latest Browse all 13458

API: quotes not working properly?

$
0
0
Hello,

I don't think the getquotes part of the API is working correctly. If I request quotes for a client that has multiple quotes in WHMCS then the WHMCSAPI:QUOTES:QUOTE:ITEMS section of the returned data appends an increment to the end of the array keys, and also skips a number in between. So, for example, on the first quote I will get:

WHMCSAPI:QUOTES:QUOTE:ITEMS:ITEM
WHMCSAPI:QUOTES:QUOTE:ITEMS:ITEM1
WHMCSAPI:QUOTES:QUOTE:ITEMS:ITEM2
WHMCSAPI:QUOTES:QUOTE:ITEMS:ITEM3
WHMCSAPI:QUOTES:QUOTE:ITEMS:ITEM4

and then the next quote is returned as:

WHMCSAPI:QUOTES:QUOTE:ITEMS6:ITEM7
WHMCSAPI:QUOTES:QUOTE:ITEMS6:ITEM8
WHMCSAPI:QUOTES:QUOTE:ITEMS6:ITEM9
WHMCSAPI:QUOTES:QUOTE:ITEMS6:ITEM10 etc

This make it very difficult for me to iterate through the returned items. I can get around the issue because the pattern is at least predictable if I count the items and add 1 between quotes, but that's hardly ideal - is this intentional or an error?

Viewing all articles
Browse latest Browse all 13458

Trending Articles