BizCARE MyInvois
API Reference

Invoices

API endpoints for managing invoices

Invoices API

Create, retrieve, update, delete, submit, and cancel invoices in the e-invoicing system.


Create Invoice

Endpoint

POST /api/invoices

Headers

HeaderValue
X-API-KeyYour API key
Content-Typeapplication/json

Request Body

FieldTypeRequiredDescription
typestringYesINVOICE, SELF_BILLED_INVOICE, PENDING_FINALIZE_INVOICE, or PENDING_FINALIZE_SELF_BILLED_INVOICE
codenumberYesInvoice code (must be unique for the year)
issueDateTimestringYesISO 8601 datetime
buyerobjectConditionalBuyer info (required for INVOICE type). See Buyer model
supplierobjectConditionalSupplier info (required for SELF_BILLED_INVOICE type). See Supplier model
lineItemsarrayYesArray of line items. See LineItem model
submitImmediatelybooleanNoSubmit to MyInvois immediately after creation
isReadybooleanNoMark as ready for submission

Response

{
  "success": true,
  "message": "Created successfully",
  "data": {
    "id": 38
  }
}

Code Examples

cURL

curl -X POST https://api.bizcare-einvoice.com/api/invoices \
  -H "X-API-Key: your-api-key-here" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "INVOICE",
    "code": 6,
    "issueDateTime": "2025-07-15T14:41:23.000Z",
    "isReady": true,
    "buyer": {
      "type": "LOCAL_INDIVIDUAL",
      "name": "John Doe",
      "registration": {
        "type": "NRIC",
        "number": "930723075219"
      },
      "contactNumber": "016-8985360",
      "address": {
        "line1": "34a, Jalan ABC 123",
        "city": "Bukit Jalil",
        "state": "14",
        "zipCode": "56420",
        "country": "MYS"
      }
    },
    "lineItems": [
      {
        "id": "item-1",
        "description": "Product A",
        "classifications": ["007"],
        "unit": { "code": "EA", "price": 88.88, "count": 1 },
        "taxDetails": [
          { "taxType": "01", "taxRate": { "percentage": 10 } }
        ],
        "originCountry": "MYS"
      }
    ]
  }'

JavaScript

const response = await fetch('https://api.bizcare-einvoice.com/api/invoices', {
  method: 'POST',
  headers: {
    'X-API-Key': 'your-api-key-here',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    type: 'INVOICE',
    code: 6,
    issueDateTime: '2025-07-15T14:41:23.000Z',
    isReady: true,
    buyer: {
      type: 'LOCAL_INDIVIDUAL',
      name: 'John Doe',
      registration: { type: 'NRIC', number: '930723075219' },
      contactNumber: '016-8985360',
      address: {
        line1: '34a, Jalan ABC 123',
        city: 'Bukit Jalil',
        state: '14',
        zipCode: '56420',
        country: 'MYS',
      },
    },
    lineItems: [
      {
        id: 'item-1',
        description: 'Product A',
        classifications: ['007'],
        unit: { code: 'EA', price: 88.88, count: 1 },
        taxDetails: [{ taxType: '01', taxRate: { percentage: 10 } }],
        originCountry: 'MYS',
      },
    ],
  }),
});
const data = await response.json();

Python

import requests

response = requests.post(
    'https://api.bizcare-einvoice.com/api/invoices',
    headers={
        'X-API-Key': 'your-api-key-here',
        'Content-Type': 'application/json',
    },
    json={
        'type': 'INVOICE',
        'code': 6,
        'issueDateTime': '2025-07-15T14:41:23.000Z',
        'isReady': True,
        'buyer': {
            'type': 'LOCAL_INDIVIDUAL',
            'name': 'John Doe',
            'registration': {'type': 'NRIC', 'number': '930723075219'},
            'contactNumber': '016-8985360',
            'address': {
                'line1': '34a, Jalan ABC 123',
                'city': 'Bukit Jalil',
                'state': '14',
                'zipCode': '56420',
                'country': 'MYS',
            },
        },
        'lineItems': [
            {
                'id': 'item-1',
                'description': 'Product A',
                'classifications': ['007'],
                'unit': {'code': 'EA', 'price': 88.88, 'count': 1},
                'taxDetails': [{'taxType': '01', 'taxRate': {'percentage': 10}}],
                'originCountry': 'MYS',
            }
        ],
    },
)
data = response.json()

PHP

