Hexicom Order API Integration
Version: 4.0.0
1. Introduction
The Hexicom Order API uses the JSON message format and exposes a set of HTTP endpoints to manage orders within the ePrint system. The API supports the following core functionalities:
Creating and managing orders
Adding artwork files to existing orders or order items
Updating order and order item statuses
Adding additional (other) costs to existing orders
Retrieving product-related information based on customer name or product code
All requests and responses are exchanged using JSON.
2. Authentication
All API requests must be made over HTTPS and are authenticated using Basic HTTP Authentication.
Clients must include an Authorization header with each request:
Authorization: Basic <credentials>
Where <credentials> is the Base64-encoded value of:
username:password
For additional details, refer to: https://en.wikipedia.org/wiki/Basic_access_authentication
3. Endpoints
Customers must configure the following primary endpoints on their system. These endpoints are used to send and receive data through the API.
3.1 Order Endpoint
Used for all order-related operations.
{hostname}/orderapi/api/order/
Example:
https://demo.eprintsoftware.com/orderapi/api/order/
3.2 Product Endpoint
Used for all product-related operations.
{hostname}/orderapi/api/product/
Example:
https://demo.eprintsoftware.com/orderapi/api/product/
4. Order API Calls
All Order API calls use JSON as the standard request and response format.
4.1 AddArtworkFile
Method: POST
URL: [baseURL]/AddArtworkFile
Content-Type: application/json
Parameters
OrderNo (Required)
FileLink (Required)
OrderItemNo (Optional)
If OrderItemNo is provided, the artwork file is attached to the specified order item. If OrderItemNo is empty (""), the artwork file is attached to the order itself.
Example Request
https://demo.eprintsoftware.com/orderapi/api/Order/AddArtworkFile
{
"orderNo": "ORD-00012",
"fileLink": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
"orderItemNo": "ORD-00012-0stt01"
}
4.2 UpdateOrderStatus
Method: POST
URL: [baseURL]/UpdateOrderStatus
Content-Type: application/json
Parameters
OrderNo
OrderStatus
OrderItemNo
OrderItemStatus
StatusType
Description
This API updates the status of an order or an order item.
If StatusType = 1, the order status is updated.
Otherwise, the order item status is updated.
If a job or invoice exists for the order, their statuses are also updated when applicable. Each module (estimate, job, invoice, etc.) maintains its own set of valid statuses. If the specified status does not exist for a module, that module is not updated.
Example Request
{
"orderNo": "ORD-00012",
"orderStatus": "Printing",
"orderItemNo": "ORD-00012-001",
"orderItemStatus": "Printing",
"statusType": 1
}
4.3 AddOtherCost
Method: POST
URL: [baseURL]/AddOtherCost
Content-Type: application/json
Parameters
OrderNo
OrderItemNo
OtherCostName
Description
Adds an additional (other) cost to an existing order or a specific order item.
Example Request
{
"orderNo": "ORD-00012",
"orderItemNo": "ORD-00012-001",
"otherCostName": "Trim"
}
4.4 PostOrder
Method: POST
URL: [baseURL]/PostOrder
Content-Type: application/json
Description
Creates a new order in the ePrint system. The request includes customer, order, destination, item, and payment details.
Pricing Input Rules
For each order item, pricing information can be supplied in one of the following ways only: - Retail Price (with or without Tax Price), or - Selling Price
Retail Price and Selling Price must not be passed together for the same order item in a single API request. If both values are supplied, the request may be rejected or pricing calculations may produce unexpected results.
Based on the pricing data provided, the system calculates the remaining values such as tax, subtotal, markup, and cost using product and system configuration.
Pricing, Tax, and Cost Calculation Logic
The PostOrder API supports multiple pricing input scenarios. Depending on the pricing information supplied in the API request, the system determines the final selling price, tax, subtotal, markup, and cost by applying predefined business rules.
The following cases describe how pricing data is processed.
Case 1: Selling Price Provided via API
API Input
Selling Price
Derived from Product / System
Tax Rate (from product)
Cost Price (from system)
Processing Logic
Selling Price is populated directly from the API request.
Tax is calculated using the product’s tax rate.
Subtotal is calculated based on the selling price.
Markup is calculated using the selling price and cost price.
Cost price is populated from the product master data.
Case 2: Retail Price and Tax Price Provided via API
API Input
Retail Price
Tax Price
Derived from Product / System
Cost Price (from system)
Processing Logic
Selling Price is calculated as:
Selling Price = Retail Price + Tax Price
Subtotal (Retail Price) is populated directly from the API request.
Tax amount is populated directly from the API request.
Markup is calculated using the selling price and cost price.
Cost price is populated from the product master data.
Case 3: Retail Price Provided via API
API Input
Retail Price
Derived from Product / System
Tax Rate (from product)
Cost Price (from system)
Processing Logic
Selling Price is calculated using the retail price and product tax rate.
Subtotal (Retail Price) is populated directly from the API request.
Tax amount is calculated using the product tax rate.
Markup is calculated using the selling price and cost price.
Cost price is populated from the product master data.
Case 4: Product-Based Pricing Only
API Input
Item Code (SKU only; no pricing or tax values provided)
Derived from Product / System
Selling Price (from product)
Tax Rate (from product)
Cost Price (from system)
Processing Logic
Selling Price is populated from the product master data.
Subtotal (Retail Price) is derived from the product pricing.
Tax amount is calculated using the product tax rate.
Markup is calculated using the selling price and cost price.
Cost price is populated from the product master data.
Processing Flow
Customer Validation
If the customer does not exist, a new customer record is created.
If the customer exists, the existing record is updated.
Product Validation
Each order item is validated using the provided SKU.
If any SKU does not exist, the order is not created.
Order Creation
Upon successful validation, the order is created with destinations, order items, artwork links, additional costs, and payment details.
Mandatory Fields
The following fields are required to successfully process a PostOrder request. If any of these fields are missing or invalid, the API will return a validation error.
CompanyInfo.CompanyName: String. Specifies the name of the company initiating the order.
ExternalOrderID: String. A unique identifier for the order, typically generated by the client system.
Destination.ShipTo.Name: String. Full name of the shipment recipient.
Destination.ShipTo.Address1: String. Primary street address for the shipping destination.
OrderItems: Array. Must contain at least one order item.
OrderItems.Sku: String. Stock Keeping Unit (SKU) identifying the product.
OrderItems.Quantity: Number. Quantity of the product being ordered.
Optional Fields
The following fields are optional but recommended to ensure a complete and detailed order record.
CompanyInfo.Division: Division of the company.
CompanyInfo.AccountNo: Account number associated with the company.
OrderNotes: General notes related to the order.
CustomerOrderID: Customer-facing order number.
OrderDate: Date and time when the order was created.
DueDate: Date and time when the order is due.
Currency: Currency code for pricing (e.g., AUD).
Destination
DestinationID: Unique identifier for the destination.
ShipMethod: Requested shipping method.
ShipTo.Address2: Secondary address line.
ShipTo.Address3: Tertiary address line.
ShipTo.City: City name.
ShipTo.State: State or province.
ShipTo.Postal: Postal or ZIP code.
ShipTo.Country: Country code (e.g., AUS).
ShipTo.Phone: Contact phone number.
ShipTo.Email: Contact email address.
OrderItems
DestinationRef: Reference to the destination for this item.
otherCostNames: Array containing additional cost details.
fileLink: URL to an associated file such as artwork or design.
RetailPrice: Retail price of the item. Pretax, Extax
SellingPrice: Price IncTax
TaxPrice: Tax amount for the item.
ItemDescription: Brief item description.
ItemTitle: Product title.
Description: Detailed product description.
Artwork: Artwork-related notes.
Colour: Item colour.
Size: Item size.
Material: Item material.
Delivery: Delivery-specific notes.
Finishing: Finishing instructions.
Proofs: Proofing information.
Packing: Packing instructions.
Notes: Item-specific notes.
Instructions: Special instructions for the item.
CustomDescription1 – CustomDescription25: Custom fields for additional information.
Payment
AmountPaid: Amount received.
Description: Payment description (e.g., PayPal reference).
Date: Payment date.
Example 1: Complete API Request
This example demonstrates a full request payload including both mandatory and optional fields.
{
"CompanyInfo": {
"CompanyName": "Skywalker",
"Division": "abc",
"AccountNo": ""
},
"ExternalOrderID": "POSTMAN-78",
"OrderNotes": "Test Notes",
"CustomerOrderID": "10",
"OrderDate": "2020-07-17T07:55:21+11:00",
"DueDate": "2020-10-17T06:00:00+11:00",
"Currency": "AUD",
"Destination": {
"DestinationID": "Dest1",
"ShipMethod": "Despatch_Economy",
"ShipTo": {
"Name": "Nicola Smith",
"Address1": "42 Sunpeaks Court",
"Address2": [],
"Address3": [],
"City": "Upper Coomera",
"State": "QLD",
"Postal": "4209",
"Country": "AUS",
"Phone": [],
"Email": "nicola@testcustomer.com"
}
},
"OrderItems": [
{
"DestinationRef": "Dest1",
"Sku": "P0000170",
"Quantity": "50",
"otherCostNames": [{ "otherCostName": "Testing" }],
"fileLink": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
"RetailPrice": "200",
"TaxPrice": "20",
"ItemTitle": "Test Title",
"Description": "Test Description",
"Artwork": "Test Artwork",
"Colour": "Test Colour",
"Size": "Test Size",
"Material": "Test Material",
"Delivery": "Test Delivery",
"Finishing": "Test Finishing",
"Proofs": "Test Proof",
"Packing": "Test Packing",
"Notes": "Test Notes",
"Instructions": "Test Instructions"
}
],
"Payment": {
"AmountPaid": "150.00000",
"Description": "Paypal ref 521a",
"Date": "2023-05-12T07:55:21+11:00"
}
}
Example 2: Mandatory Fields Only
This example demonstrates the minimum payload required for a successful request.
{
"CompanyInfo": {
"CompanyName": "Skywalker"
},
"ExternalOrderID": "4175dca1193",
"Destination": {
"ShipTo": {
"Name": "Test Name",
"Address1": "42 Test Street"
}
},
"OrderItems": [
{
"Sku": "P0000170",
"Quantity": 50
}
],
"Payment": {}
}
This section serves as a reference for integrating with the PostOrder API and ensures that requests are properly structured and validated.
Response
On successful execution, the API response includes: - The generated Order Number - The generated Order Item Numbers for each created order item
5. Product API
Product Base URL
[ProductBaseURL]
Example:
https://demo.eprintsoftware.com/orderapi/api/Product/
5.1 GetAllProducts
Method: GET
URL: [ProductBaseURL]/GetAllProducts
Parameters
CustomerName
Description
Retrieves all products allocated to a specific customer. If CustomerName is empty or not provided, all available products are returned.
Example Requests
https://demo.eprintsoftware.com/orderapi/api/Product/GetAllProducts?ProductDetail={"CustomerName":"Care Homes Inc"}
https://demo.eprintsoftware.com/orderapi/api/Product/GetAllProducts?ProductDetail={"CustomerName":""}
5.2 GetProductByProductCode
Method: GET
URL: [ProductBaseURL]/GetProductByProductCode
Parameters
ProductCode
Description
Retrieves detailed information for a specific product identified by ProductCode.
Example Request
https://demo.eprintsoftware.com/orderapi/api/Product/GetProductByProductCode?ProductDetail={"ProductCode":"1031939"}
5.3 GetProductStock
Method: GET
URL: [ProductBaseURL]/GetProductStock
Parameters
ProductCode
Description
Retrieves current stock information for a specific product.
Example Request
https://demo.eprintsoftware.com/orderapi/api/Product/GetProductStock?ProductDetail={"ProductCode":"100109"}
5.4 GetFile
Method: GET
URL: [ProductBaseURL]/GetFile
Parameters
ProductCode
Description
Retrieves the associated image file for a specific product.
Example Request
https://demo.eprintsoftware.com/orderapi/api/Product/GetFile?ProductDetail={"ProductCode":"P0001537"}
5.5 CreateThumbNailUrl
Method: GET
URL: [ProductBaseURL]/CreateThumbNailUrl
Parameters
ProductCatalogueID
Description
Generates and returns a thumbnail URL for the specified product catalogue entry.
Example Request
https://demo.eprintsoftware.com/orderapi/api/Product/CreateThumbNailUrl?ProductCatalogue={"ProductCatalogueID":"3174"}