POST Car/Create

Request Information

URI Parameters

None.

Body Parameters

CarRequest
NameDescriptionTypeAdditional information
user_name

string

None.

user_surname

string

None.

user_email

string

None.

user_phone

string

None.

user_id

integer

None.

brand_id

integer

None.

model_id

integer

None.

year

integer

None.

fuel_type

string

None.

transmission_type

string

None.

car_type

integer

None.

daily_price

integer

None.

plate

string

None.

km

string

None.

note

string

None.

weekly_rent_discount

integer

None.

monthly_rent_discount

integer

None.

min_rent_day

integer

None.

is_long_term

integer

None.

is_approved

boolean

None.

is_available_date_start

date

None.

is_available_date_end

date

None.

Request Formats

application/json, text/json

Sample:
{
  "user_name": "sample string 1",
  "user_surname": "sample string 2",
  "user_email": "sample string 3",
  "user_phone": "sample string 4",
  "user_id": 1,
  "brand_id": 1,
  "model_id": 1,
  "year": 1,
  "fuel_type": "sample string 5",
  "transmission_type": "sample string 6",
  "car_type": 1,
  "daily_price": 1,
  "plate": "sample string 7",
  "km": "sample string 8",
  "note": "sample string 9",
  "weekly_rent_discount": 1,
  "monthly_rent_discount": 10,
  "min_rent_day": 1,
  "is_long_term": 1,
  "is_approved": true,
  "is_available_date_start": "2025-11-08T13:18:34.8148087+03:00",
  "is_available_date_end": "2025-11-08T13:18:34.8148087+03:00"
}

application/xml, text/xml

Sample:
<CarRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RentekerAPIProject.Controllers">
  <brand_id>1</brand_id>
  <car_type>1</car_type>
  <daily_price>1</daily_price>
  <fuel_type>sample string 5</fuel_type>
  <is_approved>true</is_approved>
  <is_available_date_end>2025-11-08T13:18:34.8148087+03:00</is_available_date_end>
  <is_available_date_start>2025-11-08T13:18:34.8148087+03:00</is_available_date_start>
  <is_long_term>1</is_long_term>
  <km>sample string 8</km>
  <min_rent_day>1</min_rent_day>
  <model_id>1</model_id>
  <monthly_rent_discount>10</monthly_rent_discount>
  <note>sample string 9</note>
  <plate>sample string 7</plate>
  <transmission_type>sample string 6</transmission_type>
  <user_email>sample string 3</user_email>
  <user_id>1</user_id>
  <user_name>sample string 1</user_name>
  <user_phone>sample string 4</user_phone>
  <user_surname>sample string 2</user_surname>
  <weekly_rent_discount>1</weekly_rent_discount>
  <year>1</year>
</CarRequest>

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

Response Information

Resource Description

CarResponse
NameDescriptionTypeAdditional information
success

boolean

None.

message

string

None.

car_id

integer

None.

user_id

integer

None.

user_name

string

None.

user_surname

string

None.

user_email

string

None.

user_phone

string

None.

year

integer

None.

brand_id

integer

None.

model_id

integer

None.

brand_name

string

None.

model_name

string

None.

min_recomendation_price

integer

None.

max_recomendation_price

integer

None.

fuel_type

string

None.

transmission_type

string

None.

car_type

integer

None.

daily_price

decimal number

None.

plate

string

None.

km

string

None.

note

string

None.

weekly_rent_discount

integer

None.

monthly_rent_discount

integer

None.

min_rent_day

integer

None.

is_active

boolean

None.

is_approved

boolean

None.

is_commercial

boolean

None.

is_long_term

integer

None.

is_available_date_start

date

None.

is_available_date_end

date

None.

carAddPhotos

Collection of CarAddPhotos

None.

carAvailableLocations

Collection of CarAvailableLocation

None.

carDeliveryTimes

Collection of DeliveryTime

None.

carComments

Collection of CarComments

None.

Response Formats

application/json, text/json