$response = Http::withHeaders([
    'X-API-Key' => 'your-api-key-here',
])->post('https://api.bizcare-einvoice.com/api/invoices', [
    'type' => 'INVOICE',
    'code' => 6,
    'issueDateTime' => '2025-07-15T14:41:23.000Z',
    'isReady' => true,
    'buyer' => [
        'type' => 'LOCAL_INDIVIDUAL',
        'name' => 'John Doe',
        'registration' => ['type' => 'NRIC', 'number' => '930723075219'],
        'contactNumber' => '016-8985360',
        'address' => [
            'line1' => '34a, Jalan ABC 123',
            'city' => 'Bukit Jalil',
            'state' => '14',
            'zipCode' => '56420',
            'country' => 'MYS',
        ],
    ],
    'lineItems' => [
        [
            'id' => 'item-1',
            'description' => 'Product A',
            'classifications' => ['007'],
            'unit' => ['code' => 'EA', 'price' => 88.88, 'count' => 1],
            'taxDetails' => [['taxType' => '01', 'taxRate' => ['percentage' => 10]]],
            'originCountry' => 'MYS',
        ],
    ],
]);
$data = $response->json();

List Invoices

Endpoint

GET /api/invoices

Headers

HeaderValue
X-API-KeyYour API key

Query Parameters

ParameterTypeDefaultDescription
pagenumber1Page number
per_pagenumber10Items per page

Response

{
  "meta": {
    "total": 7,
    "per_page": 10,
    "current_page": 1,
    "last_page": 1,
    "first_page": 1,
    "first_page_url": "/?page=1",
    "last_page_url": "/?page=1",
    "next_page_url": null,
    "previous_page_url": null
  },
  "data": [
    {
      "id": 71,
      "company_id": 2,
      "is_submitted_to_lhdn": false,
      "is_ready": false,
      "invoice_code": "7",
      "type": "INVOICE",
      "buyer": { "..." : "..." },
      "line_items": [ "..." ],
      "final_adjusted_amount": 11,
      "status": "Draft",
      "legal_monetary_total": {
        "excludingTax": 10,
        "includingTax": 11,
        "payableAmount": 11,
        "netAmount": 10
      },
      "created_at": "2025-09-22T05:32:19.534+00:00",
      "updated_at": "2025-09-22T05:55:37.798+00:00"
    }
  ]
}

Code Examples

cURL

curl -X GET "https://api.bizcare-einvoice.com/api/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/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/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/invoices', [
    'page' => 1,
    'per_page' => 10,
]);

Get Invoice

Endpoint

GET /api/invoices/:id

Headers

HeaderValue
X-API-KeyYour API key

Path Parameters

ParameterTypeDescription
idintegerInvoice ID

Response

Returns a single invoice object (same structure as items in the list response).

Code Examples

cURL

curl -X GET https://api.bizcare-einvoice.com/api/invoices/71 \
  -H "X-API-Key: your-api-key-here"

JavaScript

const response = await fetch('https://api.bizcare-einvoice.com/api/invoices/71', {
  headers: { 'X-API-Key': 'your-api-key-here' },
});

Python

response = requests.get(
    'https://api.bizcare-einvoice.com/api/invoices/71',
    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/invoices/71');

Update Invoice

Endpoint

PUT /api/invoices/:id

Headers

HeaderValue
X-API-KeyYour API key
Content-Typeapplication/json

Path Parameters

ParameterTypeDescription
idintegerInvoice ID

Request Body

Same structure as Create Invoice. All fields are optional — only include fields you want to update.

Response

{
  "success": true,
  "message": "Updated successfully"
}

Code Examples

cURL

curl -X PUT https://api.bizcare-einvoice.com/api/invoices/71 \
  -H "X-API-Key: your-api-key-here" \
  -H "Content-Type: application/json" \
  -d '{
    "isReady": true,
    "buyer": {
      "name": "Updated Buyer Name",
      "type": "LOCAL_INDIVIDUAL",
      "registration": { "type": "NRIC", "number": "930723075219" },
      "contactNumber": "016-8985360",
      "address": {
        "line1": "34a, Jalan ABC 123",
        "city": "George Town",
        "state": "09",
        "zipCode": "10000",
        "country": "MYS"
      }
    }
  }'

JavaScript

const response = await fetch('https://api.bizcare-einvoice.com/api/invoices/71', {
  method: 'PUT',
  headers: {
    'X-API-Key': 'your-api-key-here',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ isReady: true }),
});

Python

response = requests.put(
    'https://api.bizcare-einvoice.com/api/invoices/71',
    headers={'X-API-Key': 'your-api-key-here'},
    json={'isReady': True},
)

