Update Appointment Credits

Use the updateAppointmentCredits mutation to increase, decrease, or send an exact number of credits to update the appointment credits information. Use this if the third party has access to the Coaching Portal

Required Arguments

Argument Name

Type

Description

profile

ID

User Id Base-64 ID.

appointmentType

ID

Appointment type Base-64 ID

Available Arguments

Argument NameTypeDescription

Argument Name

Type

Description

increase

Int

Value to increase the number of credits

decrease

Int

Value to decrease the number of credits

value

Int

Use this to send the exact number of credits the user will have.

Available Fields

The following fields will be displayed in the response:

Field NameTypeDescription

Field Name

Type

Description

credits

AppointmentCredit

A structured version of appointment credit information. It contains appointmentType, value, and idfields

message

Boolean

True if the appointment credits has been updated successfully. Otherwise, False

success

Boolean

Description of the result

Example

mutation(
  $profile: ID!
  $type: ID!
  $increase: Int
  $decrease: Int
  $value: Int
) {
  updateAppointmentCredits(
    profile: $profile
    appointmentType: $type
    increase: $increase
    decrease: $decrease
    value: $value
  ) {
    success
    message
  }
}
{
"profile": "TWVtYmVyOjVlZDk5MjMyLWNhMTMtNGE2NS05MmIyLWZjMDk4ZjgyOWUwNA==",
  "type": "QXBwb2ludG1lbnRUeXBlOjI=",
  "increase": 1,
  "decrease": 2,
  "value": 5
}

Last updated