updateInventoryLocation
<p><strong>POST</strong> /location/{merchantLocationKey}/update_location_details</p>
<p>使用此调用可更新现有库存位置的非物理位置详细信息。使用merchantLocationKey路径参数指定要更新的库存位置。</p>
<p>您可以更新以下基于文本的字段:name,phone,locationWebUrl,locationInstructions和locationAdditionalInformation。无论在updateInventoryLocation调用中为这些字段传入的文本是什么,都将替换为这些字段定义的当前文本字符串。对于商店库存位置,还可以更新营业时间和/或特殊营业时间。</p>
<p>无法使用updateInventoryLocation调用更新商家位置键,商店的物理位置及其地理位置坐标</p>
<p>除了authorization所有eBay REST API调用所需的标头之外,下表还包括对updateInventoryLocation调用必需的另一个请求标头,以及另外两个可选的请求标头:</p>
<table>
<thead>
<tr>
<th>Header</th>
<th>Description</th>
<th>Required?</th>
<th>Applicable Values</th>
</tr>
</thead>
<tbody>
<tr>
<td>Accept</td>
<td>根据调用者的要求描述响应编码。目前,接口需要使用JSON格式化的有效负载,并且JSON是默认值。</td>
<td>No</td>
<td>application/json</td>
</tr>
<tr>
<td>Content-Language</td>
<td>使用此标头可以控制用于呼叫响应中任何返回的错误或警告的语言。</td>
<td>No</td>
<td>en-US</td>
</tr>
<tr>
<td>Content-Type</td>
<td>请求正文的MIME类型。必须是JSON。</td>
<td>No</td>
<td>application/json</td>
</tr>
</tbody>
</table>
<p>除非呼叫发生一个或多个错误和/或警告,否则此呼叫没有响应有效负载。成功调用将返回HTTP状态值204 No Content。</p>
<h5>Input</h5>
<h6>Resource URI (production)</h6>
<p><strong>POST</strong> <a href="https://api.ebay.com/sell/inventory/v1/location/{merchantLocationKey}/update_location_details">https://api.ebay.com/sell/inventory/v1/location/{merchantLocationKey}/update_location_details</a></p>
<h6>URI parameters</h6>
<table>
<thead>
<tr>
<th>参数</th>
<th>类型</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>merchantLocationKey</td>
<td>string</td>
<td>商品定义的唯一商品密钥(ID),用于库存位置。此唯一标识符或密钥在其他Inventory API调用中用于标识库存位置。最大长度:36 发生:必需</td>
</tr>
</tbody>
</table>
<h6>HTTP request headers</h6>
<p>对eBay REST操作发出的所有请求都要求您提供授权 HTTP标头以进行身份验证授权。
此外,此方法要求您包含Content-Type标头,其值应设置为“ application / json ”。请参阅<a href="http://developer.ebay.com/devzone/rest/ebay-rest/content/rest-request-components.html#HTTP" title="HTTP请求标头">HTTP请求标头</a>打开其余请求组件页面以获取详细信息</p>
<h6>OAuth scope</h6>
<p>此请求需要使用<a href="https://developer.ebay.com/api-docs/static/oauth-authorization-code-grant.html" title="授权代码授权">授权代码授权</a>流创建的访问令牌,使用以下列表中的一个范围:</p>
<p><a href="https://api.ebay.com/oauth/api_scope/sell.inventory">https://api.ebay.com/oauth/api_scope/sell.inventory</a></p>
<p>eBayUser</p>
<p>有关详细信息,请参阅<a href="https://developer.ebay.com/api-docs/static/oauth-tokens.html" title="OAuth访问令牌">OAuth访问令牌</a>。</p>
<h6>Request payload</h6>
<pre><code class="language-json">{
"locationAdditionalInformation": "string",
"locationInstructions": "string",
"locationWebUrl": "string",
"name": "string",
"operatingHours": [
{
"dayOfWeekEnum": "DayOfWeekEnum : [MONDAY,TUESDAY,WEDNESDAY,THURSDAY,FRIDAY,SATURDAY,SUNDAY]",
"intervals": [
{
"close": "string",
"open": "string"
}
]
}
],
"phone": "string",
"specialHours": [
{
"date": "string",
"intervals": [
{
"close": "string",
"open": "string"
}
]
}
]
}</code></pre>
<h6>Request fields</h6>
<table>
<thead>
<tr>
<th>Input container/field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>locationAdditionalInformation</td>
<td><a href="https://developer.ebay.com/api-docs/static/simple-types.html" title="string">string</a></td>
<td>商家使用此文本字段来提供有关库存位置的其他信息。最大长度:256出现:可选</td>
</tr>
<tr>
<td>locationInstructions</td>
<td><a href="https://developer.ebay.com/api-docs/static/simple-types.html" title="string">string</a></td>
<td>该文本字段通常由商家用于提供/更新商店库存位置的特殊提货指令。虽然此字段是可选字段,但建议商家提供此字段,以便为店内提货和点击和收集订单创建愉快和轻松的取件体验。如果此字段未包含在呼叫请求有效负载中,则易趣将使用商家配置文件中包含的默认提取指令(如果可用)。无论此字段中传递的文本是什么,都将替换为此字段定义的当前文本字符串。如果文本不会更改,则应再次传入相同的文本。最大长度:1000;发生:有条件的</td>
</tr>
<tr>
<td>locationWebUrl</td>
<td><a href="https://developer.ebay.com/api-docs/static/simple-types.html" title="string">string</a></td>
<td>商家使用该文本字段来提供/更新与库存位置相关联的网站地址(URL)。在此字段中传递的URL将替换可能为此字段定义的任何其他URL。最大长度:512;发生:有条件的</td>
</tr>
<tr>
<td>name</td>
<td><a href="https://developer.ebay.com/api-docs/static/simple-types.html" title="string">string</a></td>
<td>商家使用此文本字段来更新库存位置的名称。此名称应该是一个人性化的名称,因为它将在店内提货和点击和收集列表中。仓库库存位置不需要名称。对于商店库存位置,此字段不是立即需要的,但在使用In-Store Pickup或Click and Collect功能启用的商品可以发布之前,将需要此字段。因此,如果卖方在createInventoryLocation调用中省略了该字段,则updateInventoryLocation调用需要它。在此字段中传递的名称将替换可能为此字段定义的任何其他名称。发生:有条件的</td>
</tr>
<tr>
<td>operatingHours</td>
<td>array of <a href="https://developer.ebay.com/api-docs/sell/inventory/types/api:OperatingHours" title="OperatingHours">OperatingHours</a></td>
<td>该容器用于在一周中的几天内提供/更新商店位置的正常运行时间。一个dayOfWeekEnum场和间隔将需要为这家店的位置是开放一周的每一天容器。请注意,如果已经为一周中的特定日期的库存位置设置了营业时间,则通过updateInventoryLocation调用设置的任何内容都将覆盖那些现有小时数。发生:有条件的</td>
</tr>
<tr>
<td>operatingHours.dayOfWeekEnum</td>
<td><a href="https://developer.ebay.com/api-docs/sell/inventory/types/api:DayOfWeekEnum" title="DayOfWeekEnum">DayOfWeekEnum</a></td>
<td>一个dayOfWeekEnum值是必需的,这家店的位置有规律的工作时间一周中的每一天。如果为商店位置定义了营业时间,则会返回此字段。发生:必需</td>
</tr>
<tr>
<td>operatingHours.intervals</td>
<td>array of <a href="https://developer.ebay.com/api-docs/sell/inventory/types/api:Interval" title="Interval">Interval</a></td>
<td>此容器用于定义商店工作日的开始和结束时间(在dayOfWeekEnum字段中定义)。一个间隔是需要的存储位置是开放一周的每一天容器。如果商店位置在午餐时间(或白天的任何其他时段)关闭然后重新打开,则需要多个打开和关闭对。如果为商店位置定义了营业时间,则返回此容器。发生:必需</td>
</tr>
<tr>
<td>operatingHours.intervals.close</td>
<td><a href="https://developer.ebay.com/api-docs/static/simple-types.html" title="string">string</a></td>
<td>该接近值实际上是商店关闭的时间。使用当地时间(军事格式)。因此,如果商店在当地时间晚上8点关闭,关闭时间将如下所示:20:00:00。如果使用间隔容器指定商店的工作时间或特殊时间,则有条件地需要此字段。如果为商店位置设置,则返回此字段。发生:必需</td>
</tr>
<tr>
<td>operatingHours.intervals.open</td>
<td><a href="https://developer.ebay.com/api-docs/static/simple-types.html" title="string">string</a></td>
<td>在开放的价值实际上是存储打开的时间。使用当地时间(军事格式)。因此,如果商店在当地时间上午9点开门,关闭时间如下:09:00:00。如果使用间隔容器指定商店的工作时间或特殊时间,则有条件地需要此字段。如果为商店位置设置,则返回此字段。发生:必需</td>
</tr>
<tr>
<td>phone</td>
<td><a href="https://developer.ebay.com/api-docs/static/simple-types.html" title="string">string</a></td>
<td>虽然技术上不需要,但强烈建议使用此字段来指定商店库存位置的电话号码。最大长度:36出现:可选</td>
</tr>
<tr>
<td>specialHours</td>
<td>array of <a href="https://developer.ebay.com/api-docs/sell/inventory/types/api:SpecialHours" title="SpecialHours">SpecialHours</a></td>
<td>此容器用于在特定日期(例如假日)提供/更新商店位置的特殊营业时间。为特定日期指定的特殊时间将覆盖该特定日期的正常工作时间。如果已经为库存位置设置了特殊时间,则通过updateInventoryLocation调用指定特殊小时数将仅添加到列表中,除非使用的日期与已设置的日期相同(在这种情况下,通过updateInventoryLocation调用设置的特殊小时数将覆盖现有的特殊小时数。发生:有条件的</td>
</tr>
<tr>
<td>specialHours.date</td>
<td><a href="https://developer.ebay.com/api-docs/static/simple-types.html" title="string">string</a></td>
<td>甲日期值是必需的商店场所具有特殊的操作小时每个特定日期。日期实际上表示为ISO 8601格式中指定的时间戳,该格式使用24小时协调世界时(UTC)时钟。以下示例显示(1)时间戳的格式,以及(2)ISO 8601格式的示例时间值:格式: yyyy-MM-ddThh:mm:ssZ 示例: 2016-10-19T00:09:00Z 如果为商店位置设置,则返回此字段。发生:有条件的</td>
</tr>
<tr>
<td>specialHours.intervals</td>
<td>array of <a href="https://developer.ebay.com/api-docs/sell/inventory/types/api:Interval" title="Interval">Interval</a></td>
<td>此容器用于定义特定日期(在日期字段中定义)的商店的打开和关闭时间。商店有特殊营业时间的每个特定日期需要一个间隔容器。特定日期的这些特殊营业时间优先于一周中特定日期的正常营业时间。如果商店位置在午餐时间(或白天的任何其他时段)关闭然后重新打开,则需要多个打开和关闭对。如果为商店位置设置,则返回此容器。发生:必需</td>
</tr>
<tr>
<td>specialHours.intervals.close</td>
<td><a href="https://developer.ebay.com/api-docs/static/simple-types.html" title="string">string</a></td>
<td>该接近值实际上是商店关闭的时间。使用当地时间(军事格式)。因此,如果商店在当地时间晚上8点关闭,关闭时间将如下所示:20:00:00。如果使用间隔容器指定商店的工作时间或特殊时间,则有条件地需要此字段。如果为商店位置设置,则返回此字段。发生:必需</td>
</tr>
<tr>
<td>specialHours.intervals.open</td>
<td><a href="https://developer.ebay.com/api-docs/static/simple-types.html" title="string">string</a></td>
<td>在开放的价值实际上是存储打开的时间。使用当地时间(军事格式)。因此,如果商店在当地时间上午9点开门,关闭时间如下:09:00:00。如果使用间隔容器指定商店的工作时间或特殊时间,则有条件地需要此字段。如果为商店位置设置,则返回此字段。发生:必需</td>
</tr>
</tbody>
</table>
<h5>Output</h5>
<h6>HTTP response headers</h6>
<p>This call has no response headers.</p>
<h6>Response payload</h6>
<p>This call has no payload.</p>
<h6>Response fields</h6>
<p>This call has no field definitions.</p>
<p><strong>HTTP状态代码</strong>
此调用可以返回以下HTTP状态代码之一。状态代码的概述,请参阅<a href="https://developer.ebay.com/api-docs/static/rest-response-components.html#HTTP" title="HTTP状态代码">HTTP状态代码</a>在使用eBay RESTful API中。</p>
<table>
<thead>
<tr>
<th>状态码</th>
<th>含义</th>
</tr>
</thead>
<tbody>
<tr>
<td>200</td>
<td>成功</td>
</tr>
<tr>
<td>400</td>
<td>错误的请求</td>
</tr>
<tr>
<td>404</td>
<td>找不到</td>
</tr>
<tr>
<td>500</td>
<td>内部服务器错误</td>
</tr>
</tbody>
</table>
<p><strong>错误代码</strong>
有关错误的更多信息以及其他常见错误的代码,请参阅<a href="https://developer.ebay.com/api-docs/static/handling-error-messages.html" title="处理错误">处理错误</a>。</p>
<table>
<thead>
<tr>
<th>状态码</th>
<th>域</th>
<th>类别</th>
<th>含义</th>
</tr>
</thead>
<tbody>
<tr>
<td>25001</td>
<td>API_INVENTORY</td>
<td>应用</td>
<td>发生了系统错误。{附加信息}</td>
</tr>
<tr>
<td>25800</td>
<td>API_INVENTORY</td>
<td>请求</td>
<td>{fieldName}无效。</td>
</tr>
<tr>
<td>25801</td>
<td>API_INVENTORY</td>
<td>请求</td>
<td>缺少字段{fieldName}。</td>
</tr>
<tr>
<td>25802</td>
<td>API_INVENTORY</td>
<td>请求</td>
<td>输入错误。{附加信息}</td>
</tr>
<tr>
<td>25804</td>
<td>API_INVENTORY</td>
<td>请求</td>
<td>输入错误。{附加信息}</td>
</tr>
<tr>
<td>25805</td>
<td>API_INVENTORY</td>
<td>请求</td>
<td>{fieldName}未找到。</td>
</tr>
</tbody>
</table>
<p><strong>示例</strong>
新的API调用?请参阅拨打电话。</p>
<p>注意:这些样本中的标识符(例如订单ID或用户ID)和个人数据可能是匿名的,或者在eBay上可能不再有效。如有必要,请在您的请求中替换当前相关的eBay数据。</p>
<h6>示例1:更新库存位置</h6>
<p>此示例更新现有库存位置。</p>
<h6>Input</h6>
<p>使用merchanteLocationKey path参数指定要更新的库存位置。在请求中提供一个全新的位置对象,因为此调用会覆盖现有的位置详细信息。调用getInventoryLocation以重新获取当前位置的完整详细信息。</p>
<p><strong>POST</strong>
<a href="https://api.ebay.com/sell/inventory/v1/location/warehouse-1/update_location_details">https://api.ebay.com/sell/inventory/v1/location/warehouse-1/update_location_details</a></p>
<pre><code class="language-json">{
"name": "Warehouse-South",
"locationInstructions": "Entrance is on the backside of the building.",
"locationAdditionalInformation": "Available for drop-off on Mondays only.",
"locationWebUrl": "http://www.example.com/warehouse-1",
"phone": "888-730-0000"
}</code></pre>
<h6>Output</h6>
<p>如果呼叫成功,eBay将返回HTTP状态代码204 No Content,其空载荷为空。</p>
<pre><code>Upon success, this call returns an HTTP status code of "204 No Content" and an empty response payload.</code></pre>