Hi,
You can create a page of type API with source table as Customer, like this:
page 50100 "API TestContact"
{
PageType = API;
Caption = 'contact';
APIPublisher = 'someApiPublisher';
APIGroup = 'testapi';
APIVersion = 'v1.0';
EntityName = 'contact';
EntitySetName = 'contacts';
SourceTable = Contact;
DelayedInsert = true;
layout
{
area(Content)
{
repeater(GroupName)
{
field(name; Name)
{
Caption = 'name';
}
field(address; Address)
{
Caption = 'address';
}
}
}
}
}
Now if you want to insert in Contact you have to make an API Call to
api.businesscentral.dynamics.com/.../someApiPublisher/testapi/v1.0/companies(<YourCompagnyID>)/contacts
With POST Method and as a body:
{
"name": "someName",
"address": "someAddress"
}
Bold words in url are defined in your Api Page Properties
To retrieve <YourCompanyID> you must call Company/ endpoint before
In Postman if you hit SEND with this configuration:

it creates this contact

Note that you cannot add a value to a field that does not exist on you page api object.
If you want to post a contact and set his Phone Number, you'll have to add the "Phone No." field on your page