Sample:
{
  "success": true,
  "message": "sample string 2",
  "car_id": 3,
  "user_id": 1,
  "user_name": "sample string 4",
  "user_surname": "sample string 5",
  "user_email": "sample string 6",
  "user_phone": "sample string 7",
  "year": 1,
  "brand_id": 1,
  "model_id": 1,
  "brand_name": "sample string 8",
  "model_name": "sample string 9",
  "min_recomendation_price": 1,
  "max_recomendation_price": 1,
  "fuel_type": "sample string 10",
  "transmission_type": "sample string 11",
  "car_type": 1,
  "daily_price": 1.0,
  "plate": "sample string 12",
  "km": "sample string 13",
  "note": "sample string 14",
  "weekly_rent_discount": 1,
  "monthly_rent_discount": 1,
  "min_rent_day": 1,
  "is_active": true,
  "is_approved": true,
  "is_commercial": true,
  "is_long_term": 1,
  "is_available_date_start": "2025-11-08T13:18:34.8303877+03:00",
  "is_available_date_end": "2025-11-08T13:18:34.8303877+03:00",
  "carAddPhotos": [
    {
      "ID": 1,
      "car_id": 1,
      "photo_path": "sample string 2",
      "photo_type": 1
    },
    {
      "ID": 1,
      "car_id": 1,
      "photo_path": "sample string 2",
      "photo_type": 1
    }
  ],
  "carAvailableLocations": [
    {
      "ID": 1,
      "adv_id": 1,
      "address": "sample string 2",
      "city": "sample string 3",
      "district": "sample string 4",
      "latitude": 1.1,
      "longitude": 1.1
    },
    {
      "ID": 1,
      "adv_id": 1,
      "address": "sample string 2",
      "city": "sample string 3",
      "district": "sample string 4",
      "latitude": 1.1,
      "longitude": 1.1
    }
  ],
  "carDeliveryTimes": [
    {
      "ID": 1,
      "delivery_type": "sample string 2",
      "car_id": 1,
      "start_time": "00:00:00.1234567",
      "end_time": "00:00:00.1234567"
    },
    {
      "ID": 1,
      "delivery_type": "sample string 2",
      "car_id": 1,
      "start_time": "00:00:00.1234567",
      "end_time": "00:00:00.1234567"
    }
  ],
  "carComments": [
    {
      "ID": 1,
      "CarID": 1,
      "CommentedBy": 1,
      "RentID": 1,
      "Comment": "sample string 2",
      "Point": 1,
      "Status": 1,
      "CreatedDate": "2025-11-08T13:18:34.8303877+03:00"
    },
    {
      "ID": 1,
      "CarID": 1,
      "CommentedBy": 1,
      "RentID": 1,
      "Comment": "sample string 2",
      "Point": 1,
      "Status": 1,
      "CreatedDate": "2025-11-08T13:18:34.8303877+03:00"
    }
  ]
}

application/xml, text/xml

