Skip to content

GraphQL Overview

Download GraphQL schema

Queries

Overview

Mutations

Overview

createNotificationSubscription

(...args)

Create an HTTPS notification subscription (webhook) with built-in delivery retries (exponential back off over ~24 hours) by specifying the URL which will receive the HTTP POST request as the endpoint. Leverage Basic and Digest Access Authentication by using a URL formatted as https://user:password@domain.com or https://user@domain.com, respectively. (The password will be encrypted using TLS/SSL and not sent in plaintext).

A confirmation message will be sent to the endpoint specified in each created notification subscriptions. Navigate to the URL in the confirmation message to confirm the subscription. Unconfirmed subscriptions will be automatically deleted 3 days after their creation.

Alternatively, create an EMAIL notification subscription by specifying an email address as the endpoint.

Arguments

type
endpoint
String!,non-nullrequired

Return type

NotificationSubscription!
id
String!,non-null
endpoint
String!,non-null
Mutation sample
mutation createNotificationSubscription($type: NotificationSubscriptionType!, $endpoint: String!) {
  createNotificationSubscription(type: $type, endpoint: $endpoint) {
    type 
    id 
    endpoint 
  }
}
Variables
{ "type": "HTTPS", "endpoint": "Example String" }
Response sample
{ "data": { "type": "HTTPS", "id": "Example String", "endpoint": "Example String" } }

deleteNotificationSubscription

(subscriptionId)
Boolean!,non-null

Delete a notification subscription by its subscriptionId

Arguments

subscriptionId
String!,non-nullrequired

Return type

Boolean!

The Boolean scalar type represents true or false.

Mutation sample
mutation deleteNotificationSubscription($subscriptionId: String!) {
  deleteNotificationSubscription(subscriptionId: $subscriptionId) 
}
Variables
{ "subscriptionId": "Example String" }
Response sample
{ "data": true }

uploadFile

(fileUpload)
FileUpload!,non-null

Specify a file name and type for a given file to be uploaded and get a fileId and uploadUrl for it.

Use HTTP POST to upload the file content to the uploadUrl. The uploadUrl has a 15-minute expiration time so use it before then.

Pass the fileId as a parameter to other mutations, but only after posting the file content to the uploadUrl.

Arguments

fileUpload

Return type

FileUpload!
id
String!,non-null

Unique File ID

name
String!,non-null

Full file name provided by the user

type
FileType!,non-null

File type corresponds directly with the MIME type (and often the file extension)

uploadUrl
String!,non-null

Signed URL enabling file upload via HTTP PUT with 15-minute expiration

Mutation sample
mutation uploadFile($fileUpload: FileUploadInput) {
  uploadFile(fileUpload: $fileUpload) {
    id 
    name 
    type 
    uploadUrl 
  }
}
Variables
{ "fileUpload": { "name": "Example String", "type": "BMP", "category": "ORDERS" } }
Response sample
{ "data": { "id": "Example String", "name": "Example String", "type": "BMP", "uploadUrl": "Example String" } }

suggestContacts

(...args)

Suggest products based on those in the contacts prescription

Arguments

contacts
ContactsInput!,non-nullrequired

Contacts details

Contacts job options

List of tags

Return type

ContactsSuggestionJob
jobId

Unique ID for this job

status

Current job status

reason

Current job reason, if applicable

notes

Notes entered by Doctor and/or Visibly

contacts

Contacts details

tags

List of tags used to correlate this workflow with other systems

updatedAt
String!,non-null

Last date and time this job was updated

Mutation sample
mutation suggestContacts(
  $contacts: ContactsInput!
  $options: ContactsOptionsInput
  $tags: [TagInput]
) {
  suggestContacts(
    contacts: $contacts
    options: $options
    tags: $tags
  ) {
    jobId 
    status 
    reason 
    notes 
    contacts {
      __typename
      # ...ContactsFragment
    }
    tags {
      __typename
      # ...TagFragment
    }
    updatedAt 
  }
}
Variables
{ "contacts": { "products": { "__typename": "ContactsProductsInput" }, "prescription": { "__typename": "ContactsPrescriptionInput" } }, "options": { "verification": { "__typename": "ContactsVerificationOptionsInput" }, "prescription": { "__typename": "ContactsPrescriptionOptionsInput" }, "fulfillment": { "__typename": "ContactsFulfillmentOptionsInput" } }, "tags": [ { "name": "Example String", "value": "Example String" } ] }
Response sample
{ "data": { "jobId": "Example String", "status": "Example String", "reason": "Example String", "notes": "Example String", "contacts": { "__typename": "Contacts" }, "tags": [ { "__typename": "Tag" } ], "updatedAt": "Example String" } }

verifyContactsPrescription

(...args)

Start a contacts prescription verification job

Arguments

contacts
ContactsInput!,non-nullrequired

Contacts details

Contacts job options

List of tags

Return type

ContactsVerificationJob
jobId

Unique ID for this job

status

Current job status

reason

Current job reason, if applicable

notes

Notes entered by Doctor and/or Visibly

contacts

Contacts details

tags

List of tags used to correlate this workflow with other systems

updatedAt
String!,non-null

Last date and time this job was updated

