REST API: Auto-create project ref?

Hi!

I’m playing around with the REST API and I’m facing a problem I can’t solve by myself.

I want to create a project by API call, which is working. But I have to give a ref by myself. I want Dolibarr to give a ref based on the defined rules automatically. When creating a client, it works this way:

{
“name”: “xxx”,
“client”: “1”,
“code_client”: “auto”
}

But trying “ref”: “auto” on projects, it will result in a project with ref “auto”.

Someone has a hint for me?

1 Like

What if you looked at what generates the REF inside the Dolibarr GUI and made a change to the code behind the API to generate a REF if one was not supplied in the API call?

1 Like