Create an order
POST/printing/{connection_id}/order
Creates a PrintingOrder. Provide the unified PrintingOrder fields in the request body; they are mapped to the provider's API. Returns the created PrintingOrder.
Parameters
fieldsstring array
Fields to return
rawstring
Raw parameters to include in the 3rd-party request. Encoded as a URL component. eg. raw parameters: foo=bar&zoo=bar -> raw=foo%3Dbar%26zoo%3Dbar
connection_idstring required
ID of the connection
Payload
A production order placed with the print vendor
idstring
created_atdate-time
(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
updated_atdate-time
(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
external_identifierstring
Order identifier from the ordering system
customer_identifierstring
Identifier of the end customer in the ordering system
currencystring
ISO 4217 currency code
shipping_methodstring
Shipping method code
subtotal_amountnumber
Total production cost of all line items
discount_amountnumber
shipping_amountnumber
Shipping cost
tax_amountnumber
Taxes, including VAT
total_amountnumber
Grand total charged by the print vendor
Returns
| Response field | Type | Required | Description |
|---|---|---|---|
id | string | No | |
created_at | string (date-time) | No | (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format) |
updated_at | string (date-time) | No | (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format) |
external_identifier | string | No | Order identifier from the ordering system |
customer_identifier | string | No | Identifier of the end customer in the ordering system |
status | enum | No | Values: DRAFT, PENDING, ON_HOLD, IN_PRODUCTION, PARTIALLY_SHIPPED, SHIPPED, DELIVERED, CANCELLED, FAILED, OTHER |
currency | string | No | ISO 4217 currency code |
shipping_address | object | No | Recipient and delivery address |
shipping_address.name | string | No | Recipient full name |
shipping_address.company_name | string | No | |
shipping_address.email | string | No | |
shipping_address.telephone | string | No | |
shipping_address.address1 | string | No | first line of the street address |
shipping_address.address2 | string | No | second line of the street address |
shipping_address.city | string | No | city or locality |
shipping_address.region | string | No | state, province or regional area |
shipping_address.region_code | string | No | state, province or regional area code |
shipping_address.postal_code | string | No | postal or ZIP code |
shipping_address.country | string | No | country name |
shipping_address.country_code | string | No | ISO 3166-1 alpha-2 country code |
shipping_method | string | No | Shipping method code |
lineitems | PrintingLineitem[] | No | |
lineitems[].id | string | No | Line item identifier |
lineitems[].product_id | string | No | The PrintingProduct ID of the blank product |
lineitems[].variant_identifier | string | No | Identifier of the product variant |
lineitems[].name | string | No | Display name |
lineitems[].sku | string | No | Product identifier (SKU) from the ordering system |
lineitems[].quantity | number | No | |
lineitems[].unit_price_amount | number | No | Production price per unit charged by the print vendor |
lineitems[].retail_price_amount | number | No | Retail price per unit paid by the end customer |
lineitems[].files | PrintingLineitemFile[] | No | Print files, one per placement |
lineitems[].files[].placement | string | No | Placement code the file is printed on (eg. front, back) |
lineitems[].files[].file_id | string | No | The PrintingFile ID |
lineitems[].files[].url | string | No | URL of the print file |
subtotal_amount | number | No | Total production cost of all line items |
discount_amount | number | No | |
shipping_amount | number | No | Shipping cost |
tax_amount | number | No | Taxes, including VAT |
total_amount | number | No | Grand total charged by the print vendor |
shipments | PrintingShipment[] | No | |
shipments[].id | string | No | Shipment identifier |
shipments[].carrier | string | No | Carrier name |
shipments[].service | string | No | Delivery service name |
shipments[].tracking_number | string | No | |
shipments[].tracking_url | string | No | |
shipments[].shipped_at | string (date-time) | No | (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format) |
shipments[].delivered_at | string (date-time) | No | (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format) |
metadata | PrintingMetadata[] | No | |
metadata[].id | string | No | The ID of the custom field definition (from the metadata/metadata endpoint). |
metadata[].slug | string | No | The integration's API name (key) of an existing custom field. |
metadata[].value | object | No | The field's value, typed by format. |
metadata[].namespace | string | No | |
metadata[].format | enum | No | The data type of the custom field, which determines how value is formatted. Values: TEXT, NUMBER, DATE, BOOLEAN, FILE, TEXTAREA, SINGLE_SELECT, MULTIPLE_SELECT, MEASUREMENT, PRICE, YES_NO, CURRENCY, URL |
metadata[].extra_data | object | No |
Errors
Errors return the HTTP status code and a JSON body with statusCode, error (the short label) and message (a human-readable detail).
{
"statusCode": 429,
"error": "Too Many Requests",
"message": "Too many requests to unified.to API; max requests per minute: N"
}| Status | Error | Meaning |
|---|---|---|
400 | Bad Request | The request was malformed or failed validation. |
401 | Unauthorized | The connection is likely broken; re-authorize it. |
403 | Forbidden | The connection is missing permissions or scopes. |
404 | Not Found | The requested resource does not exist. |
429 | Too Many Requests | Rate limit exceeded (see the two sources below). |
500 | Internal Server Error | An unexpected error occurred. |
501 | Not Implemented | Not supported by this integration. |
Errors from the underlying integration pass through: the integration's status comes back as ours (429, 401, 403, 404 or 5xx), usually with its message. When the integration's error body is unclear, Unified extracts what it can and returns a clearer message.
429 Too Many Requests
A 429 has two possible sources:
- The integration's own rate limit, passed through.
- Unified's workspace limit: a rolling 60 seconds, set by plan, with the message
Too many requests to unified.to API; max requests per minute: N.
const options = {
method: 'POST',
url: 'https://api.unified.to/printing/5de520f96e439b002043d8dc/order',
headers: {
authorization: 'bearer .....'
},
data: undefined,
params: {
fields: '',
raw: '',
}
};
const results = await axios.request(options); Are we missing anything? Let us know
Was this page helpful?