eBay API GetOrders调用未按要求返回所有订单 [英] eBay API GetOrders call not returning all orders as requested

查看:448
本文介绍了eBay API GetOrders调用未按要求返回所有订单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用php脚本提取在特定日期范围内创建的订单。这是我向ebay提出的最基本的请求:

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>

通话兼容性级别为773。该请求在ebay的API测试工具上正常工作,但是当我在我的脚本中使用它会返回不正确的结果。

返回的条目总数为2648,但订单数组仅包含100个订单。那100个订单也没有插入我的数据库中。插入查询返回false。谁能告诉我eBay返回的条目和实际订单之间有什么区别?如何才能成功提取所有2648个订单?

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每个响应/页面只能返回100个订单。对于2648个订单,您需要拨打27个电话。

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.

有关正确语法,请参见eBay文档:

See eBay documentation for correct syntax:

< a href = http://developer.ebay.com/devzone/xml/docs/reference/ebay/GetOrders.html#Request.Pagination rel = nofollow> http://developer.ebay.com/devzone/ xml / docs / reference / ebay / GetOrders.html#Request.Pagination

这篇关于eBay API GetOrders调用未按要求返回所有订单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