Posted: January 25, 2014 at 7:46 am
|
when querying /events/, trying to get ‘tickets_left’ – that returns null , while instead I have a figure under [prices][remaining] that seems to correspond with the number of tickets allocated, albeit in negative format – whats occurring? |
|
bump.. |
|
Hi Tristan, I’ll ping a developer to see if they can answer this for you. Please note, we *try* to respond to forum posts in date order, bumping a forum post will only send it to the end of the queue, resulting in a possible longer response time. |
hi Tristan, Datetime.ticket_left probably shouldn’t be NULL. What version of the API addon are you using?
|
|
|
2.1p, although i running 3.1.35.2.P EE Core at mo. If you want I can printr the array? |
You can also print out the array by appending .pretty_json to the url. Example: https://eventespresso.com/wiki/api-addon/#api_test |
|
|
this is what i am getting – for this event the backend shows 33/220 [ie 33 tickets are allocated – all pending or completed] so I would expect the tickets left to be 187 – rather than -10. The -10 figure is actually relating to the number of separate bookings for the event (I have tested) and in the sub array of [prices] the [remaining] figure in both cases is -33 – ie the actual number of tickets sold – I have tested decreasing the number of tickets sold and the [remaining] figure changes to reflect it. [218] => Array ( |
|
when i earlier said tickets left was coming up as null I just meant it wasn’t corresponding with anything meaningful – I only worked out afterwards that it actually is corresponding to the number of bookings [each booking has multiple tickets] |
|
Hi Tristan, It looks like an issue with the latest API, as when swapping from 2.0.4 to 2.1 the issue occurred. I will raise a dev ticket to look into this in more depth. Thanks for bringing this to our attention! |
|
thank you, please let me know the outcome asap as coding this app for the json api is holding us up on switching to EE. |
|
I’ll note the ticket accordingly. |
|
I don’t suppose there is an update on progress on this issue is there? |
There is actually- we found it was a bug and have a hotfix that’s getting tested right now |
|
|
Testing has looked good, I have passed it back to the developers to check over and add to the next release (hotfix). |
|
great news 🙂 |
Hi Tristen, The hotfix has been released. Can you test and let us know if you are still having an issue? |
|
|
thank you! where do i get the hotfix from? |
|
Hi Tristan, You can obtain the latest version of any plugin from your Event Espresso account page. |
|
thanks, will let you know how it goes. |
|
No problem and please do! |
|
Hi, With the hotfix api version active the api doesnt respond; in trying to get a session key I get nothing with: whereas with 2.1p i get also, apache log shows: PHP Fatal error: Call to a member function get() on a non-object in /home/mydomain.com/html/wp-includes/cache.php on line 113 if i switch back to 2.1p the error goes away and i can authenticate and get data |
Hi there, Jonathan was not aware that the hotfix for the JSON API had not been released yet. I wanted to let you know that we published it to the site a few hours ago and it’s available to download now. |
|
|
ah yes – i was using the pre pre version.. doh the new version is giving valid information now – seems ok but i need to finish the app i am working on to be sure, but at first glance looks fixed, thanks. |
|
Please let us know if the situation changes. |
The support post ‘json – output from /events/ doesnt match docs description’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.