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
senderPlaceIdStringGoogle Maps Place ID for the pickup address. Use the Location Search endpoint to get this.
senderNameStringFull name of the person handing over the package.
senderPhoneStringSender's contact phone number.
senderEmailStringSender's email address.
receiverPlaceIdStringGoogle Maps Place ID for the delivery address.
receiverNameStringFull name of the recipient.
receiverPhoneStringRecipient's contact phone number.
receiverEmailStringRecipient's email address.
packageTitleStringShort label for the package contents (e.g. "Laptop & Charger").
packageDescriptionStringLonger description of what is inside the package.
packageCategoryStringSize/weight tier. One of SMALL, MEDIUM, LARGE, or EXTRA_LARGE. See table below.
itemValueIntegerDeclared monetary value of the contents in ₦. Required if enableInsurance is true.
enableInsuranceBooleanSet to true to add insurance coverage based on itemValue.
userNoteStringA 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.
senderPlaceIdStringOrigin Place ID.
receiverNameStringRecipient's name.
receiverPhoneStringRecipient's phone.
receiverEmailString?Recipient's email, if provided.
receiverPlaceIdStringDestination Place ID.
originAddressStringResolved origin street address.
originCityStringOrigin city.
originStateStringOrigin state.
destinationAddressStringResolved destination street address.
destCityStringDestination city.
destStateStringDestination state.
packageTitleStringPackage label.
packageDescriptionString?Package description, if provided.
packageCategoryStringSize tier. SMALL, MEDIUM, LARGE, or EXTRA_LARGE.
itemValueInteger?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.
eventsArrayShipment lifecycle events. Each entry has title, description, and createdAt.
userNoteString?Sender's note, if provided.
createdAtStringISO 8601 UTC timestamp.

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
}