> 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 ASN Attrs

POST https://heimdall.eka.io/apis/external/asn/updateAsnAttrs/
Content-Type: application/json

### Update ASN Attributes

This endpoint allows you to update the attributes of an ASN (Advanced Shipping Notice) by sending a POST request with the necessary details.

#### Request

**URL:** `{{host}}/apis/external/asn/updateAsnAttrs/`\
**Method:** POST

**Request Body:**

```json
{
  "asnId": "ASN-KARANDEVENV-000000001",
  "asnRefNo": "ASN-2025-001",
  "data": {
    "shipmentDate": "2025-07-01",
    "carrier": "DHL",
    "trackingNumber": "TRK123456789",
    "items": [
      {
        "productId": "PROD-001",
        "quantity": 10
      }
    ]
  },
  "type": "asn",
  "logo": "https://example.com/logo.png",
  "postingTriggeredAt": 1719825600,
  "postingErrors": "None",
  "postingDocNo": "DOC-2025-ASN01",
  "postingTriggered": true,
  "postingFailed": false,
  "postingSynced": true
}

```

#### Response

**Status:** 200\
**Content-Type:** application/json

**Example Response Body:**

```json
{
  "success": true,
  "id": 13497,
  "asnId": "ASN-KARANDEVENV-000000001",
  "refNo": "ASN-2025-001"
}

```

#### Response Parameters:

* **success**: Indicates whether the update was successful.

* **id**: The unique identifier for the updated ASN.

* **asnId**: The ASN ID that was updated.

* **refNo**: The reference number associated with the ASN.

This endpoint is crucial for managing ASN updates, ensuring that all relevant shipping information is accurately reflected in the system.

This endpoint allows you to update the attributes of an existing ASN (Advanced Shipping Notice). It requires specific details about the ASN that you wish to update.

#### Request

**Method:** POST\
**URL:** `{{host}}/apis/external/asn/updateAsnAttrs/`

**Request Body:**\
The request body must be in JSON format and include the following parameters:

* **asnId** (string): The unique identifier for the ASN.

* **asnRefNo** (string): The reference number associated with the ASN.

* **data** (object): Contains shipment details.

  * **shipmentDate** (string): The date of shipment.

  * **carrier** (string): The name of the carrier handling the shipment.

  * **trackingNumber** (string): The tracking number for the shipment.

  * **items** (array): A list of items included in the shipment.

    * **productId** (string): The unique identifier for the product.

    * **quantity** (integer): The quantity of the product being shipped.

* **type** (string): The type of the ASN, typically set to "asn".

* **logo** (string): A URL pointing to the logo associated with the ASN.

* **postingTriggeredAt** (integer): A timestamp indicating when the posting was triggered.

* **postingErrors** (string): Any errors encountered during posting (if applicable).

* **postingDocNo** (string): The document number associated with the posting.

* **postingTriggered** (boolean): Indicates if the posting was triggered.

* **postingFailed** (boolean): Indicates if the posting failed.

* **postingSynced** (boolean): Indicates if the posting has been synced.

#### Response

Upon a successful request, you will receive a response with the following structure:

* **success** (boolean): Indicates whether the operation was successful.

* **id** (integer): The identifier for the operation.

* **asnId** (string): The ASN ID returned by the operation (may be empty).

* **refNo** (string): The reference number returned by the operation (may be empty).

**Example Response:**

```json
{
  "success": true,
  "id": 0,
  "asnId": "",
  "refNo": ""
}

```

#### Status Codes

* **200 OK**: The request was successful, and the ASN attributes were updated.

This endpoint allows you to update the attributes of an existing ASN (Advanced Shipping Notice). It is designed to facilitate the modification of shipment details associated with a specific ASN identified by its ID.

### Request

**Method**: POST\
**Endpoint**: `{{host}}/apis/external/asn/updateAsnAttrs/`

#### Request Body

The request body must be in JSON format and should include the following parameters:

* **asnId** (string): The unique identifier for the ASN that you wish to update.

* **asnRefNo** (string): The reference number associated with the ASN.

