POST api/tradein/add
This operation for add new trade-in. Require at least "TRADE-IN TYPE" and "Valuation Amount". If a Trade-in creation is successful, response is tradeId otherwise, response is error message.
Request Information
Body Parameters
TradeIn_Input| Name | Description | Type | Additional information |
|---|---|---|---|
| KeyId |
Key Id is reference column link to the deal |
string |
None. |
| TradeValuationId |
Reference trade valuation id |
string |
None. |
| BookedInDate |
Booked In Date |
string |
None. |
| DisposalDate |
Disposal Date |
string |
None. |
| RetailOrWholsale |
Retail Or Wholesale Or Lost |
string |
None. |
| SoldTo |
Sold To |
string |
None. |
| Adjustment |
Adjustment |
decimal number |
None. |
| TradeInType |
TRADE-IN TYPE (Model Descrtption) |
string |
Required |
| RegoTrade |
Rego - Trade |
string |
None. |
| StockNo |
Stock Number |
string |
None. |
| KM |
Trade-in KM |
string |
None. |
| Valuer |
Valuer |
string |
None. |
| Amount |
Valuation Amount |
decimal number |
None. |
| Payout |
Payout |
decimal number |
None. |
| InStockAmount |
In Stock Amount |
decimal number |
None. |
| Load1 |
Load |
decimal number |
None. |
| Load2 |
Load2 |
decimal number |
None. |
| Load3 |
Load3 |
decimal number |
None. |
| SaleAmount |
Sale Amount |
decimal number |
None. |
| TotalProfit |
Total Profit |
decimal number |
None. |
| ContractAmount |
Contract Amount |
decimal number |
None. |
| PayoutTo |
Payout To |
string |
None. |
| Yearbuilt |
Year built |
string |
None. |
| Make |
Make |
string |
None. |
| ValuationDate |
Valuation Date |
string |
None. |
| WholesaleComments |
Wholesale Comments |
string |
None. |
| TradeinVin |
Trade-in Vin |
string |
None. |
Request Formats
application/json, text/json
{
"KeyId": "sample string 1",
"TradeValuationId": "sample string 2",
"BookedInDate": "sample string 3",
"DisposalDate": "sample string 4",
"RetailOrWholsale": "sample string 5",
"SoldTo": "sample string 6",
"Adjustment": 1.0,
"TradeInType": "sample string 7",
"RegoTrade": "sample string 8",
"StockNo": "sample string 9",
"KM": "sample string 10",
"Valuer": "sample string 11",
"Amount": 1.0,
"Payout": 1.0,
"InStockAmount": 1.0,
"Load1": 1.0,
"Load2": 1.0,
"Load3": 1.0,
"SaleAmount": 1.0,
"TotalProfit": 1.0,
"ContractAmount": 1.0,
"PayoutTo": "sample string 12",
"Yearbuilt": "sample string 13",
"Make": "sample string 14",
"ValuationDate": "sample string 15",
"WholesaleComments": "sample string 16",
"TradeinVin": "sample string 17"
}
application/xml, text/xml
<TradeIn_Input xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SaleslogsRESTService.Controllers"> <Adjustment>1</Adjustment> <Amount>1</Amount> <BookedInDate>sample string 3</BookedInDate> <ContractAmount>1</ContractAmount> <DisposalDate>sample string 4</DisposalDate> <InStockAmount>1</InStockAmount> <KM>sample string 10</KM> <KeyId>sample string 1</KeyId> <Load1>1</Load1> <Load2>1</Load2> <Load3>1</Load3> <Make>sample string 14</Make> <Payout>1</Payout> <PayoutTo>sample string 12</PayoutTo> <RegoTrade>sample string 8</RegoTrade> <RetailOrWholsale>sample string 5</RetailOrWholsale> <SaleAmount>1</SaleAmount> <SoldTo>sample string 6</SoldTo> <StockNo>sample string 9</StockNo> <TotalProfit>1</TotalProfit> <TradeInType>sample string 7</TradeInType> <TradeValuationId>sample string 2</TradeValuationId> <TradeinVin>sample string 17</TradeinVin> <ValuationDate>sample string 15</ValuationDate> <Valuer>sample string 11</Valuer> <WholesaleComments>sample string 16</WholesaleComments> <Yearbuilt>sample string 13</Yearbuilt> </TradeIn_Input>
application/x-www-form-urlencoded
Sample not available.
Response Information
ResponseTradeInMessage| Name | Description | Type | Additional information |
|---|---|---|---|
| status |
Return status (True or False) |
boolean |
None. |
| message |
Return error description. |
string |
None. |
| tradeInId |
Return Unique key of trade-in. |
string |
None. |
Response Formats
application/json, text/json
{
"status": true,
"message": "sample string 2",
"tradeInId": "sample string 3"
}
application/xml, text/xml
<ResponseTradeInMessage xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SaleslogsRESTService.Models"> <message>sample string 2</message> <status>true</status> <tradeInId>sample string 3</tradeInId> </ResponseTradeInMessage>