Integrator's GraphQL API Guide


#181

Ok if it’s batter than that installer than i will must use this. I love customization liberty. Thank You


#182

I followed this tutorial and successfully intigrated gloriafood. Now i have a problem. VAT is missing. If i put items manually from POS than its correct. But online order doesn’t have VAT.


#183

cmd%20gloria

I am getting this error after I run “node script.js”
How do I fix this?


#184

SyntaxError: Unexpected token < in JSON at position 0

It means the server/site is not returning properly formatted JSON string.

It is likely returning an error message (page) instead, which cannot be parsed as JSON, because the page starts with something like <!DOCTYPE html> or <html> or whatever (ie. the < in JSON at position 0 part of the error message), which is found in the beginning of a webpage, which is not JSON.

A possible cause of this is that you are not sending a good message request to the server in the first place, so it gives an error page in response. It could be telling you that you are not authenticated, or your request is bad/unknown, or the site is down, or your internet is down, or…


#185

How do I make it so that it/we sends/receives a correctly formatted JSON string?

edit: I pinged google.com on the same cmd window, so that does mean I have internet access.
cmd%20gloria


#186

Can I see your script? I do not have access to that category.


#187

I use the official gloriafood integration and no longer use this method. The official integration works really well.


#188

My Delivery Rules and Actions are heavily modified compared to the default one. Would it still work?


#189

Yes. It just works. You can design a flow around it easily.


#190

Where i can find Form Data in Token?8861fc5689405cc19516a17e3f7bf7afe0fc63ab_1_690x587 !

i don’t have it in dev tools


#191

Form data is surly the data submitted as part of the request?


#192

Sorry, i don’t get your question. Should i include username and password in token link?


#193

I don’t understand your question.
You get error saying invalid client ID.
Are they both screenshot of your system or from forum?


#194

Oh, sorry, my bad. First one is Emre’s image, the second one is mine. As you can see, in the second image there is no Form Data section. So, my question is how i can get that Form Data?


#195

Show your request.
Your getting invalid client id, are you not passing any data into the request?


#196

I entered http://localhost:9000/Token and after that if i enter to Chrome Dev Tools i cannot find that Form Data section with grant_type, username, password, client_id and client_secret fields to enter. I want to get the same error “Client ‘pmpos’ is not registered in the system” as in Emre’s image. But i cannot find those fields.


#197

Do you want to login GraphQL query screen? It’s address is http://localhost:9000/Login
If you want to write code to login our message server yes thats post address is http://localhost:9000/Token
Please write us what you want to do?


#198

i want to get access token


#199

Login from login screen right click and choose inspect. So you can see the token


#200

How to find the terminal id ?

I am trying to test the payTerminalTicket mutation.

This is what i have done: -

  1. In my system where sambapos is installed, i placed couple orders in the POS on few tables.
  2. I tried to use payTerminalTicket but it requires terminal ticket ID, so i registered terminal using GQL on browser console.Now it showed the terminal Id which it created.
  3. But when i ran the mutation this time using that terminal ID, it throws error, no ticket found
    i think it is saying that no ticket was created using that terminal ID.
  4. So i created ticket and placed orders using that Teminal ID. and then used the mutation, it worked.

But my question is how can i use mutation for already placed orders using the POS Terminal. WHat is the terminal ID of that system, how can i find that ID ?

Can you help please ?