FillZAPI

From MediaSell

Jump to: navigation, search

Contents

[edit] Overview

Use the POST HTTP method to send XML to the following URL:

https://w1.fillz.com/exec/api1

(substitute w1 with the server number the account is on)

General return:

<Result>
 <Code>200</Code>
 <Message>Success</Message>
</Result>

or:

<Result>
 <Code>500</Code>
 <Message>Internal error</Message>
</Result>

(codes starting with 2 are success and starting with 5 are failures. )

[edit] Getting orders

[edit] Getting an order list

This XML call is used by the postage software to get all orders of a certain status:

<GetOrders status="new">
  <AuthUser>username</AuthUser>
  <AuthToken>token</AuthToken>
</GetOrders>

result is a list of order IDs:

<Orders>
  <Order id="1234"/>
  <Order id="1235"/>
</Orders>


[edit] Getting a specific order

<GetOrder id="1234">
  <AuthUser>username</AuthUser>
  <AuthToken>token</AuthToken>
</GetOrder>

result is

<Order id="1234">
   <Status>new</Status>
   <ShipMethod>Standard</ShipMethod>
   <Marketplace name="Amazon" id="4567"/>
   <ToName>John Doe</ToName>
   <ToAddress1>100 Main St </ToAddress1>
   <ToAddress2>Suite 120 </ToAddress2>
   <ToCity>San Jose </ToCity>
   <ToState>CA </ToState>
   <ToPostalCode>94001</ToPostalCode>
   <ToCountry>USA</ToCountry>
   <ToEmail>jdoe@gmail.com</ToEmail>
   <ToPhone></ToPhone>
   <Date>2006-04-06 13:27:39</Date>
   <CreateDate>2006-04-06 14:58:53</CreateDate>
   <LastModified>0000-00-00 00:00:00</LastModified>
   <PaymentReceiveDate></PaymentReceiveDate> 
   <Value>12.34</Value>
   <Quantity>4</Quantity>
   <WeightOz>120</WeightOz>
</Order>

Status is "new", "packed", "shipped" or "cancelled" (note spelling mistake on cancelled).

ShipMethod will be Standard for standard shipping and any other value should be considered expedited.

[edit] Getting full details about an order

<GetOrder id="1234" detail="full">
  <AuthUser>username</AuthUser>
  <AuthToken>token</AuthToken>
</GetOrder>

Will return:

<Order id="36578494">
<Status>new</Status>
<ShipMethod>Standard International</ShipMethod>
<Marketplace id="M00001" name="Store"/>
<ToName>Jane Doe</ToName>
<ToAddress1>100 Main St</ToAddress1>
<ToAddress2>Apt 123</ToAddress2>
<ToCity>San Francisco</ToCity>
<ToState>CA</ToState>
<ToPostalCode>94105</ToPostalCode>
<ToCountry></ToCountry>
<ToEmail>info@fillz.com</ToEmail>
<ToPhone></ToPhone>
<Date>2006-04-06 13:27:39</Date>
<CreateDate>2006-04-06 14:58:53</CreateDate>
<LastModified>0000-00-00 00:00:00</LastModified>
<PaymentReceiveDate></PaymentReceiveDate> 
<Value>16.67</Value>
<ShippingTotal>3.49</ShippingTotal> 
<BuyerNote>This is a note made by the buyer</BuyerNote>
<SellerNote>This is a note made by the seller</SellerNote>
<Items>
 <Item>
  <SKU>X001</SKU>
  <Author>Ray Kurzweil</Author>
  <Title>The Singularity Is Near: When Humans Transcend Biology</Title>
  <Media>Hardcover</Media>
  <ProductId>0670033847</ProductId>
  <Location>[-]</Location>
  <Quantity>1</Quantity>
  <Condition>1</Condition>
  <Price>6.78</Price>
  <Note>This is a note about the book</Note>
 </Item>
 <Item>
  <SKU>X002</SKU>
  <Author>Henry Beard; Roy McKie</Author>
  <Title>Sailing - A Sailor's Dictionary - A Dictionary for Landlubbers, Old Salts, & Armchair Drifters</Title>
  <Media>Paperback</Media>
  <ProductId>0894801449</ProductId>
  <Location>[xyz1]</Location>
  <Quantity>1</Quantity>
  <Condition>1</Condition>
  <Price>9.89</Price>
  <Note>This is a note about the book</Note>
 </Item>
</Items>
</Order>

[edit] Modifying Orders

For the postage software to set the postage result of an order, and move it to new status:

<SetOrderStatus id="1234" status="shipped">
  <AuthUser>username</AuthUser>
  <AuthToken>token</AuthToken>
  <Package>
   <FinalPostage>1.23</FinalPostage>
   <TransactionDateTime>2006-01-01 04:04:04</TransactionDateTime>
   <PostmarkDate>2006-01-02</PostmarkDate>
   <Status>Success</Status>
   <TransactionID>abc123456</TransactionID>
   <PIC>1234-5678-92839</PIC> <!-- this is the tracking code -->
   <Service>USPS</Service> <!-- USPS/FEDEX/UPS -->
   <ServiceType>Global Express</ServiceType>
  </Package>
</SetOrderStatus>


You have the following options for changing the order status: "packed" (aka In Process), "shipped" (aka Complete), "cancelled", "deferred"

Personal tools