Shipped webhook data

Hello,

What information will be send to the webhook with the 'shipped' webhook action? The documentation only mentions the headers (https://developers.lightspeedhq.com/ecom/tutorials/webhooks/). 

Is there more information about the data being send to the shipped webhook?

Best Regards,
Allan


Answers

  • Adrian SamuelAdrian Samuel Moderator, Lightspeed Staff Posts: 556 moderator
    Hey @akerssies

    The response from the shipment webhook is just the data you would get from the Shipment API which can be read here:

    https://developers.lightspeedhq.com/ecom/endpoints/shipment/

    I created a mock order and the shipment web-hook fired. Here is the response:

    {
        "shipment": {
            "id": 96839129,
            "createdAt": "2018-12-17T16:40:49+01:00",
            "updatedAt": "2018-12-17T16:40:49+01:00",
            "number": "SHIP00002",
            "status": "not_shipped",
            "trackingCode": "",
            "doNotifyShipped": false,
            "doNotifyTrackingCode": false,
            "customer": {
                "resource": {
                    "id": 78061088,
                    "url": "customers\/78061088",
                    "link": "http:\/\/api.webshopapp.com\/en\/customers\/78061088.json"
                }
            },
            "order": {
                "resource": {
                    "id": 100491707,
                    "url": "orders\/100491707",
                    "link": "http:\/\/api.webshopapp.com\/en\/orders\/100491707.json"
                }
            },
            "products": {
                "resource": {
                    "id": false,
                    "url": "shipments\/96839129\/products",
                    "link": "http:\/\/api.webshopapp.com\/en\/shipments\/96839129\/products.json"
                }
            },
            "metafields": {
                "resource": {
                    "id": false,
                    "url": "shipments\/96839129\/metafields",
                    "link": "http:\/\/api.webshopapp.com\/en\/shipments\/96839129\/metafields.json"
                }
            },
            "events": {
                "resource": {
                    "id": false,
                    "url": "orders\/events?shipment=96839129",
                    "link": "http:\/\/api.webshopapp.com\/en\/orders\/events.json?shipment=96839129"
                }
            }
        }
    }

    I also updated the order to set it is shipped and the shipment.status value was then sent to my webhook showing the update.

    Hope this helps!

    Adrian Samuel

    API Integrations Consultant - Strategic Solutions

    Lightspeed HQ

Sign In or Register to comment.