curl --request PATCH \
--url https://api.autoprintfarm.com/public/v1/jobs/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"printer_id": "<string>",
"color": "<string>",
"filament_type": "<string>",
"material_type": "<string>",
"number_of_units": 2,
"quantity_per_print": 2,
"requires_assembly": true
}
'import requests
url = "https://api.autoprintfarm.com/public/v1/jobs/{id}"
payload = {
"printer_id": "<string>",
"color": "<string>",
"filament_type": "<string>",
"material_type": "<string>",
"number_of_units": 2,
"quantity_per_print": 2,
"requires_assembly": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
printer_id: '<string>',
color: '<string>',
filament_type: '<string>',
material_type: '<string>',
number_of_units: 2,
quantity_per_print: 2,
requires_assembly: true
})
};
fetch('https://api.autoprintfarm.com/public/v1/jobs/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.autoprintfarm.com/public/v1/jobs/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'printer_id' => '<string>',
'color' => '<string>',
'filament_type' => '<string>',
'material_type' => '<string>',
'number_of_units' => 2,
'quantity_per_print' => 2,
'requires_assembly' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.autoprintfarm.com/public/v1/jobs/{id}"
payload := strings.NewReader("{\n \"printer_id\": \"<string>\",\n \"color\": \"<string>\",\n \"filament_type\": \"<string>\",\n \"material_type\": \"<string>\",\n \"number_of_units\": 2,\n \"quantity_per_print\": 2,\n \"requires_assembly\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.autoprintfarm.com/public/v1/jobs/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"printer_id\": \"<string>\",\n \"color\": \"<string>\",\n \"filament_type\": \"<string>\",\n \"material_type\": \"<string>\",\n \"number_of_units\": 2,\n \"quantity_per_print\": 2,\n \"requires_assembly\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.autoprintfarm.com/public/v1/jobs/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"printer_id\": \"<string>\",\n \"color\": \"<string>\",\n \"filament_type\": \"<string>\",\n \"material_type\": \"<string>\",\n \"number_of_units\": 2,\n \"quantity_per_print\": 2,\n \"requires_assembly\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "<string>",
"status": "<string>",
"printer_id": "<string>",
"product_id": "<string>",
"product_sku_id": "<string>",
"product_name": "<string>",
"file_name": "<string>",
"number_of_units": 123,
"color": "<string>",
"filament_type": "<string>",
"material_type": "<string>",
"progress_percentage": 123,
"estimated_print_time_minutes": 123,
"actual_print_time_minutes": 123,
"failure_reason": "<string>",
"time_submitted": "<string>",
"time_started": "<string>",
"time_completed": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"origin": "app",
"printer_file_name": "<string>",
"filament_needed_grams": 123,
"printer_name": "<string>",
"printer_model": "<string>",
"sku_name": "<string>"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"details": "<unknown>"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"details": "<unknown>"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"details": "<unknown>"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"details": "<unknown>"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"details": "<unknown>"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"details": "<unknown>"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"details": "<unknown>"
}
}Update a queued job's metadata
Allowed only in non-terminal states. printer_id can be changed (to another printer, or null to unassign) only while the job is queued; resending its current printer is always allowed. Changing printer_id never changes the job’s print file or number_of_units; the job’s current print file must be printable on the new printer — its format and the printer model it was made for. Error codes: JOB_TERMINAL (400) if the job is already completed or cancelled; NO_UPDATES (400) if the body sets nothing; FILE_NOT_PRINTABLE (422) if the job’s file is a 3D model that must be sliced first; FILE_UNSLICED (422) if it is a 3MF project with no sliced plates; OUTPUT_FORMAT_MISMATCH (400) if the new printer can’t print the file’s format; FILE_EXTENSION_MISMATCH (400) if the file’s name no longer ends in its stored format’s extension; PRINTER_MODEL_MISMATCH (400) if the file was made for a different printer model; JOB_NOT_QUEUED (409) if printer_id would change on a job that is no longer queued; FILE_PROCESSING (409) while the file’s details are still being read after an upload or version change; FILE_PARSE_FAILED (422) if the file couldn’t be read and has no printer model set, or is a 3MF not known to hold sliced plates; when another of the part’s print files would run on the printer, the error message names it (and the unit count it prints, if different) — assign the job to the printer from the AutoPrintFarm queue to switch to it; NOT_FOUND (404) for an unknown job; PRINTER_NOT_FOUND (404) if printer_id references an unknown printer.
curl --request PATCH \
--url https://api.autoprintfarm.com/public/v1/jobs/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"printer_id": "<string>",
"color": "<string>",
"filament_type": "<string>",
"material_type": "<string>",
"number_of_units": 2,
"quantity_per_print": 2,
"requires_assembly": true
}
'import requests
url = "https://api.autoprintfarm.com/public/v1/jobs/{id}"
payload = {
"printer_id": "<string>",
"color": "<string>",
"filament_type": "<string>",
"material_type": "<string>",
"number_of_units": 2,
"quantity_per_print": 2,
"requires_assembly": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
printer_id: '<string>',
color: '<string>',
filament_type: '<string>',
material_type: '<string>',
number_of_units: 2,
quantity_per_print: 2,
requires_assembly: true
})
};
fetch('https://api.autoprintfarm.com/public/v1/jobs/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.autoprintfarm.com/public/v1/jobs/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'printer_id' => '<string>',
'color' => '<string>',
'filament_type' => '<string>',
'material_type' => '<string>',
'number_of_units' => 2,
'quantity_per_print' => 2,
'requires_assembly' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.autoprintfarm.com/public/v1/jobs/{id}"
payload := strings.NewReader("{\n \"printer_id\": \"<string>\",\n \"color\": \"<string>\",\n \"filament_type\": \"<string>\",\n \"material_type\": \"<string>\",\n \"number_of_units\": 2,\n \"quantity_per_print\": 2,\n \"requires_assembly\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.autoprintfarm.com/public/v1/jobs/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"printer_id\": \"<string>\",\n \"color\": \"<string>\",\n \"filament_type\": \"<string>\",\n \"material_type\": \"<string>\",\n \"number_of_units\": 2,\n \"quantity_per_print\": 2,\n \"requires_assembly\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.autoprintfarm.com/public/v1/jobs/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"printer_id\": \"<string>\",\n \"color\": \"<string>\",\n \"filament_type\": \"<string>\",\n \"material_type\": \"<string>\",\n \"number_of_units\": 2,\n \"quantity_per_print\": 2,\n \"requires_assembly\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "<string>",
"status": "<string>",
"printer_id": "<string>",
"product_id": "<string>",
"product_sku_id": "<string>",
"product_name": "<string>",
"file_name": "<string>",
"number_of_units": 123,
"color": "<string>",
"filament_type": "<string>",
"material_type": "<string>",
"progress_percentage": 123,
"estimated_print_time_minutes": 123,
"actual_print_time_minutes": 123,
"failure_reason": "<string>",
"time_submitted": "<string>",
"time_started": "<string>",
"time_completed": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"origin": "app",
"printer_file_name": "<string>",
"filament_needed_grams": 123,
"printer_name": "<string>",
"printer_model": "<string>",
"sku_name": "<string>"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"details": "<unknown>"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"details": "<unknown>"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"details": "<unknown>"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"details": "<unknown>"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"details": "<unknown>"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"details": "<unknown>"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"details": "<unknown>"
}
}Authorizations
API keys are minted in the AutoPrintFarm web app under Settings → API Keys. Send as Authorization: Bearer apf_live_.... Keys are shown exactly once at creation and can be revoked at any time.
Path Parameters
Body
Was this page helpful?