* **data** (object): Contains shipment-related information.

  * **shipmentDate** (string): The date of the shipment (format: YYYY-MM-DD).

  * **carrier** (string): The name of the shipping carrier.

  * **trackingNumber** (string): The tracking number provided by the carrier.

  * **items** (array): A list of items included in the shipment.

    * **productId** (string): The unique identifier for each product.

    * **quantity** (integer): The quantity of each product being shipped.

* **type** (string): The type of the ASN (e.g., "asn").

* **logo** (string): A URL to the logo associated with the ASN.

* **postingTriggeredAt** (integer): A timestamp indicating when the posting was triggered.

* **postingErrors** (string): Any errors encountered during posting (if applicable).

* **postingDocNo** (string): The document number associated with the posting.

* **postingTriggered** (boolean): Indicates whether the posting was triggered.

* **postingFailed** (boolean): Indicates whether the posting failed.

* **postingSynced** (boolean): Indicates whether the posting has been synchronized.

### Response

The response will be returned in JSON format with the following structure:

* **success** (boolean): Indicates whether the update operation was successful.

* **id** (integer): The identifier for the operation (could be relevant for logging or tracking).

* **asnId** (string): The ASN ID that was updated.

* **refNo** (string): The reference number associated with the updated ASN.

### Example

#### Request Example

```json
{
  "asnId": "ASN-KARANDEVENV-000000001",
  "asnRefNo": "ASN-2025-001",
  "data": {
    "shipmentDate": "2025-07-01",
    "carrier": "DHL",
    "trackingNumber": "TRK123456789",
    "items": [
      {
        "productId": "PROD-001",
        "quantity": 10
      }
    ]
  },
  "type": "asn",
  "logo": "https://example.com/logo.png",
  "postingTriggeredAt": 1719825600,
  "postingErrors": "None",
  "postingDocNo": "DOC-2025-ASN01",
  "postingTriggered": true,
  "postingFailed": false,
  "postingSynced": true
}

```

#### Response Example

```json
{
  "success": true,
  "id": 0,
  "asnId": "",
  "refNo": ""

```

Reference: https://open-api-docs.dice.tech/dice-standardized-ap-is-v-2-copy/asn/update-asn-attrs

## 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)
- `status` (string, optional)

### Body (application/json)

- `asnId` (string, required)
- `asnRefNo` (string, required)
- `data` (object, required)
  - `shipmentDate` (date, required)
  - `carrier` (string, required)
  - `trackingNumber` (string, required)
  - `items` (list of object, required)
    - `productId` (string, required)
    - `quantity` (integer, required)
- `type` (string, required)
- `logo` (string, required)
- `postingTriggeredAt` (integer, required)
- `postingErrors` (string, required)
- `postingDocNo` (string, required)
- `postingTriggered` (boolean, required)
- `postingFailed` (boolean, required)
- `postingSynced` (boolean, required)

## Response

### 200

OK

## Examples

**Request**

```json
{
  "asnId": "ASN-KARANDEVENV-000000001",
  "asnRefNo": "ASN-2025-001",
  "data": {
    "shipmentDate": "2025-07-01",
    "carrier": "DHL",
    "trackingNumber": "TRK123456789",
    "items": [
      {
        "productId": "PROD-001",
        "quantity": 10
      },
      {
        "productId": "PROD-002",
        "quantity": 5
      }
    ]
  },
  "type": "asn",
  "logo": "https://example.com/logo.png",
  "postingTriggeredAt": 1719825600,
  "postingErrors": "None",
  "postingDocNo": "DOC-2025-ASN01",
  "postingTriggered": true,
  "postingFailed": false,
  "postingSynced": true
}
```

**Response**

```json
{}
```

**SDK Code**

