After Skyplanner has scheduled your Process Steps into the timeline you might want to fetch the start, end times and Workstation data for the steps into you ERP-system. This can be done using the /jobs-endpoint.
Updating the scheduled times #
By giving the GET-request done to the /jobs-endpoint the URL-parameter job_parts=true your return response will include some additional data:
With the job_parts=true parameter you get also the entities called job parts linked to the job.
Job parts are represented in the Skyplanner UI by the “chunks” a job is splitted:
Each job part has a planned_start_time, a planned_end_time and a planned_duration. If you want to find out when the job is scheduled to be started your integration logic needs to look through each job part and find the planned_start_time with the earliest value. And for the job’s end time you will have to look for the planned_end_time with the latest value.
Note: do not assume that the first job part has the earliest planned_start_time and the last part has the latest planned_end_time! This is not always the case.
From the job_parts you can also find the duration of each part in the planned_duration field. This value is in seconds.
Updating the Workstation #
In the job part data (Fig 1.) you can find the Workstation the part is planned to be completed in the planned_workstation_id value.
With the workstation_id value you can fetch the Workstation from the /workstations-endpoint:
If you’ve linked the corresponding Workstation in your ERP system to Skyplanner’s Workstation via its external ID, you can find it in the response. This allows you to update the Workstation in your ERP if Skyplanner has reassigned the process step to a different Workstation.