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

Get Delivery Orders

Returns your delivery orders that still have goods pending to be delivered, each with its header (delivery order number and date, branch, party, the sale order it was made from) and its pending item lines (item, lot, pending quantity, MRP, packing, box and bin). It also reports delivery orders that were deleted. Use it to pick and pack against delivery orders in your own system – normally by asking only for delivery orders added or changed since your last call.

Endpoint

Name
Detail

Address

https://your-server/api/GetDeliveryOrder

Method

POST

Authorization

Basic Auth

Also accepted: https://your-server/api/GetDelvieryOrder (misspelt), which works the same way.

The response and the common request fields are explained in How Every API Call Works.

Request fields

Field
Type
Required
Default
Meaning

GlobalModifyCode

number

No

0

Your bookmark in the change log, as described in How Every API Call Works: 0 = from the start (or a period, with DateFrom/DateTo), a number = only changes after it, -1 = Logic ERP keeps the bookmark for you.

DateFrom, DateTo

date

No

empty

With GlobalModifyCode 0: a period – see the rules, the period also filters on the delivery order date. With Doc_Codes or with a bookmark: only delivery orders dated in this period. Send both as null when you do not want them – with GlobalModifyCode 0 and no Doc_Codes, leaving them out gives Invalid Date From... Write them as yyyy-MM-dd.

Doc_Codes

text

No

empty

Logic ERP's internal delivery order numbers (Doc_Code in the response), separated by commas, for example "5346,5353". Returns these delivery orders (if they still have pending goods) and reports those of them that were deleted; the bookmark is ignored. Numbers and commas only.

Branch_Codes_From

text

No

empty

Branch codes separated by commas, for example "2,5". Used only in a period request – see the known issue.

Doc_Num_Like

text

No

empty

Only delivery orders whose number starts with this text, written prefix-number, for example "MDO-". Used with the bookmark or a period.

Field names are matched without regard to upper or lower case. Other fields in the request are ignored.

Rules Logic ERP applies

  • Only pending goods. A delivery order is returned only with its lines that still have a quantity pending, and Quantity is that pending quantity. A delivery order with nothing pending any more (for example fully billed) is not returned at all – it simply stops appearing. Delivery orders still waiting for approval are not returned.

  • Deleted delivery orders in the batch (or named in Doc_Codes, or changed in the period) are returned with Action_Code "2", their number, date and branch, empty or null other fields and an empty LstItems. Remove them from your system.

  • With a bookmark, each call reads up to 150 change-log lines and returns the delivery orders they belong to. When none of them can be returned (for example because none has pending goods any more), you get "No Pending Delivery Order found..." with Status: true and a higher LastGlobalModifyCode – store it and call again. You have caught up when you get the same message and LastGlobalModifyCode is the value you sent.

  • A delivery order can come back in a later batch. Every save adds a line to the change log, so a delivery order edited after your bookmark is returned again with its current pending lines. Update it in your system; do not add it a second time.

  • Not split by financial year. Delivery orders are not kept per financial year, and those of every year are returned. The internal number of a deleted delivery order can later be given to a new one, so after an Action_Code "2" treat a later record with the same Doc_Code as a new delivery order. The change-log problem with earlier financial years that affects some other endpoints does not apply here.

  • A period request returns delivery orders that were saved or changed in the period and are dated in it. Dates sent with a bookmark or with Doc_Codes also filter on the delivery order date.

  • With Doc_Codes and with a period request, LastGlobalModifyCode comes back as 0 – do not store it.

  • Your Logic ERP team can limit this endpoint in the API site setup to certain branches, party groups and delivery order prefixes, and chooses between bin-wise and other delivery orders (you receive one kind only, never both) and between the normal lines and the lines of completed packing. Delivery orders outside these settings are never returned, whatever you send; deleted delivery orders are filtered by branch and prefix only.

  • Packing slips are kept with delivery orders but are returned only when the site is set to return the lines of completed packing, and then only packing slips made against a sale order. A packing slip saved with Save a Packing Slip Against a Sale Order is not returned on the normal setting.

  • Lines can be combined. Depending on the API site setup, lines of the same item with the same lot MRP, or with the same item MRP, are returned as one line with the quantities added; with either of these settings every line has DO_Txn_Code 0. Otherwise there is one entry per delivery order line.

  • Every line must find its sale order line, reservation, lot, item, item group records (company, colour, pack) and the sale order's party and currency; a line that cannot is left out. In normal use these records always exist.

  • Delivery orders are returned in order of Doc_Code, with the deleted ones after the others.

  • Dates in the response are text dd/MM/yyyy, for example 19/10/2026.

