Versions Compared

Key

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

...

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

This endpoint is used to check the required items for Lens/Frame Pick Verification

...

perform lens and/or frame pick verification for a particular order

...

Accepts

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

    Image RemovedImage Added
    • 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 information state for the order will be returned

Code Block
{
  "orderNumber": "228844",
  "trayNumber": "45478",
  "poNumber": "XYZ123",
  "rtLensPicked": true,
  "ltLensPicked": true,
  "framePicked": false,
  "framePartPicked": false,
  "frameSideShieldPicked": false,
  "misc1Picked": false,
  "misc2Picked": false,
  "warehouse": "DEFAULT",
  "pickAllowed":
false,
  "pickRejectReason": "Order already picked",
  "rtOPC": "0209448281",
  "ltOPC": "0209448281",
  "frameUPC": null,
  "frameSKU": null,
  "framePartSKU": null,
  "frameSideShieldSKU": null,
  "misc1SKU": null,
  "misc2SKU": null
}

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”.pickAllowed

Error

boolean

  • If

...

pickRejectReason

...

string|null

If pickAllowed is false, this will explain why. Picking is disallowed if:

  • The order is flagged for deletion

  • The order is not valid

  • The order is a stock order

  • The order is an addon order and the lab is not supplying the frame

  • The order is completed

  • The order is on hold

  • All items have already been picked

...

rtOPC

...

string|null

If the order requires a right lens this will be the OPC of the stock item

...

ltOPC

...

string|null

If the order requires a left lens this will be the OPC of the stock item

...

frameUPC

...

string|null

If the order requires a frame this will be the UPC of the stock item

...

frameSKU

...

string|null

If the order requires a frame this will be the SKU of the stock item

...

framePartSKU

...

string|null

If the order requires a frame part this will be the SKU of the stock item

...

frameSideShieldSKU

...

string|null

If the order requires a side shield this will be the SKU of the stock item

...

misc1SKU

...

string|null

If the order requires a miscellaneous this will be the SKU of the stock item

...

misc2SKU

...

string|null

If the order requires a second miscellaneous this will be the SKU of the stock item

Error

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

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

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

    Code Block
    languagejson
    {
      "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

    Code Block
    languagejson
    {
      "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

    Code Block
    languagejson
    {
      "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

    Code Block
    languagejson
    {
      "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

    Code Block
    languagejson
    {
      "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

    Code Block
    languagejson
    {
      "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)

    Code Block
    languagejson
    {
      "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)

    Code Block
    languagejson
    {
      "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)

    Code Block
    languagejson
    {
      "error": "NoPick record foundRejected",
      "details": [
        "Right eye does not match order",
        "Left eye does not match order",
       "Provided: bad "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"
      ]
    }