XML format for sending
orders or returns What you see in this color =
DATA There are two ways to send orders or returns to Morris Costumes. Individually (by PO) or by Batch. Below is a detailed description of the XML file(s) used to order (via web) from Morris. Towards the end of this documentation will be more detail about posting orders or returns to Morris. (Example of the file names: batch_#####.XML OR po_#####.xml). WHEN NAMING FILES: |
<Batch> <Number>####</Number> <Count>###</Count> <Order> <otype>#</otype> <pickmsg>###</pickmsg> <po>###</po> <location>##</location> <via>###</via> <count>###</count> <ShipTo> <Address> <Line1>####</Line1> <Street1>###</Street1> <Street2>###</Street2> <City>###</City> <State>###</State> <Zip>###</Zip> <Country>###</Country> <Phone>###</Phone> </Address> </ShipTo> <LineItems> <Line> <sku>##</sku> <part>###</part> <qty>##</qty> <location>##</location> <message;>####</message> </Line> </LineItems> </Order> </Batch> |
<Batch> thru <Count> are used IF there are multiple orders. <Number> may be any number; no punctuation. Must match the file name! <Count> is the number of orders in the batch. <Order> is the start of the block of info you will repeat, for EACH order. <Otype> is an optional field and identifies the order type. The default is "O" for order. To send a return, enter the letter "R". <Pickmsg> is the (optional) message that you enter. Morris, along with your customer, will see this. It will be at the bottom of the picking ticket. There is no limit to the number of characters (can be alphanumeric, NO punctuation.) <Po> no more than 15 characters (can be alphanumeric, NO punctuation.) For returns you must enter the original purchase order number. <Location> is an optional field. If left blank, it will default from your customer file. Your options are: "20" - North Carolina location "60" - California location "100" - Manufacturers location <Via> is an optional field. If left blank, it will default from your customer file. Keep in mind that not all ship via's are validate for certain addresses. Discuss with Morris' Costumes if any questions. Click HERE for your SHIP VIA options. <Count> is the number of lines on the order. <ShipTo> maximum of 30 characters (can be alphanumeric, NO punctuation.) ADDRESS RULES: (for US and Canada only) 1) A name or company name must be provided (<Line>); (30 spaces). 2) An address street, city, state, (<-30 characters for street and city, 2 characters for state) and zip must be provided. 3) Zip code must be 5 or 9 digits in length; numeric only (US) or alphanumeric (CA). 4) The <Street1> or <Street2> must contain a number. 5) The country code must be correct. 6) The city and state must be valid for the zip code provided. 7) For return orders, you must enter the address of the original order. <Street2> is an optional field. Please visit the ISO website for accurate information regarding ADDRESS COUNTRY CODES. Please visit the MaxMind website for accurate information regarding STATE and province codes. <Line> is the start of the block of info you will repeat for EACH line item. <Sku> is Morris' internal part number. <Part> is Morris' catalog part number. DO NOT enter a catalog number if you choose to enter an internal part number -AND- DO NOT enter an internal part number if you choose to enter a catalog number!! <location> is an optional field. If left blank, it will default from your customer file trying the header first. <message> is an optional field up to 78 characters in length. For returns, you must enter the reason for returning the goods. Remember, </Batch> is only needed if multiple orders are being submitted. For an example of a BATCH file (more than one order), click HERE. (batch_#####.XML) For an example of an INDIVIDUAL order request, click HERE. (po_#####.xml) |
~~~~~~~~~~~~~~~~~~~~
After an order/batch has loaded, you will get a batch reply back ("Results" file) via email and in the email will be a link to the .xml file. You will need to download it. This will be the result of your order(s). When orders are rejected, canceled, or deleted, comments will be attached to this "Results" file.<Order> <po>##</po> <Status>##</Status> <Text>blah blah blah</Text> </Order> <Count>##</Count> <Date>mm/dd/yyyy</Date> <Time>hh:mm:ss</Time> </Orders> |
<Order> is the start of the block of info that will repeat for EACH order. Possible statuses: "OK" - in this case, text may not appear. "Warning" - (got it, liked some of it, see orders) "Rejected" - (got it, did not like it, your fault :-) "Failed" - (got it, system error, my fault :-) (your/my is not personal comment, indicates which system had error) <Text> field will only exist if the status is not "OK". <Count> is how many orders. <Time> should be military time. For an example of a RESULTS status file, click HERE. For an example of a RESULTS status file, with a REJECTED ORDER, click HERE. |
Possible values of "Code" in XML are
the same as "Status" in POST with the addition of "Warning" which you may treat
as "OK" and perhaps put on an exception report ...
You may not send me the
same PO more than once if we got it!
On order create commands, if an
order is OK or WARNING it is added to our system. If Failed or Rejected it is
not (actually failed is uncertain in that certain system errors could kill me
before I can delete the order). I will also delete the XML, allowing you to
thereby send again (with correction :-).
If you are uncertain, you can always
try and send it again ... and let me reject it.
~~~~~~~~~~~~~~~~~~~~
After a return order has loaded, you will get a reply back ("Results" file) via email and in the email will be a link to the .xml file. You will need to download it. This will be the result of your return(s). When returns are rejected, canceled, or deleted, comments will be attached to this "Results" file.<Order> <Xmode>##</Xmode> <ReturnCode>##</ReturnCode> <ReturnReason>##</ReturnReason> <Hold>##</Hold> <Status>##</Status> <StatusDate>MM/DD/YYYY</StatusDate> <Header> <OrderNum>###</OrderNum> <Location>###</Location> <Shipment>#</Shipment> <po>###</po> <Total>###</Total> <Terms>###</Terms> <Via>###</Via> <BillTo> <Address> <Line1>###</Line1> <Name>###</Name> <Street1>###</Street1> <Street2>###</Street2> <City>###</City> <State>###</State> <Zip>###</Zip> <Country>###</Country> <Phone>###</Phone> </Address> </BillTo> <ShipTo> <Address> <Line1>###</Line1> <Name>###</Name> <Street1>###</Street1> <Street2>###</Street2> <City>###</City> <State>###</State> <Zip>###</Zip> <Country>###</Country> <Phone>###</Phone> </Address> </ShipTo> </Header> <LineItems> <Line> <No>###</No> <Sku>###</Sku> <Location>###</Location> <Ordered>###</Ordered> <Ship>###</Ship> <Price>###</Price> <Net>###</Net> </Line> </LineItems> </Order> |
<Order> is the start of the block of info that will repeat for EACH order. <Xmode> ignore it's for the programmer. <otype> is set to Return for return orders. <ReturnCode> the following numbers correspond to the return codes. 1 - Good Product return accepted 2 - Customer damaged packaging or opened packaging 3 - Customer used/wore item 4 - Customer abused product 5 - Customer returned incomplete item 6 - Return exceeds time limit 7 - UPS filed claim or damaged claim 8 - Shortage credit 9 - Defective credit 10 - Freight only credit <ReturnReason> The return reason can be the generic reason listed above or a more descriptive reason (i.e. if the ReturnCode was set to 5, the ReturnReason might be customer did not return mask). <Hold> will be "Y" if the credit is on credit hold. <Status> The status values are picking, deleted, or open. <StatusDate> The date the return was last updated. <OrderNum> The credi memo number. <Location> The location where the goods were returned to. <Shipment> Will be set to 0 (zero), if the return is not yet invoiced. <po> The purchase order number. <Total> The total credit dollar amount. <Terms> The terms on the credit memo. <Via> The ship via. <BillTo> The billing address block. <Street2> is an optional field. <Country> may or may not exist. <Phone> may or may not exist. <ShipTo> The shipping Address block. <Street2> is an optional field. <Country> may or may not exist. <Phone> may or may not exist. <Line> repeats for every line item. <No> is the line number. <Location> is optional if not the same as the order header. <Ordered> the quantity returned (shown as negative). <Ship> the quantity returned (shown as a negative). <Price> the price given on the return (shown as a negative). <Net> the price * the quantity returned (shown as a negative). For an example of a RESULTS status file, click HERE. For an example of a RESULTS status file, with a REJECTED ORDER, click HERE. |
Possible values of "Code" in XML are
the same as "Status" in POST with the addition of "Warning" which you may treat
as "OK" and perhaps put on an exception report ...
You may not send me the
same PO more than once if we got it!
On order create commands, if an
order is OK or WARNING it is added to our system. If Failed or Rejected it is
not (actually failed is uncertain in that certain system errors could kill me
before I can delete the order). I will also delete the XML, allowing you to
thereby send again (with correction :-).
If you are uncertain, you can always
try and send it again ... and let me reject it.
~~~~~~~~~~~~~~~~~~~~
There are three different "Available
Batch" XML updates you can get. The updates will come in an email that will
contain a link to the XML file. The XML files will persist for at least 48
hours.
The first update is a list that contains all of the changes that have occurred in the last 2 days. This is
currently being sent every 30 minutes. It looks like:
<Type>Changes</Type> <Date>mm/dd/yyyy</Date> <Available> <Sku>####</Sku> <Part>####</Part> <Loc>###</Loc> <Qty>###</Qty> <Time>hh:mm:ss</time> </Available> </AvailableBatch> |
<Date> = Batch date The "<available>" block will repeat. <Sku> - Internal Morris sku. <Part> - Catalog part number. <Loc> will only exist if location not combined. <Time> = military time. Example of a "COMBINED location" changes file, (withOUT detail), link: http://morris.morriscostumes.com/out/available_batchnyyyn.xml Example of a "SEPARATE location" changes file, (withOUT detail), link: http://morris.morriscostumes.com/out/available_batchnyynn.xml |
~~~~~~~~~~~~~~~~~~~~
The second is also an "Available Batch", but
contains all active items, with
detail. It is currently being sent to customers with "combined" locations
default on the 1st & 3rd Sunday of the month. And to customers with
"separate" locations default on the 2nd & 4th Sunday of the
month.
  <Date>mm/dd/yyyy</Date> <Type>Full</Type> <Available> <Sku>####</Sku> <Part>####</Part> <Loc>###</Loc> <Qty>###</Qty> <ActiveStatus> <Code>###</Code> <Desc>###</Desc> <ReplacedBy>###</ReplacedBy> </ActiveStatus> <Time>###</Time> <Detail> <Desc>####</Desc> <Weight>####</Weight> <Length>####</Weight> <Width>####</Weight> <Height>####</Weight> <Cubes>####</Weight> <Price>###</Price> </Detail> <Time>hh:mm:ss</time> </Available> </AvailableBatch> |
<Date> = Batch date <Type> = Full(all parts); Changes (Only changed parts) The "<available>" block will repeat. <Sku> - Internal Morris sku. <Part> - Catalog part number. <Loc> is optional, only if location not combined. <Code> = Part status <Desc> = Description of code <ReplacedBy> = Internal Morris replacement sku <Time> = military time. Example of a "COMBINED location" file of ALL active items, (WITH detail), link: http://morris.morriscostumes.com/out/available_batch_customeryyyyy.xml Example of a "SEPARATE location" file of ALL active items, (WITH detail), link: http://morris.morriscostumes.com/out/available_batch_customeryyyny.xml |
~~~~~~~~~~~~~~~~~~~~
And the third is also an "Available Batch", but contains all active items, without detail. It is currently being sent every night.<Detail>n</Detail> <Date>mm/dd/yyyy</Date> <Available> <Sku>####</Sku> <Part>####</Part> <Loc>###</Loc> <Qty>###</Qty> <Time>hh:mm:ss</time> </Available> <AvailableBatch> |
<Date> = Batch date The "<available>" block will repeat. <Sku> - Internal Morris sku. <Part> - Catalog part number. <Loc> is optional, only if location not combined. <Time> = military time. Example of a "COMBINED location" file of ALL active items, (WITHOUT detail), link: http://morris.morriscostumes.com/out/available_batchnyyyy.xml Example of a "SEPARATE location" file of ALL active items, (WITHOUT detail), link: http://morris.morriscostumes.com/out/available_batchnyyny.xml |
~~~~~~~~~~~~~~~~~~~~
If you so choose, the "Open Orders Summary" is also available; currently being sent out every night.ex:
[111111/out/openorders_summary_05012006.xml]
(the "111111" representing the customer number, and the "05012006"
representing the date of the file).
<Type>Open Orders</Type> <StartDate>##/##/####</StartDate> <EndDate>##/##/####</EndDate> <OrderDetail> <Order> <Xmode>#</Xmode> <Status>###</Status> <Header> <OrderNum>###</OrderNum> <Location>###</Location> <Shipment>###</Shipment> <po>###</po> <InvoiceNum>#</InvoiceNum> <InvAmt>##.##</InvAmt> <ChargeAmt>#.##</ChargeAmt> <DiscAmt>###.##</DiscAmt> <Shipping>###.##</Shipping> <Tax>###.##</Tax> <Total>###.##</Total> <Terms>##-#####</Terms> <Via>##-#####</Via> <ShipTo> <Address> <Line1>####</Line1> <Street1>###</Street1> <Name>####</Name> <Street2>###</Street2> <City>###</City> <State>###</State> <Zip>###</Zip> <Country>###</Country> <Phone>####</Phone> </Address> </ShipTo> </Header> </LineItems> <Line> <No>##</No> <Sku>##</Sku> <Part>##</Part> <Location>##</Location> <Ordered>###</Ordered> <Ship>###</Ship> <Backorder>###</Backorder> <Price>###</Price> <Net>###</Net> </Line> <Boxes> <Box> <No>##</No> <TrackNum>##</TrackNum> </Box> </Boxes> <UntrackedBoxes>##</UntrackedBoxes> </Order> </OrderDetail> <Date>mm/dd/yyyy</Date> <Time>hh:mm:ss</time> <CancelCode>:#</CancelCode> <CancelReason>###</CancelReason> <Count>hh:mm:ss</Count> </Summary> |
<Order> block repeats for POs with splits/multi. <Xmode> <--Ignore (it's for the programmer). "Status" Values: invoiced, shipped or deleted. 'Invoice', 'Deleted' & 'shipped' have mm/dd/yyyy appended. <Shipment> - Zero means no shipments. <Invoice Num> thru <Total> are optional tags, used only if invoiced, shipped and non-zero. <Terms> determined by you and Morris' costumes. <Via> = Ship Via. Click HERE for detail. <Street2> is an optional field. <Country> may or may not exist. <Line> repeats for every line item. <No> = Line number. <Location> is optional if not same as Header. <Ship> is optional (used only if shippable/shipped). <Backorder> is optional, (used if NOT shippable/shipped). <Boxes> is an optional block, used for UPS only shipments. <Box> thru </Box> repeat for every box (if shipped). <UntrackedBoxes> - Enter quantity. *This field is optional, for NON-UPS shipments (if shipped). <Time> = military time. <Count> is how many orders there are. <CancelCode> is an optional field. Possible values are 1,2,3,4 or 5. <CancelReason> 1 - Out of Stock, 2 - Credit Card Problem, 3 - Invalid Address, 4 - Order did not complete, please reorder, 5 - Customer Requested cancellation. For an example of an "Open Orders" file, click HERE. |
~~~~~~~~~~~~~~~~~~~~
"Daily
Summary":
At the end of the day,
you will get a summary of all XML created for you in the last 24 hours.
It
will look JUST LIKE the "Open Orders" batch (see
above), the only difference is...
<Type>###</Type> will say
"DailySummary".
An example of a daily summary file NAME: ex: [111111/out/daily_summary_05012006.xml]
(the
"111111" representing the customer number, and the "05012006" representing the
date of the file).
Also, keep in mind that the
"Daily Summary" is all orders that "changed" that day... this could mean added,
invoiced, picked, etc.
However, "Open Orders" batch is ALL open
orders.
~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~
"Current Load
History":
A record of the most
current (real-time) orders/batches loaded, whether successful or not.
An
example of a "current load history" file name follows:
ex:
[111111/out/current_loadhistory_05012006_120000.xml]
(the "111111" representing the customer number, the
"05012006" representing the date of the file, and "120000" represents the file
number).
For an example of a "Current Load
History" file, click HERE.
In the
example above, be sure to notice the "Failed PO" and the status of "Rejected" it
received. Also, there's another batch status of "Warning" to notice as well. For
another reminder of all possible statuses, click STATUS.
NOTE:
There's a plethora of
reasons that an order could fail and it's important that you pay attention to
the text attached.
~~~~~~~~~~~~~~~~~~~~
"Daily Load
History":
Same as "current load
history", just daily.
ex:
[111111/out/daily_loadhistory_05012006_120000.xml]
~~~~~~~~~~~~~~~~~~~~
"Weekly Load
History":
Same as "daily load history",
just weekly.
ex:
[111111/out/weekly_loadhistory_05012006_120000.xml]
~~~~~~~~~~~~~~~~~~~~
Exactly which ones you get & how often are not fixed in
cement. So, if you need to, you can download them as often (or not often) as you
like. You may also post them.
Always post
to:
http://www.morriscostumes.com/cgi-bin/doxml.cgi&userid=xxxx&password=yyyy&xml_url=piggy&message=done
Incoming
format always:
userid=xxxxxx
password=yyyyyy
xml_url=full path (URL) to xml
file
message=done
Note
on XML files given to you:
They will persist a few days so you can pick
them up whenever. The XML for a given po will have the same name, so if you wait
a day and you got three emails, there will still be only one XML file (the
latest).