Lightspeed E-commerce - webhooks (CART)

607 Views Asked by At

I'm trying to make some custom integration with Lightspeed e-commerce platform and I need a way connect with add_to_cart/ update_cart action, but I cannot find ANY hook connected to this event. Is it even possible in Lightspeed? Dev documentation says absolutely nothing about add to cart/update... any hints?

2

There are 2 best solutions below

0
On

The correct way to set a webhook is posting:

https://api.yourshop.com/en/webhooks.json

{
  "webhook": {
    "isActive": true,
    "itemGroup": "orders",
    "itemAction": "*",
    "language": "en",
    "format": "json",
    "address": "https://yourwebhook.com/"
  }
}

Notice that the field itemAction has a * witch will receive the actions created|updated|deleted

More info here: https://developers.lightspeedhq.com/ecom/endpoints/webhook/#post-create-a-webhook

0
On

You can capture this action by creating a webhook to quote/updated. When the shoppingcart gets updated, a request is posted to your given url with all required information. Take a look at this page: https://developers.lightspeedhq.com/ecom/endpoints/quote/