POST api/ExchangeRates/Add

Request Information

URI Parameters

None.

Body Parameters

AddExchangeRateBindingModel
NameDescriptionTypeAdditional information
EffectiveDate

date

Required

Value

decimal number

Required

CurrencyFromId

string

Required

String length: inclusive between 0 and 3

CurrencyToId

string

Required

String length: inclusive between 0 and 3

Request Formats

application/json, text/json

Sample:
{
  "EffectiveDate": "2025-06-26T13:09:30.1121427+00:00",
  "Value": 2.0,
  "CurrencyFromId": "sample string 3",
  "CurrencyToId": "sample string 4"
}

application/xml, text/xml

Sample:
<AddExchangeRateBindingModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TripPlannerAPI.Models.DTO">
  <CurrencyFromId>sample string 3</CurrencyFromId>
  <CurrencyToId>sample string 4</CurrencyToId>
  <EffectiveDate>2025-06-26T13:09:30.1121427+00:00</EffectiveDate>
  <Value>2</Value>
</AddExchangeRateBindingModel>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

ExchangeRateViewModel
NameDescriptionTypeAdditional information
Id

integer

None.

EffectiveDate

date

None.

Value

decimal number

None.

CurrencyFromId

string

None.

CurrencyToId

string

None.

Response Formats

application/json, text/json

Sample:
{
  "Id": 1,
  "EffectiveDate": "2025-06-26T13:09:30.1121427+00:00",
  "Value": 3.0,
  "CurrencyFromId": "sample string 4",
  "CurrencyToId": "sample string 5"
}

application/xml, text/xml

Sample:
<ExchangeRateViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TripPlannerAPI.Models.DTO">
  <CurrencyFromId>sample string 4</CurrencyFromId>
  <CurrencyToId>sample string 5</CurrencyToId>
  <EffectiveDate>2025-06-26T13:09:30.1121427+00:00</EffectiveDate>
  <Id>1</Id>
  <Value>3</Value>
</ExchangeRateViewModel>