Print storage unit labels for a receipt
curl --request POST \
--url https://clarus-api.com/api/goods_in_receipts/{id}/storage_unit_labels \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Clarus-Subdomain: <api-key>' \
--data '
{
"data": {
"type": "goods_in_receipts",
"attributes": {
"storage_unit_id": 123,
"cloud_print": true,
"printer_id": 1
}
}
}
'import requests
url = "https://clarus-api.com/api/goods_in_receipts/{id}/storage_unit_labels"
payload = { "data": {
"type": "goods_in_receipts",
"attributes": {
"storage_unit_id": 123,
"cloud_print": True,
"printer_id": 1
}
} }
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: 'goods_in_receipts',
attributes: {storage_unit_id: 123, cloud_print: true, printer_id: 1}
}
})
};
fetch('https://clarus-api.com/api/goods_in_receipts/{id}/storage_unit_labels', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": 1,
"type": "documents",
"attributes": {
"status": "processing"
}
}
}{
"error": "<string>"
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}Goods In: Receipts
Print storage unit labels for a receipt
Generate storage unit labels for a goods in receipt. When cloud_print is true, the label is sent directly to the specified printer. When cloud_print is false or omitted, the response is a PDF binary stream (not JSON).
POST
/
api
/
goods_in_receipts
/
{id}
/
storage_unit_labels
Print storage unit labels for a receipt
curl --request POST \
--url https://clarus-api.com/api/goods_in_receipts/{id}/storage_unit_labels \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Clarus-Subdomain: <api-key>' \
--data '
{
"data": {
"type": "goods_in_receipts",
"attributes": {
"storage_unit_id": 123,
"cloud_print": true,
"printer_id": 1
}
}
}
'import requests
url = "https://clarus-api.com/api/goods_in_receipts/{id}/storage_unit_labels"
payload = { "data": {
"type": "goods_in_receipts",
"attributes": {
"storage_unit_id": 123,
"cloud_print": True,
"printer_id": 1
}
} }
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: 'goods_in_receipts',
attributes: {storage_unit_id: 123, cloud_print: true, printer_id: 1}
}
})
};
fetch('https://clarus-api.com/api/goods_in_receipts/{id}/storage_unit_labels', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": 1,
"type": "documents",
"attributes": {
"status": "processing"
}
}
}{
"error": "<string>"
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}Request Structure
{
"data": {
"type": "goods_in_receipts",
"attributes": {
"storage_unit_id": 123,
"cloud_print": true,
"printer_id": 1
}
}
}
Key Fields
| Field | Required | Description |
|---|---|---|
storage_unit_id | No | Specific storage unit to print label for (omit for all on receipt) |
cloud_print | No | When true, sends to printer via PrintNode instead of returning PDF |
printer_id | No | PrintNode printer ID (required when cloud_print is true) |
Response Behavior
- With
cloud_print: true: Returns JSON acknowledgement that the print job was sent - Without
cloud_print: Returns a PDF binary stream (application/pdf)
Authorizations
OAuth 2.0 authentication. Use the client credentials or authorization code flow to obtain an access token.
FlowAuthorization Code
- Authorization URL
- https://clarus-api.com/oauth/authorize
- Token URL
- https://clarus-api.com/oauth/token
FlowClient Credentials
- Token URL
- https://clarus-api.com/oauth/token
The subdomain/tenant name identifying which tenant's data to access. Required for all API requests.
Path Parameters
The unique identifier of the goods in receipt
Body
application/json
Show child attributes
Show child attributes
Response
Label print job created successfully (when cloud_print is true) or PDF binary stream (when cloud_print is false)
Show child attributes
Show child attributes

