POST Boat/SaveBoat

Request Information

URI Parameters

None.

Body Parameters

BoatModel
NameDescriptionTypeAdditional information
ID

integer

None.

UserID

integer

None.

BoatType

integer

None.

DeparturePoint

integer

None.

CabinCount

integer

None.

Captain

boolean

None.

DailyPrice

decimal number

None.

Note

string

None.

Title

string

None.

Capacity

integer

None.

WeeklyDiscount

integer

None.

MonthlyDiscount

integer

None.

MinimumRentDay

integer

None.

IsRentLongTerm

boolean

None.

AvailableStartDate

date

None.

AvailableEndDate

date

None.

Services

Collection of integer

None.

Request Formats

application/json, text/json

Sample:
{
  "ID": 1,
  "UserID": 2,
  "BoatType": 1,
  "DeparturePoint": 1,
  "CabinCount": 1,
  "Captain": true,
  "DailyPrice": 1.0,
  "Note": "sample string 3",
  "Title": "sample string 4",
  "Capacity": 1,
  "WeeklyDiscount": 1,
  "MonthlyDiscount": 1,
  "MinimumRentDay": 1,
  "IsRentLongTerm": true,
  "AvailableStartDate": "2025-11-08T13:21:07.7105157+03:00",
  "AvailableEndDate": "2025-11-08T13:21:07.7105157+03:00",
  "Services": [
    1,
    2
  ]
}

application/xml, text/xml

Sample:
<Boat.BoatModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RentekerAPIProject.Models">
  <AvailableEndDate>2025-11-08T13:21:07.7105157+03:00</AvailableEndDate>
  <AvailableStartDate>2025-11-08T13:21:07.7105157+03:00</AvailableStartDate>
  <BoatType>1</BoatType>
  <CabinCount>1</CabinCount>
  <Capacity>1</Capacity>
  <Captain>true</Captain>
  <DailyPrice>1</DailyPrice>
  <DeparturePoint>1</DeparturePoint>
  <ID>1</ID>
  <IsRentLongTerm>true</IsRentLongTerm>
  <MinimumRentDay>1</MinimumRentDay>
  <MonthlyDiscount>1</MonthlyDiscount>
  <Note>sample string 3</Note>
  <Services xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>1</d2p1:int>
    <d2p1:int>2</d2p1:int>
  </Services>
  <Title>sample string 4</Title>
  <UserID>2</UserID>
  <WeeklyDiscount>1</WeeklyDiscount>
</Boat.BoatModel>

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 'BoatModel'.

Response Information

Resource Description

ApiResponseWithID
NameDescriptionTypeAdditional information
ID

integer

None.

Success

boolean

None.

Message

string

None.

Response Formats

application/json, text/json

Sample:
{
  "ID": 1,
  "Success": true,
  "Message": "sample string 3"
}

application/xml, text/xml

Sample:
<Boat.ApiResponseWithID xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RentekerAPIProject.Models">
  <ID>1</ID>
  <Message>sample string 3</Message>
  <Success>true</Success>
</Boat.ApiResponseWithID>