# TikTok Shop Detail API

## API Information

- **API Name**: Get TikTok Shop Store Detail
- **Request Method**: POST
- **API URL**: `/open-api/v1/data`
- **Interface URI path**: `/v3/api/open/tiktok-shop/shop/detail`
- **Description**: Get detailed information of TikTok shop store by shop ID
- **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/tiktok-shop/shop/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 | Shop unique identifier ID | "shop_001" | 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/tiktok-shop/shop/detail",
    "params": {
      "id": "shop_001"
    }
  }'
```

### Response

#### Response Body Structure

```json
{
  "code": 200,
  "message": "success",
  "data": {
    // Shop 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      | Shop detail information |
| **version**   | string      | API version             |
| **timestamp** | long/null   | Response timestamp      |
| **sign**      | string/null | Response signature      |
| **remaining_credits** | number        | Current remaining available credits after this request |
| **consumed_credits**  | number        | Credits consumed by this request                       |
| **success**   | boolean     | Request success status  |
| **fail**      | boolean     | Request failure status  |

##### Shop Detail Fields (data)

| Field Name          | Type    | Description                                                                |
| ------------------- | ------- | -------------------------------------------------------------------------- |
| ad_cost             | string  | Ad cost string                                                             |
| avg_price           | double  | Average price (local currency)                                             |
| avg_price_usd       | double  | Average price in USD                                                       |
| best_selling_goods  | array   | Best-selling goods list                                                    |
| categorize          | array   | Shop category tree structure                                               |
| categorize_str      | string  | Shop category string                                                       |
| commission_rate     | double  | Commission rate                                                            |
| currency            | string  | Currency type                                                              |
| delivery            | array   | Delivery method list, overseas-cross-border delivery, local-local delivery |
| delivery_str        | string  | Delivery method string                                                     |
| desc                | string  | Shop description                                                           |
| found_time          | long    | First discovery time (timestamp)                                           |
| found_time_str      | string  | First discovery time string                                                |
| gmv                 | double  | Sales volume (GMV)                                                         |
| gmv_usd             | double  | Sales volume in USD (GMV USD)                                              |
| goods_ad_count      | long    | Number of ad goods                                                         |
| goods_ad_rate       | double  | Ad goods rate                                                              |
| goods_count         | long    | Number of goods                                                            |
| id                  | string  | Shop unique identifier ID                                                  |
| insert_time         | long    | Data insertion time (timestamp)                                            |
| is_collection       | boolean | Whether it's collected                                                     |
| is_in_marketplace   | boolean | Whether it's a marketplace shop                                            |
| is_managed          | boolean | Whether it's a fully managed shop                                          |
| keywords            | string  | Shop keywords                                                              |
| landing_page        | string  | Shop landing page URL                                                      |
| last_found_time     | long    | Last discovery time (timestamp)                                            |
| last_found_time_str | string  | Last discovery time string                                                 |
| max_cpm             | double  | Maximum ad cost (CPM)                                                      |
| min_cpm             | double  | Minimum ad cost (CPM)                                                      |
| person_count        | long    | Number of influencers                                                      |
| play_count          | long    | Play count/ad impressions                                                  |
| product_type        | array   | Product type list, brand-brand, retail-retailer                            |
| product_type_str    | string  | Product type string                                                        |
| region              | array   | Shop target region list                                                    |
| region_str          | string  | Shop target region string                                                  |
| root_path           | string  | Shop root path (domain)                                                    |
| sales_trend         | integer | Sales trend, 1-growth, 0-stable, -1-decline                                |
| sales_trend_data    | array   | Sales trend data list                                                      |
| sales_trend_str     | string  | Sales trend string description                                             |
| sales_volume        | long    | Shop sales volume                                                          |
| score               | double  | Shop rating                                                                |
| share_count         | long    | Share count                                                                |
| shop_image          | string  | Shop image URL                                                             |
| shop_name           | string  | Shop name                                                                  |
| update_time         | long    | Data update time (timestamp)                                               |
| video_count         | long    | Number of ad videos                                                        |

##### Category Tree Structure Fields (categorize)

| Field Name | Type   | Description              |
| ---------- | ------ | ------------------------ |
| \_id       | string | Category ID              |
| name_zh    | string | Chinese category name    |
| name_vi    | string | Vietnamese category name |
| name_th    | string | Thai category name       |
| name_pt    | string | Portuguese category name |
| name_ja    | string | Japanese category name   |
| name_id    | string | Indonesian category name |
| name_en    | string | English category name    |
| child_node | object | Child category node      |

##### Best Selling Goods Object Fields (best_selling_goods)

| Field Name   | Type   | Description          |
| ------------ | ------ | -------------------- |
| product_id   | string | Product ID           |
| image        | string | Product image URL    |
| sales_volume | long   | Product sales volume |

##### Sales Trend Data Object Fields (sales_trend_data)

| Field Name   | Type | Description              |
| ------------ | ---- | ------------------------ |
| day          | long | Date timestamp           |
| sales_volume | long | Sales volume for the day |

#### Response Example

```json
{
  "code": 200,
  "message": "success",
  "data": {
    "id": "shop_001",
    "shop_name": "Fashion Accessories Store",
    "shop_image": "https://example.com/shop.jpg",
    "is_managed": false,
    "is_in_marketplace": true,
    "landing_page": "https://example.com/shop",
    "desc": "Premium store specializing in fashionable phone accessories, providing high-quality products and services",
    "region": ["US", "GB"],
    "region_str": "US, GB",
    "categorize": [
      {
        "_id": "cat_001",
        "name_zh": "手机配件",
        "name_en": "Phone Accessories",
        "child_node": null
      }
    ],
    "categorize_str": "Phone Accessories",
    "goods_count": 100,
    "goods_ad_count": 80,
    "goods_ad_rate": 0.8,
    "best_selling_goods": [
      {
        "product_id": "1730339920817197651",
        "image": "https://im.pipispy.com/products/images/5d1c88771fbae4a0.png",
        "sales_volume": 694
      },
      {
        "product_id": "1730348130623001171",
        "image": "https://im.pipispy.com/products/images/45c8040730ccac77.png",
        "sales_volume": 471
      }
    ],
    "sales_volume": 5000,
    "min_cpm": 2.0,
    "max_cpm": 8.0,
    "ad_cost": "USD 2.0-8.0",
    "avg_price": 35.0,
    "avg_price_usd": 35.0,
    "gmv": 150000.0,
    "gmv_usd": 150000.0,
    "sales_trend": 1,
    "sales_trend_str": "Growing",
    "sales_trend_data": [
      {
        "day": 1744300800,
        "sales_volume": 56
      },
      {
        "day": 1744387200,
        "sales_volume": 54
      }
    ],
    "score": 4.8,
    "video_count": 150,
    "play_count": 200000,
    "person_count": 120,
    "share_count": 5000,
    "found_time": 1640995200,
    "found_time_str": "01-01-2022",
    "last_found_time": 1643673600,
    "last_found_time_str": "01-02-2022",
    "insert_time": 1640995200,
    "update_time": 1643673600,
    "currency": "USD",
    "is_collection": false,
    "root_path": "example.com",
    "keywords": "fashion,accessories,phone,premium",
    "commission_rate": 0.15,
    "product_type": ["brand"],
    "product_type_str": "brand",
    "delivery": ["local", "overseas"],
    "delivery_str": "local, overseas"
  },
  "version": "v1",
  "timestamp": null,
  "sign": null,
  "remaining_credits": 9980,
  "consumed_credits": 1,
  "success": true,
  "fail": false
}
```

### Error Codes

| Error Code | Description                                                    |
| ---------- | -------------------------------------------------------------- |
| 200        | Success                                                        |
| 400        | Bad Request - Request parameter error, such as missing shop ID |
| 404        | Not Found - Shop not found                                     |
| 500        | Internal Server Error                                          |
