# OriginalCost

原価データのAPIリファレンスは以下の通りです。

## Set exchange rate per InvoiceID

InvoiceIDの為替レート設定

**Role actions**

* `ModifyOriginalCost`

**Request**

```http
POST /invoiceid/:vendor/:month HTTP1.1
Authorization: Bearer {token}
Content-Type: application/json

{request body}
```

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

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

**{request body}**

```ruby
{
  "data":[
      {
        "invoice_id":"123456789",
        "exchange_rate":101.051
      },
      {
        "invoice_id":"468215697",
        "exchange_rate":100.02
      }
  ]
}
```

**request body description**

| Field          | Type     | Required | Validation | Description |
| -------------- | -------- | -------- | ---------- | ----------- |
| invoice\_id    | *string* | Yes      | -          | InvoiceID   |
| exchange\_rate | *double* | Yes      | -          | 登録する為替レート   |

**Response**

```ruby
HTTP 200

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

## Get InvoiceID list

InvoiceIDの取得

**Role actions**

* `ReadOriginalCost`
* `ModifyOriginalCost`

**Request**

```http
GET /invoiceid/:vendor/:month HTTP1.1
Authorization: Bearer {token}

{request body}
```

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

**Response**

```ruby
HTTP 200

[
  {
    "invoice_id":"123456789",
    "exchange_rate":101.051
  },
  {
    "invoice_id":"468215697",
    "exchange_rate":100.02
  }
]
```

## Export InvoiceID CSV

InvoiceID CSVの出力

**Role actions**

* `ModifyOriginalCost`

**Request**

```http
POST /export/invoiceidcsv/:month HTTP1.1
Authorization: Bearer {token}
Content-Type: application/json

{request body}
```

リクエストパラーメータの`{month}`のフォーマット: `yyyy-mm` 例: 2020-01

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

**{request body}**

```ruby
{
  "vendor":"aws",
  "exchange":true,
  "digit":"up"
}
```

**request body description**

| Field    | Type      | Required | Validation                   | Description          |
| -------- | --------- | -------- | ---------------------------- | -------------------- |
| vendor   | *string*  | Yes      | サポート: `aws`                  | ベンダー                 |
| exchange | *boolean* | Yes      | -                            | USDで出力または為替後(JPY)を出力 |
| digit    | *double*  | Yes      | サポート: `up`,`down`,`rounding` | 小数点丸め設定              |

**Response**

```ruby
HTTP 200

{
  "status":"success",
  "url":"csv link"
}
```


---

# 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/original-cost.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.
