Jump to content

API: quotes not working properly?


swilders

Recommended Posts

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?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated