64
Introducing the Ready Order Download API CANNOT SHIP ORDER API GUIDE 10/29/13 | PAGE 1 XML-RPC Ready Order Download API Guide Version 2.0

Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Embed Size (px)

Citation preview

Page 1: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Introducing the Ready Order Download API

CANNOT SHIP ORDER API GUIDE 10/29/13 | PAGE 1

XML-RPC

Ready Order Download API Guide Version 2.0

Page 2: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Revision History

Revision/

Version

Number

Summary of Modifications Date Author/Writer Subject Matter

Expert(s)

2.0 Converted to new branding

template; minor style and

format modifications; minor

revisions to Getting Started.

May 31, 2013 Michael Lujan Dave Miller

2.0 Updated for:

two new fields:

fulfiller_line_item_subtotal

and fulfiller_line_item_tax

Order Data Request

parameter

IncludeFulfillerData

August 20, 2013 Michael Lujan Dave Miller

2.0 Updated ShipType value to

include 1day.

Revised the section titled,

Obtaining your API key to

Obtaining API access (not

based on a key)

October 28, 2013 Michael Lujan Dave Miller

Shopatron North America

Shopatron, Inc.

P.O. Box 5351

San Luis Obispo, CA, 93403

Shopatron Europe

Shopatron UK, Ltd.

Newport House

19-21 Newport Street

Old Town, Swindon SN1 3DX

Page 3: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Contents

Introducing the Ready Order Download API ............................................................. 4

Getting Started ............................................................................................................ 4

Before you begin ................................................................................................................ 4

Obtaining API access ........................................................................................................ 4

System requirements ......................................................................................................... 4

Writing the application ....................................................................................................... 4

Ready Order Download process flow ................................................................................ 5

Programming the Ready Order Download API ......................................................... 6

Programming the Order Data Request application .................................................. 6

Server and RPC information .............................................................................................. 6

Order Data Request application request elements ........................................................... 7

Example Requests – Order Data Request ................................................................. 8

Example 1: Retrieving order and shipment information .................................................. 8

Response codes ................................................................................................................. 9

Example success response ............................................................................................... 9

Example error response ..................................................................................................... 9

Handling errors ................................................................................................................. 10

Programming the Order Data Receive application ................................................. 10

Server and RPC information ............................................................................................ 10

Receive elements for the Order Data Receive application ............................................. 11

Example Requests – Order Data Receive ............................................................... 17

Example 2: Single order and single item with no packing list ....................................... 17

Example 3: Two orders and test_mode parameter ......................................................... 24

Example 4: Order data message with two orders and packing lists ............................. 39

Responses – Order Data Receive ............................................................................ 59

Response codes ............................................................................................................... 59

Example success response ............................................................................................. 59

Example error response ................................................................................................... 60

Handling errors ................................................................................................................. 60

System Testing and Activation ................................................................................ 60

Sample Order Data Download Code (PHP) ............................................................. 61

Sample Order Data Receive application code (PHP) .............................................. 62

Page 4: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Introducing the Ready Order Download API

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 4

Introducing the Ready Order Download API

You can get information about all of your orders that are ready to fulfill by using the Ready Order

Download API. This API returns shopper information, order information, and a printable packing list for

your orders that have a ready status, in all of your catalogs.

Your fulfillment partners can also use this API to obtain ready status information on their orders (with

your permission).

NOTE:

To accommodate server load, your order download requests are queued and then sent at regular intervals. Because of this, you may not receive your order information as soon as you request it. However, under normal operating conditions, assuming that you authenticate correctly and that no Internet or server issues or other errors occur, you will usually receive your data within an hour of the time you place your request.

Getting Started

NOTE: Shopatron usually recommends our APIs only to those who have a dedicated IT staff of capable programmers and a web-capable database for product and order data storage.

Before you begin

Obtaining API access

Before you can use the Ready Order Download API functions described in this guide, you will need to

contact Shopatron Merchant Support at (877) 715-7467 or send email to [email protected] to

obtain the information to configure your account.

System requirements

To use the Ready Order Download API, you need to have a valid, active Shopatron user account with

appropriate permissions. (Specifically, you must be assigned to the XML Auth User Group and have a

user Type of System Admin or Order Admin.) If the user account you use to authenticate is ever

deactivated, the Ready Order Download API will cease to function correctly.

In addition, you will need:

A server with Internet access that can communicate with Shopatron's server.

To be able to set up a cron on your server.

Writing the application

You need to write two applications:

Order Data Request application - This application is used to authenticate your permission and

submit your Ready Order request. If authentication is successful, you have defined a server and

Remote Procedure Call (RPC) name, and you have Ready orders in the system; your request to

retrieve these orders is placed in the send queue.

Page 5: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Getting Started

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 5

Order Data Receive application - This is the XML RPC server application used to receive the

data. The Order Data Receive application is an XML RPC server that Shopatron can call to send

order data to.

You can write the application in any programming or scripting language that can handle an RPC,

including PHP, ASP, Cold Fusion, JSP, JAVA, C, and so on.

NOTE:

Shopatron reserves the right to disallow the use of this API if the user violates Shopatron policies. Before we take this action, we attempt to contact the user. Additionally, we reserve the right to augment or modify this API at any time. This includes changing the number of, name of, and placement of data attributes and the queue schedule by which this API operates. While we will make every effort to provide regression support for older versions, you should prepare your application to anticipate updates. We do not recommend hard-coding the attribute placement by number, as the order of the attributes may change.

Ready Order Download process flow

The process for the Shopatron Ready Order Download XML-RPC is summarized here and depicted in

Figure 1:

1. To initiate the order download, you make a request to the Shopatron XML-RPC server.

2. The RPC authenticates your user name and password, checks your server and RPC name

information, and verifies that you have Ready orders in the system.

3. If these conditions are met, your request is placed in a send queue.

4. You receive a response code that indicates that the request was successful.

If your request is not successful, you receive an error response instead.

5. An application on our server checks the queue at periodic intervals. The server assembles ready

order data, generates HTML packing lists, and sends the data in an XML package to your XML-

RPC server. It then logs the data sent, the time sent, your response, and any error messages.

If we receive a success response from your server, your request is deleted from the queue.

If we receive an error code response from your server, an email is sent to our administrators,

who then follow up with you to resolve the issue before another data send is attempted.

Page 6: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Programming the Ready Order Download API

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 6

Figure 1. Ready Order Download Process Flow

Programming the Ready Order Download API

You need to write two applications: an Order Data Request application and an Order Data Receive

application. You can write these applications in any programming language that can handle a Remote

Procedure Call (RPC). The following sections describe these two applications separately.

Programming the Order Data Request application

The Order Data Request application will be used to authenticate your permission and submit your

request. If authentication is successful, you have defined a server and RPC name, and you have Ready

orders in the system; your request will be placed in the send queue.

Server and RPC information

1. Create an XML-RPC message that calls examples.xml_request_data and passes an array of

the parameters shown in the table for defining request elements, below.

2. Create an XML-RPC client that connects to the following server:

Server file name: /xmlServer.php

Page 7: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Programming the Order Data Request application

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 7

Server address: xml.shopatron.com

Server port: 443 (HTTPS preferred, but may use HTTP port)

NOTE: Leading and trailing spaces are removed from the username, password, mfg_id, and

catalog_id elements before authentication.

Order Data Request application request elements

Refer to this table for details for defining request elements:

Parameter Required Parent Data

Type

(Length)

Occurs Description

username Yes None String (50) 1 Shopatron username. (Must be a

valid and active user account with

System Admin or Order Admin

permission.)

password Yes None String (50) 1 Password for Shopatron user

account.

data_type Yes None String (50) 1 The type of data to download:

ready_orders.

filters Optional None Struct 0/1 Filter to limit orders retrieved.

ShipType is the only supported

filter.

ShipType Optional filters String 0/filters The shipping method for orders

retrieved. Supported values are:

sts - Ship to Store

ispu - In-Store Pickup (Local

Search First)

1day – 1-day Express Shipping

2day - 2-day Express Shipping

3day - 3-day Express Shipping

standard - Standard Shipping

IncludeFulfiller

Data

Optional None Struct Integer value = 1.

test_mode Optional None Int 0/1 Sending test_mode = 1. Will

return test data. Default value is

0.

Page 8: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Example Requests – Order Data Request

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8

Example Requests – Order Data Request

Example 1: Retrieving order and shipment information

This is an example message that could be used to retrieve order and shipment information for Standard

orders in Ready state:

Example 1: Retrieving order and shipment information

<param>

<value>

<string>xmluser4</string>

</value>

</param>

<param>

<value>

<string>Testing1234</string>

</value>

</param>

<param>

<value>

<string>ready_orders</string>

</value>

</param>

<param>

<value>

<struct>

<member>

<name>ShipType</name>

<value>

<string>standard</string>

</value>

</member>

</struct>

</value>

</param>

<param>

<value>

<struct>

<member>

<name>IncludeFulfillerData</name>

<value>

<int>1</int>

</value>

</member>

</struct>

</value>

</param>

<param>

<value>

<member>

<name>test_mode</name>

<value>

<int>1</int>

</value>

</member>

</value>

</param>

Page 9: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Example Requests – Order Data Request

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 9

Responses – Order Data Request

On success, the RPC returns a value of 0. On an error, the RPC returns a response message with the

faultCode and faultString.

Response codes

Code Description

0 Success. Your request has been queued.

1 Username or password is blank.

2 Invalid username, password, or permission.

3 Data_type is blank.

4 Data_type is not supported.

5 No server or RPC name on file for this data_type.

6 No data to retrieve. (No ready orders to send.)

7 Error adding request to queue.

Example success response

Example success response

<?xml version="1.0" encoding="UTF-8"?>

<methodResponse>

<params>

<param>

<value>

<int>0</int>

</value>

</param>

</params>

</methodResponse>

Example error response

Example error response

<?xml version="1.0" encoding="UTF-8"?>

<methodResponse>

Page 10: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Programming the Order Data Receive application

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 10

Example error response

<fault>

<value>

<struct>

<member>

<name>faultCode</name>

<value>

<int>4</int>

</value>

</member>

<member>

<name>faultString</name>

<value>

<string>unsupported is not a valid data type</string>

</value>

</member>

</struct>

</value>

</fault>

</methodResponse>

Handling errors

If you receive an error response fault code after sending the order information to Shopatron, follow

these steps:

1. Record the outgoing package and the associated fault code response from Shopatron.

2. Test for connectivity to the server (usually shopatron.com).

3. Hold the XML package for future transmission to Shopatron's servers.

4. Send an email to Shopatron Merchant Support at [email protected]; include the time and date

of the failed transmission.

5. When Shopatron support staff contacts you, resend the failed attempts.

Programming the Order Data Receive application

The Order Data Receive application receives an XML package with all order and shipment information.

In most cases, each order contains a single shipment. In rare cases, however, you may receive an XML

package that includes two orders with the same Order ID (Order Number) but different Shipment IDs.