Mutation sample
mutation verifyContactsPrescription(
  $contacts: ContactsInput!
  $options: ContactsOptionsInput
  $tags: [TagInput]
) {
  verifyContactsPrescription(
    contacts: $contacts
    options: $options
    tags: $tags
  ) {
    jobId 
    status 
    reason 
    notes 
    contacts {
      __typename
      # ...ContactsFragment
    }
    tags {
      __typename
      # ...TagFragment
    }
    updatedAt 
  }
}
Variables
{ "contacts": { "products": { "__typename": "ContactsProductsInput" }, "prescription": { "__typename": "ContactsPrescriptionInput" } }, "options": { "verification": { "__typename": "ContactsVerificationOptionsInput" }, "prescription": { "__typename": "ContactsPrescriptionOptionsInput" }, "fulfillment": { "__typename": "ContactsFulfillmentOptionsInput" } }, "tags": [ { "name": "Example String", "value": "Example String" } ] }
Response sample
{ "data": { "jobId": "Example String", "status": "Example String", "reason": "Example String", "notes": "Example String", "contacts": { "__typename": "Contacts" }, "tags": [ { "__typename": "Tag" } ], "updatedAt": "Example String" } }

verifyGlassesPrescription

(...args)

Start a glasses prescription verification job

Arguments

glasses
GlassesInput!,non-nullrequired

Glasses details

Job options

List of tags

Return type

GlassesPrescriptionVerificationJob
jobId

Unique ID for this job

status

Current job status

reason

Current job reason, if applicable

notes

Notes entered by Doctor and/or Visibly

issueDate

Prescription issue date, if available

expirationDate

Prescription expiration date, if available

tags

List of tags used to correlate this workflow with other systems

updatedAt
String!,non-null

Last date and time this job was updated

Mutation sample
mutation verifyGlassesPrescription(
  $glasses: GlassesInput!
  $options: GlassesOptionsInput
  $tags: [TagInput]
) {
  verifyGlassesPrescription(
    glasses: $glasses
    options: $options
    tags: $tags
  ) {
    jobId 
    status 
    reason 
    notes 
    issueDate 
    expirationDate 
    tags {
      __typename
      # ...TagFragment
    }
    updatedAt 
  }
}
Variables
{ "glasses": { "lenses": { "__typename": "GlassesLensesInput" }, "frame": { "__typename": "GlassesFrameInput" }, "prescription": { "__typename": "GlassesPrescriptionInput" } }, "options": { "verification": { "__typename": "GlassesVerificationOptionsInput" }, "prescription": { "__typename": "GlassesPrescriptionOptionsInput" }, "fulfillment": { "__typename": "GlassesFulfillmentOptionsInput" } }, "tags": [ { "name": "Example String", "value": "Example String" } ] }
Response sample
{ "data": { "jobId": "Example String", "status": "Example String", "reason": "Example String", "notes": "Example String", "issueDate": "Example String", "expirationDate": "Example String", "tags": [ { "__typename": "Tag" } ], "updatedAt": "Example String" } }

submitOrder

(order)

Submit order

Arguments

Order details

Return type

[Boolean]

The Boolean scalar type represents true or false.

Mutation sample
mutation submitOrder($order: OrderInput) {
  submitOrder(order: $order) 
}
Variables
{ "order": { "orderId": "Example String", "orderedAt": "Example String", "total": 40, "customer": { "__typename": "CustomerInput" }, "shipping": { "__typename": "ShippingInput" }, "items": [ { "__typename": "ItemInput" } ] } }
Response sample
{ "data": [ true ] }

saveOrder

(order)

Save order details

Arguments

Order details

Return type

Boolean

The Boolean scalar type represents true or false.

Mutation sample
mutation saveOrder($order: OrderInput) {
  saveOrder(order: $order) 
}
Variables
{ "order": { "orderId": "Example String", "orderedAt": "Example String", "total": 40, "customer": { "__typename": "CustomerInput" }, "shipping": { "__typename": "ShippingInput" }, "items": [ { "__typename": "ItemInput" } ] } }
Response sample
{ "data": true }

savePatient

(patient)

Save patient detailst

Arguments

patient
PatientInput!,non-nullrequired

Patient details

Return type

Boolean

The Boolean scalar type represents true or false.

Mutation sample
mutation savePatient($patient: PatientInput!) {
  savePatient(patient: $patient) 
}
Variables
{ "patient": { "patientId": "Example String", "firstName": "Example String", "middleName": "Example String", "lastName": "Example String", "dateOfBirth": "Example String", "phoneNumber": "Example String", "email": "Example String", "address": "Example String", "address2": "Example String", "city": "Example String", "state": "Example String", "zipCode": "Example String" } }
Response sample
{ "data": true }

saveContactsPrescription

(prescription)

Save contacts prescription details

Arguments

prescription

Contacts prescription details

Return type

Boolean

The Boolean scalar type represents true or false.

Mutation sample
mutation saveContactsPrescription($prescription: ContactsPrescriptionInput!) {
  saveContactsPrescription(prescription: $prescription) 
}
Variables
{ "prescription": { "fileId": "Example String", "prescriptionId": "Example String", "doctor": { "__typename": "DoctorInput" }, "patient": { "__typename": "PatientInput" }, "products": { "__typename": "ContactsProductsInput" } } }
Response sample
{ "data": true }

Directives

Overview

Objects

Overview

Interfaces

Overview

Enums

Overview

Inputs

Overview

Scalars

Overview