eBay API GetOrders call not returning all orders a

2020-05-07 18:37发布

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?

标签: ebay-api
1条回答
beautiful°
2楼-- · 2020-05-07 18:55

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

查看更多
登录 后发表回答