Posted: August 15, 2019 at 10:49 pm
I created a ticket using the API.
This creates the ticket. I see this data:
I also see the same data when I GET tickets resource.
Then, I associate this ticket to a datetime like this:
Finally, I look at it in the Admin UI and it shows blank in the price box.
Let me know if you can reproduce this behavior or if you see something I am doing wrong with the API call.
I also tried using int (399) rather than 399.00 – same result.
Although you’ve created a ticket and set the price to the ticket object you haven’t created a price object and linked it to the ticket.
You need to create a price object with the relevant details (
Thank you for the quick reply!
I see… I was missing a relation. But, how can that field in tickets accept a price if the price (and price_type) is supposed to be set in the price model and joined with ticket_price? It looks like that data was accepted, it appears to be part of the json data returned by the GET, but then it is not available to the UI (I understand the UI is probably using the models directly instead of querying the API).
Just pointing that out since there is an inconsistency in the data being returned as if it was correctly registered, when in fact it was not.
Anyway, I found this page with a nice diagram that helps to understand:
Let me know if you agree that the json data is confusing to see when it’s not “real.”
The admin pulls the ticket and the price objects (because a ticket can have more than a single price relation with modifiers etc) which is why it is not shown in the admin UI without the ticket_price relation.
Sort of, the TKT_price value has been set and that’s what displays on the JSON output but the price relationship wasn’t set.
Whilst I get your point, the data set and shown was correct, you set a TKT_price value and that value was returned correct, if you checked for a valid relationship and it used the TKT_price to show the value on that relation, I’d agree, but I don’t think we can show a missing relationship easily with the current setup.
I’ll create a ticket and provide this feedback to the team so we can discuss this further.
The support post ‘Create Ticket with API. TKT_price is set but not visible on EE Admin UI’ 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.