|
Element
|
Level
|
Description
|
Multiple Occurrences?
|
Parent Element
|
Required
|
|
SwiftCDOrders
|
0
|
Root node for a batch of orders.
CreateDt = Date Batch Created
BatchId = Unique Identifier for this batch
SubmitterId = Your CustomerId unless told otherwise by SwiftCD
ContactInfo = Email address or phone # of person(s) sending
batch |
1 per Transmission
|
Root
|
Yes
|
|
Order
|
1
|
Identifies 1 order for a given purchase
|
Unlimited per Batch
|
SwiftCDOrders
|
Yes
|
|
CustomerId
|
2
|
Your CustomerId/Logon created when you signed up for
SwiftCD services
|
1 per order
|
Order
|
Yes
|
|
TransactionDate
|
2
|
Date and time this order transaction occurred. This
is for your reference only, translates to OrderDate in
OrderStatus.
Format: mm/dd/ccyy
hh:mm:ss AM/PM |
1 per order
|
Order
|
Yes
|
|
Items
|
2
|
Identifies Grouping for Products Ordered
|
1 per order
|
Order
|
Yes
|
|
CD
|
3
|
Identifies the Item as a CD
|
Unlimited per Items
|
Items
|
Yes
|
|
Fulfillment
Item
|
3
|
Identifies the Item as a non-CD fulfillment item
|
Unlimited per Items
|
Items
|
Yes
|
|
TrackingId
|
1
|
Your unique tracking Id Number for this order.
This number is designated by you, and will be used for
all tracking and reporting for this order.
We suggest a number which includes Date, Product ID,
and a serial number. Example:
20010115-34565-1 NOTE: Items with the same
TrackingId will be shipped together in one package. If
you want multiple items shipped together, be sure they have
the same TrackingId
|
1 per CD/fulfillment item
|
Order
|
Yes
|
|
LabelId
|
4
|
Label Id for this CD as previously defined in the SwiftCD
Vendor Area – Design CDs
|
1 per CD
|
CD
|
Yes
|
|
PackageId
|
4
|
Package Id for this CD as previously defined in the
SwiftCD Vendor Area – Design CDs
|
1 per CD
|
CD
|
Yes
|
|
Quantity
|
4
|
The number of copies ordered of this CD in this order
|
1 per CD/fulfillment item
|
CD
|
Yes
|
|
RegKeyTitle
|
4
|
Line 1 of the registration label.
Example: Unlock Code (maximum 60 characters per
line) Note:
#|# (pound-pipe-pound) will create a line feed on the printed
label, maximum one line feed per entry.
|
1 per CD
|
CD
|
No
|
|
RegKey
|
4
|
Line 2 of the registration label. Example: 12345
(maximum 60 characters per line) Note:
#|# (pound-pipe-pound) will create a line feed on the printed
label, maximum one line feed per entry.
|
1 per CD
|
CD
|
No
|
|
RegFileName
|
4
|
Software registration file, written to root of CD
|
1 per CD
|
CD
|
No
|
|
RegFileContent
|
4
|
Text content of registration file, may include line
feeds, maximum 5000 characters
|
1 per CD
|
CD
|
No
|
|
Content
|
4
|
Identifies the definition of content on the CD
|
1 per CD
|
CD
|
Yes
|
|
Product
|
5
|
Identifies a content item as Product
|
Unlimited per Content up to maximum storage capacity of
CD, *or* 1 per fulfillment item
|
Content
|
Yes
|
|
ProductId
|
6
|
ProductId (PID) identifying product to SwiftCD
|
1 per Product
|
Product
|
Yes
|
|
Title
|
6
|
Title of product. If
you have chosen this option in your label configuration, this
text will be written on the CD at the time of production.
Used for CDs containing a single PID.
|
1 per Product
|
Product
|
No
|
|
Shipping
|
2
|
Identifies the product shipping information.
|
1 per Order
|
Order
|
Yes
|
|
Method
|
3
|
1=USPS First Class/International Mail 3=USPS Priority/International Priority Mail 4=FedEx Ground 5=FedEx Standard Overnight 6=DHL Worldwide Express 7=FedEx Standard Overnight 8=FedEx 2nd Day
39=FedEx Express Saver
|
1 per Shipping
|
Shipping
|
No
|
|
FirstName
|
3
|
FirstName of person to ship order to
|
1 per Shipping
|
Shipping
|
Yes
|
|
LastName
|
3
|
LastName of person to ship order to
|
1 per Shipping
|
Shipping
|
No
|
|
Company
|
3
|
Company name to ship order to
|
1 per Shipping
|
Shipping
|
No
|
|
Addr1
|
3
|
Street address to ship order to
|
1 per Shipping
|
Shipping
|
Yes
|
|
Addr2
|
3
|
Suite or Apartment Number of shipping address
|
1 per Shipping
|
Shipping
|
No
|
|
City
|
3
|
City of shipping address
|
1 per Shipping
|
Shipping
|
Yes
|
|
State
|
3
|
State Abbreviation, required if Country is US.
http://www.swiftcd.com/faq/State_codes.txt |
1 per Shipping
|
Shipping
|
Yes
|
|
Province
|
3
|
Province if Country is not US. |
1 per Shipping
|
Shipping
|
No
|
|
Country
|
3
|
Country Code as defined by United States Postal Service
http://www.swiftcd.com/faq/Country_codes.txt
|
1 per Shipping
|
Shipping
|
Yes
|
|
Zip
|
3
|
Postal Code of shipping address
|
1 per Shipping
|
Shipping
|
Yes
|
|
Email
|
3
|
Email address of person receiving order at shipping
address
|
1 per Shipping
|
Shipping
|
No
|
|
Phone
|
3
|
Phone number of person receiving order at shipping
address
|
1 per Shipping
|
Shipping
|
No
|
Submitting Your HTTP Post Batch to SwiftCD
After
creating your SwiftCDOrders batch you can submit the batch
to SwiftCD using a Standard HTTP Posting Method. The web
service is available at http://orders.swiftcd.com/Orders/SubmitOrders.asp
An excellent XML help document can be found
here.
To send test orders, replace
<Order> with <Order Test="Y" >
You will receive live responses to your HTTP post, but the
order will not actually enter our production stream.
IMPORTANT: Before you will be able to send HTTP Post
orders, we must authorize your IP. Please send us a message
here, and let us know your CustomerID and the IP that
you will be using to send HTTP Post orders.
Sample Code
Visual
Basic and Active Server Pages Example
Function PostOrdersToSwiftCD()
Dim xmlDoc
Dim xmlHTTP
Dim ConfirmationXML
Set xmlDoc = CreateObject("Microsoft.XMLDOM")
xmlDoc.async = False
xmlDoc.Load “C:\SwiftCDOrders.XML”
Set xmlHTTP = CreateObject("Microsoft.XMLHttp")
xmlHTTP.Open "POST", “http://orders.swiftcd.com/Orders/SubmitOrders.asp”,
False
xmlHTTP.send xmlDoc.xml
ConfirmationXML = xmlHTTP.responseXML.xml
Set xmlDoc = Nothing
Set xmlHTTP = Nothing
End Function
Note to Linux Users:
Our server
requires DOS line endings. If you are getting a Bad
Request error, before you send data, you may want to
replace every instance of "\n" with
"\r\n"
Confirmation Response
After
transmitting your HTTP Post batch to SwiftCD you will
receive a response XML string that will contain the
following:
<SwiftCDBatchResult>
<Success>Y</Success>
<Errors></Errors>
<TotalOrders>1</TotalOrders>
<TotalItems>2</TotalItems>
</SwiftCDBatchResult>
Response Element Descriptions
Success = “Y” or “N”
Errors = List of problems with the transmission
TotalOrders = Total count of Orders Element in transmission
TotalItems = Total count of CD Element in transmission
If Success = “Y” then you have successfully transmitted
your orders to SwiftCD. If Success=”N” then please
correct the errors specified in the <Errors>
element. The following is a list of the conditions
that will cause an error:
Missing <TrackingId>
Missing <CustomerId>
Missing <LabelId>
Missing <PackageId>
Missing <Quantity>
Missing <ProductId>
Missing <FirstName>
Missing <Addr1>
Missing <City>
If country is US, missing or invalid <State>
Missing or invalid <Country>
Missing <Zip>
Questions? Please ask
them here.
|