> For the complete documentation index, see [llms.txt](https://kb.logicerp.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/orders/pull/get-delivery-notes.md).

# Get Delivery Notes

Returns your **delivery notes** – the supplier's advance notice of goods coming against a **purchase order** – each with its **header** (delivery note number and date, branch, supplier, the purchase order it is against, challan, invoice and LR details) and its **item lines** (item, quantity still to be received, purchase-order rate and MRP, box number). It also reports delivery notes that were **deleted**. Use it to prepare goods receipt in your own system – normally by asking only for delivery notes **added or changed** since your last call.

### **Endpoint**

| Name          | Detail                                    |
| ------------- | ----------------------------------------- |
| Address       | `https://your-server/api/GetDeliveryNote` |
| Method        | `POST`                                    |
| Authorization | Basic Auth                                |

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

The response and the common request fields are explained in [How Every API Call Works](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/how-every-api-call-works.md).

### **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 of **changes** (the day a delivery note was saved, edited, approved or deleted – not the delivery note date). Leave both out (or send `null`) when you are not asking for a period; with a bookmark they are not checked. Write them as `yyyy-MM-dd`. |
| `Doc_Codes`          | text   | No       | empty   | Logic ERP's internal delivery note numbers (`Doc_Code` in the response), separated by commas, for example `"1064,1086"`. Returns these delivery notes and reports those of them that were deleted; the bookmark and period are ignored. Numbers and commas only.                            |
| `Branch_Codes_From`  | text   | No       | empty   | Branch codes separated by commas, for example `"2,5"`. Only delivery notes of these branches are returned (deletions included), in every kind of request. Numbers and commas only – anything else is refused.                                                                               |
| `Doc_Num_Like`       | text   | No       | empty   | Only delivery notes whose number starts with this text, written prefix-number, for example `"DNO-"`. 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 approved delivery notes.** A delivery note still waiting for approval is not returned. Its approval adds a line to the change log, so it reaches you in a later batch once it is approved.
* **All lines, with the quantity still to be received.** Every line of a delivery note is returned, and `Quantity` is the quantity **still pending** on the line (not yet received) – `0` once nothing is pending. The quantity originally on the delivery note is not returned.
* **Deleted delivery notes** in the batch (or named in `Doc_Codes`) are returned with `Action_Code` `"D"`, 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 **200 change-log lines** and returns the delivery notes they belong to. When none of them can be returned (for example delivery notes still waiting for approval), you get `"No Record Found."` with `Status: true` and a **higher** `LastGlobalModifyCode` – store it and call again. You have caught up when the message is `"No Pending Delivery Note found..."` and `LastGlobalModifyCode` is the value you sent.
* **A delivery note can come back in a later batch.** Every save adds a line to the change log, so a delivery note edited after your bookmark is returned again with its current details. Update it in your system; do not add it a second time.
* **Not split by financial year.** Delivery notes are not kept per financial year, and those of every year are returned. If a later record arrives with the `Doc_Code` of a delivery note you removed after an `Action_Code` `"D"`, treat it as a new delivery note. The change-log problem with earlier financial years that affects some other endpoints does not apply here.
* With `Doc_Codes` and with a period request, `LastGlobalModifyCode` comes back as `0` – do not store it. `DateFrom` and `DateTo` never filter on the delivery note date, and they are ignored when `Doc_Codes` is filled.
* **Your Logic ERP team can limit this endpoint** in the API site setup to certain branches, supplier groups and delivery note prefixes. Delivery notes outside them are never returned, whatever you send; deletions are filtered by those branches and prefixes only.
* Every line must find its purchase order line, item and item records (company, colour, pack), and the delivery note its supplier and the purchase order's currency. A line that cannot is left out. In normal use these records always exist.
* Delivery notes are not returned in any useful order; the lines of each are sorted by item name and pack.
* Dates in the response are text `dd/MM/yyyy`, for example `28/03/2026`. A date that is not filled is `""`.
* **Endpoint switched off.** When your Logic ERP team has switched this endpoint off in the API site setup, `Status` is `false` and `Message` is *Request cannot be processed. API Template is marked as In-Active in the configuration.*

### **Example request**

Next batch after your stored bookmark:

```json
{
  "GlobalModifyCode": 1030222,
  "DateFrom": null,
  "DateTo": null,
  "Doc_Codes": "",
  "Branch_Codes_From": ""
}
```

Delivery notes saved or changed on one day:

```json
{
  "GlobalModifyCode": 0,
  "DateFrom": "2026-03-28",
  "DateTo": "2026-03-28",
  "Doc_Codes": ""
}
```

### **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 Notes

> Returns your delivery notes – the supplier's advance notice of goods coming against a purchase order – each with its header (delivery note number and date, branch, supplier, the purchase order it is against, challan, invoice and LR details) and its item lines (item, quantity still to be received, purchase-order rate and MRP, box number). It also reports delivery notes that were deleted. Use it to prepare goods receipt in your own system – normally by asking only for delivery notes added or changed since your last call.

```json
{"openapi":"3.0.3","info":{"title":"Logic ERP API","version":"1.0"},"tags":[{"name":"Orders - Pull"}],"servers":[{"url":"https://demo.logicerp.com/api","description":"Logic ERP sandbox (test company)"}],"security":[{"basicAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic","description":"The user name and password of your API site."}}},"paths":{"/GetDeliveryNote":{"post":{"tags":["Orders - Pull"],"operationId":"GetDeliveryNote","summary":"Get Delivery Notes","description":"Returns your delivery notes – the supplier's advance notice of goods coming against a purchase order – each with its header (delivery note number and date, branch, supplier, the purchase order it is against, challan, invoice and LR details) and its item lines (item, quantity still to be received, purchase-order rate and MRP, box number). It also reports delivery notes that were deleted. Use it to prepare goods receipt in your own system – normally by asking only for delivery notes added or changed since your last call.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"GlobalModifyCode":{"type":"integer","description":"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":{"type":"string","nullable":true,"description":"With `GlobalModifyCode` `0`: a period of changes (the day a delivery note was saved, edited, approved or deleted – not the delivery note date). Leave both out (or send `null`) when you are not asking for a period; with a bookmark they are not checked. Write them as `yyyy-MM-dd`."},"DateTo":{"type":"string","nullable":true,"description":"With `GlobalModifyCode` `0`: a period of changes (the day a delivery note was saved, edited, approved or deleted – not the delivery note date). Leave both out (or send `null`) when you are not asking for a period; with a bookmark they are not checked. Write them as `yyyy-MM-dd`."},"Doc_Codes":{"type":"string","description":"Logic ERP's internal delivery note numbers (`Doc_Code` in the response), separated by commas, for example `\"1064,1086\"`. Returns these delivery notes and reports those of them that were deleted; the bookmark and period are ignored. Numbers and commas only."},"Branch_Codes_From":{"type":"string","description":"Branch codes separated by commas, for example `\"2,5\"`. Only delivery notes of these branches are returned (deletions included), in every kind of request. Numbers and commas only – anything else is refused."},"Doc_Num_Like":{"type":"string","description":"Only delivery notes whose number starts with this text, written prefix-number, for example `\"DNO-\"`. Used with the bookmark or a period."}}}}}},"responses":{"200":{"description":"Always HTTP 200. Check Status, Message and GetData.","content":{"application/json":{"schema":{"type":"object","properties":{"GetData":{"type":"array","items":{"type":"object","properties":{"Doc_Type":{"type":"string","description":"Always `DNO`."},"Doc_Code":{"type":"integer","description":"Logic ERP's internal delivery note number. Use it in `Doc_Codes`."},"Doc_Prefix":{"type":"string","description":"Delivery note prefix, for example `DNO`."},"Doc_Number":{"type":"integer","description":"Delivery note number within the prefix."},"DO_Date":{"type":"string","description":"The delivery note date, `dd/MM/yyyy` (despite the field name)."},"DO_Branch_Code":{"type":"integer","description":"Code of the delivery note's branch."},"PartyUserCode":{"type":"string","description":"Code of the supplier as shown in Logic ERP."},"PO_Code":{"type":"integer","description":"Logic ERP's internal number of the purchase order the delivery note is against (`Vouch_Code` in Get Purchase Orders)."},"PO_Order_No":{"type":"string","description":"That purchase order's number, for example `POT-262`."},"PO_No":{"type":"string","description":"That purchase order's voucher number as stored, for example `PO202603283`."},"PO_Date":{"type":"string","description":"That purchase order's voucher date, `dd/MM/yyyy`."},"Party_Name":{"type":"string","description":"Name of the supplier as kept in Logic ERP, usually with its city; there may be several spaces before the `-` and the city."},"DN_Txn_Code":{"type":"integer","description":"Internal number of one of the delivery note's lines. Ignore it; use `Txn_Code` on the lines."},"Remarks_1":{"type":"string","description":"Remarks typed on the delivery note (may be a single space)."},"Remarks_2":{"type":"string","description":"Remarks typed on the delivery note (may be a single space)."},"LR_No":{"type":"string","description":"Transport LR number and date."},"LR_Date":{"type":"string","description":"Transport LR number and date."},"Challan_No":{"type":"string","description":"The supplier's challan number and date."},"Challan_Date":{"type":"string","description":"The supplier's challan number and date."},"Invoice_No":{"type":"string","description":"The supplier's invoice number and date."},"Invoice_Date":{"type":"string","description":"The supplier's invoice number and date."},"Logic_User_Name":{"type":"string","description":"The Logic ERP user who made the latest change."},"Action_Code":{"type":"string","description":"The latest change: `N` = added, `M` = modified (also after an approval), `D` = deleted."},"Delivery_Date":{"type":"string","description":"Delivery date typed on the delivery note; `\"\"` when not filled."},"Exchange_Rate":{"type":"number","description":"Exchange rate of the purchase order; `1` for rupees."},"Currency":{"type":"string","description":"Currency of the purchase order, for example `INR`."},"LstItems":{"type":"array","items":{"type":"object","properties":{"AddlItemCode":{"type":"string","description":"The item's additional code, for example a barcode."},"LogicUser_Code":{"type":"string","description":"Item code as shown in Logic ERP (`UserCode` in Get Item Master)."},"Quantity":{"type":"number","description":"Quantity still pending on the line; `0` once nothing is pending."},"Packing":{"type":"string","description":"Packing description from the item master."},"Packing_CF1":{"type":"number","description":"The item's first conversion factor and its description."},"Packing_CF1_Desc":{"type":"string","description":"The item's first conversion factor and its description."},"PO_Rate":{"type":"number","description":"Rate on the purchase order line."},"PO_MRP":{"type":"number","description":"MRP on the purchase order line."},"Packing_Box_No":{"type":"string","description":"Box number the goods are packed in; empty when none."},"Txn_Code":{"type":"integer","description":"Logic ERP's internal delivery note line number."}}},"description":"The item lines. See below."}}},"nullable":true,"description":"The records found; null when the call failed or nothing was found - read Message."},"Status":{"type":"boolean","description":"See the Status rules on this page and on How Every API Call Works."},"Message":{"type":"string","description":"Why the call failed, or a note. The reason may be followed by technical detail - read the first line."},"LastGlobalModifyCode":{"type":"integer","description":"The change-log bookmark (see How Every API Call Works)."},"resultSize":{"type":"string","description":"Size of the answer, for example \"2 KB\"."}}}}}},"401":{"description":"No login was sent."}}}}}}
```

### **Response fields**

Each item in `GetData` is one delivery note:

| Field                        | Type       | Meaning                                                                                                                                                                                                                                                   |
| ---------------------------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Doc_Type`                   | text       | Always `DNO`.                                                                                                                                                                                                                                             |
| `Doc_Code`                   | number     | Logic ERP's internal delivery note number. Use it in `Doc_Codes`.                                                                                                                                                                                         |
| `Doc_Prefix`                 | text       | Delivery note prefix, for example `DNO`.                                                                                                                                                                                                                  |
| `Doc_Number`                 | number     | Delivery note number within the prefix.                                                                                                                                                                                                                   |
| `DO_Date`                    | date       | The **delivery note** date, `dd/MM/yyyy` (despite the field name).                                                                                                                                                                                        |
| `DO_Branch_Code`             | number     | Code of the delivery note's branch.                                                                                                                                                                                                                       |
| `PartyUserCode`              | text       | Code of the supplier as shown in Logic ERP.                                                                                                                                                                                                               |
| `Party_Name`                 | text       | Name of the supplier as kept in Logic ERP, usually with its city; there may be several spaces before the `-` and the city.                                                                                                                                |
| `PO_Code`                    | number     | Logic ERP's internal number of the purchase order the delivery note is against (`Vouch_Code` in [Get Purchase Orders](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/orders/pull/get-purchase-orders.md)). |
| `PO_Order_No`                | text       | That purchase order's number, for example `POT-262`.                                                                                                                                                                                                      |
| `PO_No`                      | text       | That purchase order's voucher number as stored, for example `PO202603283`.                                                                                                                                                                                |
| `PO_Date`                    | date       | That purchase order's voucher date, `dd/MM/yyyy`.                                                                                                                                                                                                         |
| `DN_Txn_Code`                | number     | Internal number of one of the delivery note's lines. Ignore it; use `Txn_Code` on the lines.                                                                                                                                                              |
| `Remarks_1`, `Remarks_2`     | text       | Remarks typed on the delivery note (may be a single space).                                                                                                                                                                                               |
| `Challan_No`, `Challan_Date` | text, date | The supplier's challan number and date.                                                                                                                                                                                                                   |
| `Invoice_No`, `Invoice_Date` | text, date | The supplier's invoice number and date.                                                                                                                                                                                                                   |
| `LR_No`, `LR_Date`           | text, date | Transport LR number and date.                                                                                                                                                                                                                             |
| `Delivery_Date`              | date       | Delivery date typed on the delivery note; `""` when not filled.                                                                                                                                                                                           |
| `Exchange_Rate`              | number     | Exchange rate of the purchase order; `1` for rupees.                                                                                                                                                                                                      |
| `Currency`                   | text       | Currency of the purchase order, for example `INR`.                                                                                                                                                                                                        |
| `Logic_User_Name`            | text       | The Logic ERP user who made the latest change.                                                                                                                                                                                                            |
| `Action_Code`                | text       | The latest change: `N` = added, `M` = modified (also after an approval), `D` = deleted.                                                                                                                                                                   |
| `LstItems`                   | list       | The item lines. See below.                                                                                                                                                                                                                                |

