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.</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.</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.
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          "quantity": 42, # The quantity of the product. Must be equal to or greater than zero. Supported only for local products.
108          "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.
109          "price": { # The price of the product.
110            "currency": "A String", # The currency of the price.
111            "value": "A String", # The price represented as a number.
112          },
113          "availability": "A String", # The availability of the product.
114          "sellOnGoogleQuantity": 42, # The quantity of the product that is available for selling on Google. Supported only for online products.
115          "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".
116            "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.
117            "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.
118          },
119          "loyaltyPoints": { # Loyalty points that users receive after purchasing the item. Japan only.
120            "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.
121            "name": "A String", # Name of loyalty points program. It is recommended to limit the name to 12 full-width characters or 24 Roman characters.
122            "pointsValue": "A String", # The retailer's loyalty points in absolute value.
123          },
124          "instoreProductLocation": "A String", # The instore product location. Supported only for local products.
125          "salePrice": { # The sale price of the product. Mandatory if sale_price_effective_date is defined.
126            "currency": "A String", # The currency of the price.
127            "value": "A String", # The price represented as a number.
128          },
129          "customLabel4": "A String", # Custom label 3 for custom grouping of items in a Shopping campaign. Only supported for online products.
130          "customLabel3": "A String", # Custom label 3 for custom grouping of items in a Shopping campaign. Only supported for online products.
131          "customLabel2": "A String", # Custom label 2 for custom grouping of items in a Shopping campaign. Only supported for online products.
132          "customLabel1": "A String", # Custom label 1 for custom grouping of items in a Shopping campaign. Only supported for online products.
133          "customLabel0": "A String", # Custom label 0 for custom grouping of items in a Shopping campaign. Only supported for online products.
134        },
135        "merchantId": "A String", # The ID of the managing account.
136      },
137    ],
138  }
139
140  dryRun: boolean, Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).
141
142Returns:
143  An object of the form:
144
145    {
146    "kind": "content#inventoryCustomBatchResponse", # Identifies what kind of resource this is. Value: the fixed string "content#inventoryCustomBatchResponse".
147    "entries": [ # The result of the execution of the batch requests.
148      { # A batch entry encoding a single non-batch inventory response.
149        "batchId": 42, # The ID of the request entry this entry responds to.
150        "kind": "content#inventoryCustomBatchResponseEntry", # Identifies what kind of resource this is. Value: the fixed string "content#inventoryCustomBatchResponseEntry".
151        "errors": { # A list of errors returned by a failed batch entry. # A list of errors defined if and only if the request failed.
152          "message": "A String", # The message of the first error in errors.
153          "code": 42, # The HTTP status of the first error in errors.
154          "errors": [ # A list of errors.
155            { # An error returned by the API.
156              "reason": "A String", # The error code.
157              "domain": "A String", # The domain of the error.
158              "message": "A String", # A description of the error.
159            },
160          ],
161        },
162      },
163    ],
164  }</pre>
165</div>
166
167<div class="method">
168    <code class="details" id="set">set(merchantId, storeCode, productId, body, dryRun=None)</code>
169  <pre>Updates price and availability of a product in your Merchant Center account.
170
171Args:
172  merchantId: string, The ID of the account that contains the product. This account cannot be a multi-client account. (required)
173  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)
174  productId: string, The REST ID of the product for which to update price and availability. (required)
175  body: object, The request body. (required)
176    The object takes the form of:
177
178{
179    "installment": { # Number and amount of installments to pay for an item. Brazil only.
180      "amount": { # The amount the buyer has to pay per month.
181        "currency": "A String", # The currency of the price.
182        "value": "A String", # The price represented as a number.
183      },
184      "months": "A String", # The number of installments the buyer has to pay.
185    },
186    "quantity": 42, # The quantity of the product. Must be equal to or greater than zero. Supported only for local products.
187    "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.
188    "price": { # The price of the product.
189      "currency": "A String", # The currency of the price.
190      "value": "A String", # The price represented as a number.
191    },
192    "availability": "A String", # The availability of the product.
193    "sellOnGoogleQuantity": 42, # The quantity of the product that is available for selling on Google. Supported only for online products.
194    "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".
195      "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.
196      "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.
197    },
198    "loyaltyPoints": { # Loyalty points that users receive after purchasing the item. Japan only.
199      "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.
200      "name": "A String", # Name of loyalty points program. It is recommended to limit the name to 12 full-width characters or 24 Roman characters.
201      "pointsValue": "A String", # The retailer's loyalty points in absolute value.
202    },
203    "instoreProductLocation": "A String", # The instore product location. Supported only for local products.
204    "salePrice": { # The sale price of the product. Mandatory if sale_price_effective_date is defined.
205      "currency": "A String", # The currency of the price.
206      "value": "A String", # The price represented as a number.
207    },
208    "customLabel4": "A String", # Custom label 3 for custom grouping of items in a Shopping campaign. Only supported for online products.
209    "customLabel3": "A String", # Custom label 3 for custom grouping of items in a Shopping campaign. Only supported for online products.
210    "customLabel2": "A String", # Custom label 2 for custom grouping of items in a Shopping campaign. Only supported for online products.
211    "customLabel1": "A String", # Custom label 1 for custom grouping of items in a Shopping campaign. Only supported for online products.
212    "customLabel0": "A String", # Custom label 0 for custom grouping of items in a Shopping campaign. Only supported for online products.
213  }
214
215  dryRun: boolean, Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).
216
217Returns:
218  An object of the form:
219
220    {
221    "kind": "content#inventorySetResponse", # Identifies what kind of resource this is. Value: the fixed string "content#inventorySetResponse".
222  }</pre>
223</div>
224
225</body></html>