1 <html><body> 2 <style> 3 4 body, 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 15 body { 16 font-size: 13px; 17 padding: 1em; 18 } 19 20 h1 { 21 font-size: 26px; 22 margin-bottom: 1em; 23 } 24 25 h2 { 26 font-size: 24px; 27 margin-bottom: 1em; 28 } 29 30 h3 { 31 font-size: 20px; 32 margin-bottom: 1em; 33 margin-top: 1em; 34 } 35 36 pre, code { 37 line-height: 1.5; 38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; 39 } 40 41 pre { 42 margin-top: 0.5em; 43 } 44 45 h1, h2, h3, p { 46 font-family: Arial, sans serif; 47 } 48 49 h1, 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_1.html">Content API for Shopping</a> . <a href="content_v2_1.regionalinventory.html">regionalinventory</a></h1> 76 <h2>Instance Methods</h2> 77 <p class="toc_element"> 78 <code><a href="#custombatch">custombatch(body)</a></code></p> 79 <p class="firstline">Updates regional inventory for multiple products or regions in a single request.</p> 80 <p class="toc_element"> 81 <code><a href="#insert">insert(merchantId, productId, body)</a></code></p> 82 <p class="firstline">Update the regional inventory of a product in your Merchant Center account. If a regional inventory with the same region ID already exists, this method updates that entry.</p> 83 <h3>Method Details</h3> 84 <div class="method"> 85 <code class="details" id="custombatch">custombatch(body)</code> 86 <pre>Updates regional inventory for multiple products or regions in a single request. 87 88 Args: 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 regional inventory request. 95 "batchId": 42, # An entry ID, unique within the batch request. 96 "regionalInventory": { # Regional inventory resource. contains the regional name and all attributes which are overridden for the specified region. # Price and availability of the product. 97 "kind": "content#regionalInventory", # Identifies what kind of resource this is. Value: the fixed string "content#regionalInventory". 98 "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. 99 "price": { # The price of the product. 100 "currency": "A String", # The currency of the price. 101 "value": "A String", # The price represented as a number. 102 }, 103 "regionId": "A String", # The ID (name) of the region. 104 "customAttributes": [ # A list of custom (merchant-provided) attributes. It can also be used for submitting any attribute of the feed specification in its generic form. 105 { 106 "groupValues": [ # Subattributes within this attribute group. Exactly one of value or groupValues must be provided. 107 # Object with schema name: CustomAttribute 108 ], 109 "name": "A String", # The name of the attribute. Underscores will be replaced by spaces upon insertion. 110 "value": "A String", # The value of the attribute. 111 }, 112 ], 113 "salePrice": { # The sale price of the product. Mandatory if sale_price_effective_date is defined. 114 "currency": "A String", # The currency of the price. 115 "value": "A String", # The price represented as a number. 116 }, 117 "availability": "A String", # The availability of the product. 118 }, 119 "productId": "A String", # The ID of the product for which to update price and availability. 120 "merchantId": "A String", # The ID of the managing account. 121 "method": "A String", 122 }, 123 ], 124 } 125 126 127 Returns: 128 An object of the form: 129 130 { 131 "kind": "content#regionalinventoryCustomBatchResponse", # Identifies what kind of resource this is. Value: the fixed string "content#regionalinventoryCustomBatchResponse". 132 "entries": [ # The result of the execution of the batch requests. 133 { # A batch entry encoding a single non-batch regional inventory response. 134 "batchId": 42, # The ID of the request entry this entry responds to. 135 "regionalInventory": { # Regional inventory resource. contains the regional name and all attributes which are overridden for the specified region. # Price and availability of the product. 136 "kind": "content#regionalInventory", # Identifies what kind of resource this is. Value: the fixed string "content#regionalInventory". 137 "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. 138 "price": { # The price of the product. 139 "currency": "A String", # The currency of the price. 140 "value": "A String", # The price represented as a number. 141 }, 142 "regionId": "A String", # The ID (name) of the region. 143 "customAttributes": [ # A list of custom (merchant-provided) attributes. It can also be used for submitting any attribute of the feed specification in its generic form. 144 { 145 "groupValues": [ # Subattributes within this attribute group. Exactly one of value or groupValues must be provided. 146 # Object with schema name: CustomAttribute 147 ], 148 "name": "A String", # The name of the attribute. Underscores will be replaced by spaces upon insertion. 149 "value": "A String", # The value of the attribute. 150 }, 151 ], 152 "salePrice": { # The sale price of the product. Mandatory if sale_price_effective_date is defined. 153 "currency": "A String", # The currency of the price. 154 "value": "A String", # The price represented as a number. 155 }, 156 "availability": "A String", # The availability of the product. 157 }, 158 "kind": "content#regionalinventoryCustomBatchResponseEntry", # Identifies what kind of resource this is. Value: the fixed string "content#regionalinventoryCustomBatchResponseEntry". 159 "errors": { # A list of errors returned by a failed batch entry. # A list of errors defined if and only if the request failed. 160 "message": "A String", # The message of the first error in errors. 161 "code": 42, # The HTTP status of the first error in errors. 162 "errors": [ # A list of errors. 163 { # An error returned by the API. 164 "reason": "A String", # The error code. 165 "domain": "A String", # The domain of the error. 166 "message": "A String", # A description of the error. 167 }, 168 ], 169 }, 170 }, 171 ], 172 }</pre> 173 </div> 174 175 <div class="method"> 176 <code class="details" id="insert">insert(merchantId, productId, body)</code> 177 <pre>Update the regional inventory of a product in your Merchant Center account. If a regional inventory with the same region ID already exists, this method updates that entry. 178 179 Args: 180 merchantId: string, The ID of the account that contains the product. This account cannot be a multi-client account. (required) 181 productId: string, The REST ID of the product for which to update the regional inventory. (required) 182 body: object, The request body. (required) 183 The object takes the form of: 184 185 { # Regional inventory resource. contains the regional name and all attributes which are overridden for the specified region. 186 "kind": "content#regionalInventory", # Identifies what kind of resource this is. Value: the fixed string "content#regionalInventory". 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 "regionId": "A String", # The ID (name) of the region. 193 "customAttributes": [ # A list of custom (merchant-provided) attributes. It can also be used for submitting any attribute of the feed specification in its generic form. 194 { 195 "groupValues": [ # Subattributes within this attribute group. Exactly one of value or groupValues must be provided. 196 # Object with schema name: CustomAttribute 197 ], 198 "name": "A String", # The name of the attribute. Underscores will be replaced by spaces upon insertion. 199 "value": "A String", # The value of the attribute. 200 }, 201 ], 202 "salePrice": { # The sale price of the product. Mandatory if sale_price_effective_date is defined. 203 "currency": "A String", # The currency of the price. 204 "value": "A String", # The price represented as a number. 205 }, 206 "availability": "A String", # The availability of the product. 207 } 208 209 210 Returns: 211 An object of the form: 212 213 { # Regional inventory resource. contains the regional name and all attributes which are overridden for the specified region. 214 "kind": "content#regionalInventory", # Identifies what kind of resource this is. Value: the fixed string "content#regionalInventory". 215 "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. 216 "price": { # The price of the product. 217 "currency": "A String", # The currency of the price. 218 "value": "A String", # The price represented as a number. 219 }, 220 "regionId": "A String", # The ID (name) of the region. 221 "customAttributes": [ # A list of custom (merchant-provided) attributes. It can also be used for submitting any attribute of the feed specification in its generic form. 222 { 223 "groupValues": [ # Subattributes within this attribute group. Exactly one of value or groupValues must be provided. 224 # Object with schema name: CustomAttribute 225 ], 226 "name": "A String", # The name of the attribute. Underscores will be replaced by spaces upon insertion. 227 "value": "A String", # The value of the attribute. 228 }, 229 ], 230 "salePrice": { # The sale price of the product. Mandatory if sale_price_effective_date is defined. 231 "currency": "A String", # The currency of the price. 232 "value": "A String", # The price represented as a number. 233 }, 234 "availability": "A String", # The availability of the product. 235 }</pre> 236 </div> 237 238 </body></html>