curl -X POST https://api.kasiye.com/v1/shipments \
-H "Authorization: Bearer shp_your_key" \
-H "Content-Type: application/json" \
-d '{
"customer_name": "Acme Corp",
"customer_email": "logistics@acme.com",
"pickup_address": "Area 47, Lilongwe",
"pickup_lat": -13.9626,
"pickup_lng": 33.7741,
"dropoff_address": "City Centre, Lilongwe",
"dropoff_lat": -13.9833,
"dropoff_lng": 33.7689,
"weight_kg": 5
}'
Shipments
Create a shipment
Book a covered shipment for the authenticated workspace.
POST
/
shipments
curl -X POST https://api.kasiye.com/v1/shipments \
-H "Authorization: Bearer shp_your_key" \
-H "Content-Type: application/json" \
-d '{
"customer_name": "Acme Corp",
"customer_email": "logistics@acme.com",
"pickup_address": "Area 47, Lilongwe",
"pickup_lat": -13.9626,
"pickup_lng": 33.7741,
"dropoff_address": "City Centre, Lilongwe",
"dropoff_lat": -13.9833,
"dropoff_lng": 33.7689,
"weight_kg": 5
}'
Creates a shipment in
Returns
pending / awaiting_payment. The workspace must have PayChangu connected, and the route must be covered. API creates do not set created_by.
If the customer name and email already exist on the workspace, Kasiye links that customer. Otherwise it creates a customer record.
string
required
Customer display name.
string
required
Customer email.
number
Existing customer id on this workspace. Ignored if it belongs to another team.
string
Optional national id or similar identifier.
string
required
Human-readable pickup address.
number
default:"-13.9626"
required
Pickup latitude (
-90 to 90).number
default:"33.7741"
required
Pickup longitude (
-180 to 180).string
required
Human-readable dropoff address.
number
default:"-13.9833"
required
Dropoff latitude (
-90 to 90).number
default:"33.7689"
required
Dropoff longitude (
-180 to 180).number
default:"5"
required
Package weight in kilograms. Must be at least
0.01.curl -X POST https://api.kasiye.com/v1/shipments \
-H "Authorization: Bearer shp_your_key" \
-H "Content-Type: application/json" \
-d '{
"customer_name": "Acme Corp",
"customer_email": "logistics@acme.com",
"pickup_address": "Area 47, Lilongwe",
"pickup_lat": -13.9626,
"pickup_lng": 33.7741,
"dropoff_address": "City Centre, Lilongwe",
"dropoff_lat": -13.9833,
"dropoff_lng": 33.7689,
"weight_kg": 5
}'
201 with the shipment wrapped in data.
Connect PayChangu on the workspace first. Otherwise the API returns
422 on paychangu. Uncovered routes return 422 on coverage or weight_kg.