This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
ors-soap-api:public:soap_header [2015/02/22 17:12] admin |
ors-soap-api:public:soap_header [2023/03/08 12:39] (current) admin |
||
---|---|---|---|
Line 12: | Line 12: | ||
* ''sid'' : session ID. This __ID must be unique__ for each user on your page because it is used for filtering and sorting of returned results | * ''sid'' : session ID. This __ID must be unique__ for each user on your page because it is used for filtering and sorting of returned results | ||
* ''limits'' : to set maximum number of search results per page. Use 'p' for limit offers and 't' to limit trips (see example to understand the usage) | * ''limits'' : to set maximum number of search results per page. Use 'p' for limit offers and 't' to limit trips (see example to understand the usage) | ||
- | * **Maximum limit** for offers is 30 results per page | + | * **Maximum limit** for offers ... there is no limit (default: 1000 per page) ... 0=all found objects |
- | * **Maximum limit** for trips is 500 results per page | + | * **Maximum limit** for trips is 10000 results per page (default: 1000) ... 0=100000 |
* ''xuser'' : user id for data export credentials | * ''xuser'' : user id for data export credentials | ||
* ''xpass'' : user password for data export credentials | * ''xpass'' : user password for data export credentials | ||
- | **Usage:** | + | ===== Usage: ===== |
Here is an example for setting ''$header'' array with [[demo_licence|demo licence]] information. | Here is an example for setting ''$header'' array with [[demo_licence|demo licence]] information. | ||
Line 24: | Line 24: | ||
$header = array( | $header = array( | ||
'lang' => 'en', // a return language | 'lang' => 'en', // a return language | ||
- | 'usr' => 'xmldemo', // ORSXML user | + | 'usr' => 'xmldemo102', // ORSXML user |
- | 'pass' => 'orsdemo', // ORSXML password | + | 'pass' => 'orsdemogh1', // ORSXML password |
'agid' => '5780', // agency ID (or account id) | 'agid' => '5780', // agency ID (or account id) | ||
'sid' => session_id(), // this is required so that filtering and sorting works correctly! | 'sid' => session_id(), // this is required so that filtering and sorting works correctly! | ||
Line 31: | Line 31: | ||
); | ); | ||
</code> | </code> | ||
+ | |||
+ | ===== Using API-KEY: ===== | ||
+ | |||
+ | If you have received apikey for your API licence, then you need to put api-key attribute in header array: | ||
+ | |||
+ | <code php> | ||
+ | // ORSXML header information (using api-key | ||
+ | $header = array( | ||
+ | 'lang' => 'en', // a return language | ||
+ | 'api-key'=> 'your-apikey-here' | ||
+ | 'usr' => '', // no longer needed | ||
+ | 'pass' => '', // no longer needed | ||
+ | 'agid' => '', // no longer needed | ||
+ | 'sid' => session_id(), // this is required so that filtering and sorting works correctly! | ||
+ | 'limits' => 'p:6,t:50', // set limits (6 offers per page and 50 trips per page) | ||
+ | ); | ||
+ | </code> | ||
+ |