To use JSON REST interfaces, the service tier of business central must be configured to use ODATAV4 with API services enabled. The configuration of the service tier also allows to uses different methods of authentification (e.g. NTLM, OAuth). The interfaces use the version number 2.0 and higher, 1.0 is reserved for the SOAP interfaces. The interfaces use UTF8 character encoding.
BE-Commerce provides export interfaces. They are accessible by the URL http://<server name>:<odata port>/<service tier name>/api/BEterna/Export/v2.0
. To get an XML documentation of the interface metadata can be accessed via the url http://<server name>:<odata port>/<service tier name>/api/BEterna/Export/v2.0/$metadata
. The XML output looks like this:
<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx Version="4.0"
xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx">
<edmx:DataServices>
<Schema Namespace="Microsoft.NAV"
xmlns="http://docs.oasis-open.org/odata/ns/edm">
<EntityType Name="entityMetadata">
<Key>
<PropertyRef Name="entityName" />
</Key>
<Property Name="entityName" Type="Edm.String" Nullable="false" />
<Property Name="entitySetName" Type="Edm.String" />
<Property Name="entityCaptions" Type="Collection(Microsoft.NAV.entityMetadataLabel)" />
<Property Name="entitySetCaptions" Type="Collection(Microsoft.NAV.entityMetadataLabel)" />
<Property Name="properties" Type="Collection(Microsoft.NAV.entityMetadataField)" />
<Property Name="actions" Type="Collection(Microsoft.NAV.entityMetadataAction)" />
<Property Name="enumMembers" Type="Collection(Microsoft.NAV.entityMetadataEnumMember)" />
</EntityType>
<ComplexType Name="entityMetadataLabel">
<Property Name="languageCode" Type="Edm.Int32" Nullable="false" />
<Property Name="caption" Type="Edm.String" Nullable="false" />
</ComplexType>
<ComplexType Name="entityMetadataField">
<Property Name="name" Type="Edm.String" Nullable="false" />
<Property Name="captions" Type="Collection(Microsoft.NAV.entityMetadataLabel)" />
</ComplexType>
<ComplexType Name="entityMetadataAction">
<Property Name="name" Type="Edm.String" Nullable="false" />
<Property Name="captions" Type="Collection(Microsoft.NAV.entityMetadataLabel)" />
</ComplexType>
<ComplexType Name="entityMetadataEnumMember">
<Property Name="name" Type="Edm.String" Nullable="false" />
<Property Name="value" Type="Edm.Int32" Nullable="false" />
<Property Name="captions" Type="Collection(Microsoft.NAV.entityMetadataLabel)" />
</ComplexType>
<EntityType Name="company">
<Key>
<PropertyRef Name="id" />
</Key>
<Property Name="id" Type="Edm.Guid" Nullable="false" />
<Property Name="systemVersion" Type="Edm.String" />
<Property Name="name" Type="Edm.String" MaxLength="30" />
<Property Name="displayName" Type="Edm.String" MaxLength="250" />
<Property Name="businessProfileId" Type="Edm.String" MaxLength="250" />
<Property Name="systemCreatedAt" Type="Edm.DateTimeOffset" />
<Property Name="systemCreatedBy" Type="Edm.Guid" />
<Property Name="systemModifiedAt" Type="Edm.DateTimeOffset" />
<Property Name="systemModifiedBy" Type="Edm.Guid" />
<NavigationProperty Name="webshopCategories" Type="Collection(Microsoft.NAV.webshopCategory)" ContainsTarget="true" />
<NavigationProperty Name="webshopCategoryDescriptions" Type="Collection(Microsoft.NAV.webshopCategoryDescription)" ContainsTarget="true" />
<Annotation Term="OData.Community.Keys.V1.AlternateKeys">
<Collection>
<Record Type="OData.Community.Keys.V1.AlternateKey">
<PropertyValue Property="Key">
<Collection>
<Record Type="OData.Community.Keys.V1.PropertyRef">
<PropertyValue Property="Alias" String="businessProfileId" />
<PropertyValue Property="Name" PropertyPath="businessProfileId" />
</Record>
</Collection>
</PropertyValue>
</Record>
<Record Type="OData.Community.Keys.V1.AlternateKey">
<PropertyValue Property="Key">
<Collection>
<Record Type="OData.Community.Keys.V1.PropertyRef">
<PropertyValue Property="Alias" String="name" />
<PropertyValue Property="Name" PropertyPath="name" />
</Record>
</Collection>
</PropertyValue>
</Record>
</Collection>
</Annotation>
</EntityType>
<EntityType Name="subscriptions">
<Key>
<PropertyRef Name="subscriptionId" />
</Key>
<Property Name="subscriptionId" Type="Edm.String" Nullable="false" MaxLength="150" />
<Property Name="notificationUrl" Type="Edm.String" Nullable="false" />
<Property Name="resource" Type="Edm.String" Nullable="false" />
<Property Name="userId" Type="Edm.Guid" />
<Property Name="lastModifiedDateTime" Type="Edm.DateTimeOffset" />
<Property Name="clientState" Type="Edm.String" MaxLength="2048" />
<Property Name="expirationDateTime" Type="Edm.DateTimeOffset" />
<Property Name="systemCreatedAt" Type="Edm.DateTimeOffset" />
<Property Name="systemCreatedBy" Type="Edm.Guid" />
<Property Name="systemModifiedAt" Type="Edm.DateTimeOffset" />
<Property Name="systemModifiedBy" Type="Edm.Guid" />
</EntityType>
<EntityType Name="webshopCategory">
<Key>
<PropertyRef Name="systemId" />
</Key>
<Property Name="systemId" Type="Edm.Guid" Nullable="false" />
<Property Name="webshopCategoryCode" Type="Edm.String" Nullable="false" MaxLength="10" />
<Property Name="webshopChannelCode" Type="Edm.String" MaxLength="20" />
<Property Name="parentCategoryCode" Type="Edm.String" MaxLength="10" />
<Property Name="active" Type="Edm.Boolean" />
<Property Name="hidden" Type="Edm.Boolean" />
<Property Name="metaTitle" Type="Edm.String" MaxLength="250" />
<Property Name="metaDescription" Type="Edm.String" MaxLength="250" />
<Property Name="metaTags" Type="Edm.String" MaxLength="250" />
<NavigationProperty Name="webshopCategory" Type="Microsoft.NAV.webshopCategory" ContainsTarget="true">
<ReferentialConstraint Property="parentCategoryCode" ReferencedProperty="webshopCategoryCode" />
<ReferentialConstraint Property="webshopChannelCode" ReferencedProperty="webshopChannelCode" />
</NavigationProperty>
</EntityType>
<EntityType Name="webshopCategoryDescription">
<Key>
<PropertyRef Name="systemId" />
</Key>
<Property Name="systemId" Type="Edm.Guid" Nullable="false" />
<Property Name="webshopChannelCode" Type="Edm.String" MaxLength="20" />
<Property Name="webshopCategorySystemId" Type="Edm.String" />
<Property Name="language" Type="Edm.String" MaxLength="20" />
<Property Name="text" Type="Edm.String" />
</EntityType>
<EntityContainer Name="NAV">
<EntitySet Name="entityDefinitions" EntityType="Microsoft.NAV.entityMetadata" />
<EntitySet Name="companies" EntityType="Microsoft.NAV.company">
<Annotation Term="Org.OData.Capabilities.V1.ChangeTracking">
<Record>
<PropertyValue Property="Supported" Bool="false" />
</Record>
</Annotation>
<Annotation Term="Org.OData.Capabilities.V1.DeleteRestrictions">
<Record>
<PropertyValue Property="Deletable" Bool="false" />
</Record>
</Annotation>
<Annotation Term="Org.OData.Capabilities.V1.InsertRestrictions">
<Record>
<PropertyValue Property="Insertable" Bool="false" />
</Record>
</Annotation>
<Annotation Term="Org.OData.Capabilities.V1.UpdateRestrictions">
<Record>
<PropertyValue Property="Updatable" Bool="false" />
</Record>
</Annotation>
</EntitySet>
<EntitySet Name="subscriptions" EntityType="Microsoft.NAV.subscriptions">
<Annotation Term="Org.OData.Capabilities.V1.ChangeTracking">
<Record>
<PropertyValue Property="Supported" Bool="false" />
</Record>
</Annotation>
<Annotation Term="Org.OData.Capabilities.V1.DeleteRestrictions">
<Record>
<PropertyValue Property="Deletable" Bool="true" />
</Record>
</Annotation>
<Annotation Term="Org.OData.Capabilities.V1.InsertRestrictions">
<Record>
<PropertyValue Property="Insertable" Bool="true" />
</Record>
</Annotation>
<Annotation Term="Org.OData.Capabilities.V1.UpdateRestrictions">
<Record>
<PropertyValue Property="Updatable" Bool="true" />
</Record>
</Annotation>
</EntitySet>
<EntitySet Name="webshopCategories" EntityType="Microsoft.NAV.webshopCategory">
<Annotation Term="Org.OData.Capabilities.V1.ChangeTracking">
<Record>
<PropertyValue Property="Supported" Bool="false" />
</Record>
</Annotation>
<Annotation Term="Org.OData.Capabilities.V1.DeleteRestrictions">
<Record>
<PropertyValue Property="Deletable" Bool="false" />
</Record>
</Annotation>
<Annotation Term="Org.OData.Capabilities.V1.InsertRestrictions">
<Record>
<PropertyValue Property="Insertable" Bool="false" />
</Record>
</Annotation>
<Annotation Term="Org.OData.Capabilities.V1.UpdateRestrictions">
<Record>
<PropertyValue Property="Updatable" Bool="false" />
</Record>
</Annotation>
</EntitySet>
<EntitySet Name="webshopCategoryDescriptions" EntityType="Microsoft.NAV.webshopCategoryDescription">
<Annotation Term="Org.OData.Capabilities.V1.ChangeTracking">
<Record>
<PropertyValue Property="Supported" Bool="false" />
</Record>
</Annotation>
<Annotation Term="Org.OData.Capabilities.V1.DeleteRestrictions">
<Record>
<PropertyValue Property="Deletable" Bool="false" />
</Record>
</Annotation>
<Annotation Term="Org.OData.Capabilities.V1.InsertRestrictions">
<Record>
<PropertyValue Property="Insertable" Bool="false" />
</Record>
</Annotation>
<Annotation Term="Org.OData.Capabilities.V1.UpdateRestrictions">
<Record>
<PropertyValue Property="Updatable" Bool="false" />
</Record>
</Annotation>
</EntitySet>
</EntityContainer>
</Schema>
</edmx:DataServices>
</edmx:Edmx>
It provides information about all the interface fields and their data types.
BE-Commerce provides import interfaces. They are accessible by the URL http://<server name>:<odata port>/<service tier name>/api/BEterna/Import/v2.0
. To get an XML documentation of the interface metadata can be accessed via the url http://<server name>:<odata port>/<service tier name>/api/BEterna/Import/v2.0/$metadata
.