Get lenses (/lenses)

Get Lens Inventory Information

If called with no arguments, method returns a list of all active lenses in inventory, including OPC (both eyes), Rx-Universe description, and all quantity information.

If called with a single argument, the method looks for a match by stock number (for a 6-digit input) or OPC (for a 10-digit OPC), and if found, returns the single lens matching the input.  If not found, it returns a packet showing a stock number of 000000 and a description indicating what was looked for.


Example request for a single product:

http://localhost:4567/api/lenses?item=0100866375

returns

{
  "stock-num": "955546",
  "stock-desc": "LAO  S7EASY       0100 0100    73GY3TR6",
  "rt-opc": "0100866375",
  "lt-opc": "0100866367",
  "total-qty": 0,
  "right-qty": 0,
  "left-qty": 0,
  "total-alloc": 0,
  "right-alloc": 0,
  "left-alloc": 0,
  "total-in-proc": 0,
  "right-in-proc": 2,
  "left-in-proc": 2,
  "standard-cost": 11.0,
  "average-cost": 22.0
}

Example with no arguments, requesting all lenses:

http://localhost:4567/api/lenses

returns:

[
  {
    "stock-num": "909416",
    "stock-desc": "LAIRESPLSV        2800         65",
    "rt-opc": "",
    "lt-opc": "",
    "total-qty": "       0",
    "right-qty": "       0",
    "left-qty": "       0",
    "total-alloc": "       0",
    "right-alloc": "       0",
    "left-alloc": "       0",
    "total-in-proc": "       0",
    "right-in-proc": "       0",
    "left-in-proc": "       0"
  },
  {
    "stock-num": "857521",
    "stock-desc": "LAO  S2SV         0100         73   SRC",
    "rt-opc": "",
    "lt-opc": "",
    "total-qty": "       0",
    "right-qty": "       0",
    "left-qty": "       0",
    "total-alloc": "       0",
    "right-alloc": "       0",
    "left-alloc": "       0",
    "total-in-proc": "      10",
    "right-in-proc": "       0",
    "left-in-proc": "       0"
  },
  {
    "stock-num": "857522",
    "stock-desc": "LAO  S7EASY       0100 0075    73   SRC",
    "rt-opc": "0100780295",
    "lt-opc": "0100780287",
    "total-qty": "       0",
    "right-qty": "      18",
    "left-qty": "      16",
    "total-alloc": "       0",
    "right-alloc": "       0",
    "left-alloc": "       0",
    "total-in-proc": "       0",
    "right-in-proc": "       0",
    "left-in-proc": "       0"
  },
  {
    "stock-num": "908424",
    "stock-desc": "LAO  S7EASY       0100 0075    73GY3PHF",
    "rt-opc": "5117150861",
    "lt-opc": "5117150853",
    "total-qty": "       0",
    "right-qty": "       0",
    "left-qty": "       0",
    "total-alloc": "       0",
    "right-alloc": "       0",
    "left-alloc": "       0",
    "total-in-proc": "       0",
    "right-in-proc": "       0",
    "left-in-proc": "       0"
  },
  {
    "stock-num": "908488",
    "stock-desc": "LAO  S7EASY       0100 0075    73GY3TR5",
    "rt-opc": "0100792506",
    "lt-opc": "0100792498",
    "total-qty": "       0",
    "right-qty": "       0",
    "left-qty": "       0",
    "total-alloc": "       0",
    "right-alloc": "       0",
    "left-alloc": "       0",
    "total-in-proc": "       0",
    "right-in-proc": "       1",
    "left-in-proc": "       0"
  },

a bunch more records
{
    "stock-num": "908534",
    "stock-desc": "LZEISSYPOLSV      0800         75GY2NXT",
    "rt-opc": "0193503000",
    "lt-opc": "",
    "total-qty": "       0",
    "right-qty": "       0",
    "left-qty": "       0",
    "total-alloc": "       0",
    "right-alloc": "       0",
    "left-alloc": "       0",
    "total-in-proc": "       0",
    "right-in-proc": "       0",
    "left-in-proc": "       0"
  }
]