# PA03-02 - Account Detail Information (アカウント詳細情報取得)

## Overview

Returns detailed information for the requested account/service. Only one account can be specified per request.

- **Non-master account**: Returns service details + linked master account info
- **Master account**: Returns list of all linked accounts (without individual details)

---

## Request

### Method

`POST` (JSON format)

### Authentication

Obtained via separate authentication API, included in request parameters.

### POST Parameters

| No  | Parameter | Name            | Required | Description       |
| --- | --------- | --------------- | -------- | ----------------- |
| 1   | json      | JSON Parameters | ◎        | Main request body |

### JSON Parameters

| No  | Parameter              | Name               | Level | Type                   | Required | Description                                                                                     |
| --- | ---------------------- | ------------------ | ----- | ---------------------- | -------- | ----------------------------------------------------------------------------------------------- |
| 1   | authKey                | Authentication Key | 1     | Alphanumeric           | ◎        | Obtained from OEM authentication                                                                |
| 2   | displayPass            | Display Password   | 1     | Numeric                | △        | Whether to return password. Not processed for MVNO. `10`: Return, `20`: Do not return (default) |
| 3   | version                | Version            | 1     | Alphanumeric           | △        | Version number specified by freebit                                                             |
| 4   | requestDatas           | Request Data       | 1     | Array                  | ◎        | Target account info. List format but only 1 item recognized                                     |
| 5   | requestDatas[].kind    | Service Type       | 2     | Alphanumeric + symbols | ◎        | Target service. `"MASTER"` for master account                                                   |
| 6   | requestDatas[].account | Account            | 2     | Alphanumeric + symbols | ◎        | Target account. For MVNO, specify phone number                                                  |

**Legend:** ◎ Required | ○ Required within level | △ Conditional

---

## Request Examples

### Get Master Account Info

```json
{
  "authKey": "XXXXXXXXXX",
  "requestDatas": [
    {
      "kind": "MASTER",
      "account": "testMaster@test.ne.jp"
    }
  ]
}
```

### Get MVNO Account Info

```json
{
  "authKey": "XXXXXXXXXX",
  "version": "2",
  "requestDatas": [
    {
      "kind": "MVNO",
      "account": "08038433843"
    }
  ]
}
```

---

## Response

### Format

JSON

### Base Parameters

| No  | Parameter                | Name           | Level | Type                   | Description                                |
| --- | ------------------------ | -------------- | ----- | ---------------------- | ------------------------------------------ |
| 1   | resultCode               | Result Code    | 1     | Numeric                | Overall result code                        |
| 2   | status                   | Status         | 1     | Object                 | -                                          |
| 3   | status.message           | Message        | 2     | Alphanumeric + symbols | Result message                             |
| 4   | status.statusCode        | Status Code    | 2     | Numeric                | Result code                                |
| 5   | masterAccount            | Master Account | 1     | Alphanumeric + symbols | Master account linked to requested account |
| 6   | responseDatas            | Response Data  | 1     | Array/Object           | Processed service account information      |
| 7   | responseDatas.resultCode | Result Code    | 2     | Numeric                | Per-account result code                    |
| 8   | responseDatas.kind       | Service Type   | 2     | Alphanumeric + symbols | Service type                               |
| 9   | responseDatas.account    | Account        | 2     | Alphanumeric + symbols | Account identifier                         |
| 10  | responseDatas.state      | State          | 2     | Alphanumeric + symbols | Account state (see State Values)           |
| 11  | responseDatas.startDate  | Start Date     | 2     | Alphanumeric           | Activation date (YYYYMMDD)                 |
| 12  | responseDatas.async      | Async Request  | 2     | Object                 | Pending async request. Empty `{}` if none  |
| 13  | responseDatas.async.func | Function       | 3     | Alphabetic             | Async operation type (see Async Functions) |
| 14  | responseDatas.async.date | Date           | 3     | Alphabetic             | Scheduled execution date (YYYYMMDD)        |

### State Values

| Value     | Description                   |
| --------- | ----------------------------- |
| waiting   | Waiting for setup (MVNO only) |
| temporary | Temporary registration        |
| active    | In service                    |
| suspended | Suspended                     |
| obsolete  | Cancelled                     |

### Async Function Values

| Value     | Description     |
| --------- | --------------- |
| regist    | Registration    |
| stop      | Suspension      |
| resume    | Resumption      |
| cancel    | Cancellation    |
| revival   | Revival         |
| plnset    | Plan set        |
| plnunset  | Plan unset      |
| change    | Change          |
| chgctract | Contract change |

---

## MVNO-Specific Response Parameters

