Retrieve an order

Updated:

GET/printing/{connection_id}/order/{id}

Retrieves a single PrintingOrder by its id. Obtain id values from the corresponding list endpoint. Use fields to return only the fields you need.

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
idstring required
ID of the Order

Returns

Response fieldTypeRequiredDescription
idstringNo
created_atstring (date-time)No(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
updated_atstring (date-time)No(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
external_identifierstringNoOrder identifier from the ordering system
customer_identifierstringNoIdentifier of the end customer in the ordering system
statusenumNoValues: DRAFT, PENDING, ON_HOLD, IN_PRODUCTION, PARTIALLY_SHIPPED, SHIPPED, DELIVERED, CANCELLED, FAILED, OTHER
currencystringNoISO 4217 currency code
shipping_addressobjectNoRecipient and delivery address
shipping_address.namestringNoRecipient full name
shipping_address.company_namestringNo
shipping_address.emailstringNo
shipping_address.telephonestringNo
shipping_address.address1stringNofirst line of the street address
shipping_address.address2stringNosecond line of the street address
shipping_address.citystringNocity or locality
shipping_address.regionstringNostate, province or regional area
shipping_address.region_codestringNostate, province or regional area code
shipping_address.postal_codestringNopostal or ZIP code
shipping_address.countrystringNocountry name
shipping_address.country_codestringNoISO 3166-1 alpha-2 country code
shipping_methodstringNoShipping method code
lineitemsPrintingLineitem[]No
lineitems[].idstringNoLine item identifier
lineitems[].product_idstringNoThe PrintingProduct ID of the blank product
lineitems[].variant_identifierstringNoIdentifier of the product variant
lineitems[].namestringNoDisplay name
lineitems[].skustringNoProduct identifier (SKU) from the ordering system
lineitems[].quantitynumberNo
lineitems[].unit_price_amountnumberNoProduction price per unit charged by the print vendor
lineitems[].retail_price_amountnumberNoRetail price per unit paid by the end customer
lineitems[].filesPrintingLineitemFile[]NoPrint files, one per placement
lineitems[].files[].placementstringNoPlacement code the file is printed on (eg. front, back)
lineitems[].files[].file_idstringNoThe PrintingFile ID
lineitems[].files[].urlstringNoURL of the print file
subtotal_amountnumberNoTotal production cost of all line items
discount_amountnumberNo
shipping_amountnumberNoShipping cost
tax_amountnumberNoTaxes, including VAT
total_amountnumberNoGrand total charged by the print vendor
shipmentsPrintingShipment[]No
shipments[].idstringNoShipment identifier
shipments[].carrierstringNoCarrier name
shipments[].servicestringNoDelivery service name
shipments[].tracking_numberstringNo
shipments[].tracking_urlstringNo
shipments[].shipped_atstring (date-time)No(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
shipments[].delivered_atstring (date-time)No(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
metadataPrintingMetadata[]No
metadata[].idstringNoThe ID of the custom field definition (from the metadata/metadata endpoint).
metadata[].slugstringNoThe integration's API name (key) of an existing custom field.
metadata[].valueobjectNoThe field's value, typed by format.
metadata[].namespacestringNo
metadata[].formatenumNoThe 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_dataobjectNo

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"
}
StatusErrorMeaning
400Bad RequestThe request was malformed or failed validation.
401UnauthorizedThe connection is likely broken; re-authorize it.
403ForbiddenThe connection is missing permissions or scopes.
404Not FoundThe requested resource does not exist.
429Too Many RequestsRate limit exceeded (see the two sources below).
500Internal Server ErrorAn unexpected error occurred.
501Not ImplementedNot 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: 'GET',
  url: 'https://api.unified.to/printing/5de520f96e439b002043d8dc/order/5de520f96e439b002043d8d8',
  headers: {
    authorization: 'bearer .....'
  },
  params: {
    fields: '',
    raw: '',
  }
};

const results = await axios.request(options);
Are we missing anything? Let us know
Was this page helpful?