My Products
Help
SierdW
PARTNER

Error creating project transaction document

by SierdW (Updated ‎27-01-2023 16:32 by SierdW PARTNER )

We are trying to create a ProjectTransaction using the ProjectTransaction endpoint from the swagger (after our own implementation failed)

 

Scenario 1: 

Empty ProjectTransaction with just a description succeeds.

 

{
"description": {
"value": "test"
}
}

 

Result: Http/201

 

Scenario 2:

ProjectTransaction with just one line with existing values:

 

{
  "description": {
    "value": "test"
  },
  "lines": [
   "project": { "value": "23.22639" },
   "projectTask": { "value": "SA" },
   "accountGroup": { "value": "501" }
   ]
}

 

Result: Http/500:

 

{
  "message": "VismaId: 5bd51537-c330-494e-9f18-acc361017e15. Error creating project transaction document. Value cannot be null.\r\nParameter name: projectTransactionDocumentUpdateDto"
}

 

 

Are we doing something wrong or is the endpoint broken?

1 REPLY 1
Accepted solution
SierdW
PARTNER

by SierdW

Update from my side: it works now, I made the following modifications:

 

  • My lines array was incorrect formatted
  • I missed the branch on the line
  • I missed the operation on the line
  • I missed the date on the line
  • I missed the financialperiod on the line

 

The following message was succesfully posted:

{
  "description": {
    "value": "test"
  },
  "lines": [{
   "operation": "Insert",
   "branch":{"value":"10"},
   "project": { "value": "23.22639" },
   "projectTask": { "value": "SA" },
   "accountGroup": { "value": "501" },
   "date":{"value": "2023-01-15"},
   "financialPeriod":{"value": "202301"}
   }
   ]
}