Contractor Assigned Cost Centers always returns empty array
Posted: Wed Jul 17, 2024 5:09 am
I am trying to retrieve all cost centers assigned to a contractor.
Im using the end point {{baseUrl}}/api/v1.0/companies/:companyID/contractors/:contractorID
The response always returms an empty array of cost centers even if there are ones assigned ie. AssignedCostCenters is always [].
"DateCreated": "2024-04-03T11:05:31+11:00",
"DateModified": "2024-07-17T14:52:06+10:00",
"Archived": false,
"AssignedCostCenters": [],
"Zones": [],
"DefaultZone": {},
"DefaultCompany": {
"ID": 2,
But when i login to SimPro gui.. the contractor does indeed have cost centers. I have tried adding/removing some via the guy and then calling API again.. but can never get anything returned other than an empty array.
build is https://mpeelec.simprosuite.com
contractor is in company 3... contractorID 1596
As a side note... Zone's is also empty all the time in bodies returned from the API.. but this contractor has every state assigned to them in the GUI.
Please advise whats going on
Im using the end point {{baseUrl}}/api/v1.0/companies/:companyID/contractors/:contractorID
The response always returms an empty array of cost centers even if there are ones assigned ie. AssignedCostCenters is always [].
"DateCreated": "2024-04-03T11:05:31+11:00",
"DateModified": "2024-07-17T14:52:06+10:00",
"Archived": false,
"AssignedCostCenters": [],
"Zones": [],
"DefaultZone": {},
"DefaultCompany": {
"ID": 2,
But when i login to SimPro gui.. the contractor does indeed have cost centers. I have tried adding/removing some via the guy and then calling API again.. but can never get anything returned other than an empty array.
build is https://mpeelec.simprosuite.com
contractor is in company 3... contractorID 1596
As a side note... Zone's is also empty all the time in bodies returned from the API.. but this contractor has every state assigned to them in the GUI.
Please advise whats going on