# Bea Cukai API

> Returns Indonesian customs exchange rates (kurs pabean) for a day or the latest set, with the setting decree.

Category: Government & Open Data. Region: ID. 1 endpoint at `https://api.hoshime.com/v1/bea/<endpoint>`, `GET` with query parameters, answering `{data, meta}` (see https://hoshime.com/docs/responses.md). Reference: https://hoshime.com/docs/platforms/bea
## GET /v1/bea/kurs

Customs exchange rates (kurs pabean) in force on a day, or the latest set: the rupiah value of each foreign currency, with the decree that sets them.

Scope: `social:read` · Units: 1 · Cached: 60 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `date` | string | no | A day, YYYY-MM-DD, inside the period a set applies to. Omit for the latest set. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `decree` (string), `decreeDate` (string), `items` (Rate[]), `items[].change` (number (double)), `items[].code` (string), `items[].country` (string), `items[].currency` (string), `items[].ratio` (number (double)), `items[].status` (string), `items[].usdConversion` (number (double)), `items[].value` (number (double)), `validDates` (ValidDate[]), `validDates[].date` (string)

```bash
curl "https://api.hoshime.com/v1/bea/kurs" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
