Who can explain to me what is the API sending principle of actions in GPTS and how does it interact with the API?

Who can explain to me what is the API sending principle of actions in GPTS and how does it interact with the API?
If I want to use gpts to complete a warehouse management system, how should I define my API? And how can I normalize my JSON?