Skip to main content

Gateways

Create

The Gateway encapsulate the access to the carrier's API. A carrier gateway instance can created by using the karrio.gateway Gateway's initializer.

import karrio
carrier_gateway = karrio.gateway["carrier_name"].create(...)

Code sample

import karrio

# canadapost_gateway = karrio.gateway["carrier_name"].create(
canadapost_gateway = karrio.gateway["canadapost"].create(
{
"username": "username",
"password": "password",
"customer_number": "123456789",
"test": True
}
)

Carrier Gateway Settings

Aramex Settings [carrier_name = aramex]

NameTypeDescription
usernamestrrequired
passwordstrrequired
account_pinstrrequired
account_entitystrrequired
account_numberstrrequired
account_country_codestrrequired
idstr
testbool
carrier_idstr

Australia Post Settings [carrier_name = australiapost]

NameTypeDescription
api_keystrrequired
passwordstrrequired
account_numberstrrequired
idstr
testbool
carrier_idstr
account_country_codestr

BoxKnight Settings [carrier_name = boxknight]

NameTypeDescription
usernamestrrequired
passwordstrrequired
idstr
testbool
carrier_idstr
account_country_codestr

Canada Post Settings [carrier_name = canadapost]

NameTypeDescription
usernamestrrequired
passwordstrrequired
customer_numberstr
contract_idstr
languagestr
idstr
testbool
carrier_idstr
account_country_codestr

Canpar Settings [carrier_name = canpar]

NameTypeDescription
usernamestrrequired
passwordstrrequired
languagestr
idstr
testbool
carrier_idstr
account_country_codestr

DHL Express Settings [carrier_name = dhl_express]

NameTypeDescription
site_idstrrequired
passwordstrrequired
account_numberstr
account_country_codestr
idstr
testbool
carrier_idstr

DHL Universal Settings [carrier_name = dhl_universal]

NameTypeDescription
consumer_keystrrequired
consumer_secretstrrequired
idstr
testbool
carrier_idstr
account_country_codestr

Dicom Settings [carrier_name = dicom]

NameTypeDescription
usernamestrrequired
passwordstrrequired
billing_accountstr
idstr
testbool
carrier_idstr
account_country_codestr

FedEx Settings [carrier_name = fedex]

NameTypeDescription
user_keystrrequired
passwordstrrequired
meter_numberstrrequired
account_numberstrrequired
account_country_codestr
idstr
testbool
carrier_idstr

Purolator Settings [carrier_name = purolator]

NameTypeDescription
usernamestrrequired
passwordstrrequired
account_numberstrrequired
languagestr
user_tokenstr
idstr
testbool
carrier_idstr
account_country_codestr

Royal Mail Settings [carrier_name = royalmail]

NameTypeDescription
client_idstrrequired
client_secretstrrequired
idstr
testbool
carrier_idstr
account_country_codestr

Sendle Settings [carrier_name = sendle]

NameTypeDescription
sendle_idstrrequired
api_keystrrequired
idstr
testbool
carrier_idstr
account_country_codestr

SF-Express Settings [carrier_name = sf_express]

NameTypeDescription
partner_idstrrequired
check_wordstrrequired
idstr
testbool
carrier_idstr
account_country_codestr

TNT Settings [carrier_name = tnt]

NameTypeDescription
usernamestrrequired
passwordstrrequired
account_numberstr
account_country_codestr
idstr
testbool
carrier_idstr

UPS Settings [carrier_name = ups]

NameTypeDescription
usernamestrrequired
passwordstrrequired
access_license_numberstrrequired
account_numberstr
account_country_codestr
idstr
testbool
carrier_idstr

USPS Settings [carrier_name = usps]

NameTypeDescription
usernamestrrequired
passwordstrrequired
mailer_idstr
customer_registration_idstr
logistics_manager_mailer_idstr
idstr
testbool
carrier_idstr
account_country_codestr

USPS International Settings [carrier_name = usps_international]

NameTypeDescription
usernamestrrequired
passwordstrrequired
mailer_idstr
customer_registration_idstr
logistics_manager_mailer_idstr
idstr
testbool
carrier_idstr
account_country_codestr

Yanwen Settings [carrier_name = yanwen]

NameTypeDescription
customer_numberstrrequired
license_keystrrequired
idstr
testbool
carrier_idstr
account_country_codestr

Yunexpress Settings [carrier_name = yunexpress]

NameTypeDescription
customer_numberstrrequired
api_secretstrrequired
idstr
testbool
carrier_idstr
account_country_codestr
Shared Properties

Note that all carrier gateway defined bellow have these additional parameters

NameTypeDescription
carrier_namestrdefault: carrier name (eg: canadapost, purolator...)
idstr
testboolean
account_country_codestr