0

HI, Support

im working with windows REST api, https://docs.clover.com/build/getting...

Is this how i initialize ? i call a url request to
/Clover/InitializeConnection

/Clover/Sale both returns

Not Found

Please help. Thank you.

asked 2016-08-22 20:49:55 -0500

jjone gravatar image
Comments

How are you invoking the service? Are you using POST vs. GET?

Duane Moore gravatar image
Duane Moore 2016-08-23 11:12:15 -0500

tried both..

Anyone know how to InitializeConnection for windows REST API?

Help please!!! Thank you!!

jjone gravatar image
jjone 2016-08-24 08:22:51 -0500

1 answer

Sort by  
0

Hi jjone,

Almost all of the requests you'll make using our REST api are POST requests, and so won't be something you can make straight from the browser. Currently, the only GET request is http://localhost:8181/Clover/Status.

For all other endpoints, you can use a service like postman. You must download the executable posted on the github readme (detailed instructions here: https://docs.clover.com/build/downloa...) and run the installer in order to set up the windows service on your desktop/laptop/device. The endpoint you are querying is straight to that service, and the service will then send the appropriate messages via USB connection to the Mini.

Best, Sophia

answered 2016-08-24 16:49:15 -0500

sophia gravatar image
Comments

Please let us know if this resolves your problem. And can you please confirm you are getting an HTTP 404 when you used the wrong HTTP method?

jeff gravatar image
jeff 2016-08-25 10:50:42 -0500

not working.

Json return: http://localhost:8181/Clover/Sale * Trying 127.0.0.1... * Connected to localhost (127.0.0.1) port 8181 (#0)

POST /Clover/Sale HTTP/1.1

Host: localhost:8181

User-Agent: POS/Curl

Accept-Encoding: deflate, gzip

Accept: application/json

Content-Type: application/json

Content-Length: 0

Connection: keep-alive

  • upload completely sent off: 3 out of 3 bytes < HTTP/1.1 200 OK

< Content-Length: 0

< Server: Microsoft-HTTPAPI/2.0

< Date: Fri, 26 Aug 2016 01:52:22 GMT

<

  • Connection #0 to host localhost left intact
jjone gravatar image
jjone 2016-08-25 20:53:48 -0500

Hi, Jeff

I used Postman, suggested by Sophia.

I made POST to /Clover/Sale

with sale request json copied from https://docs.clover.com/build/getting...

It gave me HTTP/1.1 200 OK, nothing more.

i was expecting a sale screen with total amount on my Clover Mini, but i got nothing.

Did i do something wrong? Thank you so much for your help!!!

Justin

jjone gravatar image
jjone 2016-08-26 09:17:37 -0500

Hi Justin,

When you make a GET request to http://localhost:8181/Clover/Status do you receive a response with this status: {"Status":"Disconnected"} ?

Receiving a 200OK simply means that the REST service running on your desktop received the request and processed it. It does not mean the Mini got the message :).

sophia gravatar image
sophia 2016-09-09 15:40:53 -0500