> 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 Invoice Attr

POST https://heimdall.eka.io/apis/external/invoice/updateInvoiceAttr
Content-Type: application/json

### **Update Invoice Attr**

This API use to update invoice details.

API endpoint allow user to update invoice attributes by sending an HTTP POST request to the specified URL. The request should include the invoice ID, data, type, logo, posting triggered timestamp, posting errors, posting document number, and posting status flags.

### Request Body

| Param              | Required  | Type      | Description                                          |
| ------------------ | --------- | --------- | ---------------------------------------------------- |
| invoiceId          | Mandatory | String    | The ID of the invoice to be updated.                 |
| data               | Mandatory | Object    | The updated data for the invoice.                    |
| type               | Optional  | String    | The type of the invoice.                             |
| logo               | Optional  | String    | The logo associated with the invoice.                |
| postingTriggeredAt | Optional  | Timestamp | Timestamp indicating when the posting was triggered. |
| postingErrors      | Optional  | String    | Any errors that occurred during posting.             |
| postingDocNo       | Optional  | String    | The document number generated during posting.        |
| postingTriggered   | Optional  | Boolean   | Boolean flag indicating if posting was triggered.    |
| postingFailed      | Optional  | Boolean   | Boolean flag indicating if posting failed.           |
| postingSynced      | Optional  | Boolean   | Boolean flag indicating if posting was synced.       |

### Response

Upon successful execution, the API returns a JSON object with a `success` key, indicating whether the update was successful.

#### Example Response

```json
{
    "success": true
}

```

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

## 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) — Company Code of client
- `X-CLIENT-ID` (string, optional) — API Client ID
- `X-CLIENT-SECRET` (string, optional) — API Client Secret

### Body (application/json)

- `invoiceId` (string, required)
- `data` (object, 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

- `success` (boolean, required)

## Examples

**Request**

```json
{
  "invoiceId": "VI-INDIAN-000001742",
  "type": "",
  "logo": "",
  "postingTriggeredAt": 0,
  "postingErrors": "",
  "postingDocNo": "",
  "postingTriggered": true,
  "postingFailed": true,
  "postingSynced": true
}
```

**Response**

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

**SDK Code**

```python Invoice_Update Invoice Attr_example
import requests

url = "https://heimdall.eka.io/apis/external/invoice/updateInvoiceAttr"

payload = {
    "invoiceId": "VI-INDIAN-000001742",
    "type": "",
    "logo": "",
    "postingTriggeredAt": 0,
    "postingErrors": "",
    "postingDocNo": "",
    "postingTriggered": True,
    "postingFailed": True,
    "postingSynced": True
}
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 Invoice_Update Invoice Attr_example
const url = 'https://heimdall.eka.io/apis/external/invoice/updateInvoiceAttr';
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: '{"invoiceId":"VI-INDIAN-000001742","type":"","logo":"","postingTriggeredAt":0,"postingErrors":"","postingDocNo":"","postingTriggered":true,"postingFailed":true,"postingSynced":true}'
};

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

```go Invoice_Update Invoice Attr_example
package main

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

func main() {

	url := "https://heimdall.eka.io/apis/external/invoice/updateInvoiceAttr"

	payload := strings.NewReader("{\n  \"invoiceId\": \"VI-INDIAN-000001742\",\n  \"type\": \"\",\n  \"logo\": \"\",\n  \"postingTriggeredAt\": 0,\n  \"postingErrors\": \"\",\n  \"postingDocNo\": \"\",\n  \"postingTriggered\": true,\n  \"postingFailed\": true,\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("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 Invoice_Update Invoice Attr_example
require 'uri'
require 'net/http'

url = URI("https://heimdall.eka.io/apis/external/invoice/updateInvoiceAttr")

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  \"invoiceId\": \"VI-INDIAN-000001742\",\n  \"type\": \"\",\n  \"logo\": \"\",\n  \"postingTriggeredAt\": 0,\n  \"postingErrors\": \"\",\n  \"postingDocNo\": \"\",\n  \"postingTriggered\": true,\n  \"postingFailed\": true,\n  \"postingSynced\": true\n}"

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

```java Invoice_Update Invoice Attr_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://heimdall.eka.io/apis/external/invoice/updateInvoiceAttr")
  .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  \"invoiceId\": \"VI-INDIAN-000001742\",\n  \"type\": \"\",\n  \"logo\": \"\",\n  \"postingTriggeredAt\": 0,\n  \"postingErrors\": \"\",\n  \"postingDocNo\": \"\",\n  \"postingTriggered\": true,\n  \"postingFailed\": true,\n  \"postingSynced\": true\n}")
  .asString();
```

```php Invoice_Update Invoice Attr_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://heimdall.eka.io/apis/external/invoice/updateInvoiceAttr', [
  'body' => '{
  "invoiceId": "VI-INDIAN-000001742",
  "type": "",
  "logo": "",
  "postingTriggeredAt": 0,
  "postingErrors": "",
  "postingDocNo": "",
  "postingTriggered": true,
  "postingFailed": true,
  "postingSynced": true
}',
  '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 Invoice_Update Invoice Attr_example
using RestSharp;

var client = new RestClient("https://heimdall.eka.io/apis/external/invoice/updateInvoiceAttr");
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  \"invoiceId\": \"VI-INDIAN-000001742\",\n  \"type\": \"\",\n  \"logo\": \"\",\n  \"postingTriggeredAt\": 0,\n  \"postingErrors\": \"\",\n  \"postingDocNo\": \"\",\n  \"postingTriggered\": true,\n  \"postingFailed\": true,\n  \"postingSynced\": true\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Invoice_Update Invoice Attr_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 = [
  "invoiceId": "VI-INDIAN-000001742",
  "type": "",
  "logo": "",
  "postingTriggeredAt": 0,
  "postingErrors": "",
  "postingDocNo": "",
  "postingTriggered": true,
  "postingFailed": true,
  "postingSynced": true
] as [String : Any]

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

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