| Parameter    | Name          | Type                   | Description                         |
| ------------ | ------------- | ---------------------- | ----------------------------------- |
| planCode     | Plan Code     | Alphanumeric + symbols | Empty ("") if no plan set           |
| iccid        | SIM Card ID   | Numeric                | SIM card identifier                 |
| imsi         | SIM ID        | Numeric                | SIM identifier                      |
| contractLine | Contract Line | Alphanumeric           | Line type (e.g., "4G")              |
| size         | SIM Size      | Alphabetic             | `standard`, `nano`, `micro`         |
| sms          | SMS Status    | Numeric                | `10`: Active, `20`: Inactive        |
| talk         | Voice Status  | Numeric                | `10`: Active, `20`: Inactive        |
| ipv4         | IPv4 Address  | Alphanumeric + symbols | Empty ("") if not using global IPv4 |
| ipv6         | IPv6 Address  | Alphanumeric + symbols | Empty ("") if not using global IPv6 |
| quota        | Quota         | Numeric                | Data quota value                    |

### Voice Option Parameters (Level 3)

| Parameter            | Name                   | Type                   | Description                                             |
| -------------------- | ---------------------- | ---------------------- | ------------------------------------------------------- |
| state                | State                  | Alphanumeric + symbols | `waiting`, `temporary`, `active`, `obsolete`            |
| voiceMail            | Voicemail              | Numeric                | `10`: Enabled, `20`: Disabled                           |
| callWaiting          | Call Waiting           | Numeric                | `10`: Enabled, `20`: Disabled                           |
| callTransfer         | Call Transfer          | Numeric                | `10`: Enabled, `20`: Disabled                           |
| callTransferToWorld  | International Transfer | Numeric                | `10`: Enabled, `20`: Disabled                           |
| worldCall            | WORLD CALL             | Numeric                | `10`: Amount specified, `11`: Unlimited, `20`: Disabled |
| worldCallCreditLimit | WORLD CALL Limit       | Numeric                | Amount (when worldCall is `10`)                         |
| worldWing            | WORLD WING             | Numeric                | `10`: Amount specified, `11`: Unlimited, `20`: Disabled |
| worldWingCreditLimit | WORLD WING Limit       | Numeric                | Amount 50000-1000000 (when worldWing is `10`)           |
| async                | Async Request          | Object                 | Voice option async request                              |

---

## Response Codes

| Status | Status Code | Detail Code | Message     | Description                             |
| ------ | ----------- | ----------- | ----------- | --------------------------------------- |
| ○      | 200         | 100         | OK          | Success                                 |
| ×      | 400         | 200         | Bad Request | Parameter error - kind issue            |
| ×      | 400         | 201         | Bad Request | Parameter error - account issue         |
| ×      | 400         | 204         | Bad Request | Parameter error - other parameter issue |
| ×      | 400         | 226         | Bad Request | Parameter error - displayPass issue     |
| ×      | 400         | 227         | Bad Request | Parameter error - requestDatas issue    |
| ×      | 400         | 228         | Bad Request | Parameter error - authKey issue         |
| ×      | 400         | 236         | Bad Request | Parameter error - version issue         |
| ×      | 403         | 205         | Auth Error  | Authentication key problem              |
| ×      | 500         | 210         | NG          | Account not found                       |
| ×      | 500         | 211         | NG          | Account status does not allow request   |

---

## Response Examples

### Master Account Query

```json
{
  "resultCode": 100,
  "status": {
    "message": "OK",
    "statusCode": 200
  },
  "masterAccount": "testMaster@test.ne.jp",
  "responseDatas": [
    {
      "kind": "MASTER",
      "account": "testAccount@test.ne.jp",
      "state": "active",
      "startDate": 20120401,
      "relationCode": "testuser",
      "resultCode": 100
    },
    {
      "kind": "MVNO",
      "account": 8038433843,
      "state": "suspended",
      "resultCode": 100
    }
  ]
}
```

### MVNO Account Query (with async)

```json
{
  "resultCode": 100,
  "status": {
    "message": "OK",
    "statusCode": 200
  },
  "masterAccount": "testMaster@test.ne.jp",
  "responseDatas": {
    "kind": "MVNO",
    "account": 8038433843,
    "state": "active",
    "planCode": "LTE3G_P01",
    "startDate": 20130901,
    "iccid": 8981199993109195000,
    "imsi": 990103120337753,
    "contractLine": "4G",
    "size": "standard",
    "sms": 10,
    "talk": 10,
    "ipv4": "",
    "ipv6": "",
    "quota": 3161.31,
    "async": {
      "func": "regist",
      "date": 20131201
    },
    "resultCode": "100"
  }
}
```
