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://dmxml.docketmanager.net/api/importorderrequest
Note
Unique order ID will be amended to "Imported Order" for Order Name
i.e. Imported Order - 123456790
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: If this identifier matches an External Identifier on a customer on the DocketManager site, the order will be created for that customer. If there is no match, a new customer will be created. | * |
Name | Customer name | * |
Phone | Customer phone number | |
Email | Customer email address | |
ContactName | Contact name NOTE: Will try to find a contact belonging to the customer based on a name, phone number and email match, and will create a new one if no full match is found. | * |
ContactPhone | Contact phone number | |
ContactEmail | Contact email address | * |
ShippingLocation | Parent element Shipping Location information Note: If no shipping location is provided, the system will use the default shipping location on the contact. If the contact does not have a default shipping location, it will use the customer's default shipping location. If the customer does not have a default shipping location, the order shipping location will be left blank. If the customer is new, any values provided will be set as the customer's default shipping location. | |
AddressName | Shipping address name Note: This is a "name" that describes the address. i.e the customer name, default shipping address, location 1, etc. | |
Address | Shipping address | |
City | Shipping city | |
PostalZipCode | Shipping postal / zip code | |
ProvinceState | Shipping province/state | |
Country | Shipping country | |
ShippingMethod | ShippingType Note: Will try to find a shipping type based on a name match. This value will also be imported in a shipping note on the order | |
BillingLocation | Parent Element Billing Location information Note: If no billing location is provided, the system will use the default billing location on the contact. If the contact does not have a default billing location, it will use the customer's default billing location. If the customer does not have a default billing location, the order billing location will be left blank. If the customer is new, any values provided will be set as the customer's default billing location. | |
AddressName | Billing address name Note: This is a "name" that describes the address. i.e the customer name, default billing address, head office, etc. | |
Address | Billing address | |
City | Billing city | |
PostalZipCode | Billing postal / zip code | |
ProvinceState | Billing province/state | |
Country | Billing country | |
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) | * |
Name | Order name | |
GenericNote | Order generic note | |
PurchaseOrderNumber | PO number | |
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 | Tax percentage used to calculate the Tax Total | * |
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 This will be the overridden price of the item | * |
Quantity | Item quantity This will be the selected quantity on the item. | * |
Item Name | Item name This will amend to the end of the current name of the product. | |
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 This will amend to the end of the current description of the product. | |
StockName | Paper stock name and description e.g. Bond blue 24lb offset This will be included in the press note. | |
RunSize | Item run size Both values are required if used. Replaces current run size values e.g. 8.5x11 | |
FlatSize | Item flat size Both values are required if used. Replaces current flat size values e.g. 8.5x11 | |
FinishSize | Item finish size e.g. 8.5x11 This will be included in the press note. | |
ColorProcess | Print color process e.g. 4/4 This will be included in the press note. | |
ColorName | Ink color names e.g. Reflex Blue, Pantone Metallic 8783C This will be included in the press note. | |
ColorCode | Ink color code PMS Reflex Blue, 8783 This will be included in the press note. | |
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:
<?xml version="1.0" encoding="UTF-8"?>
<ImportOrderRequest Version="1.0">
<ServiceInformation>
<ServiceName>ExternalService</ServiceName>
<ServiceUrl>http://google.com</ServiceUrl>
<ServiceTransactionId>123456</ServiceTransactionId>
</ServiceInformation>
<Customer>
<CustomerId>1</CustomerId>
<Name>Test Customer 1</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>
<AddressName>Shipping Address</AddressName>
<Address>123FakeSt.</Address>
<City>SanFrancisco</City>
<PostalZipCode>94124</PostalZipCode>
<ProvinceState>California</ProvinceState>
<Country>USA</Country>
<ShippingMethod>Fedex</ShippingMethod>
</ShippingLocation>
<BillingLocation>
<AddressName>Billing Address</AddressName>
<Address>123FakeSt.</Address>
<City>SanFrancisco</City>
<PostalZipCode>94124</PostalZipCode>
<ProvinceState>California</ProvinceState>
<Country>USA</Country>
</BillingLocation>
<PurchaseOrderNumber>1234567890</PurchaseOrderNumber>
<Order>
<OrderId>156350719</OrderId>
<OrderDate>7/21/2023 01:14:18 PM</OrderDate>
<OrderName> Order #1234 - Cards</OrderName>
<GenericNote>Order to completed</GenericNote>
<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>1001</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>https://dmxml.docketmanager.net/Crm/Customers/CustomerView.aspx?Id=0939f8bb-bb4b-4038-933f-9ce258a48bf3</DownloadUrl>
</Item>
<Item>
<ItemTotal>150.00</ItemTotal>
<Quantity>1000</Quantity>
<ItemName>PostCardSmall</ItemName>
<ItemCode>1002</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>https://dmxml.docketmanager.net/Crm/Customers/CustomerView.aspx?Id=0939f8bb-bb4b-4038-933f-9ce258a48bf3</DownloadUrl>
</Item>
</Items>
</Order>
</ImportOrderRequest>