Create new Records in Products throuth api

Hello i would like to add new Records of Products into my Tryton over a API.
I have read the Articel in the Manual “User Application — trytond latest documentation” and had build successful interfaces.

Now i am trying to add an Api to the Products Module, so i can add new Records by an interface. But i cant find the Function i need to manipulate to achieve it.
When i look into the product.py file i found some Functions but the don t make sense to me.
Did some tried something like this? How do modules write Information into the Database?

Thank you to all Answers

There is some code in the timesheet module that creates / updates timesheet lines using an API defined for use by User Applications: modules/timesheet: d5bd5090b474 routes.py

You should be able to do something similar, but for products instead of timesheet lines.

User aplications are for token based autentication APIs.

It is also possible to use the plain JSON-RPC API with standar authentication (user/password+session). This way you can directly call the create method of the product model without requiring to develop any custom code on server side.

thank you all for your answers. I try the option with JSON-RPC and will post my results.

The only think i dont unterstand is how to create the payload for the JSON_RPC. The documentation is a bit empty.
Here is an example of my python code :

   url = "http://www.xxxx.de:48000/training2/"

    payload = {
        "jsonrpc": "2.0",
        "method": "common.db.login",
        "params": { 'kiri': 'kiri', 'password':'password'}, "id":3}

    print(payload)
    response = requests.post(url, json=payload)

    print(str(response))

i get 500 oder 401

Tryton is using version 1.0 from the JSON-RPC spec.
Take a look at Log in with external script fails You have there two examples:

  1. complete external script where you need to make your JSON-RPC request yourself
  2. use Proteus