POST api/trips/search

Searches for a trip using multiple pieces of information.

Request Information

URI Parameters

None.

Body Parameters

The information to use to look up the client.

TripSearchRequest
NameDescriptionTypeAdditional information
ClientId

Gets or sets clientId to search trips against

integer

None.

StartDate

Gets or sets trip start date

date

None.

EndDate

Gets or sets trip end date

date

None.

TripIds

Gets or sets trip ids

Collection of integer

None.

Location

Gets or sets location to search trips against

Location

None.

Request Formats

application/json, text/json

Sample:
{
  "clientId": 1,
  "startDate": "2021-06-24T03:11:52.8260152-06:00",
  "endDate": "2021-06-24T03:11:52.8260152-06:00",
  "tripIds": [
    1,
    2
  ],
  "location": {
    "id": 1,
    "description": "sample string 1",
    "category": "sample string 2",
    "name": "sample string 3",
    "latitude": 1.1,
    "longitude": 1.1,
    "streetNumber": "sample string 4",
    "onStreet": "sample string 5",
    "atStreet": "sample string 6",
    "city": "sample string 7",
    "state": "sample string 8",
    "postalCode": "sample string 9",
    "itemType": 0,
    "internalType": 0,
    "unit": "sample string 10",
    "comments": "sample string 11",
    "isGeocoded": true,
    "contact": {
      "id": 1,
      "referenceId": "sample string 2",
      "contactType": "sample string 3",
      "firstName": "sample string 4",
      "lastName": "sample string 5",
      "comments": "sample string 6",
      "details": [
        {
          "id": 1,
          "contactString": "sample string 2",
          "type": {
            "code": "sample string 1",
            "name": "sample string 2",
            "type": 0
          },
          "isPreferred": true
        },
        {
          "id": 1,
          "contactString": "sample string 2",
          "type": {
            "code": "sample string 1",
            "name": "sample string 2",
            "type": 0
          },
          "isPreferred": true
        }
      ]
    },
    "country": "sample string 13",
    "stopCode": "sample string 14"
  }
}

application/xml, text/xml

Sample:
<TripSearchRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TS.DR.Resources">
  <ClientId>1</ClientId>
  <EndDate>2021-06-24T03:11:52.8260152-06:00</EndDate>
  <Location>
    <AtStreet>sample string 6</AtStreet>
    <Category>sample string 2</Category>
    <City>sample string 7</City>
    <Comments>sample string 11</Comments>
    <Contact>
      <Comments>sample string 6</Comments>
      <ContactType>sample string 3</ContactType>
      <Details>
        <ContactDetail>
          <ContactString>sample string 2</ContactString>
          <ID>1</ID>
          <Type>
            <Code>sample string 1</Code>
            <Name>sample string 2</Name>
            <Type>Phone</Type>
          </Type>
        </ContactDetail>
        <ContactDetail>
          <ContactString>sample string 2</ContactString>
          <ID>1</ID>
          <Type>
            <Code>sample string 1</Code>
            <Name>sample string 2</Name>
            <Type>Phone</Type>
          </Type>
        </ContactDetail>
      </Details>
      <FirstName>sample string 4</FirstName>
      <ID>1</ID>
      <LastName>sample string 5</LastName>
      <ReferenceId>sample string 2</ReferenceId>
    </Contact>
    <Country>sample string 13</Country>
    <Description>sample string 1</Description>
    <ID>1</ID>
    <InternalType>Location</InternalType>
    <IsGeocoded>true</IsGeocoded>
    <ItemType>Location</ItemType>
    <Latitude>1.1</Latitude>
    <Longitude>1.1</Longitude>
    <Name>sample string 3</Name>
    <OnStreet>sample string 5</OnStreet>
    <PostalCode>sample string 9</PostalCode>
    <State>sample string 8</State>
    <StopCode>sample string 14</StopCode>
    <StreetNumber>sample string 4</StreetNumber>
    <Unit>sample string 10</Unit>
  </Location>
  <StartDate>2021-06-24T03:11:52.8260152-06:00</StartDate>
  <TripIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>1</d2p1:int>
    <d2p1:int>2</d2p1:int>
  </TripIds>
</TripSearchRequest>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

Returns the trips matches all of the given conditions.

Collection of TripLite
NameDescriptionTypeAdditional information
ClientId

Gets or sets client Id

integer

None.

BookingId

Gets or sets booking Id

integer

None.

Date

Gets or sets booking date

date

None.

ScheduleStatus

Gets or sets booking schedule status

TripStatusCode

None.

ProviderId

Gets or sets booking provider Id

integer

None.

ServiceTypeId

Get sor sets booking service type Id

integer

None.

PickupLeg

Gets or sets booking pickup Leg details

TripLegLite

None.

DropoffLeg

Gets or sets booking dropoff Leg details

TripLegLite

None.

Response Formats

application/json, text/json

