eBay文档翻译

eBayAPI文档翻译


createInventoryLocation

<h3>createInventoryLocation</h3> <p>POST /location/{merchantLocationKey}</p> <p>使用此调用可以创建新的库存位置。为了创建和发布报价(并创建易趣列表),卖家必须至少有一个库存位置,因为每个报价必须与一个位置相关联。</p> <p>在首次创建库存位置时,仅需要卖方定义的位置标识符和物理位置,并且一旦设置,就不能更改这些值。唯一标识符值(merchantLocationKey)在调用URI的末尾传入。此merchantLocationKey值将用于其他库存位置调用,以标识要执行操作的库存位置。</p> <p>目前,位置类型是仓库或商店。仓库位置用于传统运输,商店位置通常由美国商家通过店内提货程序销售产品使用,或由英国,澳大利亚和德国商家通过点击和收集程序销售产品使用。商店库存位置需要完整地址。但是,对于仓库库存位置,不需要完整的街道地址,但必须提供该地点的城市,州/省和国家/地区。</p> <p>请注意,是“已启用”所有库存位置默认在创建时,你必须明确禁用它们(由值传递DISABLED的merchantLocationStatus场),如果你希望它们被设置为禁用状态。卖方的库存无法加载到处于禁用状态的库存位置。</p> <p>除了authorization所有eBay REST API调用所需的标头之外,下表还包括另一个对createInventoryLocation调用必需的请求标头,以及另外两个可选的请求标头:</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> <p>输入 资源URI(生产) POST <a href="https://api.ebay.com/sell/inventory/v1/location/{merchantLocationKey">https://api.ebay.com/sell/inventory/v1/location/{merchantLocationKey</a>}</p> <p>URI参数</p> <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> <p>HTTP请求标头 对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>打开其余请求组件页面以获取详细信息 OAuth范围 此请求需要使用<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> <h4>Request payload</h4> <pre><code>{ "location": { "address": { "addressLine1": "string", "addressLine2": "string", "city": "string", "country": "CountryCodeEnum : [AD,AE,AF,AG,AI,AL,AM,AN,AO,AQ,AR,AS,AT,AU,AW,AX,AZ,BA,BB,BD,BE,BF,BG,BH,BI,BJ,BL,BM,BN,BO,BQ,BR,BS,BT,BV,BW,BY,BZ,CA,CC,CD,CF,CG,CH,CI,CK,CL,CM,CN,CO,CR,CU,CV,CW,CX,CY,CZ,DE,DJ,DK,DM,DO,DZ,EC,EE,EG,EH,ER,ES,ET,FI,FJ,FK,FM,FO,FR,GA,GB,GD,GE,GF,GG,GH,GI,GL,GM,GN,GP,GQ,GR,GS,GT,GU,GW,GY,HK,HM,HN,HR,HT,HU,ID,IE,IL,IM,IN,IO,IQ,IR,IS,IT,JE,JM,JO,JP,KE,KG,KH,KI,KM,KN,KP,KR,KW,KY,KZ,LA,LB,LC,LI,LK,LR,LS,LT,LU,LV,LY,MA,MC,MD,ME,MF,MG,MH,MK,ML,MM,MN,MO,MP,MQ,MR,MS,MT,MU,MV,MW,MX,MY,MZ,NA,NC,NE,NF,NG,NI,NL,NO,NP,NR,NU,NZ,OM,PA,PE,PF,PG,PH,PK,PL,PM,PN,PR,PS,PT,PW,PY,QA,RE,RO,RS,RU,RW,SA,SB,SC,SD,SE,SG,SH,SI,SJ,SK,SL,SM,SN,SO,SR,ST,SV,SX,SY,SZ,TC,TD,TF,TG,TH,TJ,TK,TL,TM,TN,TO,TR,TT,TV,TW,TZ,UA,UG,UM,US,UY,UZ,VA,VC,VE,VG,VI,VN,VU,WF,WS,YE,YT,ZA,ZM,ZW]", "county": "string", "postalCode": "string", "stateOrProvince": "string" }, "geoCoordinates": { "latitude": "number", "longitude": "number" } }, "locationAdditionalInformation": "string", "locationInstructions": "string", "locationTypes": [ "StoreTypeEnum" ], "locationWebUrl": "string", "merchantLocationStatus": "StatusEnum : [DISABLED,ENABLED]", "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> <h4>Request fields</h4> <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> <h3>Output</h3> <p>HTTP响应标头 此调用没有响应标头。 响应负载 此调用没有有效负载。 响应字段 此调用没有字段定义。 HTTP状态代码 此调用可以返回以下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>Status</th> <th>Meaning</th> </tr> </thead> <tbody> <tr> <td>204</td> <td>No Content</td> </tr> <tr> <td>400</td> <td>Bad Request</td> </tr> <tr> <td>409</td> <td>Location Already Exists</td> </tr> <tr> <td>500</td> <td>Internal Server Error</td> </tr> </tbody> </table> <h3>错误代码</h3> <p>有关错误的更多信息以及其他常见错误的代码,请参阅<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>25803</td> <td>API_INVENTORY</td> <td>请求</td> <td>{fieldName}已存在。</td> </tr> <tr> <td>25804</td> <td>API_INVENTORY</td> <td>请求</td> <td>输入错误。{附加信息}</td> </tr> </tbody> </table> <p>样品 新的API调用?请参阅拨打电话。</p> <p>注意:这些样本中的标识符(例如订单ID或用户ID)和个人数据可能是匿名的,或者在eBay上可能不再有效。如有必要,请在您的请求中替换当前相关的eBay数据。</p> <p>示例1:创建一个位置 使用此操作可配置卖方可用于跟踪其库存中物料存储的仓库和商店位置。 输入 在此调用中, 将独特的卖家定义的<strong>merchantLocationKey</strong>作为路径参数。</p> <p>POST <a href="https://api.ebay.com/sell/inventory/v1/location/warehouse-1">https://api.ebay.com/sell/inventory/v1/location/warehouse-1</a></p> <pre><code>{ "location": { "address": { "addressLine1": "2055 Hamilton Ave", "addressLine2": "Building 3", "city": "San Jose", "stateOrProvince": "CA", "postalCode": "95125", "country": "US" } }, "locationInstructions": "Items ship from here.", "name": "Warehouse-1", "merchantLocationStatus": "ENABLED", "locationTypes": [ "WAREHOUSE" ] }</code></pre> <p>Output 该请求没有响应体<br /> If successful, this call returns an empty payload and an HTTP</p>

页面列表

ITEM_HTML