PrimeFreight API Documentation

PrimeFreight provides a lightweight API for merchants to automatically create shipments after successful checkout, and provide tracking numbers to customers.

Base URL

https://intl-primefreight.com/api/

All requests must be made server-to-server (backend), not from the customer’s browser.

Authentication

Each merchant receives a unique API key:

pf_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Keep your API key private. Do not expose it in frontend JavaScript.


POST create_shipment.php

Create a shipment after payment is confirmed. Returns a tracking number immediately.

Request JSON

{
  "api_key": "pf_live_xxx",
  "sender_name": "Merchant Name",
  "recipient_name": "Customer Name",
  "origin_country": "Canada",
  "destination_country": "United States",
  "order_id": "ORDER-12345",
  "customer_email": "customer@example.com"
}

Response JSON

{
  "success": true,
  "tracking_number": "27CBD80A"
}

Example (curl)

curl -X POST https://intl-primefreight.com/api/create_shipment.php \
  -H "Content-Type: application/json" \
  -d '{
    "api_key": "pf_live_xxx",
    "sender_name": "Merchant Name",
    "recipient_name": "Customer Name",
    "origin_country": "Canada",
    "destination_country": "United States",
    "order_id": "ORDER-12345",
    "customer_email": "customer@example.com"
  }'

Recommended usage: call this endpoint only after payment success (Stripe webhook, Shopify order paid event, etc.).

Customer Tracking Link

Once you receive a tracking number, send the customer this link:

https://intl-primefreight.com/track.php?tracking=TRACKING_NUMBER

Example:

https://intl-primefreight.com/track.php?tracking=27CBD80A

Support

For onboarding, integration help, or operational support, contact: info@intl-primefreight.com

© 2026 PrimeFreight