GraphQL Integration CreateTicket Issue

I want to create a ticket in terminal using GraphQL API

I am following the tutorial in the link Integrators’ GraphQL API Guide
Also setup PM-POS and successfully run graphQL API .In the PM-POS application, no ticket creation function /API is provided . I checked the documentation there is a Mutation function createTerminalTicket(terminalId:String) .
As per my understanding If I want to create any ticket to terminal the above mutation function will be called . But I can’t get it to work .
Please help me to resolve this issue , thanks

First of all you must create a terminal. After that you can call createTerminalTicket.

terminal is already created , I am supplying the terminal Id . When I am calling the createTicket it return Id =0 . but what about table number (entityType:Table , name : "Table No ") . where can I supply table information ? can you please give me some example ?

Yes if this is normal situtation. You can use updateEntityTerminalTicket for assigning entity for that ticket

The API is self documented through the grapgIQL interface. Have you setup grapgIQL yet? You can run test functions there and it’s well documented with all possible methods.

Instructions for grapgIQL should be in the same tutorial you listed.

I have setup and running test functions there . But got stuck in particular case .

Thanks , but there is no such method updateEntityTerminalTicket in the API documentation .I have installed the latest version of SambaPOS and also run messageServer .
I cant create new ticket where I can get ticketId in return , also supply table no as entity .
Please help

The API has all documented functions. Can you not search them there?

Can you describe me what you are developing? May be i will give more info and some suggestions.

1 Like

The API has all functions listed with parameters and field . If you mean documented as description of each API and what it does ,it’s not there . And the function mentioned in the ans thread (updateEntityTerminalTicket) is not present in the documentation

He may have went on memory and got the terminology wrong but its there as I just showed.

The function you mentioned changes table on any particular ticket . I want to create a ticket on a new table

You create a terminal, then create a ticket, then change that tickets entity. But yes I agree if you can explain what you are developing it might help and Vehbi can give some advice.

Also you can add entities on creation its documented as well.

I have an android app , I want to communicate ordering process from app to the SambaPOS .The app will let select table no and place order and the order will be reflected on SambaPOS . I am following GraphQL api doc and PM-POS source code as a reference . The issue with pm-pos is like for example I have a ticket opened in table B10 , when I go back to Table screen and click new table say B11 , the ticket in B10 is transferred to B11 . I want to create new ticket with ticketId and table no . Also I am new to graphQL so if you could tell me this journey of creating ticket in any particular table and place order ,that would be great !!!

1 Like

Have you tried the Mobile app?

So your coding an Android native app?

I don’t think that will be any helpful because I am trying to develop one myself as an integration ,but sure will take a look

You don’t need to repeat yourself he can read it. I removed it because you duplicated your post. Please be patient he will respond to you.