Known issue – a delivery order edited later than its date is missed by a period request. A period request returns a delivery order only when both its date and its last change fall in the period. Use the bookmark to follow changes.

Known issue – Branch_Codes_From is ignored with a bookmark and with Doc_Codes. Delivery orders of all branches are returned. It filters only in a period request, and there a value that is not numbers and commas is silently ignored. Filter on DO_Branch_Code in your system.

Known issue – Customer_Name and SO_Delivery_Date are always null. Use PartyUserCode to identify the party.

Known issue – some deleted delivery orders make the request fail. When the internal number of a deleted delivery order was deleted more than once, or was given again to a new delivery order, any request that covers that number fails with An item with the same key has already been added. and Status: false, every time. Ask your Logic ERP support team; LastGlobalModifyCode in that answer is the end of the failed batch.

Example request

Next batch after your stored bookmark:

Two delivery orders by their internal numbers:

Test it

Send a request to the Logic ERP sandbox (a test company) from this page: open the block below, enter the sandbox user name and password (ask your Logic ERP support team), change the request if you like, and press Test it. The example asks for the first batch of the change log; send the LastGlobalModifyCode you get back to see the next batch. Do not send "GlobalModifyCode": -1 here – it changes what the sandbox has marked as already sent.

Get Delivery Orders

post

Returns your delivery orders that still have goods pending to be delivered, each with its header (delivery order number and date, branch, party, the sale order it was made from) and its pending item lines (item, lot, pending quantity, MRP, packing, box and bin). It also reports delivery orders that were deleted. Use it to pick and pack against delivery orders in your own system – normally by asking only for delivery orders added or changed since your last call.

Authorizations
AuthorizationstringRequired

The user name and password of your API site.

Body
GlobalModifyCodeintegerOptional

Your bookmark in the change log, as described in How Every API Call Works: 0 = from the start (or a period, with DateFrom/DateTo), a number = only changes after it, -1 = Logic ERP keeps the bookmark for you.

DateFromstring · nullableOptional

With GlobalModifyCode 0: a period – see the rules, the period also filters on the delivery order date. With Doc_Codes or with a bookmark: only delivery orders dated in this period. Send both as null when you do not want them – with GlobalModifyCode 0 and no Doc_Codes, leaving them out gives Invalid Date From... Write them as yyyy-MM-dd.

DateTostring · nullableOptional

With GlobalModifyCode 0: a period – see the rules, the period also filters on the delivery order date. With Doc_Codes or with a bookmark: only delivery orders dated in this period. Send both as null when you do not want them – with GlobalModifyCode 0 and no Doc_Codes, leaving them out gives Invalid Date From... Write them as yyyy-MM-dd.

Doc_CodesstringOptional

Logic ERP's internal delivery order numbers (Doc_Code in the response), separated by commas, for example "5346,5353". Returns these delivery orders (if they still have pending goods) and reports those of them that were deleted; the bookmark is ignored. Numbers and commas only.

Branch_Codes_FromstringOptional

Branch codes separated by commas, for example "2,5". Used only in a period request – see the known issue.

Doc_Num_LikestringOptional

Only delivery orders whose number starts with this text, written prefix-number, for example "MDO-". Used with the bookmark or a period.

Responses
200

Always HTTP 200. Check Status, Message and GetData.

application/json
StatusbooleanOptional

See the Status rules on this page and on How Every API Call Works.

MessagestringOptional

Why the call failed, or a note. The reason may be followed by technical detail - read the first line.

LastGlobalModifyCodeintegerOptional

The change-log bookmark (see How Every API Call Works).

resultSizestringOptional

Size of the answer, for example "2 KB".

post/GetDeliveryOrder
POST /api/GetDeliveryOrder HTTP/1.1
Host: demo.logicerp.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 52

