GET /passengers

Requests the details of passengers visible to the authenticated user.

Note: This call is currently only available for the Fleet Manager system

Parameters

auth

(required)

The authentication token received in response to the call to POST authentication_credentials or GET authentication_token. Applications should pass the authentication token in the custom "X-auth" HTTP header to avoid passing it in in the query string.

organisation_id

(optional) *

Indicates that only passengers belonging to the specified organisation should be returned. * Required when retrieving data from the Fleet Manager system. Ignored when retrieving data from the X-Drive system.

callback

(optional)

Only available for JSON format. If supplied, the response will use JSONP format with a callback of the given name.

date_format

(optional)

Only available for JSON format. If supplied, the response will contain JSON dates serialized in the specified format. 0 = Timestamp with offset e.g. "\/Date(1346080140000+0500)\/". 2 = ISO8601 e.g. "2012-08-27T15:09:00.0000000+05:00". Applications may pass this parameter in the custom "X-DateFormat" custom HTTP header instead of this query parameter.

globalisation

(optional)

The authenticated user's globalisation preferences as received in response to the call to GET account/profile or in the custom "X-Globalisation" HTTP header returned in response to authenticated calls. Applications should pass this back to the server with every call, either in this parameter, or in the the custom "X-Globalisation" HTTP header if automatic conversion of values is required.

Request Content Type

N/A

Response

Returns a collection of one or more Passenger resources in the requested format.

Response Content Type

application/json, application/javascript (JSONP), application/xml or text/csv as requested

Give It A Try...

Enter appropriate parameter values then click on the link which appears to try the API call...

Note: You must have JavaScript support enabled in your browser to use this feature.

auth

(required)

organisation_id

(optional) *

callback

(optional)

date_format

(optional)

globalisation

(optional)

Response format

 

Request Examples

GET /passengers?auth=e722fa0c702f42b68e2fdb771a80caed
GET /passengers.json?auth=e722fa0c702f42b68e2fdb771a80caed
GET /passengers.xml?auth=e722fa0c702f42b68e2fdb771a80caed
GET /passengers.csv?auth=e722fa0c702f42b68e2fdb771a80caed

Response Examples

JSON body:

[{"SystemType":"FM","PassengerId":"7","OrganisationId":"1","Name":"Adam's Passenger","VehicleCount":12,"DriverCount":3},
{"SystemType":"FM","PassengerId":"37","OrganisationId":"1","Name":"Andrew's Passenger","VehicleCount":2,"DriverCount":0}]

XML body:

<ArrayOfPassenger xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<Passenger SystemType="FM" PassengerId="7">
		<OrganisationId>1</OrganisationId>
		<Name>Adam's Passenger</Name>
		<VehicleCount>12</VehicleCount>
		<DriverCount>3</DriverCount>
	</Passenger>
	<Passenger SystemType="FM" PassengerId="37">
		<OrganisationId>1</OrganisationId>
		<Name>Andrew's Passenger</Name>
		<VehicleCount>2</VehicleCount>
		<DriverCount>0</DriverCount>
	</Passenger>
</ArrayOfPassenger>

CSV body:

SystemType,PassengerId,OrganisationId,Name
FM,7,1,Adam's Passenger
FM,37,1,Andrew's Passenger