> 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.

# Add New Vendor

POST https://heimdall.eka.io/apis/external/vendor/addVendor
Content-Type: application/json

### Add Vendor

This API facilitates the addition of a vendor to the DIce.

By utilizing this endpoint, you can seamlessly add a new vendor to the Dice database.

### Request Body

| Param                | Required  | Type    | Description                                        |
| -------------------- | --------- | ------- | -------------------------------------------------- |
| id                   | Mandatory | String  | The unique identifier for the vendor.              |
| connection           | Mandatory | String  | The connection information for the vendor.         |
| basic.name           | Mandatory | String  | The name of the vendor.                            |
| basic.tradeName      | Mandatory | String  | The trade name of the vendor.                      |
| basic.email          | Mandatory | String  | The email address of the vendor.                   |
| basic.mobile         | Mandatory | String  | The mobile number of the vendor.                   |
| basic.currency       | Mandatory | String  | The currency used by the vendor.                   |
| address.address      | Mandatory | String  | The address of the vendor.                         |
| address.city         | Mandatory | String  | The city of the vendor.                            |
| address.contact      | Mandatory | String  | The contact information for the vendor.            |
| address.pincode      | Mandatory | String  | The pin code of the vendor.                        |
| address.lat          | Optional  | Number  | The latitude coordinate of the vendor's location.  |
| address.lng          | Optional  | Number  | The longitude coordinate of the vendor's location. |
| bank.account         | Optional  | String  | The bank account number of the vendor.             |
| bank.ifsc            | Optional  | String  | The IFSC code of the vendor's bank.                |
| bank.name            | Optional  | String  | The name associated with the bank account.         |
| bank.bankName        | Optional  | String  | The name of the vendor's bank.                     |
| others.msme          | Optional  | String  | Additional MSME information for the vendor.        |
| others.msmeNumber    | Optional  | String  | The MSME number for the vendor.                    |
| others.categories    | Mandatory | Array   | The categories associated with the vendor.         |
| others.paymentTerms  | Optional  | Object  | The payment terms for the vendor.                  |
| tax.gst              | Optional  | String  | The GST number of the vendor.                      |
| tax.gstinCertificate | Optional  | String  | The GSTIN certificate for the vendor.              |
| tax.pan              | Optional  | String  | The PAN number of the vendor.                      |
| validGst             | Optional  | Boolean | Indicates whether the GST number is valid.         |
| validMobile          | Optional  | Boolean | Indicates whether the mobile number is valid.      |
| validPan             | Optional  | Boolean | Indicates whether the PAN number is valid.         |
| roleList             | Optional  | Array   | RoleList of Vendor                                 |
| paymentTerm          | Optional  | Number  | Vendor payment terms in Days                       |

### Response

* `success` (boolean): Indicates whether the vendor addition was successful.

### Example

```json
{
    "success": true
}

```

Reference: https://open-api-docs.dice.tech/dice-standardized-ap-is-v-2-copy/vendor/add-new-vendor

## 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)

- `request` (object, required)
  - `id` (string, required)
  - `connection` (string, required)
  - `basic` (object, required)
    - `name` (string, required)
    - `tradeName` (string, required)
    - `email` (string, required)
    - `mobile` (string, required)
    - `currency` (string, required)
  - `address` (object, required)
    - `address` (string, required)
    - `city` (string, required)
    - `contact` (string, required)
    - `pincode` (string, required)
    - `lat` (integer, required)
    - `lng` (integer, required)
  - `bank` (object, required)
    - `account` (string, required)
    - `ifsc` (string, required)
    - `name` (string, required)
    - `bankName` (string, required)
  - `others` (object, required)
    - `msme` (string, required)
    - `msmeNumber` (string, required)
    - `categories` (list of integer, required)
    - `paymentTerms` (object, required)
  - `tax` (object, required)
    - `gst` (string, required)
    - `gstinCertificate` (string, required)
    - `pan` (string, required)
  - `validGst` (boolean, required)
  - `validMobile` (boolean, required)
  - `validPan` (boolean, required)
- `paymentTerm` (integer, required)
- `roleList` (list of any, required)

## Response

### 200

OK

- `success` (boolean, required)

## Examples

**Request**

```json
{
  "request": {
    "id": "INDIAN-0001",
    "connection": "true ",
    "basic": {
      "name": "INDIAN",
      "tradeName": "INDIAN",
      "email": "indian@gmail.com",
      "mobile": "0000000000",
      "currency": "INR"
    },
    "address": {
      "address": "Pune",
      "city": "Pune",
      "contact": "1234567890",
      "pincode": "123456",
      "lat": 0,
      "lng": 0
    },
    "bank": {
      "account": "1234567890",
      "ifsc": "abc1234567",
      "name": "prime",
      "bankName": "abcd bank"
    },
    "others": {
      "msme": "",
      "msmeNumber": "",
      "categories": [
        1,
        2
      ],
      "paymentTerms": {}
    },
    "tax": {
      "gst": "",
      "gstinCertificate": "",
      "pan": ""
    },
    "validGst": false,
    "validMobile": false,
    "validPan": false
  },
  "paymentTerm": 30,
  "roleList": []
}
```

