blob: 81c4f67b78eadad145063fe56a32821e7f6a67d6 [file] [log] [blame]
<html><body>
<style>
body, h1, h2, h3, div, span, p, pre, a {
margin: 0;
padding: 0;
border: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
body {
font-size: 13px;
padding: 1em;
}
h1 {
font-size: 26px;
margin-bottom: 1em;
}
h2 {
font-size: 24px;
margin-bottom: 1em;
}
h3 {
font-size: 20px;
margin-bottom: 1em;
margin-top: 1em;
}
pre, code {
line-height: 1.5;
font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}
pre {
margin-top: 0.5em;
}
h1, h2, h3, p {
font-family: Arial, sans serif;
}
h1, h2, h3 {
border-bottom: solid #CCC 1px;
}
.toc_element {
margin-top: 0.5em;
}
.firstline {
margin-left: 2 em;
}
.method {
margin-top: 1em;
border: solid 1px #CCC;
padding: 1em;
background: #EEE;
}
.details {
font-weight: bold;
font-size: 14px;
}
</style>
<h1><a href="content_v2_1.html">Content API for Shopping</a> . <a href="content_v2_1.reports.html">reports</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<p class="toc_element">
<code><a href="#search">search(merchantId, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Retrieves merchant performance mertrics matching the search query and optionally segmented by selected dimensions.</p>
<p class="toc_element">
<code><a href="#search_next">search_next(previous_request, previous_response)</a></code></p>
<p class="firstline">Retrieves the next page of results.</p>
<h3>Method Details</h3>
<div class="method">
<code class="details" id="close">close()</code>
<pre>Close httplib2 connections.</pre>
</div>
<div class="method">
<code class="details" id="search">search(merchantId, body=None, x__xgafv=None)</code>
<pre>Retrieves merchant performance mertrics matching the search query and optionally segmented by selected dimensions.
Args:
merchantId: string, Required. Id of the merchant making the call. Must be a standalone account or an MCA subaccount. (required)
body: object, The request body.
The object takes the form of:
{ # Request message for the ReportService.Search method.
&quot;pageSize&quot;: 42, # Number of ReportRows to retrieve in a single page. Defaults to the maximum of 1000. Values above 1000 are coerced to 1000.
&quot;pageToken&quot;: &quot;A String&quot;, # Token of the page to retrieve. If not specified, the first page of results is returned. In order to request the next page of results, the value obtained from `next_page_token` in the previous response should be used.
&quot;query&quot;: &quot;A String&quot;, # Required. Query that defines performance metrics to retrieve and dimensions according to which the metrics are to be segmented. For details on how to construct your query, see the [Query Language guide](https://developers.google.com/shopping-content/guides/reports/query-language/overview).
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Response message for the ReportService.Search method.
&quot;nextPageToken&quot;: &quot;A String&quot;, # Token which can be sent as `page_token` to retrieve the next page. If omitted, there are no subsequent pages.
&quot;results&quot;: [ # Rows that matched the search query.
{ # Result row returned from the search query.
&quot;metrics&quot;: { # Performance metrics. Values are only set for metrics requested explicitly in the request&#x27;s search query. # Metrics requested by the merchant in the query. Metric values are only set for metrics requested explicitly in the query.
&quot;aos&quot;: 3.14, # Average order size - the average number of items in an order. **This metric cannot be segmented by product dimensions.**
&quot;aovMicros&quot;: 3.14, # Average order value - the average value (total price of items) of all placed orders. The currency of the returned value is stored in the currency_code segment. If this metric is selected, &#x27;segments.currency_code&#x27; is automatically added to the SELECT clause in the search query (unless it is explicitly selected by the user) and the currency_code segment is populated in the response. **This metric cannot be segmented by product dimensions.**
&quot;clicks&quot;: &quot;A String&quot;, # Number of clicks.
&quot;ctr&quot;: 3.14, # Click-through rate - the number of clicks merchant&#x27;s products receive (clicks) divided by the number of times the products are shown (impressions).
&quot;daysToShip&quot;: 3.14, # Average number of days between an order being placed and the order being fully shipped, reported on the last shipment date. **This metric cannot be segmented by product dimensions.**
&quot;impressions&quot;: &quot;A String&quot;, # Number of times merchant&#x27;s products are shown.
&quot;itemDaysToShip&quot;: 3.14, # Average number of days between an item being ordered and the item being
&quot;itemFillRate&quot;: 3.14, # Percentage of shipped items in relation to all finalized items (shipped or rejected by the merchant; unshipped items are not taken into account), reported on the order date. Item fill rate is lowered by merchant rejections.
&quot;orderedItemSalesMicros&quot;: &quot;A String&quot;, # Total price of ordered items. Excludes shipping, taxes (US only), and customer cancellations that happened within 30 minutes of placing the order. The currency of the returned value is stored in the currency_code segment. If this metric is selected, &#x27;segments.currency_code&#x27; is automatically added to the SELECT clause in the search query (unless it is explicitly selected by the user) and the currency_code segment is populated in the response.
&quot;orderedItems&quot;: &quot;A String&quot;, # Number of ordered items. Excludes customer cancellations that happened within 30 minutes of placing the order.
&quot;orders&quot;: &quot;A String&quot;, # Number of placed orders. Excludes customer cancellations that happened within 30 minutes of placing the order. **This metric cannot be segmented by product dimensions.**
&quot;rejectedItems&quot;: &quot;A String&quot;, # Number of ordered items canceled by the merchant, reported on the order date.
&quot;returnRate&quot;: 3.14, # Total price of returned items divided by the total price of shipped items, reported on the order date. If this metric is selected, &#x27;segments.currency_code&#x27; is automatically added to the SELECT clause in the search query (unless it is explicitly selected by the user) and the currency_code segment is populated in the response.
&quot;returnedItems&quot;: &quot;A String&quot;, # Number of ordered items sent back for return, reported on the date when the merchant accepted the return.
&quot;returnsMicros&quot;: &quot;A String&quot;, # Total price of ordered items sent back for return, reported on the date when the merchant accepted the return. The currency of the returned value is stored in the currency_code segment. If this metric is selected, &#x27;segments.currency_code&#x27; is automatically added to the SELECT clause in the search query (unless it is explicitly selected by the user) and the currency_code segment is populated in the response.
&quot;shippedItemSalesMicros&quot;: &quot;A String&quot;, # Total price of shipped items, reported on the order date. Excludes shipping and taxes (US only). The currency of the returned value is stored in the currency_code segment. If this metric is selected, &#x27;segments.currency_code&#x27; is automatically added to the SELECT clause in the search query (unless it is explicitly selected by the user) and the currency_code segment is populated in the response.
&quot;shippedItems&quot;: &quot;A String&quot;, # Number of shipped items, reported on the shipment date.
&quot;shippedOrders&quot;: &quot;A String&quot;, # Number of fully shipped orders, reported on the last shipment date. **This metric cannot be segmented by product dimensions.**
&quot;unshippedItems&quot;: 3.14, # Number of ordered items not shipped up until the end of the queried day. If a multi-day period is specified in the search query, the returned value is the average number of unshipped items over the days in the queried period.
&quot;unshippedOrders&quot;: 3.14, # Number of orders not shipped or partially shipped up until the end of the queried day. If a multi-day period is specified in the search query, the returned value is the average number of unshipped orders over the days in the queried period. **This metric cannot be segmented by product dimensions.**
},
&quot;segments&quot;: { # Dimensions according to which metrics are segmented in the response. Values of product dimensions, e.g., offer id, reflect the state of a product at the time of the corresponding event, e.g., impression or order. Segment fields cannot be selected in queries without also selecting at least one metric field. Values are only set for dimensions requested explicitly in the request&#x27;s search query. # Segmentation dimensions requested by the merchant in the query. Dimension values are only set for dimensions requested explicitly in the query.
&quot;brand&quot;: &quot;A String&quot;, # Brand of the product.
&quot;categoryL1&quot;: &quot;A String&quot;, # [Product category (1st level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) in Google&#x27;s product taxonomy.
&quot;categoryL2&quot;: &quot;A String&quot;, # [Product category (2nd level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) in Google&#x27;s product taxonomy.
&quot;categoryL3&quot;: &quot;A String&quot;, # [Product category (3rd level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) in Google&#x27;s product taxonomy.
&quot;categoryL4&quot;: &quot;A String&quot;, # [Product category (4th level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) in Google&#x27;s product taxonomy.
&quot;categoryL5&quot;: &quot;A String&quot;, # [Product category (5th level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) in Google&#x27;s product taxonomy.
&quot;currencyCode&quot;: &quot;A String&quot;, # Currency in which price metrics are represented, e.g., if you select `ordered_item_sales_micros`, the returned value will be represented by this currency.
&quot;customLabel0&quot;: &quot;A String&quot;, # Custom label 0 for custom grouping of products.
&quot;customLabel1&quot;: &quot;A String&quot;, # Custom label 1 for custom grouping of products.
&quot;customLabel2&quot;: &quot;A String&quot;, # Custom label 2 for custom grouping of products.
&quot;customLabel3&quot;: &quot;A String&quot;, # Custom label 3 for custom grouping of products.
&quot;customLabel4&quot;: &quot;A String&quot;, # Custom label 4 for custom grouping of products.
&quot;date&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values * A month and day value, with a zero year, such as an anniversary * A year on its own, with zero month and day values * A year and month value, with a zero day, such as a credit card expiration date Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`. # Date in the merchant timezone to which metrics apply.
&quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
&quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
&quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
},
&quot;offerId&quot;: &quot;A String&quot;, # Merchant-provided id of the product.
&quot;productTypeL1&quot;: &quot;A String&quot;, # [Product type (1st level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) in merchant&#x27;s own product taxonomy.
&quot;productTypeL2&quot;: &quot;A String&quot;, # [Product type (2nd level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) in merchant&#x27;s own product taxonomy.
&quot;productTypeL3&quot;: &quot;A String&quot;, # [Product type (3rd level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) in merchant&#x27;s own product taxonomy.
&quot;productTypeL4&quot;: &quot;A String&quot;, # [Product type (4th level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) in merchant&#x27;s own product taxonomy.
&quot;productTypeL5&quot;: &quot;A String&quot;, # [Product type (5th level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) in merchant&#x27;s own product taxonomy.
&quot;program&quot;: &quot;A String&quot;, # Program to which metrics apply, e.g., Free Product Listing.
&quot;title&quot;: &quot;A String&quot;, # Title of the product.
&quot;week&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values * A month and day value, with a zero year, such as an anniversary * A year on its own, with zero month and day values * A year and month value, with a zero day, such as a credit card expiration date Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`. # First day of the week (Monday) of the metrics date in the merchant timezone.
&quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
&quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
&quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
},
},
},
],
}</pre>
</div>
<div class="method">
<code class="details" id="search_next">search_next(previous_request, previous_response)</code>
<pre>Retrieves the next page of results.
Args:
previous_request: The request for the previous page. (required)
previous_response: The response from the request for the previous page. (required)
Returns:
A request object that you can call &#x27;execute()&#x27; on to request the next
page. Returns None if there are no more items in the collection.
</pre>
</div>
</body></html>