This article gives a current list of mutations that are available with the Semble API. For general information about mutations, see here.
Note: Data types that have an exclamation mark ( ! ) after them are required for the query or mutation that you want to perform.
Note: Before you attempt to query the Heydoc API, make sure you have signed in.
Add Contact Phone Number
This mutation is for adding an external contact's phone number.
Mutation | Response |
|
| Returns a |
|
Example:
mutation addContactPhoneNumber($contactId: ID!, $phoneData: AddContactPhoneData!) { addContactPhoneNumber(contactId: $contactId, phoneData: $phoneData) {
data {
...ContactFragment
}
error
}
}
Add Invoice Payment
This mutation is for adding an invoice payment to an existing invoice.
Mutation | Response |
|
| Returns a |
|
Example:
mutation addInvoicePayment($invoiceId: ID!, $paymentData: NewInvoicePaymentDataInput) {
addInvoicePayment(invoiceId: $invoiceId, paymentData: $paymentData) {
data {
...InvoiceFragment
}
error
}
}
Add Line Item
This mutation is for adding a new line item to an invoice.
Mutation | Response |
|
| Returns a |
|
Example:
mutation addLineItem($invoiceId: ID!, $lineItemData: NewLineItemDataInput) {
addLineItem(invoiceId: $invoiceId, lineItemData: $lineItemData)
data {
...InvoiceFragment
}
error
}
}
Add Patient Access Group
This mutation is for adding a patient to an access group.
Mutation | Response |
|
| Returns a |
|
Example:
mutation addPatientAccessGroup($patientId: ID!, $accessGroupId: ID!) {
addPatientAccessGroup(patientId: $patientId, accessGroupId: $accessGroupId) {
data {
...PatientFragment
}
error
}
}
Add Patient Attribute
This mutation is for adding a patient attribute.
Mutation | Response |
|
| Returns a |
|
Example:
mutation addPatientAttribute($patientId: ID!, $attributeData: AddCustomAttributeData!) {
addPatientAttribute(patientId: $patientId, attributeData: $attributeData) {
data {
...PatientFragment
}
error
}
}
Add Patient Label
This mutation is for adding a patient label.
Mutation | Response |
|
| Returns a |
|
Example:
mutation addPatientLabel($patientId: ID!, $labelReferenceId: ID!) {
addPatientLabel(patientId: $patientId, labelReferenceId: $labelReferenceId) {
data {
...PatientFragment
}
error
}
}
Add Patient Phone Number
This mutation is for adding a phone number to a patient's summary.
Mutation | Response |
|
| Returns a |
|
Example:
mutation addPatientPhoneNumber($patientId: ID!, $phoneData: AddPhoneData!) {
addPatientPhoneNumber(patientId: $patientId, phoneData: $phoneData) {
data {
...PatientFragment
}
error
}
}
Add Product Label
This mutation is for adding a digital label to a specific product.
Mutation | Response |
|
| Returns a |
labelReferenceId - ID! |
Example:
mutation addProductLabel($productId: ID!, $labelReferenceId: ID!) {
addProductLabel(productId: $productId, labelReferenceId: $labelReferenceId) {
data {
...ProductFragment
}
error
}
}
Create Booking
This mutation is for creating a new booking for the Appointments calendar in Heydoc.
Mutation | Response |
|
| Returns a |
|
Example:
mutation createBooking($patient: ID, $location: ID, $bookingType: ID, $doctor: ID, $comments: String, $start: Date, $end: Date, $bookingData: BookingDataInput) {
createBooking(patient: $patient, location: $location, bookingType: $bookingType, doctor: $doctor, comments: $comments, start: $start, end: $end, bookingData: $bookingData) {
data {
...BookingFragment
}
error
}
}
Create Contact
This mutation is for creating a new external contact in Heydoc.
Mutation | Response |
|
| Returns a |
|
Example:
mutation createContact($title: String, $first: String!, $last: String!, $email: String, $address: String, $city: String, $postcode: String, $country: String, $phoneType: String, $phoneNumber: String) {
createContact(title: $title, first: $first, last: $last, email: $email, address: $address, city: $city, postcode: $postcode, country: $country, phoneType: $phoneType, phoneNumber: $phoneNumber) {
data {
...ContactFragment
}
error
}
}
Create Invoice
This mutation is for creating a new invoice in Heydoc.
Mutation | Response |
|
| Returns a |
|
Example:
mutation createInvoice($invoiceData: NewInvoiceDataInput) {
createInvoice(invoiceData: $invoiceData) {
data {
...InvoiceFragment
}
error
}
}
Create Label
This mutation is for creating a new label type in Heydoc.
Mutation | Response |
|
| Returns a |
|
Example:
mutation createLabel($labelData: CreateLabelData) {
createLabel(labelData: $labelData) {
data {
...LabelFragment
}
error
}
}
Create Letter
This mutation is for creating a new letter in Heydoc.
Mutation | Response |
|
| Returns a |
|
Example:
mutation createLetter($letterData: CreateLetterDataInput!) {
createLetter(letterData: $letterData) {
data {
...LetterFragment
}
error
}
}
Create Patient
This mutation is for creating a new patient in Heydoc.
Mutation | Response |
|
| Returns a |
|
Example:
mutation createPatient($title: String, $first: String, $last: String, $email: String, $dob: Date, $gender: String, $sex: String, $address: String, $city: String, $postcode: String, $country: String, $phoneType: String, $phoneNumber: String, $patientData: CreatePatientDataInput) {
createPatient(title: $title, first: $first, last: $last, email: $email, dob: $dob, gender: $gender, sex: $sex, address: $address, city: $city, postcode: $postcode, country: $country, phoneType: $phoneType, phoneNumber: $phoneNumber, patientData: $patientData) {
data {
...PatientFragment
}
error
}
}
Create Patient Document
This mutation is for creating a new patient document in Heydoc.
Mutation | Response |
|
| Returns a |
|
Example:
mutation createPatientDocument($patient: ID!, $name: String!, $type: String!) {
createPatientDocument(patient: $patient, name: $name, type: $type){
data {
...PatientDocumentFragment
}
error
}
}
Create Practice Template Document
This mutation creates a practice template document in Heydoc.
Mutation | Response |
|
| Returns a |
|
Example:
mutation createPracticeTemplateDocument($name: String!, $type: String!) {
createPracticeTemplateDocument(name: $name, type: $type) {
data {
...PracticeTemplateDocumentFragment
}
error
}
}
Create Product
This mutation creates a new product in Heydoc.
Mutation | Response |
|
| Returns a |
|
Example:
mutation createProduct($productData: ProductDataInput!) {
createProduct(productData: $productData) {
data {
...ProductFragment
}
error
}
}
Delete Booking
This mutation deletes a booking from the Appointments calendar in Heydoc.
Mutation | Response |
|
| Returns a |
|
Example:
mutation deleteBooking($id: ID!) {
deleteBooking(id: $id) {
data {
...BookingFragment
}
error
}
}
Delete Contact
This mutation deletes an existing contact from Heydoc.
Mutation | Response |
|
| Returns a |
|
Example:
mutation deleteContact($id: ID!) {
deleteContact(id: $id) {
data {
...ContactFragment
}
error
}
}
Delete Invoice
This mutation deletes an existing invoice from Heydoc.
Mutation | Response |
|
| Returns a |
|
Example:
mutation deleteInvoice($invoiceId: ID!) {
deleteInvoice(invoiceId: $invoiceId) {
data {
...InvoiceFragment
}
error
}
}
Delete Invoice Payment
This mutation deletes an invoice payment from Heydoc.
Mutation | Response |
|
| Returns a |
|
Example:
mutation deleteInvoicePayment($invoiceId: ID!, $invoicePaymentId: ID!){
deleteInvoicePayment(invoiceId: $invoiceId, invoicePaymentId: $invoicePaymentId) {
data {
...InvoiceFragment
}
error
}
}
Delete Letter
This mutation deletes a letter from Heydoc.
Mutation | Response |
|
| Returns a |
|
Example:
mutation deleteLetter($id: ID!) {
deleteLetter(id: $id) {
data {
...LetterFragment
}
error
}
}
Delete Line Item
This mutation deletes a line item from an invoice.
Mutation | Response |
|
| Returns a |
|
Example:
mutation deleteLineItem($invoiceId: ID!, $lineItemId: ID!) {
deleteLineItem(invoiceId: $invoiceId, lineItemId: $lineItemId) {
data {
...InvoiceFragment
}
error
}
}
Delete Patient
This mutation deletes a patient from Heydoc.
Mutation | Response |
|
| Returns a |
|
Example:
mutation deletePatient($id: ID!) {
deletePatient(id: $id) {
data {
...PatientFragment
}
error
}
}
Delete Product
This mutation deletes a product from Heydoc.
Mutation | Response |
|
| Returns a |
|
Example:
mutation deleteProduct($id: ID!) {
deleteProduct(id: $id) {
data {
...ProductFragment
}
error
}
}
Remove Contact Phone Number
This mutation removes a phone number from an external contact.
Mutation | Response |
|
| Returns a |
|
Example:
mutation removeContactPhoneNumber($contactId: ID!, $phoneId: ID!) {
removeContactPhoneNumber(contactId: $contactId, phoneId: $phoneId) {
data {
...ContactFragment
}
error
}
}
Remove Patient Access Group
This mutation removes a patient from an access group.
Mutation | Response |
|
| Returns a |
|
Example:
mutation removePatientAccessGroup($patientId: ID!, $accessGroupId: ID!) {
removePatientAccessGroup(patientId: $patientId, accessGroupId: $accessGroupId) {
data {
...PatientFragment
}
error
}
}
Remove Patient Attribute
This mutation removes a patient attribute.
Mutation | Response |
|
| Returns a |
|
Example:
mutation removePatientAttribute($patientId: ID!, $attributeId: ID!) {
removePatientAttribute(patientId: $patientId, attributeId: $attributeId) {
data {
...PatientFragment
}
error
}
}
Remove Patient Label
This mutation removes a label from a patient.
Mutation | Response |
|
| Returns a |
|
Example:
mutation removePatientLabel($patientId: ID!, $labelId: ID!) {
removePatientLabel(patientId: $patientId, labelId: $labelId) {
data {
...PatientFragment
}
error
}
}
Remove Patient Number
This mutation removes a patient ID number from their record.
Mutation | Response |
|
| Returns a |
|
Example:
mutation removePatientNumber($patientId: ID!, $patientNumberId: ID!) {
removePatientNumber(patientId: $patientId, patientNumberId: $patientNumberId) {
data {
...PatientFragment
}
error
}
}
Remove Patient Phone Number
This mutation removes the phone number from a patient's summary.
Mutation | Response |
|
| Returns a |
|
Example:
mutation removePatientPhoneNumber($patientId: ID!, $phoneId: ID!) {
removePatientPhoneNumber(patientId: $patientId, phoneId: $phoneId) {
data {
...PatientFragment
}
error
}
}
Remove Product Label
This mutation removes a digital label from a specific product.
Mutation | Response |
|
| Returns a |
|
Example:
mutation removeProductLabel($productId: ID!, $labelId: ID!) {
removeProductLabel(productId: $productId, labelId: $labelId) {
data {
...ProductFragment
}
error
}
}
Sign In
This mutation generates an authentication token used for signing into the Heydoc API. For more information on how to sign into the Heydoc API, see here.
Mutation | Response |
|
| Returns a |
|
Example:
mutation signIn($apiKey: String, $email: String, $password: String!) {
signIn(apiKey: $apiKey, email: $email, password: $password) {
token user {
...UserFragment
}
}
}
Update Booking
This mutation updates the details of an existing booking made in the Appointments calendar.
Mutation | Response |
|
| Returns a |
|
Example:
mutation updateBooking($id: ID!, $bookingData: BookingDataInput) { updateBooking(id: $id, bookingData: $bookingData) {
data {
...BookingFragment
}
error
}
}
Update Booking Journey
This mutation updates the journey of a patient for a booking.
Mutation | Response |
|
| Returns a |
|
Example:
mutation updateBookingJourney($id: ID!, $bookingJourneyInput: BookingJourneyInput) {
updateBookingJourney(id: $id, bookingJourneyInput: $bookingJourneyInput) {
data {
...BookingFragment
}
error
}
}
Update Contact
This mutation updates the details of a contact.
Mutation | Response |
|
| Returns a |
|
Example:
mutation updateContact($id: ID!, $contactData: UpdateContactDataInput!) { updateContact(id: $id, contactData: $contactData) {
data {
...ContactFragment
}
error
}
}
Update Contact Phone Number
This mutation updates an external contact's phone number.
Mutation | Response |
|
| Returns a |
|
Example:
mutation updateContactPhoneNumber($contactId: ID!, $phoneId: ID!, $phoneData: UpdateContactPhoneData) { updateContactPhoneNumber(contactId: $contactId, phoneId: $phoneId, phoneData: $phoneData) {
data {
...ContactFragment
}
error
}
}
Update Invoice
This mutation updates the details of an existing invoice in Heydoc.
Mutation | Response |
|
| Returns a |
|
Example:
mutation updateInvoice($invoiceId: ID!, $invoiceData: UpdateInvoiceDataInput) { updateInvoice(invoiceId: $invoiceId, invoiceData: $invoiceData) {
data {
...InvoiceFragment
}
error
}
}
Update Invoice Payment
This mutation updates the details of a payment made to an invoice.
Mutation | Response |
|
| Returns a |
|
Example:
mutation updateInvoicePayment($invoiceId: ID!, $invoicePaymentId: ID!, $paymentData: UpdateInvoicePaymentDataInput) { updateInvoicePayment(invoiceId: $invoiceId, invoicePaymentId: $invoicePaymentId, paymentData: $paymentData) {
data {
...InvoiceFragment
}
error
}
}
Update Letter
This mutation updates an existing letter.
Mutation | Response |
|
| Returns a |
|
Example:
mutation updateLetter($id: ID!, $letterData: UpdateLetterDataInput!) { updateLetter(id: $id, letterData: $letterData) {
data {
...LetterFragment
}
error
}
}
Update Line Item
This mutation updates a line item on an existing invoice.
Mutation | Response |
|
| Returns a |
|
Example:
mutation updateLineItem($invoiceId: ID!, $lineItemId: ID!, $lineItemData: UpdateLineItemDataInput) { updateLineItem(invoiceId: $invoiceId, lineItemId: $lineItemId, lineItemData: $lineItemData) {
data {
...InvoiceFragment
}
error
}
}
Update Patient
This mutation updates the details of an existing patient.
Mutation | Response |
|
| Returns a |
|
Example:
mutation updatePatient($id: ID!, $patientData: UpdatePatientDataInput!) { updatePatient(id: $id, patientData: $patientData) {
data {
...PatientFragment
}
error
}
}
Update Patient Attribute
This mutation updates a patient attribute.
Mutation | Response |
|
| Returns a |
|
Example:
mutation updatePatientAttribute($patientId: ID!, $attributeId: ID!, $attributeData: UpdateCustomAttributeData!) { updatePatientAttribute(patientId: $patientId, attributeId: $attributeId, attributeData: $attributeData) {
data {
...PatientFragment
}
error
}
}
Update Patient Number
This mutation updates the ID number of a specific patient.
Mutation | Response |
|
| Returns a |
|
Example:
mutation updatePatientNumber($patientId: ID!, $patientNumberId: ID!, $value: String) { updatePatientNumber(patientId: $patientId, patientNumberId: $patientNumberId, value: $value) {
data {
...PatientFragment
}
error
}
}
Update Patient Phone Number
This mutation updates the phone number of an existing patient.
Mutation | Response |
|
| Returns a |
|
Example:
mutation updatePatientPhoneNumber($patientId: ID!, $phoneId: ID!, $phoneData: UpdatePhoneData) { updatePatientPhoneNumber(patientId: $patientId, phoneId: $phoneId, phoneData: $phoneData) {
data {
...PatientFragment
}
error
}
}
Update Product
This mutation updates the details of a product.
Mutation | Response |
|
| Returns a |
|
Example:
mutation updateProduct($id: ID!, $productData: ProductDataInput!) { updateProduct(id: $id, productData: $productData) {
data {
...ProductFragment
}
error
}
}