Generate a unique session for the user.

SUMMARY

This endpoint will create and persist both a user and a session record and associate them.

Submitting unqualified user or prescription info will return a 403 Forbidden error and high level disqualifications reasons. These reasons include age, region, prescription, and unknown_product_key.

The sample POST Body includes prior prescription information for both contact lenses and glasses. Your POST may include one, both, or neither based on the patient information you've collected.

ORDER OBJECT

The order object is an optional parameter that allows you to detail what service the user has purchased and how much you've charged them for the service.

Product

The order.products field should include an array of desired product types for your user. The field supports several types of products, including: glasses, contacts, and acuity-service. If no product type is included, we allow the user to select one of the prescription products during the exam experience.

🚧

Bundling Product Types

Prescription products (glasses and/or contacts) and the acuity-service product are mutually exclusive and cannot be combined in the same order.

Pricing

The order.charged_amount field indicates how much you've charged the user. Submitting 0 or greater indicates that you have charged the user, which will suppress the payment collection at the end of the experience. Submitting null indicates that Visibly will handle collection, and will charge the user accordingly.

All amounts should be submitted in the smallest currency unit.

JSON

{
  "user_key": "user1",
  "session_key": "session1",
  "user": {
    "email": "[email protected]",
    "first_name": "Test",
    "last_name": "User",
    "birthdate": "1988-01-01",
    "region": "IL"
  },
  "order": {
    "charged_currency": "USD",
    "charged_amount": 6000,
    "products": [
      {
        "type": "contacts"
      },
      {
        "type": "glasses"
      }
    ]
  },
  "prescriptions": [
    {
      "type": "contacts",
      "verification": "verified",
      "issue_date": "2017-07-04",
      "expiration_date": "2018-07-04",      
      "right_eye": {
        "product_key": "example1",
        "sphere": -1.0,
        "cylinder": -0.25,
        "axis": 90,
        "base_curve": 8.7,
        "diameter": 14.1,
        "add": 1.50,
        "dominance": "D"
      },
      "left_eye": {
        "product_key": "example1",
        "sphere": -1.0,
        "cylinder": -0.25,
        "axis": 90,
        "base_curve": 8.7,
        "diameter": 14.1,
        "add": 1.50,
        "dominance": "N"        
      }
    },
    {
      "type": "glasses",
      "verification": "unverified",
      "right_eye": {
        "sphere": -1.0,
        "cylinder": -0.25,
        "axis": 90,
        "add": null,
        "pupillary_distance": 30.0
      },
      "left_eye": {
        "sphere": -1.0,
        "cylinder": -0.25,
        "axis": 90,
        "add": null,
        "pupillary_distance": 30.0
      }
    }
  ]
}
Language
Authorization
Click Try It! to start a request and see the response here!