# 产品详情接口

## API 信息

- **API 名称**: 获取产品详情
- **请求方法**: POST
- **API 地址**: `/open-api/v1/data`
- **接口路径**: `/v3/api/open/ad-product/detail`
- **接口描述**: 查询产品详细信息
- **价格说明**: 详情接口计费规则： 基础费用：1 credit/次。 免费访问条件（满足其一即可）： 该ID在3天内已获取过详情；该ID在3天内出现在您的榜单列表查询结果中。

**请求头设置：**

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

### 请求参数

#### 请求结构

| 参数名称 | 类型   | 描述                        | 示例                             | 必填 | 默认值 |
| -------- | ------ | --------------------------- | -------------------------------- | ---- | ------ |
| key      | string | 用户申请的外部 API 请求 key | "your_api_key_here"              | 是   |        |
| uri      | string | 接口 URI 路径               | "/v3/api/open/ad-product/detail" | 是   |        |
| params   | object | 接口参数对象                | 见下方参数列表                   | 是   |        |

#### 参数列表 (params 对象)

| 参数名称 | 类型   | 描述            | 示例                       | 必填 | 默认值 |
| -------- | ------ | --------------- | -------------------------- | ---- | ------ |
| id       | string | 产品唯一标识 ID | "507f1f77bcf86cd799439011" | 是   |        |

#### 请求案例

```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/ad-product/detail",
    "params": {
      "id": "507f1f77bcf86cd799439011"
    }
  }'
```

### 响应

#### 响应体结构

```json
{
  "code": 200,
  "message": "success",
  "data": {
    // 产品详情信息
  },
  "version": "v1",
  "timestamp": null,
  "sign": null,
  "remaining_credits": 9980,
  "consumed_credits": 1,
  "success": true,
  "fail": false
}
```

#### 响应字段说明

##### 主要响应字段

| 字段名称      | 类型        | 描述         |
| ------------- | ----------- | ------------ |
| **data**      | object      | 产品详情信息 |
| **version**   | string      | API 版本号   |
| **timestamp** | number/null | 响应时间戳   |
| **sign**      | string/null | 签名信息     |
| **remaining_credits** | Long          | 当前请求后的剩余可用积分 |
| **consumed_credits**  | Long          | 本次请求消耗的积分 |
| **success**   | boolean     | 请求是否成功 |
| **fail**      | boolean     | 请求是否失败 |

##### 产品详情字段 (data)

| 字段名称                   | 类型    | 描述                         |
| -------------------------- | ------- |----------------------------|
| id                         | string  | 产品唯一标识 ID                  |
| image                      | string  | 产品主图片 URL                  |
| image_list                 | array   | 产品图片列表 URL                 |
| title                      | string  | 产品标题                       |
| desc                       | string  | 产品描述                       |
| landing_page               | string  | 产品落地页 URL                  |
| root_path                  | string  | 广告主（域名）                    |
| root_path_id               | string  | 广告主ID                      |
| tt_data_count              | number  | TikTok 平台视频数量              |
| video_list                 | array   | 产品相关视频 ID 列表               |
| category                   | object  | 产品分类信息                     |
| currency                   | string  | 产品价格货币类型                   |
| price                      | number  | 产品价格                       |
| create_time                | number  | 产品创建时间戳                    |
| region                     | array   | 产品投放地区列表                   |
| tt_play_count              | number  | TikTok 平台播放量               |
| tt_digg_count              | number  | TikTok 平台点赞数               |
| tt_digg_play_rate          | number  | TikTok 平台点赞播放比             |
| tt_share_count             | number  | TikTok 平台分享数               |
| tt_comment_count           | number  | TikTok 平台评论数               |
| tt_found_time              | number  | TikTok 平台首次发现时间戳           |
| tt_latest_found_time       | number  | TikTok 平台最新发现时间戳           |
| tt_put_days                | number  | TikTok 平台投放天数              |
| platform                   | string  | 产品平台标识                     |
| is_collection              | boolean | 是否已收藏                      |
| usd_price                  | number  | 产品美元价格                     |
| ad_platform_list           | array   | 广告平台列表（如：tiktok, facebook） |
| facebook_data_count        | number  | Facebook 平台数据数量            |
| facebook_digg_count        | number  | Facebook 平台点赞数             |
| facebook_found_time        | number  | Facebook 平台首次发现时间戳         |
| facebook_latest_found_time | number  | Facebook 平台最新发现时间戳         |
| facebook_put_days          | number  | Facebook 平台投放天数            |
| all_data_count             | number  | 全平台数据数量                    |
| all_digg_count             | number  | 全平台点赞数                     |
| all_found_time             | number  | 全平台首次发现时间戳                 |
| all_latest_found_time      | number  | 全平台最新发现时间戳                 |
| all_put_days               | number  | 全平台投放天数                    |
| app_names                  | array   | 应用名称列表                     |
| app_image                  | string  | 应用图标 URL                   |
| shopify_data                  | array  | 导出shopify格式数据              |

##### 产品分类信息对象字段 (category)

