# Product Detail API

## API Information

- **API Name**: Get Product Detail
- **Request Method**: POST
- **API URL**: `/open-api/v1/data`
- **Interface URI path**: `/v3/api/open/ad-product/detail`
- **Description**: Query product detail data
- **Pricing**: Details API pricing rules: Base fee: 1 credit/request. Free access conditions (if either is met): Details for this ID have been retrieved within the past 3 days; This ID appeared in your leaderboard list query results within the past 3 days.

**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/ad-product/detail" | Yes      |         |
| params         | object | Interface parameter object      | See parameter list below         | Yes      |         |

#### Parameter List (params object)

| Parameter Name | Type   | Description | Example                    | Required | Default |
| -------------- | ------ | ----------- | -------------------------- | -------- | ------- |
| id             | string | Product ID  | "507f1f77bcf86cd799439011" | Yes      |         |

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

### Response

#### Response Body Structure

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

#### Response Field Description

##### Main Response Fields

| Field Name    | Type        | Description                        |
| ------------- | ----------- | ---------------------------------- |
| **data**      | object      | Product detail information         |
| **version**   | string      | API version number                 |
| **timestamp** | number/null | Response timestamp                 |
| **sign**      | string/null | Signature information              |
| **remaining_credits** | number        | Current remaining available credits after this request |
| **consumed_credits**  | number        | Credits consumed by this request                       |
| **success**   | boolean     | Whether the request was successful |
| **fail**      | boolean     | Whether the request failed         |

##### Product Detail Fields (data)

| Field Name                 | Type    | Description                               |
| -------------------------- | ------- |-------------------------------------------|
| id                         | string  | Product unique identifier ID              |
| image                      | string  | Product main image URL                    |
| image_list                 | array   | Product image list URLs                   |
| title                      | string  | Product title                             |
| desc                       | string  | Product description                       |
| landing_page               | string  | Product landing page URL                  |
| root_path                  | string  | Product root path (domain)                |
| root_path_id               | string  | Product root path ID                      |
| tt_data_count              | number  | TikTok platform video count               |
| video_list                 | array   | Product related video ID list             |
| category                   | object  | Product category information              |
| currency                   | string  | Product price currency type               |
| price                      | number  | Product price                             |
| create_time                | number  | Product creation timestamp                |
| region                     | array   | Product target region list                |
| tt_play_count              | number  | TikTok platform play count                |
| tt_digg_count              | number  | TikTok platform digg count                |
| tt_digg_play_rate          | number  | TikTok platform digg/play ratio           |
| tt_share_count             | number  | TikTok platform share count               |
| tt_comment_count           | number  | TikTok platform comment count             |
| tt_found_time              | number  | TikTok platform first found timestamp     |
| tt_latest_found_time       | number  | TikTok platform latest found timestamp    |
| tt_put_days                | number  | TikTok platform put days                  |
| platform                   | string  | Product platform identifier               |
| is_collection              | boolean | Whether already collected                 |
| usd_price                  | number  | Product USD price                         |
| ad_platform_list           | array   | Ad platform list (e.g., tiktok, facebook) |
| facebook_data_count        | number  | Facebook platform data count              |
| facebook_digg_count        | number  | Facebook platform digg count              |
| facebook_found_time        | number  | Facebook platform first found timestamp   |
| facebook_latest_found_time | number  | Facebook platform latest found timestamp  |
| facebook_put_days          | number  | Facebook platform put days                |
| all_data_count             | number  | All platform data count                   |
| all_digg_count             | number  | All platform digg count                   |
| all_found_time             | number  | All platform first found timestamp        |
| all_latest_found_time      | number  | All platform latest found timestamp       |
| all_put_days               | number  | All platform put days                     |
| app_names                  | array   | App name list                             |
| app_image                  | string  | App icon URL                              |
| shopify_data                  | array  | Export for shopify data                   |

##### Product Category Information Object Fields (category)

| Field Name | Type   | Description           |
| ---------- | ------ | --------------------- |
| id         | string | Category ID           |
| name_en    | string | Category English name |
| name_zh    | string | Category Chinese name |

#### Response Example

```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
}
```

### Error Codes

| Error Code | Description                      |
| ---------- | -------------------------------- |
| 400        | Bad Request - Invalid parameters |
| 401        | Unauthorized - Invalid API key   |
| 500        | Internal Server Error            |
