naftiko: 1.0.0-alpha2 info: label: Ariba Sourcing - External Approval API — Documents description: 'Ariba Sourcing - External Approval API — Documents. 2 operations. Lead operation: Ariba Sourcing Download Approval Document Attachment. Self-contained Naftiko capability covering one Ariba Sourcing business surface.' tags: - Ariba Sourcing - Documents created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: ARIBA_SOURCING_API_KEY: ARIBA_SOURCING_API_KEY capability: consumes: - type: http namespace: external-approval-documents baseUri: https://openapi.ariba.com/api/sourcing-approval/v2/prod description: Ariba Sourcing - External Approval API — Documents business capability. Self-contained, no shared references. resources: - name: Document-documentId-attachments-docAttachmentId path: /Document/{documentId}/attachments/{docAttachmentId} operations: - name: downloadattachment method: GET description: Ariba Sourcing Download Approval Document Attachment outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: documentId in: path type: string description: The document ID from which to download the attachment. required: true - name: docAttachmentId in: path type: string description: The attachment ID. required: true - name: realm in: query type: string description: The SAP Ariba realm name. required: true - name: entity_type-entity_id path: /{entity_type}/{entity_id} operations: - name: getapprovabledocument method: GET description: Ariba Sourcing Get Approvable Document Details outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: entity_type in: path type: string description: 'Type of item to be approved. Examples: Workspace, RFXDocument, ContractWorkspace, Folder.' required: true - name: entity_id in: path type: string description: The ID of the item to be approved. required: true - name: realm in: query type: string description: The SAP Ariba realm name. required: true - name: $select in: query type: string description: For sourcing events, specifies which parts of the event to retrieve (e.g., line items, invited suppliers). authentication: type: bearer token: '{{env.ARIBA_SOURCING_API_KEY}}' exposes: - type: rest namespace: external-approval-documents-rest port: 8080 description: REST adapter for Ariba Sourcing - External Approval API — Documents. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/document/{documentid}/attachments/{docattachmentid} name: document-documentid-attachments-docattachmentid description: REST surface for Document-documentId-attachments-docAttachmentId. operations: - method: GET name: downloadattachment description: Ariba Sourcing Download Approval Document Attachment call: external-approval-documents.downloadattachment with: documentId: rest.documentId docAttachmentId: rest.docAttachmentId realm: rest.realm outputParameters: - type: object mapping: $. - path: /v1/{entity-type}/{entity-id} name: entity-type-entity-id description: REST surface for entity_type-entity_id. operations: - method: GET name: getapprovabledocument description: Ariba Sourcing Get Approvable Document Details call: external-approval-documents.getapprovabledocument with: entity_type: rest.entity_type entity_id: rest.entity_id realm: rest.realm $select: rest.$select outputParameters: - type: object mapping: $. - type: mcp namespace: external-approval-documents-mcp port: 9090 transport: http description: MCP adapter for Ariba Sourcing - External Approval API — Documents. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: ariba-sourcing-download-approval-document description: Ariba Sourcing Download Approval Document Attachment hints: readOnly: true destructive: false idempotent: true call: external-approval-documents.downloadattachment with: documentId: tools.documentId docAttachmentId: tools.docAttachmentId realm: tools.realm outputParameters: - type: object mapping: $. - name: ariba-sourcing-get-approvable-document description: Ariba Sourcing Get Approvable Document Details hints: readOnly: true destructive: false idempotent: true call: external-approval-documents.getapprovabledocument with: entity_type: tools.entity_type entity_id: tools.entity_id realm: tools.realm $select: tools.$select outputParameters: - type: object mapping: $.