Ava API Client

Guide

How to read Business Central $metadata and build JSON request bodies

Updated 2 November 2026

Every Business Central API describes itself in a $metadata document: each entity, its fields and their types, and what you can do to it. It's the most reliable reference there is, because it describes your own tenant, including your extensions and custom API pages.

Where to find it

Add /$metadata to the API's root and send a GET with your usual sign-in.

APIURL
Standard API.../api/v2.0/$metadata
Custom API page.../api/<publisher>/<group>/<version>/$metadata
Published web services.../ODataV4/$metadata

How to read it

It's an XML document, usually a long one. These are the parts that matter:

<EntityType Name="salesOrder">
  <Key><PropertyRef Name="id" /></Key>
  <Property Name="id" Type="Edm.Guid" Nullable="false" />
  <Property Name="customerNumber" Type="Edm.String" MaxLength="20" />
  <Property Name="orderDate" Type="Edm.Date" />
  <NavigationProperty Name="salesOrderLines"
    Type="Collection(Microsoft.NAV.salesOrderLine)" ContainsTarget="true" />
</EntityType>

<EntitySet Name="salesOrders" EntityType="Microsoft.NAV.salesOrder" />

Turning it into a JSON body

Each field becomes a key, with a value of its type:

TypeExample value
Edm.String"10000"
Edm.Decimal, Edm.Int3212
Edm.Booleanfalse
Edm.Date"2026-11-02"
Edm.DateTimeOffset"2026-11-02T10:30:00Z"
Edm.Guid"3bb5b4b6-ea4c-43ca-ba1c-3b69e29a6668"
An enum typeOne of its members, as declared

Three things to watch for

The same thing in Ava

Ava reads $metadata for you. In a request's Body tab, choose From metadata… and it finds the entity from your URL, lets you tick the fields, and writes the JSON with the right types. It leaves out what the server sets and starts an update empty, so you can't blank a record by accident.

In Explore you can tick several entities and add ready-made requests for all of them to a collection. That's especially useful for a custom API page that has no documentation.

Sources