How to create coupon in LS via API

Hi Support,

We have created the integration between WooCommerce with LightSpeed Retail via API. We are using this (https://developers.lightspeedhq.com/retail/endpoints/Sale/) API to push the order to LS.

  • 1- We are sending the order in LightSpeed with the coupon code. Is there any option to create an order in Lightspeed via API with the same coupon which we are sending from Woocommerce?
  • 2- Some of the coupon on WooCommerce has been configured to apply this coupon code on MSRP amount instead of Online. Even though products have both prices. In the API we didn't see any option to push an order in LightSpeed to use MSRP amount instead of Online. Please let us know if we need to do anything else.

Can you please help with the above queries? If you need more information or clarification then please let me know.

Thanks,

Ayaz

5 comments

  • Ayaz_MehmoodAyaz_Mehmood Member Posts: 4
    edited June 21

    "to add more context, on our WooCommerce store, when a customer applies a coupon, they do so on the MSRP price, NOT the online price. However, when we push the sale to Lightspeed retail, it picks up the Online Price and applies the discount to the online price rather than the MSRP. We need it to apply the discount to the MSRP price in those instances. Can you please help us ASAP. this is very urgent for us."

    Post edited by Ayaz_Mehmood on
  • Ayaz_MehmoodAyaz_Mehmood Member Posts: 4

    Hi Support,

    Is there any update on the above query? Your quick response is highly appreciated. As I mentioned above this is very urgent for us. We are waiting for your response.

    Thanks,

    Ayaz

  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 777 moderator

    Hi @Ayaz_Mehmood,

    Thank you for contacting us.

    Sorry for delay in answering your question, it is very busy in our department at this moment.

    1. You can do this in two ways. First you need to create a discount with the discounted amount or percentage and add this to the SaleLine. Or you can create a non-inventory item with price 0 add this item like a discount and set a new unit price each time a coupon code is selected. You can use for example "unitPrice": -10 to add the discount of €10.
    2. In this case you can use the second option in my first answer.

    I hope this helps.

  • Ayaz_MehmoodAyaz_Mehmood Member Posts: 4

    Hi @LucienVersendaal

    Thank you for the feedback.

    The suggestion you provided us in the last message, we have already tried and it didn't work for us.

    What we need is the ability to apply discount, either on MSRP or online prices, through the API. Currently, we are able to apply discount on online prices through API, but we are unable to do so for MSRP.

    Your response at the earliest would be highly appreciated.

  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 777 moderator

    Hi @Ayaz_Mehmood,

    What do you mean by unable to use it for MSRP price, when sending the sale you can put in your own price when creating the sale? Since you already knowing the price, you can grab that price and use this to create the Sale by setting the unitPrice field.

    I hope this helps.

Sign In or Register to comment.