Corefact - Order Processor Specs

The specifications on this page are for submitting an order to Corefact, or for requesting a reprint of an existing order.

Servers

For test transactions:

https://www.printhq2.com/rest_interface.php

For live transactions:

https://www.printhq2.com/rest_interface.php

'http' is supported in addition to 'https' but not recommended for security reasons.

Request

Four POST parameters are required on every call:

login
Required Assigned to you by Corefact.
password
Required Assigned to you by Corefact.
method
Required newPrintRequest = New orders
reprintPrintRequest = Reprint of an existing order
orderxml
Required See below.

Response

If successful, the response will look like this:

            <?xml version=”1.0" encoding="UTF-8"?>
<newPrintRequest>
<status>1</status>
<client_order>12345678</client_order>
</newPrintRequest>

If there is any error, the response will look like this:

            

<?xml version=”1.0" encoding="UTF-8"?> <newPrintRequest> <status>0</status> <error_code>123</error_code> <error_description>Description of the error</error_description> <client_order>12345678</client_order> </newPrintRequest>

In all cases, you will need to resubmit, even if the error was on our end.


Recommended XML

Recommended XML setup for standard integration. For a full list of options scroll to the bottom.

<?xml version="1.0" encoding="UTF-8"?>
Required  
<order>
Required  
<client>abccompany</client>
Required This code is assigned to you by Corefact.
<client_order_number>12345</client_order_number>
Required Your order number. This can be alphanumeric, but must be unique with each order.
<ship_method_desc>Ground (no HI or AK)</ship_method_desc>
Required Exact full text of method as defined by shipper. 
<ship_address>
Required  The ship_address node is required.
  <attention>Amanda Hanlin</attention>
Required   
  <company>Residence</company>
Required   
  <street1>275 Vestor Street</street1>
Required   
  <street2>Apartment 233</street2>
   
  <street3></street3>
   
  <city>Ferndale</city>
Required   
  <state>MI</state>
Required   
  <zip>48220</zip>
Required   
  <country>UNITED STATES</country>
Required   
</ship_address>
Required   
<status_update>
  Optional. If you have a special URL you want status updates and/or shipping notifications to go to. The only type is standard and the following arguments will be appended as PATH args to your url and sent as an HTTP GET request:
  • ShippingTrackingNumber
  • ShippingProvider (e.g. FedEx)
  • ShippingLabelDate (the date the shipment will start on its way)
  • OrderID (your order id from the client_order_number)
Example:
http://yoururl.com/yourpage.php?ShippingTracking
  Number=Z1234553465345&ShippingProvider=UPS&
  ShippingLabelDate=2015-03-25&OrderID=SN123565
  <url>http://domain.com/function.php</url>
 
  <type>Standard</type>
 
</status_update>
 
<items>
Required There must be at least one item in your order.
  <item>
Required There is no limit to how many you can have.
    <client_orderitem_number>38809816-1</client_orderitem_number>
  The item as you want it to appear on the customer's packing list. Unique number with each order. 
    <client_product_code>STD_ENV_WHITE_SQUARE6_TP</client_product_code>
Required The product part number (SKU) as it appears in Corefact's database. 
    <quantity>51</quantity>
Required  
    <files>
  Optional. Only needed if there are files we need to retrieve from you.
      <file>
 
        <type>front</type>
Required Acceptable values are front, back, separator, envelope.
        <name>file-38809816-1.pdf</name>
Required There should be a unique name for every file of every item on every order. A common convention is to append the client_orderitem_number to the name. Please include the file extension type after the name.
        <full_url>https://www.xxxxx.com/your_system.php?xxx=yyy</full_url>
Required The full URL where our system can retrieve your print file. 
      </file>
   
      <file>
   
        <type>separator</type>
   
        <name>filename.pdf</name>
   
        <full_url>https://www.xxxxx.com/your_system.php?xxx=yyy</full_url>
   
      </file>
   
    </files>
   
  </item>
   
