# Recalculation

再計算請求データのAPIリファレンスは以下の通りです。

## Get recalculation list

再計算請求データの取得

**Role actions**

* `ReadBillingGroup`
* `ModifyBillingGroup`

**Request**

```http
GET /billinggroup/recalculation/{month}?vendor={vendor} HTTP1.1
Authorization: Bearer {token}
```

リクエストパラーメータの`{month}`のフォーマット: `yyyy-mm` 例: 2020-01 \
リクエストパラーメータの`{vendor}`のサポートベンダー: `aws`,`azure`

**Response**

```ruby
HTTP 200

[
  {
    "customer_id":"012345678912",
    "customer_name":"customer1",
    "company_id":"company1",
    "billinggroup_id":"billing1",
    "billinggroup_name":"billing1",
    "project_code":null,
    "id": "recalculationid1",
    "calc_type":"Fee",
    "mobingi_type":"REGISTRAR",
    "description":"[OP-n4GB] Renewal",
    "product_name":"Amazon Registrar",
    "account_id":"012345678912",
    "currency_code":"USD",
    "product_code":"AmazonRegistrar",
    "unblended_cost":"90.0000000000",
    "time_interval":"2020-05-27T15:00:00Z\/2021-05-26T15:00:01Z",
    "usage_start":"2020-05-27T15:00:00Z",
    "apply":false,
    "exchange_rate":null,
    "tax_free":false,
    "vendor":"aws"
  },
  ...
]
```

## Apply recalculation

再計算請求データの適用・未適用の割当

**Role actions**

* `ModifyBillingGroup`

**Request**

```http
POST /billinggroup/recalculation HTTP1.1
Authorization: Bearer {token}
Content-Type: application/json

{request body}
```

以下に`{request body}`のリクエストペイロードの例を示します。

**{request body}**

```ruby
{
    "data": [
        "recalculationid1",
        "recalculationid2",
        "recalculationid3"
    ],
    "month": "2021-01",
    "exchange_rate":104.02,
    "tax_free":true,
    "apply":true,
    "vendor":"aws"
}
```

**{request body} description**

| Field          | Type      | Required | Validation        | Description   |
| -------------- | --------- | -------- | ----------------- | ------------- |
| data           | *array*   | Yes      | \[id1,id2,id3...] | 再計算請求データIDの一覧 |
| month          | *string*  | Yes      | -                 | 適用・未適用する対象月   |
| exchange\_rate | *double*  | Yes      | -                 | 適用・未適用する為替レート |
| tax\_free      | *boolean* | Yes      | -                 | 免税設定          |
| apply          | *boolean* | Yes      | -                 | 適用・未適用設定      |
| vendor         | *string*  | Yes      | -                 | ベンダー          |

**Response**

```ruby
HTTP 200

{"status":"success"}
```


---

# 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.alphaus.cloud/api-reference/ripple/recalculation.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.
