Microsoft Dynamics NAV · Capability

Dynamics 365 Business Central API v2.0 — Purchase Orders

Dynamics 365 Business Central API v2.0 — Purchase Orders. 6 operations. Lead operation: List Purchase Orders. Self-contained Naftiko capability covering one Navision business surface.

Run with Naftiko NavisionPurchase Orders

What You Can Do

GET
Listpurchaseorders — List Purchase Orders
/v1/companies-company-id/purchaseorders
POST
Createpurchaseorder — Create a Purchase Order
/v1/companies-company-id/purchaseorders
GET
Getpurchaseorder — Get a Purchase Order
/v1/companies-company-id/purchaseorders-purchaseorder-id
PATCH
Updatepurchaseorder — Update a Purchase Order
/v1/companies-company-id/purchaseorders-purchaseorder-id
DELETE
Deletepurchaseorder — Delete a Purchase Order
/v1/companies-company-id/purchaseorders-purchaseorder-id
GET
Listpurchaseorderlines — List Purchase Order Lines
/v1/companies-company-id/purchaseorders-purchaseorder-id/purchaseorderlines

MCP Tools

list-purchase-orders

List Purchase Orders

read-only idempotent
create-purchase-order

Create a Purchase Order

get-purchase-order

Get a Purchase Order

read-only idempotent
update-purchase-order

Update a Purchase Order

idempotent
delete-purchase-order

Delete a Purchase Order

idempotent
list-purchase-order-lines

List Purchase Order Lines

read-only idempotent

Capability Spec

business-central-api-v2-purchase-orders.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Dynamics 365 Business Central API v2.0 — Purchase Orders
  description: 'Dynamics 365 Business Central API v2.0 — Purchase Orders. 6 operations. Lead operation: List Purchase Orders.
    Self-contained Naftiko capability covering one Navision business surface.'
  tags:
  - Navision
  - Purchase Orders
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    NAVISION_API_KEY: NAVISION_API_KEY
capability:
  consumes:
  - type: http
    namespace: business-central-api-v2-purchase-orders
    baseUri: https://api.businesscentral.dynamics.com/v2.0/{environment}/api/v2.0
    description: Dynamics 365 Business Central API v2.0 — Purchase Orders business capability. Self-contained, no shared references.
    resources:
    - name: companies({company_id})-purchaseOrders
      path: /companies({company_id})/purchaseOrders
      operations:
      - name: listpurchaseorders
        method: GET
        description: List Purchase Orders
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: createpurchaseorder
        method: POST
        description: Create a Purchase Order
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: companies({company_id})-purchaseOrders({purchaseOrder_id})
      path: /companies({company_id})/purchaseOrders({purchaseOrder_id})
      operations:
      - name: getpurchaseorder
        method: GET
        description: Get a Purchase Order
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: updatepurchaseorder
        method: PATCH
        description: Update a Purchase Order
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deletepurchaseorder
        method: DELETE
        description: Delete a Purchase Order
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: companies({company_id})-purchaseOrders({purchaseOrder_id})-purchaseOrderLines
      path: /companies({company_id})/purchaseOrders({purchaseOrder_id})/purchaseOrderLines
      operations:
      - name: listpurchaseorderlines
        method: GET
        description: List Purchase Order Lines
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: bearer
      token: '{{env.NAVISION_API_KEY}}'
  exposes:
  - type: rest
    namespace: business-central-api-v2-purchase-orders-rest
    port: 8080
    description: REST adapter for Dynamics 365 Business Central API v2.0 — Purchase Orders. One Spectral-compliant resource
      per consumed operation, prefixed with /v1.
    resources:
    - path: /v1/companies-company-id/purchaseorders
      name: companies-company-id-purchaseorders
      description: REST surface for companies({company_id})-purchaseOrders.
      operations:
      - method: GET
        name: listpurchaseorders
        description: List Purchase Orders
        call: business-central-api-v2-purchase-orders.listpurchaseorders
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createpurchaseorder
        description: Create a Purchase Order
        call: business-central-api-v2-purchase-orders.createpurchaseorder
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/companies-company-id/purchaseorders-purchaseorder-id
      name: companies-company-id-purchaseorders-purchaseorder-id
      description: REST surface for companies({company_id})-purchaseOrders({purchaseOrder_id}).
      operations:
      - method: GET
        name: getpurchaseorder
        description: Get a Purchase Order
        call: business-central-api-v2-purchase-orders.getpurchaseorder
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: updatepurchaseorder
        description: Update a Purchase Order
        call: business-central-api-v2-purchase-orders.updatepurchaseorder
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletepurchaseorder
        description: Delete a Purchase Order
        call: business-central-api-v2-purchase-orders.deletepurchaseorder
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/companies-company-id/purchaseorders-purchaseorder-id/purchaseorderlines
      name: companies-company-id-purchaseorders-purchaseorder-id-purchaseorderlines
      description: REST surface for companies({company_id})-purchaseOrders({purchaseOrder_id})-purchaseOrderLines.
      operations:
      - method: GET
        name: listpurchaseorderlines
        description: List Purchase Order Lines
        call: business-central-api-v2-purchase-orders.listpurchaseorderlines
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: business-central-api-v2-purchase-orders-mcp
    port: 9090
    transport: http
    description: MCP adapter for Dynamics 365 Business Central API v2.0 — Purchase Orders. One tool per consumed operation,
      routed inline through this capability's consumes block.
    tools:
    - name: list-purchase-orders
      description: List Purchase Orders
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: business-central-api-v2-purchase-orders.listpurchaseorders
      outputParameters:
      - type: object
        mapping: $.
    - name: create-purchase-order
      description: Create a Purchase Order
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: business-central-api-v2-purchase-orders.createpurchaseorder
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-purchase-order
      description: Get a Purchase Order
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: business-central-api-v2-purchase-orders.getpurchaseorder
      outputParameters:
      - type: object
        mapping: $.
    - name: update-purchase-order
      description: Update a Purchase Order
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: business-central-api-v2-purchase-orders.updatepurchaseorder
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-purchase-order
      description: Delete a Purchase Order
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: business-central-api-v2-purchase-orders.deletepurchaseorder
      outputParameters:
      - type: object
        mapping: $.
    - name: list-purchase-order-lines
      description: List Purchase Order Lines
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: business-central-api-v2-purchase-orders.listpurchaseorderlines
      outputParameters:
      - type: object
        mapping: $.