</items>
Required  
</order>
Required  

Example Items

Item w/ Artwork

Follow this blueprint if you are sending an item with artwork (not photobook or envelope). If you only have one file, please include two <file>'s in the xml (front and separator)

<item>
  <client_orderitem_number>Item_123</client_orderitem_number>
  <client_product_code>PRODUCT_SKU1</client_product_code>
  <product_description>Print Desc for Item_123</product_description>
  <quantity>1</quantity>
  <files>
    <file>
      <type>front</type>
      <name>123_print.pdf</name>
      <full_url>my_url.com</full_url>
    </file>
    <file>
      <type>separator</type>
      <name>123_print.pdf</name>
      <full_url>my_url.com</full_url>
    </file>
    <file>
      <type>back</type>
      <name>123_print.pdf</name>
      <full_url>my_url.com</full_url>
    </file>
  </files>
</item>

Book

<item>
  <client_orderitem_number>Item_123</client_orderitem_number>
  <client_product_code>PRODUCT_SKU1</client_product_code>
  <product_description>Print Desc for Item_123</product_description>
  <quantity>1</quantity>
  <page_count>20</page_count>
  <photobook>true</photobook>
  <files>
    <file>
      <type>front</type>
      <name>123_print.pdf</name>
      <full_url>my_url.com</full_url>
    </file>
    <file>
      <type>separator</type>
      <name>123_print.pdf</name>
      <full_url>my_url.com</full_url>
    </file>
  </files>
</item>

Envelopes

<item>
  <client_orderitem_number>311412699_1</client_orderitem_number>
  <client_product_code>ENV_SQUARE_80_WHT_BLACK_TP</client_product_code>
  <product_description>311412699_1 Printed White 5.5 Inch Square Envelopes</product_description>
  <quantity>40</quantity>
  <files>
    <file>
    <type>envelope</type>
    <name>311412699_6146649_square.pdf</name>
    <full_url>my_url.com</full_url>
    </file>
  </files>
</item>

Inventory Item (no artwork needed)

<item>
  <client_orderitem_number>1A2B3C4D</client_orderitem_number>
  <client_product_code>Inv_Env_5.75in x 4.375in_blank_80_natural</client_product_code>
  <quantity>40</quantity>
  <product_description>Natural 80# Envelope</product_description>
</item>

Full XML

Full reference of XML options.

<?xml version="1.0" encoding="UTF-8"?>
Required  
<order>
Required  
<client>abccompany</client>
Required This code is assigned to you by Corefact.
<client_order_number>12345</client_order_number>
Required Your order number.
<recipient>
  The recipient node is optional. It refers to the person who placed the order, and is only needed if we need to contact someone other than the person at the ship_address.
  <first_name>Amanda</first_name>
  <last_name>Hanlin</last_name>
  <email>myname@mycompany.com</email>
  <phone>800-555-1212</phone>
</recipient>
<ship_address>
Required  The ship_address node is required.
  <attention>Amanda Hanlin</attention>
Required 
  <company>Residence</company>
Required 
  <street1>275 Vestor Street</street1>
Required 
  <street2>Apartment 233</street2>
 
  <street3></street3>
 
  <city>Ferndale</city>
Required 
  <state>MI</state>
Required 
  <zip>48220</zip>
Required 
  <country>UNITED STATES</country>
Required 
</ship_address>
Required 
<bill_to>
  The bill_to node is optional. It's only required if you need Corefact to have billing information different from normal.
  <first_name>Amanda</first_name>
 
  <last_name>Hanlin</last_name>
 
  <company>Residence</company>
 
  <street1>275 Vestor Street</street1>
 
  <street2>Apartment 233</street2>
 
  <street3></street3>
 
  <city>Ferndale</city>
 
  <state>MI</state>
 
  <zip>48220</zip>
 
  <country>UNITED STATES</country>
 
