Retrieves the list of available shipping services provided by the specified carrier.
GET carriers/listservices?carrierCode=carrierCode HTTP/1.1
Host: ssapi.shipstation.com
Authorization: __YOUR_AUTH_HERE__
curl -iX GET 'https://ssapi.shipstation.comcarriers/listservices?carrierCode=carrierCode' \
-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/carriers/listservices?carrierCode=carrierCode' -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/carriers/listservices?carrierCode=carrierCode", 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/carriers/listservices?carrierCode=carrierCode',
'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/carriers/listservices?carrierCode=carrierCode",
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/carriers/listservices?carrierCode=carrierCode"
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/carriers/listservices?carrierCode=carrierCode")
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/carriers/listservices?carrierCode=carrierCode");
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/carriers/listservices?carrierCode=carrierCode")
.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/carriers/listservices?carrierCode=carrierCode"
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/carriers/listservices?carrierCode=carrierCode"]
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/carriers/listservices?carrierCode=carrierCode")!,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()
[
{
"carrierCode": "fedex",
"code": "fedex_ground",
"name": "FedEx Ground®",
"domestic": true,
"international": false
},
{
"carrierCode": "fedex",
"code": "fedex_home_delivery",
"name": "FedEx Home Delivery®",
"domestic": true,
"international": false
},
{
"carrierCode": "fedex",
"code": "fedex_2day",
"name": "FedEx 2Day®",
"domestic": true,
"international": false
},
{
"carrierCode": "fedex",
"code": "fedex_2day_am",
"name": "FedEx 2Day® A.M.",
"domestic": true,
"international": false
},
{
"carrierCode": "fedex",
"code": "fedex_express_saver",
"name": "FedEx Express Saver®",
"domestic": true,
"international": false
},
{
"carrierCode": "fedex",
"code": "fedex_standard_overnight",
"name": "FedEx Standard Overnight®",
"domestic": true,
"international": false
},
{
"carrierCode": "fedex",
"code": "fedex_priority_overnight",
"name": "FedEx Priority Overnight®",
"domestic": true,
"international": false
},
{
"carrierCode": "fedex",
"code": "fedex_first_overnight",
"name": "FedEx First Overnight®",
"domestic": true,
"international": false
},
{
"carrierCode": "fedex",
"code": "fedex_1_day_freight",
"name": "FedEx 1 Day® Freight",
"domestic": true,
"international": false
},
{
"carrierCode": "fedex",
"code": "fedex_2_day_freight",
"name": "FedEx 2 Day® Freight",
"domestic": true,
"international": false
},
{
"carrierCode": "fedex",
"code": "fedex_3_day_freight",
"name": "FedEx 3 Day® Freight",
"domestic": true,
"international": false
},
{
"carrierCode": "fedex",
"code": "fedex_first_overnight_freight",
"name": "FedEx First Overnight® Freight",
"domestic": true,
"international": false
},
{
"carrierCode": "fedex",
"code": "fedex_ground_international",
"name": "FedEx Ground® International",
"domestic": false,
"international": true
},
{
"carrierCode": "fedex",
"code": "fedex_international_economy",
"name": "FedEx International Economy®",
"domestic": false,
"international": true
},
{
"carrierCode": "fedex",
"code": "fedex_international_priority",
"name": "FedEx International Priority®",
"domestic": false,
"international": true
},
{
"carrierCode": "fedex",
"code": "fedex_international_first",
"name": "FedEx International First®",
"domestic": false,
"international": true
},
{
"carrierCode": "fedex",
"code": "fedex_europe_first",
"name": "FedEx Europe First®",
"domestic": false,
"international": true
},
{
"carrierCode": "fedex",
"code": "fedex_international_economy_freight",
"name": "FedEx International Economy® Freight",
"domestic": false,
"international": true
},
{
"carrierCode": "fedex",
"code": "fedex_international_priority_freight",
"name": "FedEx International Priority® Freight",
"domestic": false,
"international": true
}
]