Resources · Version 1

SPED Developer API

Connect approved webstores and business systems to SPED pricing, shipment creation, labels, and tracking.

Quick startShipment reference

Quick start

Make your first request

API access is available to approved SPED business accounts. Requests use HTTPS and form-encoded parameters. Keep credentials on your server and never include them in browser or mobile-app code.

Base URLhttps://clientportal.spedtt.com/cscourier/API/<operation>
curl -X POST "https://clientportal.spedtt.com/cscourier/API/test_connection" \
  -H "Accept: application/json" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "api_key=YOUR_SERVER_SIDE_KEY"

Authentication

Send the issued api_key with every request. Access is scoped to the business account, its shipments, and enabled services. Contact SPED immediately if a credential is exposed so it can be replaced.

Operations are enabled per integration account. A documented route may return a permission error until SPED has approved and enabled it.

Standard responses

Successful requests return status: done. Failed requests return status: failed, an error code, and a safe message.

{
  "status": "done",
  "data": {},
  "message": "Request completed"
}

POST /API/list_services

Returns account-enabled main or optional services. Always use identifiers returned for the connected account.

ParameterRequiredDescription
api_keyYesServer-side SPED API credential.
typeYesUse main for shipment services or extra for optional services.

POST /API/list_cities

Returns supported cities and regional information for integration profiles with location-directory permission.

ParameterRequiredDescription
api_keyYesServer-side SPED API credential.
countryNoPreferred ISO two-letter country code.
countyNoState, county, province, or region filter.

POST /API/get_price

Calculates the current price for a proposed shipment. Send complete route, dimensions, weight, insurance, and optional-service information.

ParameterRequiredDescription
api_keyYesServer-side SPED API credential.
typeYespackage or envelope.
service_typeYesAn enabled main service identifier.
cnt / weightYesPiece count and weight in kilograms.
length / width / heightService-dependentParcel dimensions in centimetres.
from_country / from_cityYesOrigin country and city.
to_country / to_cityYesDestination country and city.
insuranceNoValue to insure.

POST /API/create_shipment

Creates a shipment using an enabled main service and complete sender, recipient, parcel, and optional-service information.

ParameterRequiredDescription
api_keyYesServer-side SPED API credential.
type / service_typeYesShipment type and enabled main service.
customer_referenceRecommendedYour unique order or shipment reference.
cnt / weightYesPiece count and weight in kilograms.
contentYesAccurate contents description.
from_* / to_*YesStructured sender and recipient contact and address fields.
pickup_requestedNoSend true when a pickup should be requested.
awb_event_handlerNoHTTPS endpoint for shipment events.

POST /API/get_status

Returns the current status for one shipment number.

ParameterRequiredDescription
api_keyYesServer-side SPED API credential.
awbnoYesSPED shipment or tracking number.

POST /API/get_history

Returns chronological tracking events. Use this after a webhook to refresh customer-visible tracking.

ParameterRequiredDescription
api_keyYesServer-side SPED API credential.
awbnoYesSPED shipment or tracking number.
fullNoRequest expanded history when permitted.

POST /API/print

Returns the shipping label for an accessible shipment.

ParameterRequiredDescription
api_keyYesServer-side SPED API credential.
awbnoYesSPED shipment or tracking number.
typeYespdf, html, or zpl.
formatNoa4 or a6; defaults to a6.

Shipment event webhooks

Supply an HTTPS event endpoint when creating a shipment. Treat each notification as a prompt to retrieve current status or history. Deduplicate events before updating customers or business systems.

{
  "no": "SPED_SHIPMENT_NUMBER",
  "customer_reference": "ORDER-10042",
  "type": "status",
  "status": "in_transit"
}

Security, retries and production readiness

  • Keep API credentials server-side and rotate exposed credentials immediately.
  • Use HTTPS for every request and webhook.
  • Validate and escape all customer-provided shipment data.
  • Use a unique customer reference and persist every shipment response.
  • Retry reads with exponential backoff. Do not blindly retry shipment creation after a timeout.
  • Recheck prices immediately before shipment creation or payment.
  • Test services, labels, webhooks, and error handling in staging before production.