This document provides instructions and example code for DocketManager’s ImportOrderRequest (IOR)API. DocketManager’s IOR allows external systems to send orders to a DocketManager site. Using a post request DocketManager will parse the required XML and convert the provided information into the DocketManager MIS system.
PostURL
IOR post requests need to be sent to the following url:
Url: [DocketManagerSiteURL]/api/importorderrequest
SampleUrl: https://demosite.docketmanager.net/api/importorderrequest
XML Elements & Attributes
Element | Description | Required |
ImportOrderRequest | Root element Attribute:Version=”1.0” (required) | * |
ServiceInformation | Parent element Information about the service sending the post request | * |
ServiceName | Service Name,Version Number etc. | * |
ServiceUrl | URL the request was sent from | * |
ServiceTransactionId | Unique Identifier for the order/request (for auditing purposes) | * |
Customer | Parent element Information about the Customer | * |
CustomerId | Unique Identifier for the Customer NOTE: This identifier must be able to match to an External Identifier on the customer in DM | * |
Name | Customer name | * |
Phone | Customer phone number | |
Email | Customer email address | |
ContactName | Contact name | * |
ContactPhone | Contact phone number | |
ContactEmail | Contact email address | * |
ShippingLocation | Parent element Shipping Location information | |
Address | Shipping address | |
City | Shipping city | |
PostalZipCode | Shipping Postal/Zipcode | |
ProvinceState | Shipping Province/State | |
Country | Shipping Country | |
ShippingMethod | Shipping Method | |
Order | Parent element Information pertaining to the Order | * |
OrderId | Unique Identifier for the Order | * |
OrderDate | Date the order was placed (M/d/yyyy h:mm:sstt) | * |
ShippingTotal | Shipping total for the order | * |
SubTotal | Sub total for the order Should equal the sum of the Item (ItemTotal+ ShippingTotal) | * |
TaxTotal | Tax total for the order | * |
TaxPercentage | TaxpercentageusedtocalculatetheTaxTotal | * |
GrandTotal | Grand Total for the Order Should equal Sub Total+Tax Total | * |
PaymentMethod | Method used to pay for the order e.g.CreditCard,PayPaletc. | |
Paid | Mark the Order as fully paid: Boolean (True/False) – defaults to True | |
Posted | Mark the Order as posted: Boolean (True/False) – defaults to True | |
Items | Parent element List of Items | * |
ItemTotal | Item’s total price | * |
Quantity | Item quantity | * |
Item Name | Item name | * |
Item Code | Item product code (Unique Identifier from the requesting service) Note: A Product with an external identifier (on the Online Tab of the Product) matching this item product code must be present in the DocketManager site receiving the post request. | * |
Description | Item description | |
StockName | Paper stock name and description e.g. Bond blue 24lb offset | |
FinishSize | Item finish size e.g. 8.5 X 11 | |
ColorProcess | Print color process e.g. 4/4 | |
ColorName | Ink color names e.g. Reflex Blue, Pantone Metallic 8783C | |
ColorCode | Ink color code PMS Reflex Blue, 8783 | |
PressNote | General print/press notes & printing instructions | |
ArtworkNote | General graphic/artwork notes & instructions | |
DownloadUrl | URL to art work file (will be downloaded) |
* Note the required elements and attributes
Response
Once a post request is sent a simple string response is returned depending on the outcome of the request.
The Response message is sent in the following format.
Success=[True/False]|Message=[ReturnedMessage]
Example Responses:
Succeeded |
|
Failed |
|
Example XML:
The following is an example of the xml structure which includes all required and optional elements:
<?xmlversion="1.0" encoding="UTF-8"?>
<ImportOrderRequest Version="1.0">
<ServiceInformation>
<ServiceName>ExternalService</ServiceName>
<ServiceUrl>http://google.com</ServiceUrl>
<ServiceTransactionId>123456</ServiceTransactionId>
</ServiceInformation>
<Customer>
<CustomerId>C001</CustomerId>
<Name>DemoCustomer</Name>
<Phone>123-456-7890</Phone>
<Email>democompany@democompany.com</Email>
<ContactName>DemoContact</ContactName>
<ContactPhone>123-456-7890</ContactPhone>
<ContactEmail>democontact@democompany.com</ContactEmail>
</Customer>
<ShippingLocation>
<Address>123FakeSt.</Address>
<City>SanFrancisco</City>
<PostalZipCode>94124</PostalZipCode>
<ProvinceState>California</ProvinceState>
<Country>UnitedStatesofAmerica</Country>
<ShippingMethod>Fedex</ShippingMethod>
</ShippingLocation>
<Order>
<OrderId>156350718</OrderId>
<OrderDate>12/20/2017 4:34:29PM</OrderDate>
<ShippingTotal>19.99</ShippingTotal>
<SubTotal>519.99</SubTotal>
<TaxTotal>39.00</TaxTotal>
<TaxPercentage>7.5</TaxPercentage>
<GrandTotal>558.99</GrandTotal>
<PaymentMethod>CreditCard</PaymentMethod>
<Paid>True</Paid>
<Posted>True</Posted>
<Items>
<Item>
<ItemTotal>350.00</ItemTotal>
<Quantity>10000</Quantity>
<ItemName>BizCards</ItemName>
<ItemCode>BC1-00</ItemCode>
<Description>Fullcolorbusinesscards</Description>
<StockName>BondThick</StockName>
<FinishSize>3.5x2</FinishSize>
<ColorProcess>4/4</ColorProcess>
<ColorName>CMYK</ColorName>
<ColorCode>CMYK</ColorCode>
<PressNote>Runthis12up</PressNote>
<ArtworkNote>Noedits required,thanks.</ArtworkNote>
<DownloadUrl>http://files.amazingprint.com/Download2.aspx?id=9768</DownloadUrl>
</Item>
<Item>
<ItemTotal>150.00</ItemTotal>
<Quantity>1000</Quantity>
<ItemName>PostCardSmall</ItemName>
<ItemCode>PCS-155</ItemCode>
<Description>Simplesmallpostcards</Description>
<StockName>PostCardStock</StockName>
<FinishSize>6x4</FinishSize>
<ColorProcess>4/1</ColorProcess>
<ColorName>CMYK,PMS151</ColorName>
<ColorCode>CMYK,151</ColorCode>
<PressNote />
<ArtworkNote>Pleaseupdatethesaledateinformation</ArtworkNote>
<DownloadUrl>http://files.amazingprint.com/Download2.aspx?id=9768</DownloadUrl>
</Item>
</Items>
</Order>
</ImportOrderRequest>