instantiate_response
The instantiate_response
type contains information on the routes and jobs that were instantiated in an instantiate call.
Name | Type | Description |
---|---|---|
custom | custom | User-supplied custom fields that were sent in the request. |
jobs | job[] | The jobs that were generated by the instantiation. Jobs that were included in the input are not included here. |
routes | route[] | The empty routes generated by the instantiation. Routes that were included in the input are not included here. |
schedules | schedule_instantiate_response[] | Information on the dates and ordinals for jobs that were instantiated from each schedule. |
Copying vs Referencing
When instantiating routes, the values from each shift are copied into the corresponding values on the instantiated route. For example, shift.start_time is copied into route.start_time. The instantiated routes have no reference to the shift from which they were instantiated, except for the name of the shift being included in the route's name.
When instantiating jobs, the values from each job_template are copied into the corresponding values on the instantiated job, as well as any custom fields from the schedule. For example, schedule.job_template.location is copied into job.location. Since all information about delivery dates is calculated based on the schedule's parameters, no date information is copied directly onto the job.