Skip to main content

Sales API

Invoices​

Create or update an invoice, create a link the customer can open, list invoices, or fetch one invoice by id. Omit record_id to create. Pass the numeric invoice id as record_id to update.

Line items, address overrides, and the shared optional fields below also apply to purchase bills, purchase orders, sales orders, quotes, and credit notes. Those sections list only the differences.

Line items​

items must be a JSON array of objects. A string or other type returns items must be an array. It must contain at least one line. A line is stored only when item_quantity is greater than 0. item_quantity must be a plain decimal (not scientific notation) and at most 999999999999.99999999. Deleted items are rejected with One or more provided items are deleted. Disabled items are rejected with One or more provided items are disabled. After create, items_taxrate and items_taxname are stored from List tax options for items_tax_id. items_is_taxgroup must be 0 or 1 when sent. items_taxrate1 and items_taxrate2 must be numeric when sent.

FieldRequiredDescription
item_idYesItem id from Search items
item_rateYesUnit price
item_line_discountYesDiscount value
items_tax_idYesTax id
items_taxrateYesTax rate
items_taxnameYesTax name
item_quantityEffectiveQuantity. The line is included only when this is greater than 0
item_unitConditionalRequired when the item has units
item_discount_typeNop (percent, default) or f (fixed)
item_focNoFree-of-charge quantity. Adds an extra zero-price line
warehouse_idNoWarehouse id. Defaults to the branch default warehouse
Tax groupNoitems_is_taxgroup, items_taxrate1, items_taxrate2, and the matching tax names and types

If the customer has a catalogue, only items in that catalogue are allowed. A bill-wise discount applied before tax is redistributed onto the lines.

On bill details responses, items includes one object per priced line in storage (the same product at different rates appears as multiple objects). Free-of-charge rows are folded into the immediately preceding paid line for the same item_id and item_unit as item_foc.

Address overrides​

All optional strings:

billing_street, billing_city, billing_state, billing_zip, billing_country, billing_address, shipping_street, shipping_city, shipping_state, shipping_zip, shipping_country, shipping_address, shipping_contact_person, shipping_phone.

City, state, zip, country, contact person, and phone fields have length limits.

Shared optional fields​

FieldTypeDescription
record_idnumberBill id to update. Omit or leave empty to create
adjustmentnumberDefaults to 0
currency_ratenumberMust be greater than 0. Maximum 999999999999.99999999
payment_termsnumberPayment terms id
discount_methodobject or string{ "type": "Line Wise" or "Bill Wise", "before_tax": true or false }
is_tax_inclusive0 or 1When set, overrides the customer default
titlestringMaximum 200 characters
bill_discountnumberBill-level discount
bill_discount_typep or fPercent or fixed. Defaults to f
serial_code_idnumberNumbering series from Resolve a series
additional_expensesarray[{ "category_id", "amount" }]. Each amount must be greater than 0. Category ids come from List additional expense categories for the same module

idate is not accepted. Use the date field named on each resource.

Create or update an invoice​

POST https://yoursite.ealsuite.com/?app=ealsuite_api/v1/invoice
curl -X POST 'https://yoursite.ealsuite.com/?app=ealsuite_api/v1/invoice' \
-H 'Authorization: Bearer <personal_access_token>' \
-H 'SelectedBranchId: <numeric_branch_id>' \
-H 'Content-Type: application/json' \
-d '{
"record_id": 1234,
"customer_id": 42,
"retail_invoice": 0,
"catid": 2,
"invoice_date": "09/09/2026",
"status": "Published",
"sales_person": 11,
"invoices_294": "PO-44",
"invoices_297": 101,
"invoices_298": ["201", "202"],
"adjustment": 0,
"currency_rate": 1,
"payment_terms": 3,
"discount_method": { "type": "Bill Wise", "before_tax": true },
"is_tax_inclusive": 0,
"title": "September invoice",
"bill_discount": 10,
"bill_discount_type": "p",
"serial_code_id": 3,
"additional_expenses": [{ "category_id": 123, "amount": 50.0 }],
"billing_street": "12 Market Road",
"billing_city": "Dubai",
"billing_state": "Dubai",
"billing_zip": "00000",
"billing_country": "United Arab Emirates",
"billing_address": "12 Market Road, Dubai",
"shipping_street": "Warehouse 4",
"shipping_city": "Dubai",
"shipping_state": "Dubai",
"shipping_zip": "00000",
"shipping_country": "United Arab Emirates",
"shipping_address": "Warehouse 4, Dubai",
"shipping_contact_person": "Amina Khan",
"shipping_phone": "+971500000000",
"items": [
{
"item_id": 10,
"item_quantity": 2,
"item_rate": 100,
"item_line_discount": 0,
"item_discount_type": "p",
"item_unit": 5,
"item_foc": 0,
"items_tax_id": 1,
"items_taxrate": 5,
"items_taxname": "VAT 5%",
"items_is_taxgroup": 0,
"items_taxrate1": "0.00",
"items_taxrate2": "0.00",
"items_tax1_name": "VAT",
"items_tax2_name": "",
"items_tax_type": "tax",
"items_tax_type1": "tax",
"items_tax_type2": "tax",
"warehouse_id": 1
}
]
}'

Omit retail_invoice, or set it to 0, to create or update a normal invoice. That requires permission to create or edit invoices. Set retail_invoice to 1 to create or update a retail invoice. That requires permission to create or edit retail invoices. customer_id stays required. Creating a retail invoice uses the retail invoice series. Draft is accepted only when invoice drafts are allowed. Credit limit, transaction lock, and similar bill rules still apply.

A normal invoice cannot be updated as a retail invoice, and a retail invoice cannot be updated as a normal invoice. Pass the same retail_invoice value the invoice was created with.

A lookup or multiselect-lookup value must be an id returned by Custom field options for that field. Soft-deleted items and leads are not valid. Omitting the key on update keeps the stored value, and that stored value is checked again.

Body

FieldRequiredTypeDescription
customer_idYesnumberCustomer id from List customers
itemsYesarrayAt least one line item
retail_invoiceNo0 or 11 creates or updates a retail invoice. Omit or 0 keeps a normal invoice
catidNonumberCatalogue id. Applied when retail_invoice is 1. On create, omit uses the branch default retail catalogue. On update, omit keeps the invoice's current catalogue. A sent id must be a catalogue on this branch
invoice_dateNostringBranch date format. Defaults to today. idate is rejected
statusNostringPublished, or Draft when invoice drafts are allowed
sales_personNonumberActive user id from List users on this branch. Defaults to the authenticated user
invoices_{id}NomixedOne invoice custom field. {id} is customfields_id. The key, type, and allowed values come from Get form details with module=invoice. retail_invoice=1 uses the retail field set. Omit a key on update to keep the stored value. 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 and replaces the whole set. 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
additional_expensesNoarrayCategories must be Direct Income or Indirect Income (module=invoice)
Other fieldsNo—Shared optional fields and address overrides

Example request

