Adding a receipt won't add the actual receipt items

jimvercoelenjimvercoelen Posts: 7Member

Hi there,

We're developing this system that uses Lightspeed and right now we're facing an issue while adding a receipt.

The receipt we add won't contain any of the receipt items we post with the request so we need some input from your end.

Looking at the API documentation it's a bit unclear what params a required for each receipt item so it might be an issue coming from our end.

Code snippet (js based):

  1. const receipt = {
  2.    customerId: CUSTOMER_ID,
  3.    tableId: TABLE_ID,
  4.    userId: USER_ID,
  5.    deliveryDate: now.getTime(),
  6.    uuid: '1111111111111111111' + now.getTime(),
  7.    status: 'done',
  8.    type: 'restaurant',
  9.    actionReceiptItems: [ // <-- doesn't work
  10.      {
  11.        pOid: PRODUCT_ID,
  12.        amount: 1,
  13.        creationDate: new Date().getTime(),
  14.        displayName: 'Test order item name',
  15.        kitchenName: 'Test order item name',
  16.        info: 'Test order item description',
  17.        name: 'Test order item name',
  18.        price: 0,
  19.        totalPrice: 0,
  20.        totalPriceWithoutVat: 0,
  21.        vat: 18
  22.      }
  23.    ],
  24.    receiptItems: [   // <-- doesn't work
  25.      {
  26.        pOid: PRODUCT_ID,
  27.        amount: 1,
  28.        creationDate: new Date().getTime(),
  29.        displayName: 'Test order item name',
  30.        kitchenName: 'Test order item name',
  31.        info: 'Test order item description',
  32.        name: 'Test order item name',
  33.        price: 0,
  34.        totalPrice: 0,
  35.        totalPriceWithoutVat: 0,
  36.        vat: 18
  37.      }
  38.    ]
  39. }

Result


Any ideas?

Thanks!

4 comments

Sign In or Register to comment.