Webhooks

Trigger events for the Ordering Service

Webhooks

In this initial version of the Webhooks implementation, your brand will be able to setup a trigger that activates at the time an Order is Submitted.

🚧

Limitations

order.submitted is the only event available to trigger at this time. Check back in the future for additional functionality.

Setup

First, acquire an Access Token as you would for any API call to the Suppliers endpoints.
Instructions listed here:
Refresh Token

Once you have an Access Token (Good for up to 15 minutes), set up your Event Trigger:

POST request to https://lsapi-catalog.lightspeedapp.com/webhooks

Include the following code snippet in your JSON Formatted Body

{
	"eventName": "order.submitted",
	"callbackUrl": "YOUR_CALLBACK_URL"
}

Your Response Body should return data similar to:

{
    "callbackUrl": "YOUR_CALLBACK_URL",
    "eventName": "order.submitted",
    "id": "*ID_VALUE_HERE*",
    "supplierID": "YOUR_UNIQUE_SUPPLIER_ID"
}

Verify the webhook has been created

This step requires you to be Authenticated with a current Access Token

Submit a GET request to https://lsapi-catalog.lightspeedapp.com/webhooks

Your Response Body should return data similar to

[
    {
        "id": "EVENT_ID_VALUE",
        "supplierID": "YOUR_UNIQUE_SUPPLIER_ID",
        "eventName": "order.submitted",
        "callbackUrl": "YOUR_CALLBACK_URL"
    }
]