Create a printer
curl --request POST \
--url https://clarus-api.com/api/printers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Clarus-Subdomain: <api-key>' \
--data '
{
"data": {
"type": "printers",
"attributes": {
"name": "Zebra ZD420 - Packing",
"supports_labels": true,
"supports_documents": false,
"is_default": true
}
}
}
'import requests
url = "https://clarus-api.com/api/printers"
payload = { "data": {
"type": "printers",
"attributes": {
"name": "Zebra ZD420 - Packing",
"supports_labels": True,
"supports_documents": False,
"is_default": True
}
} }
headers = {
"Authorization": "Bearer <token>",
"X-Clarus-Subdomain": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'X-Clarus-Subdomain': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
data: {
type: 'printers',
attributes: {
name: 'Zebra ZD420 - Packing',
supports_labels: true,
supports_documents: false,
is_default: true
}
}
})
};
fetch('https://clarus-api.com/api/printers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "3",
"type": "printers",
"attributes": {
"name": "Zebra ZD420 - Packing",
"supports_labels": true,
"supports_documents": false,
"is_default": true
}
}
}{
"error": "<string>"
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}Printers
Create a printer
Register a Cloud Print printer. Printers are linked to a Cloud Print integration and can print documents and/or labels.
POST
/
api
/
printers
Create a printer
curl --request POST \
--url https://clarus-api.com/api/printers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Clarus-Subdomain: <api-key>' \
--data '
{
"data": {
"type": "printers",
"attributes": {
"name": "Zebra ZD420 - Packing",
"supports_labels": true,
"supports_documents": false,
"is_default": true
}
}
}
'import requests
url = "https://clarus-api.com/api/printers"
payload = { "data": {
"type": "printers",
"attributes": {
"name": "Zebra ZD420 - Packing",
"supports_labels": True,
"supports_documents": False,
"is_default": True
}
} }
headers = {
"Authorization": "Bearer <token>",
"X-Clarus-Subdomain": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'X-Clarus-Subdomain': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
data: {
type: 'printers',
attributes: {
name: 'Zebra ZD420 - Packing',
supports_labels: true,
supports_documents: false,
is_default: true
}
}
})
};
fetch('https://clarus-api.com/api/printers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "3",
"type": "printers",
"attributes": {
"name": "Zebra ZD420 - Packing",
"supports_labels": true,
"supports_documents": false,
"is_default": true
}
}
}{
"error": "<string>"
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}Request Structure
{
"data": {
"type": "printers",
"attributes": {
"name": "Zebra ZD420 - Packing",
"supports_labels": true,
"supports_documents": false,
"is_default": true
}
}
}
Key Fields
| Field | Required | Description |
|---|---|---|
name | Yes | Printer name |
description | No | Printer description |
supports_documents | No | Can print documents |
supports_labels | No | Can print labels |
is_default | No | Default printer flag |
Authorizations
OAuth 2.0 authentication. Use the client credentials or authorization code flow to obtain an access token.
The subdomain/tenant name identifying which tenant's data to access. Required for all API requests.
Body
application/json
Show child attributes
Show child attributes
Response
Printer created successfully
Show child attributes
Show child attributes
⌘I

