My Products
Help
lema
CONTRIBUTOR ***

Create project failed by default sub account do not exist

by lema

We try to create a project with the project api, but we always get failed, the api return "Default sub account do not exist" error.

We try to query the sub account first, then set the sub account segment in the create project api, it still failed by same error. 

What should we do to fix this error ? Do we have any document to guid us how to create the project ?

 

lema_0-1688368799098.png

 

lema_1-1688368901018.png

 

 

6 REPLIES 6
Accepted solution
Magnus Johnsen
VISMA

by Magnus Johnsen

Hi,

You need to include all segments of the subaccount:

  "defSub": [
    {
      "segmentId": 1,
      "segmentValue": "00"
    },
{ "segmentId": 2, "segmentValue": "2" } ]

Please try this and let us know if you are still having issues. 

lema
CONTRIBUTOR ***

by lema

I use the update project API to update project, but faild, get "Update of project id is not allowed."  message. as below:

lema_0-1689923417727.png

 

Yıldırım
VISMA

by Yıldırım

Hi, you have InternalID and ProjectID in your PUT (Update) payload, you should only include the fields in the payload that you'd like to update. 

lema
CONTRIBUTOR ***

by lema

Thanks, the project created success, but I want to get the project id so that we can create relation with my data, Please tell me how to get the id of the created project。

Yıldırım
VISMA

by Yıldırım

Hi, you can check the newly created object's ID by looking to Response Header "Location". 

https://community.visma.com/t5/Knowledge-base-in-Developers/How-to-read-recently-created-object-ID-f...

lema
CONTRIBUTOR ***

by lema

Yea, I can get number from response header, I alse have another question, when create the customer,  if the customer number if exist in visma net, it will created faild, but if not exist, the number of created customer in visma net not same as I post customer number, so when visma net has the same customer number but they are not the same customer, it cannot be created successfully.