> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://open-api-docs.dice.tech/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://open-api-docs.dice.tech/_mcp/server.

# Update PO Line Item

POST https://heimdall.eka.io/apis/external/po/updatePoLineItem
Content-Type: application/json

### Update Purchase Order Line Item

This API allows you to update the line items of a purchase order.

**Request Body**

| Param               | Required  | Type    | Description                                            |
| ------------------- | --------- | ------- | ------------------------------------------------------ |
| orderId             | Mandatory | String  | The ID of the order.                                   |
| items               | Mandatory | Object  | An object containing the list of purchase order items. |
| poItems             | Mandatory | Array   | An array of purchase order items.                      |
| base                | Mandatory | Number  | The base value.                                        |
| notes               | Mandatory | String  | Additional notes for the item.                         |
| product             | Mandatory | Object  | Details of the product.                                |
| productId           | Mandatory | String  | The ID of the product.                                 |
| value               | Mandatory | Number  | The value of the product.                              |
| name                | Mandatory | String  | The name of the product.                               |
| isMaster            | Mandatory | Boolean | Indicates if it's a master product.                    |
| gl                  | Optional  | String  | General ledger code.                                   |
| image               | Optional  | String  | URL of the product image.                              |
| title               | Optional  | String  | Title of the product.                                  |
| desc                | Optional  | String  | Description of the product.                            |
| currency            | Mandatory | String  | Currency of the product.                               |
| hsn                 | Optional  | String  | Harmonized System Nomenclature code.                   |
| sku                 | Optional  | String  | Stock Keeping Unit code.                               |
| type                | Optional  | String  | Type of the product.                                   |
| service             | Optional  | String  | Indicates if it's a service.                           |
| units               | Optional  | String  | Units of the product.                                  |
| sale                | Mandatory | Boolean | Indicates if the product is for sale.                  |
| amount              | Mandatory | Number  | The amount of the product.                             |
| buy                 | Mandatory | Boolean | Indicates if the product is for purchase.              |
| taxCode             | Optional  | String  | Tax code for the product.                              |
| qtty                | Mandatory | Number  | The quantity of the item.                              |
| delete              | Optional  | Boolean | Indicates if the item should be deleted.               |
| lineItemReferenceNo | Optional  | String  | The reference number of the line item.                 |

**Response**

* `success` (boolean): Indicates if the update was successful.

#### Example

```json
{
    "success": true
}

```

Reference: https://open-api-docs.dice.tech/dice-standardized-ap-is-v-2-copy/purchase-orders-po/update-po-line-item

## Servers