```python ASN_Update ASN Attrs_example
import requests

url = "https://heimdall.eka.io/apis/external/asn/updateAsnAttrs/"

payload = {
    "asnId": "ASN-KARANDEVENV-000000001",
    "asnRefNo": "ASN-2025-001",
    "data": {
        "shipmentDate": "2025-07-01",
        "carrier": "DHL",
        "trackingNumber": "TRK123456789",
        "items": [
            {
                "productId": "PROD-001",
                "quantity": 10
            },
            {
                "productId": "PROD-002",
                "quantity": 5
            }
        ]
    },
    "type": "asn",
    "logo": "https://example.com/logo.png",
    "postingTriggeredAt": 1719825600,
    "postingErrors": "None",
    "postingDocNo": "DOC-2025-ASN01",
    "postingTriggered": True,
    "postingFailed": False,
    "postingSynced": True
}
headers = {
    "DICE-APP-ID": "{{Company Code}}",
    "X-CLIENT-ID": "{{API Client ID}}",
    "X-CLIENT-SECRET": "{{API Client Secret}}",
    "status": "completed",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript ASN_Update ASN Attrs_example
const url = 'https://heimdall.eka.io/apis/external/asn/updateAsnAttrs/';
const options = {
  method: 'POST',
  headers: {
    'DICE-APP-ID': '{{Company Code}}',
    'X-CLIENT-ID': '{{API Client ID}}',
    'X-CLIENT-SECRET': '{{API Client Secret}}',
    status: 'completed',
    'Content-Type': 'application/json'
  },
  body: '{"asnId":"ASN-KARANDEVENV-000000001","asnRefNo":"ASN-2025-001","data":{"shipmentDate":"2025-07-01","carrier":"DHL","trackingNumber":"TRK123456789","items":[{"productId":"PROD-001","quantity":10},{"productId":"PROD-002","quantity":5}]},"type":"asn","logo":"https://example.com/logo.png","postingTriggeredAt":1719825600,"postingErrors":"None","postingDocNo":"DOC-2025-ASN01","postingTriggered":true,"postingFailed":false,"postingSynced":true}'
};

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

```go ASN_Update ASN Attrs_example
package main

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

