HomeRecipesAPI ReferenceChangelogDiscussions
Log In
Discussions

Discussions

Ask a Question
Back to All

Issue Assigning Tech to Order in Corrigo API

I'm trying to use the API to create work orders in Corrigo. However, I am unable to assign technicians to the work order.

Do you mind taking a look at this API request and seeing what we can do to actually assign the technician to the order?

POST {base_url}/api/v1/cmd/Workorder/Create
The JSON body is attached.

This request successfully creates a work order, but when I look up that work order, it doesn't have any assignments attached. I've attached the response from querying for that work order after it's created (from {base_url}/v1/query/WorkOrder).

One reason I think there might be a bug in the Corrigo API is that when I submit a work order through the UI (the UI calls this endpoint - {company-specific-url}/corpnet/WorkOrder/WoWizard.aspx/ReviewStep_CreateWorkOrder), it assigns the technician using the misspelled "assigments" key. I've tried changing my API request to use that key but that doesn't work. You may want to look for a naming bug in your code.

Can you please look into whether there is an issue with my request or a bug in the Corrigo API and let me know when you've found something as soon as possible?


{
   "Command" : {
      "WorkOrder" : {
        "Priority": {
            "Id": 2
        },
        "ContactName": "Test Contact",
        "PoNumber": "PO",
        "VendorNte": {
            "CurrencyTypeId": "USD",
            "Value": 500.0000
        },
        "Assignments": [
            {
                "isPrimary": true,
                "employee": {
                    "id": 143
                }
            }
        ],
        "Owner": {
            "Id": 303
        },
        "Items" : [
            {
               "Task" : {
                  "Id" : 14542
               },
               "Asset" : {
                  "Id" : 1223125
               }
            }
        ],
         "TypeCategory" : "Basic",     
         "SubType" : {
            "Id" : 256
         },
         "Customer" : {
            "Id" : 3012
         }
      },
      "ComputeSchedule" : true
   }
}
{
    "Entities": [
        {
            "Data": {
                "Number": "u2342",
                ...
                "Assignments": [],
                ...
            }
        }
    ]
}