Per the documentation I linked the objectId/eventId contains an event type key (see the docs) followed by an object id. For the case of an order the eventId will be O:orderId. You will need to parse the event id, the text after the ":" is the orderId. I just verified this with a test webhook. You can then use the REST API to obtain the order /v3/merchants/{mid}/orders/{orderId}?access_token={access_token}.
You can enter any ID and it will return something. When I enter the objectID that does not reflect the orderid in the clover device, it returns a blank response when there are line items in the order.
'{"elements": [ ], "href": "http://api.clover.com/v3/merchants/(my merchant id)/orders/(objectID)/line_items?limit=100"}'
api.clover.com is a production endpoint. Are you possibly getting your environments confused?
If you want you can submit a private post with the webhook response body, and information on the environment you are working in and I can take a closer look.
Sure! I'm using my clover flex, its a production full function device
Your request is for the line items of the order not the order itself. The id in the webhook response is a valid order, otherwise you wouldn't be getting a response for the line items for that order. My guess is you haven't added/attached line items to the order.
The one with the line items in it is a valid order, but you can change the numbers and letters to whatever you want and you would still get
{"elements": [ ], "href": "http://api.clover.com/v3/merchants/D8H10QQYQ5RQ1/orders/SQ2TPE4YQA19R/line_items?limit=100"}
Remove line_items from the request. I won't be able to validate the data until next week.
This explanation doesn't make sense. You can't get a webhook create for an order you haven't created.
It may not be what it's supposed to, but it's what it's doing.
HTTP headers: Host: Connection: Keep-Alive Accept-Encoding: gzip Cf-Ipcountry: NL X-Forwarded-For: 169.47.192.181 Cf-Ray: 50eb7d0f4fa5d27e-DFW X-Forwarded-Proto: https Cf-Visitor: {"scheme":"https"} X-Clover-Auth: Cf-Connecting-Ip: 169.47.192.181 Cdn-Loop: cloudflare Request body: {"appId":"H0PBJGMMR89AR","merchants":{"D8H10QQYQ5RQ1":[{"objectId":"O:SQ2TPE4YQA19R","type":"UPDATE","ts":1567217640627}]}} POST /clvr/hooks.php HTTP/1.1 <br>
1 Person is following this question.