</bill_to>
 
<ship_method_desc>Ground (no HI or AK)</ship_method_desc>
Required Exact full text of method as defined by shipper.  e.g.
Standard
Next Business Day
2nd Business Day
3rd Day
Standard to other countries (tracking not available)
Standard to Canada (tracking not available)
Express to Canada (tracking not available)
<ship_account>12345</ship_account>
  An optional shipping account number to use for this order.
<expected_delivery_date>2/13/2008</expected_delivery_date>
  mm/dd/yyyy 
<label_message>Happy Birthday, Frank!</label_message>
  Message to appear on the shipping label/packing list.
<status_update>
  Optional. If you have a special URL you want status updates and/or shipping notifications to go to. The only type is standard and the following arguments will be appended as PATH args to your url and sent as an HTTP GET request:
  • ShippingTrackingNumber
  • ShippingProvider (e.g. FedEx)
  • ShippingLabelDate (the date the shipment will start on its way)
  • OrderID (your order id from the client_order_number)
Example:
http://yoururl.com/yourpage.php?ShippingTracking
  Number=Z1234553465345&ShippingProvider=UPS&
  ShippingLabelDate=6/7/2011&OrderID=SN123565
  <url>http://domain.com/function.php</url>
 
  <type>Standard</type>
 
</status_update>
 
<items>
Required There must be at least one item in your order.
  <item>
Required There is no limit to how many you can have.
    <client_orderitem_number>38809816-1</client_orderitem_number>
  The item as you want it to appear on the customer's packing list. 
    <client_product_code>STD_ENV_WHITE_SQUARE6_TP</client_product_code>
Required The product part number (SKU) as it appears in Corefact's database.  
    <product_description>White 6 Inch Square Envelopes</product_description>
  Description for internal reference.
    <quantity>51</quantity>
Required  
    <photobook>true</photobook>
  Set to true on items that use photobook multi quantity support. If you have not been asked to add this leave it out!
    <document_id>XXX123</document_id>
  Optional. Only needed if a Document ID is required for printing.
    <notes>Do something special to it</notes>
  Optional.
    <files>
  Optional. Only needed if there are files we need to retrieve from you.
      <file>
 
        <type>front</type>
Required Acceptable values are front, back, separator, envelope. They can be in any order. Only one of each per <item> is allowed.
        <name>file-38809816-1.pdf</name>
Required This should be a unique name for every order. A common convention is to append the client_orderitem_number to the name.
        <full_url>https://www.xxxxx.com/your_system.php?xxx=yyy</full_url>
Required The full URL where our system can retrieve your print file. 
        <sha1_hash>1234567890abcdef</sha1_hash>
  sha1_hash of file contents for validation. 
        <bytes>97700</bytes>
  File size for validation. 
      </file>
   
      <file>
   
        <type>separator</type>
   
        <name>filename.pdf</name>
   
        <full_url>https://www.xxxxx.com/your_system.php?xxx=yyy</full_url>
   
        <sha1_hash>1234567890abcdef</sha1_hash>
   
        <bytes>97700</bytes>
   
      </file>
   
    </files>
   
  </item>
   
  <item>
   
    <client_product_code>STD_ENV_WHITE_SQUARE6_TP</client_product_code>
   
    <product_description>White 6 Inch Square Envelopes</product_description>
   
    <quantity>51</quantity>
   
    <document_id>XXX123</document_id>
   
    <notes></notes>
   
    <page_count>25</page_count>
  Optional.
    <files>
   
      <file>
   
        <type>front</type>
   
        <name>filename.pdf</name>
   
        <full_url>https://www.xxxxx.com/your_system.php?xxx=yyy</full_url>
   
        <sha1_hash>1234567890abcdef</sha1_hash>
   
        <bytes>97700</bytes>
   
      </file>
   
    </files>
   
  </item>
   
</items>
   
</order>