Sample:
<CarResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RentekerAPIProject.Controllers">
  <brand_id>1</brand_id>
  <brand_name>sample string 8</brand_name>
  <carAddPhotos xmlns:d2p1="http://schemas.datacontract.org/2004/07/RentekerAPIProject">
    <d2p1:CarAddPhotos>
      <d2p1:ID>1</d2p1:ID>
      <d2p1:car_id>1</d2p1:car_id>
      <d2p1:photo_path>sample string 2</d2p1:photo_path>
      <d2p1:photo_type>1</d2p1:photo_type>
    </d2p1:CarAddPhotos>
    <d2p1:CarAddPhotos>
      <d2p1:ID>1</d2p1:ID>
      <d2p1:car_id>1</d2p1:car_id>
      <d2p1:photo_path>sample string 2</d2p1:photo_path>
      <d2p1:photo_type>1</d2p1:photo_type>
    </d2p1:CarAddPhotos>
  </carAddPhotos>
  <carAvailableLocations xmlns:d2p1="http://schemas.datacontract.org/2004/07/RentekerAPIProject">
    <d2p1:CarAvailableLocation>
      <d2p1:ID>1</d2p1:ID>
      <d2p1:address>sample string 2</d2p1:address>
      <d2p1:adv_id>1</d2p1:adv_id>
      <d2p1:city>sample string 3</d2p1:city>
      <d2p1:district>sample string 4</d2p1:district>
      <d2p1:latitude>1.1</d2p1:latitude>
      <d2p1:longitude>1.1</d2p1:longitude>
    </d2p1:CarAvailableLocation>
    <d2p1:CarAvailableLocation>
      <d2p1:ID>1</d2p1:ID>
      <d2p1:address>sample string 2</d2p1:address>
      <d2p1:adv_id>1</d2p1:adv_id>
      <d2p1:city>sample string 3</d2p1:city>
      <d2p1:district>sample string 4</d2p1:district>
      <d2p1:latitude>1.1</d2p1:latitude>
      <d2p1:longitude>1.1</d2p1:longitude>
    </d2p1:CarAvailableLocation>
  </carAvailableLocations>
  <carComments xmlns:d2p1="http://schemas.datacontract.org/2004/07/RentekerAPIProject">
    <d2p1:CarComments>
      <d2p1:CarID>1</d2p1:CarID>
      <d2p1:Comment>sample string 2</d2p1:Comment>
      <d2p1:CommentedBy>1</d2p1:CommentedBy>
      <d2p1:CreatedDate>2025-11-08T13:18:34.8303877+03:00</d2p1:CreatedDate>
      <d2p1:ID>1</d2p1:ID>
      <d2p1:Point>1</d2p1:Point>
      <d2p1:RentID>1</d2p1:RentID>
      <d2p1:Status>1</d2p1:Status>
    </d2p1:CarComments>
    <d2p1:CarComments>
      <d2p1:CarID>1</d2p1:CarID>
      <d2p1:Comment>sample string 2</d2p1:Comment>
      <d2p1:CommentedBy>1</d2p1:CommentedBy>
      <d2p1:CreatedDate>2025-11-08T13:18:34.8303877+03:00</d2p1:CreatedDate>
      <d2p1:ID>1</d2p1:ID>
      <d2p1:Point>1</d2p1:Point>
      <d2p1:RentID>1</d2p1:RentID>
      <d2p1:Status>1</d2p1:Status>
    </d2p1:CarComments>
  </carComments>
  <carDeliveryTimes xmlns:d2p1="http://schemas.datacontract.org/2004/07/RentekerAPIProject">
    <d2p1:DeliveryTime>
      <d2p1:ID>1</d2p1:ID>
      <d2p1:car_id>1</d2p1:car_id>
      <d2p1:delivery_type>sample string 2</d2p1:delivery_type>
      <d2p1:end_time>PT0.1234567S</d2p1:end_time>
      <d2p1:start_time>PT0.1234567S</d2p1:start_time>
    </d2p1:DeliveryTime>
    <d2p1:DeliveryTime>
      <d2p1:ID>1</d2p1:ID>
      <d2p1:car_id>1</d2p1:car_id>
      <d2p1:delivery_type>sample string 2</d2p1:delivery_type>
      <d2p1:end_time>PT0.1234567S</d2p1:end_time>
      <d2p1:start_time>PT0.1234567S</d2p1:start_time>
    </d2p1:DeliveryTime>
  </carDeliveryTimes>
  <car_id>3</car_id>
  <car_type>1</car_type>
  <daily_price>1</daily_price>
  <fuel_type>sample string 10</fuel_type>
  <is_active>true</is_active>
  <is_approved>true</is_approved>
  <is_available_date_end>2025-11-08T13:18:34.8303877+03:00</is_available_date_end>
  <is_available_date_start>2025-11-08T13:18:34.8303877+03:00</is_available_date_start>
  <is_commercial>true</is_commercial>
  <is_long_term>1</is_long_term>
  <km>sample string 13</km>
  <max_recomendation_price>1</max_recomendation_price>
  <message>sample string 2</message>
  <min_recomendation_price>1</min_recomendation_price>
  <min_rent_day>1</min_rent_day>
  <model_id>1</model_id>
  <model_name>sample string 9</model_name>
  <monthly_rent_discount>1</monthly_rent_discount>
  <note>sample string 14</note>
  <plate>sample string 12</plate>
  <success>true</success>
  <transmission_type>sample string 11</transmission_type>
  <user_email>sample string 6</user_email>
  <user_id>1</user_id>
  <user_name>sample string 4</user_name>
  <user_phone>sample string 7</user_phone>
  <user_surname>sample string 5</user_surname>
  <weekly_rent_discount>1</weekly_rent_discount>
  <year>1</year>
</CarResponse>