> For the complete documentation index, see [llms.txt](https://docs.suggestic.com/telewellness-portal/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.suggestic.com/telewellness-portal/api-reference/appointments/add-appointment-credits.md).

# Add Appointment Credits

Use the `addAppointmentCredits` mutation to add appointment [credits ](https://docs.suggestic.com/coaching-portal/user-management/managing-members#credits)to a specific member to be added to an appointment.&#x20;

Remember to add credits per appointment type.

### Required Arguments

| **Argument Name** | **Type** |                                                                         **Description**                                                                        |
| :---------------: | :------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| `appointmentType` |    ID    | Unique appointment type ID. Execute the [`appointmentTypes`](/telewellness-portal/api-reference/appointments/appointment-types.md#example) query to get the ID |
|      `member`     |    ID    |                         Unique memeber ID. Execute the [`members` ](/telewellness-portal/api-reference/members.md)query to get the ID.                         |

### Available Arguments

| **Argument Name** | **Type** |         **Description**         |
| :---------------: | :------: | :-----------------------------: |
|     `increase`    |    Int   | Increase the number of credits. |
|     `decrease`    |    Int   | Decrease the number of credits. |
|      `value`      |    Int   | Add an exact number of credits. |

## Available Fields

The following fields will be displayed in the response:

| **Field Name** | **Type**                        | **Description**                                                                       |
| -------------- | ------------------------------- | ------------------------------------------------------------------------------------- |
| `success`      | string                          | **True** if the user has program has been updated  successfully. Otherwise, **False** |
| `message`      | string                          | Description of the result                                                             |
| `credits`      | [AppointmentCredit](#undefined) | Object that returns the information of a credit.                                      |

## Appointment Credit&#x20;

|    Field Name   |                                                             Type                                                            |          Description         |
| :-------------: | :-------------------------------------------------------------------------------------------------------------------------: | :--------------------------: |
|  **Field Name** |                                                             Type                                                            |        **Description**       |
|        ID       |                                                              ID                                                             |       Credit unique ID       |
| appointmentType | [AppointmentType](https://docs.suggestic.com/coaching-portal/api-references/appointments/appointment-list#available-fields) | Appointment type information |
|      value      |                                                             Int                                                             |     Credit current value     |

## Example

{% tabs %}
{% tab title="Request" %}

```graphql
mutation {
  addAppointmentCredits(
    member: "TWVtYmVyOjVlZDk5MjMyLWNhMTMtNGE2NS05MmIyLWZjMDk4ZjgyOWUwNA=="
    appointmentType: "QXBwb2ludG1lbnRUeXBlOjU="
    increase: 3
    decrease: 0
  ) {
    success
    message
    credits {
      id
      appointmentType {
        id
        title
      }
      value
    }
  }
}
```

{% endtab %}

{% tab title="Response" %}

```graphql
{
  "data": {
    "addAppointmentCredits": {
      "success": true,
      "message": "Appointment Credits were updated",
      "credits": {
        "id": "QXBwb2ludG1lbnRDcmVkaXQ6Nw==",
        "appointmentType": {
          "id": "QXBwb2ludG1lbnRUeXBlOjU=",
          "title": "Onboarding call "
        },
        "value": 3
      }
    }
  }
}
```

{% endtab %}
{% endtabs %}

Within the TeleWellness Portal, edit the information of the corresponding member, check that the credits information has been updated:

![](/files/L6kAN1IjQH99Lsc2rA5J)
