Create company - bug group ids

Hi

When creating a company via the API, we try to immediately add certain groups via group Id (group_ids), but it doesn’t work. What am I doing wrong here:

Example:

{
“name”: “JL Tax Test”,
“organisation_form”: “BV”,
“country”: “BE”,
“city”: “9160 Lokeren”,
“street”: “Koekjesstraat 74”,
“file_code”: “0123456789”,
“company_type”: “regular”,
“periods_per_year”: 1,
“account_mapping_list_id”: 5681,
“company_template_id”: 1241,
“vat”: “0123456789”,
“registration_number”: “0123456789”,
“vat_number”: “0123456789”,
“visible_for_contributors”: false,
“currency”: “EUR”,
“group_ids”: [8628, 11468],
“year_end”: “2025-12-31”
}

I’ve also tried to pass one groupId, tried between single and double quotes, and without brackets (for one). Can you help me out?

PS: the company is being created, so that’s no issue, only the group isn’t added.

Thanks!

Kind regards

Jelle

Hi Jelle,

The creation of the company (or update of a company) via API, has no direct parameter to add the company a specific group.

You’ll have to make use of the group endpoint to add that newly created company to those groups using this endpoint:

You’ll have to repeat that request for each group in which you want to add the company, which will grant all users that are in the group access to that company.

Hopefully that helps!

Let me know if anything is unclear.

Jelle

Ok that’s clear, thanks Jelle!