Consolidated Invoices
API endpoints for managing consolidated invoices
Consolidated Invoices API
Retrieve consolidated invoices and create adjustment notes for them. Consolidated invoices group multiple invoices into a single submission to MyInvois.
List Consolidated Invoices
Endpoint
GET /api/consolidated-invoicesHeaders
| Header | Value |
|---|---|
X-API-Key | Your API key |
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
page | number | 1 | Page number |
per_page | number | 10 | Items per page |
Response
{
"meta": {
"total": 3,
"per_page": 10,
"current_page": 1,
"last_page": 1
},
"data": [
{
"id": 1,
"company_id": 2,
"invoice_code": 1,
"type": "CONSOLIDATED_INVOICE",
"buyer": { "...": "..." },
"supplier": { "...": "..." },
"line_items": [],
"status": "Valid",
"legal_monetary_total": {
"excludingTax": 500,
"includingTax": 530,
"payableAmount": 530
},
"created_at": "2025-09-01T00:00:00.000+00:00",
"updated_at": "2025-09-01T00:00:00.000+00:00"
}
]
}Code Examples
cURL
curl -X GET "https://api.bizcare-einvoice.com/api/consolidated-invoices?page=1&per_page=10" \
-H "X-API-Key: your-api-key-here"JavaScript
const response = await fetch(
'https://api.bizcare-einvoice.com/api/consolidated-invoices?page=1&per_page=10',
{ headers: { 'X-API-Key': 'your-api-key-here' } }
);
const data = await response.json();Python
response = requests.get(
'https://api.bizcare-einvoice.com/api/consolidated-invoices',
headers={'X-API-Key': 'your-api-key-here'},
params={'page': 1, 'per_page': 10},
)PHP
$response = Http::withHeaders([
'X-API-Key' => 'your-api-key-here',
])->get('https://api.bizcare-einvoice.com/api/consolidated-invoices', [
'page' => 1,
'per_page' => 10,
]);Get Consolidated Invoice
Endpoint
GET /api/consolidated-invoices/:idHeaders
| Header | Value |
|---|---|
X-API-Key | Your API key |
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | integer | Consolidated invoice ID |
Response
Returns a single ConsolidatedInvoice object, including nested invoices, submitted_documents, and adjustment_notes arrays.
Code Examples
cURL
curl -X GET https://api.bizcare-einvoice.com/api/consolidated-invoices/1 \
-H "X-API-Key: your-api-key-here"JavaScript
const response = await fetch(
'https://api.bizcare-einvoice.com/api/consolidated-invoices/1',
{ headers: { 'X-API-Key': 'your-api-key-here' } }
);Python
response = requests.get(
'https://api.bizcare-einvoice.com/api/consolidated-invoices/1',
headers={'X-API-Key': 'your-api-key-here'},
)PHP
$response = Http::withHeaders([
'X-API-Key' => 'your-api-key-here',
])->get('https://api.bizcare-einvoice.com/api/consolidated-invoices/1');Export Consolidated Invoice
Export a single consolidated invoice's data as a downloadable JSON file, including the codes of all linked invoices.
Endpoint
GET /api/consolidated-invoices/:id/exportHeaders
| Header | Value |
|---|---|
X-API-Key | Your API key |
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | integer | Consolidated invoice ID |
Response
The response is returned as a downloadable JSON file with Content-Disposition: attachment header.
{
"invoiceCodeWithPrefixAndDigits": "CINV-0001",
"invoiceCode": "1",
"buyer": { "...": "..." },
"supplier": { "...": "..." },
"lineItems": [ "..." ],
"invoiceDateTime": "2025-09-01T00:00:00.000Z",
"invoiceLevelAllowanceCharge": null,
"invoiceCodesIncluded": ["INV-0001", "INV-0002", "INV-0003"],
"createdAt": "2025-09-01T00:00:00.000+00:00"
}| Field | Type | Description |
|---|---|---|
invoiceCodeWithPrefixAndDigits | string | Full consolidated invoice code with prefix |
invoiceCode | string | Raw invoice code number |
buyer | object | Buyer information |
supplier | object | Supplier information |
lineItems | array | Array of line items |
invoiceDateTime | string | Invoice issue date and time (ISO 8601) |
invoiceLevelAllowanceCharge | object|null | Invoice-level discounts or charges |
invoiceCodesIncluded | string[] | Array of linked invoice codes with prefix |
createdAt | string | Record creation timestamp (ISO 8601) |
Code Examples
cURL
curl -X GET https://api.bizcare-einvoice.com/api/consolidated-invoices/1/export \
-H "X-API-Key: your-api-key-here" \
-o consolidated-invoice-export.jsonJavaScript
const response = await fetch(
'https://api.bizcare-einvoice.com/api/consolidated-invoices/1/export',
{ headers: { 'X-API-Key': 'your-api-key-here' } }
);
const data = await response.json();Python
response = requests.get(
'https://api.bizcare-einvoice.com/api/consolidated-invoices/1/export',
headers={'X-API-Key': 'your-api-key-here'},
)PHP
$response = Http::withHeaders([
'X-API-Key' => 'your-api-key-here',
])->get('https://api.bizcare-einvoice.com/api/consolidated-invoices/1/export');Export All Consolidated Invoices
Export all consolidated invoices for the authenticated company as a downloadable JSON file. No pagination — returns the full dataset.
Endpoint
GET /api/consolidated-invoices/export-allHeaders
| Header | Value |
|---|---|
X-API-Key | Your API key |
Response
The response is returned as a downloadable JSON file with Content-Disposition: attachment header. Contains an array of consolidated invoice export objects.
[
{
"invoiceCodeWithPrefixAndDigits": "CINV-0001",
"invoiceCode": "1",
"buyer": { "...": "..." },
"supplier": { "...": "..." },
"lineItems": [ "..." ],
"invoiceDateTime": "2025-09-01T00:00:00.000Z",
"invoiceLevelAllowanceCharge": null,
"invoiceCodesIncluded": ["INV-0001", "INV-0002"],
"createdAt": "2025-09-01T00:00:00.000+00:00"
}
]See Export Consolidated Invoice for field descriptions.
Code Examples
cURL
curl -X GET https://api.bizcare-einvoice.com/api/consolidated-invoices/export-all \
-H "X-API-Key: your-api-key-here" \
-o all-consolidated-invoices-export.jsonJavaScript
const response = await fetch(
'https://api.bizcare-einvoice.com/api/consolidated-invoices/export-all',
{ headers: { 'X-API-Key': 'your-api-key-here' } }
);
const data = await response.json();Python
response = requests.get(
'https://api.bizcare-einvoice.com/api/consolidated-invoices/export-all',
headers={'X-API-Key': 'your-api-key-here'},
)PHP
$response = Http::withHeaders([
'X-API-Key' => 'your-api-key-here',
])->get('https://api.bizcare-einvoice.com/api/consolidated-invoices/export-all');Create Adjustment Note for Consolidated Invoice
Create a credit note, debit note, or refund note linked to a consolidated invoice. The consolidated invoice must have a valid submitted document.
Endpoint
POST /api/consolidated-invoices/:id/adjustment-noteHeaders
| Header | Value |
|---|---|
X-API-Key | Your API key |
Content-Type | application/json |
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | integer | Consolidated invoice ID |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
targetInvoiceType | string | Yes | Type of target invoice (e.g., CONSOLIDATED_INVOICE) |
type | string | Yes | CREDIT_NOTE, DEBIT_NOTE, or REFUND_NOTE |
adjustmentNoteCode | number | Yes | Unique adjustment note code |
adjustmentNoteIssueDate | string | Yes | ISO 8601 datetime |
lineItems | array | Yes | Array of line items |
Response
{
"success": true,
"message": "Successfully created adjustment note"
}Error Responses
| Status | Message |
|---|---|
403 | "The invoice has not been submitted." |
403 | "The invoice has been submitted but not yet being validated by LHDN or latest submission result status is not valid." |
Code Examples
cURL
curl -X POST https://api.bizcare-einvoice.com/api/consolidated-invoices/1/adjustment-note \
-H "X-API-Key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"targetInvoiceType": "CONSOLIDATED_INVOICE",
"type": "CREDIT_NOTE",
"adjustmentNoteCode": 456,
"adjustmentNoteIssueDate": "2025-09-15T00:00:00.000Z",
"lineItems": [
{
"id": "item-1",
"classifications": ["001"],
"description": "Consolidated adjustment",
"unit": { "price": 50, "count": 1, "code": "EA" },
"taxDetails": [
{ "taxType": "01", "taxRate": { "percentage": 6 } }
],
"originCountry": "MYS"
}
]
}'JavaScript
const response = await fetch(
'https://api.bizcare-einvoice.com/api/consolidated-invoices/1/adjustment-note',
{
method: 'POST',
headers: {
'X-API-Key': 'your-api-key-here',
'Content-Type': 'application/json',
},
body: JSON.stringify({
targetInvoiceType: 'CONSOLIDATED_INVOICE',
type: 'CREDIT_NOTE',
adjustmentNoteCode: 456,
adjustmentNoteIssueDate: '2025-09-15T00:00:00.000Z',
lineItems: [
{
id: 'item-1',
classifications: ['001'],
description: 'Consolidated adjustment',
unit: { price: 50, count: 1, code: 'EA' },
taxDetails: [{ taxType: '01', taxRate: { percentage: 6 } }],
originCountry: 'MYS',
},
],
}),
}
);Python
response = requests.post(
'https://api.bizcare-einvoice.com/api/consolidated-invoices/1/adjustment-note',
headers={'X-API-Key': 'your-api-key-here'},
json={
'targetInvoiceType': 'CONSOLIDATED_INVOICE',
'type': 'CREDIT_NOTE',
'adjustmentNoteCode': 456,
'adjustmentNoteIssueDate': '2025-09-15T00:00:00.000Z',
'lineItems': [
{
'id': 'item-1',
'classifications': ['001'],
'description': 'Consolidated adjustment',
'unit': {'price': 50, 'count': 1, 'code': 'EA'},
'taxDetails': [{'taxType': '01', 'taxRate': {'percentage': 6}}],
'originCountry': 'MYS',
}
],
},
)PHP
$response = Http::withHeaders([
'X-API-Key' => 'your-api-key-here',
])->post('https://api.bizcare-einvoice.com/api/consolidated-invoices/1/adjustment-note', [
'targetInvoiceType' => 'CONSOLIDATED_INVOICE',
'type' => 'CREDIT_NOTE',
'adjustmentNoteCode' => 456,
'adjustmentNoteIssueDate' => '2025-09-15T00:00:00.000Z',
'lineItems' => [
[
'id' => 'item-1',
'classifications' => ['001'],
'description' => 'Consolidated adjustment',
'unit' => ['price' => 50, 'count' => 1, 'code' => 'EA'],
'taxDetails' => [['taxType' => '01', 'taxRate' => ['percentage' => 6]]],
'originCountry' => 'MYS',
],
],
]);