Sample:
[
  {
    "clientId": 1,
    "bookingId": 2,
    "date": "2021-06-24T03:11:52.8320169-06:00",
    "scheduleStatus": 0,
    "providerId": 1,
    "serviceTypeId": 1,
    "pickupLeg": {
      "bookingId": 1,
      "address": {
        "name": "sample string 1",
        "streetNumber": "sample string 2",
        "onStreet": "sample string 3",
        "atStreet": "sample string 4",
        "city": "sample string 5",
        "state": "sample string 6",
        "postalCode": "sample string 7",
        "unit": "sample string 8",
        "latitude": 1.1,
        "longitude": 1.1
      },
      "requestedTime": "00:00:00.1234567",
      "requestedLate": "00:00:00.1234567",
      "requestedEarly": "00:00:00.1234567"
    },
    "dropoffLeg": {
      "bookingId": 1,
      "address": {
        "name": "sample string 1",
        "streetNumber": "sample string 2",
        "onStreet": "sample string 3",
        "atStreet": "sample string 4",
        "city": "sample string 5",
        "state": "sample string 6",
        "postalCode": "sample string 7",
        "unit": "sample string 8",
        "latitude": 1.1,
        "longitude": 1.1
      },
      "requestedTime": "00:00:00.1234567",
      "requestedLate": "00:00:00.1234567",
      "requestedEarly": "00:00:00.1234567"
    }
  },
  {
    "clientId": 1,
    "bookingId": 2,
    "date": "2021-06-24T03:11:52.8320169-06:00",
    "scheduleStatus": 0,
    "providerId": 1,
    "serviceTypeId": 1,
    "pickupLeg": {
      "bookingId": 1,
      "address": {
        "name": "sample string 1",
        "streetNumber": "sample string 2",
        "onStreet": "sample string 3",
        "atStreet": "sample string 4",
        "city": "sample string 5",
        "state": "sample string 6",
        "postalCode": "sample string 7",
        "unit": "sample string 8",
        "latitude": 1.1,
        "longitude": 1.1
      },
      "requestedTime": "00:00:00.1234567",
      "requestedLate": "00:00:00.1234567",
      "requestedEarly": "00:00:00.1234567"
    },
    "dropoffLeg": {
      "bookingId": 1,
      "address": {
        "name": "sample string 1",
        "streetNumber": "sample string 2",
        "onStreet": "sample string 3",
        "atStreet": "sample string 4",
        "city": "sample string 5",
        "state": "sample string 6",
        "postalCode": "sample string 7",
        "unit": "sample string 8",
        "latitude": 1.1,
        "longitude": 1.1
      },
      "requestedTime": "00:00:00.1234567",
      "requestedLate": "00:00:00.1234567",
      "requestedEarly": "00:00:00.1234567"
    }
  }
]

application/xml, text/xml

Sample:
<ArrayOfTripLite xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TS.DR.Resources">
  <TripLite>
    <BookingId>2</BookingId>
    <ClientId>1</ClientId>
    <Date>2021-06-24T03:11:52.8320169-06:00</Date>
    <DropoffLeg>
      <Address>
        <AtStreet>sample string 4</AtStreet>
        <City>sample string 5</City>
        <Latitude>1.1</Latitude>
        <Longitude>1.1</Longitude>
        <Name>sample string 1</Name>
        <OnStreet>sample string 3</OnStreet>
        <PostalCode>sample string 7</PostalCode>
        <State>sample string 6</State>
        <StreetNumber>sample string 2</StreetNumber>
        <Unit>sample string 8</Unit>
      </Address>
      <BookingId>1</BookingId>
      <RequestedEarly>PT0.1234567S</RequestedEarly>
      <RequestedLate>PT0.1234567S</RequestedLate>
      <RequestedTime>PT0.1234567S</RequestedTime>
    </DropoffLeg>
    <PickupLeg>
      <Address>
        <AtStreet>sample string 4</AtStreet>
        <City>sample string 5</City>
        <Latitude>1.1</Latitude>
        <Longitude>1.1</Longitude>
        <Name>sample string 1</Name>
        <OnStreet>sample string 3</OnStreet>
        <PostalCode>sample string 7</PostalCode>
        <State>sample string 6</State>
        <StreetNumber>sample string 2</StreetNumber>
        <Unit>sample string 8</Unit>
      </Address>
      <BookingId>1</BookingId>
      <RequestedEarly>PT0.1234567S</RequestedEarly>
      <RequestedLate>PT0.1234567S</RequestedLate>
      <RequestedTime>PT0.1234567S</RequestedTime>
    </PickupLeg>
    <ProviderId>1</ProviderId>
    <ScheduleStatus>Unscheduled</ScheduleStatus>
    <ServiceTypeId>1</ServiceTypeId>
  </TripLite>
  <TripLite>
    <BookingId>2</BookingId>
    <ClientId>1</ClientId>
    <Date>2021-06-24T03:11:52.8320169-06:00</Date>
    <DropoffLeg>
      <Address>
        <AtStreet>sample string 4</AtStreet>
        <City>sample string 5</City>
        <Latitude>1.1</Latitude>
        <Longitude>1.1</Longitude>
        <Name>sample string 1</Name>
        <OnStreet>sample string 3</OnStreet>
        <PostalCode>sample string 7</PostalCode>
        <State>sample string 6</State>
        <StreetNumber>sample string 2</StreetNumber>
        <Unit>sample string 8</Unit>
      </Address>
      <BookingId>1</BookingId>
      <RequestedEarly>PT0.1234567S</RequestedEarly>
      <RequestedLate>PT0.1234567S</RequestedLate>
      <RequestedTime>PT0.1234567S</RequestedTime>
    </DropoffLeg>
    <PickupLeg>
      <Address>
        <AtStreet>sample string 4</AtStreet>
        <City>sample string 5</City>
        <Latitude>1.1</Latitude>
        <Longitude>1.1</Longitude>
        <Name>sample string 1</Name>
        <OnStreet>sample string 3</OnStreet>
        <PostalCode>sample string 7</PostalCode>
        <State>sample string 6</State>
        <StreetNumber>sample string 2</StreetNumber>
        <Unit>sample string 8</Unit>
      </Address>
      <BookingId>1</BookingId>
      <RequestedEarly>PT0.1234567S</RequestedEarly>
      <RequestedLate>PT0.1234567S</RequestedLate>
      <RequestedTime>PT0.1234567S</RequestedTime>
    </PickupLeg>
    <ProviderId>1</ProviderId>
    <ScheduleStatus>Unscheduled</ScheduleStatus>
    <ServiceTypeId>1</ServiceTypeId>
  </TripLite>
</ArrayOfTripLite>