When a delivery note covers lines of several purchase orders, the purchase-order fields are those of one of its lines.

**`LstItems`** — one entry per delivery note line:

| Field                             | Type         | Meaning                                                                                                                                                                                           |
| --------------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Txn_Code`                        | number       | Logic ERP's internal delivery note line number.                                                                                                                                                   |
| `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](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/masters/pull/get-item-master.md)). |
| `Quantity`                        | number       | Quantity still pending on the line; `0` once nothing is pending.                                                                                                                                  |
| `Packing`                         | text         | Packing description from the item master.                                                                                                                                                         |
| `Packing_CF1`, `Packing_CF1_Desc` | number, text | The item's first conversion factor and its description.                                                                                                                                           |
| `PO_Rate`                         | number       | Rate on the purchase order line.                                                                                                                                                                  |
| `PO_MRP`                          | number       | MRP on the purchase order line.                                                                                                                                                                   |
| `Packing_Box_No`                  | text         | Box number the goods are packed in; empty when none.                                                                                                                                              |

### **Example response**

```json
{
  "GetData": [
    {
      "Doc_Type": "DNO",
      "Doc_Code": 1064,
      "Doc_Prefix": "DNO",
      "Doc_Number": 58,
      "DO_Date": "28/03/2026",
      "DO_Branch_Code": 2,
      "PartyUserCode": "S2001",
      "PO_Code": 1473,
      "PO_Order_No": "POT-262",
      "PO_No": "PO202603283",
      "PO_Date": "28/03/2026",
      "Party_Name": "JAIPUR HANDLOOM HOUSE -JAIPUR",
      "DN_Txn_Code": 1204,
      "Remarks_1": " ",
      "Remarks_2": " ",
      "LR_No": "LR-5521",
      "LR_Date": "28/03/2026",
      "Challan_No": "JHH-118",
      "Challan_Date": "28/03/2026",
      "Invoice_No": "2323",
      "Invoice_Date": "28/03/2026",
      "Logic_User_Name": "RAMESH",
      "Action_Code": "N",
      "Delivery_Date": "30/03/2026",
      "Exchange_Rate": 1.0,
      "Currency": "INR",
      "LstItems": [
        {
          "AddlItemCode": "8901234567012",
          "LogicUser_Code": "KUR-1001-M",
          "Quantity": 20.0,
          "Packing": "PCS",
          "Packing_CF1": 1.0,
          "Packing_CF1_Desc": " ",
          "PO_Rate": 750.0,
          "PO_MRP": 1499.0,
          "Packing_Box_No": "MB01",
          "Txn_Code": 1199
        }
      ]
    },
    {
      "Doc_Type": "DNO",
      "Doc_Code": 1104,
      "Doc_Prefix": "DNO",
      "Doc_Number": 93,
      "DO_Date": "26/08/2026",
      "DO_Branch_Code": 2,
      "PartyUserCode": "",
      "PO_Code": 0,
      "PO_Order_No": "",
      "PO_No": "",
      "PO_Date": null,
      "Party_Name": null,
      "DN_Txn_Code": 0,
      "Remarks_1": null,
      "Remarks_2": null,
      "LR_No": null,
      "LR_Date": null,
      "Challan_No": null,
      "Challan_Date": null,
      "Invoice_No": null,
      "Invoice_Date": null,
      "Logic_User_Name": null,
      "Action_Code": "D",
      "Delivery_Date": null,
      "Exchange_Rate": 0.0,
      "Currency": null,
      "LstItems": []
    }
  ],
  "Status": true,
  "Message": "",
  "LastGlobalModifyCode": 1094063,
  "resultSize": "3 KB"
}
```

### **Messages you may see**

| Message                                                                                                         | Meaning                                                                                                                                                                                                                                             | What to do                                                                                            |
| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| *No Pending Delivery Note found...* (with `Status: true`)                                                       | Nothing has been added to the change log after your bookmark.                                                                                                                                                                                       | You are up to date. Call again later with the same bookmark.                                          |
| *No Record Found.* (with `Status: true`)                                                                        | Change-log lines were found but no delivery note could be returned (for example still waiting for approval, or outside the API site setup or `Branch_Codes_From`), or nothing was changed in the period, or the `Doc_Codes` you sent found nothing. | With a bookmark: store the new `LastGlobalModifyCode` and call again. Otherwise: check what you sent. |
| `Invalid code in list: '…'. Only numeric codes are allowed.` (with `Status: false`)                             | `Doc_Codes` or `Branch_Codes_From` contains something other than numbers and commas.                                                                                                                                                                | Send them as numbers separated by commas.                                                             |
| `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.                                                                      |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/orders/pull/get-delivery-notes.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
