HomeRecipesAPI ReferenceChangelogDiscussions
Log In
Discussions

Discussions

Ask a Question
Back to All

400 Error in Workorder Create API

I am getting 400 Error in WO Create API in Postman. Below follows the details,

API : (Post) ...api/v1/cmd/Workorder/Create
Body:
{
"Command" : {
"WorkOrder" : {
"Items" : [
{
"Asset" : {
"Id" : 920
},
"Task" : {
"Id" : 14232
}
}
],
"ContactName" : "Store Manager",
"ContactAddress" : {
"AddrTypeId" : 17,
"Address" : "[email protected]"
},
"TypeCategory" : 4,
"Priority" : {
"Id" : 3
},
"RequestorContact" : {
"Id" : 3
},
"WorkZone" : {
"Id" : 1
},
"SubType" : {
"Id" : 259
},
"Customer" : {
"Id" : 3
}
},
"ComputeSchedule" : true,
"ComputeAssignment" : true,
"EmergencyDisabled" : false,
"Comment" : "Creation Comment here"
},
"RequestId" : "1234"
}

Response :
{
"ErrorMessage": "'body.Command' field is null or empty",
"ErrorCode": "EMPTY_INPUT_PARAMETER",
"TimeStamp": "2022-11-25T06:37:41.1114125Z"
}

I could not find any command field in Body(no mentions of this field in corrigo guide too). What does this command field denote? Also please correct me if anything is wrong in body..