# Settings

The "Setting" section offers features for users to update their billing address and manage tax identification (tax ID) information. Users can modify their billing details as well as add or remove tax IDs, providing flexibility and control over their financial and tax-related information within the platform.

## Get billing settings

<mark style="color:blue;">`GET`</mark> `{{BASE_URL}}/api/billing-settings`

Get the billing settings for the team that the customer is a member of.

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer Token |

{% tabs %}
{% tab title="200: OK " %}

```json
{
    "_id": "6548e2660919dc0442dc2ec7",
    "user": "6548a41138406c14db33b606",
    "address1": "Test",
    "address2": "test",
    "city": "Test",
    "company": "Rezet",
    "country": "Afghanistan",
    "createdAt": "2023-11-06T12:56:06.296Z",
    "state": "Test",
    "taxId": null,
    "updatedAt": "2023-11-06T12:56:12.057Z",
    "zip": "34334"
}
```

{% endtab %}
{% endtabs %}

## Update billing settings

<mark style="color:orange;">`PUT`</mark> `{{BASE_URL}}/api/billing-settings`

Update the billing settings for the team that the customer is a member of.

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer Token |

#### Request Body

| Name     | Type   | Description |
| -------- | ------ | ----------- |
| address1 | String |             |
| address2 | String |             |
| city     | String |             |
| company  | String |             |
| country  | String |             |
| state    | String |             |
| zip      | String |             |

{% tabs %}
{% tab title="200: OK " %}

```json
{
    "_id": "6548e2660919dc0442dc2ec7",
    "user": "6548a41138406c14db33b606",
    "address1": "test1",
    "address2": "Test",
    "city": "Test",
    "company": "Rezet",
    "country": "Afghanistan",
    "createdAt": "2023-11-06T12:56:06.296Z",
    "state": "Test",
    "taxId": null,
    "updatedAt": "2023-11-06T13:02:08.440Z",
    "zip": "34334"
}
```

{% endtab %}
{% endtabs %}

## Create taxID

<mark style="color:green;">`POST`</mark> `{{BASE_URL}}/api/teams/{id}/tax_ids`

Displaying a customer’s tax ID on [invoice](https://stripe.com/docs/api/invoices) documents is a common requirement that you can satisfy by adding tax IDs to customers.

#### Path Parameters

| Name                               | Type   | Description |
| ---------------------------------- | ------ | ----------- |
| <mark style="color:red;">\*</mark> | String | team id     |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer Token |

#### Request Body

| Name                                    | Type   | Description |
| --------------------------------------- | ------ | ----------- |
| value<mark style="color:red;">\*</mark> | String |             |
| type<mark style="color:red;">\*</mark>  | String |             |

{% tabs %}
{% tab title="201: Created " %}

```json
{
    "taxId": {
        "value": "A-123456-Z",
        "stripeId": "txi_1O9SVtA0ZUrt0vQJbIeZgLFJ",
        "status": 0
    }
}
```

{% endtab %}
{% endtabs %}

## Delete taxID

<mark style="color:red;">`DELETE`</mark> `{{BASE_URL}}/api/teams/{teamId}/tax_ids/{taxId}`

Deletes an existing `tax_id` object.

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer Token |

{% tabs %}
{% tab title="200: OK " %}

```json
{
    "status": "ok"
}
```

{% endtab %}
{% endtabs %}


---

# 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.enclaive.cloud/enclaive-multi-cloud-platform/developers/api/client-api/billing/settings.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.
