# Use SOAPCLIENT API

**URL:** <https://discussions.flightaware.com/t/use-soapclient-api/20254>\
**Category:** AeroAPI\
**Created:** [July 11, 2017, 6:40am UTC](https://discussions.flightaware.com/t/use-soapclient-api/20254 "2017-07-11T06:40:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![LeParisBeauvais](https://avatars.discourse-cdn.com/v4/letter/l/a183cd/32.png) [@LeParisBeauvais](https://discussions.flightaware.com/u/LeParisBeauvais)\
**Post date:** [July 11, 2017, 6:40am UTC](https://discussions.flightaware.com/t/use-soapclient-api/20254/1 "2017-07-11T06:40:23Z")

</div>

I use this code for AirlineFlightSchedules

$options = array(  
‘trace’ =\> true,  
‘exceptions’ =\> 0,  
‘login’ =\> ‘user’,  
‘password’ =\> ‘apikey’,  
);  
$client = new SoapClient(‘[https://flightxml.flightaware.com/soap/FlightXML2/wsdl](https://flightxml.flightaware.com/soap/FlightXML2/wsdl)’, $options);

```
	// get the weather.
	$params = array(
		"startDate" => 1499644800, 
		"endDate" => 1499731199 ,
		"origin" => "BVA",
		"destination"	=>"PSA"
		);
	$result = $client->Scheduled($params);

```

But return eror 500, what’s the problem?  
thanks 😐🙂

---

<div class="post-metadata">

**Author:** ![conej730](https://sea1.discourse-cdn.com/flex019/user_avatar/discussions.flightaware.com/conej730/32/122980_2.png) [@conej730](https://discussions.flightaware.com/u/conej730)\
**Post date:** [July 14, 2017, 6:59pm UTC](https://discussions.flightaware.com/t/use-soapclient-api/20254/2 "2017-07-14T18:59:16Z")

</div>

For the Scheduled method, the allowed query parameters are airport, filter, howMany, offset. So you’d need to change your query params to something like this:

```auto

$params = array(
"airport" => "KIAH", 
"howMany" => 25 ,
"offset" => 0
);

```
