naftiko: 1.0.0-alpha2 info: label: SAP Ariba Procurement API — Purchase Orders description: 'SAP Ariba Procurement API — Purchase Orders. 5 operations. Lead operation: List Purchase Orders. Self-contained Naftiko capability covering one Sap Ariba business surface.' tags: - Sap Ariba - Purchase Orders created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: SAP_ARIBA_API_KEY: SAP_ARIBA_API_KEY capability: consumes: - type: http namespace: procurement-purchase-orders baseUri: https://openapi.ariba.com/api/procurement/v1 description: SAP Ariba Procurement API — Purchase Orders business capability. Self-contained, no shared references. resources: - name: orders path: /orders operations: - name: listpurchaseorders method: GET description: List Purchase Orders outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: filter in: query type: string description: 'OData-style filter expression to narrow results. Supports operators eq, ne, gt, lt, ge, le with the case-sensitive ''and'' operator. Example: orderDate ge ''2025-0' - name: orderBy in: query type: string description: Field name to sort results by, with optional asc or desc direction - name: supplierId in: query type: string description: Filter by supplier AN-ID on the SAP Ariba Network - name: buyerId in: query type: string description: Filter by buyer AN-ID on the SAP Ariba Network - name: status in: query type: string description: Filter by purchase order status - name: fromDate in: query type: string description: Filter orders created on or after this date (ISO 8601 format YYYY-MM-DD) - name: toDate in: query type: string description: Filter orders created on or before this date (ISO 8601 format YYYY-MM-DD) - 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: orders-orderId path: /orders/{orderId} 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: orders-orderId-cancel path: /orders/{orderId}/cancel operations: - name: cancelpurchaseorder method: POST description: Cancel a Purchase Order outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: false authentication: type: bearer token: '{{env.SAP_ARIBA_API_KEY}}' exposes: - type: rest namespace: procurement-purchase-orders-rest port: 8080 description: REST adapter for SAP Ariba Procurement API — Purchase Orders. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/orders name: orders description: REST surface for orders. operations: - method: GET name: listpurchaseorders description: List Purchase Orders call: procurement-purchase-orders.listpurchaseorders with: filter: rest.filter orderBy: rest.orderBy supplierId: rest.supplierId buyerId: rest.buyerId status: rest.status fromDate: rest.fromDate toDate: rest.toDate outputParameters: - type: object mapping: $. - method: POST name: createpurchaseorder description: Create a Purchase Order call: procurement-purchase-orders.createpurchaseorder with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/orders/{orderid} name: orders-orderid description: REST surface for orders-orderId. operations: - method: GET name: getpurchaseorder description: Get a Purchase Order call: procurement-purchase-orders.getpurchaseorder outputParameters: - type: object mapping: $. - method: PATCH name: updatepurchaseorder description: Update a Purchase Order call: procurement-purchase-orders.updatepurchaseorder with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/orders/{orderid}/cancel name: orders-orderid-cancel description: REST surface for orders-orderId-cancel. operations: - method: POST name: cancelpurchaseorder description: Cancel a Purchase Order call: procurement-purchase-orders.cancelpurchaseorder with: body: rest.body outputParameters: - type: object mapping: $. - type: mcp namespace: procurement-purchase-orders-mcp port: 9090 transport: http description: MCP adapter for SAP Ariba Procurement API — 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: procurement-purchase-orders.listpurchaseorders with: filter: tools.filter orderBy: tools.orderBy supplierId: tools.supplierId buyerId: tools.buyerId status: tools.status fromDate: tools.fromDate toDate: tools.toDate outputParameters: - type: object mapping: $. - name: create-purchase-order description: Create a Purchase Order hints: readOnly: false destructive: false idempotent: false call: procurement-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: procurement-purchase-orders.getpurchaseorder outputParameters: - type: object mapping: $. - name: update-purchase-order description: Update a Purchase Order hints: readOnly: false destructive: false idempotent: true call: procurement-purchase-orders.updatepurchaseorder with: body: tools.body outputParameters: - type: object mapping: $. - name: cancel-purchase-order description: Cancel a Purchase Order hints: readOnly: false destructive: false idempotent: false call: procurement-purchase-orders.cancelpurchaseorder with: body: tools.body outputParameters: - type: object mapping: $.