Getting eCom OrderID in LS Retail API

whappycannabiswhappycannabis Member Posts: 23

How can I get the eCom OrderID from a paid order once it is in LS Retail? Where would that info be stored so I can retrieve it using the retail API?


3 comments

  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 878 moderator

    Hi @whappycannabis,

    Thank you for contacting us.

    In the Retail API when looking for the sale you'll need to look at "referenceNumber" this contains the orderID from eCom.


  • whappycannabiswhappycannabis Member Posts: 23

    Hi! thanks for getting back to me with this information... The number really doesn't seem to match at all with the Order on eCom.

    This is what I get for eCom Order ID ORD03358 and as you can see the referenceNumber is 7019653. How do I get the right order number as per the screenshot in my original post?

    "Sale": [
     {
      "saleID": "16350",
      "timeStamp": "2021-03-16T23:55:21+00:00",
      "discountPercent": "0",
      "completed": "true",
      "archived": "false",
      "voided": "false",
      "enablePromotions": "false",
      "isTaxInclusive": "false",
      "createTime": "2021-03-16T23:55:21+00:00",
      "updateTime": "2021-03-16T23:55:23+00:00",
      "completeTime": "2021-03-16T23:55:21+00:00",
      "referenceNumber": "7019653",
      "referenceNumberSource": "eCom",
      "tax1Rate": "0",
      "tax2Rate": "0",
      "change": "0",
      "receiptPreference": "printed",
      "displayableSubtotal": "27",
      "ticketNumber": "220000016350",
      "calcDiscount": "0",
      "calcTotal": "30.51",
      "calcSubtotal": "27",
      "calcTaxable": "27",
      "calcNonTaxable": "0",
      "calcAvgCost": "19.88",
      "calcFIFOCost": "19.88",
      "calcTax1": "3.51",
      "calcTax2": "0",
      "calcPayments": "30.51",
      "total": "30.51",
      "totalDue": "30.51",
      "displayableTotal": "30.51",
      "balance": "0",
      "customerID": "948",
      "discountID": "0",
      "employeeID": "14",
      "quoteID": "0",
      "registerID": "4",
      "shipToID": "3255",
      "shopID": "1",
      "taxCategoryID": "4",
      "taxTotal": "3.51"
     }
    ]
    
  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 878 moderator

    @whappycannabis,

    You need to grab that ref.number, because that's the ORDERID.

    //ecom API call
    GET /orders/{order_id}.json
    


Sign In or Register to comment.