eBay API GetOrders call not returning all orders as requested

别来无恙 提交于 2019-12-20 05:56:53

问题


I am trying to fetch orders created in a specific period of dates using a php script. This is a most basic request that i am making to ebay:

<?xml version="1.0" encoding="utf-8"?>
<GetOrdersRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<RequesterCredentials>
<eBayAuthToken>[my authentication token]</eBayAuthToken>
</RequesterCredentials>
<CreateTimeFrom>2012-05-10T00:00:00.000Z</CreateTimeFrom>
<CreateTimeTo>2012-05-15T00:00:00.000Z</CreateTimeTo>
</GetOrdersRequest>

Call compatibility level is 773. This same request works fine on the API test tool of ebay but when i use it in my script it returns improper result.
Total number of entries returned are 2648 but the order array contains only 100 orders. Those 100 orders are also not inserted in my database. The insert query returns false. Can anyone tell me what is this difference between Entries and actual orders that are returned by ebay? How can i fetch all of my 2648 orders successfully?


回答1:


You'll need to set the pagination attribute. eBay can only return 100 Orders per Response/Page. For 2648 orders you'll need to do 27 calls.

See eBay documentation for correct syntax:

http://developer.ebay.com/devzone/xml/docs/reference/ebay/GetOrders.html#Request.Pagination



来源:https://stackoverflow.com/questions/10800096/ebay-api-getorders-call-not-returning-all-orders-as-requested

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!