Get Receipt by External Reference

GET /f/finance/{businessLocationId}/saleByExternalReference

Returns a single receipt matching the external reference supplied in the request. See externalReferences for examples.

Path parameters

Query parameters

Responses

  • 200 application/json

    Receipt returned

    Hide response attributes Show response attributes object
    • Unique reference code for the account.

    • The account identifier

    • The unique identifier for the receipt associated with this account.

    • source object

      Additional properties are allowed.

      Hide source attributes Show source attributes object
      • The accountFiscId of the initial transaction associated with the current account, if applicable. For example, in the case of a refund.

        This will match the accountFiscId of the sale if there is no associated account.

      • The accountFiscId of the previous transaction associated with the current account, if applicable. For example, in the case of a refund.

        This may be different from initialAccountId if there is more than one associated account.

        It will not be displayed if there is no associated account.

    • salesLines array[object]
      Hide salesLines attributes Show salesLines attributes object
    • payments array[object]
      Hide payments attributes Show payments attributes object
      • code string

        The code of the payment method.

      • The name of the payment method.

      • The unique identifier for the payment method.

      • The net payment amount, including tax.

      • currency string

        The payment currency.

      • tip string

        The tip amount.

      • consumer object

        Additional properties are allowed.

        Hide consumer attributes Show consumer attributes object
        • id string

          The UUID of the customer associated with the payment, if applicable.

        • The unique identifier for the customer.

        • title string

          The title of the customer.

        • The first name of the customer.

        • lastName string

          The last name of the customer.

        • The primary phone number of the customer.

        • The secondary phone number of the customer.

        • The company name of the customer.

        • The first line of the customer's address.

        • The second line of the customer's address.

        • zipCode string

          The postal code of the customer's address.

        • city string

          The city of the customer's address.

        • state string

          The state of the customer's address.

        • email string

          The email address of the customer.

        • The tax identifier of the customer.

        • The fiscal code of the customer.

        • The destination code of the customer.

      • type string

        The type of payment.

        Values are NORMAL or ACCOUNTS_RECEIVABLE.

      • deviceId string

        The unique identifier for the device where the payment was processed.

      • The name of the device where the payment was processed.

      • staffId number

        The unique identifier for the user who processed the payment.

      • The name of the user who processed the payment.

      • The authorization code for the payment.

      • The external reference code for the payment.

      • The name of the revenue center where the payment was processed.

      • The unique identifier for the revenue center where the payment was processed.

      • fiscId string

        The unique identifier for the payment.

      • uuid string

        The base64url encoded UUID of the payment.

      • fiscDate string

        The time stamp of the payment.

      • The surcharge amount.

    • The account creation timestamp.

    • The account close timestamp.

    • cancelled boolean
    • The table number.

    • The name of the table.

    • The account profile associated with the account.

    • The name of the user associated with the account.

    • ownerId number

      The unique identifier for the user associated with the account.

    • type string

      The sale type.

      Values are SALE, VOID, RECALL, REFUND, SPLIT, UPDATE, TRANSFER, FLOAT, TRANSITORY, CROSS_BL, or CANCEL.

    • externalReferences array[string]

      List of external references for online orders. Includes the TASK prefix, businessLocationId, and the unique reference code provided in the thirdPartyReference field of an online order.

    • nbCovers number

      The number of covers.

    • dineIn boolean

      Whether the order is dine-in.

    • deviceId number

      The unique identifier for the device where the account was created.

    • The name of the device where the account was created.

    • The void reason, if applicable.

      Values are Broken, Cooking, Other, Taste, Unhappy Client, User Mistake, or Waited too long.

