# Advertiser Detail API

## API Information

- **API Name**: Get Advertiser Detail
- **Request Method**: POST
- **API URL**: `/open-api/v1/data`
- **Interface URI path**: `/v3/api/open/advertiser/detail`
- **Description**: Get detailed information of advertiser by advertiser ID

**Request Headers:**

- Content-Type: application/json
- Accept: application/json

## Request Parameters

### Request Structure

| Parameter Name | Type   | Description                     | Example                          | Required | Default |
| -------------- | ------ | ------------------------------- | -------------------------------- | -------- | ------- |
| key            | string | User's external API request key | "your_api_key_here"              | Yes      |         |
| uri            | string | Interface URI path              | "/v3/api/open/advertiser/detail" | Yes      |         |
| params         | object | Interface parameter object      | See parameter list below         | Yes      |         |

### Parameter List (params object)

| Parameter Name | Type   | Required | Description                     |
| -------------- | ------ | -------- | ------------------------------- |
| id             | String | Yes      | Advertiser unique identifier ID |

### Request Example

```bash
curl -X POST "https://www.pipispy.com/open-api/v1/data" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "key": "your_api_key_here",
    "uri": "/v3/api/open/advertiser/detail",
    "params": {
      "id": "66f994b3a8f1cc723674b9ff"
    }
  }'
```

## Response Parameters

### Response Body Structure

```json
{
  "code": 200,
  "message": "success",
  "data": {},
  "version": "v1",
  "timestamp": null,
  "sign": null,
  "remaining_credits": 9980,
  "consumed_credits": 1,
  "success": true,
  "fail": false
}
```

### Response Field Description

| Field Name | Type        | Description                                 |
| ---------- | ----------- | ------------------------------------------- |
| code       | Integer     | Response status code, 200 indicates success |
| message    | String      | Response message                            |
| data       | Object      | Advertiser detail information               |
| version    | String      | API version                                 |
| timestamp  | Number/null | Response timestamp (null if not available)  |
| sign       | String/null | Response signature (null if not available)  |
| remaining_credits | Long    | Current remaining available credits after this request |
| consumed_credits  | Long    | Credits consumed by this request                       |
| success    | Boolean     | Whether the request was successful          |
| fail       | Boolean     | Whether the request failed                  |

### Advertiser Detail Fields

| Field Name        | Type    | Description                               |
| ----------------- | ------- | ----------------------------------------- |
| id                | String  | Advertiser unique identifier ID           |
| root_path         | String  | Root path (domain)                        |
| app_image         | String  | App image URL                             |
| ad_platform_list  | Array   | Ad platform list (tiktok, facebook, etc.) |
| shop_type         | Array   | Shop type list                            |
| data_count        | Number  | Total data count                          |
| monthly_visits    | Number  | Monthly visits                            |
| first_data_time   | Number  | First data time (timestamp)               |
| found_time        | Number  | Found time (timestamp)                    |
| latest_found_time | Number  | Latest found time (timestamp)             |
| region            | Array   | Region list                               |
| is_collection     | Boolean | Whether already collected                 |

## Response Example

```json
{
  "code": 200,
  "message": "success",
  "data": {
    "id": "655f4a07a1b892646643349e",
    "region": [
      "DE",
      "TW",
      "PT",
      "DK",
      "LT",
      "LU",
      "LV",
      "HR",
      "UA",
      "HU",
      "LY",
      "MA",
      "MF",
      "YT",
      "ID",
      "IE",
      "US",
      "EE",
      "MQ",
      "IN",
      "MT",
      "IT",
      "MX",
      "ES",
      "AT",
      "RE",
      "AU",
      "VN",
      "RO",
      "NL",
      "BD",
      "BE",
      "FI",
      "BG",
      "JP",
      "FR",
      "SA",
      "SE",
      "SG",
      "SI",
      "SK",
      "GB",
      "KH",
      "CA",
      "GF",
      "GP",
      "GR",
      "CN",
      "TH",
      "LA",
      "CY",
      "CZ",
      "PL"
    ],
    "root_path": "donotage.org",
    "app_image": "https://fb-cdn.pipispy.com/images/cb28fc3f16e9711e247b575ca4fb43b6.png",
    "ad_platform_list": ["tiktok", "facebook"],
    "shop_type": ["magento"],
    "data_count": 368,
    "monthly_visits": 243818,
    "first_data_time": 1675830644,
    "found_time": 1675830644,
    "latest_found_time": 1752202412,
    "is_collection": false
  },
  "version": "v1",
  "timestamp": null,
  "sign": null,
  "remaining_credits": 9980,
  "consumed_credits": 1,
  "success": true,
  "fail": false
}
```

## Error Code Description

| Error Code | Description                                            |
| ---------- | ------------------------------------------------------ |
| 200        | Success                                                |
| 400        | Request parameter error, such as missing advertiser ID |
| 404        | Advertiser not found                                   |
| 500        | Server internal error                                  |
