Print Job Search
The Print Job Search API is a RESTful API that allows you to search for print jobs by providing order item IDs. The API returns a flattened list of print jobs matching the specified order items.
POST /v1/print-job/search
Request Example
{
"orderItemId": ["item-12345", "item-67890", "item-abc123"]
}
Success Response Example
{
"printJobs": [
{
"id": "PJ-123456",
"orderId": "ORD-12345",
"orderItemId": "item-12345",
"packageId": "PKG-789",
"productUid": "product-abc-123",
"quantity": 100
},
{
"id": "PJ-123457",
"orderId": "ORD-12345",
"orderItemId": "item-67890",
"packageId": "PKG-790",
"productUid": "product-def-456",
"quantity": 50
}
]
}
Error Response Example
{
"error": "orderItemId is required, maximum 250 order items allowed"
}
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| orderItemId | array of strings | Required | List of order item IDs to search for. Maximum: 250 items |
Request Validation Rules
- Required:
orderItemIdmust be provided and cannot be empty - Maximum items: Maximum 250 order item IDs allowed in a single request
- Non-empty values: Each order item ID must not be an empty string
Response Structure
Success Response
The API returns a JSON object with the following structure:
| Field | Type | Description |
|---|---|---|
| printJobs | array of objects | List of print jobs matching the specified order items |
Print Job Object
Each print job in the printJobs array has the following structure:
| Field | Type | Description |
|---|---|---|
| id | string | Unique identifier of the print job |
| orderId | string | Identifier of the order this print job belongs to |
| orderItemId | string | Identifier of the order item |
| packageId | string | Identifier of the package containing this print job |
| productUid | string | Unique identifier of the product |
| quantity | number | Quantity of items in this print job |
Use Cases and Examples
Use Case 1: Find Print Jobs for Specific Order Items
When you need to find print jobs for specific order items:
{
"orderItemId": ["item-12345", "item-67890"]
}
This will return all print jobs associated with the specified order items.
Error Responses
The API will return error messages for invalid requests:
Missing Order Item IDs
{
"error": "orderItemId is required"
}
Too Many Order Items
{
"error": "maximum 250 order items allowed"
}
Empty Order Item ID
{
"error": "orderItemId[0]: empty order item ID not allowed"
}
Multiple Validation Errors
When multiple validation errors occur, they are combined into a single error message:
{
"error": "orderItemId is required, maximum 250 order items allowed"
}
Best Practices
-
Batch requests efficiently: Send up to 250 order item IDs in a single request to minimize API calls.
-
Validate input client-side: Ensure order item IDs are not empty strings before making requests.
-
Handle large result sets: The API returns all matching print jobs without pagination, so be prepared to handle potentially large response payloads.
-
Use specific order item IDs: This API is optimized for precise lookups by order item identifiers.