POST api/tour/basket/calculate

Request Information

URI Parameters

None.

Body Parameters

CalculateOwnTourRequest
NameDescriptionTypeAdditional information
TourId

string

None.

AdditionalServices

Collection of AdditionalTourServiceBookings

None.

Tariffs

Collection of TourTariffInfoSelection

None.

Request Formats

application/json, text/json

Sample:
{
  "TourId": "sample string 1",
  "AdditionalServices": [
    {
      "ServiceId": 1,
      "Quantity": 2,
      "ServiceVariantPriceId": 1
    },
    {
      "ServiceId": 1,
      "Quantity": 2,
      "ServiceVariantPriceId": 1
    }
  ],
  "Tariffs": [
    {
      "TariffId": 1,
      "SelectedCount": 2
    },
    {
      "TariffId": 1,
      "SelectedCount": 2
    }
  ]
}

application/xml, text/xml

Sample:
<CalculateOwnTourRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Mag.TourGate.TourGateWebClient.Areas.Tour.Models.Dto">
  <AdditionalServices>
    <AdditionalTourServiceBookings>
      <Quantity>2</Quantity>
      <ServiceId>1</ServiceId>
      <ServiceVariantPriceId>1</ServiceVariantPriceId>
    </AdditionalTourServiceBookings>
    <AdditionalTourServiceBookings>
      <Quantity>2</Quantity>
      <ServiceId>1</ServiceId>
      <ServiceVariantPriceId>1</ServiceVariantPriceId>
    </AdditionalTourServiceBookings>
  </AdditionalServices>
  <Tariffs>
    <TourTariffInfoSelection>
      <SelectedCount>2</SelectedCount>
      <TariffId>1</TariffId>
    </TourTariffInfoSelection>
    <TourTariffInfoSelection>
      <SelectedCount>2</SelectedCount>
      <TariffId>1</TariffId>
    </TourTariffInfoSelection>
  </Tariffs>
  <TourId>sample string 1</TourId>
</CalculateOwnTourRequest>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'CalculateOwnTourRequest'.

Response Information

Resource Description

CalculateOwnTourResponse
NameDescriptionTypeAdditional information
TourId

string

None.

Price

decimal number

None.

ActiveQuota

integer

None.

Tariffs

Collection of TourTariffInfo

None.

BasePrice

decimal number

None.

ResultQueryInfo

Сообщения

ResultQueryInfoContainer

None.

Response Formats

application/json, text/json

Sample:
{
  "TourId": "sample string 1",
  "Price": 2.0,
  "ActiveQuota": 3,
  "Tariffs": [
    {
      "TariffId": 1,
      "TariffName": "sample string 2",
      "SelectedCount": 3,
      "AdultCount": 4,
      "ChildCount": 5,
      "ChildAgeSince": 6,
      "ChildAgeFor": 7,
      "Netto": 8.0,
      "Brutto": 9.0,
      "Commission": 10.0,
      "Charge": 11.0
    },
    {
      "TariffId": 1,
      "TariffName": "sample string 2",
      "SelectedCount": 3,
      "AdultCount": 4,
      "ChildCount": 5,
      "ChildAgeSince": 6,
      "ChildAgeFor": 7,
      "Netto": 8.0,
      "Brutto": 9.0,
      "Commission": 10.0,
      "Charge": 11.0
    }
  ],
  "BasePrice": 4.0,
  "RedirectUrl": "sample string 5",
  "ResultQueryInfo": {
    "ResultsCount": 1,
    "HasError": false,
    "Info": [],
    "CacheStorageTimeEnd": true,
    "RefreshPeriod": 0,
    "DelFromCacheDateTime": "2024-11-23T17:09:25.100651+03:00",
    "UserMessages": "",
    "UserMessagesHtml": ""
  }
}

application/xml, text/xml

Sample:
<CalculateOwnTourResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Mag.TourGate.TourGateWebClient.Areas.Tour.Models.Dto">
  <RedirectUrl xmlns="http://schemas.datacontract.org/2004/07/Mag.TourGate.TourGateWebClient.Models.Common.Contract">sample string 5</RedirectUrl>
  <ResultQueryInfo xmlns="http://schemas.datacontract.org/2004/07/Mag.TourGate.TourGateWebClient.Models.Common.Contract">
    <_x003C_DelFromCacheDateTime_x003E_k__BackingField>2024-11-23T17:09:25.100651+03:00</_x003C_DelFromCacheDateTime_x003E_k__BackingField>
    <_x003C_ResultsCount_x003E_k__BackingField>1</_x003C_ResultsCount_x003E_k__BackingField>
    <info />
  </ResultQueryInfo>
  <ActiveQuota>3</ActiveQuota>
  <BasePrice>4</BasePrice>
  <Price>2</Price>
  <Tariffs>
    <TourTariffInfo>
      <AdultCount>4</AdultCount>
      <Brutto>9</Brutto>
      <Charge>11</Charge>
      <ChildAgeFor>7</ChildAgeFor>
      <ChildAgeSince>6</ChildAgeSince>
      <ChildCount>5</ChildCount>
      <Commission>10</Commission>
      <Netto>8</Netto>
      <SelectedCount>3</SelectedCount>
      <TariffId>1</TariffId>
      <TariffName>sample string 2</TariffName>
    </TourTariffInfo>
    <TourTariffInfo>
      <AdultCount>4</AdultCount>
      <Brutto>9</Brutto>
      <Charge>11</Charge>
      <ChildAgeFor>7</ChildAgeFor>
      <ChildAgeSince>6</ChildAgeSince>
      <ChildCount>5</ChildCount>
      <Commission>10</Commission>
      <Netto>8</Netto>
      <SelectedCount>3</SelectedCount>
      <TariffId>1</TariffId>
      <TariffName>sample string 2</TariffName>
    </TourTariffInfo>
  </Tariffs>
  <TourId>sample string 1</TourId>
</CalculateOwnTourResponse>