Try ERPNext Buy Support Partners Foundation

How to create a custom method and call it using API

How to create a custom method and call it using API.

I need a sample code and explanation.