{
"record_id": 1234,
"customer_id": 42,
"retail_invoice": 0,
"catid": 2,
"invoice_date": "09/09/2026",
"status": "Published",
"sales_person": 11,
"invoices_294": "PO-44",
"invoices_297": 101,
"invoices_298": ["201", "202"],
"adjustment": 0,
"currency_rate": 1,
"payment_terms": 3,
"discount_method": { "type": "Bill Wise", "before_tax": true },
"is_tax_inclusive": 0,
"title": "September invoice",
"bill_discount": 10,
"bill_discount_type": "p",
"serial_code_id": 3,
"additional_expenses": [{ "category_id": 123, "amount": 50.0 }],
"billing_street": "12 Market Road",
"billing_city": "Dubai",
"billing_state": "Dubai",
"billing_zip": "00000",
"billing_country": "United Arab Emirates",
"billing_address": "12 Market Road, Dubai",
"shipping_street": "Warehouse 4",
"shipping_city": "Dubai",
"shipping_state": "Dubai",
"shipping_zip": "00000",
"shipping_country": "United Arab Emirates",
"shipping_address": "Warehouse 4, Dubai",
"shipping_contact_person": "Amina Khan",
"shipping_phone": "+971500000000",
"items": [
{
"item_id": 10,
"item_quantity": 2,
"item_rate": 100,
"item_line_discount": 0,
"item_discount_type": "p",
"item_unit": 5,
"item_foc": 0,
"items_tax_id": 1,
"items_taxrate": 5,
"items_taxname": "VAT 5%",
"items_is_taxgroup": 0,
"items_taxrate1": "0.00",
"items_taxrate2": "0.00",
"items_tax1_name": "VAT",
"items_tax2_name": "",
"items_tax_type": "tax",
"items_tax_type1": "tax",
"items_tax_type2": "tax",
"warehouse_id": 1
}
]
}

Example response

{
"success": true,
"message": "Invoice saved successfully",
"result": 1234
}

result is the invoice id. Use it as record_id to edit and for a share link, and as payment id with type customer.

Errors

  • retail_invoice must be 0 or 1
  • A normal invoice cannot be updated as a retail invoice
  • A retail invoice cannot be updated as a normal invoice
  • Unknown custom field invoices_294
  • invoices_294 is generated by the server
  • {field name} has an invalid option
  • {field name} has an invalid lookup value
  • {field name} document was not found
  • {field name} has an invalid value. {reason}
  • Invalid sales_person
  • Invalid serial_code_id
  • Invalid catid
  • Permission Denied
  • items must be an array
  • customer_id must be a valid id
  • item_quantity must be numeric
  • items_is_taxgroup must be 0 or 1
  • currency_rate must be numeric
  • Invalid currency_rate
  • Value limit exceeded for currency_rate. (Max: 999999999999.99999999)
POST https://yoursite.ealsuite.com/?app=ealsuite_api/v1/invoice/share-link
curl -X POST 'https://yoursite.ealsuite.com/?app=ealsuite_api/v1/invoice/share-link' \
-H 'Authorization: Bearer <personal_access_token>' \
-H 'SelectedBranchId: <numeric_branch_id>'

A normal invoice needs invoice view access. A retail invoice needs retail invoice view access.

Body

FieldRequiredTypeDescription
record_idYesnumberInvoice id

Example response

{
"success": true,
"message": "Shareable link created successfully",
"result": {
"link": "https://example.com/s/abc123"
}
}

The link expires one month after it is created.

Errors

  • Permission Denied

Delete an invoice​

DELETE https://yoursite.ealsuite.com/?app=ealsuite_api/v1/invoices/1234
curl -X DELETE 'https://yoursite.ealsuite.com/?app=ealsuite_api/v1/invoices/1234' \
-H 'Authorization: Bearer <personal_access_token>' \
-H 'SelectedBranchId: <numeric_branch_id>'

A normal invoice needs invoice delete access. A retail invoice needs retail invoice delete access. There is no request body.

Example response

{
"success": true,
"message": "INV-001 deleted successfully",
"result": 1234
}

result is the deleted invoice id.

Errors

  • Permission Denied
  • Invalid Request
  • Invoice Not Found
  • Unable to process the request since <b>Transaction Lock is enabled for this module for the date you've selected.</b>
  • Delete the payments to delete INV-001
  • Remove Associated Items to delete INV-001
  • Remove Associated Item Expenses to delete INV-001
  • Remove Associated Invoice Expenses to delete INV-001
  • Remove Associated Purchase Bills to delete INV-001
  • Remove Associated Credit Notes to delete INV-001
  • Remove Associated Reminders to delete INV-001
  • Cannot delete invoice as Snack Movement is associated with INV-001
  • Cannot delete invoice as Sales Measurement is associated with INV-001
  • Cannot delete invoice as Delivery Order is associated with INV-001
  • Cannot delete invoice as Return Order is associated with INV-001

List invoices​

GET https://yoursite.ealsuite.com/?app=ealsuite_api/v1/invoices&page_size=50
curl -X GET 'https://yoursite.ealsuite.com/?app=ealsuite_api/v1/invoices&page_size=50' \
-H 'Authorization: Bearer <personal_access_token>' \
-H 'SelectedBranchId: <numeric_branch_id>'

Omit retail_invoice, leave it empty, or set it to 0 to list normal invoices. That requires invoice view access. Set retail_invoice to 1 to list retail invoices. That requires retail invoice view access.

GET https://yoursite.ealsuite.com/?app=ealsuite_api/v1/invoices&retail_invoice=1&page_size=50
curl -X GET 'https://yoursite.ealsuite.com/?app=ealsuite_api/v1/invoices&retail_invoice=1&page_size=50' \
-H 'Authorization: Bearer <personal_access_token>' \
-H 'SelectedBranchId: <numeric_branch_id>'

See Pagination.

ParameterValue
retail_invoiceOmit, empty, or 0 for normal invoices. 1 for retail invoices
include_attachmentsSet to 1 to include attachments. Omit it and the response has no attachments key
Default sort_byinvoices_id
Sort fieldsinvoices_id, invoices_code, invoices_date, invoices_total, invoices_status, invoices_created_at, invoices_updated_at
Filter fieldsinvoices_status, invoices_code, invoices_date, invoices_userid, invoices_sale_agent, invoices_created_by, invoices_project_id, invoices_total

Example response

{
"success": true,
"message": "Invoices fetched successfully",
"result": {
"records": [
{
"invoices_id": 1234,
"invoices_uuid": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"invoices_code": "INV-001",
"invoices_date": "2026-01-15",
"invoices_status": "Unpaid",
"invoices_userid": 42,
"invoices_sale_agent": 11,
"invoices_created_by": 11,
"invoices_currency": 1,
"invoices_created_at": "2026-01-15 10:30:00",
"invoices_total": "$1,250.00",
"invoices_due_amount": "$250.00"
}
],
"page_info": {
"next_page_token": "...",
"has_next_page": true,
"has_prev_page": false,
"page_size": 50
}
}
}

attachments

attachments is present only when include_attachments is set. Each record returns its published files. Records without files return []. Draft uploads are omitted. is_primary is always false.

FieldDescription
nameFile name
urlPresigned S3 GET URL for inline viewing, valid for 6 hours
is_primaryAlways false
expires_atWhen url stops working (ISO 8601)

