deleteInventoryItem
<h1>deleteInventoryItem</h1>
<p><strong>DELETE</strong> /inventory_item/{sku}
此调用用于删除与指定SKU关联的库存项目记录。成功通话不仅会删除该库存商品记录,还会产生以下影响:</p>
<ul>
<li>删除与该SKU关联的所有未发布的商品;</li>
<li>删除与该SKU关联的所有单变量eBay列表;</li>
<li>自动从多变量列表中删除该SKU,并从该SKU所属的任何和所有库存项目组中删除该SKU。</li>
</ul>
<p>该authorization头是该呼叫的唯一需要的HTTP标头。有关更多信息,请参阅HTTP请求标头部分。</p>
<p><strong>input</strong></p>
<h6>Resource URI (production)</h6>
<pre><code>DELETE https://api.ebay.com/sell/inventory/v1/inventory_item/{sku}</code></pre>
<h6>URI parameters</h6>
<table>
<thead>
<tr>
<th>参数</th>
<th>类型</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>SKU</td>
<td>string</td>
<td>这是您希望检索其库存项目记录的产品的卖方定义的SKU值。最大长度:50。发生:必需</td>
</tr>
</tbody>
</table>
<p>HTTP请求标头
对eBay REST操作发出的所有请求都要求您提供授权 HTTP标头以进行身份验证授权。
此方法没有其他必需的标头。请参阅HTTP请求标头- 打开其余请求组件页面以获取详细信息
OAuth范围
此请求需要使用授权代码授权流创建的访问令牌,使用以下列表中的一个范围:</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>有关详细信息,请参阅OAuth访问令牌。</p>
<p><strong>Request payload </strong>
此调用没有有效负载。
<strong>Request fields</strong>
此调用没有字段定义。</p>
<p><strong>Output</strong></p>
<h6>HTTP response headers</h6>
<p>此调用没有响应标头。</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>Code</th>
<th>Domain</th>
<th>Category</th>
<th>Meaning</th>
</tr>
</thead>
<tbody>
<tr>
<td>25001</td>
<td>API_INVENTORY</td>
<td>APPLICATION</td>
<td>发生了系统错误。{附加信息}</td>
</tr>
<tr>
<td>25702</td>
<td>API_INVENTORY</td>
<td>REQUEST</td>
<td>无法找到{skuValue}或系统中无法使用</td>
</tr>
<tr>
<td>25709</td>
<td>API_INVENTORY</td>
<td>REQUEST</td>
<td>{fieldName}的值无效。</td>
</tr>
</tbody>
</table>
<h6>示例</h6>
<p>新的API调用?请参阅拨打电话。</p>
<p>注意:这些样本中的标识符(例如订单ID或用户ID)和个人数据可能是匿名的,或者在eBay上可能不再有效。如有必要,请在您的请求中替换当前相关的eBay数据。</p>
<p>示例1:删除库存物料</p>
<p>此调用将删除与卖方的帐户关联的特定库存项目。</p>
<h6>Input</h6>
<p>与要删除的库存项目相关联的SKU值被输入到调用URI的末尾。在这种情况下,库存项目的SKU值为GP-Cam-01。</p>
<p><strong>DELETE</strong>
<a href="https://api.ebay.com/sell/inventory/v1/inventory_item/GP-Cam-01">https://api.ebay.com/sell/inventory/v1/inventory_item/GP-Cam-01</a></p>
<h6>Output</h6>
<p>此响应没有输出有效负载。成功的呼叫包含HTTP状态代码200。</p>