How to determine Job ID from WorkOrder details payload
Posted: Wed May 28, 2025 3:31 am
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.
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.