Mutations Reference List

A list of the mutations currently available with the Semble API

Jessica Magri avatar
Written by Jessica Magri
Updated over a week ago

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

Arguments - Data Type

addContactPhoneNumber

Returns a ContactResponsePayload type

ContactID - ID!

phoneData - AddContactPhoneData!

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

Arguments - Data Type

addInvoicePayment

Returns a NewInvoiceResponsePayload type

invoiceID - ID!

paymentData - NewInvoicePaymentDataInput

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

Arguments - Data Type

addLineItem

Returns a NewInvoiceResponsePayload type

invoiceID - ID!

paymentData - NewInvoicePaymentDataInput

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

Arguments - Data Type

addPatientAccessGroup

Returns a PatientResponsePayload type

patientID - ID!

accessGroupId - ID!

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

Arguments - Data Type

addPatientAttribute

Returns a PatientResponsePayload type

patientID - ID!

attributeData - AddCustomAttributeData!

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

Arguments - Data Type

addPatientLabel

Returns a PatientResponsePayload type

patientID - ID!

labelReferenceId - ID!

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

Arguments - Data Type

addPatientPhoneNumber

Returns a PatientResponsePayload type

patientID - ID!

phoneData - AddPhoneData!

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

Arguments - Data Type

addProductLabel

Returns a ProductResponsePayload type

productID - ID!

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

Arguments - Data Type

createBooking

Returns a BookingResponsePayload type

bookingData - BookingDataInput

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

Arguments - Data Type

createContact

Returns a NewContactPayload type

title - String

first - String!

last - String!

email - String

address - String

city - String

postcode - String

phoneType - String

phoneNumber - String

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

Arguments - Data Type

createInvoice

Returns a NewInvoiceResponsePayload type

invoiceData - NewInvoiceDataInput

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

Arguments - Data Type

createLabel

Returns a NewLabelPayload type

labelData - CreateLabelData

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

Arguments - Data Type

createLetter

Returns a LetterResponsePayload type

letterData - CreateLetterDataInput!

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

Arguments - Data Type

createPatient

Returns a PatientResponsePayload type

patientData - CreatePatientDataInput

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

Arguments - Data Type

createPatientDocument

Returns a NewPatientDocumentPayload type

patient - ID!

name - String!

type - String!

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

Arguments - Data Type

createPracticeTemplateDocument

Returns a NewPracticeTemplateDocumentPayload type

name - String!

type - String!

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

Arguments - Data Type

createProduct

Returns a ProductResponsePayload type

productData - ProductDataInput!

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

Arguments - Data Type

deleteBooking

Returns a BookingResponsePayload type

id - ID!

Example:

mutation deleteBooking($id: ID!) { 
deleteBooking(id: $id) {
data {
...BookingFragment
}
error
}
}

Delete Contact

This mutation deletes an existing contact from Heydoc.

Mutation

Response

Arguments - Data Type

deleteContact

Returns a ContactResponsePayload type

id - ID!

Example:

mutation deleteContact($id: ID!) { 
deleteContact(id: $id) {
data {
...ContactFragment
}
error
}
}

Delete Invoice

This mutation deletes an existing invoice from Heydoc.

Mutation

Response

Arguments - Data Type

deleteInvoice

Returns a NewInvoiceResponsePayload type

invoiceId - ID!

Example:

mutation deleteInvoice($invoiceId: ID!) { 
deleteInvoice(invoiceId: $invoiceId) {
data {
...InvoiceFragment
}
error
}
}

Delete Invoice Payment

This mutation deletes an invoice payment from Heydoc.

Mutation

Response

Arguments - Data Type

deleteInvoicePayment

Returns a NewInvoiceResponsePayload type

invoiceId - ID!

invoicePaymentId - ID!

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

Arguments - Data Type

deleteLetter

Returns a LetterResponsePayload type

id - ID!

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

Arguments - Data Type

deleteLineItem

