eBay文档翻译

eBayAPI文档翻译


getProductCompatibility

<h1>getProductCompatibility</h1> <p><strong>GET</strong> /inventory_item/{sku}/product_compatibility</p> <p>卖方使用此调用来检索与库存项目兼容的产品列表。库存物料的SKU值将传递到调用URI,并且成功调用并返回与此库存物料关联的兼容车辆列表。产品兼容性目前仅适用于汽车零件和配件类别,但将来可能会支持更多类别。</p> <h6>Input</h6> <p>Resource URI (production)</p> <p><strong>GET</strong> <a href="https://api.ebay.com/sell/inventory/v1/inventory_item/{sku}/product_compatibility">https://api.ebay.com/sell/inventory/v1/inventory_item/{sku}/product_compatibility</a></p> <h6>URI parameters</h6> <table> <thead> <tr> <th>参数</th> <th>类型</th> <th>描述</th> </tr> </thead> <tbody> <tr> <td>sku</td> <td><a href="https://developer.ebay.com/api-docs/static/simple-types.html" title="string">string</a></td> <td>SKU(库存单位)是卖方为产品定义的唯一标识符。发生:必需</td> </tr> </tbody> </table> <h5>HTTP请求标头</h5> <p>对eBay REST操作发出的所有请求都要求您提供授权 HTTP标头以进行身份​​验证授权。 此方法具有下面列出的其他请求标头要求。请参阅<a href="http://developer.ebay.com/devzone/rest/ebay-rest/content/rest-request-components.html#HTTP" title="HTTP请求标头">HTTP请求标头</a>- 打开其余请求组件页面以获取详细信息</p> <table> <thead> <tr> <th>Header</th> <th>Type</th> <th>描述</th> </tr> </thead> <tbody> <tr> <td>Content-Language</td> <td><a href="https://developer.ebay.com/api-docs/static/simple-types.html" title="string">string</a></td> <td>此请求标头设置将在请求有效负载的字段值中提供的自然语言。发生:必需</td> </tr> </tbody> </table> <h6>OAuth范围</h6> <p>此请求需要使用<a href="https://developer.ebay.com/api-docs/static/oauth-authorization-code-grant.html" title="授权代码授权">授权代码授权</a>流创建的访问令牌,使用以下列表中的一个范围: <a href="https://api.ebay.com/oauth/api_scope/sell.inventory.readonly">https://api.ebay.com/oauth/api_scope/sell.inventory.readonly</a> <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> <h6>Output</h6> <h6>HTTP response headers</h6> <p>This call has no response headers.</p> <h6>Response payload</h6> <pre><code class="language-json">{ "compatibleProducts": [ { "productFamilyProperties": { "make": "string", "model": "string", "year": "string", "trim": "string", "engine": "string" }, "productIdentifier": { "epid": "string", "gtin": "string", "ktype": "string" }, "notes": "string" } ], "sku": "string" }</code></pre> <h6>Response fields</h6> <table> <thead> <tr> <th>Input container/field</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>compatibleProducts</td> <td>array of CompatibleProduct</td> <td>该容器由一系列机动车辆(制造商,型号,年份,装饰,发动机)组成,这些机动车辆与sku值指定的机动车辆部件或附件兼容。发生:总是</td> </tr> <tr> <td>compatibleProducts.productFamilyProperties</td> <td>ProductFamilyProperties</td> <td>指定的机动车辆部件或附件兼容。这些机动车辆通过诸如品牌,型号,年份,装饰和发动机类型等属性来识别。无论是产品识别或productFamilyProperties容器(或两者)可用于指定与所述库存项目兼容的一个或多个机动车辆。需要单独的productFamilyProperties来指定每个兼容的机动车辆。通常,需要机动车的品牌,型号和年份(有时可选择内饰和发动机),但这取决于零件或附件以及车辆类别。注:该ProductIdentifier类型供将来使用,因此productFamilyProperties容器是目前指定兼容机动车辆的唯一方法。发生:总是</td> </tr> <tr> <td>compatibleProducts.productFamilyProperties.make</td> <td>string</td> <td>该字段表示车辆的品牌(例如Toyota)。发生:总是</td> </tr> <tr> <td>compatibleProducts.productFamilyProperties.model</td> <td>string</td> <td>该字段表示车辆的型号(例如Camry)。发生:总是</td> </tr> <tr> <td>compatibleProducts.productFamilyProperties.year</td> <td>string</td> <td>该字段表示车辆的年份(例如2016)。发生:总是</td> </tr> <tr> <td>compatibleProducts.productFamilyProperties.trim</td> <td>string</td> <td>该字段表示车辆的纵倾(例如2-door Coupe)。该字段是有条件的,但如果已知/适用,则应提供。发生:有条件的</td> </tr> <tr> <td>compatibleProducts.productFamilyProperties.engine</td> <td>string</td> <td>该字段表示发动机的规格,包括其尺寸,块类型和燃料类型。一个例子是2.7L V6 gas DOHC naturally aspirated。该字段是有条件的,但如果已知/适用,则应提供。发生:有条件的</td> </tr> <tr> <td>compatibleProducts.productIdentifier</td> <td>ProductIdentifier</td> <td>此容器用于createOrReplaceProductCompatibility调用,以识别与库存项目兼容的机动车辆。如果在eBay目录中找到机动车辆,则将自动为车辆填充机动车辆属性(productFamilyProperties中的属性)。此容器不适用于getProductCompatibility调用。无论是产品识别或productFamilyProperties容器(或两者)可用于指定与所述库存项目兼容的一个或多个机动车辆。如果是productIdentifier使用容器时,在该容器中传递的产品标识符必须与易趣目录中的车辆匹配,以便将该车辆添加到兼容的车辆列表中。注:该产品识别类型以供将来使用,所以productFamilyProperties容器是目前指定一个兼容的机动车辆的唯一途径。一旦此类型可供使用,它将仅用于识别易趣目录中的机动车辆。但是,将来可能会将产品兼容性功能扩展到其他(非车辆)产品。发生:NA</td> </tr> <tr> <td>compatibleProducts.productIdentifier.epid</td> <td>string</td> <td>如果卖方已经知道与要添加到兼容产品列表的机动车辆相关联的eBay目录产品ID(ePID),则可以使用该字段。如果在eBay产品目录中找到此eBay目录产品ID,则将自动获取该机动车辆的机动车辆属性(例如制造商,型号,年份,发动机和装饰)。注意:此字段和productIdentifier类型仅供将来使用。出现:NA</td> </tr> <tr> <td>compatibleProducts.productIdentifier.gtin</td> <td>string</td> <td>如果卖方知道要添加到兼容产品列表的机动车辆的全球贸易项目编号,则可以使用该字段。如果在易趣产品目录中找到此GTIN值,则机动车辆属性(例如制造商,型号,年份,发动机和装饰将自动获取该机动车辆。注意:此字段和productIdentifier类型供将来使用只要。出现:NA</td> </tr> <tr> <td>compatibleProducts.productIdentifier.ktype</td> <td>string</td> <td>如果卖方知道要添加到兼容产品列表的机动车辆的K型号,则可以使用该字段。如果在eBay产品目录中找到此K类型值,则将自动获取该机动车辆的机动车辆属性(例如制造商,型号,年份,发动机和纵倾)。只有DE,UK和AU站点支持使用K类型号。注意:此字段和productIdentifier类型仅供将来使用。出现:NA</td> </tr> <tr> <td>compatibleProducts.notes</td> <td>string</td> <td>卖方可选择使用该字段输入与指定的零件兼容性有关的任何注释。卖方可以使用此字段指定零件在车辆上的位置或其他适用信息。只有卖方指定才会返回此字段。最大长度:500发生:有条件的</td> </tr> <tr> <td>sku</td> <td>string</td> <td>这是与兼容车辆相关联的库存项目的卖方定义的SKU值。此字段不适用于createOrReplaceProductCompatibility 调用,但始终使用getProductCompatibility调用返回该字段。对于createOrReplaceProductCompatibility 调用,库存项的SKU值实际上是作为调用URI的一部分传入的,而不是在请求有效负载中传入的。发生:总是</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>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调用?请参阅<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>此调用将检索与特定SKU关联的产品兼容性列表。</p> <h6>Input</h6> <p>将检索其产品兼容性列表的产品的SKU值输入到调用URI的末尾。在这种情况下,产品的SKU值为Al-8730。</p> <p><strong>GET</strong> <a href="https://api.ebay.com/sell/inventory/v1/inventory_item/Al-8730/product_compatibility">https://api.ebay.com/sell/inventory/v1/inventory_item/Al-8730/product_compatibility</a> Output 产品“Al-8730”退回三辆兼容车辆。这三种车辆中的每一种都给出了属性。SKU值也会在响应中返回。</p> <pre><code class="language-json">{ "compatibleProducts": [ { "productFamilyProperties": { "make": "Subaru", "model": "DL", "year": "1982", "trim": "Base Wagon 4-Door", "engine": "1.8L 1781CC H4 GAS SOHC Naturally Aspirated" }, "notes": "Equivalent to AC Delco Alternator" }, { "productFamilyProperties": { "make": "Subaru", "model": "GL", "year": "1983", "trim": "Base Wagon 4-Door", "engine": "1.8L 1781CC H4 GAS OHV Turbocharged" }, "notes": "Equivalent to AC Delco Alternator" }, { "productFamilyProperties": { "make": "Subaru", "model": "DL", "year": "1985", "trim": "Base Wagon 4-Door", "engine": "1.8L 1781CC H4 GAS SOHC Naturally Aspirated" }, "notes": "Equivalent to AC Delco Alternator" }, { "productFamilyProperties": { "make": "Subaru", "model": "GL", "year": "1986", "trim": "Base Wagon 4-Door", "engine": "1.8L 1781CC H4 GAS OHV Naturally Aspirated" }, "notes": "Equivalent to AC Delco Alternator" } ], "sku": "Al-8730" }</code></pre>

页面列表

ITEM_HTML