naftiko: 1.0.0-alpha2 info: label: Avalara AvaTax Brazil API — Electronic Invoices description: 'Avalara AvaTax Brazil API — Electronic Invoices. 4 operations. Lead operation: Avalara Issue an Electronic Invoice. Self-contained Naftiko capability covering one Avalara business surface.' tags: - Avalara - Electronic Invoices created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: AVALARA_API_KEY: AVALARA_API_KEY capability: consumes: - type: http namespace: avatax-brazil-electronic-invoices baseUri: https://avataxbr-sandbox.avalarabrasil.com.br/v3 description: Avalara AvaTax Brazil API — Electronic Invoices business capability. Self-contained, no shared references. resources: - name: invoices path: /invoices operations: - name: createinvoice method: POST description: Avalara Issue an Electronic Invoice outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: listinvoices method: GET description: Avalara List Electronic Invoices outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: startDate in: query type: string - name: endDate in: query type: string - name: status in: query type: string - name: page in: query type: integer - name: pageSize in: query type: integer - name: invoices-invoiceId path: /invoices/{invoiceId} operations: - name: getinvoice method: GET description: Avalara Get an Invoice by ID outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: invoiceId in: path type: string required: true - name: invoices-invoiceId-cancel path: /invoices/{invoiceId}/cancel operations: - name: cancelinvoice method: POST description: Avalara Cancel an Electronic Invoice outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: invoiceId in: path type: string required: true - name: body in: body type: object description: Request body (JSON). required: true authentication: type: bearer token: '{{env.AVALARA_API_KEY}}' exposes: - type: rest namespace: avatax-brazil-electronic-invoices-rest port: 8080 description: REST adapter for Avalara AvaTax Brazil API — Electronic Invoices. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/invoices name: invoices description: REST surface for invoices. operations: - method: POST name: createinvoice description: Avalara Issue an Electronic Invoice call: avatax-brazil-electronic-invoices.createinvoice with: body: rest.body outputParameters: - type: object mapping: $. - method: GET name: listinvoices description: Avalara List Electronic Invoices call: avatax-brazil-electronic-invoices.listinvoices with: startDate: rest.startDate endDate: rest.endDate status: rest.status page: rest.page pageSize: rest.pageSize outputParameters: - type: object mapping: $. - path: /v1/invoices/{invoiceid} name: invoices-invoiceid description: REST surface for invoices-invoiceId. operations: - method: GET name: getinvoice description: Avalara Get an Invoice by ID call: avatax-brazil-electronic-invoices.getinvoice with: invoiceId: rest.invoiceId outputParameters: - type: object mapping: $. - path: /v1/invoices/{invoiceid}/cancel name: invoices-invoiceid-cancel description: REST surface for invoices-invoiceId-cancel. operations: - method: POST name: cancelinvoice description: Avalara Cancel an Electronic Invoice call: avatax-brazil-electronic-invoices.cancelinvoice with: invoiceId: rest.invoiceId body: rest.body outputParameters: - type: object mapping: $. - type: mcp namespace: avatax-brazil-electronic-invoices-mcp port: 9090 transport: http description: MCP adapter for Avalara AvaTax Brazil API — Electronic Invoices. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: avalara-issue-electronic-invoice description: Avalara Issue an Electronic Invoice hints: readOnly: false destructive: false idempotent: false call: avatax-brazil-electronic-invoices.createinvoice with: body: tools.body outputParameters: - type: object mapping: $. - name: avalara-list-electronic-invoices description: Avalara List Electronic Invoices hints: readOnly: true destructive: false idempotent: true call: avatax-brazil-electronic-invoices.listinvoices with: startDate: tools.startDate endDate: tools.endDate status: tools.status page: tools.page pageSize: tools.pageSize outputParameters: - type: object mapping: $. - name: avalara-get-invoice-id description: Avalara Get an Invoice by ID hints: readOnly: true destructive: false idempotent: true call: avatax-brazil-electronic-invoices.getinvoice with: invoiceId: tools.invoiceId outputParameters: - type: object mapping: $. - name: avalara-cancel-electronic-invoice description: Avalara Cancel an Electronic Invoice hints: readOnly: false destructive: false idempotent: false call: avatax-brazil-electronic-invoices.cancelinvoice with: invoiceId: tools.invoiceId body: tools.body outputParameters: - type: object mapping: $.