Welcome GuestLogin
ShipStation


API Documentation

Navigation


Search the wiki
»





Admin

ShipStation API Documentation

RSS

Overview



NOTE: We recommend using our new and improved REST API. Documentation can be found here: https://www.mashape.com/shipstation/shipstation



The ShipStation API provides programmatic access to many of the records in your ShipStation account. This allows for read access to almost all data in your ShipStation account and write access to specific objects like Orders, Customers and Products.

In addition to the ShipStation API, we also have a "Custom Store" integration option which will allow you to provide Order information to ShipStation and receive notifications when shipments are created. For more information on this option, please see the ShipStation Custom Store Development Guide.





The Odata Protocol

The ShipStation API is based on the OData protocol, which allows reading and writing objects using XML or JSON formatted data. Furthermore, it allows for targeted searching and "shaping" of data using URL conventions to perform actions like filtering, sorting, paging and specifying which data points to return. More information about the OData protocol can be found at http://www.odata.org.



Enabling API Access

API Access is available on the ShipStation Gold, Platinum, and Enterprise pricing plans (see our pricing page). In order to access the API, the authenticating user must be a member of the "API Access" role in ShipStation. User roles can be controlled in the user management area of ShipStation.



Authentication

The API uses Basic HTTP authentication using your ShipStation user credentials.



OData URL and HTTP Headers

The primary API URL is https://data.shipstation.com/1.4/Resource

If you would prefer to receive results in ATOM / XML format, include the following HTTP header in your request:

Accept: application/atom+xml

If you would prefer to receive results in JSON format, modify the Accept header as follows:

Accept: application/json

Here is an example showing how to set the request header in PHP:

$url = "https://data.shipstation.com/1.4/Orders()?"; 
.'$filter'."=(OrderDate%20ge%20datetime'$start')%20and%20(OrderDate%20le%20datetime'$end')" 
.'&$expand'."=OrderItems";

$curlConn = curl_init($url); 
curl_setopt($curlConn,CURLOPT_USERPWD,'username:pass'); 
curl_setopt($curlConn,CURLOPT_HTTPHEADER,array('Accept: application/json')); 
$ret = curl_exec($curlConn); 
print_r($ret);

When using Microsoft .NET, we recommend adding a WCF Reference to https://data.shipstation.com/1.4, however here is an example if you would prefer to deal with the JSON directly:

var client = new WebClient(); 
client.Headers.Add("accept", "application/json"); 
client.Credentials = new NetworkCredential("yourusername", "yourpassword"); 
var response = client.DownloadString("http://data.shipstation.com/1.4/Stores()");

Time Zone

All ShipStation dates and times are stored in Pacific Standard Time or Pacific Daylight Time depending on whether or not Daylight Savings Time is in effect.



Paging

When requesting a list of resources, the API will limit the results to 100 records. Subsequent records may be retrieved by finding Paging URL in the response and executing the specified URL. For example:

ATOM/XML sample paging response:

    </entry>
  <link rel="next" href="http://data.shipstation.com/1.4/Orders?$top=900&$skiptoken=2675075" />
</feed>

JSON sample paging element:

"__next": "http://data.shipstation.com/1.4/Orders?$top=900&$skiptoken=2675075"





Resources

Listed below are the various Resources available via the ShipStation API. More information and examples are available for each Resource by clicking the links below.





Code Samples and Other Helpful Tools

C# Code Sample

Helpful Tools



Terms

Use of the ShipStation API is subject to the ShipStation Terms of Service.



 

ScrewTurn Wiki version 3.0.5.600. Some of the icons created by FamFamFam.