Therefore, your code must look for identical Order IDs and handle them correctly.

Server and RPC information

1. Create an XML-RPC server with an RPC method that accepts a single XML package as a

parameter.

The parameters listed below (num_orders, test_mode, and order_data) are extracted from

this function parameter.

2. Send email to Shopatron Merchant Support Services at [email protected] with the following

information:

Server file name - The pathname of the file, for example: /myXMLServer.php

Page 11: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Programming the Order Data Receive application

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 11

Server address - The URL of the server, for example: xml.shopatron.com

Server port - The port number on which the server is connected, for example: 80 or 443

RPC name - The name of the remote procedure, for example: get_my_orders

Receive elements for the Order Data Receive application

Refer to this table for details for defining receive elements.

Element Required Parent Data

Type

(Length)

Occurs Description

num_orders Yes None Int 1 The number of orders in the

package.

test_mode Optional None Int 0/1 Value of 0 or 1.

order_x Yes None Struct Num

_orders

The order container. There is

one order container for each

order in the package.

Replace x with a number

starting with 0; for example,

order_0, order_1, and so on.

order_id Yes order_x Int 1/order Shopatron Order ID (also

called the "Order Number").

order_date Yes order_x String 1/order The date the order was placed.

mfg_id Yes order_x Int 1/order The Shopatron-assigned

manufacturer ID.

catalog_id Yes order_x Int 1/order The Shopatron-assigned

Catalog ID.

first_name Yes order_x String 1/order Consumer's first name.

last_name Yes order_x String 1/order Consumer's last name.

recipient Optional order_x String

(100)

0 or

1/order

The name of the gift recipient,

if this is a gift order.

message Optional order_x String

(100)

0 or

1/order

The gift message, if this is a

gift order.

address1 Yes order_x String (50) 1/order First line of ship-to address.

Page 12: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Programming the Order Data Receive application

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 12

Element Required Parent Data

Type

(Length)

Occurs Description

address2 Optional order_x String (50) 1/order Second line of ship-to address.

address3 Optional order_x String (50) 1/order Third line of ship-to address.

city Yes order_x String (50) 1/order City for ship-to address.

state Yes order_x String (50) 1/order State for ship-to address.

zip Yes order_x String (10) 1/order Zip or postal code for ship-to

address.

country Yes order_x String (50) 1/order Country for the ship-to

address.

country_code Yes order_x String (2) 1/order Two-character country code for

the ship-to address.

phone Yes order_x String (20) 1/order Consumer's phone number.

subtotal Yes order_x Double 1/order The order subtotal amount.

tax Yes order_x Double 1/order The order tax amount.

shipping Yes order_x Double 1/order The shipping amount.

total Yes order_x Double 1/order The consumer total for the

order. (In other words, the

amount the consumer paid).

shopatron_total Yes order_x Double 1/order The total amount that

Shopatron keeps for the order.

fulfiller_total Yes order_x Double 1/order The total amount that the

fulfiller keeps for the order.

fulfiller

_shipping

Yes order_x Double 1/order The fulfiller's shipping and

handling charges for the order.

fulfiller_tax Yes order_x Double 1/order The fulfiller's tax amount for the

order.

package_fee Yes order_x Double 1/order Shopatron discount, per order.

This is usually 0.75.

Page 13: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Programming the Order Data Receive application

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 13

Element Required Parent Data

Type

(Length)

Occurs Description

shipment_id Yes order_x Int 1/order The Shopatron-assigned

Shipment ID for the order. The

Shipment ID is required to use

the Shipment Data Upload

Tool API.

discount Optional order_x Struct 1/order The order discount container.

discount

_description

Optional discount String 1/discount A text description of the order

discount.

discount

_percentage

Optional discount Double 1/discount The percentage discount of the

order total.

discount_total Optional discount Double 1/discount The amount of discount from

the order total.

language_id Optional Order Block Int (1) 1/order The language for the order.

The following values are

accepted:

1 - US English

3 - Canadian French

4 - UK English

5 - FR French

6 - DE German

5 - IT Italian

currency_id Optional Order Block Int (1) 1/order The currency type for the

order. The following currency

types are supported:

1 - US Dollar

2 - Canadian Dollar

3 - British Pound

5 - German Euro

6 - French Euro

7 - Italian Euro

8 - Spanish Euro

9 - British Euro

10 - Dutch Euro

Page 14: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Programming the Order Data Receive application

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 14

Element Required Parent Data

Type

(Length)

Occurs Description

cust_comments Yes order_x String (50) 1/order Comments the consumer

entered for the order.

ship_type Yes order_x String 1/struct The shipping type for the order.

Acceptable values are:

standard - for standard

shipping

1day – for 1-day guaranteed

delivery

2day - for 2-day guaranteed

delivery

3day - for 3-day guaranteed

delivery

ispu - or in-store pickup (or

"Local Search First")

sts - for ship-to-store

sts+ - for shopper's choice

promotion_run_id Optional order_x Int 0 or

1/order

The promo run for the order, if

any.

authorization

_code

Optional order_x String 0 or

1/order

The authorization code for the

order, if any,

pro_order Optional order_x Int 0 or

1/order

Flag for Pro Store order. 1 =

true.

pro_group_combo

_id

Optional order_x String 0 or

1/order

The Pro Group Combo

discount, if this is a Pro Store

order.

additional_info Optional order_x Struct 1/order Additional info about the order.

in_store_pickup Optional Additional

_info

Int 1/

additional

_info

Flag for In-Store Pickup (Local

Search First). 1 = true.

express_shipping Optional Additional

_info

Struct 1/

additional

_info

Express shipping information.

Page 15: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Programming the Order Data Receive application

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 15

Element Required Parent Data

Type

(Length)

Occurs Description

express_shipping

_flag

Optional Express

_shipping

Int 1/express

_shipping

Flag for Express shipping. 1 =

true.

express_shipping

_text

Optional Express

_shipping

String 1/express

_shipping

Text for Express shipping.

express_shipping

_arrival

Optional Express

_shipping

Int 1/express

_shipping

Expected arrival date for

Express shipping.

ssvs_payments Optional Additional

_info

Struct 0 or

1/order

Container for SSVS (Gift Card)

information, where supported.

svs_payment_x Optional Ssvs

_payments

Int 0 or

1/order

Flag for SVS order. 1 = true.

account_number Optional Ssvs

_payments

String 0 or

1/order

Account number for SVS order.

amount Optional Svs

_payment_x

Int 0 or

1/order

Amount for SVS order.

authorization

_number

Optional Svs

_payment_x

String 0 or

1/order

Authorization number for SVS

order.

assigned_info Optional order_x Struct 1/order A container with assignment

information about the order.

retailer_id Optional Assigned

_info

Int 1/assigned

_info

The Shopatron-assigned ID of

the order fulfiller.

retailer_name Optional Assigned

_info

String 1/assigned

_info

The name of the order fulfiller.

retailer_location

_id

Optional Assigned

_info

Int 1/assigned

_info

The Shopatron-assigned

Location ID for the fulfiller. If

not included, the default

location ID is used.

retailer_location Optional Assigned

_info

String 1/assigned

_info

The name of the retail location

to which the order was

assigned. If not included, the

default location is used.

Page 16: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Programming the Order Data Receive application

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 16

Element Required Parent Data

Type

(Length)

Occurs Description

retailer_address Optional Assigned

_info

String 1/assigned

_info

The address of the retail

location to which the order was

assigned, as defined in

Shopatron.

retailer_zip Optional Assigned

_info

String 1/assigned

_info

The Zip code of the retail

location to which the order was

assigned, as defined in

Shopatron.

packing_list Yes order_x String 1/order The packing list for the order,

in HTML-encoded format.

num_items Yes order_x Int 1/order The number of items in the

order.

items Yes order_x Struct Num

_items/

order

The item container. Its children

are labeled item_x; where x is

replaced with the item number

beginning with 1; for example,

item_1, item_2, and so on.

item_id Yes item_x Int 1/item The Shopatron-assigned Item

ID.

quantity Yes item_x Int 1/item How many of this item the

order includes.

price Yes item_x Double 1/item The per-item price that the

consumer paid. This amount

reflects any order discounts

(shown in the discount

container) but does not reflect

any line_discount.

part_number Yes item_x String (50) 1/item The part number for the item,

as assigned by the

manufacturer.

line_item_tax Yes item_x Double 1/item The amount of tax the

consumer paid for this item.

Page 17: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Example Requests – Order Data Receive

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 17

Element Required Parent Data

Type

(Length)

Occurs Description

line_item

_subtotal

Yes item_x Double 1/item The consumer's subtotal for

this item = (qty * price) -

line_discount.

line_discount Yes item_x Double 1/item Any discount applied to this

line item.

fulfiller_total Yes item_x Double 1/item The per-item fulfiller total for

this item, after processing fees

and discounts. Per- piece in

the line item (for example,

price/qty).

shopatron_total Yes item_x Double 1/item The amount Shopatron keeps

for this item.

options Optional item_x Struct 1/item The options container.

option_x Optional options String

(402)

Num

_options/

item

An option. Here, x is replaced

by an option number; for

example, option_1, option_2,

and so on. The value is a string

with the option category and

value, such as Color: Blue.

fulfiller_line

_item_subtotal

Yes item_x Double 1/item The fulfiller’s subtotal for this

item = (qty * price) -

line_discount.

fulfiller_line

_item_tax

Yes item_x Double 1/item The amount of tax the fulfiller

paid for this item.

Example Requests – Order Data Receive

Example 2: Single order and single item with no packing list

The following XML message includes a single order and a single item but does not include the required

packing list. It includes the optional assigned order parameters and uses the additional_info

element to identify the order as an In-Store Pickup (Local Search First) order.

Example 2: Single order and single item with no packing list

Page 18: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Example Requests – Order Data Receive

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 18

Example 2: Single order and single item with no packing list

<?xml version="1.0" encoding="UTF-8"?>

<methodCall>

<methodName>examples.xml_get_my_orders</methodName>

<params>

<param>

<value>

<int>1</int>

</value>

</param>

<param>

<value>

<struct>

<member>

<name>order_0</name>

<value>

<struct>

<member>

<name>order_id</name>

<value>

<int>1234567</int>

</value>

</member>

<member>

<name>order_date</name>

<value>

<string>20-09-02</string>

</value>

</member>

<member>

<name>mfg_id</name>

<value>

<int>138</int>

</value>

</member>

<member>

<name>catalog_id</name>

<value>

<int>0</int>

</value>

</member>

<member>

<name>first_name</name>

<value>

<string>John</string>

</value>

</member>

<member>

<name>last_name</name>

<value>

<string>Smith</string>

</value>

</member>

<member>

<name>recipient</name>

<value>

<string>Joan Smith</string>

</value>

</member>

Page 19: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Example Requests – Order Data Receive

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 19

Example 2: Single order and single item with no packing list

<member>

<name>message</name>

<value>

<string>This gift is for you</string>

</value>

</member>

<member>

<name>address1</name>

<value>

