# Erafone API

> Returns Erafone.com product details including price, stock, brand and images, and homepage promotional banners.

Category: Commerce & Marketplaces. Region: ID. 3 endpoints at `https://api.hoshime.com/v1/erafone/<endpoint>`, `GET` with query parameters, answering `{data, meta}` (see https://hoshime.com/docs/responses.md). Reference: https://hoshime.com/docs/platforms/erafone
## GET /v1/erafone/product

One product of erafone.com: name, price, special price, stock, brand, images and description.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `url` | string | yes | Product page URL on erafone.com, such as https://erafone.com/produk/samsung-galaxy-z-fold7. (e.g. https://erafone.com/produk/samsung-galaxy-z-fold7) |
| `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: `brand` (string), `category` (string), `description` (string), `id` (string), `images` (Image[]), `images[].height` (any), `images[].url` (string), `images[].width` (any), `inStock` (boolean), `price` (Money), `price.amount` (string), `price.currency` (string), `quantity` (integer (int64)), `rating` (number (double)), `reviewCount` (integer (int64)), `seller` (string), `sku` (string), `specialPrice` (Money), `specialPrice.amount` (string), `specialPrice.currency` (string), `thumbnailUrl` (string), `title` (string), `type` (string), `updatedAt` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/erafone/product?url=https%3A%2F%2Ferafone.com%2Fproduk%2Fsamsung-galaxy-z-fold7" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/erafone/variants

The options of a configurable erafone.com product, such as its colours and capacities, from its product page. Empty for a product with one version.

Scope: `social:read` · Units: 1 · Cached: 5 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `url` | string | yes | Product page URL on erafone.com, such as https://erafone.com/produk/samsung-galaxy-z-fold7. (e.g. https://erafone.com/produk/samsung-galaxy-z-fold7) |
| `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: `name` (string), `options` (VariantOption[]), `options[].label` (string), `options[].value` (string)

```bash
curl "https://api.hoshime.com/v1/erafone/variants?url=https%3A%2F%2Ferafone.com%2Fproduk%2Fsamsung-galaxy-z-fold7" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/erafone/banners

The promotional banners of the erafone.com homepage, desktop or mobile set.

Scope: `social:read` · Units: 1 · Cached: 10 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `device` | string | no | Which banner set: desktop or mobile. Default desktop. (one of desktop, mobile; default desktop; e.g. desktop) |
| `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: `endsAt` (string), `height` (integer (int64)), `id` (string), `imageUrl` (string), `startsAt` (string), `title` (string), `url` (string), `width` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/erafone/banners?device=desktop" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
