docs

Mofavo External Orders API

Use this endpoint to create orders in Mofavo.

Endpoint

POST https://api.mofavo.com/external

Required headers

Signature generation

Compute x-mofavo-signature as:

Request body

{
  "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 rules

status must be one of:

If status is not draft, your Bearer token must include contractId.

Status meanings

Response

Success (201):

{
  "id": 12345
}

Error responses

Errors return JSON with a short message, for example:

{
  "error": "Invalid payload",
  "issues": [
    {
      "path": "data.customer.name",
      "message": "Required"
    }
  ]
}