web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

API - Retrieve Customer Record By No Rather Than SystemId

(0) ShareShare
ReportReport
Posted on by 3,328

Hi All

APIV2 examples use SystemId (guid) of the record to retrive by passing it as below:

GET businesscentralPrefix/companies({id})/customers({id})

GET businesscentralPrefix/companies({id})/customers({f2a5738a-44e3-ea11-bb43-000d3a2feca1})

Is there a way to create an endpoint to retrieve records by "No," such as customer number below:

GET businesscentralPrefix/companies({id})/customers({10000})

For a record in Cronus

"id": "f2a5738a-44e3-ea11-bb43-000d3a2feca1",

"number": "10000",

"displayName": "Adatum Corporation", "type": "Company", "addressLine1": "192 Market Square", "addressLine2": "", "city": "Atlanta", "state": "GA", "country": "US", "postalCode": "31772", "phoneNumber": "", "email": "robert.townes@contoso.com", "website": "", "taxLiable": true, "taxAreaId": "90196a90-44e3-ea11-bb43-000d3a2feca1", "taxAreaDisplayName": "ATLANTA, GA", "taxRegistrationNumber": "", "currencyId": "00000000-0000-0000-0000-000000000000", "currencyCode": "USD", "paymentTermsId": "04a5738a-44e3-ea11-bb43-000d3a2feca1", "shipmentMethodId": "00000000-0000-0000-0000-000000000000", "paymentMethodId": "3b196a90-44e3-ea11-bb43-000d3a2feca1", "blocked": " ", "lastModifiedDateTime": "2020-08-21T07:38:44.293Z"

I have the same question (0)
  • Verified answer
    YUN ZHU Profile Picture
    102,361 Super User 2026 Season 1 on at

    Hi, you can do it.

    But this need to create a new custom API page.

    For example:

    pastedimage1647561651793v1.png

    pastedimage1647561662410v2.png

    Test Code:

    page 50102 "ZY Customers"
    {
        Caption = 'ZY Customers';
        APIGroup = 'app1';
        APIPublisher = 'zy';
        APIVersion = 'v2.0';
        DelayedInsert = true;
        EntityName = 'zyCustomer';
        EntitySetName = 'zyCustomers';
        PageType = API;
        SourceTable = Customer;
    
        layout
        {
            area(content)
            {
                repeater(General)
                {
                    field(number; Rec."No.")
                    {
                        Caption = 'Customer NO.';
                    }
                    field(name; Rec.Name)
                    {
                        Caption = 'Customer Name';
                    }
                }
            }
        }
    }

    Test EndPoint: api.businesscentral.dynamics.com/.../zyCustomers('10000')

    Hope this will help.

    Thanks.

    ZHU

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 649 Super User 2026 Season 1

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 447 Most Valuable Professional

#3
YUN ZHU Profile Picture

YUN ZHU 388 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans