eBay文档翻译

eBayAPI文档翻译


getInventoryLocations

<p><strong>GET</strong> /location/</p> <p>此调用将检索与卖方帐户关联的每个库存位置的所有已定义详细信息。此调用没有必需的参数,也没有请求有效负载。但是,有两个可选的查询参数,限制和偏移。该限制的查询参数设置数据的一个页面上返回的库存位置的最大数量,以及偏移查询参数指定的数据返回的页面。这些查询参数将在下面的URI参数表中进行更多讨论。 所述authorizationHTTP标头是该呼叫的唯一所需的请求报头。</p> <p>成功调用将返回HTTP状态值200 OK。</p> <h5>Input</h5> <h6>Resource URI (production)</h6> <pre><code>GET https://api.ebay.com/sell/inventory/v1/location/? offset=integer&amp; limit=integer</code></pre> <h6>URI parameters</h6> <table> <thead> <tr> <th>参数</th> <th>类型</th> <th>描述</th> </tr> </thead> <tbody> <tr> <td>limit</td> <td>integer</td> <td>此查询参数中传递的值设置每页数据返回的最大记录数。虽然此字段是字符串,但此字段中传递的值应为正整数值。如果未设置此查询参数,则每页结果最多返回100条记录。最小:1出现:可选</td> </tr> <tr> <td>offset</td> <td>integer</td> <td>此查询参数中传递的值设置要检索的页码。虽然此字段是字符串,但此字段中传递的值应为等于或大于的整数值0。第一页记录的值为0,第二页记录的值为1,依此类推。如果未设置此查询参数,则其值默认为0,并返回第一页记录。出现:可选</td> </tr> </tbody> </table> <h6>HTTP请求标头</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>流创建的访问令牌,使用以下列表中的一个范围: <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>eBayUser</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">{ "href": "string", "limit": "integer", "locations": [ { "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" }, "locationId": "string" }, "locationAdditionalInformation": "string", "locationInstructions": "string", "locationTypes": [ "StoreTypeEnum" ], "locationWebUrl": "string", "merchantLocationKey": "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" } ] } ] } ], "next": "string", "offset": "integer", "prev": "string", "total": "integer" }</code></pre> <h6>Response fields</h6> <table> <thead> <tr> <th>输入容器/字段</th> <th>类型</th> <th>描述</th> </tr> </thead> <tbody> <tr> <td>href</td> <td>string</td> <td>这是库存位置当前页面的URL。最大长度:2048;发生:总是</td> </tr> <tr> <td>limit</td> <td>integer</td> <td>此整数值是将在每个结果页面上显示的库存位置数。发生:总是</td> </tr> <tr> <td>locations</td> <td>array of InventoryLocationResponse</td> <td>商家库存位置中的一个或多个的阵列。发生:有条件的</td> </tr> <tr> <td>locations.location</td> <td>Location</td> <td>此容器提供库存位置的位置详细信息。该地址容器总是被退回,但不会总是有一个完整的街道地址。除了支持店内分拣库存的库存位置外,在设置库存位置时不需要完整地址。该地理坐标如果商家提供的地理坐标容器才会返回。该locationId场总是返回,但这个值仅被eBay内部使用。发生:必需</td> </tr> <tr> <td>locations.location.address</td> <td>Address</td> <td>该地址容器总是在返回getInventoryLocation / getInventoryLocations电话。除了支持店内分拣库存的库存位置外,在设置库存位置时不需要完整地址。发生:必需</td> </tr> <tr> <td>locations.location.address.addressLine1</td> <td>string</td> <td>街道地址的第一行。对于将持有店内提货库存的商店库存位置,此字段是必需的。如果库存位置未持有店内提货库存,则不需要街道地址。如果为库存位置定义,则将返回此字段。最大长度:128发生:有条件的</td> </tr> <tr> <td>locations.location.address.addressLine2</td> <td>string</td> <td>街道地址的第二行。此字段可用于其他地址信息,例如套房或公寓号。如果库存位置未持有店内提货库存,则不需要街道地址。如果为库存位置定义,则将返回此字段。最大长度:128;发生:有条件的</td> </tr> <tr> <td>locations.location.address.city</td> <td>string</td> <td>库存位置所在的城市。对于将持有店内提货库存的商店库存位置,此字段是必需的。对于仓库位置,此字段在技术上是可选的,因为可以使用postalCode而不是 city / stateOrProvince对,然后城市只是从这个邮政/邮政编码派生。如果为库存位置定义,则返回此字段。最大长度:128发生:有条件的</td> </tr> <tr> <td>locations.location.address.country</td> <td>CountryCodeEnum</td> <td>地址所在的国家/地区,表示为双字母ISO 3166-1 Alpha-2国家/地区代码。例如,US代表美国,DE代表德国。最大长度:2;发生:总是</td> </tr> <tr> <td>locations.location.address.county</td> <td>string</td> <td>地址所在的县。如果为库存位置定义,则返回此字段。发生:有条件的</td> </tr> <tr> <td>locations.location.address.postalCode</td> <td>string</td> <td>地址的邮政编码。易趣使用邮政编码在买家所在地附近展示店内提货物品,并使用邮政编码(原产地和目的地)来估算卖家使用计算出货时的运费。甲城市 / stateOrProvince对可被用来代替一个邮编值,然后将邮递区号距离城市和州/省的。如果为库存位置定义,则返回此字段。最大长度:16发生:有条件的</td> </tr> <tr> <td>locations.location.address.stateOrProvince</td> <td>string</td> <td>库存位置所在的州/省。对于将持有店内提货库存的商店库存位置,此字段是必需的。对于仓库位置,此字段在技术上是可选的,因为可以使用postalCode而不是city / stateOrProvince对,然后州或省只是从此邮政/邮政编码派生。最大长度:128发生:总是</td> </tr> <tr> <td>locations.location.geoCoordinates</td> <td>GeoCoordinates</td> <td>此容器显示库存位置的全球定位系统(GPS)纬度和经度坐标。仅当为库存位置设置地理坐标时,才会返回此容器。发生:有条件的</td> </tr> <tr> <td>locations.location.geoCoordinates.latitude</td> <td>number</td> <td>地理坐标的纬度(南北)分量。如果使用geoCoordinates容器,则此字段是必需的。如果为库存位置设置了地理坐标,则返回此字段。发生:有条件的</td> </tr> <tr> <td>locations.location.geoCoordinates.longitude</td> <td>number</td> <td>地理坐标的经度(东 - 西)分量。如果使用geoCoordinates容器,则此字段是必需的。如果为库存位置设置了地理坐标,则返回此字段。发生:有条件的</td> </tr> <tr> <td>locations.location.locationId</td> <td>string</td> <td>eBay为该位置分配的唯一ID。注意:不应将此字段与卖家定义的merchantLocationKey值混淆。它是merchantLocationKey值,用于在处理库存位置API调用时标识库存位置。该locationId值仅被eBay内部使用。发生:总是</td> </tr> <tr> <td>locations.locationAdditionalInformation</td> <td>string</td> <td>此文本字段提供有关库存位置的其他信息。如果为库存位置设置了此字段,则会返回此字段。最大长度:256;发生:有条件的</td> </tr> <tr> <td>locations.locationInstructions</td> <td>string</td> <td>商家使用该文本字段来为商店位置提供特殊的取件指令。此字段可以帮助为店内提货和点击和收集订单创建愉快和轻松的提货体验。如果未通过createInventoryLocation或updateInventoryLocation调用设置此字段,eBay将使用商家配置文件中包含的默认提货说明。最大长度:1000;发生:有条件的</td> </tr> <tr> <td>locations.locationTypes</td> <td>array of StoreTypeEnum</td> <td>此容器定义库存位置的功能。通常,库存位置将用作商店或仓库,但在某些情况下,库存位置可能都是。如果在商家创建库存位置时未指定位置类型,则库存位置WAREHOUSE的位置类型默认为。发生:总是</td> </tr> <tr> <td>locations.locationWebUrl</td> <td>string</td> <td>此文本字段显示与库存位置关联的网站地址(URL)。如果为库存位置定义,则返回此字段。最大长度:512;发生:有条件的</td> </tr> <tr> <td>locations.merchantLocationKey</td> <td>string</td> <td>库存位置的唯一标识符。当首次使用createInventoryLocation调用创建库存位置时,商家会设置此标识符。为库存位置设置此值后,无法修改该值。最大长度:36;发生:总是</td> </tr> <tr> <td>locations.merchantLocationStatus</td> <td>StatusEnum</td> <td>此字段指示是否已启用库存位置(库存可以加载到位置)或已禁用(库存无法加载到位置)。商家可以使用enableInventoryLocation调用来启用处于禁用状态的库存位置,或使用disableInventoryLocation调用来禁用处于启用状态的库存位置。发生:总是</td> </tr> <tr> <td>locations.name</td> <td>string</td> <td>库存位置的名称。此名称应该是一个人性化的名称,因为它将显示在店内提货和点击和收集列表中。对于商店库存位置,createInventoryLocation调用不需要此字段,但在发布In-Store Pickup和Click and Collect启用的商品之前,商店库存位置必须具有已定义的名称值。因此,如果卖方在createInventoryLocation调用中省略了该字段,则必须稍后通过updateInventoryLocation调用添加该字段。最大长度:1000;发生:有条件的</td> </tr> <tr> <td>locations.operatingHours</td> <td>array of OperatingHours</td> <td>此容器显示一周中某个商店的正常营业时间。将显示商店位置打开的一周中的每一天的dayOfWeekEnum字段和间隔容器。发生:有条件的</td> </tr> <tr> <td>locations.operatingHours.dayOfWeekEnum</td> <td>DayOfWeekEnum</td> <td>一个dayOfWeekEnum值是必需的,这家店的位置有规律的工作时间一周中的每一天。如果为商店位置定义了营业时间,则会返回此字段。发生:必需</td> </tr> <tr> <td>locations.operatingHours.intervals</td> <td>array of Interval</td> <td>此容器用于定义商店工作日的开始和结束时间(在dayOfWeekEnum字段中定义)。一个间隔是需要的存储位置是开放一周的每一天容器。如果商店位置在午餐时间(或白天的任何其他时段)关闭然后重新打开,则需要多个打开和关闭对。如果为商店位置定义了营业时间,则返回此容器。发生:必需</td> </tr> <tr> <td>locations.operatingHours.intervals.close</td> <td>string</td> <td>该接近值实际上是商店关闭的时间。使用当地时间(军事格式)。因此,如果商店在当地时间晚上8点关闭,关闭时间将如下所示:20:00:00。如果使用间隔容器指定商店的工作时间或特殊时间,则有条件地需要此字段。如果为商店位置设置,则返回此字段。发生:必需</td> </tr> <tr> <td>locations.operatingHours.intervals.open</td> <td>string</td> <td>在开放的价值实际上是存储打开的时间。使用当地时间(军事格式)。因此,如果商店在当地时间上午9点开门,关闭时间如下:09:00:00。如果使用间隔容器指定商店的工作时间或特殊时间,则有条件地需要此字段。如果为商店位置设置,则返回此字段。发生:必需</td> </tr> <tr> <td>locations.phone</td> <td>string</td> <td>库存位置的电话号码。通常仅为商店位置设置和返回此字段。最大长度:36;发生:有条件的</td> </tr> <tr> <td>locations.specialHours</td> <td>array of SpecialHours</td> <td>此容器显示特定日期或某个日期的商店位置的特殊营业时间。发生:有条件的</td> </tr> <tr> <td>locations.specialHours.date</td> <td>string</td> <td>甲日期值是必需的商店场所具有特殊的操作小时每个特定日期。日期实际上表示为ISO 8601格式中指定的时间戳,该格式使用24小时协调世界时(UTC)时钟。以下示例显示(1)时间戳的格式,以及(2)ISO 8601格式的示例时间值:格式: yyyy-MM-ddThh:mm:ssZ 示例: 2016-10-19T00:09:00Z 如果为商店位置设置,则返回此字段。发生:有条件的</td> </tr> <tr> <td>locations.specialHours.intervals</td> <td>array of Interval</td> <td>此容器用于定义特定日期(在日期字段中定义)的商店的打开和关闭时间。商店有特殊营业时间的每个特定日期需要一个间隔容器。特定日期的这些特殊营业时间优先于一周中特定日期的正常营业时间。如果商店位置在午餐时间(或白天的任何其他时段)关闭然后重新打开,则需要多个打开和关闭对。如果为商店位置设置,则返回此容器。发生:必需</td> </tr> <tr> <td>locations.specialHours.intervals.close</td> <td>string</td> <td>该接近值实际上是商店关闭的时间。使用当地时间(军事格式)。因此,如果商店在当地时间晚上8点关闭,关闭时间将如下所示:20:00:00。如果使用间隔容器指定商店的工作时间或特殊时间,则有条件地需要此字段。如果为商店位置设置,则返回此字段。发生:必需</td> </tr> <tr> <td>locations.specialHours.intervals.open</td> <td>string</td> <td>在开放的价值实际上是存储打开的时间。使用当地时间(军事格式)。因此,如果商店在当地时间上午9点开门,关闭时间如下:09:00:00。如果使用间隔容器指定商店的工作时间或特殊时间,则有条件地需要此字段。如果为商店位置设置,则返回此字段。发生:必需</td> </tr> <tr> <td>next</td> <td>string</td> <td>这是下一页广告资源位置的网址。仅当有其他库存位置要查看时,才会返回此字段。最大长度:2048;发生:有条件的</td> </tr> <tr> <td>offset</td> <td>integer</td> <td>返回在当前返回的结果集之前跳过的结果集数。如果此值为0,则表示您正在查看第一个结果集。发生:总是</td> </tr> <tr> <td>prev</td> <td>string</td> <td>这是上一页库存位置的URL。仅当存在要查看的先前库存位置时,才会返回此字段。最大长度:2048;发生:有条件的</td> </tr> <tr> <td>total</td> <td>integer</td> <td>返回分页集合中的库存位置总数。发生:有条件的</td> </tr> </tbody> </table> <h6>HTTP status codes</h6> <p>此调用可以返回以下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>204</td> <td>成功</td> </tr> <tr> <td>400</td> <td>错误的请求</td> </tr> <tr> <td>500</td> <td>内部服务器错误</td> </tr> </tbody> </table> <h3>错误代码</h3> <table> <thead> <tr> <th>有关错误的更多信息以及其他常见错误的代码,请参阅<a href="https://developer.ebay.com/api-docs/static/handling-error-messages.html" title="处理错误">处理错误</a>。</th> <th>码</th> <th>域</th> <th>类别</th> <th>含义</th> </tr> </thead> <tbody> <tr> <td>25001</td> <td>API_INVENTORY</td> <td>应用</td> <td>系统错误。{附加信息}</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>卖家可以创建一个或多个库存位置。此调用将返回卖方已设置的所有位置。</p> <h6>Input</h6> <p>此调用不使用请求有效负载。 <strong>GET</strong> <a href="https://api.ebay.com/sell/inventory/v1/location">https://api.ebay.com/sell/inventory/v1/location</a></p> <h6>Output</h6> <p>如果呼叫成功,eBay将返回200状态的HTTP状态代码和卖家位置列表。</p> <pre><code class="language-json">{ "total": 3, "locations": [ { "name": "Warehouse #1", "location": { "locationId": "4392A2371AD16541E054002128D6972A", "address": { "city": "San Jose", "stateOrProvince": "CA", "postalCode": "95125", "country": "US" } }, "merchantLocationStatus": "ENABLED", "locationTypes": [ "WAREHOUSE" ], "merchantLocationKey": "Warehouse-1" }, { "name": "Warehouse #2", "location": { "locationId": "4392A2371AD26541E054002128D6972A", "address": { "city": "Dallas", "stateOrProvince": "TX", "postalCode": "75201", "country": "US" } }, "merchantLocationStatus": "ENABLED", "locationTypes": [ "WAREHOUSE" ], "merchantLocationKey": "Warehouse-2" }, { "name": "Warehouse #3", "location": { "locationId": "4392EE4AC8720011E054002128D6972A", "address": { "city": "New York City", "stateOrProvince": "NY", "postalCode": "10010", "country": "US" } }, "merchantLocationStatus": "DISABLED", "locationTypes": [ "WAREHOUSE" ], "merchantLocationKey": "Warehouse-3" } ] }</code></pre>

页面列表

ITEM_HTML