Page 1 of 1

How to determine Job ID from WorkOrder details payload

Posted: Wed May 28, 2025 3:31 am
by jp85
Hi,

I am given a Work Order ID and can retrieve its details by hitting the end point /api/v1.0/companies/{companyID}/contractorJobs/{contractorJobID}

The payload returned does not contain any information as to which Job this work order is for.
I can see there is a "_href" field at the very bottom of the payload that contains the job id.. but surly there is not the expectation that i need to parse that URL to extract the job number?

Example below for Work Order 12572... the parent job id is 72157.. but no fields in the payload contain this value.

_href: /api/v1.0/companies/2/jobs/72157/sections/72336/costCenters/76323/contractorJobs/12572

Further to this... once i have the parent Job ID.. i want to retrieve all work orders and purchase orders under the parent job. I dont see any API end points that allow me to obtain a list of all purchase orders for a given job. Are you able to advise how I could achieve this?

I found the following end point which is not documented on the API site but is contained within the postman project {{baseUrl}}/api/v1.0/companies/:companyID/jobs/:jobID/sections/:sectionID/costCenters/:costCenterID/contractorJobs/
it does the job of getting all WO's

But what about PO's... how do I list all them within a job?
I can see {{baseUrl}}/api/v1.0/companies/:companyID/jobs/:jobID/sections/:sectionID/costCenters/:costCenterID/stock/

but that lists each of the items within the orders.. it dosnt give me the actual PO ids.

Re: How to determine Job ID from WorkOrder details payload

Posted: Fri May 30, 2025 5:39 am
by SimproAPITeam
Hi,
By following the URL you get all details on the contractor job and allows you to update or delete.

The same endpoint without the Iast ID shows you all contractor Jobs on the cost center, this endpoint is documented here under cost centers:
https://developer.simprogroup.com/apido ... actor-Jobs

All purchase orders can be found in this endpoint:
https://developer.simprogroup.com/apido ... 793d38e2c3

For matching jobs with purchase orders see if you can query our StockAllocations endpoint with search parameters such as job id and allocation type.
https://developer.simprogroup.com/apido ... llocations

Regards

Re: How to determine Job ID from WorkOrder details payload

Posted: Fri May 30, 2025 12:44 pm
by jp85
Hi,
Thanks for the info, but the suggested approach for Purchase Orders does not meet my requirements from what i can see.
I can achieve what you have suggested by hitting /api/v1.0/companies/:companyID/jobs/:jobID/sections/:sectionID/costCenters/:costCenterID/stock endpoint also ... but it dosnt help me identify the PO order ID's

I require a list of Order ID's so i can loop through them and check on their status. There are 2 issues with the StockAllocation or Stock end point
1. Hitting the StockAllocation end point only returns something for the job/cost centre IF there are items already included in the PO. If the PO is currently emplty, nothing is returned. I still want this PO ID to return because i need to see its still pending.
2. What the end point returns is the stock... I need the Order number so i can go and look at the status of the PO.

I need what the Simpro GUI returns when you navigate to a job and click "Stock".... it has a section "Orders Assigned" and lists all the Order ID's. I need to loop through these Order ID's to get each of their status'

I need something like this /api/v1.0/companies/:companyID/vendorOrders/?AssignedTo.Job=xxxxxx but when i try this it says
"message": "This API Column does not allow search requests.",

Or better still i need a new end point that lists all vendorOrders on the cost centre
/api/v1.0/companies/:companyID/jobs/:jobID/sections/:sectionID/costCenters/:costCenterID/vendorOrders

Re: How to determine Job ID from WorkOrder details payload

Posted: Wed Jun 18, 2025 1:44 am
by jp85
Can you please reply to this

Re: How to determine Job ID from WorkOrder details payload

Posted: Tue Jul 01, 2025 11:40 pm
by SimproAPITeam
Hi jp85,

You're right, currently there is no way to easily retrieve all POs belonging to a specific Job/Cost Centre at this point. I will escalate this with the team to see if we can explore adding this capability.

Sorry for the delay in response.

Re: How to determine Job ID from WorkOrder details payload

Posted: Thu Jul 24, 2025 11:34 pm
by rohan
I just realised I started a new thread asking for the same thing. I also need a way to lookup PO's from either a cost centre or the whole job.