Integrator's GraphQL API Guide


Hi @emre

Yes, I understand, but I am doing a lot of manipulation to the raw SQL data to display it in a format (with caching) that our staff can have at their fingertips on their phones/tablets in the dive center.

In the screen shot below you can see the result. This is essentially taking a whole bunch of order and their associated order tags to group the orders by dive trip and additional tags are used to link instructors to clients in the left hand column (the series of colored letters). Also, the equipment (BCD, Reg, Mask etc…) are taken from the customer entity. The resulting web page if very quick to load and is available everywhere they have their phones.

What I am trying to do is to make small things available to edit right from this web page, for example I want to be able to quikcly and easily change the “DIN” order tag to “Yoke” - This does not have a price associated with it, it is purely there for planning purposes.

I know the design does not look great, but this is a lot of information displayed on just one screen and I have gone for a design that closes mimicks the original paper based system that we have used for years (I didn’t want to throw too many changes at the team at once!).


is there any query to get list of all menus that we have without writing exact menu name?


All queries are documented in the graphiql interface.


I see, but there is only getMenu query with “name” argument. I was asking, maybe there is another option to load full list of menus at once? As i know sambapos mobile client also works with messaging server and it provides with list of menus that we have in database without writing exact name.


If a full list of menus isnt available at the minute as a backup alternative you could make a simple SQL query to DB to get a list of menu names or if remote and no easy DB direct access you could program in a list on menu names. Surely the menu names wont change too often.


Mobile client has some functions that were coded directly into message server that are not using graphql. It used to use an app for it but they built it into message server.


No there isnt a query like that for now. Bu i noted that

1 Like

How to print bill through GraphQL API.?


You need to be more specific because if you are using the terminalticket functions it will use the automation in Sambapos for printing.


I am trying to print a ticket from Api.
But this code is not working .


Just want to print a ticket by giving the ticketID from API .


I do not think executePrintJob is a gql query. Have you verified that is available? I could be wrong I have not used it in a while.

1 Like

yes this is querry(mutation) i checked this in the docs.

1 Like

According to the API it worked… are you executing the gql from the computer the printer is attatched to?


Yes , the same system where samba is running.
Printer are configured in this system.
Printers are network printers.


Ok so order states PAID do not exixt… It should be Submitted or New. Paid is a ticket state not order state.

1 Like

Ok . What if i dont want to play with order states.
Just want to give the ticket number and it will print that ticket without playing with the states of the orders.


You need to tell it what to print. Are you trying to print submitted tickets?


Just take the states part of the gql out then.


Please don’t create multiple topics for this it won’t get you help faster. This post is enough.