Use this endpoint to create orders in Mofavo.
POST https://api.mofavo.com/external
Content-Type: application/jsonx-mofavo-api-key: <your app api key>x-mofavo-signature: <base64 hmac>Authorization: Bearer <jwt>Compute x-mofavo-signature as:
{
"data": {
"status": "draft",
"customer": {
"name": "Jane Doe",
"phone": "+2348012345678",
"address": "12 Banana Island Road",
"city": "Lagos",
"state": "LA"
},
"cart": [
{
"name": "Premium T-Shirt",
"quantity": 2,
"pricePerUnit": 7500
}
],
"total": {
"totalPrice": 15000
}
}
}
status must be one of:
draftreadyForPackagingreadyForPickUpIf status is not draft, your Bearer token must include contractId.
draft: Order needs confirmation in Mofavo before packaging.readyForPackaging: Order is confirmed (or merchant skips confirmation) and should be packaged in Mofavo.readyForPickUp: Order is already packaged (or merchant handles packaging outside Mofavo) and is ready for pickup by the delivery partner.Success (201):
{
"id": 12345
}
400 invalid payload401 missing/invalid signature or token403 invalid API keyErrors return JSON with a short message, for example:
{
"error": "Invalid payload",
"issues": [
{
"path": "data.customer.name",
"message": "Required"
}
]
}