printPrint

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.

➑️ Create a print job

➑️ Get print job status

πŸ’‘ Models

PrintJobContent

Parameter
Type
Explanation
Mandatory

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

Parameter
Type
Explanation
Mandatory

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).

❌

align

Alignment of the text (left, right, center).

❌

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

Value
Explanation

left

Align left.

center

Align center.

right

Align right.

CutPrintCommand

Parameter
Type
Explanation
Mandatory

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

Parameter
Type
Explanation
Mandatory

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

Route Params⬇️

Payload ⬇️

πŸ“€ Responses

chevron-right201 - Created print jobhashtag

Print job created successfully.

chevron-right401 - Unauthorizedhashtag

Unauthorized.

chevron-right422 - Unprocessable entityhashtag

Unprocessable entity, missing parameter.

chevron-right500 - Server errorhashtag

Server error.

πŸ“– Route Params Example

πŸ“– Payload example

πŸ“© 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}

Route Params⬇️

πŸ“€ Responses

chevron-right200 - Successhashtag

Print job status.

chevron-right401 - Unauthorizedhashtag

Unauthorized.

chevron-right422 - Unprocessable entityhashtag

Unprocessable entity, missing parameter.

chevron-right500 - Server errorhashtag

Server error.

πŸ“– Route Params Example

Last updated