# 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)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.suggestic.com/telewellness-portal/api-reference/appointments/add-appointment-credits.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