Do not store url permanently. List again to get fresh URLs after expires_at.

With include_attachments=1:

{
"invoices_id": 1234,
"invoices_code": "INV-001",
"attachments": [
{
"name": "scan.pdf",
"url": "https://...presigned-s3-get-url...",
"is_primary": false,
"expires_at": "2026-10-19T22:11:15+04:00"
}
]
}

Errors

  • retail_invoice must be 0 or 1
  • Permission Denied

Get invoice details​

GET {workspace_url}/?app=ealsuite_api/v1/invoices/{id}
curl -X GET 'https://yoursite.ealsuite.com/?app=ealsuite_api/v1/invoices/{id}' \
-H 'Authorization: Bearer <personal_access_token>' \
-H 'SelectedBranchId: <numeric_branch_id>'

A normal invoice needs invoice view access. A retail invoice needs retail invoice view access. Users limited to their own or linked records get Invoice not found when this invoice is outside that scope.

Query

ParameterValue
include_attachmentsSet to 1 to include attachments. Omit it and the response has no attachments key

attachments matches List invoices. Do not store url permanently.

Header money fields invoices_total and invoices_due_amount match the list. Dates are Y-m-d. invoices_status is the stored status (Unpaid, Paid, Draft, and similar), not the create-time Published flag. summary amounts are unformatted decimal strings. Line items use the create line shape. Each priced line is returned separately in items. Free-of-charge quantity is merged onto the immediately preceding paid line for the same item and unit as item_foc.

Example response

{
"success": true,
"message": "Invoice details fetched successfully",
"result": {
"invoices_id": 1234,
"invoices_uuid": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"invoices_code": "INV-001",
"invoices_date": "2026-01-15",
"invoices_status": "Unpaid",
"invoices_userid": 42,
"invoices_sale_agent": 11,
"invoices_created_by": 11,
"invoices_currency": 1,
"invoices_created_at": "2026-01-15 10:30:00",
"invoices_total": "$1,250.00",
"invoices_due_amount": "$250.00",
"customer_id": 42,
"retail_invoice": 0,
"catid": 2,
"title": "September invoice",
"invoice_date": "2026-01-15",
"sales_person": 11,
"payment_terms": 3,
"adjustment": 0,
"currency_rate": 1,
"is_tax_inclusive": 0,
"discount_method": { "type": "Bill Wise", "before_tax": true },
"bill_discount": 10,
"bill_discount_type": "p",
"billing_street": "12 Market Road",
"billing_city": "Dubai",
"billing_state": "Dubai",
"billing_zip": "00000",
"billing_country": "United Arab Emirates",
"billing_address": "12 Market Road, Dubai",
"shipping_street": "Warehouse 4",
"shipping_city": "Dubai",
"shipping_state": "Dubai",
"shipping_zip": "00000",
"shipping_country": "United Arab Emirates",
"shipping_address": "Warehouse 4, Dubai",
"shipping_contact_person": "Amina Khan",
"shipping_phone": "+971500000000",
"additional_expenses": [{ "category_id": 123, "amount": 50.0 }],
"summary": {
"subtotal": "1200.00",
"discount": "120.00",
"adjustment": "0.00",
"total": "1250.00",
"tax": "57.00",
"paid": "1000.00",
"due": "250.00"
},
"items": [
{
"item_id": 10,
"item_quantity": 2,
"item_rate": 100,
"item_line_discount": 0,
"item_discount_type": "p",
"item_unit": 5,
"item_foc": 0,
"items_tax_id": 1,
"items_taxrate": 5,
"items_taxname": "VAT 5%",
"items_is_taxgroup": 0,
"items_taxrate1": "0.00",
"items_taxrate2": "0.00",
"items_tax1_name": "VAT",
"items_tax2_name": "",
"items_tax_type": "tax",
"items_tax_type1": "tax",
"items_tax_type2": "tax",
"warehouse_id": 1
}
]
}
}

Errors

  • Invoice not found
  • Permission Denied

Sales orders​

Create, update, or delete a sales order, share it, change its status, list orders, or get one order by id. Line items match invoices. The contact field is customer_id.

Create or update a sales order​

POST https://yoursite.ealsuite.com/?app=ealsuite_api/v1/sales-order
curl -X POST 'https://yoursite.ealsuite.com/?app=ealsuite_api/v1/sales-order' \
-H 'Authorization: Bearer <personal_access_token>' \
-H 'SelectedBranchId: <numeric_branch_id>' \
-H 'Content-Type: application/json' \
-d '{
"record_id": 9012,
"customer_id": 42,
"sales_order_date": "09/09/2026",
"sales_order_shipment_date": "16/09/2026",
"status": "Published",
"sales_person": 11,
"salesorder_294": "PO-44",
"salesorder_297": 101,
"salesorder_298": ["201", "202"],
"adjustment": 0,
"currency_rate": 1,
"payment_terms": 3,
"discount_method": { "type": "Bill Wise", "before_tax": true },
"is_tax_inclusive": 0,
"title": "September order",
"bill_discount": 10,
"bill_discount_type": "p",
"serial_code_id": 3,
"additional_expenses": [{ "category_id": 123, "amount": 50.0 }],
"billing_street": "12 Market Road",
"billing_city": "Dubai",
"billing_state": "Dubai",
"billing_zip": "00000",
"billing_country": "United Arab Emirates",
"billing_address": "12 Market Road, Dubai",
"shipping_street": "Warehouse 4",
"shipping_city": "Dubai",
"shipping_state": "Dubai",
"shipping_zip": "00000",
"shipping_country": "United Arab Emirates",
"shipping_address": "Warehouse 4, Dubai",
"shipping_contact_person": "Amina Khan",
"shipping_phone": "+971500000000",
"items": [
{
"item_id": 10,
"item_quantity": 2,
"item_rate": 100,
"item_line_discount": 0,
"item_discount_type": "p",
"item_unit": 5,
"item_foc": 0,
"items_tax_id": 1,
"items_taxrate": 5,
"items_taxname": "VAT 5%",
"items_is_taxgroup": 0,
"items_taxrate1": "0.00",
"items_taxrate2": "0.00",
"items_tax1_name": "VAT",
"items_tax2_name": "",
"items_tax_type": "tax",
"items_tax_type1": "tax",
"items_tax_type2": "tax",
"warehouse_id": 1
}
]
}'

Creating a sales order requires permission to create sales orders. Updating requires permission to edit them. Credit limit, transaction lock, a mandatory salesperson, and approval rules can still reject the call.

A lookup or multiselect-lookup value must be an id returned by Custom field options for that field. Soft-deleted items and leads are not valid. Omitting the key on update keeps the stored value, and that stored value is checked again.

Body

Required: customer_id, and items with the invoice line shape.

FieldDifference from an invoice
sales_order_dateUse this instead of invoice_date. Branch date format. Defaults to today. idate is rejected
sales_order_shipment_dateOptional. Defaults to the order date
statusPublished or Draft. Published is stored as Pending, or as Waiting Approval when approval applies
sales_personSame as an invoice. Required when the branch makes a salesperson mandatory
salesorder_{id}One sales order custom field. {id} is customfields_id. The key, type, and allowed values come from Get form details with module=sales_order. Omit a key on update to keep the stored value. 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 and replaces the whole set. 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
additional_expensesCategories must be Direct Income or Indirect Income (module=sales_order). Each amount must be greater than 0

