GET api/BookingPurposes?serviceTypeId={serviceTypeId}

Gets the list of different predefined reasons that a client may be booking a trip for.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
serviceTypeId

Optional service type id to filter booking purposes.

integer

Required

Body Parameters

None.

Response Information

Resource Description

Returns the list of booking purposes (code and name)

Collection of BookingPurpose
NameDescriptionTypeAdditional information
Code

Gets or sets the code that can be used to identify the booking purpose.

string

None.

Name

Gets or sets the friendly name of the booking purpose.

string

None.

Id

Gets or sets the id that can be used to identify the booking purpose

integer

None.

Response Formats

application/json, text/json

Sample:
[
  {
    "code": "Edu",
    "name": "Education",
    "id": null
  },
  {
    "code": "Medical",
    "name": "Medical Reasons",
    "id": null
  },
  {
    "code": "Pers",
    "name": "Personal Reasons",
    "id": null
  },
  {
    "code": "Shop",
    "name": "Shopping",
    "id": null
  },
  {
    "code": "Social",
    "name": "Social Event",
    "id": null
  },
  {
    "code": "Work",
    "name": "Employment Reason",
    "id": null
  }
]

application/xml, text/xml

Sample:
<ArrayOfBookingPurpose xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TS.DR.Resources">
  <BookingPurpose>
    <Code>Edu</Code>
    <Id i:nil="true" />
    <Name>Education</Name>
  </BookingPurpose>
  <BookingPurpose>
    <Code>Medical</Code>
    <Id i:nil="true" />
    <Name>Medical Reasons</Name>
  </BookingPurpose>
  <BookingPurpose>
    <Code>Pers</Code>
    <Id i:nil="true" />
    <Name>Personal Reasons</Name>
  </BookingPurpose>
  <BookingPurpose>
    <Code>Shop</Code>
    <Id i:nil="true" />
    <Name>Shopping</Name>
  </BookingPurpose>
  <BookingPurpose>
    <Code>Social</Code>
    <Id i:nil="true" />
    <Name>Social Event</Name>
  </BookingPurpose>
  <BookingPurpose>
    <Code>Work</Code>
    <Id i:nil="true" />
    <Name>Employment Reason</Name>
  </BookingPurpose>
</ArrayOfBookingPurpose>