> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.navipartner.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.navipartner.com/_mcp/server.

# Get Table Metadata

GET https://api.npretail.app/{tenant}/{environment}/{company}/tablemetadata/{tableNo}

Describes the fields that the BI endpoint returns for one table, including the JSON property name of every field. Use it to map the payload of `GET /bi/{tableNo}` onto your own model.

Field tooltips are not included: Business Central does not make them available at runtime.

Reference: https://docs.navipartner.com/apis/api-reference/bi/service-tablemetadata/get-table-metadata

## Authentication

- `x-np-api-key` header (required) — API Key authentication via header

## Request

### Path parameters

- `tenant` (string, required) — Your Entra Tenant ID. [More details.](/paths#1-tenant)
- `environment` (string, required) — Your Business Central Environment. [More details.](/paths#2-environment)
- `company` (string, required) — Your Business Central Company. [More details.](/paths#3-company)
- `tableNo` (integer, required) — The Business Central table number.

### Headers

- `Accept-Language` (string, optional) — The language to use for the translated captions, for example `da-DK`. Defaults to the language of the calling user, and then to English.

## Response

### 200

- `tableNo` (integer, required)
- `name` (string, required)
- `translatedName` (string, required)
- `systemName` (string, required)
- `allowed` (boolean, required)
- `syncSupported` (boolean, required)
- `dataPerCompany` (boolean, required)
- `language` (string, required)
- `fields` (list of FieldMetadata, required)

## Types

### FieldMetadata

One field that the BI endpoint returns for a table.

- `fieldNo` (integer, required) — The Business Central field number.
- `name` (string, required) — The caption of the field in English.
- `translatedName` (string, required) — The caption of the field in the language of the response.
- `systemName` (string, required) — The AL name of the field.
- `jsonName` (string, required) — The property name that this field has in the records returned by the BI endpoint.
- `type` (string, required) — The data type of the field, spelled exactly as the endpoint returns it: Code, Text, Integer, Decimal, Boolean, Date, DateTime, Time, GUID, Option, Enum, BigInteger, Duration, DateFormula or RecordID.
- `isPartOfPrimaryKey` (boolean, required) — Whether the field is part of the primary key of the table.
- `length` (integer, optional) — The maximum length of the value. Only present for Code and Text fields.

## Examples

**Response**

```json
{
  "tableNo": 27,
  "name": "Item",
  "translatedName": "Vare",
  "systemName": "Item",
  "allowed": true,
  "syncSupported": true,
  "dataPerCompany": true,
  "language": "da-DK",
  "fields": [
    {
      "fieldNo": 1,
      "name": "No.",
      "translatedName": "Nummer",
      "systemName": "No.",
      "jsonName": "no",
      "type": "Code",
      "isPartOfPrimaryKey": true,
      "length": 20
    }
  ]
}
```

**SDK Code**

```python Describe the Item table
import requests

url = "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./tablemetadata/27"

headers = {"x-np-api-key": "<NaviPartner API Key>"}

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

print(response.json())
```

```javascript Describe the Item table
const url = 'https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./tablemetadata/27';
const options = {method: 'GET', headers: {'x-np-api-key': '<NaviPartner API Key>'}};

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

```go Describe the Item table
package main

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

func main() {

	url := "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./tablemetadata/27"

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

	req.Header.Add("x-np-api-key", "<NaviPartner API Key>")

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

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

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

}
```

```ruby Describe the Item table
require 'uri'
require 'net/http'

url = URI("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./tablemetadata/27")

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

request = Net::HTTP::Get.new(url)
request["x-np-api-key"] = '<NaviPartner API Key>'

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

```java Describe the Item table
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./tablemetadata/27")
  .header("x-np-api-key", "<NaviPartner API Key>")
  .asString();
```

```php Describe the Item table
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./tablemetadata/27', [
  'headers' => [
    'x-np-api-key' => '<NaviPartner API Key>',
  ],
]);

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

```csharp Describe the Item table
using RestSharp;

var client = new RestClient("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./tablemetadata/27");
var request = new RestRequest(Method.GET);
request.AddHeader("x-np-api-key", "<NaviPartner API Key>");
IRestResponse response = client.Execute(request);
```

```swift Describe the Item table
import Foundation

let headers = ["x-np-api-key": "<NaviPartner API Key>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./tablemetadata/27")! 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()
```