Lookups API
Serial codes
Resolve a series
GET https://yoursite.ealsuite.com/?app=ealsuite_api/v1/serial-code&type=invoice
- cURL
- JavaScript
curl -X GET 'https://yoursite.ealsuite.com/?app=ealsuite_api/v1/serial-code&type=invoice' \
-H 'Authorization: Bearer <personal_access_token>' \
-H 'SelectedBranchId: <numeric_branch_id>'
const response = await fetch("https://yoursite.ealsuite.com/?app=ealsuite_api/v1/serial-code&type=invoice", {
method: "GET",
headers: {
Authorization: "Bearer <personal_access_token>",
SelectedBranchId: "<numeric_branch_id>",
},
});
const data = await response.json();
console.log(data);
Returns the numbering series the user can use, and the next code of the default series. The first series the user can access is the default. next_code padding follows the branch number format.
Query
| Parameter | Required | Type | Description |
|---|---|---|---|
type | Yes | string | invoice, sales_order, quote, purchase_bill, payment, transfer, expense, income, journal, or credit_note |
Example response
{
"success": true,
"message": "Series resolved successfully",
"result": {
"serial_code_id": 1,
"next_code": "INV0001",
"prefix": "INV",
"suffix": 1,
"is_user_assigned": true,
"available_series": [
{
"serial_code_id": 1,
"prefix": "INV",
"suffix": 1,
"next_code": "INV0001"
}
]
}
}
Cheques
List unused cheques
GET https://yoursite.ealsuite.com/?app=ealsuite_api/v1/cheques/{account_id}
- cURL
- JavaScript
curl -X GET 'https://yoursite.ealsuite.com/?app=ealsuite_api/v1/cheques/{account_id}' \
-H 'Authorization: Bearer <personal_access_token>' \
-H 'SelectedBranchId: <numeric_branch_id>'
const response = await fetch("https://yoursite.ealsuite.com/?app=ealsuite_api/v1/cheques/{account_id}", {
method: "GET",
headers: {
Authorization: "Bearer <personal_access_token>",
SelectedBranchId: "<numeric_branch_id>",
},
});
const data = await response.json();
console.log(data);
Returns unused cheque leaves for a bank account. Call this before a transfer or an expense whose payment method is Cheque. {account_id} is that transfer's from account, or that expense's account, and it must be digits only. The call is denied when that account is outside the user's allowed accounts.
id in each result is the value to send as cheque_id on Create or update a transfer or Create or update an expense. cheque_number and chequebook_no identify the leaf and the cheque book.
Query
| Parameter | Required | Type | Description |
|---|---|---|---|
cheque_id | No | number | Also return this cheque when it is already used, so an existing cheque transfer or expense can still show the leaf it holds |
Omit cheque_id to receive unused leaves only.
Example response
{
"success": true,
"message": "Cheques fetched successfully",
"result": [
{
"id": 10,
"cheque_number": "000123",
"chequebook_no": "BK-1",
"status": "Unused"
}
]
}
Items
Search sellable or purchasable items, then load the price, tax, units, and stock for one item. Both lookup calls take a type of invoice, purchase_bill, purchase_order, sales_order, or quote. Sales orders and quotes use the same sellable items as invoices. Purchase bills and purchase orders use purchasable items and exclude packages. Use supplier_id for purchase_bill and purchase_order. Any other type returns type must be invoice, purchase_bill, purchase_order, sales_order, or quote. Variants, disabled items, and deleted items are excluded. Each search returns at most 50 items. Create a Product or Service with POST /item.
Search items
GET https://yoursite.ealsuite.com/?app=ealsuite_api/v1/items&type=invoice&q=widget
- cURL
- JavaScript
curl -X GET 'https://yoursite.ealsuite.com/?app=ealsuite_api/v1/items&type=invoice&q=widget' \
-H 'Authorization: Bearer <personal_access_token>' \
-H 'SelectedBranchId: <numeric_branch_id>'
const response = await fetch("https://yoursite.ealsuite.com/?app=ealsuite_api/v1/items&type=invoice&q=widget", {
method: "GET",
headers: {
Authorization: "Bearer <personal_access_token>",
SelectedBranchId: "<numeric_branch_id>",
},
});
const data = await response.json();
console.log(data);
Requires inventory view access. Without it the call returns Access denied.
Query
| Parameter | Required | Type | Description |
|---|---|---|---|
type | Yes | string | Scalar invoice, purchase_bill, purchase_order, sales_order, or quote. type[]= is rejected with the same type must be ... error as an unknown value |
q | Effective | string | Search text. An empty search returns [] |
catalog_id | No | number | Limit to a catalogue |
customer_id or supplier_id | No | number | Resolve the catalogue from the contact. Use customer_id for invoice, sales_order, and quote. Use supplier_id for purchase_bill and purchase_order |
with_stock | No | boolean | Include available in base units for inventory-tracked products; null for other items |
include_images | No | boolean | Set to 1 to include images. Omit it and the response has no images key |
limit | No | integer | Rows to return, 1 to 50. Default 50. A value below 1, above 50, or not an integer returns limit must be an integer between 1 and 50 |
sort_by | No | string | name (default), item_number, sales_price, or cost_price. Price sorting uses the item's own price, not the catalogue price |
sort_order | No | string | asc (default) or desc |
include_custom_fields | No | boolean | Set to 1 to include custom_fields. Omit it and the response has no custom_fields key |
Example response
{
"success": true,
"message": "Items fetched successfully",
"result": [
{
"id": 10,
"name": "Widget",
"item_number": "SKU-1",
"description": "Standard widget",
"sales_price": "25.00"
}
]
}
Each item includes description (plain text, same formatting as Get item details). The price key depends on type. invoice, sales_order, and quote return sales_price. purchase_bill and purchase_order return cost_price. When a catalogue applies, the catalogue price is returned under sales_price. There is no pagination; use limit, sort_by, and a more specific q to narrow results.
custom_fields is present only when include_custom_fields=1. It lists the item's custom fields as label and value, in the order they are configured. Lookup, multiselect lookup, uploader, autogenerate, and formula fields are not included. Items with no custom fields return [].
{
"id": 10,
"name": "Widget",
"item_number": "SKU-1",
"description": "Standard widget",
"sales_price": "25.00",
"custom_fields": [
{ "label": "Colour", "value": "Red" },
{ "label": "Tags", "value": ["new", "sale"] }
]
}
images
images is present only when include_images is set. Each item returns its main image first (is_primary: true), then any image files attached to the item (jpg, jpeg, png, gif, webp, bmp, svg). Other attachments such as PDFs are not included. Items without images return [].
| Field | Description |
|---|---|
name | File name |
url | Presigned S3 GET URL for inline viewing, valid for 6 hours |
is_primary | true for the item's main image |
expires_at | When url stops working (ISO 8601). null if the URL does not expire |
Do not store url permanently. Search again to get fresh URLs after expires_at.
With include_images=1:
{
"id": 10,
"name": "Widget",
"item_number": "SKU-1",
"images": [
{
"name": "widget.jpg",
"url": "https://...presigned-s3-get-url...",
"is_primary": true,
"expires_at": "2026-10-19T13:40:52+04:00"
},
{
"name": "widget-side.png",
"url": "https://...presigned-s3-get-url...",
"is_primary": false,
"expires_at": "2026-10-19T13:40:52+04:00"
}
]
}
With with_stock=1:
{
"id": 10,
"name": "Widget",
"item_number": "SKU-1",
"available": "12.00"
}
Get item details
GET https://yoursite.ealsuite.com/?app=ealsuite_api/v1/items/{id}&type=invoice
- cURL
- JavaScript
curl -X GET 'https://yoursite.ealsuite.com/?app=ealsuite_api/v1/items/{id}&type=invoice' \
-H 'Authorization: Bearer <personal_access_token>' \
-H 'SelectedBranchId: <numeric_branch_id>'
const response = await fetch("https://yoursite.ealsuite.com/?app=ealsuite_api/v1/items/{id}&type=invoice", {
method: "GET",
headers: {
Authorization: "Bearer <personal_access_token>",
SelectedBranchId: "<numeric_branch_id>",
},
});
const data = await response.json();
console.log(data);
Requires inventory view access. Without it the call returns Access denied.
Query
| Parameter | Required | Type | Description |
|---|---|---|---|
type | Yes | string | invoice, purchase_bill, purchase_order, sales_order, or quote |
catalog_id | No | number | Catalogue filter |
customer_id or supplier_id | No | number | Resolve the catalogue from the contact. Use customer_id for invoice, sales_order, and quote. Use supplier_id for purchase_bill and purchase_order |
bill_id | No | number | Exclude this bill's batches from available stock. Ignored for quote, which does not move batches |
stock_date | No | string | Stock date |
show_commited_stock | No | string | 1, true, or yes adds committed_stock |
include_images | No | boolean | Set to 1 to add images. Omit it and the response has no images key. The array matches Search items |
last_sales_price_by_customer | No | boolean | Set to 1 to add last_sales_price_for_customer. Requires customer_id. Only valid for invoice, sales_order, and quote |
Price is the catalogue sales price when a catalogue applies, otherwise the item or default-unit sales price. It does not use the branch last-invoice sales settings. The response also includes tax group fields, accounts, description, inventory flags, and default units. When include_images is set, images is added. See the images notes under Search items.
When show_commited_stock is set, committed_stock is a string: open sales-order quantity minus converted quantity. It is "0" when sales orders are disabled or the item is not a tracked product. The field is omitted when the parameter is absent. available does not change.
When last_sales_price_by_customer is set, last_sales_price_for_customer is the latest invoice unit price for that customer_id and item (default sales unit when the item has one). It is a string, or null when that customer has no matching invoice line. The field is omitted when the parameter is absent. Branch last-invoice checkboxes do not affect this field. A purchase type returns last_sales_price_by_customer is only valid for invoice, sales_order, or quote. A missing customer_id returns customer_id is required when last_sales_price_by_customer is set.
Example response
{
"success": true,
"message": "Item details fetched successfully",
"result": {
"id": 10,
"item_number": "SKU-1",
"name": "Widget",
"price": "100.00",
"tax_id": 1,
"taxrate": "5",
"taxname": "VAT 5%",
"available": "12.00",
"units": [
{
"id": 5,
"name": "Pcs",
"conversion_factor": 1,
"price": "100.00",
"is_base": true,
"is_default": true
}
]
}
}
Create an item
POST https://yoursite.ealsuite.com/?app=ealsuite_api/v1/item
- cURL
- JavaScript
curl -X POST 'https://yoursite.ealsuite.com/?app=ealsuite_api/v1/item' \
-H 'Authorization: Bearer <personal_access_token>' \
-H 'SelectedBranchId: <numeric_branch_id>' \
-H 'Content-Type: application/json' \
-d '{
"name": "Widget",
"item_type": "Product",
"item_code_type": "custom",
"item_number": "SKU-1",
"secondary_name": "",
"description": "API created widget",
"unit": "Pcs",
"tax_id": 1,
"tax_code": "9983",
"sales_price": 100,
"cost_price": 60,
"sales_price_type": "Amount",
"sales_price_percentage": 0,
"sales_account": 10,
"purchase_account": 20,
"credit_note_account": 10,
"debit_note_account": 20,
"sellable": true,
"purchasable": true,
"in_manufacturing": false,
"track_inventory": "FIFO",
"opening_stock": 10,
"opening_stock_value": 600,
"warehouse_id": 1,
"inventory_alert": 2,
"enable_minimum_sales_price": false,
"minimum_sales_price": 0,
"minimum_sales_price_tax_included": false,
"items_offers": 0,
"items_294": "Batch A",
"item_group_ids": [1],
"item_expenses": [
{
"account_id": 2,
"category_id": 4,
"amount": 1000,
"auto_create": false
}
]
}'
const response = await fetch("https://yoursite.ealsuite.com/?app=ealsuite_api/v1/item", {
method: "POST",
headers: {
Authorization: "Bearer <personal_access_token>",
SelectedBranchId: "<numeric_branch_id>",
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "Widget",
"item_type": "Product",
"item_code_type": "custom",
"item_number": "SKU-1",
"secondary_name": "",
"description": "API created widget",
"unit": "Pcs",
"tax_id": 1,
"tax_code": "9983",
"sales_price": 100,
"cost_price": 60,
"sales_price_type": "Amount",
"sales_price_percentage": 0,
"sales_account": 10,
"purchase_account": 20,
"credit_note_account": 10,
"debit_note_account": 20,
"sellable": true,
"purchasable": true,
"in_manufacturing": false,
"track_inventory": "FIFO",
"opening_stock": 10,
"opening_stock_value": 600,
"warehouse_id": 1,
"inventory_alert": 2,
"enable_minimum_sales_price": false,
"minimum_sales_price": 0,
"minimum_sales_price_tax_included": false,
"items_offers": 0,
"items_294": "Batch A",
"item_group_ids": [1],
"item_expenses": [
{
"account_id": 2,
"category_id": 4,
"amount": 1000,
"auto_create": false
}
]
}),
});
const data = await response.json();
console.log(data);
Requires permission to create inventory items. A missing role returns Permission Denied. Any field outside the body below returns Unknown field(s): .... A Quill Delta is not accepted; description_quill is an unknown field.
result is the branch item id to send as a bill line id.
Body
| Field | Required | Type | Description |
|---|---|---|---|
name | Yes | string | Item name. Duplicate names return Item name already exists when the branch disallows duplicates |
item_type | No | string | Product or Service. Omit to use the branch default product type |
item_code_type | When the branch item code setting is both | string | series or custom. Omit or send any value when the branch is only series or only custom; the branch setting is used. Empty when both returns Please select Item Code Type |
item_number | No | string | Maximum 100 characters. Ignored when the resolved code type is series (the next series value is stored). Optional for custom. Duplicate codes return Item number already exist. when the branch disallows duplicate item numbers |
secondary_name | No | string | Maximum 200 characters |
description | No | string | Plain text or simple HTML. Stored as the item description. Maximum 65535 characters after formatting |
unit | No | string | Base unit name. Empty is allowed. Creates or links the base unit and sets it as the default sales and purchase unit |
tax_id | No | number | From List tax options taxes[].id. Omit to use the branch default tax. Ignored when the branch tax system is No tax. Invalid id returns tax_id is invalid |
tax_code | No | string | HSN/SAC. Maximum 200 characters |
sales_price | No | number | Default 0. Maximum 99999999999999.99 |
cost_price | No | number | Default 0. Maximum 99999999999999.99. For a Product, cost_price greater than sales_price returns Cost Price is greater than Sales Price |
sales_price_type | No | string | Amount (default) or Percentage of cost |
sales_price_percentage | When sales_price_type is Percentage of cost | number | Percent of cost used to compute sales_price |
sales_account | Yes | number | Leaf account id from List chart of accounts. Types: Sales, Direct Income, Indirect Income, Fixed Asset, Current Asset, Current Liabilities. Bank, cash, debtor, creditor, tax, and similar control accounts are rejected |
purchase_account | Yes | number | Leaf account id. Types: Purchase, Direct Expense, Indirect Expense, Fixed Asset, Current Asset, Current Liabilities. Same control-account exclusions |
credit_note_account | No | number | Omit to use sales_account. Same leaf-account rules as sales plus purchase types |
debit_note_account | No | number | Omit to use purchase_account |
sellable | No | boolean | Default true |
purchasable | No | boolean | Default true |
in_manufacturing | No | boolean | Default true when manufacturing is enabled on the branch, otherwise false |
track_inventory | No | string | No, FIFO, Manual Batch, Expiry Date, or Serial Number. Omit to use the branch default inventory valuation. Forced off for Service. FIFO is stored as tracked inventory. Manual Batch, Expiry Date, and Serial Number require the matching branch flags |
opening_stock | No | number | Opening quantity. Cannot be negative. Written as an Opening Balance batch when not zero |
opening_stock_value | No | number | Opening stock value. Cannot be negative |
warehouse_id | No | number | Warehouse for opening stock. Must belong to the branch. Omit to use the default warehouse |
inventory_alert | No | number | Stock alert. Max 2147483647, min -2147483648 |
enable_minimum_sales_price | No | boolean | Default false |
minimum_sales_price | No | number | Used when minimum sales price is enabled |
minimum_sales_price_tax_included | No | boolean | Default false |
items_offers | No | number | Offer percent. Default 0 |
items_{id} | No | mixed | One item custom field. {id} is customfields_id. The key, type, and allowed values come from Get form details with module=item. Dropdown and multiselect values must be an allowed option unless the field allows a new option. Lookup is one id from Custom field options. Multiselect lookup is an array of those ids. A repeated multiselect or multiselect-lookup value is stored once. A number field is stored as an integer, so 7.7 is stored as 8, and a value that is not a number is rejected. A number field max is 2147483647 and min is -2147483648. A decimal field max is 9999999999.99999999 and min is -9999999999.99999999. Each custom-field value is checked for its type, and a value of the wrong type is rejected. A 12H time or datetime value must include AM or PM (for example 02:30 PM); a value without meridem is rejected. On create, an omitted date, time, or datetime key uses the field default (current stores now; empty stores null). Sending "" stores null. An uploader value is an existing document id. Autogenerate and formula keys are rejected |
item_group_ids | No | array | Existing item group ids. Unknown ids return Item group not found. Groups are not created by name |
item_expenses | No | array | Rows of { "account_id", "category_id", "amount", "auto_create" }. Omit or [] for none. A row with no account and no category is skipped. account_id is a bank/cash id from List bank accounts in the branch base currency. category_id is a leaf purchase-side account from List chart of accounts (same types as purchase_account). When auto_create is true, account_id, category_id, and amount are all required |
Example request
{
"name": "Widget",
"item_type": "Product",
"item_code_type": "custom",
"item_number": "SKU-1",
"secondary_name": "",
"description": "API created widget",
"unit": "Pcs",
"tax_id": 1,
"tax_code": "9983",
"sales_price": 100,
"cost_price": 60,
"sales_price_type": "Amount",
"sales_price_percentage": 0,
"sales_account": 10,
"purchase_account": 20,
"credit_note_account": 10,
"debit_note_account": 20,
"sellable": true,
"purchasable": true,
"in_manufacturing": false,
"track_inventory": "FIFO",
"opening_stock": 10,
"opening_stock_value": 600,
"warehouse_id": 1,
"inventory_alert": 2,
"enable_minimum_sales_price": false,
"minimum_sales_price": 0,
"minimum_sales_price_tax_included": false,
"items_offers": 0,
"items_294": "Batch A",
"item_group_ids": [1],
"item_expenses": [
{
"account_id": 2,
"category_id": 4,
"amount": 1000,
"auto_create": false
}
]
}
Example response
{
"success": true,
"message": "Item saved successfully",
"result": 10
}
Errors
Item Name is requireditem_type must be Product or ServicePlease select Item Code TypeInvalid Item Code TypeItem name already existsItem number already exist.Character Limit of 100 exceeded for Item NumberCharacter Limit of 100 exceeded for UnitCharacter Limit of 200 exceeded for Name in Secondary LanguageCharacter Limit of 200 exceeded for HSN / SACDescription Text Character Limit Exceededsales_price_type must be Amount or Percentage of costCost Price is greater than Sales PriceValue limit breached for Cost Price. (Max : 99999999999999.99)Value limit breached for Sales Price. (Max : 99999999999999.99)Value limit breached for Stock Alert. (Max : 2147483647, Min : -2147483648)Opening Stock Qty/Value cannot be less than 0Sales account is requiredSales account not foundPurchase account is requiredPurchase account not foundCredit note account not foundDebit note account not foundtax_id is invalidtrack_inventory must be No, FIFO, Manual Batch, Expiry Date, or Serial NumberManual Batch is not enabledExpiry Date is not enabledSerial Number is not enabledWarehouse not founditem_group_ids must be an arrayItem group not founditem_expenses must be an arrayitem_expenses row at index {n} must be an objectInvalid data in Item Expense.Invalid account_id for item_expenses row at index {n}Invalid category_id for item_expenses row at index {n}amount must be numeric for item_expenses row at index {n}Value limit breached for Expense Amount. (Max : 99999999999999.99)Unknown field(s): ...Permission DeniedItem limit Exceeded. Contact us through mail (info@ealsuite.com) or your partner for increasing the limit
Contacts
List customers
GET https://yoursite.ealsuite.com/?app=ealsuite_api/v1/customers&search=
- cURL
- JavaScript
curl -X GET 'https://yoursite.ealsuite.com/?app=ealsuite_api/v1/customers&search=' \
-H 'Authorization: Bearer <personal_access_token>' \
-H 'SelectedBranchId: <numeric_branch_id>'
const response = await fetch("https://yoursite.ealsuite.com/?app=ealsuite_api/v1/customers&search=", {
method: "GET",
headers: {
Authorization: "Bearer <personal_access_token>",
SelectedBranchId: "<numeric_branch_id>",
},
});
const data = await response.json();
console.log(data);
Omit type to list customers. Set type to pos to list POS contacts. Any other type returns type must be pos.
Returns at most 50 contacts. Omit search or leave it empty to receive up to 50 contacts with no text filter. A role limited to the user's own customers can restrict the list. id is the contact id to send as customer_id.
Query
| Parameter | Required | Type | Description |
|---|---|---|---|
type | No | string | pos lists POS contacts. Omit for customers |
search | No | string | Typeahead text |
bill_type | No | string | invoice or purchase_bill. Excludes contacts that share the branch VAT treatment |
include_pos | No | boolean | With customers, also include POS contacts |
Example response
{
"success": true,
"message": "Customers fetched successfully",
"result": [
{
"id": 42,
"name": "Account - Company - CODE",
"catalog_id": 0,
"currency_id": 1,
"iso_code": "AED",
"symbol": "د.إ",
"decimal_places": 2,
"digit_group": 3
}
]
}
List suppliers
GET https://yoursite.ealsuite.com/?app=ealsuite_api/v1/suppliers&search=
- cURL
- JavaScript
curl -X GET 'https://yoursite.ealsuite.com/?app=ealsuite_api/v1/suppliers&search=' \
-H 'Authorization: Bearer <personal_access_token>' \
-H 'SelectedBranchId: <numeric_branch_id>'
const response = await fetch("https://yoursite.ealsuite.com/?app=ealsuite_api/v1/suppliers&search=", {
method: "GET",
headers: {
Authorization: "Bearer <personal_access_token>",
SelectedBranchId: "<numeric_branch_id>",
},
});
const data = await response.json();
console.log(data);
Returns at most 50 contacts. Omit search or leave it empty to receive up to 50 contacts with no text filter. A role limited to the user's own suppliers can restrict the list. id is the contact id to send as supplier_id.
Query
| Parameter | Required | Type | Description |
|---|---|---|---|
search | No | string | Typeahead text |
bill_type | No | string | invoice or purchase_bill. Excludes contacts that share the branch VAT treatment |
Example response
{
"success": true,
"message": "Suppliers fetched successfully",
"result": [
{
"id": 18,
"name": "Account - Company - CODE",
"catalog_id": 0,
"currency_id": 1,
"iso_code": "AED",
"symbol": "د.إ",
"decimal_places": 2,
"digit_group": 3
}
]
}
Create a customer
POST https://yoursite.ealsuite.com/?app=ealsuite_api/v1/customer
- cURL
- JavaScript
curl -X POST 'https://yoursite.ealsuite.com/?app=ealsuite_api/v1/customer' \
-H 'Authorization: Bearer <personal_access_token>' \
-H 'SelectedBranchId: <numeric_branch_id>' \
-H 'Content-Type: application/json' \
-d '{
"name": "Acme Trading",
"email": "billing@acme.example",
"phone": "+971500000000",
"company": "Acme Trading LLC",
"address": "Warehouse 12",
"city": "Dubai",
"state": "Dubai",
"zip": "00000",
"country": "United Arab Emirates",
"currency": 1,
"tax_reg_type": "Vat Registered",
"business_number": "100000000000003"
}'
const response = await fetch("https://yoursite.ealsuite.com/?app=ealsuite_api/v1/customer", {
method: "POST",
headers: {
Authorization: "Bearer <personal_access_token>",
SelectedBranchId: "<numeric_branch_id>",
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "Acme Trading",
"email": "billing@acme.example",
"phone": "+971500000000",
"company": "Acme Trading LLC",
"address": "Warehouse 12",
"city": "Dubai",
"state": "Dubai",
"zip": "00000",
"country": "United Arab Emirates",
"currency": 1,
"tax_reg_type": "Vat Registered",
"business_number": "100000000000003"
}),
});
const data = await response.json();
console.log(data);
Requires permission to create customers. A missing role returns Permission Denied. Any field outside the body below returns Unknown field(s): ....
Body
| Field | Required | Type | Description |
|---|---|---|---|
name | Yes | string | Customer name. Maximum 200 characters |
email | No | string | Valid email. Maximum 100 characters |
phone | No | string | Maximum 100 characters |
company | No | string | Maximum 200 characters |
address | No | string | Maximum 100 characters |
city | No | string | Maximum 100 characters |
state | No | string | Maximum 100 characters |
zip | No | string | Maximum 100 characters |
country | No | string | Country name |
currency | No | number | Currency id from List currencies. Omit to use the branch base currency. Wrong type or an unknown id returns currency must be a valid id or Invalid currency |
tax_reg_type | No | string | Same key for India and GCC. Omit to use Sales Preferences Default Tax Registration Type, the same value the customer form preselects. Allowed values depend on the branch country; see below |
business_number | No | string | Same key for India and GCC. Maximum 200 characters. Required when the sent type, or the Sales Preferences default when tax_reg_type is omitted, is one of the registered types listed below |
The allowed tax_reg_type strings are:
- India: GST Registered - Regular, GST Registered - Composition, GST Unregistered, Consumer, Overseas, SEZ, Deemed Exports
- United Arab Emirates: Vat Registered, Non Vat Registered, Vat Registered - Designated Zones, Non Vat Registered - Designated Zones, GCC Vat Registered, GCC Non VAT Registered, Non GCC
- Other GCC: Vat Registered, Non Vat Registered, GCC Vat Registered, GCC Non VAT Registered, Non GCC
- Elsewhere: no tax types; omit or send empty
business_number is required when the sent tax_reg_type, or the Sales Preferences Default Tax Registration Type when tax_reg_type is omitted, is one of these:
- GCC: Vat Registered, Vat Registered - Designated Zones, GCC Vat Registered
- India: GST Registered - Regular, GST Registered - Composition, SEZ, Deemed Exports
business_number is not required for:
- GCC: Non Vat Registered, Non Vat Registered - Designated Zones, GCC Non VAT Registered, Non GCC
- India: GST Unregistered, Consumer, Overseas
The empty-number error uses the branch business-number label: GSTIN for India, VATIN for Oman, TRN otherwise.
Example request
{
"name": "Acme Trading",
"email": "billing@acme.example",
"phone": "+971500000000",
"company": "Acme Trading LLC",
"address": "Warehouse 12",
"city": "Dubai",
"state": "Dubai",
"zip": "00000",
"country": "United Arab Emirates",
"currency": 1,
"tax_reg_type": "Vat Registered",
"business_number": "100000000000003"
}
Example response
{
"success": true,
"message": "Customer saved successfully",
"result": 42
}
result is the customer id to send as customer_id.
Errors
Name is requiredInvalid EmailUnknown field(s): ...Permission DeniedCustomer limit Exceeded. Contact us through mail (info@ealsuite.com) or your partner for increasing the limitDuplicate Customer Foundwhen the name already exists in this branch, or thebusiness_numberalready exists while tax is enabled{GSTIN|VATIN|TRN} cannot be empty.whenbusiness_numberis missing for Vat Registered, Vat Registered - Designated Zones, GCC Vat Registered, GST Registered - Regular, GST Registered - Composition, SEZ, or Deemed Exports (including a request that omitstax_reg_typewhen the Sales Preferences Default Tax Registration Type is one of those types)Charecter Limit of 200 exceeded for Customer(and the same form for the other length limits)currency must be a valid idInvalid currency
Create a supplier
POST https://yoursite.ealsuite.com/?app=ealsuite_api/v1/supplier
- cURL
- JavaScript
curl -X POST 'https://yoursite.ealsuite.com/?app=ealsuite_api/v1/supplier' \
-H 'Authorization: Bearer <personal_access_token>' \
-H 'SelectedBranchId: <numeric_branch_id>' \
-H 'Content-Type: application/json' \
-d '{
"name": "Acme Trading",
"email": "billing@acme.example",
"phone": "+971500000000",
"company": "Acme Trading LLC",
"address": "Warehouse 12",
"city": "Dubai",
"state": "Dubai",
"zip": "00000",
"country": "United Arab Emirates",
"currency": 1,
"tax_reg_type": "Vat Registered",
"business_number": "100000000000003"
}'
const response = await fetch("https://yoursite.ealsuite.com/?app=ealsuite_api/v1/supplier", {
method: "POST",
headers: {
Authorization: "Bearer <personal_access_token>",
SelectedBranchId: "<numeric_branch_id>",
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "Acme Trading",
"email": "billing@acme.example",
"phone": "+971500000000",
"company": "Acme Trading LLC",
"address": "Warehouse 12",
"city": "Dubai",
"state": "Dubai",
"zip": "00000",
"country": "United Arab Emirates",
"currency": 1,
"tax_reg_type": "Vat Registered",
"business_number": "100000000000003"
}),
});
const data = await response.json();
console.log(data);
Requires permission to create suppliers. A missing role returns Permission Denied. Any field outside the body below returns Unknown field(s): ....
Body
| Field | Required | Type | Description |
|---|---|---|---|
name | Yes | string | Supplier name. Maximum 200 characters |
email | No | string | Valid email. Maximum 100 characters |
phone | No | string | Maximum 100 characters |
company | No | string | Maximum 200 characters |
address | No | string | Maximum 100 characters |
city | No | string | Maximum 100 characters |
state | No | string | Maximum 100 characters |
zip | No | string | Maximum 100 characters |
country | No | string | Country name |
currency | No | number | Currency id from List currencies. Omit to use the branch base currency. Wrong type or an unknown id returns currency must be a valid id or Invalid currency |
tax_reg_type | No | string | Same key for India and GCC. Omit to use Purchase Preferences Default Tax Registration Type, the same value the supplier form preselects. Allowed values depend on the branch country; see below |
business_number | No | string | Same key for India and GCC. Maximum 200 characters. Required when the sent type, or the Purchase Preferences default when tax_reg_type is omitted, is one of the registered types listed below |
The allowed tax_reg_type strings are:
- India: GST Registered - Regular, GST Registered - Composition, GST Unregistered, Consumer, Overseas, SEZ, Deemed Exports
- United Arab Emirates: Vat Registered, Non Vat Registered, Vat Registered - Designated Zones, Non Vat Registered - Designated Zones, GCC Vat Registered, GCC Non VAT Registered, Non GCC
- Other GCC: Vat Registered, Non Vat Registered, GCC Vat Registered, GCC Non VAT Registered, Non GCC
- Elsewhere: no tax types; omit or send empty
business_number is required when the sent tax_reg_type, or the Purchase Preferences Default Tax Registration Type when tax_reg_type is omitted, is one of these:
- GCC: Vat Registered, Vat Registered - Designated Zones, GCC Vat Registered
- India: GST Registered - Regular, GST Registered - Composition, SEZ, Deemed Exports
business_number is not required for:
- GCC: Non Vat Registered, Non Vat Registered - Designated Zones, GCC Non VAT Registered, Non GCC
- India: GST Unregistered, Consumer, Overseas
The empty-number error uses the branch business-number label: GSTIN for India, VATIN for Oman, TRN otherwise.
Example request
{
"name": "Acme Trading",
"email": "billing@acme.example",
"phone": "+971500000000",
"company": "Acme Trading LLC",
"address": "Warehouse 12",
"city": "Dubai",
"state": "Dubai",
"zip": "00000",
"country": "United Arab Emirates",
"currency": 1,
"tax_reg_type": "Vat Registered",
"business_number": "100000000000003"
}
Example response
{
"success": true,
"message": "Supplier saved successfully",
"result": 18
}
result is the supplier id to send as supplier_id.
Errors
Name is requiredInvalid EmailUnknown field(s): ...Permission DeniedOther Contacts limit Exceeded. Contact us through mail (info@ealsuite.com) or your partner for increasing the limitDuplicate Supplier Foundwhen the name already exists in this branch, or thebusiness_numberalready exists while tax is enabled{GSTIN|VATIN|TRN} cannot be empty.whenbusiness_numberis missing for Vat Registered, Vat Registered - Designated Zones, GCC Vat Registered, GST Registered - Regular, GST Registered - Composition, SEZ, or Deemed Exports (including a request that omitstax_reg_typewhen the Purchase Preferences Default Tax Registration Type is one of those types)Charecter Limit of 200 exceeded for Supplier(and the same form for the other length limits)currency must be a valid idInvalid currency
Users
List users
GET https://yoursite.ealsuite.com/?app=ealsuite_api/v1/users
- cURL
- JavaScript
curl -X GET 'https://yoursite.ealsuite.com/?app=ealsuite_api/v1/users' \
-H 'Authorization: Bearer <personal_access_token>' \
-H 'SelectedBranchId: <numeric_branch_id>'
const response = await fetch("https://yoursite.ealsuite.com/?app=ealsuite_api/v1/users", {
method: "GET",
headers: {
Authorization: "Bearer <personal_access_token>",
SelectedBranchId: "<numeric_branch_id>",
},
});
const data = await response.json();
console.log(data);
No query parameters. Returns active, non-system users for the current branch. id is the user id to send as sales_person on an invoice, sales order, or quote. Omit sales_person on those calls to use the authenticated user.
Example response
{
"success": true,
"message": "Users fetched successfully",
"result": [
{
"id": 117,
"name": "Jane Doe"
}
]
}
Current user
GET https://yoursite.ealsuite.com/?app=ealsuite_api/v1/me
- cURL
- JavaScript
curl -X GET 'https://yoursite.ealsuite.com/?app=ealsuite_api/v1/me' \
-H 'Authorization: Bearer <personal_access_token>'
const response = await fetch("https://yoursite.ealsuite.com/?app=ealsuite_api/v1/me", {
method: "GET",
headers: {
Authorization: "Bearer <personal_access_token>",
},
});
const data = await response.json();
console.log(data);
No query parameters. Any authenticated caller. Do not send SelectedBranchId; it is ignored if present. Branch context is the user's saved current branch. result.user is the authenticated user. result.branch is the list of branch ids that the user can access. result.company_name is the company name of the user's saved current branch.
Example response
{
"success": true,
"message": "User details fetched successfully",
"result": {
"user": {
"id": 117,
"name": "Jane Doe",
"email": "jane@example.com",
"phone": null
},
"branch": [1, 2],
"company_name": "Acme"
}
}
Config
Get config
GET https://yoursite.ealsuite.com/?app=ealsuite_api/v1/config
- cURL
- JavaScript
curl -X GET 'https://yoursite.ealsuite.com/?app=ealsuite_api/v1/config' \
-H 'Authorization: Bearer <personal_access_token>' \
-H 'SelectedBranchId: <numeric_branch_id>'
const response = await fetch("https://yoursite.ealsuite.com/?app=ealsuite_api/v1/config", {
method: "GET",
headers: {
Authorization: "Bearer <personal_access_token>",
SelectedBranchId: "<numeric_branch_id>",
},
});
const data = await response.json();
console.log(data);
No query parameters. Any authenticated caller. Returns the current branch display settings.
Example response
{
"success": true,
"message": "Config fetched successfully",
"result": {
"date_format": "DD/MM/YYYY",
"decimal_places": 2,
"thousand_separator": "3",
"decimal_separator": ".",
"currency_code": "AED",
"inventory_precision": 2,
"round_off_method": "Normal"
}
}
date_format is the branch date format in uppercase (DD/MM/YYYY, DD-MM-YYYY, MM/DD/YYYY, YYYY-MM-DD, and the other branch formats). round_off_method is Manual, Upwards, Downward, or Normal.