whereparcel

Stuck on integration? Have a question? The developer is standing by.

Carriers API — 39+ Live Carriers Endpoint

Query metadata for 39+ live shipping carriers in production — USPS, UPS, FedEx, DHL, OnTrac and more. Don't see yours? Request and we add fast.

Try it in Playground Quick Start Guide → Get Started →

EndpointGET/v2/carriers
List supported carriers

Overview

Retrieve list and metadata of 39+ carriers. Free API - does not count towards usage quota.

Example Request

// npm install whereparcel
import { WhereParcel } from 'whereparcel';

const wp = new WhereParcel('YOUR_API_KEY', 'YOUR_SECRET_KEY');

const carriers = await wp.getCarriers();
console.log(carriers);
curl -X GET https://api.whereparcel.com/v2/carriers \
  -H "Authorization: Bearer YOUR_API_KEY:YOUR_SECRET_KEY" \
  -H "Content-Type: application/json"
const response = await fetch('https://api.whereparcel.com/v2/carriers', {
  method: 'GET',
  headers: {
    "Authorization": "Bearer YOUR_API_KEY:YOUR_SECRET_KEY",
    "Content-Type": "application/json"
  }
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://api.whereparcel.com/v2/carriers');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

$headers = [
  'Authorization: Bearer YOUR_API_KEY:YOUR_SECRET_KEY',
  'Content-Type: application/json'
];
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$response = curl_exec($ch);
curl_close($ch);

$result = json_decode($response, true);
print_r($result);
import requests

url = 'https://api.whereparcel.com/v2/carriers'

headers = {
    'Authorization': 'Bearer YOUR_API_KEY:YOUR_SECRET_KEY',
    'Content-Type': 'application/json'
}

response = requests.get(url, headers=headers)

result = response.json()
print(result)
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	url := "https://api.whereparcel.com/v2/carriers"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer YOUR_API_KEY:YOUR_SECRET_KEY")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()

	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}

Replace the test API key with your actual API key from the dashboard.

Response

Success Response (200)

200OK — Carrier list retrieved successfully
{
  "success": true,
  "data": [
    "us.usps",
    "us.fedex",
    "us.ups",
    "us.ontrac",
    "ca.post",
    "gb.fedex"
  ]
}

Error Response (401)

401Unauthorized — Authentication failed
{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or missing API key"
  }
}
EndpointGET/v2/countries
List supported countries

Overview

Retrieve list of countries supported for parcel tracking. Free API - does not count towards usage quota.

Example Request

// npm install whereparcel
import { WhereParcel } from 'whereparcel';

const wp = new WhereParcel('YOUR_API_KEY', 'YOUR_SECRET_KEY');

const countries = await wp.getCountries();
console.log(countries);
curl -X GET https://api.whereparcel.com/v2/countries \
  -H "Authorization: Bearer YOUR_API_KEY:YOUR_SECRET_KEY" \
  -H "Content-Type: application/json"
const response = await fetch('https://api.whereparcel.com/v2/countries', {
  method: 'GET',
  headers: {
    "Authorization": "Bearer YOUR_API_KEY:YOUR_SECRET_KEY",
    "Content-Type": "application/json"
  }
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://api.whereparcel.com/v2/countries');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

$headers = [
  'Authorization: Bearer YOUR_API_KEY:YOUR_SECRET_KEY',
  'Content-Type: application/json'
];
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$response = curl_exec($ch);
curl_close($ch);

$result = json_decode($response, true);
print_r($result);
import requests

url = 'https://api.whereparcel.com/v2/countries'

headers = {
    'Authorization': 'Bearer YOUR_API_KEY:YOUR_SECRET_KEY',
    'Content-Type': 'application/json'
}

response = requests.get(url, headers=headers)

result = response.json()
print(result)
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	url := "https://api.whereparcel.com/v2/countries"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer YOUR_API_KEY:YOUR_SECRET_KEY")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()

	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}

Replace the test API key with your actual API key from the dashboard.

Response

Success Response (200)

200OK — Country list retrieved successfully
{
  "success": true,
  "data": [
    {
      "code": "US",
      "name": "United States"
    },
    {
      "code": "CA",
      "name": "Canada"
    },
    {
      "code": "GB",
      "name": "United Kingdom"
    }
  ]
}

Error Response (401)

401Unauthorized — Authentication failed
{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or missing API key"
  }
}
EndpointGET/v2/carriers/{countryCode}
Get carriers by country

Overview

Filter and retrieve carriers available in a specific country. Free API - does not count towards usage quota.

Example Request

// npm install whereparcel
import { WhereParcel } from 'whereparcel';

const wp = new WhereParcel('YOUR_API_KEY', 'YOUR_SECRET_KEY');

const carriers = await wp.getCarriersByCountry('us');
console.log(carriers);
curl -X GET https://api.whereparcel.com/v2/carriers/us \
  -H "Authorization: Bearer YOUR_API_KEY:YOUR_SECRET_KEY" \
  -H "Content-Type: application/json"
