This page provides a full description of all the routes available for handling printers. Each route is explained with its parameters, required headers, possible responses and examples of use.
💡 Models
PrintJobContent
commands
It's an array of PrintcommandType, it can contain a type TextPrintCommand | CutPrintCommand | FeedPrintCommand. Each line doesn't have to have the same type. More explanations below with the example here.
✅
type
string
Use the value "epos".
✅
PrintCommandType
TextPrintCommand
type
string
Use the value "text".
✅
lang
string
Text langage.
❌
smooth
boolean
Enables or disables anti-aliasing (smoothing) to improve text sharpness.
❌
x
number
Horizontal position of the text (X coordinate).
❌
value
string
The text content to be printed.
❌
width
number
Width of the text line (integer values only, 1 or 2).
❌
height
number
Height of the text line (integer values only, 1 or 2).
❌
reverse
boolean
Inverts the text colors (negative mode).
❌
ul
boolean
Enables or disables underline for the text.
❌
em
boolean
Enables or disables emphasis (bold or italic depending on the implementation).
❌
color
string
Text color (CSS color value or other supported format).
❌
PrintAlign Enum
left
Align left.
center
Align center.
right
Align right.
CutPrintCommand
type
string
Use the value "cut".
✅
typetype
string
Use the value "feed".
✅
value
string
Optional value that might provide additional information or metadata related to the cut command.
❌
FeedPrintCommand
type
string
Use the value "feed".
✅
line
number
Number of lines to feed (i.e., how many lines the paper should move forward).
✅
value
string
Optional value that might include additional information or metadata related to the feed command.
❌
📤 Create print job
This route is dedicated to create a printjob on the printer.
POST https://api.fyre.app/api/v1/printers/onebox/{printerId}/printjobs
HTTP headers: X-API-KEY: <your token>
Route Params⬇️
{
printedId: string // The id of the printer.
}
Payload ⬇️
{
printJob:
}
📤 Responses
📖 Route Params Example
{
printerId: "X6X7071613"
}
📖 Payload example
{
"commands": [
{
"line": 1,
"type": "feed"
},
{
"type": "text",
"value": "Quartier libre"
},
{
"line": 1,
"type": "feed"
},
{
"type": "text",
"value": "Quai des Savoirs"
},
{
"line": 1,
"type": "feed"
},
{
"type": "text",
"value": "31000, Toulouse"
},
{
"line": 1,
"type": "feed"
},
{
"line": 1,
"type": "feed"
},
{
"type": "text",
"value": "Table 1"
},
{
"line": 1,
"type": "feed"
},
{
"type": "text",
"value": "YZJJ"
},
{
"line": 1,
"type": "feed"
},
{
"height": 1,
"type": "text",
"value": "[email protected]",
"width": 1
},
{
"line": 1,
"type": "feed"
},
{
"type": "text",
"value": "12:46 04/07/2022"
},
{
"type": "text",
"value": "----------------------------------------"
},
{
"type": "text",
"value": "4 AOP Crozes-Hermitage 18.00 €"
},
{
"type": "text",
"value": "----------------------------------------"
},
{
"height": 2,
"type": "text",
"value": " ",
"width": 2
},
{
"type": "text",
"value": "Total 79.00 €"
},
{
"height": 1,
"type": "text",
"value": " ",
"width": 1
},
{
"line": 1,
"type": "feed"
},
{
"type": "cut",
"typetype": "feed"
}
],
"type": "epos"
}
📩 Get print job status
This route is used to get the print job status on the printer.
GET https://api.fyre.app/api/v1/printers/onebox/{printerId}/printjobs/{printjobId}
HTTP headers: X-API-KEY: <your token>
Route Params⬇️
{
printerId: string, //The ID of the printer.
printjobId: string // ID of the print job
}
📤 Responses
📖 Route Params Example
{
printerId: "X6X7071613",
printjobId: "058ZKyO45czdvdzcObHk"
}
Last updated