FillZAPI

From MediaSell

Jump to: navigation, search
API

Contents

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. )

Getting orders

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>


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.

Getting more details about an order

<GetOrder id="1234" detail="1">
  <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>


Getting complete details about an order

<GetOrder id="1234" detail="2">
  <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>
<ToCity>San Francisco</ToCity>
<ToState>CA</ToState>
<ToPostalCode>94105</ToPostalCode>
<ToCountry></ToCountry>
<ToEmail>info@fillz.com</ToEmail>
<ToPhone>250-123-4567</ToPhone>
<Date>2009-11-20 15:22:17</Date>
<CreateDate>2009-11-20 15:22:53</CreateDate>
<LastModified>2009-11-20 15:22:53</LastModified>
<PaymentReceiveDate></PaymentReceiveDate>
<Value>16.67</Value>
<Currency>USD</Currency>
<ShippingTotal>2.99</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>16.67</Price>
  <Shipping>2.99</Shipping>
  <Note>This is a note about the book</Note>
  <Cost>0.00</Cost>
  <OrderItemId>2147483645</OrderItemId>
  <Source>data from the source field of your listing</Source>
 </Item>
</Items>
<PaymentMethod>Prepaid</PaymentMethod>
</Order>


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 -->
  </Package>
</SetOrderStatus>


  • You have the following options for changing the order status: "packed" (aka In Process), "shipped", "cancelled", "deferred"
  • If you have Charge When Ship turned on through FillZ and an Amazon order cannot be confirmed, it will be moved to a status called "unconfirm" in the API. Should you see this, you should take a look at the order on Amazon to see if there are any problems. After that, you can either manually confirm shipment of the order on Amazon, or move the order back to "shipped" status using our API so we retry sending a shipping confirmation.


Adding/Subtracting Quantity for Inventory

To add or subtract from the total quantity in FillZ for an item:

<EditItem sku="$sku">
  <AuthUser>$this->user</AuthUser>
  <AuthToken>$this->token</AuthToken>
  <QuantityChange>$quantity_delta</QuantityChange>
</EditItem> 

Valid values for the <QuantityChange> field are positive and negative numbers. Examples: 1, -1, 2, -2


Accessing API from your code

Using PHP to access API