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

POST https://heimdall.eka.io/apis/external/office/add
Content-Type: application/json

### Add New Office

This API endpoint allows you to add a new office to the Dice.

### Request Body

| Param          | Required  | Type   | Description                                       |
| -------------- | --------- | ------ | ------------------------------------------------- |
| name           | Mandatory | String | The name of the office.                           |
| address        | Optional  | String | The address of the office.                        |
| pincode        | Optional  | String | The pincode of the office location.               |
| state          | Optional  | String | The state where the office is located.            |
| currency       | Optional  | String | The currency used at the office.                  |
| gstin          | Optional  | String | The Goods and Services Tax Identification Number. |
| registeredName | Optional  | String | The registered name of the office.                |
| coords         | Optional  | Object | Coordinates of the office location.               |
| .lat           | Mandatory | Number | The latitude of the office location.              |
| .lng           | Mandatory | Number | The longitude of the office location.             |

### Response

| Param   | Type    | Description                                           |
| ------- | ------- | ----------------------------------------------------- |
| success | Boolean | Indicates whether the office addition was successful. |

#### Example Response

```json
{
    "success": true
}

```

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

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

- `name` (string, required)
- `address` (string, required)
- `pincode` (string, required)
- `state` (string, required)
- `currency` (string, required)
- `gstin` (string, required)
- `registeredName` (string, required)
- `coords` (object, required)
  - `lat` (double, required)
  - `lng` (double, required)

## Response

### 200

OK

- `success` (boolean, required)

## Examples

**Request**

```json
{
  "name": "Dice Indore",
  "address": "Indore",
  "pincode": "000000",
  "state": "Madhya Pradesh",
  "currency": "INR",
  "gstin": "123456789",
  "registeredName": "1231231230",
  "coords": {
    "lat": 22.7195687,
    "lng": 75.8577258
  }
}
```

**Response**

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

**SDK Code**

```python Office_Add New Office_example
import requests

url = "https://heimdall.eka.io/apis/external/office/add"

payload = {
    "name": "Dice Indore",
    "address": "Indore",
    "pincode": "000000",
    "state": "Madhya Pradesh",
    "currency": "INR",
    "gstin": "123456789",
    "registeredName": "1231231230",
    "coords": {
        "lat": 22.7195687,
        "lng": 75.8577258
    }
}
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 Office_Add New Office_example
const url = 'https://heimdall.eka.io/apis/external/office/add';
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: '{"name":"Dice Indore","address":"Indore","pincode":"000000","state":"Madhya Pradesh","currency":"INR","gstin":"123456789","registeredName":"1231231230","coords":{"lat":22.7195687,"lng":75.8577258}}'
};

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

```go Office_Add New Office_example
package main

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

func main() {

	url := "https://heimdall.eka.io/apis/external/office/add"

	payload := strings.NewReader("{\n  \"name\": \"Dice Indore\",\n  \"address\": \"Indore\",\n  \"pincode\": \"000000\",\n  \"state\": \"Madhya Pradesh\",\n  \"currency\": \"INR\",\n  \"gstin\": \"123456789\",\n  \"registeredName\": \"1231231230\",\n  \"coords\": {\n    \"lat\": 22.7195687,\n    \"lng\": 75.8577258\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 Office_Add New Office_example
require 'uri'
require 'net/http'

url = URI("https://heimdall.eka.io/apis/external/office/add")

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  \"name\": \"Dice Indore\",\n  \"address\": \"Indore\",\n  \"pincode\": \"000000\",\n  \"state\": \"Madhya Pradesh\",\n  \"currency\": \"INR\",\n  \"gstin\": \"123456789\",\n  \"registeredName\": \"1231231230\",\n  \"coords\": {\n    \"lat\": 22.7195687,\n    \"lng\": 75.8577258\n  }\n}"

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

```java Office_Add New Office_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://heimdall.eka.io/apis/external/office/add")
  .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  \"name\": \"Dice Indore\",\n  \"address\": \"Indore\",\n  \"pincode\": \"000000\",\n  \"state\": \"Madhya Pradesh\",\n  \"currency\": \"INR\",\n  \"gstin\": \"123456789\",\n  \"registeredName\": \"1231231230\",\n  \"coords\": {\n    \"lat\": 22.7195687,\n    \"lng\": 75.8577258\n  }\n}")
  .asString();
```

```php Office_Add New Office_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://heimdall.eka.io/apis/external/office/add', [
  'body' => '{
  "name": "Dice Indore",
  "address": "Indore",
  "pincode": "000000",
  "state": "Madhya Pradesh",
  "currency": "INR",
  "gstin": "123456789",
  "registeredName": "1231231230",
  "coords": {
    "lat": 22.7195687,
    "lng": 75.8577258
  }
}',
  '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 Office_Add New Office_example
using RestSharp;

var client = new RestClient("https://heimdall.eka.io/apis/external/office/add");
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  \"name\": \"Dice Indore\",\n  \"address\": \"Indore\",\n  \"pincode\": \"000000\",\n  \"state\": \"Madhya Pradesh\",\n  \"currency\": \"INR\",\n  \"gstin\": \"123456789\",\n  \"registeredName\": \"1231231230\",\n  \"coords\": {\n    \"lat\": 22.7195687,\n    \"lng\": 75.8577258\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Office_Add New Office_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 = [
  "name": "Dice Indore",
  "address": "Indore",
  "pincode": "000000",
  "state": "Madhya Pradesh",
  "currency": "INR",
  "gstin": "123456789",
  "registeredName": "1231231230",
  "coords": [
    "lat": 22.7195687,
    "lng": 75.8577258
  ]
] as [String : Any]

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

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