<string>123 Main St.</string>

</value>

</member>

<member>

<name>address2</name>

<value>

<string>Suite 100</string>

</value>

</member>

<member>

<name>address3</name>

<value>

<string />

</value>

</member>

<member>

<name>city</name>

<value>

<string>Anyville</string>

</value>

</member>

<member>

<name>state</name>

<value>

<string>CA</string>

</value>

</member>

<member>

<name>zip</name>

<value>

<string>98765</string>

</value>

</member>

<member>

<name>country</name>

<value>

<string>United States</string>

</value>

</member>

<member>

<name>country_code</name>

<value>

<string>US</string>

</value>

</member>

<member>

<name>phone</name>

<value>

<string>(877)715-7467</string>

Page 20: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Example Requests – Order Data Receive

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 20

Example 2: Single order and single item with no packing list

</value>

</member>

<member>

<name>subtotal</name>

<value>

<double>15.65</double>

</value>

</member>

<member>

<name>tax</name>

<value>

<double>0</double>

</value>

</member>

<member>

<name>shipping</name>

<value>

<double>2.9</double>

</value>

</member>

<member>

<name>total</name>

<value>

<double>18.55</double>

</value>

</member>

<member>

<name>shopatron_total</name>

<value>

<double>0.74</double>

</value>

</member>

<member>

<name>fulfiller_total</name>

<value>

<double>17.81</double>

</value>

</member>

<member>

<name>fulfiller_shipping</name>

<value>

<double>2.10</double>

</value>

</member>

<member>

<name>fulfiller_tax</name>

<value>

<double>0</double>

</value>

</member>

<member>

<name>package_fee</name>

<value>

<double>0.85</double>

</value>

</member>

<member>

<name>shipment_id</name>

Page 21: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Example Requests – Order Data Receive

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 21

Example 2: Single order and single item with no packing list

<value>

<int>100001</int>

</value>

</member>

<member>

<name>assigned_info</name>

<value>

<struct>

<member>

<name>retailer_id</name>

<value>

<int>2687</int>

</value>

</member>

<member>

<name>retailer_name</name>

<value>

<string>Test Store</string>

</value>

</member>

<member>

<name>retailer_location_id</name>

<value>

<int>8006</int>

</value>

</member>

<member>

<name>retailer_location_name</name>

<value>

<string>Test Store #24</string>

</value>

</member>

<member>

<name>retailer_address</name>

<value>

<string>123 Fake St</string>

</value>

</member>

<member>

<name>retailer_zip</name>

<value>

<string>93412</string>

</value>

</member>

</struct>

</value>

</member>

<member>

<name>additional_info</name>

<value>

<struct>

<member>

<name>in_store_pickup</name>

<value>

<int>1</int>

</value>

</member>

</struct>

Page 22: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Example Requests – Order Data Receive

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 22

Example 2: Single order and single item with no packing list

</value>

</member>

<member>

<name>language_id</name>

<value>

<int>1</int>

</value>

</member>

<member>

<name>currency_id</name>

<value>

<int>1</int>

</value>

</member>

<member>

<name>packing_list</name>

<value>

<string>[packing list here]</string>

</value>

</member>

<member>

<name>num_items</name>

<value>

<int>1</int>

</value>

</member>

<member>

<name>items</name>

<value>

<struct>

<member>

<name>item_1</name>

<value>

<struct>

<member>

<name>item_id</name>

<value>

<int>12345</int>

</value>

</member>

<member>

<name>quantity</name>

<value>

<int>1</int>

</value>

</member>

<member>

<name>price</name>

<value>

<double>15.65</double>

</value>

</member>

<member>

<name>part_number</name>

<value>

<string>1001</string>

</value>

</member>

Page 23: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Example Requests – Order Data Receive

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 23

Example 2: Single order and single item with no packing list

<member>

<name>line_item_tax</name>

<value>

<double>0.7942</double>

</value>

</member>

<member>

<name>line_item_subtotal</name>

<value>

<double>15.65</double>

</value>

</member>

<member>

<name>line_discount</name>

<value>

<double>0</double>

</value>

</member>

<member>

<name>fulfiller_total</name>

<value>

<double>14.45</double>

</value>

</member>

<member>

<name>shopatron_total</name>

<value>

<double>1.2</double>

</value>

</member>

<member>

<name>fulfiller_line_item_subtotal

</name>

<value>

<double>14.3625</double>

</value>

</member>

<member>

<name>fulfiller_line_item_tax</name>

<value>

<double>1.3692</double>

</value>

</member>

</struct>

</value>

</member>

</struct>

</value>

</member>

</struct>

</value>

</member>

</struct>

</value>

</param>

</params>

</methodCall>

Page 24: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Example Requests – Order Data Receive

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 24

Example 3: Two orders and test_mode parameter

Example 3: Two orders and test_mode parameter

<?xml version="1.0"?>

<methodCall>

<methodName>examples.xml_get_my_orders</methodName>

<params>

<param>

<value>

<int>2</int>

</value>

</param>

<param>

<value>

<int>0</int>

</value>

</param>

<param>

<value>

<struct>

<member>

<name>order_0</name>

<value>

<struct>

<member>

<name>order_id</name>

<value>

<int>1234567</int>

</value>

</member>

<member>

<name>order_date</name>

<value>

<string>2005-09-19</string>

</value>

</member>

<member>

<name>mfg_id</name>

<value>

<int>138</int>

</value>

</member>

<member>

<name>catalog_id</name>

<value>

<int>0</int>

</value>

</member>

<member>

<name>first_name</name>

<value>

<string>John</string>

</value>

</member>

<member>

<name>last_name</name>

<value>

<string>Smith</string>

</value>

Page 25: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Example Requests – Order Data Receive

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 25

Example 3: Two orders and test_mode parameter

</member>

<member>

<name>recipient</name>

<value>

<string>Joan Smith</string>

</value>

</member>

<member>

<name>message</name>

<value>

<string>A gift for you </string>

</value>

</member>

<member>

<name>address1</name>

<value>

<string>123 Main St.</string>

</value>

</member>

<member>

<name>address2</name>

<value>

<string>Suite 100</string>

</value>

</member>

<member>

<name>address3</name>

<value>

<string></string>

</value>

</member>

<member>

<name>city</name>

<value>

<string>Anyville</string>

</value>

</member>

<member>

<name>state</name>

<value>

<string>CA</string>

</value>

</member>

<member>

<name>zip</name>

<value>

<string>98765</string>

</value>

</member>

<member>

<name>country</name>

<value>

<string>United States</string>

</value>

</member>

<member>

<name>country_code</name>

<value>

Page 26: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Example Requests – Order Data Receive

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 26

Example 3: Two orders and test_mode parameter

<string>US</string>

</value>

</member>

<member>

<name>phone</name>

<value>

<string>877-715-7467</string>

</value>

</member>

<member>

<name>subtotal</name>

<value>

<double>15.65</double>

</value>

</member>

<member>

<name>tax</name>

<value>

<double>0</double>

</value>

</member>

<member>

<name>shipping</name>

<value>

<double>2.9</double>

</value>

</member>

<member>

<name>total</name>

<value>

<double>18.65</double>

</value>

</member>

<member>

<name>shopatron_total</name>

<value>

<double>0.74</double>

</value>

</member>

<member>

<name>fulfiller_total</name>

<value>

<double>17.91</double>

</value>

</member>

<member>

<name>fulfiller_shipping</name>

<value>

<double>2.81</double>

</value>

</member>

<member>

<name>fulfiller_tax</name>

<value>

<double>0</double>

</value>

</member>

<member>

Page 27: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Example Requests – Order Data Receive

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 27

Example 3: Two orders and test_mode parameter

<name>package_fee</name>

<value>

<double>0.07</double>

</value>

</member>

<member>

<name>shipment_id</name>

<value>

<int>100001</int>

</value>

</member>

<member>

<name>discount</name>

<value>

<struct>

<member>

<name>discount_description</name>

<value>

<string>Abb</string>

</value>

</member>

<member>

<name>discount_percentage</name>

<value>

<double>0.1</double>

</value>

</member>

<member>

<name>discount_total</name>

<value>

<double>1.87</double>

</value>

</member>

</struct>

</value>

</member>

<member>

<name>language_id>

<value>

<int>1</int>

</value>

</member>

<member>

<name>currency_id</name>

<value>

<int>1</int>

</value>

</member>

<member>

<name>ship_type</name>

<value>

<string>standard</string>

</value>

</member>

<member>

<name>packing_list</name>

<value>

<string>

Page 28: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Example Requests – Order Data Receive

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 28

Example 3: Two orders and test_mode parameter

&lt;html&gt;

&lt;head&gt;

&lt;title&gt;Order #1234567&lt;/title&gt;

&lt;style&gt;

BODY { background-color : #FFFFFF; font-size : 9pt; font-

family : Arial, Helvetica; }

TD { font-size : 9pt; font-family : Arial, Helvetica; }

TH { font-size : 10pt; font-weight : bold; font-family :

Arial, Helvetica; }

.detailSmTxt { font-size: 8pt; }

.smtxt { font-size: 8pt; }

.italHeader { font-size : 14pt; font-weight : bold; font-

style : italic; font-family : Arial, Helvetica; }

.smitalHeader { font-size : 12pt; font-weight : bold;

font-style : italic; font-family : Arial, Helvetica; }

.smlHd { font-size : 12pt; }

.sTH { font-variant: small-caps; background: Silver; }