PHP

$response = Http::withHeaders([
    'X-API-Key' => 'your-api-key-here',
])->put('https://api.bizcare-einvoice.com/api/invoices/71', [
    'isReady' => true,
]);

Delete Invoice

Endpoint

DELETE /api/invoices/:id

Headers

HeaderValue
X-API-KeyYour API key

Path Parameters

ParameterTypeDescription
idintegerInvoice ID

Response

{
  "success": true,
  "message": "Invoice deleted successfully"
}

Error Responses

StatusMessage
403"A submitted invoice cannot be deleted, please cancel first and try again. A submitted document can only be cancelled within 72 hours after submission"

Code Examples

cURL

curl -X DELETE https://api.bizcare-einvoice.com/api/invoices/71 \
  -H "X-API-Key: your-api-key-here"

JavaScript

const response = await fetch('https://api.bizcare-einvoice.com/api/invoices/71', {
  method: 'DELETE',
  headers: { 'X-API-Key': 'your-api-key-here' },
});

Python

response = requests.delete(
    'https://api.bizcare-einvoice.com/api/invoices/71',
    headers={'X-API-Key': 'your-api-key-here'},
)

PHP

$response = Http::withHeaders([
    'X-API-Key' => 'your-api-key-here',
])->delete('https://api.bizcare-einvoice.com/api/invoices/71');

Submit Invoice to MyInvois

Submit an invoice to LHDN's MyInvois system for validation and processing.

Endpoint

POST /api/invoices/:id/submit-to-myinvois

Headers

HeaderValue
X-API-KeyYour API key

Path Parameters

ParameterTypeDescription
idintegerInvoice ID

Request Body

Empty JSON object: {}

Response

{
  "success": true,
  "message": "Submitted successfully"
}

Error Responses

StatusMessage
400"Failed to submit, please try again"

Code Examples

cURL

curl -X POST https://api.bizcare-einvoice.com/api/invoices/71/submit-to-myinvois \
  -H "X-API-Key: your-api-key-here" \
  -H "Content-Type: application/json" \
  -d '{}'

JavaScript

const response = await fetch(
  'https://api.bizcare-einvoice.com/api/invoices/71/submit-to-myinvois',
  {
    method: 'POST',
    headers: {
      'X-API-Key': 'your-api-key-here',
      'Content-Type': 'application/json',
    },
    body: '{}',
  }
);

Python

response = requests.post(
    'https://api.bizcare-einvoice.com/api/invoices/71/submit-to-myinvois',
    headers={'X-API-Key': 'your-api-key-here'},
    json={},
)

PHP

$response = Http::withHeaders([
    'X-API-Key' => 'your-api-key-here',
])->post('https://api.bizcare-einvoice.com/api/invoices/71/submit-to-myinvois', []);

Cancel Latest Submitted Document

Cancel the most recent submitted document for an invoice. Must be within 72 hours of submission.

Endpoint

POST /api/invoices/:id/cancel-latest-invoice-submitted

Headers

HeaderValue
X-API-KeyYour API key

Path Parameters

ParameterTypeDescription
idintegerInvoice ID

Response

{
  "success": true,
  "message": "Cancelled submitted document successfully"
}

Error Responses

StatusMessage
403"The invoice does not have any submitted document."
403"The latest submitted document of the invoice has already been cancelled/invali."
403"The latest submitted document of the invoice has been submitted more than 72 hours ago. Submitted documents can only be cancelled within 72 hours."
400"Document status can't be changed after limit time exceeded" (LHDN OperationPeriodOver)
400"Document status has already been rejected or invalid" (LHDN IncorrectState)
400"Document is currently being referenced by another document" (LHDN ActiveReferencingDocuments)
400"Cancellation failed, please try again."

Code Examples

cURL

curl -X POST https://api.bizcare-einvoice.com/api/invoices/71/cancel-latest-invoice-submitted \
  -H "X-API-Key: your-api-key-here"

JavaScript

const response = await fetch(
  'https://api.bizcare-einvoice.com/api/invoices/71/cancel-latest-invoice-submitted',
  {
    method: 'POST',
    headers: { 'X-API-Key': 'your-api-key-here' },
  }
);

Python

response = requests.post(
    'https://api.bizcare-einvoice.com/api/invoices/71/cancel-latest-invoice-submitted',
    headers={'X-API-Key': 'your-api-key-here'},
)

PHP