Other optional fields match the shared invoice fields, including address overrides.

Example request

{
"record_id": 9012,
"customer_id": 42,
"sales_order_date": "09/09/2026",
"sales_order_shipment_date": "16/09/2026",
"status": "Published",
"sales_person": 11,
"salesorder_294": "PO-44",
"salesorder_297": 101,
"salesorder_298": ["201", "202"],
"adjustment": 0,
"currency_rate": 1,
"payment_terms": 3,
"discount_method": { "type": "Bill Wise", "before_tax": true },
"is_tax_inclusive": 0,
"title": "September order",
"bill_discount": 10,
"bill_discount_type": "p",
"serial_code_id": 3,
"additional_expenses": [{ "category_id": 123, "amount": 50.0 }],
"billing_street": "12 Market Road",
"billing_city": "Dubai",
"billing_state": "Dubai",
"billing_zip": "00000",
"billing_country": "United Arab Emirates",
"billing_address": "12 Market Road, Dubai",
"shipping_street": "Warehouse 4",
"shipping_city": "Dubai",
"shipping_state": "Dubai",
"shipping_zip": "00000",
"shipping_country": "United Arab Emirates",
"shipping_address": "Warehouse 4, Dubai",
"shipping_contact_person": "Amina Khan",
"shipping_phone": "+971500000000",
"items": [
{
"item_id": 10,
"item_quantity": 2,
"item_rate": 100,
"item_line_discount": 0,
"item_discount_type": "p",
"item_unit": 5,
"item_foc": 0,
"items_tax_id": 1,
"items_taxrate": 5,
"items_taxname": "VAT 5%",
"items_is_taxgroup": 0,
"items_taxrate1": "0.00",
"items_taxrate2": "0.00",
"items_tax1_name": "VAT",
"items_tax2_name": "",
"items_tax_type": "tax",
"items_tax_type1": "tax",
"items_tax_type2": "tax",
"warehouse_id": 1
}
]
}

Example response

{
"success": true,
"message": "Sales order saved successfully",
"result": 9012
}

result is the sales order id. Use it as record_id to edit and for a share link, and as sales_order_id for a status change.

Errors

  • Permission Denied
POST https://yoursite.ealsuite.com/?app=ealsuite_api/v1/sales-order/share-link
curl -X POST 'https://yoursite.ealsuite.com/?app=ealsuite_api/v1/sales-order/share-link' \
-H 'Authorization: Bearer <personal_access_token>' \
-H 'SelectedBranchId: <numeric_branch_id>'

Requires sales order view access.

Body: record_id (sales order id).

Response: same shape as an invoice share link. The link expires one month after it is created.

Errors

  • Permission Denied

Update sales order status​

POST https://yoursite.ealsuite.com/?app=ealsuite_api/v1/sales-order/status
curl -X POST 'https://yoursite.ealsuite.com/?app=ealsuite_api/v1/sales-order/status' \
-H 'Authorization: Bearer <personal_access_token>' \
-H 'SelectedBranchId: <numeric_branch_id>'

Requires permission to update sales orders. Allowed values are Pending, Draft, and Cancelled. An order that is converted, partially converted, or in an approval status cannot be changed.

Leaving Pending removes conversion logs, the same as cancelling in the product. Setting Pending recreates those logs and enforces the customer credit limit. Transaction lock applies. Sending the status the order already has succeeds and does not rewrite logs.

Body

FieldRequiredTypeDescription
sales_order_idYesnumberSales order id
statusYesstringPending, Draft, or Cancelled

Example response

{
"success": true,
"message": "Sales order status updated successfully",
"result": {
"sales_order_id": 9012,
"status": "Cancelled"
}
}

Errors

  • Permission Denied
  • Sales order id is required
  • Status must be Pending, Draft, or Cancelled
  • Invalid sales order
  • Only pending, draft, or cancelled sales orders can change status
  • Transaction lock
  • Credit-limit message when moving to Pending

Delete a sales order​

DELETE https://yoursite.ealsuite.com/?app=ealsuite_api/v1/sales-orders/9012
curl -X DELETE 'https://yoursite.ealsuite.com/?app=ealsuite_api/v1/sales-orders/9012' \
-H 'Authorization: Bearer <personal_access_token>' \
-H 'SelectedBranchId: <numeric_branch_id>'

Deleting a sales order requires permission to delete sales orders. There is no request body.

Example response

{
"success": true,
"message": "SO-001 deleted successfully",
"result": 9012
}

result is the deleted sales order id.

Errors

  • Permission Denied
  • Sales Order Not Found
  • Unable to process the request since <b>Transaction Lock is enabled for this module for the date you've selected.</b>
  • Remove Associated Reminders to delete SO-001
  • SO-001 cannot be deleted as sales order has been converted.

List sales orders​

GET https://yoursite.ealsuite.com/?app=ealsuite_api/v1/sales-orders&page_size=50
curl -X GET 'https://yoursite.ealsuite.com/?app=ealsuite_api/v1/sales-orders&page_size=50' \
-H 'Authorization: Bearer <personal_access_token>' \
-H 'SelectedBranchId: <numeric_branch_id>'

Requires access to sales orders. A role limited to the user's own records or to linked records can restrict results by creator, salesperson, and the linked customer's creator or assignees. See Pagination.

ParameterValue
include_attachmentsSet to 1 to include attachments. Omit it and the response has no attachments key. The array matches List invoices
Default sort_bysalesorder_id
Sort fieldssalesorder_id, salesorder_code, salesorder_date, salesorder_total, salesorder_status, salesorder_created_at, salesorder_updated_at
Filter fieldssalesorder_status, salesorder_code, salesorder_date, salesorder_userid, salesorder_sale_agent, salesorder_created_by, salesorder_project_id, salesorder_total

Example response

{
"success": true,
"message": "Sales orders fetched successfully",
"result": {
"records": [
{
"salesorder_id": 9012,
"salesorder_uuid": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"salesorder_code": "SO-001",
"salesorder_date": "2026-01-15",
"salesorder_status": "Pending",
"salesorder_userid": 42,
"salesorder_sale_agent": 11,
"salesorder_created_by": 11,
"salesorder_currency": 1,
"salesorder_created_at": "2026-01-15 10:30:00",
"salesorder_total": "$1,250.00"
}
],
"page_info": {
"next_page_token": "...",
"has_next_page": true,
"has_prev_page": false,
"page_size": 50
}
}
}

Get sales order details​

GET {workspace_url}/?app=ealsuite_api/v1/sales-orders/{id}
curl -X GET 'https://yoursite.ealsuite.com/?app=ealsuite_api/v1/sales-orders/{id}' \
-H 'Authorization: Bearer <personal_access_token>' \
-H 'SelectedBranchId: <numeric_branch_id>'

Requires sales order view access. Users limited to their own or linked records get Sales order not found when this order is outside that scope.

Query

ParameterValue
include_attachmentsSet to 1 to include attachments. Omit it and the response has no attachments key

attachments matches List invoices. Do not store url permanently.

