GET api/clients/{clientId}/servicetypes?includeAllAvailable={includeAllAvailable}
Gets the list of different service types that a client can select for their trips.
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
clientId |
ID of the client to get service types for. |
integer |
Required |
includeAllAvailable |
Whether to include all available service types, even ones that aren't explicitly assigned to the client (not applicable if multiple service types is enabled). |
boolean |
Default value is False |
Body Parameters
None.
Response Information
Resource Description
Returns the list of service types (ID, code, name)
Collection of ClientServiceName | Description | Type | Additional information |
---|---|---|---|
ServiceTypeId |
Gets or sets the ID of the service type. |
integer |
None. |
ValidDates |
Gets or sets the list of date ranges during which this service type is valid for the client. |
Collection of ServiceTypeDateWindow |
None. |
IsDefault |
Gets or sets whether this is the default service type for the passenger. |
boolean |
None. |
Response Formats
application/json, text/json
Sample:
[ { "serviceTypeId": 1, "validDates": [ { "fromDate": "2024-12-23", "toDate": "2024-12-23" }, { "fromDate": "2024-12-23", "toDate": "2024-12-23" } ], "isDefault": true }, { "serviceTypeId": 1, "validDates": [ { "fromDate": "2024-12-23", "toDate": "2024-12-23" }, { "fromDate": "2024-12-23", "toDate": "2024-12-23" } ], "isDefault": true } ]
application/xml, text/xml
Sample:
<ArrayOfClientService xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TS.DR.Resources"> <ClientService> <IsDefault>true</IsDefault> <ServiceTypeId>1</ServiceTypeId> <ValidDates> <ServiceTypeDateWindow> <FromDate>2024-12-23T12:33:34.6832893-07:00</FromDate> <ToDate>2024-12-23T12:33:34.6832893-07:00</ToDate> </ServiceTypeDateWindow> <ServiceTypeDateWindow> <FromDate>2024-12-23T12:33:34.6832893-07:00</FromDate> <ToDate>2024-12-23T12:33:34.6832893-07:00</ToDate> </ServiceTypeDateWindow> </ValidDates> </ClientService> <ClientService> <IsDefault>true</IsDefault> <ServiceTypeId>1</ServiceTypeId> <ValidDates> <ServiceTypeDateWindow> <FromDate>2024-12-23T12:33:34.6832893-07:00</FromDate> <ToDate>2024-12-23T12:33:34.6832893-07:00</ToDate> </ServiceTypeDateWindow> <ServiceTypeDateWindow> <FromDate>2024-12-23T12:33:34.6832893-07:00</FromDate> <ToDate>2024-12-23T12:33:34.6832893-07:00</ToDate> </ServiceTypeDateWindow> </ValidDates> </ClientService> </ArrayOfClientService>