Carrier Accounts
Get Carrier Registration status
Returns the registration status for the given account for the given carrier
GET
/
carrier_accounts
/
reg-status
Python
import shippo
from shippo.models import operations
s = shippo.Shippo(
api_key_header='ShippoToken <API_TOKEN>',
shippo_api_version='2018-02-08',
)
res = s.carrier_accounts.get_registration_status(carrier=operations.Carrier.USPS)
if res is not None:
# handle response
passimport { Shippo } from "shippo";
const shippo = new Shippo({
apiKeyHeader: "ShippoToken <API_TOKEN>",
shippoApiVersion: "2018-02-08",
});
async function run() {
const result = await shippo.carrierAccounts.getRegistrationStatus("usps");
// Handle the result
console.log(result);
}
run();using Shippo;
using Shippo.Models.Components;
using Shippo.Models.Requests;
var sdk = new ShippoSDK(
apiKeyHeader: "ShippoToken <API_TOKEN>",
shippoApiVersion: "2018-02-08"
);
var res = await sdk.CarrierAccounts.GetRegistrationStatusAsync(
carrier: Carrier.Usps,
shippoApiVersion: "2018-02-08"
);
// handle responsedeclare(strict_types=1);
require 'vendor/autoload.php';
use Shippo\API;
use Shippo\API\Models\Operations;
$sdk = API\Shippo::builder()
->setSecurity(
'ShippoToken <API_TOKEN>'
)
->setShippoApiVersion('2018-02-08')
->build();
$response = $sdk->carrierAccounts->getRegistrationStatus(
carrier: Operations\Carrier::Usps,
shippoApiVersion: '2018-02-08'
);
if ($response->carrierAccountRegistrationStatus !== null) {
// handle response
}package hello.world;
import com.goshippo.shippo_sdk.Shippo;
import com.goshippo.shippo_sdk.models.operations.Carrier;
import com.goshippo.shippo_sdk.models.operations.GetCarrierRegistrationStatusResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
Shippo sdk = Shippo.builder()
.apiKeyHeader("ShippoToken <API_TOKEN>")
.shippoApiVersion("2018-02-08")
.build();
GetCarrierRegistrationStatusResponse res = sdk.carrierAccounts().getRegistrationStatus()
.carrier(Carrier.USPS)
.shippoApiVersion("2018-02-08")
.call();
if (res.carrierAccountRegistrationStatus().isPresent()) {
// handle response
}
}
}curl --request GET \
--url https://api.goshippo.com/carrier_accounts/reg-status \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.goshippo.com/carrier_accounts/reg-status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.goshippo.com/carrier_accounts/reg-status"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.goshippo.com/carrier_accounts/reg-status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"carrier_account": "99dc410d295b4a168993cc38809cb123",
"object_created": "2023-11-07T05:31:56Z",
"object_owner": "tom@gmail.com",
"object_updated": "2023-11-07T05:31:56Z",
"status": "PENDING_TERMS"
}{}Authorizations
API key authentication using the ShippoToken scheme. Format: Authorization: ShippoToken <API_TOKEN> Example: Authorization: ShippoToken shippo_live_abc123
Headers
Optional string used to pick a non-default API version to use. See our API version guide.
Example:
"2018-02-08"
Optional. The object ID of a Managed Shippo Account. Platform accounts set this to make the request on behalf of one of their managed accounts. See the Platform accounts guide.
Query Parameters
filter by specific carrier
Available options:
ups, usps, canada_post Was this page helpful?
⌘I
Python
import shippo
from shippo.models import operations
s = shippo.Shippo(
api_key_header='ShippoToken <API_TOKEN>',
shippo_api_version='2018-02-08',
)
res = s.carrier_accounts.get_registration_status(carrier=operations.Carrier.USPS)
if res is not None:
# handle response
passimport { Shippo } from "shippo";
const shippo = new Shippo({
apiKeyHeader: "ShippoToken <API_TOKEN>",
shippoApiVersion: "2018-02-08",
});
async function run() {
const result = await shippo.carrierAccounts.getRegistrationStatus("usps");
// Handle the result
console.log(result);
}
run();using Shippo;
using Shippo.Models.Components;
using Shippo.Models.Requests;
var sdk = new ShippoSDK(
apiKeyHeader: "ShippoToken <API_TOKEN>",
shippoApiVersion: "2018-02-08"
);
var res = await sdk.CarrierAccounts.GetRegistrationStatusAsync(
carrier: Carrier.Usps,
shippoApiVersion: "2018-02-08"
);
// handle responsedeclare(strict_types=1);
require 'vendor/autoload.php';
use Shippo\API;
use Shippo\API\Models\Operations;
$sdk = API\Shippo::builder()
->setSecurity(
'ShippoToken <API_TOKEN>'
)
->setShippoApiVersion('2018-02-08')
->build();
$response = $sdk->carrierAccounts->getRegistrationStatus(
carrier: Operations\Carrier::Usps,
shippoApiVersion: '2018-02-08'
);
if ($response->carrierAccountRegistrationStatus !== null) {
// handle response
}package hello.world;
import com.goshippo.shippo_sdk.Shippo;
import com.goshippo.shippo_sdk.models.operations.Carrier;
import com.goshippo.shippo_sdk.models.operations.GetCarrierRegistrationStatusResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
Shippo sdk = Shippo.builder()
.apiKeyHeader("ShippoToken <API_TOKEN>")
.shippoApiVersion("2018-02-08")
.build();
GetCarrierRegistrationStatusResponse res = sdk.carrierAccounts().getRegistrationStatus()
.carrier(Carrier.USPS)
.shippoApiVersion("2018-02-08")
.call();
if (res.carrierAccountRegistrationStatus().isPresent()) {
// handle response
}
}
}curl --request GET \
--url https://api.goshippo.com/carrier_accounts/reg-status \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.goshippo.com/carrier_accounts/reg-status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.goshippo.com/carrier_accounts/reg-status"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.goshippo.com/carrier_accounts/reg-status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"carrier_account": "99dc410d295b4a168993cc38809cb123",
"object_created": "2023-11-07T05:31:56Z",
"object_owner": "tom@gmail.com",
"object_updated": "2023-11-07T05:31:56Z",
"status": "PENDING_TERMS"
}{}