$response = Http::withHeaders([
    'X-API-Key' => 'your-api-key-here',
])->post('https://api.bizcare-einvoice.com/api/invoices/71/cancel-latest-invoice-submitted');

Create Adjustment Note for Invoice

Create a credit note, debit note, or refund note linked to a specific invoice. The invoice must have a valid submitted document.

Endpoint

POST /api/invoices/:id/adjustment-note

Headers

HeaderValue
X-API-KeyYour API key
Content-Typeapplication/json

Path Parameters

ParameterTypeDescription
idintegerInvoice ID

Request Body

FieldTypeRequiredDescription
targetInvoiceTypestringYesType of target invoice (e.g., INVOICE)
typestringYesCREDIT_NOTE, DEBIT_NOTE, or REFUND_NOTE
adjustmentNoteCodenumberYesUnique adjustment note code
adjustmentNoteIssueDatestringYesISO 8601 datetime
lineItemsarrayYesArray of line items

Response

{
  "success": true,
  "message": "Successfully created adjustment note"
}

Error Responses

StatusMessage
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/invoices/71/adjustment-note \
  -H "X-API-Key: your-api-key-here" \
  -H "Content-Type: application/json" \
  -d '{
    "targetInvoiceType": "INVOICE",
    "type": "CREDIT_NOTE",
    "adjustmentNoteCode": 123,
    "adjustmentNoteIssueDate": "2025-08-01T00:00:00.000Z",
    "lineItems": [
      {
        "id": "item-1",
        "classifications": ["001"],
        "description": "Adjustment for invoice item",
        "unit": { "price": 100, "count": 2, "code": "EA" },
        "taxDetails": [
          { "taxType": "06", "taxRate": { "percentage": 6 } }
        ],
        "originCountry": "MYS"
      }
    ]
  }'

JavaScript

const response = await fetch(
  'https://api.bizcare-einvoice.com/api/invoices/71/adjustment-note',
  {
    method: 'POST',
    headers: {
      'X-API-Key': 'your-api-key-here',
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      targetInvoiceType: 'INVOICE',
      type: 'CREDIT_NOTE',
      adjustmentNoteCode: 123,
      adjustmentNoteIssueDate: '2025-08-01T00:00:00.000Z',
      lineItems: [
        {
          id: 'item-1',
          classifications: ['001'],
          description: 'Adjustment for invoice item',
          unit: { price: 100, count: 2, code: 'EA' },
          taxDetails: [{ taxType: '06', taxRate: { percentage: 6 } }],
          originCountry: 'MYS',
        },
      ],
    }),
  }
);

Python

response = requests.post(
    'https://api.bizcare-einvoice.com/api/invoices/71/adjustment-note',
    headers={'X-API-Key': 'your-api-key-here'},
    json={
        'targetInvoiceType': 'INVOICE',
        'type': 'CREDIT_NOTE',
        'adjustmentNoteCode': 123,
        'adjustmentNoteIssueDate': '2025-08-01T00:00:00.000Z',
        'lineItems': [
            {
                'id': 'item-1',
                'classifications': ['001'],
                'description': 'Adjustment for invoice item',
                'unit': {'price': 100, 'count': 2, 'code': 'EA'},
                'taxDetails': [{'taxType': '06', 'taxRate': {'percentage': 6}}],
                'originCountry': 'MYS',
            }
        ],
    },
)

PHP

$response = Http::withHeaders([
    'X-API-Key' => 'your-api-key-here',
])->post('https://api.bizcare-einvoice.com/api/invoices/71/adjustment-note', [
    'targetInvoiceType' => 'INVOICE',
    'type' => 'CREDIT_NOTE',
    'adjustmentNoteCode' => 123,
    'adjustmentNoteIssueDate' => '2025-08-01T00:00:00.000Z',
    'lineItems' => [
        [
            'id' => 'item-1',
            'classifications' => ['001'],
            'description' => 'Adjustment for invoice item',
            'unit' => ['price' => 100, 'count' => 2, 'code' => 'EA'],
            'taxDetails' => [['taxType' => '06', 'taxRate' => ['percentage' => 6]]],
            'originCountry' => 'MYS',
        ],
    ],
]);

List Invoice Submitted Documents

Retrieve all submitted documents associated with an invoice.

Endpoint

GET /api/invoices/:id/submitted-documents

Headers

HeaderValue
X-API-KeyYour API key

Path Parameters

ParameterTypeDescription
idintegerInvoice ID

Response

Returns an array of SubmittedDocument objects.

Code Examples

cURL