Header money field salesorder_total matches the list. Dates are Y-m-d. salesorder_status is the stored status (Pending, Draft, Cancelled, and similar), not the create-time Published flag. summary amounts are unformatted decimal strings. Line items use the create line shape. Each priced line is returned separately in items. Free-of-charge quantity is merged onto the immediately preceding paid line for the same item and unit as item_foc.

Example response

{
"success": true,
"message": "Sales order details fetched successfully",
"result": {
"salesorder_id": 9012,
"salesorder_uuid": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"salesorder_code": "SO-001",
"salesorder_date": "2026-01-15",
"salesorder_status": "Pending",
"salesorder_userid": 42,
"salesorder_sale_agent": 11,
"salesorder_created_by": 11,
"salesorder_currency": 1,
"salesorder_created_at": "2026-01-15 10:30:00",
"salesorder_total": "$1,250.00",
"customer_id": 42,
"title": "September order",
"sales_order_date": "2026-01-15",
"sales_order_shipment_date": "2026-01-16",
"sales_person": 11,
"payment_terms": 3,
"adjustment": 0,
"currency_rate": 1,
"is_tax_inclusive": 0,
"discount_method": { "type": "Bill Wise", "before_tax": true },
"bill_discount": 10,
"bill_discount_type": "p",
"billing_street": "12 Market Road",
"billing_city": "Dubai",
"billing_state": "Dubai",
"billing_zip": "00000",
"billing_country": "United Arab Emirates",
"billing_address": "12 Market Road, Dubai",
"shipping_street": "Warehouse 4",
"shipping_city": "Dubai",
"shipping_state": "Dubai",
"shipping_zip": "00000",
"shipping_country": "United Arab Emirates",
"shipping_address": "Warehouse 4, Dubai",
"shipping_contact_person": "Amina Khan",
"shipping_phone": "+971500000000",
"additional_expenses": [{ "category_id": 123, "amount": 50.0 }],
"summary": {
"subtotal": "1200.00",
"discount": "120.00",
"adjustment": "0.00",
"total": "1250.00",
"tax": "57.00"
},
"items": [
{
"item_id": 10,
"item_quantity": 2,
"item_rate": 100,
"item_line_discount": 0,
"item_discount_type": "p",
"item_unit": 5,
"item_foc": 0,
"items_tax_id": 1,
"items_taxrate": 5,
"items_taxname": "VAT 5%",
"items_is_taxgroup": 0,
"items_taxrate1": "0.00",
"items_taxrate2": "0.00",
"items_tax1_name": "VAT",
"items_tax2_name": "",
"items_tax_type": "tax",
"items_tax_type1": "tax",
"items_tax_type2": "tax",
"warehouse_id": 1
}
]
}
}

Errors

  • Sales order not found
  • Permission Denied

Quotes​

Create, update, or delete a quote, share it, change its status, list quotes, or get one quote by id. Line items match invoices. The contact field is customer_id.

Create or update a quote​

POST https://yoursite.ealsuite.com/?app=ealsuite_api/v1/quote
curl -X POST 'https://yoursite.ealsuite.com/?app=ealsuite_api/v1/quote' \
-H 'Authorization: Bearer <personal_access_token>' \
-H 'SelectedBranchId: <numeric_branch_id>' \
-H 'Content-Type: application/json' \
-d '{
"record_id": 8012,
"customer_id": 42,
"quote_date": "09/09/2026",
"quote_expiry_date": "09/10/2026",
"proposal_text": "Supply and delivery of office equipment.",
"proposal_text_quill": "",
"status": "Published",
"sales_person": 11,
"quotes_294": "PO-44",
"quotes_297": 101,
"quotes_298": ["201", "202"],
"adjustment": 0,
"currency_rate": 1,
"payment_terms": 3,
"discount_method": { "type": "Bill Wise", "before_tax": true },
"is_tax_inclusive": 0,
"title": "September quote",
"bill_discount": 10,
"bill_discount_type": "p",
"serial_code_id": 3,
"additional_expenses": [{ "category_id": 123, "amount": 50.0 }],
"billing_street": "12 Market Road",
"billing_city": "Dubai",
"billing_state": "Dubai",
"billing_zip": "00000",
"billing_country": "United Arab Emirates",
"billing_address": "12 Market Road, Dubai",
"shipping_street": "Warehouse 4",
"shipping_city": "Dubai",
"shipping_state": "Dubai",
"shipping_zip": "00000",
"shipping_country": "United Arab Emirates",
"shipping_address": "Warehouse 4, Dubai",
"shipping_contact_person": "Amina Khan",
"shipping_phone": "+971500000000",
"items": [
{
"item_id": 10,
"item_quantity": 2,
"item_rate": 100,
"item_line_discount": 0,
"item_discount_type": "p",
"item_unit": 5,
"item_foc": 0,
"items_tax_id": 1,
"items_taxrate": 5,
"items_taxname": "VAT 5%",
"items_is_taxgroup": 0,
"items_taxrate1": "0.00",
"items_taxrate2": "0.00",
"items_tax1_name": "VAT",
"items_tax2_name": "",
"items_tax_type": "tax",
"items_tax_type1": "tax",
"items_tax_type2": "tax",
"warehouse_id": 1
}
]
}'

Creating a quote requires permission to create quotes. Updating requires permission to edit them. Transaction lock, a mandatory salesperson, proposal length, and approval rules can still reject the call.

A lookup or multiselect-lookup value must be an id returned by Custom field options for that field. Soft-deleted items and leads are not valid. Omitting the key on update keeps the stored value, and that stored value is checked again.

Body

Required: customer_id, and items with the invoice line shape.

FieldDifference from an invoice
quote_dateUse this instead of invoice_date. Branch date format. Defaults to today. idate is rejected
quote_expiry_dateOptional. Defaults to today plus the branch default quote expiry, or 30 days when that default is not set
proposal_textOptional. Stored as an empty string when omitted
proposal_text_quillOptional. Defaults to empty
statusPublished, Draft, Delivered, Accepted, or Lost. Approval can store Waiting Approval instead
sales_personSame as an invoice. Required when the branch makes a salesperson mandatory
quotes_{id}One quote custom field. {id} is customfields_id. The key, type, and allowed values come from Get form details with module=quote. Omit a key on update to keep the stored value. 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 and replaces the whole set. 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
additional_expensesCategories must be Direct Income or Indirect Income (module=quote). Each amount must be greater than 0

Other optional fields match the shared invoice fields, including billing and shipping address overrides.

Example request

