API Reference
E-Invoice Requests
API endpoints for managing e-invoice requests
E-Invoice Requests API
Create, retrieve, update, and delete e-invoice requests. These represent requests for e-invoices that go through an approval workflow (Pending → Approve / Reject).
List E-Invoice Requests
Endpoint
GET /api/einvoice-requestsHeaders
| 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": 2,
"per_page": 10,
"current_page": 1,
"last_page": 1
},
"data": [
{
"id": 1,
"company_id": 2,
"invoice_code": "INV-001",
"document_details": {
"buyer": { "...": "..." },
"supplier": { "...": "..." },
"invoice_code": "INV-001"
},
"status": "Pending",
"created_at": "2025-10-01T00:00:00.000+00:00",
"updated_at": "2025-10-01T00:00:00.000+00:00"
}
]
}Code Examples
cURL
curl -X GET "https://api.bizcare-einvoice.com/api/einvoice-requests?page=1&per_page=10" \
-H "X-API-Key: your-api-key-here"JavaScript
const response = await fetch(
'https://api.bizcare-einvoice.com/api/einvoice-requests?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/einvoice-requests',
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/einvoice-requests', [
'page' => 1,
'per_page' => 10,
]);Get E-Invoice Request
Endpoint
GET /api/einvoice-requests/:idHeaders
| Header | Value |
|---|---|
X-API-Key | Your API key |
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | integer | E-invoice request ID |
Response
Returns a single EinvoiceRequest object.
Code Examples
cURL
curl -X GET https://api.bizcare-einvoice.com/api/einvoice-requests/1 \
-H "X-API-Key: your-api-key-here"JavaScript
const response = await fetch(
'https://api.bizcare-einvoice.com/api/einvoice-requests/1',
{ headers: { 'X-API-Key': 'your-api-key-here' } }
);Python
response = requests.get(
'https://api.bizcare-einvoice.com/api/einvoice-requests/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/einvoice-requests/1');Create E-Invoice Request
Endpoint
POST /api/einvoice-requestsHeaders
| Header | Value |
|---|---|
X-API-Key | Your API key |
Content-Type | application/json |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
invoiceCode | string | Yes | Invoice code for the request |
type | string | Yes | Party type (e.g., LOCAL_INDIVIDUAL) |
name | string | Yes | Buyer name |
tin | string | No | Tax identification number |
registration | object | No | Registration details |
registration.type | string | No | NRIC, BRN, PASSPORT, or ARMY |
registration.number | string | No | Registration number |
contactNumber | string | No | Contact phone number |
email | string | No | Email address |
address | object | No | Address details |
address.line1 | string | No | Address line 1 |
address.city | string | No | City |
address.state | string | No | State code |
address.country | string | No | Country code (e.g., MYS) |
address.zipCode | string | No | Postal code |
Response
{
"success": true,
"message": "Created einvoice request successfully"
}Code Examples
cURL
curl -X POST https://api.bizcare-einvoice.com/api/einvoice-requests \
-H "X-API-Key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"invoiceCode": "INV-001",
"type": "LOCAL_INDIVIDUAL",
"name": "John Doe",
"tin": "IG40023601100",
"registration": {
"type": "NRIC",
"number": "930723075219"
},
"contactNumber": "012345678",
"email": "john@example.com",
"address": {
"line1": "34a, Jalan ABC 123",
"city": "Bayan Lepas",
"state": "07",
"country": "MYS",
"zipCode": "11900"
}
}'JavaScript
const response = await fetch('https://api.bizcare-einvoice.com/api/einvoice-requests', {
method: 'POST',
headers: {
'X-API-Key': 'your-api-key-here',
'Content-Type': 'application/json',
},
body: JSON.stringify({
invoiceCode: 'INV-001',
type: 'LOCAL_INDIVIDUAL',
name: 'John Doe',
tin: 'IG40023601100',
registration: { type: 'NRIC', number: '930723075219' },
contactNumber: '012345678',
email: 'john@example.com',
address: {
line1: '34a, Jalan ABC 123',
city: 'Bayan Lepas',
state: '07',
country: 'MYS',
zipCode: '11900',
},
}),
});Python
response = requests.post(
'https://api.bizcare-einvoice.com/api/einvoice-requests',
headers={'X-API-Key': 'your-api-key-here'},
json={
'invoiceCode': 'INV-001',
'type': 'LOCAL_INDIVIDUAL',
'name': 'John Doe',
'tin': 'IG40023601100',
'registration': {'type': 'NRIC', 'number': '930723075219'},
'contactNumber': '012345678',
'email': 'john@example.com',
'address': {
'line1': '34a, Jalan ABC 123',
'city': 'Bayan Lepas',
'state': '07',
'country': 'MYS',
'zipCode': '11900',
},
},
)PHP
$response = Http::withHeaders([
'X-API-Key' => 'your-api-key-here',
])->post('https://api.bizcare-einvoice.com/api/einvoice-requests', [
'invoiceCode' => 'INV-001',
'type' => 'LOCAL_INDIVIDUAL',
'name' => 'John Doe',
'tin' => 'IG40023601100',
'registration' => ['type' => 'NRIC', 'number' => '930723075219'],
'contactNumber' => '012345678',
'email' => 'john@example.com',
'address' => [
'line1' => '34a, Jalan ABC 123',
'city' => 'Bayan Lepas',
'state' => '07',
'country' => 'MYS',
'zipCode' => '11900',
],
]);Update E-Invoice Request
Endpoint
PUT /api/einvoice-requests/:idHeaders
| Header | Value |
|---|---|
X-API-Key | Your API key |
Content-Type | application/json |
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | integer | E-invoice request ID |
Request Body
All fields from Create E-Invoice Request are accepted. Additionally:
| Field | Type | Required | Description |
|---|---|---|---|
status | string | No | Pending, Approve, or Reject |
Response
{
"success": true,
"message": "Update einvoice request successfully"
}Code Examples
cURL
curl -X PUT https://api.bizcare-einvoice.com/api/einvoice-requests/1 \
-H "X-API-Key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{ "status": "Approve" }'JavaScript
const response = await fetch('https://api.bizcare-einvoice.com/api/einvoice-requests/1', {
method: 'PUT',
headers: {
'X-API-Key': 'your-api-key-here',
'Content-Type': 'application/json',
},
body: JSON.stringify({ status: 'Approve' }),
});Python
response = requests.put(
'https://api.bizcare-einvoice.com/api/einvoice-requests/1',
headers={'X-API-Key': 'your-api-key-here'},
json={'status': 'Approve'},
)PHP
$response = Http::withHeaders([
'X-API-Key' => 'your-api-key-here',
])->put('https://api.bizcare-einvoice.com/api/einvoice-requests/1', [
'status' => 'Approve',
]);Delete E-Invoice Request
Endpoint
DELETE /api/einvoice-requests/:idHeaders
| Header | Value |
|---|---|
X-API-Key | Your API key |
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | integer | E-invoice request ID |
Response
{
"success": true,
"message": "Deleted einvoice request successfully"
}Code Examples
cURL
curl -X DELETE https://api.bizcare-einvoice.com/api/einvoice-requests/1 \
-H "X-API-Key: your-api-key-here"JavaScript
const response = await fetch('https://api.bizcare-einvoice.com/api/einvoice-requests/1', {
method: 'DELETE',
headers: { 'X-API-Key': 'your-api-key-here' },
});Python
response = requests.delete(
'https://api.bizcare-einvoice.com/api/einvoice-requests/1',
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/einvoice-requests/1');