Skip to main content

Create a Shipment

Dispatch a new shipment. The system resolves origin and destination addresses from Google Place IDs, calculates the full cost breakdown, verifies your wallet balance, and creates the shipment. all in a single request. The calculated fee is deducted atomically from your prepaid wallet.


Endpoint​

POST/v1/shipments

Required permission: shipments:create


Request Body​

FieldTypeRequiredDescription
senderPlaceIdString✅Google Maps Place ID for the pickup address. Use the Location Search endpoint to get this.
senderNameString✅Full name of the person handing over the package.
senderPhoneString✅Sender's contact phone number.
senderEmailString❌Sender's email address.
receiverPlaceIdString✅Google Maps Place ID for the delivery address.
receiverNameString✅Full name of the recipient.
receiverPhoneString✅Recipient's contact phone number.
receiverEmailString❌Recipient's email address.
packageTitleString✅Short label for the package contents (e.g. "Laptop & Charger").
packageDescriptionString❌Longer description of what is inside the package.
packageCategoryString✅Size/weight tier. One of SMALL, MEDIUM, LARGE, or EXTRA_LARGE. See table below.
pickupCodeString❌Optional 6 numeric or alphabetic code for package handover. If omitted, the system auto-generates one.
itemValueInteger❌Declared monetary value of the contents in ₦. Required if enableInsurance is true.
enableInsuranceBoolean❌Set to true to add insurance coverage based on itemValue.
userNoteString❌A note from the sender attached to the shipment.

Package Categories​

ValueDescriptionOperational Weight
SMALLFits in a shoebox. documents, keys, phonesup to 3 kg
MEDIUMFits in a backpack. clothes, laptopsup to 10 kg
LARGERequires two hands. microwaves, multiple boxesup to 25 kg
EXTRA_LARGERequires a van or truck. furniture, wholesale goods25 kg+

Response​

On success, returns 200 OK with the full shipment record.

FieldTypeDescription
idStringInternal shipment ID (e.g. SHP_A1B2C3D4).
trackingCodeStringCustomer-facing tracking code (e.g. TCL-SB-3891829).
senderNameStringSender's name.
senderPhoneStringSender's phone.
senderEmailString?Sender's email, if provided.
receiverNameStringRecipient's name.
receiverPhoneStringRecipient's phone.
receiverEmailString?Recipient's email, if provided.
originAddressStringResolved origin street address.
destinationAddressStringResolved destination street address.
packageTitleStringPackage label.
packageDescriptionString?Package description, if provided.
packageCategoryStringSize tier. SMALL, MEDIUM, LARGE, or EXTRA_LARGE.
itemValueFloat?Declared item value in ₦, if provided.
enableInsuranceBoolean?Whether insurance is enabled.
distanceKmFloatCalculated route distance in kilometers.
baseFareIntegerFlat base charge in ₦.
distanceFeeIntegerDistance-based charge in ₦.
weightSurchargeIntegerWeight-tier surcharge in ₦.
valueSurchargeIntegerInsurance/value-based surcharge in ₦.
totalCostIntegerTotal amount debited from your wallet in ₦.
statusStringInitial status. always PENDING on creation.
userNoteString?Sender's note, if provided.
createdAtStringISO 8601 UTC timestamp.

caution

It is recommended to omit pickupCode to allow auto-generation. If supplying a custom pickupCode, ensure it is never visible to the sender prior to pickup. The sender will verify this code when the rider arrives to collect the package.

Wallet Pre-check​

note

If your wallet balance is lower than the calculated totalCost, the request fails immediately before any shipment record is created. Top up your wallet first and retry.


{
"senderPlaceId": "ChIJi4eLcz4OdkgRlgpAD5e4OCg",
"senderName": "Grace Adegoke",
"senderPhone": "+2348031234567",
"senderEmail": "grace@marketify.ng",
"receiverPlaceId": "ChIJv1SCIS2TOxARgv6-Zj4i_yw",
"receiverName": "John Doe",
"receiverPhone": "+2348123456789",
"packageTitle": "Laptop & Charger",
"packageDescription": "Space Grey MacBook Pro 16-inch in original box",
"packageCategory": "MEDIUM",
"itemValue": 450000,
"enableInsurance": true
}