- `https://heimdall.eka.io` (https://heimdall.eka.io, default)
- `https://heimdall.eka.ioapis` (https://heimdall.eka.ioapis)

## Request

### Headers

- `DICE-APP-ID` (string, optional)
- `X-CLIENT-ID` (string, optional)
- `X-CLIENT-SECRET` (string, optional)

### Body (application/json)

- `orderId` (string, required)
- `items` (object, required)
  - `poItems` (list of object, required)
    - `base` (integer, required)
    - `notes` (string, required)
    - `product` (object, required)
      - `productId` (string, required)
      - `value` (integer, required)
      - `name` (string, required)
      - `isMaster` (boolean, required)
      - `gl` (string, required)
      - `image` (string, required)
      - `title` (string, required)
      - `desc` (string, required)
      - `currency` (string, required)
      - `hsn` (string, required)
      - `sku` (string, required)
      - `type` (string, required)
      - `service` (string, required)
      - `units` (string, required)
      - `sale` (boolean, required)
      - `amount` (integer, required)
      - `buy` (boolean, required)
      - `taxCode` (string, required)
    - `qtty` (integer, required)
    - `delete` (boolean, required)
    - `lineItemReferenceNo` (string, required)

## Response

### 200

OK

- `success` (boolean, required)

## Examples

**Request**

```json
{
  "orderId": "PO-INDIAN-00407",
  "items": {
    "poItems": [
      {
        "base": 10,
        "notes": "notes_19bff02810e6",
        "product": {
          "productId": "productId_a5dee216a7aa",
          "value": 10,
          "name": "name_4f3f881dcf9c",
          "isMaster": false,
          "gl": "gl_2d79a81a7d3c",
          "image": "image_57d43ec97f13",
          "title": "title_b688b6911b0f",
          "desc": "desc_c416fc3303ef",
          "currency": "currency_990fca78f9ea",
          "hsn": "hsn_ae0c650bd069",
          "sku": "sku_6cd80d0edfc8",
          "type": "type_9188d05ed698",
          "service": "service_6792d58b413d",
          "units": "units_12465f199f68",
          "sale": false,
          "amount": 10,
          "buy": false,
          "taxCode": "taxCode_010e2c9494ad"
        },
        "qtty": 10,
        "delete": false,
        "lineItemReferenceNo": "lineItemReferenceNo_bd020783bb89"
      }
    ]
  }
}
```

**Response**

```json
{
  "success": true
}
```

**SDK Code**

```python Purchase Orders(PO)_Update PO Line Item_example
import requests

url = "https://heimdall.eka.io/apis/external/po/updatePoLineItem"

payload = {
    "orderId": "PO-INDIAN-00407",
    "items": { "poItems": [
            {
                "base": 10,
                "notes": "notes_19bff02810e6",
                "product": {
                    "productId": "productId_a5dee216a7aa",
                    "value": 10,
                    "name": "name_4f3f881dcf9c",
                    "isMaster": False,
                    "gl": "gl_2d79a81a7d3c",
                    "image": "image_57d43ec97f13",
                    "title": "title_b688b6911b0f",
                    "desc": "desc_c416fc3303ef",
                    "currency": "currency_990fca78f9ea",
                    "hsn": "hsn_ae0c650bd069",
                    "sku": "sku_6cd80d0edfc8",
                    "type": "type_9188d05ed698",
                    "service": "service_6792d58b413d",
                    "units": "units_12465f199f68",
                    "sale": False,
                    "amount": 10,
                    "buy": False,
                    "taxCode": "taxCode_010e2c9494ad"
                },
                "qtty": 10,
                "delete": False,
                "lineItemReferenceNo": "lineItemReferenceNo_bd020783bb89"
            }
        ] }
}
headers = {
    "DICE-APP-ID": "{{Company Code}}",
    "X-CLIENT-ID": "{{API Client ID}}",
    "X-CLIENT-SECRET": "{{API Client Secret}}",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Purchase Orders(PO)_Update PO Line Item_example
const url = 'https://heimdall.eka.io/apis/external/po/updatePoLineItem';
const options = {
  method: 'POST',
  headers: {
    'DICE-APP-ID': '{{Company Code}}',
    'X-CLIENT-ID': '{{API Client ID}}',
    'X-CLIENT-SECRET': '{{API Client Secret}}',
    'Content-Type': 'application/json'
  },
  body: '{"orderId":"PO-INDIAN-00407","items":{"poItems":[{"base":10,"notes":"notes_19bff02810e6","product":{"productId":"productId_a5dee216a7aa","value":10,"name":"name_4f3f881dcf9c","isMaster":false,"gl":"gl_2d79a81a7d3c","image":"image_57d43ec97f13","title":"title_b688b6911b0f","desc":"desc_c416fc3303ef","currency":"currency_990fca78f9ea","hsn":"hsn_ae0c650bd069","sku":"sku_6cd80d0edfc8","type":"type_9188d05ed698","service":"service_6792d58b413d","units":"units_12465f199f68","sale":false,"amount":10,"buy":false,"taxCode":"taxCode_010e2c9494ad"},"qtty":10,"delete":false,"lineItemReferenceNo":"lineItemReferenceNo_bd020783bb89"}]}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Purchase Orders(PO)_Update PO Line Item_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://heimdall.eka.io/apis/external/po/updatePoLineItem"

	payload := strings.NewReader("{\n  \"orderId\": \"PO-INDIAN-00407\",\n  \"items\": {\n    \"poItems\": [\n      {\n        \"base\": 10,\n        \"notes\": \"notes_19bff02810e6\",\n        \"product\": {\n          \"productId\": \"productId_a5dee216a7aa\",\n          \"value\": 10,\n          \"name\": \"name_4f3f881dcf9c\",\n          \"isMaster\": false,\n          \"gl\": \"gl_2d79a81a7d3c\",\n          \"image\": \"image_57d43ec97f13\",\n          \"title\": \"title_b688b6911b0f\",\n          \"desc\": \"desc_c416fc3303ef\",\n          \"currency\": \"currency_990fca78f9ea\",\n          \"hsn\": \"hsn_ae0c650bd069\",\n          \"sku\": \"sku_6cd80d0edfc8\",\n          \"type\": \"type_9188d05ed698\",\n          \"service\": \"service_6792d58b413d\",\n          \"units\": \"units_12465f199f68\",\n          \"sale\": false,\n          \"amount\": 10,\n          \"buy\": false,\n          \"taxCode\": \"taxCode_010e2c9494ad\"\n        },\n        \"qtty\": 10,\n        \"delete\": false,\n        \"lineItemReferenceNo\": \"lineItemReferenceNo_bd020783bb89\"\n      }\n    ]\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("DICE-APP-ID", "{{Company Code}}")
	req.Header.Add("X-CLIENT-ID", "{{API Client ID}}")
	req.Header.Add("X-CLIENT-SECRET", "{{API Client Secret}}")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Purchase Orders(PO)_Update PO Line Item_example
require 'uri'
require 'net/http'

url = URI("https://heimdall.eka.io/apis/external/po/updatePoLineItem")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["DICE-APP-ID"] = '{{Company Code}}'
request["X-CLIENT-ID"] = '{{API Client ID}}'
request["X-CLIENT-SECRET"] = '{{API Client Secret}}'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"orderId\": \"PO-INDIAN-00407\",\n  \"items\": {\n    \"poItems\": [\n      {\n        \"base\": 10,\n        \"notes\": \"notes_19bff02810e6\",\n        \"product\": {\n          \"productId\": \"productId_a5dee216a7aa\",\n          \"value\": 10,\n          \"name\": \"name_4f3f881dcf9c\",\n          \"isMaster\": false,\n          \"gl\": \"gl_2d79a81a7d3c\",\n          \"image\": \"image_57d43ec97f13\",\n          \"title\": \"title_b688b6911b0f\",\n          \"desc\": \"desc_c416fc3303ef\",\n          \"currency\": \"currency_990fca78f9ea\",\n          \"hsn\": \"hsn_ae0c650bd069\",\n          \"sku\": \"sku_6cd80d0edfc8\",\n          \"type\": \"type_9188d05ed698\",\n          \"service\": \"service_6792d58b413d\",\n          \"units\": \"units_12465f199f68\",\n          \"sale\": false,\n          \"amount\": 10,\n          \"buy\": false,\n          \"taxCode\": \"taxCode_010e2c9494ad\"\n        },\n        \"qtty\": 10,\n        \"delete\": false,\n        \"lineItemReferenceNo\": \"lineItemReferenceNo_bd020783bb89\"\n      }\n    ]\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java Purchase Orders(PO)_Update PO Line Item_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://heimdall.eka.io/apis/external/po/updatePoLineItem")
  .header("DICE-APP-ID", "{{Company Code}}")
  .header("X-CLIENT-ID", "{{API Client ID}}")
  .header("X-CLIENT-SECRET", "{{API Client Secret}}")
  .header("Content-Type", "application/json")
  .body("{\n  \"orderId\": \"PO-INDIAN-00407\",\n  \"items\": {\n    \"poItems\": [\n      {\n        \"base\": 10,\n        \"notes\": \"notes_19bff02810e6\",\n        \"product\": {\n          \"productId\": \"productId_a5dee216a7aa\",\n          \"value\": 10,\n          \"name\": \"name_4f3f881dcf9c\",\n          \"isMaster\": false,\n          \"gl\": \"gl_2d79a81a7d3c\",\n          \"image\": \"image_57d43ec97f13\",\n          \"title\": \"title_b688b6911b0f\",\n          \"desc\": \"desc_c416fc3303ef\",\n          \"currency\": \"currency_990fca78f9ea\",\n          \"hsn\": \"hsn_ae0c650bd069\",\n          \"sku\": \"sku_6cd80d0edfc8\",\n          \"type\": \"type_9188d05ed698\",\n          \"service\": \"service_6792d58b413d\",\n          \"units\": \"units_12465f199f68\",\n          \"sale\": false,\n          \"amount\": 10,\n          \"buy\": false,\n          \"taxCode\": \"taxCode_010e2c9494ad\"\n        },\n        \"qtty\": 10,\n        \"delete\": false,\n        \"lineItemReferenceNo\": \"lineItemReferenceNo_bd020783bb89\"\n      }\n    ]\n  }\n}")
  .asString();
```

```php Purchase Orders(PO)_Update PO Line Item_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://heimdall.eka.io/apis/external/po/updatePoLineItem', [
  'body' => '{
  "orderId": "PO-INDIAN-00407",
  "items": {
    "poItems": [
      {
        "base": 10,
        "notes": "notes_19bff02810e6",
        "product": {
          "productId": "productId_a5dee216a7aa",
          "value": 10,
          "name": "name_4f3f881dcf9c",
          "isMaster": false,
          "gl": "gl_2d79a81a7d3c",
          "image": "image_57d43ec97f13",
          "title": "title_b688b6911b0f",
          "desc": "desc_c416fc3303ef",
          "currency": "currency_990fca78f9ea",
          "hsn": "hsn_ae0c650bd069",
          "sku": "sku_6cd80d0edfc8",
          "type": "type_9188d05ed698",
          "service": "service_6792d58b413d",
          "units": "units_12465f199f68",
          "sale": false,
          "amount": 10,
          "buy": false,
          "taxCode": "taxCode_010e2c9494ad"
        },
        "qtty": 10,
        "delete": false,
        "lineItemReferenceNo": "lineItemReferenceNo_bd020783bb89"
      }
    ]
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'DICE-APP-ID' => '{{Company Code}}',
    'X-CLIENT-ID' => '{{API Client ID}}',
    'X-CLIENT-SECRET' => '{{API Client Secret}}',
  ],
]);

echo $response->getBody();
```

```csharp Purchase Orders(PO)_Update PO Line Item_example
using RestSharp;

var client = new RestClient("https://heimdall.eka.io/apis/external/po/updatePoLineItem");
var request = new RestRequest(Method.POST);
request.AddHeader("DICE-APP-ID", "{{Company Code}}");
request.AddHeader("X-CLIENT-ID", "{{API Client ID}}");
request.AddHeader("X-CLIENT-SECRET", "{{API Client Secret}}");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"orderId\": \"PO-INDIAN-00407\",\n  \"items\": {\n    \"poItems\": [\n      {\n        \"base\": 10,\n        \"notes\": \"notes_19bff02810e6\",\n        \"product\": {\n          \"productId\": \"productId_a5dee216a7aa\",\n          \"value\": 10,\n          \"name\": \"name_4f3f881dcf9c\",\n          \"isMaster\": false,\n          \"gl\": \"gl_2d79a81a7d3c\",\n          \"image\": \"image_57d43ec97f13\",\n          \"title\": \"title_b688b6911b0f\",\n          \"desc\": \"desc_c416fc3303ef\",\n          \"currency\": \"currency_990fca78f9ea\",\n          \"hsn\": \"hsn_ae0c650bd069\",\n          \"sku\": \"sku_6cd80d0edfc8\",\n          \"type\": \"type_9188d05ed698\",\n          \"service\": \"service_6792d58b413d\",\n          \"units\": \"units_12465f199f68\",\n          \"sale\": false,\n          \"amount\": 10,\n          \"buy\": false,\n          \"taxCode\": \"taxCode_010e2c9494ad\"\n        },\n        \"qtty\": 10,\n        \"delete\": false,\n        \"lineItemReferenceNo\": \"lineItemReferenceNo_bd020783bb89\"\n      }\n    ]\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Purchase Orders(PO)_Update PO Line Item_example
import Foundation

let headers = [
  "DICE-APP-ID": "{{Company Code}}",
  "X-CLIENT-ID": "{{API Client ID}}",
  "X-CLIENT-SECRET": "{{API Client Secret}}",
  "Content-Type": "application/json"
]
let parameters = [
  "orderId": "PO-INDIAN-00407",
  "items": ["poItems": [
      [
        "base": 10,
        "notes": "notes_19bff02810e6",
        "product": [
          "productId": "productId_a5dee216a7aa",
          "value": 10,
          "name": "name_4f3f881dcf9c",
          "isMaster": false,
          "gl": "gl_2d79a81a7d3c",
          "image": "image_57d43ec97f13",
          "title": "title_b688b6911b0f",
          "desc": "desc_c416fc3303ef",
          "currency": "currency_990fca78f9ea",
          "hsn": "hsn_ae0c650bd069",
          "sku": "sku_6cd80d0edfc8",
          "type": "type_9188d05ed698",
          "service": "service_6792d58b413d",
          "units": "units_12465f199f68",
          "sale": false,
          "amount": 10,
          "buy": false,
          "taxCode": "taxCode_010e2c9494ad"
        ],
        "qtty": 10,
        "delete": false,
        "lineItemReferenceNo": "lineItemReferenceNo_bd020783bb89"
      ]
    ]]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://heimdall.eka.io/apis/external/po/updatePoLineItem")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```