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

# Fetch Office API

GET https://heimdall.eka.io/apis/external/office/getOffice

### Get Office Details

This API endpoint retrieves the details of an office based on the provided name From Dice.

#### Request Parameters

| Param | Required  | Description             |
| ----- | --------- | ----------------------- |
| name  | Mandatory | The name of the office. |

#### Example Response

```json
{
    "name": "Indore",
    "coords": {
        "name": "Indore",
        "lat": 22.7195687,
        "lng": 75.8577258
    },
    "createdAt": 1586185758298,
    "updatedAt": 1586185758298
}

```

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

## Servers

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

## Request

### Query parameters

- `name` (string, optional) — Fetches office details based on the office name.

### Headers

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

## Response

### 200

OK

- `name` (string, required)
- `coords` (object, required)
  - `name` (string, required)
  - `lat` (double, required)
  - `lng` (double, required)
- `createdAt` (integer, required)
- `updatedAt` (integer, required)

## Examples

**Response**

```json
{
  "name": "Indore",
  "coords": {
    "name": "Indore",
    "lat": 22.7195687,
    "lng": 75.8577258
  },
  "createdAt": 1586185758298,
  "updatedAt": 1586185758298
}
```

**SDK Code**

```python Office_Fetch Office API_example
import requests

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

querystring = {"name":"indore"}

headers = {
    "DICE-APP-ID": "{{Company Code}}",
    "X-CLIENT-ID": "{{API Client ID}}",
    "X-CLIENT-SECRET": "{{API Client Secret}}"
}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript Office_Fetch Office API_example
const url = 'https://heimdall.eka.io/apis/external/office/getOffice?name=indore';
const options = {
  method: 'GET',
  headers: {
    'DICE-APP-ID': '{{Company Code}}',
    'X-CLIENT-ID': '{{API Client ID}}',
    'X-CLIENT-SECRET': '{{API Client Secret}}'
  }
};

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

```go Office_Fetch Office API_example
package main

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

func main() {

	url := "https://heimdall.eka.io/apis/external/office/getOffice?name=indore"

	req, _ := http.NewRequest("GET", url, nil)

	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}}")

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

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

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

}
```

```ruby Office_Fetch Office API_example
require 'uri'
require 'net/http'

url = URI("https://heimdall.eka.io/apis/external/office/getOffice?name=indore")

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

request = Net::HTTP::Get.new(url)
request["DICE-APP-ID"] = '{{Company Code}}'
request["X-CLIENT-ID"] = '{{API Client ID}}'
request["X-CLIENT-SECRET"] = '{{API Client Secret}}'

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

```java Office_Fetch Office API_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://heimdall.eka.io/apis/external/office/getOffice?name=indore")
  .header("DICE-APP-ID", "{{Company Code}}")
  .header("X-CLIENT-ID", "{{API Client ID}}")
  .header("X-CLIENT-SECRET", "{{API Client Secret}}")
  .asString();
```

```php Office_Fetch Office API_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://heimdall.eka.io/apis/external/office/getOffice?name=indore', [
  'headers' => [
    'DICE-APP-ID' => '{{Company Code}}',
    'X-CLIENT-ID' => '{{API Client ID}}',
    'X-CLIENT-SECRET' => '{{API Client Secret}}',
  ],
]);

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

```csharp Office_Fetch Office API_example
using RestSharp;

var client = new RestClient("https://heimdall.eka.io/apis/external/office/getOffice?name=indore");
var request = new RestRequest(Method.GET);
request.AddHeader("DICE-APP-ID", "{{Company Code}}");
request.AddHeader("X-CLIENT-ID", "{{API Client ID}}");
request.AddHeader("X-CLIENT-SECRET", "{{API Client Secret}}");
IRestResponse response = client.Execute(request);
```

```swift Office_Fetch Office API_example
import Foundation

let headers = [
  "DICE-APP-ID": "{{Company Code}}",
  "X-CLIENT-ID": "{{API Client ID}}",
  "X-CLIENT-SECRET": "{{API Client Secret}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://heimdall.eka.io/apis/external/office/getOffice?name=indore")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

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()
```