How to change order.status from on_hold

JeroenRJeroenR Member Posts: 16

I cannot change the order status through the API when the order status is 'on_hold'.

I would like to set to 'processing_awaiting_payment' , 'processing_awaiting_shipment' or 'completed_shipped'

Tags:

7 comments

  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 413 moderator

    Hi @JeroenR,

    Thanks for reaching out to us

    Correct, you can only change the status with updating the paymentStatus or/and shipmentStatus. Orders that are on hold are not paid or shipped, so when changing this status(es) the order status will be changed as well.

    I hope this helps.

  • wwdanielwwdaniel Member Posts: 4

    I would like to join this discussion. We are facing a similar problem described by JeroenR.


    We have an order which is paid, not shipped. It is then set to status='on_hold'.


    Now, our goal is to get this same order to status='processing_awaiting_shipment' by using the API.


    We have tried doing the following:

    1. Set the order status to 'processing_awaiting_shipment'
    2. Set the order shipmentStatus to 'not_shipped' and the paymentStatus to 'paid'
    3. Setting the order status to 'processing_awaiting_shipment' AND the order shipmentStatus to 'not_shipped' and the paymentStatus to 'paid'

    None of this worked.


    What is the way to do this? We are using the Python library.

  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 413 moderator

    Hi @wwdaniel,

    As you can see here I have an order that is PAID and NOT_SHIPPED and status is ON_HOLD.

    Also when I get this order via Postman you see the status on_hold.

    Now when I do an PUT for this order /orders/161406470.json

    with this payload:

    {
      "order": {      
          "paymentStatus": "paid",
          "shipmentStatus": "shipped"
      }
    }
    

    You'll see the status is updated in the response.

    also in the back office.


    I hope this helps.

  • wwdanielwwdaniel Member Posts: 4

    Hi Lucien,

    Thanks for the response.

    Your method requires us to set the order to 'shipped'. We do not want that. We need it to be 'not_shipped' (and keep being 'paid').

    Any ideas for that?

  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 413 moderator
    edited October 15

    Hi @wwdaniel,

    Unfortunately, you need to update something. You cannot do an update with the same statuses.

    Can you explain to my why to want to have an order that isn't on_hold any more but also not shipped? If there is something in between this step let's say the order isn't on hold any more but also not shipped, you can work with custom statuses for example "In Progress" status. Below you'll see the payload

    Please check https://developers.lightspeedhq.com/ecom/endpoints/ordercustomstatus/ for custom statuses.

    // First get the customStatuses GET /orders/customstatuses.json 
    {
      "order": {
          "customStatusId": 28502,
          "paymentStatus": "paid",
          "shipmentStatus": "not_shipped"
      }
    }
    

    In the response it's still "on hold" but has a custom status now.

    When you take a look in the back office it will look like this.

    And when this "In Productie" status is over and is shipped you can do this:

    {
      "order": {
          "paymentStatus": "paid",
          "shipmentStatus": "shipped"
      }
    }
    

    This is your response:


    I hope this helps.

  • wwdanielwwdaniel Member Posts: 4

    Hi Lucien,

    Just like you can remove orders in the LS-backend from the 'on_hold' status without changing the payment/shipment status, we were looking for a similar result with the API.

    Reason being, that if you have an order which is paid + not_shipped + not on_hold, it will appear in the overview of 'ready for shipment' within LS.

    As we are unable to remove the on_hold status with the API, we have resorted now to a solution in which the order keeps the 'on_hold' status, but we add a customStatus to it. Now, in LS, we can use the filters to find ordes with the combination of 'on_hold' + customStatus. Not ideal, but works.

  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 413 moderator

    Hi @wwdaniel,

    Exactly, that is just what I mentioned. It's not ideal but this is the best way to do it.

Sign In or Register to comment.