withdrawOffer
<p><strong>POST</strong> `/offer/{offerId}/withdraw</p>
<p>此调用用于结束与指定商品相关联的单一变体列表。如果卖方只想结束与要约相关联的列表但不想删除要约对象,则使用此呼叫代替deleteOffer呼叫。通过此调用,商品对象仍然存在,但它会进入未发布状态,并且需要通过publishOffer调用来重新提供商品。</p>
<p>要结束与库存项目组关联的多变量列表,请使用withdrawOfferByInventoryItemGroup方法可以使用。此调用仅结束与库存项目组关联的多变量列表,但不会删除库存项目组对象,也不会删除与库存项目组关联的任何商品,而是所有这些商品进入未发布的商品州。</p>
<h5>Input</h5>
<h6>Resource URI (production)</h6>
<p><strong>POST</strong> <a href="https://api.ebay.com/sell/inventory/v1/offer/{offerId}/withdraw">https://api.ebay.com/sell/inventory/v1/offer/{offerId}/withdraw</a></p>
<h6>URI parameters</h6>
<table>
<thead>
<tr>
<th>参数</th>
<th>类型</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>OFFERID</td>
<td>string</td>
<td>要撤消的要约的唯一标识符。此值将传递到调用URI的路径中。发生:必需</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范围</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>有关详细信息,请参阅<a href="https://developer.ebay.com/api-docs/static/oauth-tokens.html" title="OAuth访问令牌">OAuth访问令牌</a>。</p>
<h6>Request payload</h6>
<p>This call has no payload.</p>
<h6>Request fields</h6>
<p>This call has no field definitions.</p>
<h5>Output</h5>
<h6>HTTP response headers</h6>
<p>This call has no response headers.</p>
<h6>Response payload</h6>
<pre><code class="language-json">{
"warnings": [
{
"errorId": "integer",
"domain": "string",
"subdomain": "string",
"category": "string",
"message": "string",
"parameters": [
{
"value": "string",
"name": "string"
}
],
"longMessage": "string",
"inputRefIds": [
"string"
],
"outputRefIds": [
"string"
]
}
],
"listingId": "string"
}</code></pre>
<h6>Response fields</h6>
<table>
<thead>
<tr>
<th>Output container/field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>warnings</td>
<td>array of ErrorDetailV3</td>
<td>如果在进行Inventory API调用时触发了一个或多个警告或错误,则此容器将在调用响应有效内容中返回。此容器将包含有关错误或警告的详细信息。发生:可选</td>
</tr>
<tr>
<td>warnings.errorId</td>
<td>integer</td>
<td>唯一代码,用于标识发生的特定错误或警告。您的应用程序可以在自定义错误处理算法中使用错误代码作为标识符。发生:可选</td>
</tr>
<tr>
<td>warnings.domain</td>
<td>string</td>
<td>发生错误或警告的域的名称。发生:可选</td>
</tr>
<tr>
<td>warnings.subdomain</td>
<td>string</td>
<td>发生错误或警告的子域的名称。发生:可选</td>
</tr>
<tr>
<td>warnings.category</td>
<td>string</td>
<td>此字符串值表示错误类别。有三类错误:请求错误,应用程序错误和系统错误。发生:可选</td>
</tr>
<tr>
<td>warnings.message</td>
<td>string</td>
<td>导致错误或警告的条件的描述。发生:可选</td>
</tr>
<tr>
<td>warnings.parameters</td>
<td>array of ErrorParameterV3</td>
<td>各种警告和错误消息返回一个或多个变量,这些变量包含有关错误或警告的上下文信息。这通常是触发错误或警告的字段或值。发生:可选</td>
</tr>
<tr>
<td>warnings.parameters.value</td>
<td>string</td>
<td>这是为name字段中指定的元素传递的实际值。发生:可选</td>
</tr>
<tr>
<td>warnings.parameters.name</td>
<td>string</td>
<td>这是导致调用请求出现问题的输入字段的名称。发生:可选</td>
</tr>
<tr>
<td>warnings.longMessage</td>
<td>string</td>
<td>导致错误或警告的条件的详细说明,以及有关如何解决问题的信息。发生:可选</td>
</tr>
<tr>
<td>warnings.inputRefIds</td>
<td>array of string</td>
<td>一个或多个引用ID的数组,用于标识与错误或警告关联最密切的特定请求元素(如果有)。发生:可选</td>
</tr>
<tr>
<td>warnings.outputRefIds</td>
<td>array of string</td>
<td>一个或多个引用ID的数组,用于标识与错误或警告关系最密切的特定响应元素(如果有)。发生:可选</td>
</tr>
<tr>
<td>listingId</td>
<td>string</td>
<td>新创建的eBay列表的唯一标识符。如果单个商品(如果使用了publishOffer调用)或库存商品组中的商品组(如果使用了publishOfferByInventoryItemGroup调用)成功转换为易趣商品列表,则会返回此字段。发生:可选</td>
</tr>
</tbody>
</table>
<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>25002</td>
<td>API_INVENTORY</td>
<td>请求</td>
<td>发生了用户错误。{附加信息}</td>
</tr>
<tr>
<td>25713</td>
<td>API_INVENTORY</td>
<td>请求</td>
<td>此优惠不可用:{additionalInfo}。</td>
</tr>
</tbody>
</table>
<h6>示例</h6>
<p>新的API调用?请参阅<a href="https://developer.ebay.com/api-docs/static/make-a-call.html" title="拨打电话">拨打电话</a>。</p>
<p>注意:这些样本中的标识符(例如订单ID或用户ID)和个人数据可能是匿名的,或者在eBay上可能不再有效。如有必要,请在您的请求中替换当前相关的eBay数据。</p>
<h6>样本1:撤回要约</h6>
<p>此通话将结束与优惠相关联的eBay列表。但是,Offer对象仍将保留,但只能从已发布状态转换为未发布状态。可以使用publishOffer调用在以后重新发布要约。</p>
<h6>Input</h6>
<p>与提取要约相关联 的offerId值被输入到调用URI中。在这种情况下,商品的offerId值是3455632452346。
<strong>POST</strong>
<a href="https://api.ebay.com/sell/inventory/v1/offer/3455632452346/withdraw">https://api.ebay.com/sell/inventory/v1/offer/3455632452346/withdraw</a></p>
<h6>Output</h6>
<p>如果成功列出了eBay列表,则返回listingId值。</p>
<pre><code class="language-json">{
"listingId": "3455632452346"
}</code></pre>