Workorder timestamp question.

andyandy Posts: 12Member
Adding WorkorderItems or WorkorderLines to a Workorder doesn't appear to update the timestamp. Is that a bug or is there some logic behind the behaviour?
Tags:

1 comment

  • Adrian SamuelAdrian Samuel Posts: 495Moderator, Lightspeed Staff moderator
    edited September 2018
    Hey @andy thanks for the question!

    When you create a workorder the app only creates a "created-stamp" called timeStamp which is fixed.

    When you add/remove workorder lines to the workorder the timestamp of that workorder line item is updated.

    To get this from the API you need to load the specific relations via the url.

    You can do this via
    https://api.lightspeedapp.com/API/Account/{{AccountID}}/Workorder/{{WorkorderID}}.json?load_relations=["WorkorderItems"];

    This will return an array of objects containing data about the specific line items including their individual timestamps which update accordingly

    Hope this helps!

    Adrian Samuel

    API Integrations Consultant - Strategic Solutions

    Lightspeed HQ

Sign In or Register to comment.