- URL:
/user/:country
- Method:
GET
- URL Params:
country=[string]
(required)
- Success Response:
- Code: 200
- Content:
{
"FirstName": "John",
"LastName": "Doe",
"Gender": "male",
"Email": "[email protected]",
"Phone": "123-456-7890",
"Address": {
"Street": "123 Main St",
"City": "Anytown",
"State": "Anystate",
"Zip": "12345"
}
}
- Error Response:
- Code: 404 NOT FOUND
- Content:
{
"status": "error",
"message": "Country not found"
}
- Code: 500 INTERNAL SERVER ERROR
- Content:
{
"status": "error",
"message": "Internal server error"
}
curl -X GET "http://localhost:3000/user/US"
{
"FirstName": "John",
"LastName": "Doe",
"Gender": "male",
"Email": "[email protected]",
"Phone": "123-456-7890",
"Address": {
"Street": "123 Main St",
"City": "Anytown",
"State": "Anystate",
"Zip": "12345"
}
}