我正在构建一个渠道管理器,我盯着agoda看。我需要提高价格和库存。我知道我需要以XML
的形式推送数据。
如何向EndPoint发送XML
字符串?例如,如果端点是
https://sandbox-distribution-xml.agoda.com/api/ari?apiKey=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
1)什么是apikey
,可以从哪里获取?
2)如何向EndPoint发送XML
?(参数)
示例XML
是,
<?xml version="1.0" encoding="UTF-8"?>
<request timestamp="23232931804" type="1">
<criteria property_id="1949542">
<inventory>
<update room_id="5478687">
<date_range from="2015-10-01" to="2015-10-10">
<dow>1</dow>
<dow>2</dow>
<dow>3</dow>
<dow>4</dow>
<dow>5</dow>
<dow>6</dow>
<dow>7</dow>
</date_range>
<allotment>9</allotment>
<restrictions>
<closed>false</closed>
<ctd>false</ctd>
<cta>true</cta>
</restrictions>
</update>
</inventory>
</criteria>
</request>
发布于 2019-03-04 17:22:50
(1)的答案是,你必须在https://partners.agoda.com上注册,然后你才能自动验证你的网站(在几个方面,我记得至少有两个:在你的HTML代码中添加一个元标签,或者上传一个他们在你的域名上给你的HTML文件)。
(2)的答案稍微复杂一些,它可能在过去几年中发生了变化,但它实际上取决于您正在使用的编程语言。如果是PHP,那么您可能需要检查curl命令。
https://stackoverflow.com/questions/35915191
复制相似问题