API Endpoint Reference / Print Jobs

Change the printer assignment of a queued print job

PATCH https://api.printhiv3d.com/v1/print-jobs/{id}/assign

Operation ID assignPrintJob. Requires the control API key scope.

Requires control scope. Assigns a QUEUED job to a printer or unassigns it. Assigning to a printer appends the job to that printer's queue, even when it is already assigned to that printer. Send printer_id: null to unassign the job. By default, unassigning releases the job to the Smart Queue. Send auto_assign: false to leave it queued without automatic assignment.

Parameters

NameInTypeRequiredDescription
idpathstringYesThe numeric print job ID.

Request body

Content type application/json.

FieldTypeRequiredDescription
printer_iduuid | nullYesThe target printer ID. Send null to unassign the job.
expected_printer_iduuid | nullNoThe job's current printer ID. Send null to require an unassigned job. A different assignment causes a 409 job_assignment_changed response.
auto_assignbooleanNoWhen printer_id is null, omit this field or send true to release the job to the Smart Queue. Send false to keep the job queued without automatic assignment.

Responses

StatusDescription
200Default Response
400Default Response
401Default Response
403The API key lacks control scope or the caller cannot use the organization.
404The job or the target printer was not found in the organization.
409The job's status, current assignment, model file, printer, or material requirements prevent the change. See reason for the failed check.
422The target printer cannot satisfy the job's hardware or filament requirements.
500Default Response
503Default Response
defaultDefault Response

200 response fields

FieldTypeRequiredDescription
idintegerYes
printer_iduuid | nullYes
queue_rankinteger | nullYes
global_queue_rankinteger | nullYes
status"QUEUED"Yes

400 response fields

FieldTypeRequiredDescription
errorstringNo
messagestringNo
requestIdstringNo
reasonstringNo
model_file_idstringNo
model_idstringNo

401 response fields

FieldTypeRequiredDescription
errorstringNo
messagestringNo
requestIdstringNo

403 response fields

FieldTypeRequiredDescription
errorstringNo
messagestringNo
requestIdstringNo
codestringNo

404 response fields

FieldTypeRequiredDescription
errorstringNo
messagestringNo
requestIdstringNo
reason"job_not_found" | "printer_not_found"No
model_file_idstringNo
model_idstringNo

409 response fields

FieldTypeRequiredDescription
errorstringNo
messagestringNo
requestIdstringNo
reason"job_not_queued" | "job_assignment_changed" | "printer_in_maintenance" | "slice_variant_unavailable" | "model_file_deleted" | "model_deleted" | "model_file_not_ready" | "plate_selection_host_update_required" | "mapping_identity_mismatch" | "hardware:nozzle_diameter_multiple_unsupported" | "material_route_changed" | "h3c_rack_dispatch_unqualified" | "plate_not_printable" | "plate_plan_missing" | "plate_ambiguous" | "duplicate_source_filament_index" | "missing_material_metadata" | "no_plate_material_metadata" | "malformed_plate_metadata" | "invalid_selected_plate" | "invalid_plate_identity" | "ambiguous_selected_plate" | "selected_plate_not_found" | "duplicate_plate_identity" | "conflicting_selected_plate" | "conflicting_source_filament_index" | "plate_source_mapping_length_mismatch" | "missing_source_filament_index" | "source_filament_outside_project" | "no_plate_material_usage" | "invalid_source_filament_index" | "empty_material_requirements" | "reported_spool_live_read_required" | "reported_material_mismatch" | "material_type_mismatch" | "reported_spool_state_unpersisted" | "reported_spool_route_mismatch" | "reported_spool_fingerprint_mismatch" | "reported_spool_incompatible" | "reported_spool_consent_required" | "slot-absent" | "wrong-nozzle" | "material-unassigned" | "material-not-approved" | "physical-identification-required" | "attributes-do-not-match" | "mapping-hole" | "duplicate-route" | "unknown-slot" | "color-close-only" | "insufficient-confidence" | "material_evidence_blocked" | "sliced_filament_changed" | "material_unassigned"No
model_file_idstringNo
model_idstringNo

422 response fields

FieldTypeRequiredDescription
errorstringNo
messagestringNo
requestIdstringNo
reasonstringNo
model_file_idstringNo
model_idstringNo
filamentIndexintegerNo
filamentsobject[]No

500 response fields

FieldTypeRequiredDescription
errorstringNo
messagestringNo
requestIdstringNo
reasonstringNo
model_file_idstringNo
model_idstringNo

503 response fields

FieldTypeRequiredDescription
errorstringNo
messagestringNo
requestIdstringNo

default response fields

FieldTypeRequiredDescription
errorstringNo
messagestringNo
requestIdstringNo

Example 200 response

{
  "id": 48213,
  "printer_id": "7d3f1c2a-5b8e-4f6a-9c1d-2e4b6a8c0f13",
  "queue_rank": 3072,
  "global_queue_rank": null,
  "status": "QUEUED"
}