List Shipments
Obtains a list of shipments that match the specified criteria.
NOTE
Only valid shipments with labels generated in ShipStation will be returned in the response. Orders that have been marked as Shipped either through the UI or the API will not appear as they are considered external shipments.
To include every shipment's associated shipmentItems
in the response, be sure to set the includeShipmentItems
parameter to true
.
All of the available filters are optional. They do not need to be included in the URL. If you do include them, here's what the URL may look like:
URL format with filters:
shipments?recipientName={recipientName}
&recipientCountryCode={recipientCountryCode}
&orderNumber={orderNumber}
&orderId={orderId}
&carrierCode={carrierCode}
&serviceCode={serviceCode}
&trackingNumber={trackingNumber}
&createDateStart={createDateStart}
&createDateEnd={createDateEnd}
&shipDateStart={shipDateStart}
&shipDateEnd={shipDateEnd}
&voidDateStart={voidDateStart}
&voidDateEnd={voidDateEnd}
&storeId={storeId}
&includeShipmentItems={includeShipmentItems}
&sortBy={sortBy}
&sortDir={sortDir}
&page={page}
&pageSize={pageSize}
Name |
Data Type |
Description |
recipientName |
string |
Returns shipments shipped to the specified recipient name. Optional |
recipientCountryCode |
string |
Returns shipments shipped to the specified country code. Please use the two-letter ISO Origin Country code Optional |
orderNumber |
string |
Returns shipments whose orders have the specified order number. Optional |
orderId |
number |
Returns shipments whose orders have the specified order ID. Optional |
carrierCode |
string |
Returns shipments shipped with the specified carrier. Optional |
serviceCode |
string |
Returns shipments shipped with the specified shipping service. Optional |
trackingNumber |
string |
Returns shipments with the specified tracking number. Optional |
customsCountryCode |
string |
The default two-letter ISO Origin Country code for the Product. Optional |
createDateStart |
string |
Returns shipments created on or after the specified createDate . Optional |
createDateEnd |
string |
Returns shipments created on or before the specified createDate . Optional |
shipDateStart |
string |
Returns shipments with the shipDate on or after the specified date. Optional |
shipDateEnd |
string |
Returns shipments with the shipDate on or before the specified date. Optional |
voidDateStart |
string |
Returns shipments voided on or after the specified date. Optional |
voidDateEnd |
string |
Returns shipments voided on or before the specified date. Optional |
storeId |
number |
Returns shipments whose orders belong to the specified store ID. Optional |
includeShipmentItems |
boolean |
Specifies whether to include shipment items with results Default value: false. Optional |
sortBy |
string |
Sort the responses by a set value. The response will be sorted based on the ascending dates (oldest to most current.) Values: If left empty, the response will be sorted by ascending createDate . Optional |
sortDir |
string |
Sets the direction of the sort order. Values: Optional |
page |
number |
Page number. Optional |
pageSize |
number |
Page size. Optional |
Example Request
GET /shipments?recipientName=recipientName&recipientCountryCode=recipientCountryCode&orderNumber=orderNumber&orderId=orderId&carrierCode=carrierCode&serviceCode=serviceCode&trackingNumber=trackingNumber&createDateStart=createDateStart&createDateEnd=createDateEnd&shipDateStart=shipDateStart&shipDateEnd=shipDateEnd&voidDateStart=voidDateStart&voidDateEnd=voidDateEnd&storeId=storeId&includeShipmentItems=includeShipmentItems&sortBy=sortBy&sortDir=sortDir&page=page&pageSize=pageSize HTTP/1.1
Host: ssapi.shipstation.com
Authorization: __YOUR_AUTH_HERE__
curl -iX GET 'https://ssapi.shipstation.com/shipments?recipientName=recipientName&recipientCountryCode=recipientCountryCode&orderNumber=orderNumber&orderId=orderId&carrierCode=carrierCode&serviceCode=serviceCode&trackingNumber=trackingNumber&createDateStart=createDateStart&createDateEnd=createDateEnd&shipDateStart=shipDateStart&shipDateEnd=shipDateEnd&voidDateStart=voidDateStart&voidDateEnd=voidDateEnd&storeId=storeId&includeShipmentItems=includeShipmentItems&sortBy=sortBy&sortDir=sortDir&page=page&pageSize=pageSize' \
-H 'Authorization: __YOUR_AUTH_HERE__' \
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Host", "ssapi.shipstation.com")
$headers.Add("Authorization", "__YOUR_AUTH_HERE__")
$response = Invoke-RestMethod 'https://ssapi.shipstation.com/shipments?recipientName=recipientName&recipientCountryCode=recipientCountryCode&orderNumber=orderNumber&orderId=orderId&carrierCode=carrierCode&serviceCode=serviceCode&trackingNumber=trackingNumber&createDateStart=createDateStart&createDateEnd=createDateEnd&shipDateStart=shipDateStart&shipDateEnd=shipDateEnd&voidDateStart=voidDateStart&voidDateEnd=voidDateEnd&storeId=storeId&includeShipmentItems=includeShipmentItems&sortBy=sortBy&sortDir=sortDir&page=page&pageSize=pageSize' -Method 'GET' -Headers $headers -Body $body
$response | ConvertTo-Json
var myHeaders = new Headers();
myHeaders.append("Host", "ssapi.shipstation.com");
myHeaders.append("Authorization", "__YOUR_AUTH_HERE__");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://ssapi.shipstation.com/shipments?recipientName=recipientName&recipientCountryCode=recipientCountryCode&orderNumber=orderNumber&orderId=orderId&carrierCode=carrierCode&serviceCode=serviceCode&trackingNumber=trackingNumber&createDateStart=createDateStart&createDateEnd=createDateEnd&shipDateStart=shipDateStart&shipDateEnd=shipDateEnd&voidDateStart=voidDateStart&voidDateEnd=voidDateEnd&storeId=storeId&includeShipmentItems=includeShipmentItems&sortBy=sortBy&sortDir=sortDir&page=page&pageSize=pageSize", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://ssapi.shipstation.com/shipments?recipientName=recipientName&recipientCountryCode=recipientCountryCode&orderNumber=orderNumber&orderId=orderId&carrierCode=carrierCode&serviceCode=serviceCode&trackingNumber=trackingNumber&createDateStart=createDateStart&createDateEnd=createDateEnd&shipDateStart=shipDateStart&shipDateEnd=shipDateEnd&voidDateStart=voidDateStart&voidDateEnd=voidDateEnd&storeId=storeId&includeShipmentItems=includeShipmentItems&sortBy=sortBy&sortDir=sortDir&page=page&pageSize=pageSize',
'headers': {
'Host': 'ssapi.shipstation.com',
'Authorization': '__YOUR_AUTH_HERE__'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://ssapi.shipstation.com/shipments?recipientName=recipientName&recipientCountryCode=recipientCountryCode&orderNumber=orderNumber&orderId=orderId&carrierCode=carrierCode&serviceCode=serviceCode&trackingNumber=trackingNumber&createDateStart=createDateStart&createDateEnd=createDateEnd&shipDateStart=shipDateStart&shipDateEnd=shipDateEnd&voidDateStart=voidDateStart&voidDateEnd=voidDateEnd&storeId=storeId&includeShipmentItems=includeShipmentItems&sortBy=sortBy&sortDir=sortDir&page=page&pageSize=pageSize",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"Host: ssapi.shipstation.com",
"Authorization: __YOUR_AUTH_HERE__"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
url = "https://ssapi.shipstation.com/shipments?recipientName=recipientName&recipientCountryCode=recipientCountryCode&orderNumber=orderNumber&orderId=orderId&carrierCode=carrierCode&serviceCode=serviceCode&trackingNumber=trackingNumber&createDateStart=createDateStart&createDateEnd=createDateEnd&shipDateStart=shipDateStart&shipDateEnd=shipDateEnd&voidDateStart=voidDateStart&voidDateEnd=voidDateEnd&storeId=storeId&includeShipmentItems=includeShipmentItems&sortBy=sortBy&sortDir=sortDir&page=page&pageSize=pageSize"
payload = {}
headers = {
'Host': 'ssapi.shipstation.com',
'Authorization': '__YOUR_AUTH_HERE__'
}
response = requests.request("GET", url, headers=headers, data = payload)
print(response.text.encode('utf8'))
require "uri"
require "net/http"
url = URI("https://ssapi.shipstation.com/shipments?recipientName=recipientName&recipientCountryCode=recipientCountryCode&orderNumber=orderNumber&orderId=orderId&carrierCode=carrierCode&serviceCode=serviceCode&trackingNumber=trackingNumber&createDateStart=createDateStart&createDateEnd=createDateEnd&shipDateStart=shipDateStart&shipDateEnd=shipDateEnd&voidDateStart=voidDateStart&voidDateEnd=voidDateEnd&storeId=storeId&includeShipmentItems=includeShipmentItems&sortBy=sortBy&sortDir=sortDir&page=page&pageSize=pageSize")
https = Net::HTTP.new(url.host, url.port);
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Host"] = "ssapi.shipstation.com"
request["Authorization"] = "__YOUR_AUTH_HERE__"
response = https.request(request)
puts response.read_body
var client = new RestClient("https://ssapi.shipstation.com/shipments?recipientName=recipientName&recipientCountryCode=recipientCountryCode&orderNumber=orderNumber&orderId=orderId&carrierCode=carrierCode&serviceCode=serviceCode&trackingNumber=trackingNumber&createDateStart=createDateStart&createDateEnd=createDateEnd&shipDateStart=shipDateStart&shipDateEnd=shipDateEnd&voidDateStart=voidDateStart&voidDateEnd=voidDateEnd&storeId=storeId&includeShipmentItems=includeShipmentItems&sortBy=sortBy&sortDir=sortDir&page=page&pageSize=pageSize");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Host", "ssapi.shipstation.com");
request.AddHeader("Authorization", "__YOUR_AUTH_HERE__");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("https://ssapi.shipstation.com/shipments?recipientName=recipientName&recipientCountryCode=recipientCountryCode&orderNumber=orderNumber&orderId=orderId&carrierCode=carrierCode&serviceCode=serviceCode&trackingNumber=trackingNumber&createDateStart=createDateStart&createDateEnd=createDateEnd&shipDateStart=shipDateStart&shipDateEnd=shipDateEnd&voidDateStart=voidDateStart&voidDateEnd=voidDateEnd&storeId=storeId&includeShipmentItems=includeShipmentItems&sortBy=sortBy&sortDir=sortDir&page=page&pageSize=pageSize")
.method("GET", null)
.addHeader("Host", "ssapi.shipstation.com")
.addHeader("Authorization", "__YOUR_AUTH_HERE__")
.build();
Response response = client.newCall(request).execute();
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://ssapi.shipstation.com/shipments?recipientName=recipientName&recipientCountryCode=recipientCountryCode&orderNumber=orderNumber&orderId=orderId&carrierCode=carrierCode&serviceCode=serviceCode&trackingNumber=trackingNumber&createDateStart=createDateStart&createDateEnd=createDateEnd&shipDateStart=shipDateStart&shipDateEnd=shipDateEnd&voidDateStart=voidDateStart&voidDateEnd=voidDateEnd&storeId=storeId&includeShipmentItems=includeShipmentItems&sortBy=sortBy&sortDir=sortDir&page=page&pageSize=pageSize"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
}
req.Header.Add("Host", "ssapi.shipstation.com")
req.Header.Add("Authorization", "__YOUR_AUTH_HERE__")
res, err := client.Do(req)
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
fmt.Println(string(body))
}
#import <Foundation/Foundation.h>
dispatch_semaphore_t sema = dispatch_semaphore_create(0);
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://ssapi.shipstation.com/shipments?recipientName=recipientName&recipientCountryCode=recipientCountryCode&orderNumber=orderNumber&orderId=orderId&carrierCode=carrierCode&serviceCode=serviceCode&trackingNumber=trackingNumber&createDateStart=createDateStart&createDateEnd=createDateEnd&shipDateStart=shipDateStart&shipDateEnd=shipDateEnd&voidDateStart=voidDateStart&voidDateEnd=voidDateEnd&storeId=storeId&includeShipmentItems=includeShipmentItems&sortBy=sortBy&sortDir=sortDir&page=page&pageSize=pageSize"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
NSDictionary *headers = @{
@"Host": @"ssapi.shipstation.com",
@"Authorization": @"__YOUR_AUTH_HERE__"
};
[request setAllHTTPHeaderFields:headers];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSError *parseError = nil;
NSDictionary *responseDictionary = [NSJSONSerialization JSONObjectWithData:data options:0 error:&parseError];
NSLog(@"%@",responseDictionary);
dispatch_semaphore_signal(sema);
}
}];
[dataTask resume];
dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);
import Foundation
var semaphore = DispatchSemaphore (value: 0)
var request = URLRequest(url: URL(string: "https://ssapi.shipstation.com/shipments?recipientName=recipientName&recipientCountryCode=recipientCountryCode&orderNumber=orderNumber&orderId=orderId&carrierCode=carrierCode&serviceCode=serviceCode&trackingNumber=trackingNumber&createDateStart=createDateStart&createDateEnd=createDateEnd&shipDateStart=shipDateStart&shipDateEnd=shipDateEnd&voidDateStart=voidDateStart&voidDateEnd=voidDateEnd&storeId=storeId&includeShipmentItems=includeShipmentItems&sortBy=sortBy&sortDir=sortDir&page=page&pageSize=pageSize")!,timeoutInterval: Double.infinity)
request.addValue("ssapi.shipstation.com", forHTTPHeaderField: "Host")
request.addValue("__YOUR_AUTH_HERE__", forHTTPHeaderField: "Authorization")
request.httpMethod = "GET"
let task = URLSession.shared.dataTask(with: request) { data, response, error in
guard let data = data else {
print(String(describing: error))
return
}
print(String(data: data, encoding: .utf8)!)
semaphore.signal()
}
task.resume()
semaphore.wait()
Example Response
{
"shipments": [
{
"shipmentId": 33974374,
"orderId": 43945660,
"orderKey": "8061c220f0794a9b92460b8bae6837e4",
"userId": "123456AB-ab12-3c4d-5e67-89f1abc1defa",
"orderNumber": "100038-1",
"createDate": "2014-10-03T06:51:33.6270000",
"shipDate": "2014-10-03",
"shipmentCost": 1.93,
"insuranceCost": 0,
"trackingNumber": "9400111899561704681189",
"isReturnLabel": false,
"batchNumber": "100301",
"carrierCode": "stamps_com",
"serviceCode": "usps_first_class_mail",
"packageCode": "package",
"confirmation": "delivery",
"warehouseId": 16079,
"voided": false,
"voidDate": null,
"marketplaceNotified": true,
"notifyErrorMessage": null,
"shipTo": {
"name": "Yoda",
"company": "",
"street1": "12223 LOWDEN LN",
"street2": "",
"street3": null,
"city": "MANCHACA",
"state": "TX",
"postalCode": "78652-3602",
"country": "US",
"phone": "2101235544",
"residential": null
},
"weight": {
"value": 1,
"units": "ounces"
},
"dimensions": null,
"insuranceOptions": {
"provider": null,
"insureShipment": false,
"insuredValue": 0
},
"advancedOptions": null,
"shipmentItems": [
{
"orderItemId": 56568665,
"lineItemKey": null,
"sku": "SQ3785739",
"name": "Potato Kitten -",
"imageUrl": null,
"weight": null,
"quantity": 1,
"unitPrice": 1,
"warehouseLocation": null,
"options": null,
"productId": 7565777,
"fulfillmentSku": null
}
],
"labelData": null,
"formData": null
},
{
"shipmentId": 33974373,
"orderId": 43337328,
"userId": "123456AB-ab12-3c4d-5e67-89f1abc1defa",
"orderNumber": "100028",
"createDate": "2014-10-03T06:51:59.9430000",
"shipDate": "2014-10-03",
"shipmentCost": 1.93,
"insuranceCost": 0,
"trackingNumber": "9400111899561704681196",
"isReturnLabel": false,
"batchNumber": "100300",
"carrierCode": "stamps_com",
"serviceCode": "usps_first_class_mail",
"packageCode": "package",
"confirmation": "delivery",
"warehouseId": 14265,
"voided": false,
"voidDate": null,
"marketplaceNotified": true,
"notifyErrorMessage": null,
"shipTo": {
"name": "Luke Skywalker",
"company": "SS",
"street1": "2815 EXPOSITION BLVD",
"street2": "",
"street3": null,
"city": "AUSTIN",
"state": "TX",
"postalCode": "78703-1221",
"country": "US",
"phone": "",
"residential": null
},
"weight": {
"value": 1,
"units": "ounces"
},
"dimensions": null,
"insuranceOptions": {
"provider": null,
"insureShipment": false,
"insuredValue": 0
},
"advancedOptions": null,
"shipmentItems": [
{
"orderItemId": 55827278,
"lineItemKey": null,
"sku": "test",
"name": "test",
"imageUrl": null,
"weight": null,
"quantity": 1,
"unitPrice": 1,
"warehouseLocation": null,
"options": null,
"productId": 7541107,
"fulfillmentSku": null
}
],
"labelData": null,
"formData": null
}
],
"total": 2,
"page": 1,
"pages": 0
}