Notifications
Announcements
No record found.
Hello,
Thank you for your question.
You're correct that standard API pages in Business Central do not natively support deeply nested JSON structures (i.e., parts within parts). The API page model is designed for flat or moderately nested data and does not handle complex hierarchical payloads like the one you've described.
Use a Codeunit with a Custom Web Service To handle complex JSON payloads, the most flexible and reliable method is to:
Text
JsonObject
JsonArray
JsonToken
This allows you to fully control how the payload is interpreted and mapped to internal data structures.
Accept Raw JSON as Text If the third-party system cannot send a JsonObject, you can accept the payload as a Text parameter and parse it using JsonObject.ReadFrom(Text) within your codeunit.
JsonObject.ReadFrom(Text)
Avoid API Pages for Deep Nesting As you've noted, API pages are not suitable for this use case due to their limitations in handling nested collections. They are best used for standard CRUD operations with simple structures.
Security and Validation Ensure that your codeunit includes proper validation, error handling, and authentication (e.g., via OAuth2 or API keys) to protect the endpoint.
Alternative: Azure Function or Middleware If the payload structure is fixed and complex, consider using an Azure Function or middleware service to receive the payload, transform it into a format Business Central can consume, and then forward it via a simpler API call.
If this response helps resolve your issue, please consider marking it as accepted so it may assist others with similar integration requirements.
Best regards.
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
OussamaSabbouh 3,151
Jainam M. Kothari 1,443 Super User 2025 Season 2
YUN ZHU 1,092 Super User 2025 Season 2