---
title: "AI72 Batch Obtain Offline History Record"
method: POST
path: "/ai/sso/agent/batch-history"
tags: ["Others"]
---

# AI72 Batch Obtain Offline History Record

`POST /ai/sso/agent/batch-history`

## Request

- Base URL: `https://connect.patsnap.com`
- URL: `https://connect.patsnap.com/ai/sso/agent/batch-history`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/patsnap/apis/patsnap-open-platform-api/docs/ai/sso/agent/batch-history/post.ts> (a function with typed inputs; its response is checked against the schema)

This interface serves as an optimized function for the AI API, supporting users in batch querying history records for multiple accounts under the same company.

## Request body

- AI72AgentBatchHistoryRequest
  - `company_id` string, required: Company ID
  - `end_time` integer: End timestamp (milliseconds)
  - `page` integer: Page number, starting from 1
  - `start_time` integer: Start timestamp (milliseconds)
  - `user_accounts` AI72AgentBatchHistoryUserAccount[], required: User account list, up to 20, each account contains email and phone
    - `email` string: User email
    - `phone` string: Phone number

## Response `200`

Successful ai72 batch obtain offline history record response.

- AI72AgentBatchHistoryResponse
  - `data` AI72AgentBatchHistoryBatchAgentHistoryResponse
    - `user_histories` AI72AgentBatchHistoryUserHistory[]: User history records list
      - `email` string: User email
      - `phone` string: Phone number
      - `history` AI72AgentBatchHistoryHistoryRecordsResponseDTO
        - `page` integer: Current page number
        - `limit` integer: Records per page
        - `total` integer: Total number of records
        - `history_maps` AI72AgentBatchHistoryDailyRecordsDTO[]: History records grouped by date
          - `data` AI72AgentBatchHistoryHistoryRecordsDTO[]: List of history records for this date
            - `q` string: Query keywords or query string
            - `id` string: History record ID
            - `efq` string: Extended field query
            - `link` string: Link URL for the history record
            - `time` string: Created time (hour:minute only) in format: HH:mm
            - `count` object: Search result count statistics (patent count, etc.)
            - `source` string: History record source
            - `message` string: Message or description of the history record
            - `icon_url` string: Full URL of the icon
            - `raw_type` string: History record type
            - `icon_path` string: Icon path
            - `patent_id` string: Patent ID
            - `created_at` string: Created time in format: yyyy-MM-dd HH:mm or dd MMM yyyy HH:mm
            - `extra_info` object: Extra information
            - `business_id` string: Business ID (e.g., seekId, mindId, researchId)
            - `business_name` string: Business name
          - `date` string: Date in format: yyyy-MM-dd
  - `status` boolean, required: Status
  - `error_msg` string: Error Message
  - `error_code` integer, required: Error Code

## Other responses

- `201`: Created.
- `401`: Unauthorized.
- `403`: Forbidden.
- `404`: Not Found.

---

[API](https://skmtc.dev/patsnap/apis/patsnap-open-platform-api.md) - [All operations](https://skmtc.dev/patsnap/apis/patsnap-open-platform-api/llms.txt) - [OpenAPI document](https://skmtc.dev/patsnap/apis/patsnap-open-platform-api/revisions/c2264a0de595?raw)
