POST api/clients/{clientId}/trips/fareEstimate

Calculate the fare for a client's trip.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
clientId

The client id.

integer

Required

Body Parameters

The trip to calculate the fare for.

Trip
NameDescriptionTypeAdditional information
IsAppointment

Gets or sets whether the trip is appointment type.

boolean

None.

Pickup

TripLeg

None.

Dropoff

TripLeg

None.

Date

date

None.

ClientID

integer

None.

MobilityAidCodes

Collection of string

None.

AdditionalPassengers

Collection of Passenger

None.

BookingPurposeCode

string

None.

BookingSubtypeCode

string

None.

ID

integer

None.

ItineraryID

integer

None.

CallbackPhoneNumber

string

None.

ServiceTypeId

integer

None.

Provider

TripProviderInfo

None.

UserDefinedFields

Dictionary of string [key] and Object [value]

None.

Comments

string

None.

DirectDistance

decimal number

None.

FundingProgramIds

Collection of integer

None.

SubscriptionId

integer

None.

Request Formats

application/json, text/json, application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

The information about hte fare

FareInfo
NameDescriptionTypeAdditional information
FareToCollect

The fare to collect.

decimal number

None.

PassengerFares

The fares for each passenger.

Collection of PassengerFare

None.

BookingId

Booking Id which belongs to this Fare Info

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "fareToCollect": 1.1,
  "passengerFares": [
    {
      "passengerType": {
        "code": "sample string 1",
        "name": "sample string 2",
        "defaultSpaceType": "sample string 3",
        "fareTypeId": 4
      },
      "spaceTypeCode": "sample string 1",
      "fareTypeId": 1,
      "fare": 2.1
    },
    {
      "passengerType": {
        "code": "sample string 1",
        "name": "sample string 2",
        "defaultSpaceType": "sample string 3",
        "fareTypeId": 4
      },
      "spaceTypeCode": "sample string 1",
      "fareTypeId": 1,
      "fare": 2.1
    }
  ],
  "bookingId": 2
}

application/xml, text/xml

Sample:
<FareInfo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TS.DR.Resources">
  <BookingId>2</BookingId>
  <FareToCollect>1.1</FareToCollect>
  <PassengerFares>
    <PassengerFare>
      <Fare>2.1</Fare>
      <FareTypeId>1</FareTypeId>
      <PassengerType>
        <Code>sample string 1</Code>
        <DefaultSpaceType>sample string 3</DefaultSpaceType>
        <FareTypeId>4</FareTypeId>
        <Name>sample string 2</Name>
      </PassengerType>
      <SpaceTypeCode>sample string 1</SpaceTypeCode>
    </PassengerFare>
    <PassengerFare>
      <Fare>2.1</Fare>
      <FareTypeId>1</FareTypeId>
      <PassengerType>
        <Code>sample string 1</Code>
        <DefaultSpaceType>sample string 3</DefaultSpaceType>
        <FareTypeId>4</FareTypeId>
        <Name>sample string 2</Name>
      </PassengerType>
      <SpaceTypeCode>sample string 1</SpaceTypeCode>
    </PassengerFare>
  </PassengerFares>
</FareInfo>