# Monitor Task Latest Ad Products

## API Information

- **API Name**: Monitor Task Latest Ad Products
- **Request Method**: POST
- **API URL**: `open-api/v1/monitor/data`
- **Endpoint Path**: `/v3/api/ad-monitor-task/latest-products`
- **Description**:
    - Get latest ad products data in monitor task
    - Support limiting the number of returned products
    - Provide latest product monitoring information
    - Usage Note: `Free`

**Request Headers:**

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

## Request Parameters

### Request Structure

| Parameter | Type   | Description                       | Example                                | Required | Default |
| --------- | ------ | --------------------------------- | -------------------------------------- | -------- | ------- |
| key       | string | User's external API request key   | "your_api_key_here"                   | Yes      |         |
| uri       | string | Endpoint path                     | "/v3/api/ad-monitor-task/latest-products" | Yes      |         |
| params    | object | Request parameters object         | See parameter list                     | Yes      |         |

### Request Body Parameters (params object)

| Parameter | Type     | Required | Description                         |
|-----------|----------|----------|-------------------------------------|
| task_id   | String   | true     | Task ID                              |
| limit     | integer  | false    | Query limit (default 6)               |

### Request Example

```bash
curl -X POST "https://www.pipispy.com/open-api/v1/monitor/data" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "key": "your_api_key_here",
    "uri": "/v3/api/ad-monitor-task/latest-products",
    "params": {
      "task_id": "68f98898850c5345a4c87e66"
    }
  }'
```

## Response Parameters

### Response Structure

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

### Response Field Description

| Field Name | Type    | Description                     |
| ---------- | ------- | ------------------------------- |
| code       | Integer | Response status code, 200 means success |
| message    | String  | Response message                |
| data       | Object  | Response data                   |
| version    | String  | API version                     |
| timestamp  | String  | Response timestamp              |
| sign       | String  | Response signature              |
| remaining_credits | Long    | Current remaining available credits after this request |
| consumed_credits  | Long    | Credits consumed by this request                       |
| success    | Boolean | Request success status          |
| fail       | Boolean | Request failure status          |

### Response Data Information Fields

| Field Name               | Type              | Description                               |
|--------------------------|-------------------|-------------------------------------------|
| data                     | array [object]    | Data                                      |
| data[].product_id        | string            | Product ID                                |
| data[].product_url       | string            | Product URL                               |
| data[].product_name      | string            | Product name                              |
| data[].product_image_url | string            | Product image URL                         |
| data[].ad_start_date     | integer           | Ad start date, timestamp, unit: seconds   |

## Response Example

```json
{
  "code": 200,
  "message": "success",
  "data": {
    "data": [
      {
        "product_url": "https://atoleajewelry.com/collections/waterproof-jewelry/products/initial-birthstone-charm-necklace",
        "product_id": "016ffe77783899d006894f28ab736904",
        "product_image_url": "https://fb-cdn.pipiads.com/images/pimg_e20d63ffa1cc4f3512f02.png",
        "ad_start_date": 1753340400,
        "product_name": "Initial & Birthstone Charm Necklace"
      },
      {
        "product_url": "https://atoleajewelry.com/products/wave-bracelet?utm_content=Facebook_UA&utm_source=facebook&variant=35676557574312",
        "product_id": "cd588be1dcdf69d195e0c40ee5aaa912",
        "product_image_url": "https://fb-cdn.pipiads.com/images/pimg_a163906dd1d756d701123.png",
        "ad_start_date": 1747897200,
        "product_name": "Wave Bracelet"
      },
      {
        "product_url": "https://atoleajewelry.com/products/wave-ring?utm_content=Facebook_UA&utm_source=facebook&variant=35675080949928",
        "product_id": "6e22078c8e5c62c2b289a659c416691a",
        "product_image_url": "https://fb-cdn.pipiads.com/images/pimg_4d798a9d7a717596bdf2b.png",
        "ad_start_date": 1747897200,
        "product_name": "Wave Ring"
      },
      {
        "product_url": "https://atoleajewelry.com/products/whale-tail-necklace?utm_content=Facebook_UA&utm_source=facebook&variant=35678917034152",
        "product_id": "994f3ac901bd98555ce6efc13aaebff4",
        "product_image_url": "https://fb-cdn.pipiads.com/images/pimg_fda32dd4d136fefc687e0.png",
        "ad_start_date": 1747897200,
        "product_name": "Whale Tail Necklace"
      },
      {
        "product_url": "https://atoleajewelry.com/products/summer-night-earrings?utm_content=Facebook_UA&utm_source=facebook&variant=35675114176680",
        "product_id": "2bdae269a2ec12bb6c6141772f3be055",
        "product_image_url": "https://fb-cdn.pipiads.com/images/pimg_845004d97b0143d774ed4.png",
        "ad_start_date": 1747897200,
        "product_name": "\"Summer Night\" Earrings"
      }
    ]
  },
  "version": "v1",
  "timestamp": null,
  "sign": null,
  "remaining_credits": 9980,
  "consumed_credits": 0,
  "fail": false,
  "success": true
}
```

## Error Codes

| Error Code | Description           |
| ---------- | --------------------- |
| 200        | Success               |
| 400        | Invalid request parameters |
| 500        | Internal server error |
