You are on page 1of 2

API Documentation For PR no – 1471

modification on the valuationCRUD post method add_valuation_details

added access check for posting the valuation details.

Description: this api is used to add the valuation details using the dealer_id,
user_id ,dealer info.

Modification: initially anybody could have post the valuation details. Added
check on this that only the user whose dealer_id matches with the table and its
isActive flag is true then only he can add the valuation details.

Api endpoint: http://127.0.0.1:8000/api/valuation

headers:
Authorization : Token 1e4c3ffcbe399bf7353a94b77c69b401af0511c3

Body:

{
"dealer_info_id": 21671,
"name": "Test Valuations",
"dealer_id":53049
}

if the user doesn’t have access to the add valuation then the response :

{
"message": "You don't have access to perform this action"
}
if the user has access then the details will be saved in the database.

You might also like