Fit calibration values from measured readings (nothing is saved)
const url = 'https://example.com/api/v1/printers/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/calibration/example/fit';const options = { method: 'POST', headers: {'X-Label-Hub-Key': '<X-Label-Hub-Key>', 'Content-Type': 'application/json'}, body: '{"readings":[{"across_mm":1,"col_gap":1,"down_mm":1,"row_gap":1}],"type":"example","version":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/printers/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/calibration/example/fit \ --header 'Content-Type: application/json' \ --header 'X-Label-Hub-Key: <X-Label-Hub-Key>' \ --data '{ "readings": [ { "across_mm": 1, "col_gap": 1, "down_mm": 1, "row_gap": 1 } ], "type": "example", "version": 1 }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Printer id (a page printer).
Printer id (a page printer).
Tray key.
Tray key.
Request Bodyrequired
Section titled “Request Bodyrequired”object
object
Ink offset to the right, mm.
Vertical gap S1, S2, … counted from 1.
Ink offset downwards, mm.
Horizontal gap Z1, Z2, … counted from 1.
Sheet type key.
Example generated
{ "readings": [ { "across_mm": 1, "col_gap": 1, "down_mm": 1, "row_gap": 1 } ], "type": "example", "version": 1}Responses
Section titled “Responses”Successful Response
object
0-based indices into readings of those further than 0.3 mm from the fit.
Names of values outside the allowed ranges.
A printer’s measured deviation; the hub applies the inverse when it renders (D17).
Offsets are millimetres (±10, at most 2 decimals), scales are factors (0.95 to 1.05, at
most 6 decimals), rotation is degrees (±2, at most 6 decimals, positive is clockwise).
The bounds are checked by the service and reported as calibration_out_of_range; the
fit endpoint returns values of this shape even when they are outside the bounds.
object
Mm; allowed -10.0 to 10.0, at most 2 decimals (checked by the service).
Mm; allowed -10.0 to 10.0, at most 2 decimals (checked by the service).
Degrees, positive is clockwise; allowed -2.0 to 2.0, at most 6 decimals (checked by the service).
Factor; allowed 0.95 to 1.05, at most 6 decimals (checked by the service).
Factor; allowed 0.95 to 1.05, at most 6 decimals (checked by the service).
Example
{ "values": { "offset_x_mm": 0, "offset_y_mm": 0, "rotation_deg": 0, "scale_x": 1, "scale_y": 1 }}Validation Error
object
object
object
Example generated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}