GET /f/finance/{businessLocationId}/saleByExternalReference
curl \
 -X GET https://api.lsk.lightspeed.app/f/finance/45454565682155/saleByExternalReference?externalReferenceId=TASK%3AOO-%7BbusinessLocationId%7D-%7Bunique-reference-code%7D \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "accountReference": "57X0j3hzTZ2oo9sdVWiUog==",
  "accountFiscId": "A65315.17",
  "receiptId": "R65315.13",
  "source": {
    "initialAccountId": "A65315.13",
    "previousAccountId": "A65315.15"
  },
  "salesLines": [
    {
      "id": "S65315.33",
      "parentLineId": "S65315.32",
      "totalNetAmountWithTax": "11.00",
      "totalNetAmountWithoutTax": "8.33",
      "menuListPrice": "10.00",
      "unitCostPrice": "5.00",
      "serviceCharge": "1.00",
      "serviceChargeRate": "10.00",
      "discountAmount": "0.00",
      "taxCode": "VAT20",
      "taxAmount": "1.6667",
      "taxRatePercentage": "20.00",
      "taxLines": [
        {
          "taxId": "41910290874374",
          "taxCode": "VAT20",
          "taxRate": "1.2",
          "taxAmount": "1.666667",
          "taxIncluded": true
        }
      ],
      "discountType": "DISCOUNT",
      "discountCode": "10PCT",
      "discountName": "10% Discount",
      "accountDiscountAmount": "1.00",
      "totalDiscountAmount": "1.00",
      "sku": "52",
      "name": "Burger",
      "statisticGroup": "Food",
      "quantity": "1",
      "accountingGroup": {
        "accountingGroupId": 141948669132845,
        "name": "Food",
        "statisticGroup": "Food",
        "code": "123"
      },
      "currency": "GBP",
      "tags": [
        "string"
      ],
      "revenueCenter": "Fixed POS",
      "revenueCenterId": 141948669132822,
      "categories": [
        {
          "category": "default",
          "value": "Food"
        }
      ],
      "timeofSale": "2023-07-27T19:58:22.474Z",
      "staffId": 14670,
      "staffName": "Manager",
      "deviceId": 75125,
      "deviceName": "iPad9",
      "voidReason": "Unhappy Client",
      "accountProfileCode": "AAP"
    }
  ],
  "payments": [
    {
      "code": "CASH",
      "description": "Cash",
      "paymentMethodId": 141948669132824,
      "netAmountWithTax": "11.00",
      "currency": "GBP",
      "tip": "0.00",
      "consumer": {
        "id": "ec021fb0-4c12-425e-b30f-320ab720448b",
        "customerId": 120913,
        "title": "Mr",
        "firstName": "John",
        "lastName": "Doe",
        "phoneNumber1": "555-555-5555",
        "phoneNumber2": "555-555-5556",
        "companyName": "Company Name",
        "addressLine1": "123 Street st.",
        "addressLine2": "Unit 123",
        "zipCode": "12345",
        "city": "Some City",
        "state": "Some State",
        "email": "customer@email.com",
        "taxIdentifier": "123456789",
        "fiscalCode": "123456789",
        "destinationCode": "123456789"
      },
      "type": "NORMAL",
      "deviceId": "72676",
      "deviceName": "ipad9",
      "staffId": 180480,
      "staffName": "Manager",
      "authorization": "001",
      "externalReference": "1000",
      "revenueCenter": "Fixed POS",
      "revenueCenterId": 141948669132822,
      "fiscId": "T72691.8",
      "uuid": "bc7i2X_CTkeg8qlec66wmg==",
      "fiscDate": "2023-02-14T20:04:08.665Z",
      "surcharge": "0.00"
    }
  ],
  "timeofOpening": "2023-02-14T19:58:48.224Z",
  "timeofCloseAndPaid": "2023-02-14T20:04:08.734Z",
  "cancelled": true,
  "externalFiscalNumber": "string",
  "tableNumber": "1",
  "tableName": "Dining Room, Table 1",
  "accountProfileCode": "AAP",
  "ownerName": "Manager",
  "ownerId": 14670,
  "type": "SALE",
  "externalReferences": [
    "\"TASK:OO-{businessLocationId}-{unique-reference-code}\", \"TASK:OO-{businessLocationId}-(another-unique-reference-code)\""
  ],
  "nbCovers": 2.0,
  "dineIn": true,
  "deviceId": 75125,
  "deviceName": "ipad9",
  "voidReason": "Unhappy Client"
}