**Response**

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

**SDK Code**

```python Vendor_Add New Vendor_example
import requests

url = "https://heimdall.eka.io/apis/external/vendor/addVendor"

payload = {
    "request": {
        "id": "INDIAN-0001",
        "connection": "true ",
        "basic": {
            "name": "INDIAN",
            "tradeName": "INDIAN",
            "email": "indian@gmail.com",
            "mobile": "0000000000",
            "currency": "INR"
        },
        "address": {
            "address": "Pune",
            "city": "Pune",
            "contact": "1234567890",
            "pincode": "123456",
            "lat": 0,
            "lng": 0
        },
        "bank": {
            "account": "1234567890",
            "ifsc": "abc1234567",
            "name": "prime",
            "bankName": "abcd bank"
        },
        "others": {
            "msme": "",
            "msmeNumber": "",
            "categories": [1, 2],
            "paymentTerms": {}
        },
        "tax": {
            "gst": "",
            "gstinCertificate": "",
            "pan": ""
        },
        "validGst": False,
        "validMobile": False,
        "validPan": False
    },
    "paymentTerm": 30,
    "roleList": []
}
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 Vendor_Add New Vendor_example
const url = 'https://heimdall.eka.io/apis/external/vendor/addVendor';
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: '{"request":{"id":"INDIAN-0001","connection":"true ","basic":{"name":"INDIAN","tradeName":"INDIAN","email":"indian@gmail.com","mobile":"0000000000","currency":"INR"},"address":{"address":"Pune","city":"Pune","contact":"1234567890","pincode":"123456","lat":0,"lng":0},"bank":{"account":"1234567890","ifsc":"abc1234567","name":"prime","bankName":"abcd bank"},"others":{"msme":"","msmeNumber":"","categories":[1,2],"paymentTerms":{}},"tax":{"gst":"","gstinCertificate":"","pan":""},"validGst":false,"validMobile":false,"validPan":false},"paymentTerm":30,"roleList":[]}'
};

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

```go Vendor_Add New Vendor_example
package main

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

