How to post a return with the api?

NicoleDijkmanNicoleDijkman Member Posts: 2

Hello everyone,


I am trying to post a return, but keep getting the following error:

"Creating new return failed, it probably exists. Try updating returns for this order."


I have not posted any returns for this order before. I have checked the returns, there really isn't any return for the order.

In Postman I am trying a Post on https://api.webshopapp.com/us/returns.json

The message body is:

{

"return": {

"customerId": 108088439,

"orderId": 142789422,

"orderProducts": [

{

"quantity": 1,

"id": 211723221

}

],

"status": "new"

}

}


Can anybody help?

Kind regards,

Nicole

Tags:

1 comment

  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 61 moderator

    What I see is that you send the variant ID in the "orderProducts", in this case it must be the ID of the orderProducts https://developers.lightspeedhq.com/ecom/endpoints/orderproduct/#get-retrieve-a order-product

    You can get the orderedProduct by doing the following ​GET /orders/{order_id}/products.json


    The result is:

    You will use the ID 285869951 to create the return, as below:


Sign In or Register to comment.