Get a single invoice by ID
GEThttps://core-prod.malipopay.co.tz/api/v1/invoice/:invoiceId
Returns a single invoice document by its MongoDB ID
Request
Path Parameters
invoiceId stringrequired
Invoice document ID
Responses
- 200
- 400
Invoice fetched successfully
- application/json
- Schema
- Example (auto)
Schema
_idstring
Example:
64c2de5f1a3b7e9d0f5a2c81referencestring
Unique invoice reference number
Example:
INV-2024-001customerstring
Customer ID
Example:
6281559426fa29659c5ac38aitemsobject[]
subtotalnumber
Example:
500000taxnumber
Example:
90000totalnumber
Example:
590000currencystring
Example:
TZSstatusstring
Invoice status (DRAFT, SENT, PAID, OVERDUE, CANCELLED)
Example:
SENTdueDatedate
Example:
2024-03-31notesstring
Example:
Payment due within 30 daysprojectstring
Example:
63db68a6c5f3e7682e23c2cadeletedboolean
Example:
falsecreatedAtdate-time
Example:
2024-03-01T10:00:00.000Z{
"_id": "64c2de5f1a3b7e9d0f5a2c81",
"reference": "INV-2024-001",
"customer": "6281559426fa29659c5ac38a",
"items": [
{}
],
"subtotal": 500000,
"tax": 90000,
"total": 590000,
"currency": "TZS",
"status": "SENT",
"dueDate": "2024-03-31",
"notes": "Payment due within 30 days",
"project": "63db68a6c5f3e7682e23c2ca",
"deleted": false,
"createdAt": "2024-03-01T10:00:00.000Z"
}
Invoice not found or fetch failed
- application/json
- Schema
- Example (auto)
Schema
codeint32required
messagestringrequired
{
"code": 0,
"message": "string"
}
Authorization: apiToken
name: apiTokentype: apiKeyin: headerdescription: Project API key. Get yours from the Malipopay dashboard under Settings → API Keys.
- curl
- python
- nodejs
- php
- java
- go
- CURL
curl -L 'https://core-prod.malipopay.co.tz/api/v1/invoice/:invoiceId' \
-H 'Accept: application/json' \
-H 'apiToken: <apiToken>'
Response