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.

Partner_Info

the partner_info block can optionally be sent to add additional metadata to the created session. This information is hosted and stored by Visibly for analytics and troubleshooting purposes. This block will accept any data in a JSON Object so long as it is less than 20,000 characters in size.

IN-STORE LOGIC

Store_Id

The store_id field can be optionally set to include a Visibly configured store id. Please work with your Visibly contact to configure this field correctly. If left blank no "in-store" action will take place. The corresponding store id that is provided must be enabled and associated to partner configured instances within Visibly.

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"
      }
    ]
  },
  "store_id": "store_1234",
  "partner_info": {
  	"metadata_keys": "meta data values"
  },
  "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!