2.1.3 Error Handling/Validation
Among the request payload, ‘As of date’ and ‘Customer code’ are mandatory to fetch customer metrics details.
The following are the alerts after validation of request payload.
If ‘As of date’ is not included, response from the service will be:
{
"As of Date is mandatory to get customer metrics details"
}
If ‘Customer code’ is not included, response from the service will be:
{
"Customer code is mandatory to get customer metrics details"
}
Rest of the values such as ‘Account No’, ‘Segment Type’ and ‘Segment Type code’ are optional, even though it is empty or not being passed, Response will be having records matched to ‘As of date’ and ‘Customer code’.
If there are no matched records for requested ‘As of date’ and/or ‘Customer code’, response will have relevant alert message as:
{
"There are no details available for the requested customer metrics"
}