StarIO.Online Web API
The StarIO.Online service exposes a REST style HTTP API that
can be used to control and manage your printers, send and
monitor print jobs, and receive event notifications.
First, generate an
API key that can be used to
securely call the API from your application. API keys are
granted permissions for their respective API keys, so the
API may not be invoked depending on whether or not the
authorisation is granted.
Print options can be specified either as a header or as a query parameter. If both are specified, the header value takes precedence.
HOST: https://api.stario.online/v1
HOST: https://eu-api.stario.online/v1
Device Groups ¶
※For each status in the status object, non-supported printers return the default value ‘false’.
Retrieve and create device groups ¶
Retrieve device group list
GET/a
Returns a list of device groups.
Required permission: ViewDeviceGroups
Example URI
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
200
Headers
Content-Type: application/json
Body
[
{
"Name": "SampleName",
"MatchPath": "SampleMatchPath",
"MatchDomain": null,
"AutoCreateDeviceQueue": true,
"Enabled": true,
"RequireDeviceKey": true,
"Created": "2024-12-09T05:18:05.97638Z",
"Owner": null,
"DeviceCount": null
}
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array",
"items": {
"type": "object",
"properties": {
"Name": {
"type": "string",
"description": "Device group name"
},
"MatchPath": {
"type": "string",
"description": "Path used to identify the device group"
},
"MatchDomain": {
"type": "string",
"description": "Reserved properties"
},
"AutoCreateDeviceQueue": {
"type": "boolean",
"description": "Indicates whether new devices connecting to the CloudPRNT endpoint URL are automatically registered"
},
"Enabled": {
"type": "boolean",
"description": "Indicates whether the device group is available"
},
"RequireDeviceKey": {
"type": "boolean",
"description": "Indicates whether a device-specific key is required to connect devices to this group"
},
"Created": {
"type": "string",
"description": "UTC date/time when the group was created"
},
"Owner": {
"type": "string",
"description": "Name of the account that owns this device group, always null"
},
"DeviceCount": {
"type": [
"string",
"null"
],
"description": "Number of devices belonging to this device group, always null"
}
},
"required": [
"Name",
"MatchPath",
"MatchDomain",
"AutoCreateDeviceQueue",
"Enabled",
"RequireDeviceKey",
"Created",
"Owner",
"DeviceCount"
]
}
}
400
Headers
Content-Type: text/plain
Body
Bad Request
403
Headers
Content-Type: text/plain
Body
Forbidden
Create device group
POST/a
Creates a new device group.
Specify the path (MatchPath) in the form "group prefix-any string".
The group prefix is a string assigned to each account, and is usually the same as the path of the device group provided with your account.
Example: if your group prefix is "sample", specify "sample-store01".
The part after "-" must be 1 to 20 alphanumeric characters or underscores (_). The group prefix and "-" are not included in this count. The group prefix is case-sensitive.
* Enabled and AutoCreateDeviceQueue default to false if omitted. To connect printers and use the device group right away, set both to true.
Required permission: CreateDeviceGroups
Example URI
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
Body
{
"Name": "SampleGroupName",
"MatchPath": "sample-store01",
"AutoCreateDeviceQueue": true,
"Enabled": true,
"JobExpirationTime": 4320,
"WelcomePrint": true
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"Name": {
"type": "string",
"description": "Device group name. 3 to 100 characters"
},
"MatchPath": {
"type": "string",
"description": "Path used to identify the device group, in the format group prefix-any string. The string after the hyphen is 1 to 20 alphanumeric characters or underscores (_)"
},
"MatchDomain": {
"type": "string",
"description": "Reserved properties"
},
"AutoCreateDeviceQueue": {
"type": "boolean",
"description": "Indicates whether new devices connecting to the CloudPRNT endpoint URL are automatically registered. Defaults to false"
},
"Enabled": {
"type": "boolean",
"description": "Indicates whether the device group is available. Defaults to false"
},
"RequireDeviceKey": {
"type": "boolean",
"description": "Reserved properties"
},
"JobExpirationTime": {
"type": "integer",
"description": "Job expiration time (in minutes), from 1 to 4320. Defaults to 4320"
},
"WelcomePrint": {
"type": "boolean",
"description": "Indicates whether to print a welcome page when a new device connects for the first time. Defaults to true"
}
},
"required": [
"Name",
"MatchPath"
]
}
201
Headers
Content-Type: application/json
Location: /v1/a/sample-store01
Body
{
"Location": "/v1/a/sample-store01",
"Name": "SampleGroupName",
"MatchPath": "sample-store01"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"Location": {
"type": "string",
"description": "URI of the created device group"
},
"Name": {
"type": "string",
"description": "Name of the created device group"
},
"MatchPath": {
"type": "string",
"description": "Path of the created device group"
}
}
}
400
Returned in either of the following cases:
・The name (Name) is not 3 to 100 characters.
・The part of the path (MatchPath) after "-" is not 1 to 20 alphanumeric characters or underscores (_).
When Name or MatchPath is missing or empty, or JobExpirationTime is out of range, the Content-Type is application/json and the error details are returned in JSON.
Headers
Content-Type: text/plain
Body
Bad Request
403
Returned when the required permission is missing, or when the path does not start with your group prefix.
Headers
Content-Type: text/plain
Body
Forbidden
409
Returned when a device group with the same path already exists, or when the maximum number of device groups has been reached.
Headers
Content-Type: text/plain
Body
Conflict
Retrieve and update device group details ¶
Retrieve device group details
GET/a/{groupPath}
Returns detailed information about the device group.
The device group must belong to the account
authenticated by the API key.
Required permission: ViewDeviceGroups
Example URI
- groupPath
-
string(required) Example: SampleGroupPathPath used to identify the device group
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
200
Headers
Content-Type: application/json
Body
{
"Name": "SampleName",
"MatchPath": "SampleMatchPath",
"MatchDomain": null,
"AutoCreateDeviceQueue": true,
"Enabled": true,
"RequireDeviceKey": true,
"ContactEMail": null,
"ContactName": null,
"AutoBuzzBeforePrint": 0,
"AutoBuzzAfterPrint": 0,
"Copies": 1,
"AutoClaimBCR": false,
"Owner": "SampleOwnerName",
"Created": "2024-12-09T05:18:05.97638Z",
"JobExpirationTime": 4320,
"WelcomePrint": true,
"EmailPrint": false
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"Name": {
"type": "string",
"description": "Device group name"
},
"MatchPath": {
"type": "string",
"description": "Path used to identify the device group"
},
"MatchDomain": {
"type": "string",
"description": "Reserved properties"
},
"AutoCreateDeviceQueue": {
"type": "boolean",
"description": "Indicates whether new devices connecting to the CloudPRNT endpoint URL are automatically registered"
},
"Enabled": {
"type": "boolean",
"description": "Indicates whether the device group is available"
},
"RequireDeviceKey": {
"type": "boolean",
"description": "Indicates whether a device-specific key is required to connect devices to this group"
},
"ContactEMail": {
"type": "string",
"description": "Contact email address"
},
"ContactName": {
"type": "string",
"description": "Contact name"
},
"AutoBuzzBeforePrint": {
"type": "number",
"description": "Default number of times to buzz the external buzzer before printing"
},
"AutoBuzzAfterPrint": {
"type": "number",
"description": "Default number of times to buzz the external buzzer after printing"
},
"Copies": {
"type": "number",
"description": "Default number of copies to print for this device group"
},
"AutoClaimBCR": {
"type": "boolean",
"description": "Indicates whether to automatically claim the connected barcode reader to receive barcode scan notifications"
},
"Owner": {
"type": "string",
"description": "Name of the account that owns this device group"
},
"Created": {
"type": "string",
"description": "UTC date/time when the group was created"
},
"JobExpirationTime": {
"type": "number",
"description": "Parameter to set the job expiration time (in minutes)"
},
"WelcomePrint": {
"type": "boolean",
"description": "Setting value to enable or disable welcome printing"
},
"EmailPrint": {
"type": "boolean",
"description": "Setting value to enable or disable the email printing feature"
}
},
"required": [
"Name",
"MatchPath",
"AutoCreateDeviceQueue",
"Enabled",
"RequireDeviceKey",
"AutoBuzzBeforePrint",
"AutoBuzzAfterPrint",
"Copies",
"AutoClaimBCR",
"Owner",
"Created",
"JobExpirationTime",
"WelcomePrint",
"EmailPrint"
]
}
403
Headers
Content-Type: text/plain
Body
Forbidden
404
Headers
Content-Type: text/plain
Body
Not Found
Update device group
PUT/a/{groupPath}
Updates the information of the specified device group. The device group must belong to the account authenticated by the API key.
Required permission: ModifyDeviceGroups
Example URI
- groupPath
-
string(required) Example: SampleGroupPathPath used to identify the device group
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
Body
{
"Name": "SampleGroupName",
"MatchDomain": null,
"AutoCreateDeviceQueue": true,
"Enabled": true,
"RequireDeviceKey": true,
"ContactEMail": null,
"ContactName": null,
"AutoBuzzBeforePrint": 0,
"AutoBuzzAfterPrint": 0,
"Copies": 1,
"AutoClaimBCR": false,
"JobExpirationTime": 4320,
"WelcomePrint": true,
"EmailPrint": false
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"Name": {
"type": "string",
"description": "Device group name. 3 to 100 characters"
},
"MatchDomain": {
"type": "string",
"description": "Reserved properties"
},
"AutoCreateDeviceQueue": {
"type": "boolean",
"description": "Indicates whether new devices connecting to the CloudPRNT endpoint URL are automatically registered"
},
"Enabled": {
"type": "boolean",
"description": "Indicates whether the device group is available"
},
"RequireDeviceKey": {
"type": "boolean",
"description": "Indicates whether a device-specific key is required to connect devices to this group"
},
"ContactEMail": {
"type": "string",
"description": "Contact email address"
},
"ContactName": {
"type": "string",
"description": "Contact name"
},
"AutoBuzzBeforePrint": {
"type": "number",
"description": "Default number of times to buzz the external buzzer before printing"
},
"AutoBuzzAfterPrint": {
"type": "number",
"description": "Default number of times to buzz the external buzzer after printing"
},
"Copies": {
"type": "number",
"description": "Default number of copies to print for this device group"
},
"AutoClaimBCR": {
"type": "boolean",
"description": "Indicates whether to automatically claim the connected barcode reader to receive barcode scan notifications"
},
"JobExpirationTime": {
"type": "number",
"description": "Parameter to set the job expiration time (in minutes)"
},
"WelcomePrint": {
"type": "boolean",
"description": "Setting value to enable or disable welcome printing"
},
"EmailPrint": {
"type": "boolean",
"description": "Setting value to enable or disable the email printing feature"
}
}
}
200
Headers
Content-Type: application/json
Body
{
"Name": "SampleGroupName",
"MatchPath": "SampleGroupPath"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"Name": {
"type": "string",
"description": "Device group name"
},
"MatchPath": {
"type": "string",
"description": "Path used to identify the device group"
}
},
"required": [
"Name",
"MatchPath"
]
}
400
Returned when the name (Name) is not 3 to 100 characters.
When JobExpirationTime is out of range, the Content-Type is application/json and the error details are returned in JSON.
Headers
Content-Type: text/plain
Body
Bad Request
403
Headers
Content-Type: text/plain
Body
Forbidden
404
Headers
Content-Type: text/plain
Body
Not Found
Devices ¶
※For each status in the status object, non-supported printers return the default value ‘false’.
Retrieve a list of devices ¶
Retrieve device list
GET/a/{groupPath}/d{?notes}{&s}{&metaInfo}
Returns a list of devices connected to the specified device group. The device group must belong to the account authenticated by the API key.
Required permission: EnumDevices
This LastConnection property indicates the number of
seconds that have passed since the StarIO.Online
server last received an HTTP request from the device.
This property can be used to determine whether a
device is connected to or disconnected from the
StarIO.Online server.
(Reference) The StarIO.Online dashboard
determines the connection status of devices based on
the following conditions:
■ Connection Lost: LastConnection >
PollingInterval + 30 seconds
■ Online: LastConnection ≤ PollingInterval + 30
seconds
* PollingInterval refers to the interval (in
seconds) at which the device polls the server.
Example URI
- groupPath
-
string(required) Example: SampleGroupPathPath used to identify the device group
- notes
-
boolean(optional) Example: trueWhether to include Notes in the response
- s
-
string(optional) Example: samplePartial match search for Device Name, Serial Number, Application access ID, MAC based on the entered string
- metaInfo
-
string(optional) Example: {"1": [100], "2": "abc"}Search meta information based on the entered string. Refer to here for obtaining meta information
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
200
Headers
Content-Type: application/json
Body
[
{
"Mac": "xxxxxxxxxxxx",
"Id": "Sample",
"Status": {
"Online": true,
"CoverOpen": false,
"CompulsionSwitch": false,
"OverTemperature": false,
"Recoverable": false,
"CutterError": false,
"MechanicalError": false,
"ReceiveBufferOverflow": false,
"BlackMarkError": false,
"PresenterPaperJam": false,
"VoltageError": false,
"PaperEmpty": false,
"PaperLow": false,
"HoldPrint": false,
"RollPositionError": false,
"PartsReplacementNotification": false,
"CleaningNotification": false,
"Description": null,
"MinWarningLevel": 0
},
"AccessIdentifier": "12345678",
"HorizontalResolution": 8,
"VerticalResolution": 8,
"PrintableWidthMM": 72,
"PaperWidthMM": 80,
"PollingInterval": 1,
"ClientType": "Star mC-Print3",
"LastConnection": 24627231.566811,
"QueuedJobs": 0,
"GroupInfo": {
"Name": "SampleName",
"MatchPath": "SampleMatchPath",
"Owner": "SampleOwnerName"
},
"SerialNumber": "xxxxxxxxxxxxxxxx",
"Notes": "SampleNotes",
"DeleteFlag": false,
"MetaInfo": [
{
"MetaInfoKeyId": 4,
"MetaInfoValueId": 3
},
{
"MetaInfoKeyId": 9,
"CustomValue": "SampleCustomValue"
}
]
}
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array",
"items": {
"type": "object",
"properties": {
"Mac": {
"type": "string",
"description": "Unique Mac address of the printer device"
},
"Id": {
"type": "string",
"description": "ID/name assigned to the device"
},
"Status": {
"type": "object",
"properties": {
"Online": {
"type": "boolean"
},
"CoverOpen": {
"type": "boolean"
},
"CompulsionSwitch": {
"type": "boolean"
},
"OverTemperature": {
"type": "boolean"
},
"Recoverable": {
"type": "boolean"
},
"CutterError": {
"type": "boolean"
},
"MechanicalError": {
"type": "boolean"
},
"ReceiveBufferOverflow": {
"type": "boolean"
},
"BlackMarkError": {
"type": "boolean"
},
"PresenterPaperJam": {
"type": "boolean"
},
"VoltageError": {
"type": "boolean"
},
"PaperEmpty": {
"type": "boolean"
},
"PaperLow": {
"type": "boolean"
},
"HoldPrint": {
"type": "boolean"
},
"RollPositionError": {
"type": "boolean"
},
"PartsReplacementNotification": {
"type": "boolean"
},
"CleaningNotification": {
"type": "boolean"
},
"Description": {
"type": "string"
},
"MinWarningLevel": {
"type": "number"
}
}
},
"AccessIdentifier": {
"type": "string",
"description": "Application access ID of the device"
},
"HorizontalResolution": {
"type": "number",
"description": "Horizontal print resolution of the device (dots/mm)"
},
"VerticalResolution": {
"type": "number",
"description": "Vertical print resolution of the device (dots/mm)"
},
"PrintableWidthMM": {
"type": "number",
"description": "Printable area of the device (mm)"
},
"PaperWidthMM": {
"type": "number",
"description": "Width of the paper set in the device (mm)"
},
"PollingInterval": {
"type": "number",
"description": "Interval to send polling requests to CloudPRNT"
},
"ClientType": {
"type": "string",
"description": "Client type identifier"
},
"LastConnection": {
"type": "number",
"description": "The elapsed time (in seconds) since the StarIO.Online server last received an HTTP request from the device. * Note: For devices connected via MQTT, this value will always be 0."
},
"QueuedJobs": {
"type": "number",
"description": "Number of pending jobs in the device's print queue"
},
"GroupInfo": {
"type": "object",
"properties": {
"Name": {
"type": "string"
},
"MatchPath": {
"type": "string"
},
"Owner": {
"type": "string"
}
},
"description": "Information about the group to which the device belongs"
},
"SerialNumber": {
"type": "string",
"description": "Serial number of device"
},
"Notes": {
"type": "string",
"description": "Optional string that can be set for the device"
},
"DeleteFlag": {
"type": "boolean",
"description": "Delete flag"
},
"MetaInfo": {
"type": "array",
"description": "Meta information assigned to the device"
}
},
"required": [
"Mac",
"Id",
"Status",
"AccessIdentifier",
"HorizontalResolution",
"VerticalResolution",
"PrintableWidthMM",
"PaperWidthMM",
"PollingInterval",
"LastConnection",
"QueuedJobs",
"GroupInfo",
"SerialNumber",
"DeleteFlag",
"MetaInfo"
]
}
}
400
Headers
Content-Type: text/plain
Body
Bad Request
403
Headers
Content-Type: text/plain
Body
Forbidden
Retrieve, update, and delete device details ¶
Retrieve device details
GET/a/{groupPath}/d/{appId}{?notes}
Returns detailed information about the device
connected to the specified device group.
The
device group must belong to the account authenticated
by the API key.
Required permission: ViewDevice
This LastConnection property indicates the number of
seconds that have passed since the StarIO.Online
server last received an HTTP request from the device.
This property can be used to determine whether a
device is connected to or disconnected from the
StarIO.Online server.
(Reference) The StarIO.Online dashboard
determines the connection status of devices based on
the following conditions:
■ Connection Lost: LastConnection >
PollingInterval + 30 seconds
■ Online: LastConnection ≤ PollingInterval + 30
seconds
* PollingInterval refers to the interval (in
seconds) at which the device polls the server.
Example URI
- appId
-
string(required) Example: 12345678Application access ID of the device
- groupPath
-
string(required) Example: SampleGroupPathPath used to identify the device group
- notes
-
boolean(optional) Example: trueWhether to include Notes in the response
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
200
Headers
Content-Type: application/json
Body
{
"Mac": "xxxxxxxxxxxx",
"Id": "Sample",
"Status": {
"Online": true,
"CoverOpen": false,
"CompulsionSwitch": false,
"OverTemperature": false,
"Recoverable": false,
"CutterError": false,
"MechanicalError": false,
"ReceiveBufferOverflow": false,
"BlackMarkError": false,
"PresenterPaperJam": false,
"VoltageError": false,
"PaperEmpty": false,
"PaperLow": false,
"HoldPrint": false,
"RollPositionError": false,
"PartsReplacementNotification": false,
"CleaningNotification": false,
"Description": null,
"MinWarningLevel": 0
},
"AccessIdentifier": "12345678",
"HorizontalResolution": 8,
"VerticalResolution": 8,
"PrintableWidthMM": 50.8,
"PaperWidthMM": 58,
"PollingInterval": 1,
"ClientType": "Star mC-Print2",
"LastConnection": 922370.225284,
"QueuedJobs": 0,
"GroupInfo": {
"Name": "SampleName",
"MatchPath": "SampleMatchPath",
"Owner": "SampleOwnerName"
},
"SerialNumber": "xxxxxxxxxxxxxxxx",
"Notes": "SampleNotes",
"MetaInfo": [
{
"MetaInfoKeyId": 4,
"MetaInfoValueId": 3
},
{
"MetaInfoKeyId": 9,
"CustomValue": "SampleCustomValue"
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"Mac": {
"type": "string",
"description": "Unique Mac address of the device"
},
"Id": {
"type": "string",
"description": "ID/name assigned to the device"
},
"Status": {
"type": "object",
"properties": {
"Online": {
"type": "boolean"
},
"CoverOpen": {
"type": "boolean"
},
"CompulsionSwitch": {
"type": "boolean"
},
"OverTemperature": {
"type": "boolean"
},
"Recoverable": {
"type": "boolean"
},
"CutterError": {
"type": "boolean"
},
"MechanicalError": {
"type": "boolean"
},
"ReceiveBufferOverflow": {
"type": "boolean"
},
"BlackMarkError": {
"type": "boolean"
},
"PresenterPaperJam": {
"type": "boolean"
},
"VoltageError": {
"type": "boolean"
},
"PaperEmpty": {
"type": "boolean"
},
"PaperLow": {
"type": "boolean"
},
"HoldPrint": {
"type": "boolean"
},
"RollPositionError": {
"type": "boolean"
},
"PartsReplacementNotification": {
"type": "boolean"
},
"CleaningNotification": {
"type": "boolean"
},
"Description": {
"type": "string"
},
"MinWarningLevel": {
"type": "number"
}
},
"description": "Printer status object representing the last uploaded status of the device"
},
"AccessIdentifier": {
"type": "string",
"description": "Application access ID of the device"
},
"HorizontalResolution": {
"type": "number",
"description": "Horizontal print resolution of the device (dots/mm)"
},
"VerticalResolution": {
"type": "number",
"description": "Vertical print resolution of the device (dots/mm)"
},
"PrintableWidthMM": {
"type": "number",
"description": "Printable area of the device (mm)"
},
"PaperWidthMM": {
"type": "number",
"description": "Width of the paper set in the device (mm)"
},
"PollingInterval": {
"type": "number",
"description": "Interval to send polling requests to CloudPRNT"
},
"ClientType": {
"type": "string",
"description": "Client type identifier"
},
"LastConnection": {
"type": "number",
"description": "The elapsed time (in seconds) since the StarIO.Online server last received an HTTP request from the device. * Note: For devices connected via MQTT, this value will always be 0."
},
"QueuedJobs": {
"type": "number",
"description": "Number of pending jobs in the device's print queue"
},
"GroupInfo": {
"type": "object",
"properties": {
"Name": {
"type": "string"
},
"MatchPath": {
"type": "string"
},
"Owner": {
"type": "string"
}
},
"description": "Information about the group to which the device belongs"
},
"SerialNumber": {
"type": "string",
"description": "Serial number of the device"
},
"Notes": {
"type": "string",
"description": "Optional string that can be set for the device"
},
"MetaInfo": {
"type": "array",
"description": "Meta information assigned to the device"
}
},
"required": [
"Mac",
"Id",
"Status",
"AccessIdentifier",
"HorizontalResolution",
"VerticalResolution",
"PrintableWidthMM",
"PaperWidthMM",
"PollingInterval",
"ClientType",
"LastConnection",
"QueuedJobs",
"GroupInfo",
"SerialNumber",
"MetaInfo"
]
}
400
Headers
Content-Type: text/plain
Body
Bad Request
403
Headers
Content-Type: text/plain
Body
Forbidden
404
Headers
Content-Type: text/plain
Body
Not Found
Update device
PUT/a/{groupPath}/d/{appId}
Updates the information of the device connected to the
specified device group.
The device group must
belong to the account authenticated by the API key.
Required permission: ModifyDevice
Example URI
- appId
-
string(required) Example: 12345678Application access ID of the device
- groupPath
-
string(required) Example: SampleGroupPathPath used to identify the device group
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
Body
{
"RequestIdChange": "xxxxxxxxxxxxxx",
"RenewPageInfo": false,
"GenerateNewAccessID": false,
"Notes": "xxxx",
"MetaInfo": [
{
"MetaInfoKeyId": 4,
"MetaInfoValueId": 3
},
{
"MetaInfoKeyId": 9,
"CustomValue": "SampleCustomValue"
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"RequestIdChange": {
"type": "string",
"description": "Requests a change to the device's ID/name. This request is queued by the service and processed the next time the device communicates with the service."
},
"RenewPageInfo": {
"type": "boolean",
"description": "If true, the service re-queries the device's paper configuration. This can be used if the device has been configured to use a different paper since the last query by the service."
},
"GenerateNewAccessID": {
"type": "boolean",
"description": "If true, the service assigns a new ApplicationAccessID to the device."
},
"Notes": {
"type": "string",
"description": "A key that allows adding any string as a note."
},
"MetaInfo": {
"type": "array",
"description": "Meta information assigned to the device."
}
},
"required": [
"MetaInfo"
]
}
200
400
Headers
Content-Type: text/plain
Body
Bad Request
403
Headers
Content-Type: text/plain
Body
Forbidden
404
Headers
Content-Type: text/plain
Body
Not Found
Delete device
DELETE/a/{groupPath}/d/{appId}
Deletes the device connected to the specified device
group.
The device group must belong to the
account authenticated by the API key.
Required permission: DeleteDevice
If “Auto-create new device queue” is enabled in the device group, the deleted printer will be re-added to the device group the next time it polls the service, as long as it is online and still polling the service.
Example URI
- appId
-
string(required) Example: 12345678Application access ID of the device
- groupPath
-
string(required) Example: SampleGroupPathPath used to identify the device group
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
200
403
Headers
Content-Type: application/json
Body
Forbidden
404
Headers
Content-Type: text/plain
Body
Not Found
Print Queue ¶
Print and delete documents ¶
Print document
POST/a/{groupPath}/d/{appId}/q{?name}{&copies}{&startbuzzer}{&endbuzzer}{&drawer}{&endcut}{&endfeed}
Sends a document to the device’s print queue.
The sent document is queued as a job and printed
in the order it was queued.
Required permission: PrintToDevice
Do not specify the “Star-Pre-Buzzer or Star-Post-Buzzer” header and the “Star-Cash-Drawer” header at the same time as they may not work as expected.
Star-End-Doc-Cut/endcut and Star-End-Doc-Feed/endfeed apply only to print jobs provided in formats that cannot specify cut or cut/feed operations as part of the document. For example, they apply to HTML, JPEG, PNG, and plain text-based print jobs, but are ignored for Star Document Markup-based jobs that already provide cut/feed operations as markup tags.
Specified value range for
「Star-Pre-Buzzer/startbuzzer or
Star-Post-Buzzer/endbuzzer 」from ‘1’ to ‘20’
(The number of times specification does not work
in mC-Sound, so please specify 1.)
If a device connected via MQTT does not reflect the
updated print width, try one of the following:
1. On the Dashboard’s “Device” page, open the
“Device details” dialog and click “Sync with devices
reported paper size”.
2. Call the Device Update
API with the request parameter
"RenewPageInfo": true.
Example URI
- appId
-
string(required) Example: 12345678Application access ID of the device
- groupPath
-
string(required) Example: SampleGroupPathPath used to identify the device group
- name
-
string(optional) Example: sampleSpecifies the name of the print job. The name is used to identify the print result of this job in Webhook event notifications. It can also be specified with the
Star-Job-Nameheader. If both are specified, the header value takes precedence. - copies
-
number(optional) Example: 1Specifies the number of copies to print. The value can be from 1 to 10. It can also be specified with the
Star-Copiesheader. If both are specified, the header value takes precedence. - startbuzzer
-
number(optional) Example: 1Specifies the number of times to sound the buzzer connected to the device before printing. The value can be from 1 to 20. It can also be specified with the
Star-Pre-Buzzerheader. If both are specified, the header value takes precedence. - endbuzzer
-
number(optional) Example: 1Specifies the number of times to sound the buzzer connected to the device after printing. The value can be from 1 to 20. It can also be specified with the
Star-Post-Buzzerheader. If both are specified, the header value takes precedence. - drawer
-
string(optional) Example: noneSpecifies when to open the cash drawer connected to the printer. The value can be
none,start, orend. It can also be specified with theStar-Cash-Drawerheader. If both are specified, the header value takes precedence. - endcut
-
string(optional) Example: noneSpecifies the type of cut to perform at the end of the print job. The value can be
none,partial, orfull. It can also be specified with theStar-End-Doc-Cutheader. If both are specified, the header value takes precedence. - endfeed
-
string(optional) Example: noneSpecifies whether to feed the end of the document over the auto-cutter before cutting. The value can be
none,false,true, orfeed. It can also be specified with theStar-End-Doc-Feedheader. If both are specified, the header value takes precedence.
Headers
Content-Type: text/vnd.star.markup, text/html, text/plain, image/png, image/jpeg
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
Star-Job-Name: `sample-job` (string) - Optional job name
Star-Copies: `1` (number) - Optional number of copies
Star-Pre-Buzzer: `1` (number) - Optional number of pre-print buzzer sounds
Star-Post-Buzzer: `1` (number) - Optional number of post-print buzzer sounds
Star-Cash-Drawer: `none` (string) - Optional cash drawer setting,specify none,start,end.
Star-End-Doc-Cut: `none` (string) - Optional cut setting at the end of the document,specify none,partial,full.
Star-End-Doc-Feed: `none` (string) - Optional feed setting at the end of the document,specify none,false,true,feed.
Body
Binary data
201
Headers
Content-Type: application/json
Body
{
"Location": "/v1/a/SampleGroupPath/d/12345678/q/1234567",
"JobId": "1234567",
"Name": "xxxxxxxx"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"Location": {
"type": "string",
"description": "Endpoint to access the created resource"
},
"JobId": {
"type": "string",
"description": "Print job ID"
},
"Name": {
"type": "string",
"description": "The optional name assigned to a print job. If not specified, a random string will be automatically assigned. * Note: The JobName in this context will be identical to the JobName property of the Webhook. Additionally, for XSS prevention, a double quote (") will be automatically escaped as (\") and a backslash (\) as (\\)."
}
}
}
400
Headers
Content-Type: text/plain
Body
Bad Request
403
Headers
Content-Type: text/plain
Body
Forbidden
404
Headers
Content-Type: text/plain
Body
Not Found
411
Headers
Content-Type: text/plain
Body
Length Required
415
Headers
Content-Type: text/plain
Body
Unsupported Media Type
422
Headers
Content-Type: text/plain
Body
Unprocessable Entity
429
Headers
Content-Type: text/plain
Body
Too Many Requests
Delete document
DELETE/a/{groupPath}/d/{appId}/q
Deletes all pending jobs from the device’s print
queue.
This is typically used to delete
unnecessary jobs that accumulate when the printer is
offline.
Required permission: FlushQueue
Example URI
- appId
-
string(required) Example: 12345678Application access ID of the device
- groupPath
-
string(required) Example: SampleGroupPathPath used to identify the device group
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
200
Headers
Content-Type: application/json
Body
[
"2027655",
"2027656"
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array",
"items": [
{
"type": "string"
},
{
"type": "string"
}
]
}
403
Headers
Content-Type: text/plain
Body
Forbidden
404
Headers
Content-Type: text/plain
Body
Not Found
409
Headers
Content-Type: text/plain
Body
Conflict
Print using a template ¶
Print template
POST/a/{groupPath}/d/{appId}/q/template{?name}{&copies}{&startbuzzer}{&endbuzzer}{&drawer}
Merges field data into a registered template and sends it to the device’s print queue. The sent document is queued as a job and printed in the order it was queued. For creating, updating, and deleting templates, see the Template chapter.
Required permission: PrintToDevice
Do not specify the “Star-Pre-Buzzer or Star-Post-Buzzer” header and the “Star-Cash-Drawer” header at the same time as they may not work as expected.
Specified value range for
「Star-Pre-Buzzer/startbuzzer or
Star-Post-Buzzer/endbuzzer 」from ‘1’ to ‘20’
(The
number of times specification does not work in
mC-Sound, so please specify 1.)
Example URI
- appId
-
string(required) Example: 12345678Application access ID of the device
- groupPath
-
string(required) Example: SampleGroupPathPath used to identify the device group
- name
-
string(optional) Example: sampleSpecifies the name of the print job. The name is used to identify the print result of this job in Webhook event notifications. It can also be specified with the
Star-Job-Nameheader. If both are specified, the header value takes precedence. - copies
-
number(optional) Example: 1Specifies the number of copies to print. The value can be from 1 to 10. It can also be specified with the
Star-Copiesheader. If both are specified, the header value takes precedence. - startbuzzer
-
number(optional) Example: 1Specifies the number of times to sound the buzzer connected to the device before printing. The value can be from 1 to 20. It can also be specified with the
Star-Pre-Buzzerheader. If both are specified, the header value takes precedence. - endbuzzer
-
number(optional) Example: 1Specifies the number of times to sound the buzzer connected to the device after printing. The value can be from 1 to 20. It can also be specified with the
Star-Post-Buzzerheader. If both are specified, the header value takes precedence. - drawer
-
string(optional) Example: noneSpecifies when to open the cash drawer connected to the printer. The value can be
none,start, orend. It can also be specified with theStar-Cash-Drawerheader. If both are specified, the header value takes precedence.
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
Star-Job-Name: `sample-job` (string) - Optional job name
Star-Copies: `1` (number) - Optional number of copies
Star-Pre-Buzzer: `1` (number) - Optional number of pre-print buzzer sounds
Star-Post-Buzzer: `1` (number) - Optional number of post-print buzzer sounds
Star-Cash-Drawer: `none` (string) - Optional cash drawer setting,specify none,start,end.
Body
{
"templateId": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
"data": {
"shopName": "Star Cafe Tokyo",
"orderId": "1001",
"total": 1430
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"templateId": {
"type": "string",
"description": "ID of the registered template to print"
},
"data": {
"type": "object",
"properties": {
"shopName": {
"type": "string"
},
"orderId": {
"type": "string"
},
"total": {
"type": "number"
}
},
"description": "Field data to merge into the template. No error occurs when field data that does not exist in the template is specified, or when template notation with no corresponding field data remains; it is printed as is"
}
},
"required": [
"templateId",
"data"
]
}
201
Headers
Content-Type: application/json
Body
{
"Name": "xxxxxxxx"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"Name": {
"type": "string",
"description": "The optional name assigned to a print job. If not specified, a random string will be automatically assigned. * Note: The JobName in this context will be identical to the JobName property of the Webhook. Additionally, for XSS prevention, a double quote (\") will be automatically escaped as (\\\") and a backslash () as (\\)."
}
}
}
400
Headers
Content-Type: text/plain
Body
Bad Request
403
Headers
Content-Type: text/plain
Body
Forbidden
404
Headers
Content-Type: text/plain
Body
Not Found
413
Headers
Content-Type: text/plain
Body
Payload Too Large
422
Headers
Content-Type: text/plain
Body
Unprocessable Entity
429
Headers
Content-Type: text/plain
Body
Too Many Requests
Print a template specified inline ¶
Print inline template
POST/a/{groupPath}/d/{appId}/q/template/inline{?name}{&copies}{&startbuzzer}{&endbuzzer}{&drawer}
Merges field data into a template included in the request and sends it to the device’s print queue. Because no template needs to be registered, this is useful for verifying behavior or for one-off printing. For the format of the template body, see the Template chapter.
Required permission: PrintToDevice
Do not specify the “Star-Pre-Buzzer or Star-Post-Buzzer” header and the “Star-Cash-Drawer” header at the same time as they may not work as expected.
Specified value range for
「Star-Pre-Buzzer/startbuzzer or
Star-Post-Buzzer/endbuzzer 」from ‘1’ to ‘20’
(The
number of times specification does not work in
mC-Sound, so please specify 1.)
Example URI
- appId
-
string(required) Example: 12345678Application access ID of the device
- groupPath
-
string(required) Example: SampleGroupPathPath used to identify the device group
- name
-
string(optional) Example: sampleSpecifies the name of the print job. The name is used to identify the print result of this job in Webhook event notifications. It can also be specified with the
Star-Job-Nameheader. If both are specified, the header value takes precedence. - copies
-
number(optional) Example: 1Specifies the number of copies to print. The value can be from 1 to 10. It can also be specified with the
Star-Copiesheader. If both are specified, the header value takes precedence. - startbuzzer
-
number(optional) Example: 1Specifies the number of times to sound the buzzer connected to the device before printing. The value can be from 1 to 20. It can also be specified with the
Star-Pre-Buzzerheader. If both are specified, the header value takes precedence. - endbuzzer
-
number(optional) Example: 1Specifies the number of times to sound the buzzer connected to the device after printing. The value can be from 1 to 20. It can also be specified with the
Star-Post-Buzzerheader. If both are specified, the header value takes precedence. - drawer
-
string(optional) Example: noneSpecifies when to open the cash drawer connected to the printer. The value can be
none,start, orend. It can also be specified with theStar-Cash-Drawerheader. If both are specified, the header value takes precedence.
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
Star-Job-Name: `sample-job` (string) - Optional job name
Star-Copies: `1` (number) - Optional number of copies
Star-Pre-Buzzer: `1` (number) - Optional number of pre-print buzzer sounds
Star-Post-Buzzer: `1` (number) - Optional number of post-print buzzer sounds
Star-Cash-Drawer: `none` (string) - Optional cash drawer setting,specify none,start,end.
Body
{
"rawTemplate": {
"formatType": 0,
"body": "[align: centre]\n${message}\n[cut]"
},
"data": {
"message": "Hello, World!"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"rawTemplate": {
"type": "object",
"properties": {
"formatType": {
"type": "number",
"description": "0: Star Document Markup, 1: StarXpand Command"
},
"body": {
"type": "string",
"description": "Template body (UTF-8)"
}
},
"required": [
"formatType",
"body"
],
"description": "Template to print"
},
"data": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"description": "Field data to merge into the template"
}
},
"required": [
"rawTemplate",
"data"
]
}
201
Headers
Content-Type: application/json
Body
{
"Name": "xxxxxxxx"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"Name": {
"type": "string",
"description": "The optional name assigned to a print job. If not specified, a random string will be automatically assigned. * Note: The JobName in this context will be identical to the JobName property of the Webhook. Additionally, for XSS prevention, a double quote (\") will be automatically escaped as (\\\") and a backslash () as (\\)."
}
}
}
400
Headers
Content-Type: text/plain
Body
Bad Request
403
Headers
Content-Type: text/plain
Body
Forbidden
404
Headers
Content-Type: text/plain
Body
Not Found
413
Headers
Content-Type: text/plain
Body
Payload Too Large
422
Headers
Content-Type: text/plain
Body
Unprocessable Entity
429
Headers
Content-Type: text/plain
Body
Too Many Requests
Print Welcome page ¶
Print Welcome page
PUT/a/{groupPath}/d/{appId}/welcome
Regenerates the Welcome page and adds it to the print queue.
Required permission: PrintToDevice
Example URI
- appId
-
string(required) Example: 12345678Application access ID of the device
- groupPath
-
string(required) Example: SampleGroupPathPath used to identify the device group
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
200
403
Headers
Content-Type: text/plain
Body
Forbidden
404
Headers
Content-Type: text/plain
Body
Not Found
429
Headers
Content-Type: text/plain
Body
Too Many Requests
507
Headers
Content-Type: text/plain
Body
Insufficient Storage
Send StarConfiguration ¶
Send StarConfiguration
POST/a/{groupPath}/d/{appId}/configuration
Sends StarConfiguration to the device.
Required permission: ConfigureDevice
Example URI
- appId
-
string(required) Example: 12345678Application access ID of the device
- groupPath
-
string(required) Example: SampleGroupPathPath used to identify the device group
Headers
Content-Type: application/vnd.star.starconfiguration
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
Body
StarConfigurationFormatData
201
400
Headers
Content-Type: text/plain
Body
Bad Request
403
Headers
Content-Type: text/plain
Body
Forbidden
404
Headers
Content-Type: text/plain
Body
Not Found
415
Headers
Content-Type: text/plain
Body
Unsupported Media Type
429
Headers
Content-Type: text/plain
Body
Too Many Requests
Template ¶
Template printing registers a print layout as a “template”
and prints it by merging variable data (field data) such
as product names and prices, supplied in JSON format. A
template can be written in one of two formats:
Star Document Markup
and
StarXpand Command. StarXpand Command is the JSON data obtained from the
StarXpandCommandBuilder.getCommands()
API of the StarXpand SDK.
A template can be registered and reused, or included
directly in a request and printed without being
registered. This chapter covers creating, retrieving, updating,
and deleting templates. For printing, see “Print template”
and “Print inline template” in the
Print Queue chapter.
Walks through creating a template and printing with it, with sample code.
・Template printing cannot be used with Email printing.
・One request creates one print job. (The number of copies
is specified with the Star-Copies header or
the copies query parameter.)
・A template body must not exceed 2MB, measured as its UTF-8
byte count. The print data generated by merging the
template with the field data (the print commands) must not
exceed the size the destination printer can receive, as
shown below. If any of these limits is exceeded,
413 Payload Too Large is returned.
| Destination printer | Print data limit |
|---|---|
| mC-Label3, IFBD-HI01X/HI02X | Up to 2,097,151 bytes (less than 2MB) |
| Other printers | Up to 524,288 bytes (512KB) |
FormatType is 1
(StarXpand Command), the template body must be valid JSON
and must contain
"title":"StarXpandCommand" and a
"version" key at its root. If
these conditions are not met, creating or updating a
template returns 400 Bad Request, and printing an
inline template returns
422 Unprocessable Entity.
Create a template and retrieve a list of templates ¶
Create template
POST/template
Creates a new template. The template body (TemplateBody) is not included in the response.
Required permission: CreateTemplates
・A template must be linked to at least one device
group.
・Up to 10 templates can be registered.
Example URI
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
Body
{
"Name": "SampleTemplateName",
"Description": "SampleDescription",
"FormatType": 0,
"TemplateBody": "[align: centre]\n${shopName}\n[cut]",
"MatchPaths": [
"SampleMatchPath1",
"SampleMatchPath2"
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"Name": {
"type": "string",
"description": "Template name"
},
"Description": {
"type": "string",
"description": "Description of the template"
},
"FormatType": {
"type": "number",
"description": "0: Star Document Markup, 1: StarXpand Command"
},
"TemplateBody": {
"type": "string",
"description": "Template body (UTF-8). Template specific notation such as `${shopName}` or `[cut]` is stored as is, without being converted"
},
"MatchPaths": {
"type": "array",
"description": "MatchPaths of the device groups to link the template to. At least one is required, and the same MatchPath cannot be specified more than once"
}
},
"required": [
"Name",
"FormatType",
"TemplateBody",
"MatchPaths"
]
}
201
Headers
Content-Type: application/json
Body
{
"TemplateId": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
"Name": "SampleTemplateName",
"Format": {
"FormatType": 0,
"FormatValue": "Star Document Markup"
},
"GroupInfo": [
{
"Name": "SampleName",
"MatchPath": "SampleMatchPath",
"Owner": "SampleOwnerName"
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"TemplateId": {
"type": "string",
"description": "ID used to identify the created template"
},
"Name": {
"type": "string",
"description": "Template name"
},
"Format": {
"type": "object",
"properties": {
"FormatType": {
"type": "number",
"description": "0: Star Document Markup, 1: StarXpand Command"
},
"FormatValue": {
"type": "string",
"description": "Display name of the format"
}
},
"required": [
"FormatType",
"FormatValue"
],
"description": "Format of the template"
},
"GroupInfo": {
"type": "array",
"items": {
"type": "object",
"properties": {
"Name": {
"type": [
"string",
"null"
],
"description": "Device group name"
},
"MatchPath": {
"type": "string",
"description": "Path used to identify the device group"
},
"Owner": {
"type": "string",
"description": "User name of the device group owner"
}
}
},
"description": "Information about the device groups the template is linked to"
}
},
"required": [
"TemplateId",
"Name",
"Format",
"GroupInfo"
]
}
400
Returned in any of the following cases.
・An empty string is specified for Name or
TemplateBody
・An empty array is specified for
MatchPaths
・A FormatType other than the defined values is
specified
・A MatchPath of a device group that does not exist
is specified
・The same MatchPath is specified more than once
Headers
Content-Type: text/plain
Body
Bad Request
403
Headers
Content-Type: text/plain
Body
Forbidden
409
Returned when the number of registered templates has reached the maximum (10).
Headers
Content-Type: text/plain
Body
Conflict
413
Headers
Content-Type: text/plain
Body
Payload Too Large
Retrieve template list
GET/template
Returns a list of the registered templates. The template body (TemplateBody) is not included.
Required permission: ViewTemplates
Example URI
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
200
Headers
Content-Type: application/json
Body
[
{
"TemplateId": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
"Name": "SampleTemplateName",
"Description": "SampleDescription",
"Format": {
"FormatType": 0,
"FormatValue": "Star Document Markup"
},
"GroupInfo": [
{
"Name": "SampleName",
"MatchPath": "SampleMatchPath",
"Owner": "SampleOwnerName"
}
]
}
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array",
"items": {
"type": "object",
"properties": {
"TemplateId": {
"type": "string",
"description": "ID used to identify the template"
},
"Name": {
"type": "string",
"description": "Template name"
},
"Description": {
"type": [
"string",
"null"
],
"description": "Description of the template. null if not set"
},
"Format": {
"type": "object",
"properties": {
"FormatType": {
"type": "number",
"description": "0: Star Document Markup, 1: StarXpand Command"
},
"FormatValue": {
"type": "string",
"description": "Display name of the format. Use FormatType to determine the format"
}
},
"required": [
"FormatType",
"FormatValue"
],
"description": "Format of the template"
},
"GroupInfo": {
"type": "array",
"items": {
"type": "object",
"properties": {
"Name": {
"type": [
"string",
"null"
],
"description": "Device group name"
},
"MatchPath": {
"type": "string",
"description": "Path used to identify the device group"
},
"Owner": {
"type": "string",
"description": "User name of the device group owner"
}
}
},
"description": "Information about the device groups the template is linked to"
}
},
"required": [
"TemplateId",
"Name",
"Description",
"Format",
"GroupInfo"
]
}
}
403
Headers
Content-Type: text/plain
Body
Forbidden
Retrieve, update, and delete template details ¶
Retrieve template details
GET/template/{templateId}
Returns the details of the specified template. The template body (TemplateBody) is included.
Required permission: ViewTemplates
Example URI
- templateId
-
string(required) Example: a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11ID used to identify the template
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
200
Headers
Content-Type: application/json
Body
{
"TemplateId": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
"Name": "SampleTemplateName",
"Description": "SampleDescription",
"Format": {
"FormatType": 0,
"FormatValue": "Star Document Markup"
},
"TemplateBody": "[align: centre]\n${shopName}\n[cut]",
"GroupInfo": [
{
"Name": "SampleName",
"MatchPath": "SampleMatchPath",
"Owner": "SampleOwnerName"
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"TemplateId": {
"type": "string",
"description": "ID used to identify the template"
},
"Name": {
"type": "string",
"description": "Template name"
},
"Description": {
"type": [
"string",
"null"
],
"description": "Description of the template. null if not set"
},
"Format": {
"type": "object",
"properties": {
"FormatType": {
"type": "number",
"description": "0: Star Document Markup, 1: StarXpand Command"
},
"FormatValue": {
"type": "string",
"description": "Display name of the format"
}
},
"required": [
"FormatType",
"FormatValue"
],
"description": "Format of the template"
},
"TemplateBody": {
"type": "string",
"description": "Template body"
},
"GroupInfo": {
"type": "array",
"items": {
"type": "object",
"properties": {
"Name": {
"type": [
"string",
"null"
],
"description": "Device group name"
},
"MatchPath": {
"type": "string",
"description": "Path used to identify the device group"
},
"Owner": {
"type": "string",
"description": "User name of the device group owner"
}
}
},
"description": "Information about the device groups the template is linked to"
}
},
"required": [
"TemplateId",
"Name",
"Description",
"Format",
"TemplateBody",
"GroupInfo"
]
}
403
Headers
Content-Type: text/plain
Body
Forbidden
404
Headers
Content-Type: text/plain
Body
Not Found
Update template
PUT/template/{templateId}
Updates the information of the specified template. Any
item that is not specified keeps its current value.
FormatType and TemplateBody must both be specified
even when changing only one of them. To clear
Description, specify an empty string
("").
Required permission: ModifyTemplates
Example URI
- templateId
-
string(required) Example: a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11ID used to identify the template
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
Body
{
"Name": "SampleTemplateName",
"Description": "SampleDescription",
"FormatType": 0,
"TemplateBody": "[align: centre]\n${shopName}\n[cut]",
"MatchPaths": [
"SampleMatchPath1",
"SampleMatchPath2"
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"Name": {
"type": "string",
"description": "Template name"
},
"Description": {
"type": "string",
"description": "Description of the template"
},
"FormatType": {
"type": "number",
"description": "0: Star Document Markup, 1: StarXpand Command"
},
"TemplateBody": {
"type": "string",
"description": "Template body"
},
"MatchPaths": {
"type": "array",
"description": "MatchPaths of the device groups to link the template to. At least one is required when specified, and the same MatchPath cannot be specified more than once"
}
}
}
200
Headers
Content-Type: application/json
Body
{
"TemplateId": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
"Name": "SampleTemplateName",
"Description": "SampleDescription",
"Format": {
"FormatType": 0,
"FormatValue": "Star Document Markup"
},
"GroupInfo": [
{
"Name": "SampleName",
"MatchPath": "SampleMatchPath",
"Owner": "SampleOwnerName"
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"TemplateId": {
"type": "string",
"description": "ID used to identify the template"
},
"Name": {
"type": "string",
"description": "Template name"
},
"Description": {
"type": [
"string",
"null"
],
"description": "Description of the template. null if not set"
},
"Format": {
"type": "object",
"properties": {
"FormatType": {
"type": "number",
"description": "0: Star Document Markup, 1: StarXpand Command"
},
"FormatValue": {
"type": "string",
"description": "Display name of the format"
}
},
"required": [
"FormatType",
"FormatValue"
],
"description": "Format of the template"
},
"GroupInfo": {
"type": "array",
"items": {
"type": "object",
"properties": {
"Name": {
"type": [
"string",
"null"
],
"description": "Device group name"
},
"MatchPath": {
"type": "string",
"description": "Path used to identify the device group"
},
"Owner": {
"type": "string",
"description": "User name of the device group owner"
}
}
},
"description": "Information about the device groups the template is linked to"
}
},
"required": [
"TemplateId",
"Name",
"Description",
"Format",
"GroupInfo"
]
}
400
Returned in any of the following cases.
・An empty string is specified for Name or
TemplateBody
・An empty array is specified for
MatchPaths
・A FormatType other than the defined values is
specified
・A change to only one of FormatType and
TemplateBody is specified
・A MatchPath of a device group that does not exist
is specified
・The same MatchPath is specified more than once
Headers
Content-Type: text/plain
Body
Bad Request
403
Headers
Content-Type: text/plain
Body
Forbidden
404
Headers
Content-Type: text/plain
Body
Not Found
413
Headers
Content-Type: text/plain
Body
Payload Too Large
Delete template
DELETE/template/{templateId}
Deletes the specified template.
Required permission: DeleteTemplates
When a device group is deleted, any template that is not linked to any other device group is deleted as well.
Example URI
- templateId
-
string(required) Example: a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11ID used to identify the template
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
200
403
Headers
Content-Type: text/plain
Body
Forbidden
404
Headers
Content-Type: text/plain
Body
Not Found
Webhook Notifications ¶
Retrieve and create Webhooks ¶
Retrieve Webhook list
GET/a/{groupPath}/n
Returns a list of Webhooks for the specified device
group.
The device group must belong to the
account authenticated by the API key.
Required permission: ManageNotifications
Example URI
- groupPath
-
string(required) Example: SampleGroupPathPath used to identify the device group
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
200
Headers
Content-Type: application/json
Body
[
{
"NotificationId": "12345678-1234-1234-1234-123456789ABC",
"Name": "SampleName",
"Target": "SampleURL",
"TargetType": "POST",
"Enabled": true,
"ReportConnectionEvents": true,
"ReportStatusEvents": true,
"ReportPeripheralEvents": true,
"ReportJobEvents": true
}
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array",
"items": {
"type": "object",
"properties": {
"NotificationId": {
"type": "string",
"description": "ID to identify the Webhook."
},
"Name": {
"type": "string",
"description": "Name of the registered Webhook."
},
"Target": {
"type": "string",
"description": "URL for Webhook notifications."
},
"TargetType": {
"type": "string",
"description": "HTTP method, only POST is allowed."
},
"Enabled": {
"type": "boolean",
"description": "Indicates whether the Webhook is enabled or disabled."
},
"ReportConnectionEvents": {
"type": "boolean",
"description": "Indicates whether to notify on connection events to the printer."
},
"ReportStatusEvents": {
"type": "boolean",
"description": "Indicates whether to notify on job events to the printer."
},
"ReportPeripheralEvents": {
"type": "boolean",
"description": "Indicates whether to notify on events related to peripherals."
},
"ReportJobEvents": {
"type": "boolean",
"description": "Indicates whether to notify on printer status changes."
}
}
}
}
400
Headers
Content-Type: text/plain
Body
Bad Request
403
Headers
Content-Type: text/plain
Body
Forbidden
Create Webhook
POST/a/{groupPath}/n
Creates a Webhook for the specified device group.
The device group must belong to the account
authenticated by the API key.
Required permission: ManageNotifications
Example URI
- groupPath
-
string(required) Example: SampleGroupPathPath used to identify the device group
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
Body
{
"Enabled": false,
"Name": "SampleName",
"ReportConnectionEvents": false,
"ReportJobEvents": false,
"ReportPeripheralEvents": false,
"ReportStatusEvents": false,
"Target": "SampleURL",
"TargetType": "POST"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"Enabled": {
"type": "boolean",
"description": "Indicates whether the notification is enabled or disabled."
},
"Name": {
"type": "string",
"description": "Name of the Webhook to be registered."
},
"ReportConnectionEvents": {
"type": "boolean",
"description": "Indicates whether to notify on connection events to the printer."
},
"ReportJobEvents": {
"type": "boolean",
"description": "Indicates whether to notify on job events to the printer."
},
"ReportPeripheralEvents": {
"type": "boolean",
"description": "Indicates whether to notify on events related to peripherals."
},
"ReportStatusEvents": {
"type": "boolean",
"description": "Indicates whether to notify on printer status changes."
},
"Target": {
"type": "string",
"description": "URL for Webhook notifications."
},
"TargetType": {
"type": "string",
"description": "HTTP method. Default is \"POST\"."
}
}
}
201
Headers
Content-Type: application/json
Body
{
"Location": "/v1/a/sample/n/12345678-1234-1234-1234-123456789ABC",
"NotificationId": "12345678-1234-1234-1234-123456789ABC"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"Location": {
"type": "string",
"description": "Endpoint to access the created resource."
},
"NotificationId": {
"type": "string",
"description": "Name of the registered notification."
}
}
}
400
Headers
Content-Type: text/plain
Body
Bad Request
403
Headers
Content-Type: text/plain
Body
Forbidden
404
Headers
Content-Type: text/plain
Body
Not Found
Retrieve, update, and delete Webhook details ¶
Retrieve Webhook details
GET/a/{groupPath}/n/{notificationId}
Returns detailed information about the Webhook for the
specified device group.
The device group must
belong to the account authenticated by the API key.
Required permission: ManageNotifications
Example URI
- groupPath
-
string(required) Example: SampleGroupPathPath used to identify the device group
- notificationId
-
string(required) Example: 12345678-1234-1234-1234-123456789ABCWebhook ID
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
200
Headers
Content-Type: application/json
Body
{
"NotificationId": "12345678-1234-1234-1234-123456789ABC",
"Name": "SampleName",
"Target": "SampleURL",
"TargetType": "POST",
"Enabled": true,
"ReportConnectionEvents": true,
"ReportStatusEvents": true,
"ReportPeripheralEvents": true,
"ReportJobEvents": true
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"NotificationId": {
"type": "string",
"description": "ID to identify the Webhook."
},
"Name": {
"type": "string",
"description": "Name of the registered Webhook."
},
"Target": {
"type": "string",
"description": "URL for Webhook notifications."
},
"TargetType": {
"type": "string",
"description": "HTTP method, only POST is allowed."
},
"Enabled": {
"type": "boolean",
"description": "Indicates whether the Webhook is enabled or disabled."
},
"ReportConnectionEvents": {
"type": "boolean",
"description": "Indicates whether to notify on connection events to the printer."
},
"ReportStatusEvents": {
"type": "boolean",
"description": "Indicates whether to notify on job events to the printer."
},
"ReportPeripheralEvents": {
"type": "boolean",
"description": "Indicates whether to notify on events related to peripherals."
},
"ReportJobEvents": {
"type": "boolean",
"description": "Indicates whether to notify on printer status changes."
}
}
}
400
Headers
Content-Type: text/plain
Body
Bad Request
403
Headers
Content-Type: text/plain
Body
Forbidden
404
Headers
Content-Type: text/plain
Body
Not Found
Update Webhook
PUT/a/{groupPath}/n/{notificationId}
Updates the information of the Webhook for the
specified device group.
The device group must
belong to the account authenticated by the API key.
Required permission: ManageNotifications
Example URI
- groupPath
-
string(required) Example: SampleGroupPathPath used to identify the device group
- notificationId
-
string(required) Example: 12345678-1234-1234-1234-123456789ABCWebhook ID
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
Body
{
"Enabled": false,
"Name": "SampleName",
"ReportConnectionEvents": false,
"ReportJobEvents": false,
"ReportPeripheralEvents": false,
"ReportStatusEvents": false,
"Target": "SampleURL",
"TargetType": "POST"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"Enabled": {
"type": "boolean",
"description": "Indicates whether the notification is enabled or disabled."
},
"Name": {
"type": "string",
"description": "Name of the Webhook to be registered."
},
"ReportConnectionEvents": {
"type": "boolean",
"description": "Indicates whether to notify on connection events to the printer."
},
"ReportJobEvents": {
"type": "boolean",
"description": "Indicates whether to notify on job events to the printer."
},
"ReportPeripheralEvents": {
"type": "boolean",
"description": "Indicates whether to notify on events related to peripherals."
},
"ReportStatusEvents": {
"type": "boolean",
"description": "Indicates whether to notify on printer status changes."
},
"Target": {
"type": "string",
"description": "URL for Webhook notifications."
},
"TargetType": {
"type": "string",
"description": "HTTP method. Default is \"POST\"."
}
}
}
200
400
Headers
Content-Type: text/plain
Body
Bad Request
403
Headers
Content-Type: text/plain
Body
Forbidden
404
Headers
Content-Type: text/plain
Body
Not Found
Delete Webhook
DELETE/a/{groupPath}/n/{notificationId}
Deletes the Webhook for the specified device group.
The device group must belong to the account
authenticated by the API key.
Required permission: ManageNotifications
Example URI
- groupPath
-
string(required) Example: SampleGroupPathPath used to identify the device group
- notificationId
-
string(required) Example: 12345678-1234-1234-1234-123456789ABCWebhook ID
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
200
400
Headers
Content-Type: text/plain
Body
Bad Request
403
Headers
Content-Type: text/plain
Body
Forbidden
404
Headers
Content-Type: text/plain
Body
Not Found
History ¶
The History API allows you to retrieve historical information about printers.
Export historical information ¶
Export historical information
GET/history/export
Exports the retrieved historical information about printers.
Required permission: ViewDeviceGroups
The date and time format is output in the format yyyy-MM-dd HH:mm:ss.ffffff in UTC.
startDate and endDate can be specified within a maximum range of 7 days. Additionally, startDate can be specified up to 90 days prior to the request time.
Example URI
- startDate
-
DateTimeOffSet(required) Example: 2025-01-01T00:00:00+09:00Start date of the data to be exported
- endDate
-
DateTimeOffSet(required) Example: 2025-01-02T00:00:00+09:00End date of the data to be exported
- type
-
string(required) Example: bothQuery to narrow down the target data to be exported. Specify from job (print history only), status (printer status history), both (both). The default value is both
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
200
Headers
Content-Type: text/csv
Content-Disposition: attachment; filename="history_yyyyMMddHHmmss.csv"
Body
Date,Status,StatusDisplay,DeviceMAC,SerialNumber,AccessIdentifier,GroupPath,Message,JobLength,JobName,JobPrintAttempts
2025-01-01 00:00:00.000000,0 0 8 0 0 0 0 0 0 0 0 0 0 0 0 0,Offline,xxxxxxxxxxxx,xxxxxxxxxxxxxxxx,xxxxxxxx,sample,,,,
2025-01-01 00:00:00.000000,,Complete,xxxxxxxxxxxx,xxxxxxxxxxxxxxxx,xxxxxxxx,sample,,66954,9b815853,0
2025-01-01 00:00:00.000000,,Received,xxxxxxxxxxxx,xxxxxxxxxxxxxxxx,xxxxxxxx,sample,,66954,9b815853,0
400
Headers
Content-Type: text/plain
Body
Bad Request
403
Headers
Content-Type: text/plain
Body
Forbidden
404
Headers
Content-Type: text/plain
Body
Not Found
MetaInfo ¶
Retrieve device meta information list ¶
Retrieve device meta information list
GET/a/{groupPath}/meta-info
Returns a list of meta information for devices
connected to the specified device group.
The
device group must belong to the account authenticated
by the API key.
Required Permission: ViewDeviceGroups
Example URI
- groupPath
-
string(required) Example: SampleGroupPathThe path used to identify the device group.
Headers
Content-Type: application/json
Star-Api-Key: 12345678-1234-1234-1234-123456789ABC
200
Headers
Content-Type: application/json
Body
[
{
"MetaInfoKeyId": 1,
"Name": "Country",
"Kind": "List",
"MetaInfoValues": [
{
"MetaInfoValueId": 1,
"Name": "Japan"
},
{
"MetaInfoValueId": 2,
"Name": "USA"
},
{
"MetaInfoValueId": 3,
"Name": "UK"
}
]
},
{
"MetaInfoKeyId": 2,
"Name": "Contact (phone number)",
"Kind": "String"
}
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}
403
Headers
Content-Type: text/plain
Body
Forbidden
404
Headers
Content-Type: text/plain
Body
Not Found