{
  "GlobalModifyCode": 0,
  "DateFrom": null,
  "DateTo": null
}
{
  "GetData": [
    {
      "DisplayError": "text",
      "Doc_Type": "text",
      "Doc_Code": 1,
      "Doc_Prefix": "text",
      "Doc_Number": 1,
      "DO_Date": "text",
      "DO_Branch_Code": 1,
      "BranchCode_To": 1,
      "PartyUserCode": "text",
      "SO_Head_Code": 1,
      "SO_No": "text",
      "SO_Date": "text",
      "Customer_Name": "text",
      "SO_Delivery_Date": "text",
      "Action_Code": "text",
      "Logic_User_Name": "text",
      "CurrencyName": "text",
      "ExchangeRate": 1,
      "PickListDocCode": 1,
      "LstItems": [
        {
          "ItemDetCode": 1,
          "DO_Txn_Code": 1,
          "Lot_Code": 1,
          "AddlItemCode": "text",
          "LogicUser_Code": "text",
          "Packing_Box_No": "text",
          "Packing_Box_Weight": 1,
          "Quantity": 1,
          "Packing": "text",
          "Packing_CF1": 1,
          "Packing_CF1_Desc": "text",
          "MRP": 1,
          "Lot_MRP": 1,
          "BinCode": 1,
          "BinName": "text",
          "ItemType": "text"
        }
      ]
    }
  ],
  "Status": true,
  "Message": "text",
  "LastGlobalModifyCode": 1,
  "resultSize": "text"
}

Response fields

Each item in GetData is one delivery order:

Field
Type
Meaning

Doc_Code

number

Logic ERP's internal delivery order number. Use it in Doc_Codes.

Doc_Prefix

text

Delivery order prefix, for example MDO.

Doc_Number

number

Delivery order number within the prefix.

DO_Date

date

Delivery order date, dd/MM/yyyy.

DO_Branch_Code

number

Code of the delivery order's branch.

PartyUserCode

text

Code of the sale order's party as shown in Logic ERP.

SO_Head_Code

number

Logic ERP's internal number of the sale order the delivery order was made from (Vouch_Code in Get Sale Orders).

SO_No

text

That sale order's number as stored, for example MSO 187.

SO_Date

date

That sale order's date, dd/MM/yyyy.

Customer_Name, SO_Delivery_Date

–

Always null – see the known issue.

Action_Code

text

The latest change: "0" = added, "1" = modified, "2" = deleted; empty when the delivery order has no change-log line.

Logic_User_Name

text

The Logic ERP user who made the latest change.

CurrencyName

text

Currency of the sale order, for example INR.

ExchangeRate

number

Exchange rate of that currency; 1 for rupees.

DisplayError, Doc_Type

text

Always "". Ignore them.

BranchCode_To, PickListDocCode

number

Always 0. Ignore them.

LstItems

list

The pending item lines. See below.

When a delivery order holds lines of several sale orders, the sale-order fields are those of its last line.

LstItems — one entry per pending line (or per combined line, see the rules):

Field
Type
Meaning

DO_Txn_Code

number

Logic ERP's internal delivery order line number; 0 when your setup combines lines (see the rules).

ItemDetCode

number

Logic ERP's internal item number.

Lot_Code

number

Internal number of the lot reserved for the line.

AddlItemCode

text

The item's additional code, for example a barcode.

LogicUser_Code

text

Item code as shown in Logic ERP (UserCode in Get Item Master).

Quantity

number

Quantity still pending on the line.

Packing

text

Packing description from the item master, for example PCS.

Packing_CF1, Packing_CF1_Desc

number, text

The item's first conversion factor and its description.

MRP

number

MRP in the item master.

Lot_MRP

number

MRP of the reserved lot.

Packing_Box_No

text

Box number(s) the goods are packed in; empty when not packed.

Packing_Box_Weight

number

Always 0.

BinCode, BinName

number, text

The bin the goods are reserved in, when your setup uses bin-wise delivery orders; otherwise 0 and "".

ItemType

–

Always null. Ignore it.

Example response

Messages you may see

Message
Meaning
What to do

No Pending Delivery Order found... (with Status: true)

Nothing has been added to the change log after your bookmark; or the delivery orders in the batch, the period or your Doc_Codes have no pending goods, are outside your filters or the API site setup, or were not found.

With a bookmark: store the LastGlobalModifyCode (it is higher when lines were read) and call again; when it equals what you sent, you are up to date.

An item with the same key has already been added. (with Status: false)

The request covers a delivery order number that was deleted more than once or used again – see the known issue.

Ask your Logic ERP support team.

Request cannot be processed. API Template is marked as In-Active in the configuration. (with Status: false)

Your Logic ERP team has switched this endpoint off for your API site.

Ask your Logic ERP support team.

A database error (with Status: false), for example Invalid column name 'abc'.

Doc_Codes contains something other than numbers and commas. The reason may be followed by technical detail – read the first line.

Send Doc_Codes as numbers separated by commas.

Last updated