• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5  margin: 0;
6  padding: 0;
7  border: 0;
8  font-weight: inherit;
9  font-style: inherit;
10  font-size: 100%;
11  font-family: inherit;
12  vertical-align: baseline;
13}
14
15body {
16  font-size: 13px;
17  padding: 1em;
18}
19
20h1 {
21  font-size: 26px;
22  margin-bottom: 1em;
23}
24
25h2 {
26  font-size: 24px;
27  margin-bottom: 1em;
28}
29
30h3 {
31  font-size: 20px;
32  margin-bottom: 1em;
33  margin-top: 1em;
34}
35
36pre, code {
37  line-height: 1.5;
38  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42  margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46  font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50  border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54  margin-top: 0.5em;
55}
56
57.firstline {
58  margin-left: 2 em;
59}
60
61.method  {
62  margin-top: 1em;
63  border: solid 1px #CCC;
64  padding: 1em;
65  background: #EEE;
66}
67
68.details {
69  font-weight: bold;
70  font-size: 14px;
71}
72
73</style>
74
75<h1><a href="content_v2.html">Content API for Shopping</a> . <a href="content_v2.inventory.html">inventory</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78  <code><a href="#custombatch">custombatch(body, dryRun=None)</a></code></p>
79<p class="firstline">Updates price and availability for multiple products or stores in a single request. This operation does not update the expiration date of the products. This method can only be called for non-multi-client accounts.</p>
80<p class="toc_element">
81  <code><a href="#set">set(merchantId, storeCode, productId, body, dryRun=None)</a></code></p>
82<p class="firstline">Updates price and availability of a product in your Merchant Center account. This operation does not update the expiration date of the product. This method can only be called for non-multi-client accounts.</p>
83<h3>Method Details</h3>
84<div class="method">
85    <code class="details" id="custombatch">custombatch(body, dryRun=None)</code>
86  <pre>Updates price and availability for multiple products or stores in a single request. This operation does not update the expiration date of the products. This method can only be called for non-multi-client accounts.
87
88Args:
89  body: object, The request body. (required)
90    The object takes the form of:
91
92{
93    "entries": [ # The request entries to be processed in the batch.
94      { # A batch entry encoding a single non-batch inventory request.
95        "batchId": 42, # An entry ID, unique within the batch request.
96        "storeCode": "A String", # The code of the store for which to update price and availability. Use online to update price and availability of an online product.
97        "productId": "A String", # The ID of the product for which to update price and availability.
98        "inventory": { # Price and availability of the product.
99          "kind": "content#inventory", # Identifies what kind of resource this is. Value: the fixed string "content#inventory".
100          "installment": { # Number and amount of installments to pay for an item. Brazil only.
101            "amount": { # The amount the buyer has to pay per month.
102              "currency": "A String", # The currency of the price.
103              "value": "A String", # The price represented as a number.
104            },
105            "months": "A String", # The number of installments the buyer has to pay.
106          },
107          "salePriceEffectiveDate": "A String", # A date range represented by a pair of ISO 8601 dates separated by a space, comma, or slash. Both dates might be specified as 'null' if undecided.
108          "price": { # The price of the product.
109            "currency": "A String", # The currency of the price.
110            "value": "A String", # The price represented as a number.
111          },
112          "sellOnGoogleQuantity": 42, # The quantity of the product that is reserved for sell-on-google ads. Supported only for online products.
113          "pickup": { # Store pickup information. Only supported for local inventory. Not setting pickup means "don't update" while setting it to the empty value ({} in JSON) means "delete". Otherwise, pickupMethod and pickupSla must be set together, unless pickupMethod is "not supported".
114            "pickupMethod": "A String", # Whether store pickup is available for this offer and whether the pickup option should be shown as buy, reserve, or not supported. Only supported for local inventory. Unless the value is "not supported", must be submitted together with pickupSla.
115            "pickupSla": "A String", # The expected date that an order will be ready for pickup, relative to when the order is placed. Only supported for local inventory. Must be submitted together with pickupMethod.
116          },
117          "salePrice": { # The sale price of the product. Mandatory if sale_price_effective_date is defined.
118            "currency": "A String", # The currency of the price.
119            "value": "A String", # The price represented as a number.
120          },
121          "availability": "A String", # The availability of the product.
122          "loyaltyPoints": { # Loyalty points that users receive after purchasing the item. Japan only.
123            "ratio": 3.14, # The ratio of a point when converted to currency. Google assumes currency based on Merchant Center settings. If ratio is left out, it defaults to 1.0.
124            "name": "A String", # Name of loyalty points program. It is recommended to limit the name to 12 full-width characters or 24 Roman characters.
125            "pointsValue": "A String", # The retailer's loyalty points in absolute value.
126          },
127          "quantity": 42, # The quantity of the product. Must be equal to or greater than zero. Supported only for local products.
128        },
129        "merchantId": "A String", # The ID of the managing account.
130      },
131    ],
132  }
133
134  dryRun: boolean, Flag to run the request in dry-run mode.
135
136Returns:
137  An object of the form:
138
139    {
140    "kind": "content#inventoryCustomBatchResponse", # Identifies what kind of resource this is. Value: the fixed string "content#inventoryCustomBatchResponse".
141    "entries": [ # The result of the execution of the batch requests.
142      { # A batch entry encoding a single non-batch inventory response.
143        "batchId": 42, # The ID of the request entry this entry responds to.
144        "kind": "content#inventoryCustomBatchResponseEntry", # Identifies what kind of resource this is. Value: the fixed string "content#inventoryCustomBatchResponseEntry".
145        "errors": { # A list of errors returned by a failed batch entry. # A list of errors defined if and only if the request failed.
146          "message": "A String", # The message of the first error in errors.
147          "code": 42, # The HTTP status of the first error in errors.
148          "errors": [ # A list of errors.
149            { # An error returned by the API.
150              "reason": "A String", # The error code.
151              "domain": "A String", # The domain of the error.
152              "message": "A String", # A description of the error.
153            },
154          ],
155        },
156      },
157    ],
158  }</pre>
159</div>
160
161<div class="method">
162    <code class="details" id="set">set(merchantId, storeCode, productId, body, dryRun=None)</code>
163  <pre>Updates price and availability of a product in your Merchant Center account. This operation does not update the expiration date of the product. This method can only be called for non-multi-client accounts.
164
165Args:
166  merchantId: string, The ID of the managing account. (required)
167  storeCode: string, The code of the store for which to update price and availability. Use online to update price and availability of an online product. (required)
168  productId: string, The ID of the product for which to update price and availability. (required)
169  body: object, The request body. (required)
170    The object takes the form of:
171
172{
173    "installment": { # Number and amount of installments to pay for an item. Brazil only.
174      "amount": { # The amount the buyer has to pay per month.
175        "currency": "A String", # The currency of the price.
176        "value": "A String", # The price represented as a number.
177      },
178      "months": "A String", # The number of installments the buyer has to pay.
179    },
180    "salePriceEffectiveDate": "A String", # A date range represented by a pair of ISO 8601 dates separated by a space, comma, or slash. Both dates might be specified as 'null' if undecided.
181    "price": { # The price of the product.
182      "currency": "A String", # The currency of the price.
183      "value": "A String", # The price represented as a number.
184    },
185    "sellOnGoogleQuantity": 42, # The quantity of the product that is reserved for sell-on-google ads. Supported only for online products.
186    "pickup": { # Store pickup information. Only supported for local inventory. Not setting pickup means "don't update" while setting it to the empty value ({} in JSON) means "delete". Otherwise, pickupMethod and pickupSla must be set together, unless pickupMethod is "not supported".
187      "pickupMethod": "A String", # Whether store pickup is available for this offer and whether the pickup option should be shown as buy, reserve, or not supported. Only supported for local inventory. Unless the value is "not supported", must be submitted together with pickupSla.
188      "pickupSla": "A String", # The expected date that an order will be ready for pickup, relative to when the order is placed. Only supported for local inventory. Must be submitted together with pickupMethod.
189    },
190    "salePrice": { # The sale price of the product. Mandatory if sale_price_effective_date is defined.
191      "currency": "A String", # The currency of the price.
192      "value": "A String", # The price represented as a number.
193    },
194    "availability": "A String", # The availability of the product.
195    "loyaltyPoints": { # Loyalty points that users receive after purchasing the item. Japan only.
196      "ratio": 3.14, # The ratio of a point when converted to currency. Google assumes currency based on Merchant Center settings. If ratio is left out, it defaults to 1.0.
197      "name": "A String", # Name of loyalty points program. It is recommended to limit the name to 12 full-width characters or 24 Roman characters.
198      "pointsValue": "A String", # The retailer's loyalty points in absolute value.
199    },
200    "quantity": 42, # The quantity of the product. Must be equal to or greater than zero. Supported only for local products.
201  }
202
203  dryRun: boolean, Flag to run the request in dry-run mode.
204
205Returns:
206  An object of the form:
207
208    {
209    "kind": "content#inventorySetResponse", # Identifies what kind of resource this is. Value: the fixed string "content#inventorySetResponse".
210  }</pre>
211</div>
212
213</body></html>