# TaxRate

## Module endpoints

* [`DELETE /tax-rates/:id`](#delete-tax-rates-id)​
* ​[`GET /tax-rates`](#get-invites)​
* ​[`GET /tax-rates/:id`](#get-tax-rates-id)​
* ​[`PATCH /tax-rates/:id`](#patch-tax-rates-id)​
* ​[`POST /tax-rates`](#post-tax-rates)​

### `DELETE /tax-rates/:id`

> `DELETE` <http://api.slyk.i&#x6F;**/tax-rates/:id>\*\*

Deletes the `tax rate` with given `id`.

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

> `204` No Content
> {% endtab %}
> {% endtabs %}

### `GET /tax-rates` <a href="#get-invites" id="get-invites"></a>

> `GET` <https://api.slyk.i&#x6F;**/tax-rates>\*\*

Returns a paginated list of `tax rates`.

{% tabs %}
{% tab title="Available Filters" %}

| Name         |      Type      | Example                                           |
| ------------ | :------------: | ------------------------------------------------- |
| **id**       | `=` `in` `nin` | `filter[id]=7938e446-1c77-4513-8cb0-8b1f2e9f47b9` |
| **name**     |     `ilike`    | `filter[name]=foo`                                |
| {% endtab %} |                |                                                   |

{% tab title="Available Sorts" %}

| Name          | Example                                                            |
| ------------- | ------------------------------------------------------------------ |
| **createdAt** | <p><code>sort=createdAt</code><br><code>sort=-createdAt</code></p> |
| **name**      | <p><code>sort=name</code><br><code>sort=-name</code></p>           |
| **rate**      | <p><code>sort=rate</code><br><code>sort=-rate</code></p>           |
| {% endtab %}  |                                                                    |

{% tab title="Paginate Options" %}

| Name         | Description                                             | Example          |
| ------------ | ------------------------------------------------------- | ---------------- |
| **size**     | Defines the number of results per page. Default = 30.   | `page[size]=2`   |
| **number**   | Defines the number of the page to retrieve. Default = 1 | `page[number]=2` |
| {% endtab %} |                                                         |                  |

{% tab title="Response" %}

```javascript
{
  "data": [
    {
      "createdAt": "2020-08-10T10:00:00.000Z",
      "id": "fc78d28f-a8dd-49de-a22f-722fe3bd26c8",
      "name": "foobar",
      "rate": "1.00000000",
      "updatedAt": "2020-08-10T10:00:00.000Z"
    },
    {
      "createdAt": "2020-08-10T10:00:00.000Z",
      "id": "ec78d28f-a8dd-49de-a22f-722fe3bd26c7",
      "name": "foobiz",
      "rate": "2.00000000",
      "updatedAt": "2020-08-10T10:00:00.000Z"
    }
  ],
  "total": 2
}
```

{% endtab %}
{% endtabs %}

### `GET /tax-rates/:id`

> `GET` <https://api.slyk.i&#x6F;**/tax-rates/:id**‌>

Gets the tax rate details of the given `id`.

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

```javascript
{
  "data": {
      "createdAt": "2020-08-10T10:00:00.000Z",
      "id": "fc78d28f-a8dd-49de-a22f-722fe3bd26c8",
      "name": "foobar",
      "rate": "1.00000000",
      "updatedAt": "2020-08-10T10:00:00.000Z"
    }
}
```

{% endtab %}
{% endtabs %}

### `PATCH /tax-rates/:id`

> `PATCH` <https://api.slyk.i&#x6F;**/tax-rates/:id>\*\*

Patches the `tax rate` details of the given `id`.

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

| Field        |   Type   | Required | Description     |
| ------------ | :------: | :------: | --------------- |
| **name**     | `string` |  `false` | Tax rate name.  |
| **rate**     | `string` |  `false` | Tax rate value. |
| {% endtab %} |          |          |                 |

{% tab title="Request" %}

```javascript
{
  "name": "foobar",
  "rate": "1.3000000"
}
```

{% endtab %}

{% tab title="Response" %}

```javascript
{
  "data": {
    "createdAt": "2020-08-10T10:00:00.000Z",
    "id": "7938e446-1c77-4513-8cb0-8b1f2e9f47b9",
    "name": "foobar",
    "rate": "1.30000000",
    "updatedAt": "2020-08-10T11:00:00.000Z"
  }
}
```

{% endtab %}
{% endtabs %}

### `POST /tax-rates`

> `POST` <https://api.slyk.i&#x6F;**/tax-rates>\*\*

Creates a new `tax rate`.

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

<table data-header-hidden><thead><tr><th width="163">Field</th><th align="center">Type</th><th width="150" align="center">Required</th><th>Description</th></tr></thead><tbody><tr><td>Field</td><td align="center">Type</td><td align="center">Required</td><td>Description</td></tr><tr><td><strong>name</strong></td><td align="center"><code>string</code></td><td align="center"><code>true</code></td><td>Tax rate name.</td></tr><tr><td><strong>rate</strong></td><td align="center"><code>string</code></td><td align="center"><code>true</code></td><td>Tax rate value.</td></tr></tbody></table>
{% endtab %}

{% tab title="Request" %}

```javascript
{
  "name": "foobar",
  "rate": "1.3000000"
}
```

{% endtab %}

{% tab title="Response" %}

```javascript
{
  "data": {
    "createdAt": "2020-08-10T10:00:00.000Z",
    "id": "7938e446-1c77-4513-8cb0-8b1f2e9f47b9",
    "name": "foobar",
    "rate": "1.30000000",
    "updatedAt": "2020-08-10T10:00:00.000Z"
  }
}
```

{% 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://developers.slyk.io/slyk/reference/endpoints/taxrate.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.
