Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Sau đây là một truy vấn mẫu đến MerchantPerformanceView, truy vấn này trả về hiệu suất của tài khoản trong 30 ngày qua, được phân đoạn theo program và offer_id. Bạn có thể thử ví dụ nhanh này để làm quen với dịch vụ Reports.
Nhấp vào Run (Chạy) để dùng thử mẫu trong API Explorer. Sau khi bạn nhấp vào Chạy, hãy cập nhật phần giữ chỗ mã người bán thành mã người bán của riêng bạn trong URL yêu cầu. Bạn có thể sửa đổi câu hỏi. Toàn bộ truy vấn phải nằm trên một dòng để hoạt động với trình khám phá API.
URL yêu cầu HTTP
Yêu cầu này bao gồm một yêu cầu HTTP POST đến máy chủ Content API for Shopping tại URL sau:
Sau đây là một ví dụ hoàn chỉnh cho thấy định nghĩa báo cáo ở trên được đặt trong một yêu cầu HTTP POST:
POST/v2.1/merchantId/reports/searchHTTP/1.1Host:shoppingcontent.googleapis.comUser-Agent:curlContent-Type:application/jsonAccept:application/jsonAuthorization:Bearer access tokenParameters:{"query":"SELECT segments.program, segments.offer_id, metrics.impressions, metrics.clicks, metrics.ctr FROM MerchantPerformanceView WHERE segments.date BETWEEN '2020-11-01' AND '2020-11-30'"}
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-08-13 UTC."],[],["The beta version of the Merchant API, the new Content API for Shopping, is introduced. To use the `Reports` service, users with the Reporting manager role can query the `MerchantPerformanceView` for account performance. A sample query using Merchant Center Query Language is provided to retrieve data on `program`, `offer_id`, `impressions`, `clicks`, and `ctr` between '2020-11-01' and '2020-11-30'. Users can run the sample via the API Explorer, updating the merchant ID and modifying the query.\n"],null,[]]