question

jjone avatar image
jjone asked jjone commented

/Clover/Sale returns Not Found

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.

3 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Duane Moore avatar image Duane Moore commented ·

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

0 Likes 0 ·
jjone avatar image jjone commented ·

HI, Duane

I tried direct click thru, i think its a Get

and i tried request with a Post , both NO found.?

Do you know how i can InitializeConnection? with windows REST api?

Thank you so much

0 Likes 0 ·
jjone avatar image jjone commented ·

tried both..

Anyone know how to InitializeConnection for windows REST API?

Help please!!! Thank you!!

0 Likes 0 ·

1 Answer

sophia avatar image
sophia answered jjone commented

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

4 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Jeffrey Blattman avatar image Jeffrey Blattman ♦♦ commented ·

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?

0 Likes 0 ·
jjone avatar image jjone commented ·

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
0 Likes 0 ·
jjone avatar image jjone commented ·

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

0 Likes 0 ·
sophia avatar image sophia commented ·

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 :).

0 Likes 0 ·

Welcome to the
Clover Developer Community