func main() {

	url := "https://heimdall.eka.io/apis/external/vendor/addVendor"

	payload := strings.NewReader("{\n  \"request\": {\n    \"id\": \"INDIAN-0001\",\n    \"connection\": \"true \",\n    \"basic\": {\n      \"name\": \"INDIAN\",\n      \"tradeName\": \"INDIAN\",\n      \"email\": \"indian@gmail.com\",\n      \"mobile\": \"0000000000\",\n      \"currency\": \"INR\"\n    },\n    \"address\": {\n      \"address\": \"Pune\",\n      \"city\": \"Pune\",\n      \"contact\": \"1234567890\",\n      \"pincode\": \"123456\",\n      \"lat\": 0,\n      \"lng\": 0\n    },\n    \"bank\": {\n      \"account\": \"1234567890\",\n      \"ifsc\": \"abc1234567\",\n      \"name\": \"prime\",\n      \"bankName\": \"abcd bank\"\n    },\n    \"others\": {\n      \"msme\": \"\",\n      \"msmeNumber\": \"\",\n      \"categories\": [\n        1,\n        2\n      ],\n      \"paymentTerms\": {}\n    },\n    \"tax\": {\n      \"gst\": \"\",\n      \"gstinCertificate\": \"\",\n      \"pan\": \"\"\n    },\n    \"validGst\": false,\n    \"validMobile\": false,\n    \"validPan\": false\n  },\n  \"paymentTerm\": 30,\n  \"roleList\": []\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 Vendor_Add New Vendor_example
require 'uri'
require 'net/http'

url = URI("https://heimdall.eka.io/apis/external/vendor/addVendor")

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  \"request\": {\n    \"id\": \"INDIAN-0001\",\n    \"connection\": \"true \",\n    \"basic\": {\n      \"name\": \"INDIAN\",\n      \"tradeName\": \"INDIAN\",\n      \"email\": \"indian@gmail.com\",\n      \"mobile\": \"0000000000\",\n      \"currency\": \"INR\"\n    },\n    \"address\": {\n      \"address\": \"Pune\",\n      \"city\": \"Pune\",\n      \"contact\": \"1234567890\",\n      \"pincode\": \"123456\",\n      \"lat\": 0,\n      \"lng\": 0\n    },\n    \"bank\": {\n      \"account\": \"1234567890\",\n      \"ifsc\": \"abc1234567\",\n      \"name\": \"prime\",\n      \"bankName\": \"abcd bank\"\n    },\n    \"others\": {\n      \"msme\": \"\",\n      \"msmeNumber\": \"\",\n      \"categories\": [\n        1,\n        2\n      ],\n      \"paymentTerms\": {}\n    },\n    \"tax\": {\n      \"gst\": \"\",\n      \"gstinCertificate\": \"\",\n      \"pan\": \"\"\n    },\n    \"validGst\": false,\n    \"validMobile\": false,\n    \"validPan\": false\n  },\n  \"paymentTerm\": 30,\n  \"roleList\": []\n}"

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

```java Vendor_Add New Vendor_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://heimdall.eka.io/apis/external/vendor/addVendor")
  .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  \"request\": {\n    \"id\": \"INDIAN-0001\",\n    \"connection\": \"true \",\n    \"basic\": {\n      \"name\": \"INDIAN\",\n      \"tradeName\": \"INDIAN\",\n      \"email\": \"indian@gmail.com\",\n      \"mobile\": \"0000000000\",\n      \"currency\": \"INR\"\n    },\n    \"address\": {\n      \"address\": \"Pune\",\n      \"city\": \"Pune\",\n      \"contact\": \"1234567890\",\n      \"pincode\": \"123456\",\n      \"lat\": 0,\n      \"lng\": 0\n    },\n    \"bank\": {\n      \"account\": \"1234567890\",\n      \"ifsc\": \"abc1234567\",\n      \"name\": \"prime\",\n      \"bankName\": \"abcd bank\"\n    },\n    \"others\": {\n      \"msme\": \"\",\n      \"msmeNumber\": \"\",\n      \"categories\": [\n        1,\n        2\n      ],\n      \"paymentTerms\": {}\n    },\n    \"tax\": {\n      \"gst\": \"\",\n      \"gstinCertificate\": \"\",\n      \"pan\": \"\"\n    },\n    \"validGst\": false,\n    \"validMobile\": false,\n    \"validPan\": false\n  },\n  \"paymentTerm\": 30,\n  \"roleList\": []\n}")
  .asString();
```

```php Vendor_Add New Vendor_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://heimdall.eka.io/apis/external/vendor/addVendor', [
  'body' => '{
  "request": {
    "id": "INDIAN-0001",
    "connection": "true ",
    "basic": {
      "name": "INDIAN",
      "tradeName": "INDIAN",
      "email": "indian@gmail.com",
      "mobile": "0000000000",
      "currency": "INR"
    },
    "address": {
      "address": "Pune",
      "city": "Pune",
      "contact": "1234567890",
      "pincode": "123456",
      "lat": 0,
      "lng": 0
    },
    "bank": {
      "account": "1234567890",
      "ifsc": "abc1234567",
      "name": "prime",
      "bankName": "abcd bank"
    },
    "others": {
      "msme": "",
      "msmeNumber": "",
      "categories": [
        1,
        2
      ],
      "paymentTerms": {}
    },
    "tax": {
      "gst": "",
      "gstinCertificate": "",
      "pan": ""
    },
    "validGst": false,
    "validMobile": false,
    "validPan": false
  },
  "paymentTerm": 30,
  "roleList": []
}',
  '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 Vendor_Add New Vendor_example
using RestSharp;

var client = new RestClient("https://heimdall.eka.io/apis/external/vendor/addVendor");
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  \"request\": {\n    \"id\": \"INDIAN-0001\",\n    \"connection\": \"true \",\n    \"basic\": {\n      \"name\": \"INDIAN\",\n      \"tradeName\": \"INDIAN\",\n      \"email\": \"indian@gmail.com\",\n      \"mobile\": \"0000000000\",\n      \"currency\": \"INR\"\n    },\n    \"address\": {\n      \"address\": \"Pune\",\n      \"city\": \"Pune\",\n      \"contact\": \"1234567890\",\n      \"pincode\": \"123456\",\n      \"lat\": 0,\n      \"lng\": 0\n    },\n    \"bank\": {\n      \"account\": \"1234567890\",\n      \"ifsc\": \"abc1234567\",\n      \"name\": \"prime\",\n      \"bankName\": \"abcd bank\"\n    },\n    \"others\": {\n      \"msme\": \"\",\n      \"msmeNumber\": \"\",\n      \"categories\": [\n        1,\n        2\n      ],\n      \"paymentTerms\": {}\n    },\n    \"tax\": {\n      \"gst\": \"\",\n      \"gstinCertificate\": \"\",\n      \"pan\": \"\"\n    },\n    \"validGst\": false,\n    \"validMobile\": false,\n    \"validPan\": false\n  },\n  \"paymentTerm\": 30,\n  \"roleList\": []\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Vendor_Add New Vendor_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 = [
  "request": [
    "id": "INDIAN-0001",
    "connection": "true ",
    "basic": [
      "name": "INDIAN",
      "tradeName": "INDIAN",
      "email": "indian@gmail.com",
      "mobile": "0000000000",
      "currency": "INR"
    ],
    "address": [
      "address": "Pune",
      "city": "Pune",
      "contact": "1234567890",
      "pincode": "123456",
      "lat": 0,
      "lng": 0
    ],
    "bank": [
      "account": "1234567890",
      "ifsc": "abc1234567",
      "name": "prime",
      "bankName": "abcd bank"
    ],
    "others": [
      "msme": "",
      "msmeNumber": "",
      "categories": [1, 2],
      "paymentTerms": []
    ],
    "tax": [
      "gst": "",
      "gstinCertificate": "",
      "pan": ""
    ],
    "validGst": false,
    "validMobile": false,
    "validPan": false
  ],
  "paymentTerm": 30,
  "roleList": []
] as [String : Any]

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

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