Discussions

Ask a Question
Back to All

Work Item Put

We are working on a range of APIs with an emphasis on GET commands for reporting. We find the try-me very helpful in an array of use cases and always sure this works before proceeding with final scripting logic. I've searched for my specific data entry issue and found no reference. This may be quite an easy issue to resolve.

Update work order...

https://developers.vitruvi.cc/reference/update_wbs_work_order_split

The work items are a required filed of an array of an array. We only use the templated form to try out a first time response.

work_items
array of arrays of numbers
required

The data clearly shows the outcome....


 --data '

{
"work_items": [
[
87432
]
],
"start_date": null,......

We get the following error.

{
"work_items": [
"Incorrect type. Expected pk value, received list."
]
}

Attempted to take the curl command and manipulate the array in array to an array as seen in output for a patch command. However, patch is uncertain use. We would clearly want to update the work order. This error appears specific to the work items no matter the use of other fields in the update command.

General search results in django issues being derived from this error message.

Have a missed a critical piece of the puzzle in clearing this specific API call?

Eric