I have 2 mysql tables operator and operator_details, also a relation: Operator has many OperatorDetails
I would like to know if i can use the /operator
POST API to store data in these table in a single API request by posting data like this:
{
"operator_name": "Morton",
"route_from": "Location A",
"route_to": "Location B",
"operator_details": [
{
"driver_name": "Jack",
"driver_mobile_number": "1234567890"
},
{
"driver_name": "Donald",
"driver_mobile_number": "1234567890"
}
]
}
Along with maintaining the relation between the tables.