Enqueue a print job
curl --request POST \
--url https://api.autoprintfarm.com/public/v1/jobs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"print_file_id": "<string>",
"printer_id": "<string>",
"product_id": "<string>",
"product_sku_id": "<string>",
"color": "<string>",
"filament_type": "<string>",
"material_type": "<string>",
"number_of_units": 1,
"quantity_per_print": 1,
"requires_assembly": false
}
'import requests
url = "https://api.autoprintfarm.com/public/v1/jobs"
payload = {
"print_file_id": "<string>",
"printer_id": "<string>",
"product_id": "<string>",
"product_sku_id": "<string>",
"color": "<string>",
"filament_type": "<string>",
"material_type": "<string>",
"number_of_units": 1,
"quantity_per_print": 1,
"requires_assembly": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
print_file_id: '<string>',
printer_id: '<string>',
product_id: '<string>',
product_sku_id: '<string>',
color: '<string>',
filament_type: '<string>',
material_type: '<string>',
number_of_units: 1,
quantity_per_print: 1,
requires_assembly: false
})
};
fetch('https://api.autoprintfarm.com/public/v1/jobs', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'print_file_id' => '<string>',
'printer_id' => '<string>',
'product_id' => '<string>',
'product_sku_id' => '<string>',
'color' => '<string>',
'filament_type' => '<string>',
'material_type' => '<string>',
'number_of_units' => 1,
'quantity_per_print' => 1,
'requires_assembly' => false
]),
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"
payload := strings.NewReader("{\n \"print_file_id\": \"<string>\",\n \"printer_id\": \"<string>\",\n \"product_id\": \"<string>\",\n \"product_sku_id\": \"<string>\",\n \"color\": \"<string>\",\n \"filament_type\": \"<string>\",\n \"material_type\": \"<string>\",\n \"number_of_units\": 1,\n \"quantity_per_print\": 1,\n \"requires_assembly\": false\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.autoprintfarm.com/public/v1/jobs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"print_file_id\": \"<string>\",\n \"printer_id\": \"<string>\",\n \"product_id\": \"<string>\",\n \"product_sku_id\": \"<string>\",\n \"color\": \"<string>\",\n \"filament_type\": \"<string>\",\n \"material_type\": \"<string>\",\n \"number_of_units\": 1,\n \"quantity_per_print\": 1,\n \"requires_assembly\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.autoprintfarm.com/public/v1/jobs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"print_file_id\": \"<string>\",\n \"printer_id\": \"<string>\",\n \"product_id\": \"<string>\",\n \"product_sku_id\": \"<string>\",\n \"color\": \"<string>\",\n \"filament_type\": \"<string>\",\n \"material_type\": \"<string>\",\n \"number_of_units\": 1,\n \"quantity_per_print\": 1,\n \"requires_assembly\": false\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>",
"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>"
}
}Jobs
Enqueue a print job
Creates a new queued print job from a print_file_id. The optional printer_id pre-assigns a printer; omit it to leave the job unassigned. Server-side checks: file must exist (FILE_NOT_FOUND), printer (if provided) must exist (PRINTER_NOT_FOUND), SKU (if provided) must exist (SKU_NOT_FOUND), and printer model must match the file’s model (PRINTER_MODEL_MISMATCH).
POST
/
jobs
Enqueue a print job
curl --request POST \
--url https://api.autoprintfarm.com/public/v1/jobs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"print_file_id": "<string>",
"printer_id": "<string>",
"product_id": "<string>",
"product_sku_id": "<string>",
"color": "<string>",
"filament_type": "<string>",
"material_type": "<string>",
"number_of_units": 1,
"quantity_per_print": 1,
"requires_assembly": false
}
'import requests
url = "https://api.autoprintfarm.com/public/v1/jobs"
payload = {
"print_file_id": "<string>",
"printer_id": "<string>",
"product_id": "<string>",
"product_sku_id": "<string>",
"color": "<string>",
"filament_type": "<string>",
"material_type": "<string>",
"number_of_units": 1,
"quantity_per_print": 1,
"requires_assembly": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
print_file_id: '<string>',
printer_id: '<string>',
product_id: '<string>',
product_sku_id: '<string>',
color: '<string>',
filament_type: '<string>',
material_type: '<string>',
number_of_units: 1,
quantity_per_print: 1,
requires_assembly: false
})
};
fetch('https://api.autoprintfarm.com/public/v1/jobs', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'print_file_id' => '<string>',
'printer_id' => '<string>',
'product_id' => '<string>',
'product_sku_id' => '<string>',
'color' => '<string>',
'filament_type' => '<string>',
'material_type' => '<string>',
'number_of_units' => 1,
'quantity_per_print' => 1,
'requires_assembly' => false
]),
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"
payload := strings.NewReader("{\n \"print_file_id\": \"<string>\",\n \"printer_id\": \"<string>\",\n \"product_id\": \"<string>\",\n \"product_sku_id\": \"<string>\",\n \"color\": \"<string>\",\n \"filament_type\": \"<string>\",\n \"material_type\": \"<string>\",\n \"number_of_units\": 1,\n \"quantity_per_print\": 1,\n \"requires_assembly\": false\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.autoprintfarm.com/public/v1/jobs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"print_file_id\": \"<string>\",\n \"printer_id\": \"<string>\",\n \"product_id\": \"<string>\",\n \"product_sku_id\": \"<string>\",\n \"color\": \"<string>\",\n \"filament_type\": \"<string>\",\n \"material_type\": \"<string>\",\n \"number_of_units\": 1,\n \"quantity_per_print\": 1,\n \"requires_assembly\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.autoprintfarm.com/public/v1/jobs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"print_file_id\": \"<string>\",\n \"printer_id\": \"<string>\",\n \"product_id\": \"<string>\",\n \"product_sku_id\": \"<string>\",\n \"color\": \"<string>\",\n \"filament_type\": \"<string>\",\n \"material_type\": \"<string>\",\n \"number_of_units\": 1,\n \"quantity_per_print\": 1,\n \"requires_assembly\": false\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>",
"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>"
}
}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.
Body
application/json
Minimum string length:
1Maximum string length:
50Maximum string length:
50Maximum string length:
50Required range:
x >= 1Required range:
x >= 1Was this page helpful?
⌘I