{
"record_id": 8012,
"customer_id": 42,
"quote_date": "09/09/2026",
"quote_expiry_date": "09/10/2026",
"proposal_text": "Supply and delivery of office equipment.",
"proposal_text_quill": "",
"status": "Published",
"sales_person": 11,
"quotes_294": "PO-44",
"quotes_297": 101,
"quotes_298": ["201", "202"],
"adjustment": 0,
"currency_rate": 1,
"payment_terms": 3,
"discount_method": { "type": "Bill Wise", "before_tax": true },
"is_tax_inclusive": 0,
"title": "September quote",
"bill_discount": 10,
"bill_discount_type": "p",
"serial_code_id": 3,
"additional_expenses": [{ "category_id": 123, "amount": 50.0 }],
"billing_street": "12 Market Road",
"billing_city": "Dubai",
"billing_state": "Dubai",
"billing_zip": "00000",
"billing_country": "United Arab Emirates",
"billing_address": "12 Market Road, Dubai",
"shipping_street": "Warehouse 4",
"shipping_city": "Dubai",
"shipping_state": "Dubai",
"shipping_zip": "00000",
"shipping_country": "United Arab Emirates",
"shipping_address": "Warehouse 4, Dubai",
"shipping_contact_person": "Amina Khan",
"shipping_phone": "+971500000000",
"items": [
{
"item_id": 10,
"item_quantity": 2,
"item_rate": 100,
"item_line_discount": 0,
"item_discount_type": "p",
"item_unit": 5,
"item_foc": 0,
"items_tax_id": 1,
"items_taxrate": 5,
"items_taxname": "VAT 5%",
"items_is_taxgroup": 0,
"items_taxrate1": "0.00",
"items_taxrate2": "0.00",
"items_tax1_name": "VAT",
"items_tax2_name": "",
"items_tax_type": "tax",
"items_tax_type1": "tax",
"items_tax_type2": "tax",
"warehouse_id": 1
}
]
}

Example response

{
"success": true,
"message": "Quote saved successfully",
"result": 8012
}

result is the quote id. Use it as record_id to edit and for a share link, and as quote_id for a status change.

Errors

  • Permission Denied
POST https://yoursite.ealsuite.com/?app=ealsuite_api/v1/quote/share-link
curl -X POST 'https://yoursite.ealsuite.com/?app=ealsuite_api/v1/quote/share-link' \
-H 'Authorization: Bearer <personal_access_token>' \
-H 'SelectedBranchId: <numeric_branch_id>'

Requires quote view access.

Body: record_id (quote id).

Response: same shape as an invoice share link. The link expires 30 days after it is created.

Errors

  • Permission Denied

Update quote status​

POST https://yoursite.ealsuite.com/?app=ealsuite_api/v1/quote/status
curl -X POST 'https://yoursite.ealsuite.com/?app=ealsuite_api/v1/quote/status' \
-H 'Authorization: Bearer <personal_access_token>' \
-H 'SelectedBranchId: <numeric_branch_id>'

Requires permission to update quotes. Sets the status of an existing quote.

Allowed values: Draft, Published, Delivered, On Hold, Accepted, Lost.

The call is rejected when the current status is Waiting Approval, Rejected, Converted, Partialy Converted, or Revised, or when the quote has already been converted or revised. Leaving Draft submits the quote for approval when the total exceeds the approval threshold; result.status is then Waiting Approval, and approvers are notified. Sending the status the quote already has succeeds and does not rewrite the quote. Transaction lock applies.

Body

FieldRequiredTypeDescription
quote_idYesnumberQuote id
statusYesstringDraft, Published, Delivered, On Hold, Accepted, or Lost

Example response

{
"success": true,
"message": "Quote status updated successfully",
"result": {
"quote_id": 8012,
"status": "Accepted"
}
}

Errors

  • Permission Denied
  • Quote id is required
  • Status must be Draft, Published, Delivered, On Hold, Accepted, or Lost
  • Invalid quote
  • Quote status cannot be changed while it is waiting approval, rejected, converted, or revised
  • Transaction lock

Delete a quote​

DELETE https://yoursite.ealsuite.com/?app=ealsuite_api/v1/quotes/8012
curl -X DELETE 'https://yoursite.ealsuite.com/?app=ealsuite_api/v1/quotes/8012' \
-H 'Authorization: Bearer <personal_access_token>' \
-H 'SelectedBranchId: <numeric_branch_id>'

Deleting a quote requires permission to delete quotes. There is no request body.

Example response

{
"success": true,
"message": "QT-001 deleted successfully",
"result": 8012
}

result is the deleted quote id.

Errors

  • Permission Denied
  • Quote Not Found
  • Unable to process the request since <b>Transaction Lock is enabled for this module for the date you've selected.</b>
  • Remove Associated Reminders to delete QT-001
  • QT-001 cannot be deleted as quote has been converted.
  • QT-001 cannot be deleted as quote has created through revise.
  • QT-001 cannot be deleted as quote has been revised.

List quotes​

GET https://yoursite.ealsuite.com/?app=ealsuite_api/v1/quotes&page_size=50
curl -X GET 'https://yoursite.ealsuite.com/?app=ealsuite_api/v1/quotes&page_size=50' \
-H 'Authorization: Bearer <personal_access_token>' \
-H 'SelectedBranchId: <numeric_branch_id>'

Requires access to quotes. A role limited to the user's own records or to linked records can restrict results by creator, salesperson, and the linked customer's creator or assignees. See Pagination.

ParameterValue
include_attachmentsSet to 1 to include attachments. Omit it and the response has no attachments key. The array matches List invoices
Default sort_byquotes_id
Sort fieldsquotes_id, quotes_code, quotes_date, quotes_total, quotes_status, quotes_created_at, quotes_updated_at
Filter fieldsquotes_status, quotes_code, quotes_date, quotes_userid, quotes_sale_agent, quotes_created_by, quotes_project_id, quotes_total

Example response

{
"success": true,
"message": "Quotes fetched successfully",
"result": {
"records": [
{
"quotes_id": 8012,
"quotes_uuid": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"quotes_code": "QT-001",
"quotes_date": "2026-01-15",
"quotes_status": "Published",
"quotes_userid": 42,
"quotes_sale_agent": 11,
"quotes_created_by": 11,
"quotes_currency": 1,
"quotes_created_at": "2026-01-15 10:30:00",
"quotes_total": "$1,250.00"
}
],
"page_info": {
"next_page_token": "...",
"has_next_page": true,
"has_prev_page": false,
"page_size": 50
}
}
}

Get quote details​

GET {workspace_url}/?app=ealsuite_api/v1/quotes/{id}
curl -X GET 'https://yoursite.ealsuite.com/?app=ealsuite_api/v1/quotes/{id}' \
-H 'Authorization: Bearer <personal_access_token>' \
-H 'SelectedBranchId: <numeric_branch_id>'

Requires quote view access. Users limited to their own or linked records get Quote not found when this quote is outside that scope.

Query

ParameterValue
include_attachmentsSet to 1 to include attachments. Omit it and the response has no attachments key

attachments matches List invoices. Do not store url permanently.

Header money field quotes_total matches the list. Dates are Y-m-d. quotes_status is the stored status (Published, Draft, Accepted, and similar). summary amounts are unformatted decimal strings. Line items use the create line shape. Each priced line is returned separately in items. Free-of-charge quantity is merged onto the immediately preceding paid line for the same item and unit as item_foc.

Example response

