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.”