naftiko: 1.0.0-alpha2 info: label: Magento REST API — Invoices description: 'Magento REST API — Invoices. 3 operations. Lead operation: List invoices. Self-contained Naftiko capability covering one Magento business surface.' tags: - Magento - Invoices created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: MAGENTO_API_KEY: MAGENTO_API_KEY capability: consumes: - type: http namespace: rest-invoices baseUri: https://{store_domain}/rest/{store_code} description: Magento REST API — Invoices business capability. Self-contained, no shared references. resources: - name: V1-invoices path: /V1/invoices operations: - name: listinvoices method: GET description: List invoices outputRawFormat: json outputParameters: - name: result type: object value: $. - name: V1-invoices-invoiceId path: /V1/invoices/{invoiceId} operations: - name: getinvoice method: GET description: Get invoice by ID outputRawFormat: json outputParameters: - name: result type: object value: $. - name: V1-order-orderId-invoice path: /V1/order/{orderId}/invoice operations: - name: createinvoice method: POST description: Create an invoice for an order outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true authentication: type: bearer token: '{{env.MAGENTO_API_KEY}}' exposes: - type: rest namespace: rest-invoices-rest port: 8080 description: REST adapter for Magento REST API — Invoices. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/v1/invoices name: v1-invoices description: REST surface for V1-invoices. operations: - method: GET name: listinvoices description: List invoices call: rest-invoices.listinvoices outputParameters: - type: object mapping: $. - path: /v1/v1/invoices/{invoiceid} name: v1-invoices-invoiceid description: REST surface for V1-invoices-invoiceId. operations: - method: GET name: getinvoice description: Get invoice by ID call: rest-invoices.getinvoice outputParameters: - type: object mapping: $. - path: /v1/v1/order/{orderid}/invoice name: v1-order-orderid-invoice description: REST surface for V1-order-orderId-invoice. operations: - method: POST name: createinvoice description: Create an invoice for an order call: rest-invoices.createinvoice with: body: rest.body outputParameters: - type: object mapping: $. - type: mcp namespace: rest-invoices-mcp port: 9090 transport: http description: MCP adapter for Magento REST API — Invoices. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: list-invoices description: List invoices hints: readOnly: true destructive: false idempotent: true call: rest-invoices.listinvoices outputParameters: - type: object mapping: $. - name: get-invoice-id description: Get invoice by ID hints: readOnly: true destructive: false idempotent: true call: rest-invoices.getinvoice outputParameters: - type: object mapping: $. - name: create-invoice-order description: Create an invoice for an order hints: readOnly: false destructive: false idempotent: false call: rest-invoices.createinvoice with: body: tools.body outputParameters: - type: object mapping: $.