Appearance
API Reference
Complete reference for the InvoisX API.
Base URL
https://invoisx.com/api/v1For testing, use:
https://sandbox.invoisx.com/api/v1Interactive Documentation
For interactive API testing and detailed endpoint specifications, visit our API Playground.
The playground lets you:
- Test endpoints with your API token
- View request/response schemas
- Try different parameters
- See real-time responses
Authentication
All requests require a Bearer token:
Authorization: Bearer your-api-tokenSee Authentication Guide for details.
Response Format
All responses follow this structure:
Success Response
json
{
"success": true,
"data": {
// Response data
}
}List Response
json
{
"success": true,
"data": [
// Array of items
],
"links": {
"first": "https://invoisx.com/api/v1/invoices?page=1",
"last": "https://invoisx.com/api/v1/invoices?page=10",
"prev": null,
"next": "https://invoisx.com/api/v1/invoices?page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 10,
"per_page": 15,
"to": 15,
"total": 150
}
}Error Response
json
{
"success": false,
"message": "Error description",
"error_code": "ERROR_CODE",
"errors": {
// Field-specific errors (for validation)
}
}Quick Links
- Endpoints - All API endpoints
- Error Codes - Error handling
- Rate Limits - Usage limits
Resource Endpoints
Buyers
| Method | Endpoint | Description |
|---|---|---|
| GET | /buyers | List all buyers |
| POST | /buyers | Create a buyer |
| GET | /buyers/{id} | Get a buyer |
| PUT | /buyers/{id} | Update a buyer |
| DELETE | /buyers/{id} | Delete a buyer |
On-Behalf Sellers
| Method | Endpoint | Description |
|---|---|---|
| GET | /on-behalf-sellers | List all sellers |
| POST | /on-behalf-sellers | Create a seller |
| GET | /on-behalf-sellers/{id} | Get a seller |
| PUT | /on-behalf-sellers/{id} | Update a seller |
| DELETE | /on-behalf-sellers/{id} | Delete a seller |
Invoices
| Method | Endpoint | Description |
|---|---|---|
| GET | /invoices | List all invoices |
| POST | /invoices | Create an invoice |
| GET | /invoices/{id} | Get an invoice |
| PUT | /invoices/{id} | Update an invoice |
| DELETE | /invoices/{id} | Delete an invoice |
Other Document Types
Same CRUD endpoints for:
/credit-notes/debit-notes/refund-notes/consolidated-invoices/self-billed-invoices/self-billed-credit-notes/self-billed-debit-notes/self-billed-refund-notes
Document Operations
| Method | Endpoint | Description |
|---|---|---|
| POST | /documents/{id}/validate | Validate a document |
| POST | /documents/{id}/submit | Submit to LHDN |
| GET | /documents/{id}/status | Check LHDN status |
| GET | /documents/{id}/qr | Get QR code |
| GET | /documents/{id}/pdf | Get PDF |
| POST | /documents/submit-bulk | Bulk submit |
Reference Data
| Method | Endpoint | Description |
|---|---|---|
| GET | /states | Malaysian state codes |
| GET | /countries | Country codes |
| GET | /classifications | Product classifications |
| GET | /unit-types | Unit of measurement |
| GET | /tax-types | Tax type codes |
| GET | /currencies | Currency codes |
| GET | /payment-modes | Payment method codes |
| GET | /id-types | ID type codes |
Next Steps
- Endpoints - Detailed endpoint documentation
- Error Codes - Error handling
- Rate Limits - Usage limits