const response = await fetch('https://api.whereparcel.com/v2/carriers/us', {
  method: 'GET',
  headers: {
    "Authorization": "Bearer YOUR_API_KEY:YOUR_SECRET_KEY",
    "Content-Type": "application/json"
  }
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://api.whereparcel.com/v2/carriers/us');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

$headers = [
  'Authorization: Bearer YOUR_API_KEY:YOUR_SECRET_KEY',
  'Content-Type: application/json'
];
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$response = curl_exec($ch);
curl_close($ch);

$result = json_decode($response, true);
print_r($result);
import requests

url = 'https://api.whereparcel.com/v2/carriers/us'

headers = {
    'Authorization': 'Bearer YOUR_API_KEY:YOUR_SECRET_KEY',
    'Content-Type': 'application/json'
}

response = requests.get(url, headers=headers)

result = response.json()
print(result)
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	url := "https://api.whereparcel.com/v2/carriers/us"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer YOUR_API_KEY:YOUR_SECRET_KEY")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()

	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}

Replace the test API key with your actual API key from the dashboard.

Path Parameters

countryCode string · required <p>Country code (ISO 3166-1 alpha-2)</p> us

Response

Success Response (200)

200OK — Country-specific carriers retrieved successfully
{
  "success": true,
  "data": [
    {
      "code": "us.usps",
      "name": "USPS (United States Postal Service)",
      "serviceScope": "international"
    },
    {
      "code": "us.fedex",
      "name": "FedEx",
      "serviceScope": "international"
    },
    {
      "code": "us.ups",
      "name": "UPS (United Parcel Service)",
      "serviceScope": "international"
    },
    {
      "code": "us.ontrac",
      "name": "OnTrac",
      "serviceScope": "national",
      "region": "WEST"
    },
    {
      "code": "us.ca.ontrac",
      "name": "OnTrac (California)",
      "serviceScope": "national",
      "region": "CA"
    }
  ]
}

Error Response (401)

401Unauthorized — Authentication failed
{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or missing API key"
  }
}

Error Response (404)

404Not Found — Country code not found
{
  "success": false,
  "error": {
    "code": "NOT_FOUND",
    "message": "No carriers found for country: ZZ"
  }
}
EndpointGET/v2/carriers/{countryCode}/{region}
Get carriers by country and region

Overview

Filter and retrieve carriers available in a specific region of a country. Useful for countries with large territories (e.g., USA, China) where some carriers operate only in specific regions. Not needed for countries where all carriers operate nationwide. Free API - does not count towards usage quota.

Example Request

// npm install whereparcel
import { WhereParcel } from 'whereparcel';

const wp = new WhereParcel('YOUR_API_KEY', 'YOUR_SECRET_KEY');

const carriers = await wp.getCarriersByRegion('us', 'ca');
console.log(carriers);
curl -X GET https://api.whereparcel.com/v2/carriers/us/ca \
  -H "Authorization: Bearer YOUR_API_KEY:YOUR_SECRET_KEY" \
  -H "Content-Type: application/json"
const response = await fetch('https://api.whereparcel.com/v2/carriers/us/ca', {
  method: 'GET',
  headers: {
    "Authorization": "Bearer YOUR_API_KEY:YOUR_SECRET_KEY",
    "Content-Type": "application/json"
  }
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://api.whereparcel.com/v2/carriers/us/ca');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

$headers = [
  'Authorization: Bearer YOUR_API_KEY:YOUR_SECRET_KEY',
  'Content-Type: application/json'
];
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$response = curl_exec($ch);
curl_close($ch);

$result = json_decode($response, true);
print_r($result);
import requests

url = 'https://api.whereparcel.com/v2/carriers/us/ca'

headers = {
    'Authorization': 'Bearer YOUR_API_KEY:YOUR_SECRET_KEY',
    'Content-Type': 'application/json'
}

response = requests.get(url, headers=headers)

result = response.json()
print(result)
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	url := "https://api.whereparcel.com/v2/carriers/us/ca"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer YOUR_API_KEY:YOUR_SECRET_KEY")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()

	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}

Replace the test API key with your actual API key from the dashboard.

Path Parameters

countryCode string · required <p>Country code (ISO 3166-1 alpha-2)</p> us
region string · required <p>Region code (state, province, etc.)</p> ca

Response

Success Response (200)

200OK — Region-specific carriers retrieved successfully
{
  "success": true,
  "data": [
    {
      "code": "us.usps",
      "name": "USPS (United States Postal Service)",
      "serviceScope": "international"
    },
    {
      "code": "us.fedex",
      "name": "FedEx",
      "serviceScope": "international"
    },
    {
      "code": "us.ups",
      "name": "UPS (United Parcel Service)",
      "serviceScope": "international"
    },
    {
      "code": "us.ca.ontrac",
      "name": "OnTrac (California)",
      "serviceScope": "national",
      "region": "CA"
    }
  ]
}

Error Response (401)

401Unauthorized — Authentication failed
{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or missing API key"
  }
}

Error Response (404)

404Not Found — Country or region code not found
{
  "success": false,
  "error": {
    "code": "NOT_FOUND",
    "message": "No carriers found for ZZ/CA"
  }
}