Hi, Guys:
I need to expose an api to a third party, but they have requirements for the format of the api.
My original api is /api/method/expnext_extension.api.customer.retrieval
, and the third party’s requirement is /api/retrieval
.
I added the following definition to expnext_extension/hooks.py
:
api_routes = [
{
"from_route": "/api/retrieval",
"to_route": "expnext_extension.api.customer.retrieval",
"methods": ["POST"],
}
]
But it doesn’t work.
Is there any other way? How should I do it?