Submit a new invoice to MakersHub. Supports two modes based on the request body structure:
- File submission: Include a
datafield as a base64-encoded string. The file is uploaded and queued for OCR extraction. - Data submission: Send invoice fields directly in the request body (no
datawrapper). The invoice is created directly without OCR processing.
The endpoint detects the mode automatically: if the body contains a data field with a string value, it is treated as a file submission. Otherwise, the body is treated as structured invoice data.
File Submission
| Field | Type | Description |
|---|---|---|
| data | string | Base64 encoded file content (PDF/Image). Required. |
| filename | string | Original filename including extension. Required. |
| type | string | MIME type. Defaults to application/pdf. |
Data Submission
Send invoice fields directly in the request body.
| Field | Type | Description |
|---|---|---|
| supplier_info | object | Supplier details (name, web, email, phone_number, address, supplierId). |
| ship_to | object | Ship-to address (name, address). |
| bill_to | object | Bill-to address (name, address, memo, departmentId, entityId). |
| invoice_number | string | Invoice number. |
| po_number | string | Purchase order number. |
| invoice_terms | string | Payment terms (e.g., "Net 30", "2%10 Net45"). |
| invoice_date | string | Invoice date (YYYY-MM-DD). |
| invoice_due | string | Payment due date (YYYY-MM-DD). |
| invoice_items | array | Line items (same structure as PATCH endpoint). |
| invoice_total | number | Total invoice amount. |
| tags | string | Comma-separated tags. |
Enter your API token.
Submit PDF Invoice (File)
{
"data": "JVBERi0xLjQKJeLjz9MKMyAwIG9iago8PC9UeXBlL1BhZ2UvUGFyZW50IDIgMCBSL1Jlc291cmNlczw8L0ZvbnQ8PC9GMSAxIDAgUj4+Pj4vTWVkaWFCb3hbMCAwIDYxMiA3OTJdL0NvbnRlbnRzIDQgMCBSPj4KZW5kb2JqCg==",
"filename": "invoice-2024-001.pdf",
"type": "application/pdf"
}Submit Image Invoice (File)
{
"data": "/9j/4AAQSkZJRgABAQEASABIAAD/4gKgSUNDX1BST0ZJTEUAAQEAAAKO...",
"filename": "invoice-scan.jpg",
"type": "image/jpeg"
}Submit Invoice Data Directly
{
"supplier_info": {
"name": "Belimo AirControls",
"web": "www.belimo.com",
"email": null,
"phone_number": "800-543-9038",
"address": "33 Turner Road\nDanbury, CT 06810",
"supplierId": "61"
},
"ship_to": {
"name": "ABC Supply",
"address": "785 1st Street\nBEAVER PA 15009"
},
"bill_to": {
"name": "ABC Supply",
"address": "100 2nd Street\nBRIDGEVILLE PA 15017",
"memo": null,
"departmentId": "4",
"entityId": null
},
"invoice_number": "920308481-add01",
"po_number": "22-015242-7T",
"invoice_terms": "2%10 Net45",
"invoice_date": "2025-11-25",
"invoice_due": "2026-01-09",
"invoice_items": [
{
"id": "0-690f4cdf21388",
"qty": 1.0,
"price": 212.6,
"total": 212.6,
"description": "B313B+TFRB24-SR - 3-way Characterized Control Valve",
"sku": "",
"itemId": "",
"customerId": "78",
"accountId": "60",
"classId": "5000000000000276764"
},
{
"id": "1-690f4cdf21398",
"qty": 1.0,
"price": 3.99,
"total": 3.99,
"description": "Tagging Charge",
"sku": "",
"itemId": "",
"customerId": "78",
"accountId": "60",
"classId": "5000000000000276764"
}
],
"invoice_total": 216.59,
"tags": "ABC"
}Submit an invoice via file upload or structured data:
- File submission: Body includes
data(base64 string),filename, and optionaltype. - Data submission: Body contains invoice fields directly (no
datawrapper).
Base64 encoded file content (PDF/Image).
Original filename including extension.
MIME type. Defaults to application/pdf.
Supplier/vendor information.
Supplier name.
Supplier website URL.
Supplier email address.
Supplier phone number.
Supplier address.
External supplier/vendor ID reference.
Ship-to address information.
Ship-to name.
Ship-to address.
Bill-to address information.
Bill-to name.
Bill-to address.
Memo or notes for the bill-to.
Department reference ID.
Entity reference ID.
Invoice number.
Purchase order number.
Payment terms (e.g., "Net 30", "2%10 Net45").
Invoice date (YYYY-MM-DD).
Payment due date (YYYY-MM-DD).
Line items array.
Individual line item on an invoice.
Line item identifier.
Quantity.
Unit price.
Line total.
Item description.
Item SKU.
Reference to item master record.
Customer reference for billable items.
GL account reference ID.
Accounting class reference ID.
Purchase order reference ID.
Purchase order line reference ID.
Mark line item as billable.
Department reference ID.
Entity reference ID.
Tax code reference ID.
Price includes tax.
Total invoice amount.
Comma-separated tags.
Invoice submitted successfully
File Submission Success
{
"status": "OK",
"msg": "Invoice record is added for extraction",
"result": 12345
}Data Submission Success
{
"status": "OK",
"msg": "Record added.",
"result": 12345
}Bad Request
Missing Filename (File Submission)
{
"status": "Error",
"msg": "The filename property is required.",
"result": null
}Invalid Base64 (File Submission)
{
"status": "Error",
"msg": "Invalid base64 encoded string.",
"result": null
}Invalid Data Fields (Data Submission)
{
"status": "Error",
"msg": "Value 'invalid' does not match type 'float' at path 'invoice_total'.",
"result": null
}Unauthorized
Unsupported Media Type