Perform Pick Verification

POST /api/v2/orders/{orderIdentifier}/pick

This endpoint is used to perform lens and/or frame pick verification for a particular order

image-20240111-180823.png

Accepts

  • An order identifier, which can be the order number, tray number, or purchase order number

    • This order can be retrieved using 72544, 337178, or Example

    • Tray numbers can only be used to look up active orders

    • If lookup is done by po number then you must be using unique values in this field

  • A JSON object representing the pick information. If Partial Picking is turned off then all lens data must be provided in the same call, and all frame data must be present in the same call (so rtOPC and ltOPC must be sent at the same time, and framePartSKU and frameSideShieldSKU must be sent at the same time, but rtOPC/ltOPC do not need to be sent at the same time as the frame info)

Property

Description

rtOPC

string
If provided this should be the OPC to check for the right lens (max characters: 20)

ltOPC

string
If provided this should be the OPC to check for the left lens (max characters: 20)

frameUPC

string
If provided this should be the UPC to check for the frame. Cannot be provided alongside frameSKU (max characters: 20)

frameSKU

string
If provided this should be the SKU to check for the frame. Cannot be provided alongside frameUPC (max characters: 20)

framePartSKU

string
If provided this should be the SKU to check for the frame part (max characters: 20)

frameSideShieldSKU

string
If provided this should be the SKU to check for the side shield (max characters: 20)

misc1SKU

string
If provided this should be the SKU to check for the first miscellaneous item (max characters: 20)

misc2SKU

string
If provided this should be the SKU to check for the second miscellaneous item (max characters: 20)

Returns

Success

On a successful request the new pick state for the order will be returned

{ "orderNumber": "228844", "trayNumber": "45478", "poNumber": "XYZ123", "rtLensPicked": true, "ltLensPicked": true, "framePicked": false, "framePartPicked": false, "frameSideShieldPicked": false, "misc1Picked": false, "misc2Picked": false, "warehouse": "DEFAULT" }

Property

Description

orderNumber

string

The identifier for the order

trayNumber

string

The tray number the order is attached to

poNumber

string

Job reference (PO NUM field)

rtLensPicked

boolean

True if lens pick verification has been performed for the right lens for this order

ltLensPicked

boolean

True if lens pick verification has been performed for the left lens for this order

framePicked

boolean

True if frame pick verification has been performed for the frame for this order

framePartPicked

boolean

True if frame pick verification has been performed for the frame part for this order

frameSideShieldPicked

boolean

True if frame pick verification has been performed for the side shield for this order

misc1Picked

boolean

True if frame pick verification has been performed for the first miscellaneous item for this order

misc2Picked

boolean

True if frame pick verification has been performed for the second miscellaneous itefor this order

warehouse

string

The warehouse the order is associated with. Currently always “DEFAULT”.

Error

  • If the order number does not exist in Rx-Universe an HTTP 404 code will be returned with an error

    { "error": "No record found", "details": [ "Provided: bad order" ]
  • If the order is completed an HTTP 400 code will be returned with an error

    { "error": "Pick Rejected", "details": [ "Order already completed" ] }
  • If the order is not valid an HTTP 400 code will be returned with an error

    { "error": "Pick Rejected", "details": [ "Order has not been validated" ] }
  • If the order is pending completion an HTTP 400 code will be returned with an error

    { "error": "Pick Rejected", "details": [ "Order is pending completion" ] }
  • If the order is flagged for deletion an HTTP 400 code will be returned with an error

    { "error": "Pick Rejected", "details": [ "Order is flagged for deletion" ] }
  • If the order is on hold an HTTP 400 code will be returned with an error

    { "error": "Pick Rejected", "details": [ "Order is on hold" ] }
  • If the order is a stock order an HTTP 400 code will be returned with an error

    { "error": "Pick Rejected", "details": [ "Order is not an Rx order" ] }
  • If no pick information is provided an HTTP 400 code will be returned with an error

    { "error": "Pick Rejected", "details": [ "No pick data provided" ] }
  • If pick information is provided for an item the order does not require an HTTP 400 code will be returned with an error (the details will have all that apply)

    { "error": "Pick Rejected", "details": [ "Right eye provided but not needed", "Left eye provided but not needed", "Frame provided but not needed", "Frame part provided but not needed", "Frame side shield provided but not needed", "Misc item 1 provided but not needed", "Misc item 2 provided but not needed" ] }
  • If partial picking is turned off and required pick information is missing an HTTP 400 code will be returned with an error (the details will have all that apply)

    { "error": "Pick Rejected", "details": [ "Right eye needed but not provided", "Left eye needed but not provided", "Frame needed but not provided", "Frame part provided but not needed", "Frame side shield needed but not provided", "Misc item 1 needed but not provided", "Misc item 2 needed but not provided" ] }
  • If one or more provided pick items are incorrect an HTTP 400 code will be returned with an error (the details will have all that apply)

    { "error": "Pick Rejected", "details": [ "Right eye does not match order", "Left eye does not match order", "Frame does not match order", "Frame part does not match order", "Frame side shield does not match order", "Misc item 1 does not match order", "Misc item 2 does not match order" ] }