agent-builder
Agent Toolkit Builder — specialist in designing and coding Business Central agents using the AI Development Toolkit and Agent…
AL API development patterns for Business Central. Use when creating OData/REST API pages, HttpClient integrations, webhook implementations, or any external system integration via API.
$ npx -y skills add javiarmesto/ALDC-AL-Development-Collection --skill skill-api --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/skill-apiContext preview
The summary Claude sees to decide when to auto-load this skill.
AL API development patterns for Business Central. Use when creating OData/REST API pages, HttpClient integrations, webhook implementations, or any external system integration via API.
name: skill-api description: "AL API development patterns for Business Central. Use when creating OData/REST API pages, HttpClient integrations, webhook implementations, or any external system integration via API."
Design and implement RESTful API pages for Business Central: API page v2.0 patterns, OData conventions, versioning, bound/unbound actions, webhooks, header-lines navigation, and performance-optimized endpoints.
This skill should be loaded when:
page 50100 "Contoso Sales Orders API"
{
APIVersion = 'v2.0';
APIPublisher = 'contoso';
APIGroup = 'sales';
EntityCaption = 'Sales Order';
EntitySetCaption = 'Sales Orders';
EntityName = 'salesOrder'; // singular — used in URL for single entity
EntitySetName = 'salesOrders'; // plural — used in URL for collection
PageType = API;
SourceTable = "Sales Header";
SourceTableView = where("Document Type" = const(Order));
DelayedInsert = true; // required — defers insert until all fields set
ODataKeyFields = SystemId; // required — use SystemId for stable GUIDs
layout
{
area(Content)
{
repeater(Group)
{
field(id; Rec.SystemId)
{
Caption = 'Id';
Editable = false;
}
field(number; Rec."No.")
{
Caption = 'Number';
Editable = false;
}
field(orderDate; Rec."Order Date")
{
Caption = 'Order Date';
}
field(customerNumber; Rec."Sell-to Customer No.")
{
Caption = 'Customer Number';
}
field(customerName; Rec."Sell-to Customer Name")
{
Caption = 'Customer Name';
Editable = false;
}
field(totalAmountIncludingVAT; Rec."Amount Including VAT")
{
Caption = 'Total Amount Including VAT';
Editable = false;
}
field(status; Rec.Status)
{
Caption = 'Status';
Editable = false;
}
field(lastModifiedDateTime; Rec.SystemModifiedAt)
{
Caption = 'Last Modified Date Time';
Editable = false;
}
}
}
}
}**Resulting endpoint:**
GET /api/contoso/sales/v2.0/companies({companyId})/salesOrders
GET /api/contoso/sales/v2.0/companies({companyId})/salesOrders({id})
POST /api/contoso/sales/v2.0/companies({companyId})/salesOrders
PATCH /api/contoso/sales/v2.0/companies({companyId})/salesOrders({id})
DELETE /api/contoso/sales/v2.0/companies({companyId})/salesOrders({id})**Property rules:**
Expose parent-child relationships via `part` subpages:
// Add inside the header API page's repeater:
part(salesOrderLines; "Contoso Sales Order Lines API")
{
Caption = 'Lines';
EntityName = 'salesOrderLine';
EntitySetName = 'salesOrderLines';
SubPageLink = "Document Type" = field("Document Type"),
"Document No." = field("No.");
}// Lines API page (subpage)
page 50101 "Contoso Sales Order Lines API"
{
APIVersion = 'v2.0';
APIPublisher = 'contoso';
APIGroup = 'sales';
EntityCaption = 'Sales Order Line';
EntitySetCaption = 'Sales Order Lines';
EntityName = 'salesOrderLine';
EntitySetName = 'salesOrderLines';
PageType = API;
SourceTable = "Sales Line";
DelayedInsert = true;
ODataKeyFields = SystemId;
layout
{
area(Content)
{
repeater(Group)
{
field(id; Rec.SystemId) { Editable = false; }
field(lineNumber; Rec."Line No.") { Editable = false; }
field(lineType; Rec.Type) { Caption = 'Type'; }
field(itemNumber; Rec."No.") { Caption = 'Item Number'; }
field(description; Rec.Description) { Caption = 'Description'; }
field(quantity; Rec.Quantity) { Caption = 'Quantity'; }
field(unitPrice; Rec."Unit Price") { Caption = 'Unit Price'; }
field(lineAmount; Rec."Line Amount") { Caption = 'Line Amount'; Editable = false; }
}
}
}
}**Consumer usage:**
# Get order with lines expanded
GET /salesOrders({id})?$expand=salesOrderLines
# Get lines for a specific order
GET /salesOrders({id})/salesOrderLines
# Add a line to an order
POST /salesOrders({id})/salesOrderLines
{ "lineType": "Item", "itemNumber": "ITEM-001", "quantity": 10 }Bound actions trigger business logic on a specific entity:
//
Skills-based, spec-driven, TDD-orchestrated development framework for Microsoft Dynamics 365 Business Central. Engineering systems, visibly reasoned.
Agent Toolkit Builder — specialist in designing and coding Business Central agents using the AI Development Toolkit and Agent…
Generate optimized natural language instructions for Business Central agents (Designer or SDK). Applies the…
End-to-end workflow to create a coded Business Central agent using the Agent SDK. Orchestrates the 7 phases following the…
Generate optimized natural language instructions for Business Central agents (Designer or SDK). Applies the…
Generate AL code for Business Central Agent SDK task integration. Applies the patterns from skill-agent-task-patterns to produce…
Generate comprehensive test codeunits for Business Central Agent SDK integrations. Covers 6 categories: Registration, Factory,…