{
"success": true,
"message": "Quote details fetched successfully",
"result": {
"quotes_id": 8012,
"quotes_uuid": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"quotes_code": "QT-001",
"quotes_date": "2026-01-15",
"quotes_status": "Published",
"quotes_userid": 42,
"quotes_sale_agent": 11,
"quotes_created_by": 11,
"quotes_currency": 1,
"quotes_created_at": "2026-01-15 10:30:00",
"quotes_total": "$1,250.00",
"customer_id": 42,
"title": "September quote",
"quote_date": "2026-01-15",
"quote_expiry_date": "2026-02-14",
"proposal_text": "Supply and delivery of office equipment.",
"proposal_text_quill": "",
"sales_person": 11,
"payment_terms": 3,
"adjustment": 0,
"currency_rate": 1,
"is_tax_inclusive": 0,
"discount_method": { "type": "Bill Wise", "before_tax": true },
"bill_discount": 10,
"bill_discount_type": "p",
"billing_street": "12 Market Road",
"billing_city": "Dubai",
"billing_state": "Dubai",
"billing_zip": "00000",
"billing_country": "United Arab Emirates",
"billing_address": "12 Market Road, Dubai",
"shipping_street": "Warehouse 4",
"shipping_city": "Dubai",
"shipping_state": "Dubai",
"shipping_zip": "00000",
"shipping_country": "United Arab Emirates",
"shipping_address": "Warehouse 4, Dubai",
"shipping_contact_person": "Amina Khan",
"shipping_phone": "+971500000000",
"additional_expenses": [{ "category_id": 123, "amount": 50.0 }],
"summary": {
"subtotal": "1200.00",
"discount": "120.00",
"adjustment": "0.00",
"total": "1250.00",
"tax": "57.00",
"paid": "0.00"
},
"items": [
{
"item_id": 10,
"item_quantity": 2,
"item_rate": 100,
"item_line_discount": 0,
"item_discount_type": "p",
"item_unit": 5,
"item_foc": 0,
"items_tax_id": 1,
"items_taxrate": 5,
"items_taxname": "VAT 5%",
"items_is_taxgroup": 0,
"items_taxrate1": "0.00",
"items_taxrate2": "0.00",
"items_tax1_name": "VAT",
"items_tax2_name": "",
"items_tax_type": "tax",
"items_tax_type1": "tax",
"items_tax_type2": "tax",
"warehouse_id": 1
}
]
}
}

Errors

  • Quote not found
  • Permission Denied

Credit notes​

Create, update, or delete a credit note, list credit notes, or load one credit note by id. Omit record_id to create. Pass the numeric credit note id as record_id to update. Line items match invoices. The contact field is customer_id.

Create or update a credit note​

POST https://yoursite.ealsuite.com/?app=ealsuite_api/v1/credit-note
curl -X POST 'https://yoursite.ealsuite.com/?app=ealsuite_api/v1/credit-note' \
-H 'Authorization: Bearer <personal_access_token>' \
-H 'SelectedBranchId: <numeric_branch_id>' \
-H 'Content-Type: application/json' \
-d '{
"record_id": 9012,
"customer_id": 42,
"credit_note_date": "09/09/2026",
"invoice_id": 1234,
"status": "Published",
"sales_person": 11,
"creditnote_294": "PO-44",
"creditnote_297": 101,
"creditnote_298": ["201", "202"],
"adjustment": 0,
"currency_rate": 1,
"payment_terms": 3,
"discount_method": { "type": "Bill Wise", "before_tax": true },
"is_tax_inclusive": 0,
"title": "September credit note",
"bill_discount": 10,
"bill_discount_type": "p",
"serial_code_id": 3,
"additional_expenses": [{ "category_id": 123, "amount": 50.0 }],
"billing_street": "12 Market Road",
"billing_city": "Dubai",
"billing_state": "Dubai",
"billing_zip": "00000",
"billing_country": "United Arab Emirates",
"billing_address": "12 Market Road, Dubai",
"shipping_street": "Warehouse 4",
"shipping_city": "Dubai",
"shipping_state": "Dubai",
"shipping_zip": "00000",
"shipping_country": "United Arab Emirates",
"shipping_address": "Warehouse 4, Dubai",
"shipping_contact_person": "Amina Khan",
"shipping_phone": "+971500000000",
"items": [
{
"item_id": 10,
"item_quantity": 2,
"item_rate": 100,
"item_line_discount": 0,
"item_discount_type": "p",
"item_unit": 5,
"item_foc": 0,
"items_tax_id": 1,
"items_taxrate": 5,
"items_taxname": "VAT 5%",
"items_is_taxgroup": 0,
"items_taxrate1": "0.00",
"items_taxrate2": "0.00",
"items_tax1_name": "VAT",
"items_tax2_name": "",
"items_tax_type": "tax",
"items_tax_type1": "tax",
"items_tax_type2": "tax",
"warehouse_id": 1
}
]
}'

Creating a credit note requires permission to create credit notes. Updating requires permission to edit them. Transaction lock and other bill rules still apply. invoice_id is optional: omit it for a standalone credit note, or pass an eligible invoice to return against it. Eligible invoices are not Draft, Waiting Approval, Rejected, or Cancelled, and must belong to customer_id. When linked, remaining invoice due can be applied automatically. status is accepted as Published; the saved credit note is Open, or Waiting Approval when credit-note approval is enabled and the amount exceeds the approval value.

A lookup or multiselect-lookup value must be an id returned by Custom field options for that field. Soft-deleted items and leads are not valid. Omitting the key on update keeps the stored value, and that stored value is checked again.

Body

Required: customer_id, and items with the invoice line shape.

FieldRequiredTypeDescription
customer_idYesnumberCustomer id from List customers
itemsYesarrayAt least one line item
credit_note_dateNostringBranch date format. Defaults to today. idate is rejected
invoice_idNonumberInvoice to return against. Omit for a standalone credit note
statusNostringPublished only
sales_personNonumberUser id from List users. Defaults to the authenticated user
creditnote_{id}NomixedOne credit note custom field. {id} is customfields_id. The key, type, and allowed values come from Get form details with module=credit_note. Omit a key on update to keep the stored value. 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 and replaces the whole set. 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
additional_expensesNoarrayCategories must be Direct Expense or Indirect Expense (module=credit_note)
Other fieldsNo—Shared optional fields and address overrides

Example request

{
"record_id": 9012,
"customer_id": 42,
"credit_note_date": "09/09/2026",
"invoice_id": 1234,
"status": "Published",
"sales_person": 11,
"creditnote_294": "PO-44",
"creditnote_297": 101,
"creditnote_298": ["201", "202"],
"adjustment": 0,
"currency_rate": 1,
"payment_terms": 3,
"discount_method": { "type": "Bill Wise", "before_tax": true },
"is_tax_inclusive": 0,
"title": "September credit note",
"bill_discount": 10,
"bill_discount_type": "p",
"serial_code_id": 3,
"additional_expenses": [{ "category_id": 123, "amount": 50.0 }],
"billing_street": "12 Market Road",
"billing_city": "Dubai",
"billing_state": "Dubai",
"billing_zip": "00000",
"billing_country": "United Arab Emirates",
"billing_address": "12 Market Road, Dubai",
"shipping_street": "Warehouse 4",
"shipping_city": "Dubai",
"shipping_state": "Dubai",
"shipping_zip": "00000",
"shipping_country": "United Arab Emirates",
"shipping_address": "Warehouse 4, Dubai",
"shipping_contact_person": "Amina Khan",
"shipping_phone": "+971500000000",
"items": [
{
"item_id": 10,
"item_quantity": 2,
"item_rate": 100,
"item_line_discount": 0,
"item_discount_type": "p",
"item_unit": 5,
"item_foc": 0,
"items_tax_id": 1,
"items_taxrate": 5,
"items_taxname": "VAT 5%",
"items_is_taxgroup": 0,
"items_taxrate1": "0.00",
"items_taxrate2": "0.00",
"items_tax1_name": "VAT",
"items_tax2_name": "",
"items_tax_type": "tax",
"items_tax_type1": "tax",
"items_tax_type2": "tax",
"warehouse_id": 1
}
]
}

