For the complete documentation index, see llms.txt. This page is also available as Markdown.

How Every API Call Works

This page explains what is the same for every endpoint: how to read a response, how branches and dates are handled, how to fetch only new or changed records, and the messages any endpoint can return. The endpoint pages only describe what is particular to each endpoint.

The response to a Push

Every Push endpoint answers with at least these fields:

Field
Type
Meaning

Status

true / false

true when the request was accepted. false when nothing was saved – read Message.

Message

text

Why the request failed, or extra information. Usually empty when the record was saved.

LastSavedCode

number

Logic ERP's internal number of the document or master just saved. Keep it if you want to fetch or refer to that record later.

request_ID

text

A unique ID Logic ERP gives this request. Quote it when you contact support about a request. It is empty when the request failed before saving started.

Some endpoints add more fields, such as the document number that was given (LastSavedDocNo, Invoice_No) or a print file. The endpoint page lists them.

Example — a saved sale invoice

{
  "Status": true,
  "Message": "",
  "LastSavedCode": 10452,
  "request_ID": "6f1c2a9e-3b7d-4c55-9a0e-2d8f61b0c7aa"
}

Business errors (a missing item, a wrong field value) still come back as a normal answer with Status: false and the reason in Message. Always check Status, not only whether the call went through. Some error messages include technical detail after the reason; the reason is the first line.

Endpoint switched off for your branch: if your support team has switched an endpoint off for your branch, nothing is saved and Message contains "Request cannot be processed. API Template is marked as In-Active in the configuration". Depending on the endpoint, Status can be true or false, and the sentence can be surrounded by technical detail – so look for the sentence and treat the request as not saved. Not every endpoint can be switched off per branch; each endpoint page says how it behaves.

The response to a Pull

Every Pull endpoint answers with these fields:

Field
Type
Meaning

GetData

list

The records found. Each endpoint page describes the fields of one record.

Status

true / false

true when the request was valid. false when it was not – read Message. Exception: the date checks below answer with Status: true, no data and the problem in Message.

Message

text

Why the request failed, or – with Status: true – a note such as "No Pending Sale Bill found..." when nothing new was found.

So for a Pull, treat the call as successful only when Status is true and GetData holds records; when GetData is empty or null, read Message. | LastGlobalModifyCode | number | A bookmark. Send it back in your next request to get only what changed after this one (see below). | | resultSize | text | The size of the answer, for example "12 KB". |

Branches

Most Push requests say which branch the document belongs to – by branch code or by branch short name, depending on the endpoint. If a branch short name is given that does not exist, the request fails with a message containing "Branch_Short_Name : … not exists." (the name you sent in place of …).

Dates

  • For most documents you push, the date of the document decides which financial year it is saved in. A few endpoints save into the financial year of the day the request arrives; their pages say so.

  • Dates in Pull responses are text written day/month/year in the server's short date format – for example 19/04/2026, or 19/04/26 on some servers and endpoints. Read both forms. A few fields also carry a time, for example the sale invoice time 19/04/2026 06:49 PM.

  • In requests, write dates as yyyy-MM-dd (for example 2026-04-19). This form is always read correctly; a form like 04/05/2026 can be read as 4 May or 5 April depending on the server.

Fetching only new or changed records (Pull)

Logic ERP keeps a change log: when a document is saved or edited, a line is added with a running number. Most Pull endpoints use that number so you never have to download everything again. These request fields are common to them – each endpoint page says whether it uses them:

Field
Type
Meaning

GlobalModifyCode

number

Where to start in the change log. See the three ways below.

DateFrom, DateTo

date

A period of the change log, used when GlobalModifyCode is 0. Send them as null when you are not asking for a period – leaving them out of the request gives "Invalid Date From..".

Branch_Codes_From

text

Branch codes separated by commas, for example "2,5". Only documents of these branches are returned. Leave empty for all branches.

Doc_Num_Like

text

Only documents whose number starts with this text, for example "WSL".

Doc_Codes

text

Logic ERP's internal numbers of particular records, separated by commas, for example "10452,10453". When this is filled (and GlobalModifyCode is not -1), these records are returned and the bookmark and period fields are ignored. Branch_Codes_From still applies.

There are three ways to fetch changes:

1. Keep your own bookmark – recommended.

  • The first time, send "GlobalModifyCode": 0 with "DateFrom": null and "DateTo": null. You get the first batch from the start of the change log.

  • Store the LastGlobalModifyCode from the response.

  • Next time, send that number as GlobalModifyCode. You get the next batch. A batch covers up to 150 change-log lines; a document saved and then edited takes two lines but is returned once.

  • Repeat until GetData is empty and Message says nothing was found. Then wait and call again later.

2. Let Logic ERP keep the bookmark. Send "GlobalModifyCode": -1. Logic ERP remembers, for your API site, what it has already sent you, and each call returns the next batch. Records are marked as sent only when the call succeeds. Records that your Logic ERP team has marked to be sent again are returned first.

3. Ask for a period. Send "GlobalModifyCode": 0 with both DateFrom and DateTo. You get every record saved or changed in that period, with no 150 limit. The period is the date of the change, not the document date: an invoice dated in March that was edited in April is found by an April period. A period request returns LastGlobalModifyCode as 0 – do not store it as your bookmark.

Example — a shop that reads new sale invoices every 15 minutes

At 10:00 the shop sends "GlobalModifyCode": 0, "DateFrom": null, "DateTo": null. It gets the first batch and "LastGlobalModifyCode": 8812. It stores 8812 and calls again at once with "GlobalModifyCode": 8812, gets the rest and "LastGlobalModifyCode": 8901. A third call with 8901 returns no invoices and "No Pending Sale Bill found...", with LastGlobalModifyCode still 8901.

At 10:15 it calls with 8901 and gets only the invoices saved or edited since 10:00.

A record that is edited again after you fetched it appears again in a later batch, so update your copy rather than adding a second one.

When the request asks for a period, these checks answer with Status: true and no data – check Message:

  • DateFrom with "DateTo": null gives "If Date From exists then Date To cannot be null..Please Check.."

  • DateFrom with DateTo left out of the request gives "Invalid Date To."

  • DateFrom later than DateTo gives "Date From cannot be greater than Date To...Please Check.."

  • A value that is not a date gives "Invalid Date From.." or "Invalid Date To."

Saves of the same kind run one at a time

When your support team switches on request queueing for your API site, Push requests to the same endpoint for the same branch are saved one after another, in the order they arrive, instead of at the same moment. Each request still gets its own answer; it may simply take a little longer at busy times.

Messages any endpoint can return

Message
What it means
What to do

Validating License error... (Push), or a licence message such as License for product is not available. (Pull)

The endpoint is not covered by your licence.

Ask your Logic ERP support team.

Your data meters balance for the product [ … ] has been fully utilized. Kindly recharge your balance promptly to avoid any interruption. (Pull)

Your Pull data allowance is used up.

Recharge the balance.

Unable to Get Meters Balance... (Pull)

Logic ERP could not check your data allowance.

Try again later; if it continues, ask support.

Payload Request Can`t be null. Please Check..., or an error

The Push request had no body.

Send the request JSON.

You have already refreshed … Seconds ago. Refreshing of … is allowed only at minimum interval of … Seconds. (Pull)

Your API site allows this endpoint only once in a set number of seconds. The limit counts calls from everyone using your API site.

Wait and call again.

A message containing API Template … is Marked as In-Active..., API Template … not found. Please Check... or Logic User Not Linked

Your API site's setup in Logic ERP is switched off, missing or incomplete.

Ask your Logic ERP support team.