Skip to main content

Development quickstart

Get up and running with our client libraries and start developing your Karrio integration.

Integrating Karrio into your app or website can begin as soon as you create a Karrio account, and requires three steps:

1 Install a client library so your integration can interact with the Karrio API

2 Obtain your API keys so Karrio can authenticate your integration’s API requests

3 Make a test API request to confirm everything is up and running


1 Install a client library

We provide official libraries for different programming languages.

# Install via npm
npm install --save karrio

2 Obtain your API keys

Karrio authenticates your API requests using your account’s API keys. If you don’t include your key when making an API request, or use one that is incorrect or outdated, Karrio returns an error.

Karrio accounts support two type of keys: an API key ideal for server applications and a JSON Web Token ideal for client applications.

You can generate new JSON Web Token by API requests providing an account credentials (email, password). For convenience, your API key is always available in the Dashboard


3 Make a test API request

To check that your integration is working correctly, make a test API request using your API key to create an Address.

// Set your API key.
// See your keys here: https://app.karrio.io/developers/api
const karrio = require('karrio')('key_...');

const adddress = await karrio.addresses.create({
"address_line1": "125 Church St",
"person_name": "John Doe",
"city": "Moncton",
"country_code": "CA",
"postal_code": "E1C4Z8",
"state_code": "NB",
});

Karrio returns an Address object in response to your API request.

{
"id": "adr_7686aff180044495a83610713d47c38a",
"postal_code": "E1C4Z8",
"city": "Moncton",
"federal_tax_id": null,
"state_tax_id": null,
"person_name": "John Doe",
"company_name": null,
"country_code": "CA",
"email": null,
"phone_number": null,
"state_code": "NB",
"suburb": null,
"residential": false,
"address_line1": "125 Church St",
"address_line2": null,
"validate_location": false,
"validation": null
}

Next Steps

After you successfully make an API request, pick a guide to continue your integration.