Returns a NewInvoiceResponsePayload type

invoiceId - ID!

lineItemId - ID!

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

Arguments - Data Type

deletePatient

Returns a PatientResponsePayload type

id - ID!

Example:

mutation deletePatient($id: ID!) { 
deletePatient(id: $id) {
data {
...PatientFragment
}
error
}
}

Delete Product

This mutation deletes a product from Heydoc.

Mutation

Response

Arguments - Data Type

deleteProduct

Returns a ProductResponsePayload type

id - ID!

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

Arguments - Data Type

removeContactPhoneNumber

Returns a ContactResponsePayload type

contactId - ID!

phoneId - ID!

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

Arguments - Data Type

removePatientAccessGroup

Returns a PatientResponsePayload type

patientId - ID!

accessGroupId - ID!

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

Arguments - Data Type

removePatientAttribute

Returns a PatientResponsePayload type

patientId - ID!

attributeId - ID!

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

Arguments - Data Type

removePatientLabel

Returns a PatientResponsePayload type

patientId - ID!

labelId - ID!

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

Arguments - Data Type

removePatientNumber

Returns a PatientResponsePayload type

patientId - ID!

patientNumberId - ID!

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

Arguments - Data Type

removePatientPhoneNumber

Returns a PatientResponsePayload type

patientId - ID!

phoneId - ID!

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

Arguments - Data Type

removeProductLabel

Returns a ProductResponsePayload type

productId - ID!

labelId - ID!

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

Arguments - Data Type

signIn

Returns a Token! type

apiKey - String

email - String

password - String!

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

Arguments - Data Type

updateBooking

Returns a BookingResponsePayload type

id - ID!

bookingData - BookingDataInput

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

Arguments - Data Type

updateBookingJourney

Returns a BookingResponsePayload type

id - ID!

bookingJourneyInput - BookingJourneyInput

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

Arguments - Data Type

updateContact

Returns a ContactResponsePayload type

id - ID!

ContactData - UpdateInvoiceDataInput

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

Arguments - Data Type

updateContactPhoneNumber

Returns a ContactResponsePayload type

contactId - ID!

phoneId - ID!

phoneData - UpdateContactPhoneData

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

Arguments - Data Type

updateInvoice

Returns a NewInvoiceResponsePayload type

invoiceId - ID!

invoiceData - UpdateInvoiceDataInput

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

Arguments - Data Type

updateInvoicePayment

Returns a NewInvoiceResponsePayload type

invoiceId - ID!

invoicePaymentID - ID!

paymentData - UpdateInvoiceDataInput

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

Arguments - Data Type

updateLetter

Returns a LetterResponsePayload type

id - ID!

letterData - UpdateLetterDataInput!

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

Arguments - Data Type

updateLineItem

Returns a NewInvoiceResponsePayload type

invoiceId - ID!

lineItemID - ID!

lineItemData - UpdateLineItemDataInput

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

Arguments - Data Type

updatePatient

Returns a PatientResponsePayload type

id - ID!

patientData - UpdatePatientDataInput!

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

Arguments - Data Type

updatePatientAttribute

Returns a PatientResponsePayload type

patientId - ID!

attributeID - ID!

attributeData - UpdateCustomAttributeData!

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

Arguments - Data Type

updatePatientNumber

Returns a PatientResponsePayload type

patientid - ID!

patientNumberID - ID!

value - UpdatePhoneData

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

Arguments - Data Type

updatePatientPhoneNumber

Returns a PatientResponsePayload type

patientid - ID!

phoneID - ID!

phoneData - UpdatePhoneData

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

Arguments - Data Type

updateProduct

Returns a ProductResponsePayload type

id - ID!

productData - ProductDataInput!

Example:

mutation updateProduct($id: ID!, $productData: ProductDataInput!) { updateProduct(id: $id, productData: $productData) { 
data {
...ProductFragment
}
error
}
}
Did this answer your question?