.gryLarge { font-size : 18pt; font-family : Arial Black,

Arial, Helvetica; color: #999999; }

.gryLarger { font-family: Arial Black, Arial, Helvetica;

font-size: 22pt; font-weight: bold; color: #A9A9A9; }

.flTB { border-top: solid 1px #C0C0C0; border-right:

solid 1px #C0C0C0; }

.flTD { border-left: solid 1px #C0C0C0; border-bottom:

solid 1px #C0C0C0; }

.sTHflTD { font-variant: small-caps; background: Silver;

border-left: solid 1px #C0C0C0; border-bottom: solid 1px #C0C0C0; }

.detailSmTD { font-size: 8pt; border-left: solid 1px

#C0C0C0; border-bottom: solid 1px #C0C0C0; }

.u { font-weight : bold; text-decoration : underline; }

.b { font-weight : bold; }

.mno { font-family : Courier New, Courier; }

&lt;/style

&lt;/head&gt;

&lt;body&gt;

&lt;table border="0" cellspacing="2" cellpadding="2"&gt;

&lt;tr&gt;

&lt;td width="8"&gt;&nbsp;&lt;/td&gt;

&lt;td valign="top"&gt;

&lt;table cellspacing=&quot;2&quot;

cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;650&quot;&gt;

&lt;tr&gt;

&lt;td&gt;&lt;img

src=&quot;/img/back_int/o_shopatron.gif&quot;&gt;&lt;/td&gt;&lt;td

align=&quot;center&quot; valign=&quot;middle&quot;&gt;&lt;span

class=&quot;italHeader&quot;&gt;Test MFG Order 1234567&lt;/span&gt;&lt;/td&gt;

&lt;/tr&gt;

&lt;tr&gt;

&lt;td background=&quot;/img/back_int/darkblue.gif&quot;

colspan=&quot;2&quot; height=&quot;5&quot;&gt;&lt;img

src=&quot;/img/back_int/darkblue.gif&quot; width=&quot;100%&quot;

height=&quot;5&quot;&gt;&lt;/td&gt;

&lt;/tr&gt;

&lt;/table&gt;

&lt;table cellspacing=&quot;2&quot;

cellpadding=&quot;2&quot; border=&quot;0&quot; width=&quot;500&quot;&gt;

&lt;tr&gt;

&lt;td valign=&quot;top&quot; width=&quot;50%&quot;

Page 29: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Example Requests – Order Data Receive

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 29

Example 3: Two orders and test_mode parameter

NOWRAP&gt;&lt;span style=&quot;font-size: 9pt&quot;&gt;This order brought to you

by:&lt;br&gt;&lt;strong&gt;Test MFG&lt;/strong&gt;&lt;br&gt;PO Box

1234&lt;br&gt;San Luis Obispo, CA 93401&lt;br&gt;United States of

America&lt;/span&gt;

&lt;/td&gt;

&lt;td valign=&quot;top&quot;

width=&quot;50%&quot;&gt;&lt;span style=&quot;font-size:

9pt&quot;&gt;&lt;br&gt;Phone: 248-955-1419&lt;br&gt;Fax: 248-471-

4829&lt;br&gt;Email: [email protected]&lt;/span&gt;&lt;/td&gt;

&lt;/tr&gt;

&lt;/table&gt;

&lt;br&gt;

&lt;span class=&quot;gryLarger&quot;&gt;THANK YOU FOR

YOUR ORDER&lt;/span&gt;&lt;br&gt;

&lt;table cellspacing=&quot;2&quot;

cellpadding=&quot;2&quot; border=&quot;0&quot; width=&quot;500&quot;&gt;

&lt;tr&gt;

&lt;td width=&quot;50%&quot;

valign=&quot;top&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-weight:

bold&quot;&gt;Ship To:&lt;/span&gt;&lt;br&gt;Joan Smith&lt;br&gt;123 Main

St.&lt;br&gt;Suite 100&lt;br&gt;Anyville CA, 98765&lt;br&gt;United States of

America&lt;BR&gt;Phone: 877-715-7467&lt;br&gt;&lt;/td&gt;

&lt;td width=&quot;50%&quot;

valign=&quot;top&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-weight:

bold&quot;&gt;Sold To:&lt;/span&gt;&lt;br&gt;John Smith&lt;br&gt;2074 Parker

St.&lt;br&gt;San Luis Obispo, CA 93401&lt;br&gt;United States of

America&lt;br&gt;Phone: 877-715-7467&lt;/td&gt;

&lt;/tr&gt;

&lt;/table&gt;

&lt;br&gt;

&lt;table border=&quot;0&quot; cellspacing=&quot;0&quot;

cellpadding=&quot;2&quot; class=&quot;flTB&quot; width=&quot;650&quot;&gt;

&lt;tr&gt;

&lt;th class=&quot;flTD&quot;&gt;Quantity&lt;/th&gt;

&lt;th class=&quot;flTD&quot; NOWRAP&gt;Item&lt;/th&gt;

&lt;th class=&quot;flTD&quot;

width=&quot;50%&quot;&gt;Description&lt;/th&gt;The following example includes two

orders and shows the optional test_mode parameter.

&lt;th class=&quot;flTD&quot;&gt;Manufacturer&lt;/th&gt;

&lt;th class=&quot;flTD&quot;&gt;Subtotal&lt;/th&gt;

&lt;/tr&gt;

&lt;tr&gt;

&lt;td align=&quot;center&quot; style=&quot;font-size:

9pt; border-left: solid 1px #C0C0C0;&quot;&gt;1&lt;/td&gt;

&lt;td style=&quot;font-size: 9pt; border-left: solid 1px

#C0C0C0;&quot;&gt;1001&lt;/td&gt;

&lt;td style=&quot;font-size: 9pt; border-left: solid 1px

#C0C0C0;&quot;&gt;Test Product&lt;/td&gt;

&lt;td align=&quot;center&quot; style=&quot;font-size:

9pt; border-left: solid 1px #C0C0C0;&quot;&gt;Test MFG&lt;/td&gt;

&lt;td align=&quot;right&quot; style=&quot;font-size:

9pt; border-left: solid 1px #C0C0C0;&quot;&gt;15.65&lt;/td&gt;

&lt;/tr&gt;

&lt;tr&gt;

&lt;td style=&quot;font-size: 9pt; border-left: solid 1px

#C0C0C0; border-bottom: solid 1px #C0C0C0;&quot;&gt;&amp;nbsp;&lt;/td&gt;

&lt;td style=&quot;font-size: 9pt; border-left: solid 1px

Page 30: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Example Requests – Order Data Receive

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 30

Example 3: Two orders and test_mode parameter

#C0C0C0; border-bottom: solid1px #C0C0C0;&quot;&gt;&amp;nbsp;&lt;/td&gt;

&lt;td style=&quot;font-size: 8pt; border-left: solid 1px

#C0C0C0; border-bottom: solid1px #C0C0C0;&quot;&gt;&lt;li&gt;Texture:

Rough&lt;/li&gt;&lt;li&gt;Color: Blue&lt;/li&gt;&lt;li&gt;Style:

Rough&lt;/li&gt;&lt;li&gt;Size: L&lt;/li&gt;&lt;/td&gt;

&lt;td style=&quot;font-size: 9pt; border-left: solid 1px

#C0C0C0; border-bottom: solid 1px #C0C0C0;&quot;&gt;&amp;nbsp;&lt;/td&gt;

&lt;td style=&quot;font-size: 9pt; border-left: solid 1px

#C0C0C0; border-bottom: solid1px #C0C0C0;&quot;&gt;&amp;nbsp;&lt;/td&gt;

&lt;/tr&gt;

&lt;tr&gt;

&lt;th colspan=&quot;4&quot; align=&quot;right&quot;

class=&quot;detailSmTD&quot; style=&quot;font-size: 9pt;&quot;&gt;Subtotal of

items&lt;/th&gt;

&lt;td align=&quot;right&quot;

class=&quot;detailSmTD&quot; style=&quot;font-size:

9pt;&quot;&gt;15.65&lt;/td&gt;

&lt;/tr&gt;

&lt;tr&gt;

&lt;th colspan=&quot;4&quot; align=&quot;right&quot;

class=&quot;detailSmTD&quot; style=&quot;font-size: 9pt;&quot;&gt;Shipping

&amp;amp; Handling Fee&lt;/th&gt;

&lt;td align=&quot;right&quot;

class=&quot;detailSmTD&quot; style=&quot;font-size: 9pt;&quot;&gt;2.90&lt;/td&gt;

&lt;/tr&gt;

&lt;tr&gt;

&lt;th colspan=&quot;4&quot; align=&quot;right&quot;

class=&quot;detailSmTD&quot; style=&quot;font-size: 9pt;&quot;&gt; Total of

shipment including shipping&lt;/th&gt;

&lt;td align=&quot;right&quot;

class=&quot;detailSmTD&quot; style=&quot;font-size:

9pt;&quot;&gt;18.55&lt;/td&gt;

&lt;/tr&gt;

&lt;/table&gt;

&lt;br&gt;

&lt;table width=&quot;650&quot; cellpadding=&quot;0&quot;

cellspacing=&quot;0&quot;&gt;

&lt;tr&gt;

&lt;td background=&quot;/img/back_int/darkblue.gif&quot;

colspan=&quot;2&quot; height=&quot;5&quot;&gt;&lt;img

src=&quot;/img/back_int/darkblue.gif&quot; width=&quot;100%&quot;

height=&quot;5&quot;&gt;&lt;/td&gt;

&lt;/tr&gt;

&lt;tr&gt;

&lt;td valign=&quot;top&quot;

width=&quot;50%&quot;&gt;&lt;br&gt;

&lt;TABLE border=&quot;0&quot; cellpadding=&quot;5&quot;

cellspacing=&quot;0&quot;&gt;

&lt;TR&gt;

&lt;TD width=&quot;350&quot; valign=&quot;top&quot;

align=&quot;left&quot; bgcolor=&quot;#ffffff&quot; style=&quot;font-size:

10pt&quot;&gt;

&lt;span class=&quot;u&quot; style=&quot;font-size:

10pt&quot;&gt;Customer Service:&lt;/span&gt;&lt;br&gt;

Manufacturers and retailers who participate in the

Shopatron network are committed to satisfying your needs and providing you with

an exceptional online shopping experience.

&lt;br&gt;&lt;br&gt;The fulfiller of your order is ready

Page 31: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Example Requests – Order Data Receive

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 31

Example 3: Two orders and test_mode parameter

to provide outstanding technical and order-related service.&lt;br&gt;&lt;br&gt;

&lt;span class=&quot;u&quot; style=&quot;font-size:

10pt&quot;&gt;Fulfiller Contact Information&lt;br&gt;&lt;/span&gt;

Test MFG&lt;br&gt;

248-955-1419&lt;br&gt;[email protected]

&lt;br&gt;&lt;br&gt;If you have any questions or problem

s that cannot be addressed by Test MFG,&lt;br&gt;please

call: 877-715-7467

&lt;/TD&gt;

&lt;/TR&gt;

&lt;/TABLE&gt;

&lt;/td&gt;

&lt;td valign=&quot;top&quot; align=&quot;right&quot;

width=&quot;50%&quot;&gt;&lt;br&gt;

&lt;TABLE border=&quot;0&quot; cellpadding=&quot;5&quot;

cellspacing=&quot;0&quot;&gt;

&lt;TR&gt;

&lt;TD width=&quot;350&quot; valign=&quot;top&quot;

align=&quot;left&quot; bgcolor=&quot;#ffffff&quot; style=&quot;font-size:

10pt&quot;&gt;

&lt;span class=&quot;u&quot; style=&quot;font-size:

10pt&quot;&gt;Return/Exchange Instructions:&lt;/span&gt;

&lt;br&gt;A return merchandise authorization number (RMA

number) is required for all returns.

&lt;br&gt;&lt;br&gt;Please call Test MFG at 248-955-1419

or email to [email protected]

&lt;br&gt;All returns must be in their original packaging

in new and unused condition. You have 30 days to return or exchange your

merchandise.

&lt;br&gt;&lt;br&gt;&lt;span class=&quot;u&quot;

style=&quot;font-size: 10pt&quot;&gt;Return Address:&lt;br&gt;&lt;/span&gt;Test

MFG&lt;br&gt;PO Box 1234&lt;BR&gt;blah&lt;BR&gt;blah&lt;BR&gt;Farmington Hillsa,

AL 93402&lt;BR&gt;United States of America

&lt;/TD&gt;

&lt;/TR&gt;

&lt;/TABLE&gt;

&lt;/td&gt;

&lt;/tr&gt;

&lt;/table&gt;

&lt;/td&gt;

&lt;/tr&gt;

&lt;/table&gt;

&lt;/body&gt;

&lt;/html&gt;

</string>

</value>

</member>

<member>

<name>num_items</name>

<value>

<int>1</int>

</value>

</member>

<member>

<name>items</name>

<value>

<struct>

Page 32: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Example Requests – Order Data Receive

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 32

Example 3: Two orders and test_mode parameter

<member>

<name>item_1</name>

<value>

<struct>

<member>

<name>item_id</name>

<value>

<int>12345</int>

</value>

</member>

<member>

<name>quantity</name>

<value>

<int>1</int>

</value>

</member>

<member>

<name>price</name>

<value>

<double>15.65</double>

</value>

</member>

<member>

<name>part_number</name>

<value>

<string>1001</string>

</value>

</member>

<member>

<name>line_item_tax</name>

<value>

<double>0.7942</double>

</value>

</member>

<member>

<name>line_item_subtotal</name>

<value>

<double>15.65</double>

</value>

</member>

<member>

<name>line_discount</name>

<value>

<double>0</double>

</value>

</member>

<member>

<name>fulfiller_total</name>

<value>

<double>14.45</double>

</value>

</member>

<member>

<name>shopatron_total</name>

<value>

<double>1.2</double>

</value>

</member>

Page 33: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Example Requests – Order Data Receive

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 33

Example 3: Two orders and test_mode parameter

<member>

<name>options</name>

<value>

<struct>

<member>

<name>option_1</name>

<value>

<string>Color:Blue </string>

</value>

</member>

<member>

<name>option_2</name>

<value>

<string>Style: Rough</string>

</value>

</member>

<member>

<name>option_3</name>

<value>

<string>Size:L </string>

</value>

</member>

</struct>

</value>

</member>

</struct>

</value>

</member>

</struct>

</value>

</member>

</struct>

</value>

</member>

<member>

<name>order_1</name>

<value>

<struct>

<member>

<name>order_id</name>

<value>

<int>1234568</int>

</value>

</member>

<member>

<name>order_date</name>

<value>

<string>2005-09-19</string>

</value>

</member>

<member>

<name>mfg_id</name>

<value>

<int>138</int>

</value>

</member>

<member>

<name>catalog_id</name>

Page 34: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Example Requests – Order Data Receive

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 34

Example 3: Two orders and test_mode parameter

<value>

<int>0</int>

</value>

</member>

<member>

<name>first_name</name>

<value>

<string>Bob</string>

</value>

</member>

<member>

<name>last_name</name>

<value>

<string>Jones</string>

</value>

</member>

<member>

<name>recipient</name>

<value>

<string></string>

</value>

</member>

<member>

<name>message</name>

<value>

<string></string>

</value>

</member>

<member>

<name>address1</name>

<value>

<string>1234 Whatever St.</string>

</value>

</member>

<member>

<name>address2</name>

<value>

<string></string>

</value>

</member>

<member>

<name>address3</name>

<value>

<string></string>

</value>

</member>

<member>

<name>city</name>

<value>

<string>Whatever City</string>

</value>

</member>

<member>

<name>state</name>

<value>

<string>CA</string>

</value>

</member>

Page 35: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Example Requests – Order Data Receive

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 35

Example 3: Two orders and test_mode parameter

<member>

<name>zip</name>

<value>

<string>11111</string>

</value>

</member>

<member>

<name>country</name>

<value>

<string>United States</string>

</value>

</member>

<member>

<name>country_code</name>

<value>

<string>US</string>

</value>

</member>

<member>

<name>phone</name>

<value>

<string>877-715-7467</string>

</value>

</member>

<member>

<name>subtotal</name>

<value>

<double>21.99</double>

</value>

</member>

<member>

<name>tax</name>

<value>

<double>2.99</double>

</value>

</member>

<member>

<name>shipping</name>

<value>

<double>8.9</double>

</value>

</member>

<member>

<name>total</name>

<value>

<double>33.88</double>

</value>

</member>

<member>

<name>shopatron_total</name>

<value>

<double>1.90</double>

</value>

</member>

<member>

<name>fulfiller_total</name>

<value>

<double>31.98</double>

Page 36: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Example Requests – Order Data Receive

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 36

Example 3: Two orders and test_mode parameter

</value>

</member>

<member>

<name>fulfiller_shipping</name>

<value>

<double>8.74</double>

</value>

</member>

<member>

<name>fulfiller_tax</name>

<value>

<double>0</double>

</value>

</member>

<member>

<name>package_fee</name>

<value>

<double>0.07</double>

</value>

</member>

<member>

<name>shipment_id</name>

<value>

<int>100002</int>

</value>

</member>

<member>

<name>language_id</name>

<value>

<int>1</int>

</value>

</member>

<member>

<name>currency_id</name>

<value>

<int>1</int>

</value>

</member>

<member>

<name>ship_type</name>

<value>

<string>2day</string>

</value>

</member>

<member>

<name>packing_list</name>

<value>

<string>[packing list here]</string>

</value>

</member>

<member>

<name>num_items</name>

<value>

<int>2</int>

</value>

</member>

<member>

<name>items</name>

Page 37: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Example Requests – Order Data Receive

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 37

Example 3: Two orders and test_mode parameter

<value>

<struct>

<member>

<name>item_1</name>

<value>

<struct>

<member>

<name>item_id</name>

<value>

<int>12346</int>

</value>

</member>

<member>

<name>quantity</name>

<value>

<int>1</int>

</value>

</member>

<member>

<name>price</name>

<value>

<double>9.99</double>

</value>

</member>

<member>

<name>part_number</name>

<value>

<string>1002</string>

</value>

</member>

<member>

<name>line_item_tax</name>

<value>

<double>0.7942</double>

</value>

</member>

<member>

<name>line_item_subtotal</name>

<value>

<double>9.99</double>

</value>

</member>

<member>

<name>line_discount</name>

<value>

<double>0</double>

</value>

</member>

<member>

<name>fulfiller_total</name>

<value>

<double>9.79</double>

</value>

</member>

<member>

<name>shopatron_total</name>

<value>

<double>1.2</double>

Page 38: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Example Requests – Order Data Receive

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 38

Example 3: Two orders and test_mode parameter

</value>

</member>

</struct>

</value>

</member>

<member>

<name>item_2</name>

<value>

<struct>

<member>

<name>item_id</name>

<value>

<int>12347</int>

</value>

</member>

<member>

<name>quantity</name>

<value>

<int>2</int>

</value>

</member>

<member>

<name>price</name>

<value>

<double>5.5</double>

</value>

</member>

<member>

<name>part_number</name>

<value>

<string>1003</string>

</value>

</member>

<member>

<name>line_item_tax</name>

<value>

<double>0.7942</double>

</value>

</member>

<member>

<name>line_item_subtotal</name>

<value>

<double>11.00</double>

</value>

</member>

<member>

<name>line_discount</name>

<value>

<double>0</double>

</value>

</member>

<member>

<name>fulfiller_total</name>

<value>

<double>10.21</double>

</value>

</member>

<member>

Page 39: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Example Requests – Order Data Receive

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 39

Example 3: Two orders and test_mode parameter

<name>shopatron_total</name>

<value>

<double>1.2</double>

</value>

</member>

<member>

<name>options</name>

<value>

<struct>

<member>

<name>option_1</name>

<value>

<string>Color:Red </string>

</value>

</member>

<member>

<name>option_2</name>

<value>

<string>Size:M </string>

</value>

</member>

<member>

<name>fulfiller_line_item_subtotal</name>

<value>

<double>14.3625</double>

</value>

</member>

<member>

<name>fulfiller_line_item_tax</name>

<value>

<double>1.3692</double>

</value>

</member>

</struct>

</value>

</member>

</struct>

</value>

</member>

</struct>

</value>

</member>

</struct>

</value>

</member>

</struct>

</value>

</param>

</params>

</methodCall>

Example 4: Order data message with two orders and packing lists

Example 4: Order data message with two orders and packing lists

Page 40: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Example Requests – Order Data Receive

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 40

Example 4: Order data message with two orders and packing lists

<?xml version="1.0"?>

<methodCall>

<methodName>examples.xml_get_my_orders</methodName>

<params>

<param>

<value>

<int>2</int>

</value>

</param>

<param>

<value>

<int>0</int>

</value>

</param>

<param>

<value>

<struct>

<member>

<name>order_0</name>

<value>

<struct>

<member>

<name>order_id</name>

<value>

<int>1234567</int>

</value>

</member>

<member>

<name>order_date</name>

<value>

<string>20011-09-19</string>

</value>

</member>

<member>

<name>mfg_id</name>

<value>

<int>138</int>

</value>

</member>

<member>

<name>catalog_id</name>

<value>

<int>0</int>

</value>

</member>

<member>

<name>first_name</name>

<value>

<string>John</string>

</value>

</member>

<member>

<name>last_name</name>

<value>

<string>Smith</string>

</value>

</member>

<member>

Page 41: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Example Requests – Order Data Receive

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 41

Example 4: Order data message with two orders and packing lists

<name>recipient</name>

<value>

<string>Joan Smith</string>

</value>

</member>

<member>

<name>message</name>

<value>

<string>A gift for you </string>

</value>

</member>

<member>

<name>address1</name>

<value>

<string>123 Main St.</string>

</value>

</member>

<member>

<name>address2</name>

<value>

<string>Suite 100</string>

</value>

</member>

<member>

<name>address3</name>

<value>

<string></string>

</value>

</member>

<member>

<name>city</name>

<value>

<string>Anyville</string>

</value>

</member>

<member>

<name>state</name>

<value>

<string>CA</string>

</value>

</member>

<member>

<name>zip</name>

<value>

<string>98765</string>

</value>

</member>

<member>

<name>country</name>

<value>

<string>United States</string>

</value>

</member>

<member>

<name>country_code</name>

<value>

<string>US</string>

</value>

Page 42: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Example Requests – Order Data Receive

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 42

Example 4: Order data message with two orders and packing lists

</member>

<member>

<name>phone</name>

<value>

<string>877-715-7467</string>

</value>

</member>

<member>

<name>subtotal</name>

<value>

<double>15.65</double>

</value>

</member>

<member>

<name>tax</name>

<value>

<double>0</double>

</value>

</member>

<member>

<name>shipping</name>

<value>

<double>2.9</double>

</value>

</member>

<member>

<name>total</name>

<value>

<double>18.65</double>

</value>

</member>

<member>

<name>shopatron_total</name>

<value>

<double>0.74</double>

</value>

</member>

<member>

<name>fulfiller_total</name>

<value>

<double>17.91</double>

</value>

</member>

<member>

<name>fulfiller_shipping</name>

<value>

<double>2.81</double>

</value>

</member>

<member>

<name>fulfiller_tax</name>

<value>

<double>0</double>

</value>

</member>

<member>

<name>package_fee</name>

<value>

Page 43: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Example Requests – Order Data Receive

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 43

Example 4: Order data message with two orders and packing lists

<double>0.07</double>

</value>

</member>

<member>

<name>shipment_id</name>

<value>

<int>100001</int>

</value>

</member>

<member>

<name>discount</name>

<value>

<struct>

<member>

<name>discount_description</name>

<value>

<string>Abb</string>

</value>

</member>

<member>

<name>discount_percentage</name>

<value>

<double>0.1</double>

</value>

</member>

<member>

<name>discount_total</name>

<value>

<double>1.87</double>

</value>

</member>

</struct>

</value>

</member>

<member>

<name>language_id>

<value>

<int>1</int>

</value>

</member>

<member>

<name>currency_id</name>

<value>

<int>1</int>

</value>

</member>

<member>

<name>ship_type</name>

<value>

<string>standard</string>

</value>

</member>

<member>

<name>promotion_run_id</name>

<value>

<int>11448</int>

</value>

</member>

Page 44: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Example Requests – Order Data Receive

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 44

Example 4: Order data message with two orders and packing lists

<member>

<name>authorization_code</name>

<value>

<string>3off</string>

</value>

</member>

<member>

<name>pro_order</name>

<value>

<int>1</int>

</value>

</member>

<member>

<name>pro_group_combo_id</name>

<value>

<string>970</string>

</value>

</member>

<member>

<name>additional_info</name>

<value>

<struct>

<member>

<name>express_shipping</name>

<value>

<struct>

<member>

<name>express_shipping_flag </name>

<value>

<int>1</int>

</value>

</member>

<member>

<name>express_shipping_text </name>

<value>

<string>Second day express shipment </string>

</value>

</member>

<member>

<name>express_shipping_arrival </name>

<value>

<string>2011-09-21</string>

</value>

</member>

</struct>

</value>

</member>

<member>

<name>ssvs_payments</name>

<value>

<struct>

<member>

<name>svs_payment_0</name>

<value>

<struct>

<member>

<name>account_number </name>

<value>

Page 45: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Example Requests – Order Data Receive

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 45

Example 4: Order data message with two orders and packing lists

<string>25768 </string>

</value>

</member>

<member>

<name>amount</name>

<value>

<double>25 </double>

</value>

</member>

<member>

<name>authorization_ number</name>

<value>

<string> 6090983212674927</string>

</value>

</member>

</struct>

</value>

</member>

</struct>

</value>

</member>

</struct>

</value>

</member>

<member>

<name>discount</name>

<value>

<struct>

<member>

<name>discount_description</name>

<value>

<string>1</string>

</value>

</member>

<member>

<name>discount_percentage</name>

<value>

<double>0.04</double>

</value>

</member>

<member>

<name>discount_total</name>

<value>

<double>0.626</double>

</value>

</member>

</struct>

</value>

</member>

<member>

<name>assigned_info</name>

<value>

<struct>

<member>

<name>retailer_id</name>

<value>

<int>30826</int>

</value>

Page 46: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Example Requests – Order Data Receive

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 46

Example 4: Order data message with two orders and packing lists

</member>

<member>

<name>retailer_name</name>

<value>

<string>Motor Werks Certified Outlet Wheaton</string>

</value>

</member>

<member>

<name>retailer_location_id</name>

<value>

<int>11569</int>

</value>

</member>

<member>

<name>retailer_location_name</name>

<value>

<string>Motor Werks Certified Outlet Wheaton</string>

</value>

</member>

<member>

<name>retailer_address</name>

<value>

<string>1100 E. Roosevelt Rd.</string>

</value>

</member>

<member>

<name>retailer_zip</name>

<value>

<string>60187</string>

</value>

</member>

</struct>

</value>

</member>

<member>

<name>packing_list</name>

<value>

<string>

&lt;html&gt;

&lt;head&gt;

&lt;title&gt;Order #1234567&lt;/title&gt;

&lt;style&gt;

BODY { background-color : #FFFFFF; font-size : 9pt; font-

family : Arial, Helvetica; }

TD { font-size : 9pt; font-family : Arial, Helvetica; }

TH { font-size : 10pt; font-weight : bold; font-family :

Arial, Helvetica; }

.detailSmTxt { font-size: 8pt; }

.smtxt { font-size: 8pt; }

.italHeader { font-size : 14pt; font-weight : bold; font-

style : italic; font-family : Arial, Helvetica; }

.smitalHeader { font-size : 12pt; font-weight : bold;

font-style : italic; font-family : Arial, Helvetica; }

.smlHd { font-size : 12pt; }

.sTH { font-variant: small-caps; background: Silver; }

.gryLarge { font-size : 18pt; font-family : Arial Black,

Arial, Helvetica; color: #999999; }

.gryLarger { font-family: Arial Black, Arial, Helvetica;

Page 47: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Example Requests – Order Data Receive

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 47

Example 4: Order data message with two orders and packing lists

font-size: 22pt; font-weight: bold; color: #A9A9A9; }

.flTB { border-top: solid 1px #C0C0C0; border-right:

solid 1px #C0C0C0; }

.flTD { border-left: solid 1px #C0C0C0; border-bottom:

solid 1px #C0C0C0; }

.sTHflTD { font-variant: small-caps; background: Silver;

border-left: solid 1px #C0C0C0; border-bottom: solid

1px #C0C0C0; }

.detailSmTD { font-size: 8pt; border-left: solid 1px

#C0C0C0; border-bottom: solid 1px #C0C0C0; }

.u { font-weight : bold; text-decoration : underline; }

.b { font-weight : bold; }.mno { font-family : Courier

New, Courier; }

&lt;/style

&lt;/head&gt;

&lt;body&gt;

&lt;table border="0" cellspacing="2" cellpadding="2"&gt;

&lt;tr&gt;

&lt;td width="8"&gt;&nbsp;&lt;/td&gt;

&lt;td valign="top"&gt;

&lt;table cellspacing=&quot;2&quot;

cellpadding=&quot;0&quot; border=&quot;0&quot;

width=&quot;650&quot;&gt;

&lt;tr&gt;

&lt;td&gt;&lt;img

src=&quot;/img/back_int/o_shopatron.gif&quot;&gt;&lt;/td&gt;&lt;td

align=&quot;center&quot;

valign=&quot;middle&quot;&gt;&lt;span class=&quot;italHeader&quot;&gt;Test

MFG Order 1234567&lt;/span&gt;&lt;/td&gt;

&lt;/tr&gt;

&lt;tr&gt;

&lt;td background=&quot;/img/back_int/darkblue.gif&quot;

colspan=&quot;2&quot;

height=&quot;5&quot;&gt;&lt;img

src=&quot;/img/back_int/darkblue.gif&quot; width=&quot;100%&quot;

height=&quot;5&quot;&gt;&lt;/td&gt;

&lt;/tr&gt;

&lt;/table&gt;

&lt;table cellspacing=&quot;2&quot;

cellpadding=&quot;2&quot; border=&quot;0&quot;

width=&quot;500&quot;&gt;

&lt;tr&gt;

&lt;td valign=&quot;top&quot; width=&quot;50%&quot;

NOWRAP&gt;&lt;span style=&quot;font

size: 9pt&quot;&gt;This order brought to you

by:&lt;br&gt;&lt;strong&gt;Test

MFG&lt;/strong&gt;&lt;br&gt;PO Box 1234&lt;br&gt;San Luis

Obispo, CA 93401&lt;br&gt;United States of

America&lt;/span&gt;

&lt;/td&gt;

&lt;td valign=&quot;top&quot;

width=&quot;50%&quot;&gt;&lt;span style=&quot;font-size:

9pt&quot;&gt;&lt;br&gt;Phone: 248-955-1419&lt;br&gt;Fax:

248-471-4829&lt;br&gt;Email:

[email protected]&lt;/span&gt;&lt;/td&gt;

&lt;/tr&gt;

&lt;/table&gt;

&lt;br&gt;

Page 48: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Example Requests – Order Data Receive

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 48

Example 4: Order data message with two orders and packing lists

&lt;span class=&quot;gryLarger&quot;&gt;THANK YOU FOR

YOUR ORDER&lt;/span&gt;&lt;br&gt;

? &lt;table cellspacing=&quot;2&quot;

cellpadding=&quot;2&quot; border=&quot;0&quot;

width=&quot;500&quot;&gt;

&lt;tr&gt;

&lt;td width=&quot;50%&quot;

valign=&quot;top&quot;&gt;&lt;span style=&quot;font-size: 10pt;

font-weight: bold&quot;&gt;Ship

To:&lt;/span&gt;&lt;br&gt;Joan Smith&lt;br&gt;123 Main St.&lt;br&gt;Suite

100&lt;br&gt;Anyville CA, 98765&lt;br&gt;United States of

America&lt;BR&gt;Phone:

877-715-7467&lt;br&gt;&lt;/td&gt;

&lt;td width=&quot;50%&quot;

valign=&quot;top&quot;&gt;&lt;span style=&quot;font-size: 10pt;

font-weight: bold&quot;&gt;Sold

To:&lt;/span&gt;&lt;br&gt;John Smith&lt;br&gt;2074 Parker St.&lt;br&gt;San

Luis Obispo, CA 93401&lt;br&gt;United States of

America&lt;br&gt;Phone: 877-715-7467&lt;/td&gt;

&lt;/tr&gt;

&lt;/table&gt;

&lt;br&gt;

&lt;table border=&quot;0&quot; cellspacing=&quot;0&quot;

cellpadding=&quot;2&quot;

class=&quot;flTB&quot; width=&quot;650&quot;&gt;

&lt;tr&gt;

&lt;th class=&quot;flTD&quot;&gt;Quantity&lt;/th&gt;

&lt;th class=&quot;flTD&quot; NOWRAP&gt;Item&lt;/th&gt;

&lt;th class=&quot;flTD&quot;

width=&quot;50%&quot;&gt;Description&lt;/th&gt;The following

example includes two orders and shows the optional

test_mode parameter.

&lt;th class=&quot;flTD&quot;&gt;Manufacturer&lt;/th&gt;

&lt;th class=&quot;flTD&quot;&gt;Subtotal&lt;/th&gt;

&lt;/tr&gt;

&lt;tr&gt;

&lt;td align=&quot;center&quot; style=&quot;font-size:

9pt; border-left: solid 1px

#C0C0C0;&quot;&gt;1&lt;/td&gt; &lt;td

style=&quot;font-size: 9pt; border-left: solid 1px

#C0C0C0;&quot;&gt;1001&lt;/td&gt;

&lt;td style=&quot;font-size: 9pt; border-left: solid 1px

#C0C0C0;&quot;&gt;Test

Product&lt;/td&gt;

&lt;td align=&quot;center&quot; style=&quot;font-size:

9pt; border-left: solid 1px

#C0C0C0;&quot;&gt;Test MFG&lt;/td&gt;

&lt;td align=&quot;right&quot; style=&quot;font-size:

9pt; border-left: solid 1px

#C0C0C0;&quot;&gt;15.65&lt;/td&gt;

&lt;/tr&gt;

&lt;tr&gt;

&lt;td style=&quot;font-size: 9pt; border-left: solid 1px

#C0C0C0; border-bottom: solid 1px

#C0C0C0;&quot;&gt;&amp;nbsp;&lt;/td&gt;

&lt;td style=&quot;font-size: 9pt; border-left: solid 1px

#C0C0C0; border-bottom: solid1px

#C0C0C0;&quot;&gt;&amp;nbsp;&lt;/td&gt;

Page 49: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Example Requests – Order Data Receive

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 49

Example 4: Order data message with two orders and packing lists

&lt;td style=&quot;font-size: 8pt; border-left: solid 1px

#C0C0C0; border-bottom: solid1px

#C0C0C0;&quot;&gt;&lt;li&gt;Texture:

Rough&lt;/li&gt;&lt;li&gt;Color: Blue&lt;/li&gt;&lt;li&gt;Style:

Rough&lt;/li&gt;&lt;li&gt;Size: L&lt;/li&gt;&lt;/td&gt;

&lt;td style=&quot;font-size: 9pt; border-left: solid 1px

#C0C0C0; border-bottom: solid 1px

#C0C0C0;&quot;&gt;&amp;nbsp;&lt;/td&gt;

&lt;td style=&quot;font-size: 9pt; border-left: solid 1px

#C0C0C0; border-bottom: solid1px

#C0C0C0;&quot;&gt;&amp;nbsp;&lt;/td&gt;

&lt;/tr&gt;

&lt;tr&gt;

&lt;th colspan=&quot;4&quot; align=&quot;right&quot;

class=&quot;detailSmTD&quot;

style=&quot;font-size: 9pt;&quot;&gt;Subtotal of

items&lt;/th&gt;

&lt;td align=&quot;right&quot;

class=&quot;detailSmTD&quot; style=&quot;font-size:

9pt;&quot;&gt;15.65&lt;/td&gt;

&lt;/tr&gt;

&lt;tr&gt;

&lt;th colspan=&quot;4&quot; align=&quot;right&quot;

class=&quot;detailSmTD&quot;

style=&quot;font-size: 9pt;&quot;&gt;Shipping &amp;amp;

Handling Fee&lt;/th&gt;

&lt;td align=&quot;right&quot;

class=&quot;detailSmTD&quot; style=&quot;font-size:

9pt;&quot;&gt;2.90&lt;/td&gt;

&lt;/tr&gt;

&lt;tr&gt;

&lt;th colspan=&quot;4&quot; align=&quot;right&quot;

class=&quot;detailSmTD&quot;

style=&quot;font-size: 9pt;&quot;&gt; Total of shipment

including shipping&lt;/th&gt;

&lt;td align=&quot;right&quot;

class=&quot;detailSmTD&quot; style=&quot;font-size:

9pt;&quot;&gt;18.55&lt;/td&gt;

&lt;/tr&gt;

&lt;/table&gt;

&lt;br&gt;

&lt;table width=&quot;650&quot; cellpadding=&quot;0&quot;

cellspacing=&quot;0&quot;&gt;

&lt;tr&gt;

&lt;td background=&quot;/img/back_int/darkblue.gif&quot;

colspan=&quot;2&quot;

height=&quot;5&quot;&gt;&lt;img

src=&quot;/img/back_int/darkblue.gif&quot; width=&quot;100%&quot;

height=&quot;5&quot;&gt;&lt;/td&gt;

&lt;/tr&gt;

&lt;tr&gt;

&lt;td valign=&quot;top&quot;

width=&quot;50%&quot;&gt;&lt;br&gt;

&lt;TABLE border=&quot;0&quot; cellpadding=&quot;5&quot;

cellspacing=&quot;0&quot;&gt;

&lt;TR&gt;

&lt;TD width=&quot;350&quot; valign=&quot;top&quot;

align=&quot;left&quot;

Page 50: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Example Requests – Order Data Receive

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 50

Example 4: Order data message with two orders and packing lists

bgcolor=&quot;#ffffff&quot; style=&quot;font-size:

10pt&quot;&gt;

&lt;span class=&quot;u&quot; style=&quot;font-size:

10pt&quot;&gt;Customer

Service:&lt;/span&gt;&lt;br&gt;

Manufacturers and retailers who participate in the

Shopatron network are committed to

satisfying your needs and providing you with an

exceptional online shopping experience.

&lt;br&gt;&lt;br&gt;The fulfiller of your order is ready

to provide outstanding technical and

order-related service.&lt;br&gt;&lt;br&gt;

&lt;span class=&quot;u&quot; style=&quot;font-size:

10pt&quot;&gt;Fulfiller Contact

Information&lt;br&gt;&lt;/span&gt;

Test MFG&lt;br&gt; 248-

955-1419&lt;br&gt;[email protected]

&lt;br&gt;&lt;br&gt;If you have any questions or problem

s that cannot be addressed by Test MFG,&lt;br&gt;please

call: 877-715-7467

&lt;/TD&gt;

&lt;/TR&gt;

&lt;/TABLE&gt;

&lt;/td&gt;

&lt;td valign=&quot;top&quot; align=&quot;right&quot;

width=&quot;50%&quot;&gt;&lt;br&gt;

&lt;TABLE border=&quot;0&quot; cellpadding=&quot;5&quot;

cellspacing=&quot;0&quot;&gt;

&lt;TR&gt;

&lt;TD width=&quot;350&quot; valign=&quot;top&quot;

align=&quot;left&quot;

bgcolor=&quot;#ffffff&quot; style=&quot;font-size:

10pt&quot;&gt;

&lt;span class=&quot;u&quot; style=&quot;font-size:

10pt&quot;&gt;Return/Exchange

Instructions:&lt;/span&gt;

&lt;br&gt;A return merchandise authorization number (RMA

number) is required for all

returns.

&lt;br&gt;&lt;br&gt;Please call Test MFG at 248-955-1419

or email to

[email protected]

&lt;br&gt;All returns must be in their original packaging

in new and unused condition. You

have 30 days to return or exchange your merchandise.

&lt;br&gt;&lt;br&gt;&lt;span class=&quot;u&quot;

style=&quot;font-size:

10pt&quot;&gt;Return Address:&lt;br&gt;&lt;/span&gt;Test

MFG&lt;br&gt;PO Box

1234&lt;BR&gt;blah&lt;BR&gt;blah&lt;BR&gt;Farmington

Hills, AL 93402&lt;BR&gt;United States of America

? &lt;/TD&gt;

&lt;/TR&gt;

&lt;/TABLE&gt;

&lt;/td&gt;

&lt;/tr&gt;

&lt;/table&gt;

&lt;/td&gt;

Page 51: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Example Requests – Order Data Receive

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 51

Example 4: Order data message with two orders and packing lists

&lt;/tr&gt;

&lt;/table&gt;

&lt;/body&gt;

&lt;/html&gt;

</string>

</value>

</member>

<member>

<name>num_items</name>

<value>

<int>1</int>

</value>

</member>

<member>

<name>items</name>

<value>

<struct>

<member>

<name>item_1</name>

<value>

<struct>

<member>

<name>item_id</name>

<value>

<int>12345</int>

</value>

</member>

<member>

<name>quantity</name>

<value>

<int>1</int>

</value>

</member>

<member>

<name>price</name>

<value>

<double>15.65</double>

</value>

</member>

<member>

<name>part_number</name>

<value>

<string>1001</string>

</value>

</member>

<member>

<name>line_item_tax</name>

<value>

<double>0.7942</double>

</value>

</member>

<member>

<name>line_item_subtotal</name>

<value>

<double>15.65</double>

</value>

</member>

<member>

Page 52: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Example Requests – Order Data Receive

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 52

Example 4: Order data message with two orders and packing lists

<name>line_discount</name>

<value>

<double>0</double>

</value>

</member>

<member>

<name>fulfiller_total</name>

<value>

<double>14.45</double>

</value>

</member>

<member>

<name>shopatron_total</name>

<value>

<double>1.2</double>

</value>

</member>

<member>

<name>options</name>

<value>

<struct>

<member>

<name>option_1</name>

<value>

<string>Color:Blue </string>

</value>

</member>

<member>

<name>option_2</name>

<value>

<string>Style: Rough</string>

</value>

</member>

<member>

<name>option_3</name>

<value>

<string>Size:L </string>

</value>

</member>

</struct>

</value>

</member>

</struct>

</value>

</member>

</struct>

</value>

</member>

</struct>

</value>

</member>

<member>

<name>order_1</name>

<value>

<struct>

<member>

<name>order_id</name>

<value>

Page 53: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Example Requests – Order Data Receive

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 53

Example 4: Order data message with two orders and packing lists

<int>1234568</int>

</value>

</member>

<member>

<name>order_date</name>

<value>

<string>2005-09-19</string>

</value>

</member>

<member>

<name>mfg_id</name>

<value>

<int>138</int>

</value>

</member>

<member>

<name>catalog_id</name>

<value>

<int>0</int>

</value>

</member>

<member>

<name>first_name</name>

<value>

<string>Bob</string>

</value>

</member>

<member>

<name>last_name</name>

<value>

<string>Jones</string>

</value>

</member>

<member>

<name>recipient</name>

<value>

<string></string>

</value>

</member>

<member>

<name>message</name>

<value>

<string></string>

</value>

</member>

<member>

<name>address1</name>

<value>

<string>1234 Whatever St.</string>

</value>

</member>

<member>

<name>address2</name>

<value>

<string></string>

</value>

</member>

<member>

Page 54: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Example Requests – Order Data Receive

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 54

Example 4: Order data message with two orders and packing lists

<name>address3</name>

<value>

<string></string>

</value>

</member>

<member>

<name>city</name>

<value>

<string>Whatever City</string>

</value>

</member>

<member>

<name>state</name>

<value>

<string>CA</string>

</value>

</member>

<member>

<name>zip</name>

<value>

<string>11111</string>

</value>

</member>

<member>

<name>country</name>

<value>

<string>United States</string>

</value>

</member>

<member>

<name>country_code</name>

<value>

<string>US</string>

</value>

</member>

<member>

<name>phone</name>

<value>

<string>877-715-7467</string>

</value>

</member>

<member>

<name>subtotal</name>

<value>

<double>21.99</double>

</value>

</member>

<member>

<name>tax</name>

<value>

<double>2.99</double>

</value>

</member>

<member>

<name>shipping</name>

<value>

<double>8.9</double>

</value>

Page 55: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Example Requests – Order Data Receive

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 55

Example 4: Order data message with two orders and packing lists

</member>

<member>

<name>total</name>

<value>

<double>33.88</double>

</value>

</member>

<member>

<name>shopatron_total</name>

<value>

<double>1.90</double>

</value>

</member>

<member>

<name>fulfiller_total</name>

<value>

<double>31.98</double>

</value>

</member>

<member>

<name>fulfiller_shipping</name>

<value>

<double>8.74</double>

</value>

</member>

<member>

<name>fulfiller_tax</name>

<value>

<double>0</double>

</value>

</member>

<member>

<name>package_fee</name>

<value>

<double>0.07</double>

</value>

</member>

<member>

<name>shipment_id</name>

<value>

<int>100002</int>

</value>

</member>

<member>

<name>language_id</name>

<value>

<int>1</int>

</value>

</member>

<member>

<name>currency_id</name>

<value>

<int>1</int>

</value>

</member>

<member>

<name>ship_type</name>

<value>

Page 56: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Example Requests – Order Data Receive

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 56

Example 4: Order data message with two orders and packing lists

<string>2day</string>

</value>

</member>

<member>

<name>packing_list</name>

<value>

<string>[packing list here]</string>

</value>

</member>

<member>

<name>num_items</name>

<value>

<int>2</int>

</value>

</member>

<member>

<name>items</name>

<value>

<struct>

<member>

<name>item_1</name>

<value>

<struct>

<member>

<name>item_id</name>

<value>

<int>12346</int>

</value>

</member>

<member>

<name>quantity</name>

<value>

<int>1</int>

</value>

</member>

<member>

<name>price</name>

<value>

<double>9.99</double>

</value>

</member>

<member>

<name>part_number</name>

<value>

<string>1002</string>

</value>

</member>

<member>

<name>line_item_tax</name>

<value>

<double>0.7942</double>

</value>

</member>

<member>

<name>line_item_subtotal</name>

<value>

<double>9.99</double>

</value>

Page 57: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Example Requests – Order Data Receive

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 57

Example 4: Order data message with two orders and packing lists

</member>

<member>

<name>line_discount</name>

<value>

<double>0</double>

</value>

</member>

<member>

<name>fulfiller_total</name>

<value>

<double>9.79</double>

</value>

</member>

<member>

<name>shopatron_total</name>

<value>

<double>1.2</double>

</value>

</member>

</struct>

</value>

</member>

<member>

<name>item_2</name>

<value>

<struct>

<member>

<name>item_id</name>

<value>

<int>12347</int>

</value>

</member>

<member>

<name>quantity</name>

<value>

<int>2</int>

</value>

</member>

<member>

<name>price</name>

<value>

<double>5.5</double>

</value>

</member>

<member>

<name>part_number</name>

<value>

<string>1003</string>

</value>

</member>

<member>

<name>line_item_tax</name>

<value>

<double>0.7942</double>

</value>

</member>

<member>

<name>line_item_subtotal</name>

Page 58: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Example Requests – Order Data Receive

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 58

Example 4: Order data message with two orders and packing lists

<value>

<double>11.00</double>

</value>

</member>

<member>

<name>line_discount</name>

<value>

<double>0</double>

</value>

</member>

<member>

<name>fulfiller_total</name>

<value>

<double>10.21</double>

</value>

</member>

<member>

<name>shopatron_total</name>

<value>

<double>1.2</double>

</value>

</member>

<member>

<name>options</name>

<value>

<struct>

<member>

<name>option_1</name>

<value>

<string>Color:Red </string>

</value>

</member>

<member>

<name>option_2</name>

<value>

<string>Size:M </string>

</value>

</member>

<member>

<name>fulfiller_line_item_subtotal</name>

<value>

<double>14.3625</double>

</value>

</member>

<member>

<name>fulfiller_line_item_tax</name>

<value>

<double>1.3692</double>

</value>

</member>

</struct>

</value>

</member>

</struct>

</value>

</member>

</struct>

</value>

Page 59: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Responses – Order Data Receive

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 59

Example 4: Order data message with two orders and packing lists

</member>

</struct>

</value>

</member>

</struct>

</value>

</param>

</params>

</methodCall>

Responses – Order Data Receive

On success, the RPC returns the value 0. On an error, the RPC returns a response message with the

faultCode and faultString.

Response codes

Code Description

0 Success. All orders received.

1 XML message is blank.

2 XML message is invalid or not well-formed.

3 Order data missing.

4 Required shipping information missing.

5 Unspecified error.

Example success response

Example success response

<?xml version="1.0" encoding="UTF-8"?>

<methodResponse>

<params>

<param>

<value>

<int>0</int>

</value>

</param>

</params>

</methodResponse>

Page 60: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

System Testing and Activation

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 60

Example error response

Example error response

<?xml version="1.0" encoding="UTF-8"?>

<methodResponse>

<fault>

<value>

<struct>

<member>

<name>faultCode</name>

<value>

<int>4</int>

</value>

</member>

<member>

<name>faultString</name>

<value>

<string>Required shipping information missing</string>

</value>

</member>

</struct>

</value>

</fault>

</methodResponse>

Handling errors

If you receive an error response fault code after sending the order information to Shopatron, follow

these steps:

1. Record the outgoing package and the associated fault code response from Shopatron.

2. Test for connectivity to the server (usually shopatron.com).

3. Hold the XML package for future transmission to Shopatron's servers.

4. Send an email to Shopatron Merchant Support at [email protected]; include the time and date

of the failed transmission.

5. When Shopatron support staff contacts you, resend the failed attempts.

System Testing and Activation

After you write your Ready Order Download applications, you will test them. When these tests are

successful, we activate the Ready Order Download API for your account. To initiate the tests, send an

email to Shopatron Merchant Support at [email protected]. (If your project is still in the

Implementations phase, work with your Implementations Coordinator.)

To perform the tests, follow these steps:

1. Send a test XML Order Data Request.

The request should include the optional test_mode parameter with a value that corresponds to the

response you want to receive from the Data Request RPC and the Data Send application. The

values correspond to the response codes and are separated by a period. See the Responses

section for these values.

Page 61: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Sample Order Data Download Code (PHP)

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 61

2. Test the Data Request method first, then the Data Receive method.

To test for a response from the Data Request RPC only, set the test_mode value to 0. To test the

invalid username or password case, set the value to 2. When you finish testing the Data Request

method and want to test receiving an invalid XML package, set the value to 0.1.

3. Test the Data Send application.

Set the first value to 0 for authentication.

This test verifies the following:

Your server can successfully communicate with our XML-RPC server

The XML Order Data Request is a valid, well-formed XML document and that it includes all

required information.

Your application can receive all the possible response codes.

4. Receive a test XML Order Data package and return the correct response code.

This verifies the following:

Our server can successfully communicate with your XML RPC server and that the RPC name is

correct in our system

Your RPC can receive the XML package, process it, and return the correct response code.

When these tests are successful, send an email to Shopatron Merchant Support at

[email protected] and request activation of this feature for your account.

Sample Order Data Download Code (PHP)

This sample code example uses the XML-RPC for PHP open source libraries from

www.xmlrpc.scripting.com.

Sample Order Data Download code (PHP)

<?php

// these includes are shown as examples. You need to write your own database

connector

// and xml_functions. The two xmlrpc include files are part of XML-RPC for PHP

include_once("/includes/database_connect.php");

include_once("/includes/xmlrpc.inc");

include_once("/includes/xmlrpcs.inc");

include_once("/includes/xml_functions.php");

$username = "joeuser"; // put in your Shopatron username

$password = "Joe123"; // put in your password

$data_type = "ready_orders"; // the type of data you want to download

$test_mode = 0; // only include when testing!

// the request message

$xml_request = new xmlrpcmsg('examples.xml_request_data',

array(new xmlrpcval($username,'string'),

new xmlrpcval($password, 'string'),

new xmlrpcval($data_type, 'string'),

new xmlrpcval($test_mode, 'int')),

'array');

Page 62: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Sample Order Data Receive application code (PHP)

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 62

Sample Order Data Download code (PHP)

// set up client and connect with the Shopatron XML RPC server

$server = new_xmlrpc_client('/xmlServer.php','xml.shopatron.com', 443);

// $server->setDebug(1);

// start page or method

echo "<html><body>

Requesting Ready Order Data...<br>";

// this is the piece that sends the request and gets the response

$result = $server->send($xml_request, 20, 'https');

// process the result

if (!$result) // the result has not been returned

{

$err_msg = "No response returned from RPC.";

}

else if ($result->faultCode()) // the result has been returned but there is an

error

{

$err_msg = "<p>XML-RPC Fault #".$result->faultCode().": ".$result-

>faultString();

}

else // the result has been returned with success response

{

$value = $result->value();

$response = $value->scalarval();

}

echo "response: ".$response."<br>".$err_msg.'

</body></html>';

?>

Sample Order Data Receive application code (PHP)

The following example uses XML-RPC for PHP open source libraries from www.xmlrpc.scripting.com.

Sample Order Data Receive application code (PHP)

<?php

// these includes are shown as examples. You need to write your own database

connector

// and xml_functions. The two xmlrpc include files are part of XML-RPC for PHP

include_once("/includes/database_connect.php");

include_once("/includes/xmlrpc.inc");

include_once("/includes/xmlrpcs.inc");

include_once("/includes/xml_functions.php");

$xml_get_my_orders_doc = "This application receives Shopatron ready orders in XML

format.";

function xml_get_my_orders($xml_pkg)

{

GLOBAL $conn;

Page 63: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Sample Order Data Receive application code (PHP)

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 63

Sample Order Data Receive application code (PHP)

$error_message = "";

// this prameter contains the number of orders in the package

$param = $xml_pkg->getParam(0);

$num_orders = $param->scalarval();

// the second parameter will either be the struct with order data or the

test_mode

$param = $xml_pkg->getParam(1);

if ($xml_pkg->getNumParams() > 2)

{

$test_mode = $param->scalarval();

$param = $xml_pkg->getParam(2);

}

// this parameter contains a struct with all the order data

$orders = $param;

$kind=$orders->kindOf();

// process parameter with order data

if ($kind == "struct")

{

while (list($key,$value)=$orders->structeach())

{

// get basic order info

if ($key == "order_id")

{

$order_id = $value->scalarval();

}

...

// write loops for the items struct and item_options struct

// get item info

$item = $value->scalarval();

foreach ($item as $data_type=>$data)

{

if ($data_type == "price")

$price = $data->scalarval();

...

}

}

}

// now that you have parsed the order data, put it into your system

...

// set appropriate response code

$response = 0; // see defined response codes for this application

// send success or failure response code

if ($response == 0)

return new xmlrpcresp(new xmlrpcval($response, "string"));

else

return new xmlrpcresp(0, $response, $error_message);

}

$s = new xmlrpc_server

(array("examples.xml_get_my_orders"=>array("function"=>"xml_get_my_orders",

"signature"=>$xml_get_my_orders_sig, "docstring"=>$xml_get_my_orders_doc)));

Page 64: Introducing the Ready Order Download API XML-RPC … ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 8 Example Requests – Order Data Request Example 1: Retrieving order and

Sample Order Data Receive application code (PHP)

READY ORDER DOWNLOAD API GUIDE, VERSION 2.0 10/29/13 | PAGE 64

Sample Order Data Receive application code (PHP)

?>