To start a vision test, use the startVisionTest mutation. It supports a variety of contacts and glasses prescription renewal scenarios, including:
- Providing prescription details on behalf of the user when starting a vision test
Click here to see the startVisionTest GraphQL reference
Query:
mutation StartVisionTest($tags: [TagInput], $contacts: ContactsInput) {
startVisionTest(tags: $tags, contacts: $contacts) {
launchUrl
jobId
}
}Variables:
{
"contacts": {
"prescription": {
"patient": {
"firstName": "Jane",
"lastName": "Test",
"email": "test@test.com",
"dateOfBirth": "2000-01-01",
"state": "IL"
},
"products": {
"right": {
"baseCurve": "8.4",
"diameter": "14.0",
"productId": "29986",
"sphere": "-3.75",
"quantity": 1,
"packageSize": 6
},
"left": {
"baseCurve": "8.4",
"diameter": "14.0",
"productId": "29986",
"sphere": "-3.75",
"quantity": 1,
"packageSize": 6
}
}
}
},
"tags": [
{
"name": "orderId",
"value": "123456"
},
{
"name": "customerId",
"value": "abcdefg"
}
]
}Query:
mutation StartVisionTest($glasses: GlassesInput, $tags: [TagInput]) {
startVisionTest(glasses: $glasses, tags: $tags) {
launchUrl
jobId
}
}Variables:
{
"glasses": {
"prescription": {
"patient": {
"firstName": "Jane",
"lastName": "Test",
"email": "test@test.com",
"dateOfBirth": "2000-01-01",
"state": "IL"
},
"corrections": [
{
"right": {
"sphere": "-1.00",
"cylinder": "-0.50",
"axis": "120",
"addition": "+2.00"
},
"left": {
"sphere": "-1.00",
"cylinder": "-0.50",
"axis": "120",
"addition": "+2.00"
}
}
]
}
},
"tags": [
{
"name": "orderId",
"value": "123456"
},
{
"name": "customerId",
"value": "abcdefg"
}
]
}