Example response

{
"success": true,
"message": "Credit Note saved successfully",
"result": 9012
}

result is the credit note id. Use it as record_id to edit.

Errors

  • Use credit_note_date instead of idate
  • Invalid invoice_id
  • Invalid invoice
  • Invoice is not eligible for a credit note
  • Invoice does not belong to the selected customer
  • Unknown custom field creditnote_294
  • creditnote_294 is generated by the server
  • {field name} has an invalid option
  • {field name} has an invalid lookup value
  • {field name} document was not found
  • {field name} has an invalid value. {reason}
  • Invalid credit note
  • Permission Denied

Delete a credit note​

DELETE https://yoursite.ealsuite.com/?app=ealsuite_api/v1/credit-notes/9012
curl -X DELETE 'https://yoursite.ealsuite.com/?app=ealsuite_api/v1/credit-notes/9012' \
-H 'Authorization: Bearer <personal_access_token>' \
-H 'SelectedBranchId: <numeric_branch_id>'

Deleting a credit note requires permission to delete credit notes. There is no request body.

Example response

{
"success": true,
"message": "CN-001 deleted successfully",
"result": 9012
}

result is the deleted credit note id.

Errors

  • Permission Denied
  • Invalid Request
  • Credit Note Not Found
  • Unable to process the request since the record has been created through API.
  • Unable to process the request since <b>Transaction Lock is enabled for this module for the date you've selected.</b>
  • Cannot delete invoice as Returon Order is associated with INV-001
  • Remove Associated Reminders to delete CN-001
  • CN-001 cannot be deleted as Credit Note credit has been applied.
  • CN-001 cannot be deleted.<br>{stock message}

List credit notes​

GET https://yoursite.ealsuite.com/?app=ealsuite_api/v1/credit-notes&page_size=50
curl -X GET 'https://yoursite.ealsuite.com/?app=ealsuite_api/v1/credit-notes&page_size=50' \
-H 'Authorization: Bearer <personal_access_token>' \
-H 'SelectedBranchId: <numeric_branch_id>'

Requires access to credit notes. See Pagination.

ParameterValue
include_attachmentsSet to 1 to include attachments. Omit it and the response has no attachments key. The array matches List invoices
Default sort_bycreditnote_id
Sort fieldscreditnote_id, creditnote_code, creditnote_date, creditnote_total, creditnote_status, creditnote_created_at, creditnote_updated_at
Filter fieldscreditnote_status, creditnote_code, creditnote_date, creditnote_userid, creditnote_sale_agent, creditnote_created_by, creditnote_project_id, creditnote_total, creditnote_invoice_id

Example response

{
"success": true,
"message": "Credit notes fetched successfully",
"result": {
"records": [
{
"creditnote_id": 9012,
"creditnote_uuid": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"creditnote_code": "CN-001",
"creditnote_date": "2026-01-15",
"creditnote_status": "Open",
"creditnote_userid": 42,
"creditnote_sale_agent": 11,
"creditnote_created_by": 11,
"creditnote_currency": 1,
"creditnote_created_at": "2026-01-15 10:30:00",
"creditnote_invoice_id": 1234,
"creditnote_total": "$1,250.00",
"creditnote_due_amount": "$250.00"
}
],
"page_info": {
"next_page_token": "...",
"has_next_page": true,
"has_prev_page": false,
"page_size": 50
}
}
}

Errors

  • Permission Denied

Get credit note details​

GET {workspace_url}/?app=ealsuite_api/v1/credit-notes/{id}
curl -X GET 'https://yoursite.ealsuite.com/?app=ealsuite_api/v1/credit-notes/{id}' \
-H 'Authorization: Bearer <personal_access_token>' \
-H 'SelectedBranchId: <numeric_branch_id>'

Requires credit note view access. Users limited to their own or linked records get Credit note not found when this credit note is outside that scope.

Query

ParameterValue
include_attachmentsSet to 1 to include attachments. Omit it and the response has no attachments key

attachments matches List invoices. Do not store url permanently.

Keys match create or update a credit note so the same object can be posted back as an edit. record_id is the credit note id. credit_note_date uses the branch date format. status and serial_code_id are omitted. invoice_id is the linked invoice, or null for a standalone credit note. summary and attachments are read-only. summary.due is remaining unused credit. summary.paid is credit already applied. summary amounts are unformatted decimal strings. Line items use the create line shape. Each priced line is returned separately in items. Free-of-charge quantity is merged onto the immediately preceding paid line for the same item and unit as item_foc.

Example response

{
"success": true,
"message": "Credit note details fetched successfully",
"result": {
"record_id": 9012,
"customer_id": 42,
"credit_note_date": "09/09/2026",
"invoice_id": 1234,
"sales_person": 11,
"adjustment": 0,
"currency_rate": 1,
"payment_terms": 3,
"discount_method": { "type": "Bill Wise", "before_tax": true },
"is_tax_inclusive": 0,
"title": "September credit note",
"bill_discount": 10,
"bill_discount_type": "p",
"additional_expenses": [{ "category_id": 123, "amount": 50.0 }],
"billing_street": "12 Market Road",
"billing_city": "Dubai",
"billing_state": "Dubai",
"billing_zip": "00000",
"billing_country": "United Arab Emirates",
"billing_address": "12 Market Road, Dubai",
"shipping_street": "Warehouse 4",
"shipping_city": "Dubai",
"shipping_state": "Dubai",
"shipping_zip": "00000",
"shipping_country": "United Arab Emirates",
"shipping_address": "Warehouse 4, Dubai",
"shipping_contact_person": "Amina Khan",
"shipping_phone": "+971500000000",
"items": [
{
"item_id": 10,
"item_quantity": 2,
"item_rate": 100,
"item_line_discount": 0,
"item_discount_type": "p",
"item_unit": 5,
"item_foc": 0,
"items_tax_id": 1,
"items_taxrate": 5,
"items_taxname": "VAT 5%",
"items_is_taxgroup": 0,
"items_taxrate1": "0.00",
"items_taxrate2": "0.00",
"items_tax1_name": "VAT",
"items_tax2_name": "",
"items_tax_type": "tax",
"items_tax_type1": "tax",
"items_tax_type2": "tax",
"warehouse_id": 1
}
],
"summary": {
"subtotal": "1200.00",
"discount": "120.00",
"adjustment": "0.00",
"total": "1250.00",
"tax": "57.00",
"paid": "1000.00",
"due": "250.00"
}
}
}

Errors

  • Credit note not found
  • Permission Denied