Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Get Inventory Information

Method If called with no arguments, method returns a list of all active lenses in inventory products, 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/get_inventory?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/get_inventory

...