The verifyContactsPrescription mutation is the core of the Visibly integration. Calling this mutation initiates the automated verification workflow and returns a unique jobId, which you will use to track the request to completion.
The structure of your request variables depends on how the user provides their prescription information in your frontend. Regardless of the flow, all requests must include the Patient and Product details.
Patient Details:
contacts.prescription.patient(Name, DOB, address).Product Details:
contacts.products(The specific lenses being ordered, including the productIds and various parameters for those specific lenses).
Choose one of the following three methods to provide prescription verification data:
Use this when the user uploads a photo or PDF of their physical prescription.
- Path:
contacts.prescription.fileId - Requirements: The
fileIdgenerated in Step 02.
Use this when the user finds their doctor in Visibly's doctor database.
- Path:
contacts.prescription.doctor.doctorId - Requirement: The specific
doctorIdfrom the Visibly database, found in Step 02.
Use this if the user cannot find their doctor in Visibly's doctor database.
- Path:
contacts.prescription.doctor - Required Sub-fields:
doctorNamepracticeNamephoneNumber
Custom tags can be included via the tags variable array. These are key-value pairs used to attach metadata to a request (e.g., order_id or internal_customer_id).
Benefit: These tags are preserved in webhook payloads and query results, allowing you to easily reconcile requests with your internal systems.
- You can successfully submit a request for each of the three user flows (File, Database Doctor, and Manual Doctor).
- You receive and successfully capture a valid jobId in the response.
Click here to see the verifyContactsPrescription GraphQL reference