curl -X GET https://api.bizcare-einvoice.com/api/invoices/71/submitted-documents \
  -H "X-API-Key: your-api-key-here"

JavaScript

const response = await fetch(
  'https://api.bizcare-einvoice.com/api/invoices/71/submitted-documents',
  { headers: { 'X-API-Key': 'your-api-key-here' } }
);

Python

response = requests.get(
    'https://api.bizcare-einvoice.com/api/invoices/71/submitted-documents',
    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/invoices/71/submitted-documents');

Export Invoice

Export a single invoice's data as a downloadable JSON file. Useful for data migration or backup.

Endpoint

GET /api/invoices/:id/export

Headers

HeaderValue
X-API-KeyYour API key

Path Parameters

ParameterTypeDescription
idintegerInvoice ID

Response

The response is returned as a downloadable JSON file with Content-Disposition: attachment header.

{
  "invoiceCodeWithPrefixAndDigits": "INV-0007",
  "invoiceCode": "7",
  "buyer": { "...": "..." },
  "supplier": { "...": "..." },
  "lineItems": [ "..." ],
  "invoiceDateTime": "2025-07-15T14:41:23.000Z",
  "invoiceLevelAllowanceCharge": null,
  "consolidatedInvoiceCode": "CINV-0001",
  "createdAt": "2025-09-22T05:32:19.534+00:00"
}
FieldTypeDescription
invoiceCodeWithPrefixAndDigitsstringFull invoice code with prefix (e.g., INV-0007)
invoiceCodestringRaw invoice code number
buyerobjectBuyer information
supplierobjectSupplier information
lineItemsarrayArray of invoice line items
invoiceDateTimestringInvoice issue date and time (ISO 8601)
invoiceLevelAllowanceChargeobject|nullInvoice-level discounts or charges
consolidatedInvoiceCodestring|nullLinked consolidated invoice code, if any
createdAtstringRecord creation timestamp (ISO 8601)

Code Examples

cURL

curl -X GET https://api.bizcare-einvoice.com/api/invoices/71/export \
  -H "X-API-Key: your-api-key-here" \
  -o invoice-export.json

JavaScript

const response = await fetch('https://api.bizcare-einvoice.com/api/invoices/71/export', {
  headers: { 'X-API-Key': 'your-api-key-here' },
});
const data = await response.json();

Python

response = requests.get(
    'https://api.bizcare-einvoice.com/api/invoices/71/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/invoices/71/export');

Export All Invoices

Export all invoices for the authenticated company as a downloadable JSON file. No pagination — returns the full dataset.

Endpoint

GET /api/invoices/export-all

Headers

HeaderValue
X-API-KeyYour API key

Response

The response is returned as a downloadable JSON file with Content-Disposition: attachment header. Contains an array of invoice export objects.

[
  {
    "invoiceCodeWithPrefixAndDigits": "INV-0007",
    "invoiceCode": "7",
    "buyer": { "...": "..." },
    "supplier": { "...": "..." },
    "lineItems": [ "..." ],
    "invoiceDateTime": "2025-07-15T14:41:23.000Z",
    "invoiceLevelAllowanceCharge": null,
    "consolidatedInvoiceCode": null,
    "createdAt": "2025-09-22T05:32:19.534+00:00"
  }
]

See Export Invoice for field descriptions.

Code Examples

cURL

curl -X GET https://api.bizcare-einvoice.com/api/invoices/export-all \
  -H "X-API-Key: your-api-key-here" \
  -o all-invoices-export.json

JavaScript

const response = await fetch('https://api.bizcare-einvoice.com/api/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/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/invoices/export-all');

Get Invoice Submitted Document

Retrieve a specific submitted document for an invoice.

Endpoint

GET /api/invoices/:id/submitted-documents/:submitted_document_id

Headers

HeaderValue
X-API-KeyYour API key

Path Parameters

ParameterTypeDescription
idintegerInvoice ID
submitted_document_idintegerSubmitted document ID

Response

Returns a single SubmittedDocument object.

Code Examples

cURL

curl -X GET https://api.bizcare-einvoice.com/api/invoices/71/submitted-documents/5 \
  -H "X-API-Key: your-api-key-here"

JavaScript

const response = await fetch(
  'https://api.bizcare-einvoice.com/api/invoices/71/submitted-documents/5',
  { headers: { 'X-API-Key': 'your-api-key-here' } }
);

Python

response = requests.get(
    'https://api.bizcare-einvoice.com/api/invoices/71/submitted-documents/5',
    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/invoices/71/submitted-documents/5');