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
| Name | In | Type | Required | Description |
|---|
id | path | string | Yes | The numeric print job ID. |
Request body
Content type application/json.
| Field | Type | Required | Description |
|---|
printer_id | uuid | null | Yes | The target printer ID. Send null to unassign the job. |
expected_printer_id | uuid | null | No | The job's current printer ID. Send null to require an unassigned job. A different assignment causes a 409 job_assignment_changed response. |
auto_assign | boolean | No | When 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
| Status | Description |
|---|
200 | Default Response |
400 | Default Response |
401 | Default Response |
403 | The API key lacks control scope or the caller cannot use the organization. |
404 | The job or the target printer was not found in the organization. |
409 | The job's status, current assignment, model file, printer, or material requirements prevent the change. See reason for the failed check. |
422 | The target printer cannot satisfy the job's hardware or filament requirements. |
500 | Default Response |
503 | Default Response |
default | Default Response |
200 response fields
| Field | Type | Required | Description |
|---|
id | integer | Yes | |
printer_id | uuid | null | Yes | |
queue_rank | integer | null | Yes | |
global_queue_rank | integer | null | Yes | |
status | "QUEUED" | Yes | |
400 response fields
| Field | Type | Required | Description |
|---|
error | string | No | |
message | string | No | |
requestId | string | No | |
reason | string | No | |
model_file_id | string | No | |
model_id | string | No | |
401 response fields
| Field | Type | Required | Description |
|---|
error | string | No | |
message | string | No | |
requestId | string | No | |
403 response fields
| Field | Type | Required | Description |
|---|
error | string | No | |
message | string | No | |
requestId | string | No | |
code | string | No | |
404 response fields
| Field | Type | Required | Description |
|---|
error | string | No | |
message | string | No | |
requestId | string | No | |
reason | "job_not_found" | "printer_not_found" | No | |
model_file_id | string | No | |
model_id | string | No | |
409 response fields
| Field | Type | Required | Description |
|---|
error | string | No | |
message | string | No | |
requestId | string | No | |
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_id | string | No | |
model_id | string | No | |
422 response fields
| Field | Type | Required | Description |
|---|
error | string | No | |
message | string | No | |
requestId | string | No | |
reason | string | No | |
model_file_id | string | No | |
model_id | string | No | |
filamentIndex | integer | No | |
filaments | object[] | No | |
500 response fields
| Field | Type | Required | Description |
|---|
error | string | No | |
message | string | No | |
requestId | string | No | |
reason | string | No | |
model_file_id | string | No | |
model_id | string | No | |
503 response fields
| Field | Type | Required | Description |
|---|
error | string | No | |
message | string | No | |
requestId | string | No | |
default response fields
| Field | Type | Required | Description |
|---|
error | string | No | |
message | string | No | |
requestId | string | No | |
Example 200 response
{
"id": 48213,
"printer_id": "7d3f1c2a-5b8e-4f6a-9c1d-2e4b6a8c0f13",
"queue_rank": 3072,
"global_queue_rank": null,
"status": "QUEUED"
}