| 字段名称 | 类型   | 描述         |
| -------- | ------ | ------------ |
| id       | string | 分类 ID      |
| name_en  | string | 分类英文名称 |
| name_zh  | string | 分类中文名称 |

#### 响应案例

```json
{
  "code": 200,
  "message": "success",
  "data": {
    "id": "686eb791ce41be1463bf6020",
    "image": "https://cdn-product.pipispy.com/pimg_f3f1ce1ad8e01bb942e0.png",
    "title": "NIACINAMIDE SERUM",
    "desc": "Heb je last van acne, puistjes of een vette huid? Onze krachtige formule helpt je huid weer in balans te brengen, ontstekingen, roodheid en irritatie te verminderen, bacteriën te doden en poriën te ontstoppen. Niacinamide serum staat bekend om zijn antivirale eigenschappen die de huid kunnen helpen beschermen tegen infecties. Het serum zit boordevol belangrijke ingrediënten die samenwerken om acne te verminderen en toekomstige puistjes te voorkomen.NIACINAMIDEVan Niacinamide is het wetenschappelijk bewezen dat het ontstekingen tegengaat. Dat betekent dat je minder last zal hebben van acne (puistjes). Een hoge concentratie van 10% van deze vitamine wordt in de formule ondersteund door het zinkzout van pyrrolidoncarbonzuur om de zichtbare aspecten van talgactiviteit in evenwicht te brengen.RETINOLRetinol is een katalysator voor de aanmaak van nieuwe cellen. Hierdoor merk je al snel dat de hoeveelheid lijntjes, plooien en rimpels in je gezicht verminderen. Ook gaat Retinol actief kleine oneffenheden tegen zoals pigment- en ouderdomsvlekken.VITAMINE CStaat bekend om zijn krachtige anti-oxiderende werking. Daarnaast verhoogt het de productie van Collageen, wat beschadigde huid repareert en je gezicht weer voller en elastischer maakt.HYALURONZUURJe huid heeft vocht nodig om er gezond en fris uit te zien. Een goed gehydrateerde huid heeft minder rimpeltjes en fijne lijntjes, maar ook wallen en kringen onder je ogen kunnen er zichtbaar minder door worden. De moleculen van Hyaluronzuur houden vocht ontzettend goed vast. Dit verzacht je huid van binnen, en maakt je gezicht in no-time merkbaar steviger.VITAMINE EIs een anti-oxidant, welke de negatieve invloed van vrije radicalen tegengaat. Het geeft een boost aan het immuunsysteem, repareert huidschade die veroorzaakt wordt door UV-straling, en heeft ook nog een anti-ontstekende werking.",
    "category": {
      "id": "62739ba438365b2f72048ec9",
      "name_en": "Beauty&Health",
      "name_zh": "美容与健康"
    },
    "currency": "EUR",
    "price": 15.95,
    "region": [],
    "platform": "shopify",
    "image_list": [
      "https://cdn-product.pipispy.com/pimg_f3f1ce1ad8e01bb942e0.png",
      "https://cdn-product.pipispy.com/pimg_793ee21c316a2278f533.png",
      "https://cdn-product.pipispy.com/pimg_c3f7bae1270348da3c70.png",
      "https://cdn-product.pipispy.com/pimg_404ae6efb292f56dc52b.png",
      "https://cdn-product.pipispy.com/pimg_c95d7a771e44f957aab0.png"
    ],
    "landing_page": "https://skintoneskin.com/products/niacinamide-serum?utm_content=Facebook_UA&utm_source=facebook&variant=47386041647448&utm_medium=paid&utm_id=120223082604420224&utm_term=120226427318530224&utm_campaign=120223082604420224",
    "root_path": "skintoneskin.com",
    "root_path_id": "665dab26392bf2e615d1b34a",
    "tt_data_count": 0,
    "video_list": [],
    "create_time": 1698334660,
    "tt_play_count": 0,
    "tt_digg_count": 0,
    "tt_digg_play_rate": 0.0,
    "tt_share_count": 0,
    "tt_comment_count": 0,
    "is_collection": false,
    "usd_price": 18.7,
    "ad_platform_list": ["facebook"],
    "facebook_data_count": 1,
    "facebook_digg_count": 7,
    "facebook_found_time": 1752086417,
    "facebook_latest_found_time": 1752201956,
    "facebook_put_days": 2,
    "all_data_count": 1,
    "all_digg_count": 7,
    "all_found_time": 1752086417,
    "all_latest_found_time": 1752201956,
    "all_put_days": 2,
    "app_names": ["SKINTONE SKIN"],
    "app_image": "https://fb-cdn.pipispy.com/images/168bf4be00376b24595549f1b0f0afaa.png"
  },
  "version": "v1",
  "timestamp": null,
  "sign": null,
  "remaining_credits": 9980,
  "consumed_credits": 1,
  "success": true,
  "fail": false
}
```

### 错误码

| 错误码 | 描述                   |
| ------ | ---------------------- |
| 400    | 请求错误 - 无效参数    |
| 401    | 未授权 - 无效 API 密钥 |
| 500    | 服务器内部错误         |