func main() {

	url := "https://heimdall.eka.io/apis/external/asn/updateAsnAttrs/"

	payload := strings.NewReader("{\n  \"asnId\": \"ASN-KARANDEVENV-000000001\",\n  \"asnRefNo\": \"ASN-2025-001\",\n  \"data\": {\n    \"shipmentDate\": \"2025-07-01\",\n    \"carrier\": \"DHL\",\n    \"trackingNumber\": \"TRK123456789\",\n    \"items\": [\n      {\n        \"productId\": \"PROD-001\",\n        \"quantity\": 10\n      },\n      {\n        \"productId\": \"PROD-002\",\n        \"quantity\": 5\n      }\n    ]\n  },\n  \"type\": \"asn\",\n  \"logo\": \"https://example.com/logo.png\",\n  \"postingTriggeredAt\": 1719825600,\n  \"postingErrors\": \"None\",\n  \"postingDocNo\": \"DOC-2025-ASN01\",\n  \"postingTriggered\": true,\n  \"postingFailed\": false,\n  \"postingSynced\": true\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("status", "completed")
	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 ASN_Update ASN Attrs_example
require 'uri'
require 'net/http'

url = URI("https://heimdall.eka.io/apis/external/asn/updateAsnAttrs/")

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["status"] = 'completed'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"asnId\": \"ASN-KARANDEVENV-000000001\",\n  \"asnRefNo\": \"ASN-2025-001\",\n  \"data\": {\n    \"shipmentDate\": \"2025-07-01\",\n    \"carrier\": \"DHL\",\n    \"trackingNumber\": \"TRK123456789\",\n    \"items\": [\n      {\n        \"productId\": \"PROD-001\",\n        \"quantity\": 10\n      },\n      {\n        \"productId\": \"PROD-002\",\n        \"quantity\": 5\n      }\n    ]\n  },\n  \"type\": \"asn\",\n  \"logo\": \"https://example.com/logo.png\",\n  \"postingTriggeredAt\": 1719825600,\n  \"postingErrors\": \"None\",\n  \"postingDocNo\": \"DOC-2025-ASN01\",\n  \"postingTriggered\": true,\n  \"postingFailed\": false,\n  \"postingSynced\": true\n}"

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

```java ASN_Update ASN Attrs_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://heimdall.eka.io/apis/external/asn/updateAsnAttrs/")
  .header("DICE-APP-ID", "{{Company Code}}")
  .header("X-CLIENT-ID", "{{API Client ID}}")
  .header("X-CLIENT-SECRET", "{{API Client Secret}}")
  .header("status", "completed")
  .header("Content-Type", "application/json")
  .body("{\n  \"asnId\": \"ASN-KARANDEVENV-000000001\",\n  \"asnRefNo\": \"ASN-2025-001\",\n  \"data\": {\n    \"shipmentDate\": \"2025-07-01\",\n    \"carrier\": \"DHL\",\n    \"trackingNumber\": \"TRK123456789\",\n    \"items\": [\n      {\n        \"productId\": \"PROD-001\",\n        \"quantity\": 10\n      },\n      {\n        \"productId\": \"PROD-002\",\n        \"quantity\": 5\n      }\n    ]\n  },\n  \"type\": \"asn\",\n  \"logo\": \"https://example.com/logo.png\",\n  \"postingTriggeredAt\": 1719825600,\n  \"postingErrors\": \"None\",\n  \"postingDocNo\": \"DOC-2025-ASN01\",\n  \"postingTriggered\": true,\n  \"postingFailed\": false,\n  \"postingSynced\": true\n}")
  .asString();
```

```php ASN_Update ASN Attrs_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://heimdall.eka.io/apis/external/asn/updateAsnAttrs/', [
  'body' => '{
  "asnId": "ASN-KARANDEVENV-000000001",
  "asnRefNo": "ASN-2025-001",
  "data": {
    "shipmentDate": "2025-07-01",
    "carrier": "DHL",
    "trackingNumber": "TRK123456789",
    "items": [
      {
        "productId": "PROD-001",
        "quantity": 10
      },
      {
        "productId": "PROD-002",
        "quantity": 5
      }
    ]
  },
  "type": "asn",
  "logo": "https://example.com/logo.png",
  "postingTriggeredAt": 1719825600,
  "postingErrors": "None",
  "postingDocNo": "DOC-2025-ASN01",
  "postingTriggered": true,
  "postingFailed": false,
  "postingSynced": true
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'DICE-APP-ID' => '{{Company Code}}',
    'X-CLIENT-ID' => '{{API Client ID}}',
    'X-CLIENT-SECRET' => '{{API Client Secret}}',
    'status' => 'completed',
  ],
]);

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

```csharp ASN_Update ASN Attrs_example
using RestSharp;

var client = new RestClient("https://heimdall.eka.io/apis/external/asn/updateAsnAttrs/");
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("status", "completed");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"asnId\": \"ASN-KARANDEVENV-000000001\",\n  \"asnRefNo\": \"ASN-2025-001\",\n  \"data\": {\n    \"shipmentDate\": \"2025-07-01\",\n    \"carrier\": \"DHL\",\n    \"trackingNumber\": \"TRK123456789\",\n    \"items\": [\n      {\n        \"productId\": \"PROD-001\",\n        \"quantity\": 10\n      },\n      {\n        \"productId\": \"PROD-002\",\n        \"quantity\": 5\n      }\n    ]\n  },\n  \"type\": \"asn\",\n  \"logo\": \"https://example.com/logo.png\",\n  \"postingTriggeredAt\": 1719825600,\n  \"postingErrors\": \"None\",\n  \"postingDocNo\": \"DOC-2025-ASN01\",\n  \"postingTriggered\": true,\n  \"postingFailed\": false,\n  \"postingSynced\": true\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift ASN_Update ASN Attrs_example
import Foundation

let headers = [
  "DICE-APP-ID": "{{Company Code}}",
  "X-CLIENT-ID": "{{API Client ID}}",
  "X-CLIENT-SECRET": "{{API Client Secret}}",
  "status": "completed",
  "Content-Type": "application/json"
]
let parameters = [
  "asnId": "ASN-KARANDEVENV-000000001",
  "asnRefNo": "ASN-2025-001",
  "data": [
    "shipmentDate": "2025-07-01",
    "carrier": "DHL",
    "trackingNumber": "TRK123456789",
    "items": [
      [
        "productId": "PROD-001",
        "quantity": 10
      ],
      [
        "productId": "PROD-002",
        "quantity": 5
      ]
    ]
  ],
  "type": "asn",
  "logo": "https://example.com/logo.png",
  "postingTriggeredAt": 1719825600,
  "postingErrors": "None",
  "postingDocNo": "DOC-2025-ASN01",
  "postingTriggered": true,
  "postingFailed": false,
  "postingSynced": true
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://heimdall.eka.io/apis/external/asn/updateAsnAttrs/")! 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()
```