naftiko: 1.0.0-alpha2 info: label: SAP SD Order-to-Cash description: Unified capability for end-to-end order-to-cash operations in SAP S/4HANA Sales and Distribution. Combines Sales Order, Outbound Delivery, Billing Document, and Pricing APIs into a single workflow for sales representatives, order management teams, and finance operations. Covers quote-to-order, pick-pack-ship, and invoice generation workflows. tags: - SAP - Sales and Distribution - Order-to-Cash - OData - S/4HANA created: '2026-05-02' modified: '2026-05-06' binds: - namespace: env keys: SAP_SD_API_KEY: SAP_SD_API_KEY capability: consumes: - type: http namespace: sales-order baseUri: https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap/API_SALES_ORDER_SRV description: SAP S/4HANA Sales Order OData service authentication: type: apikey key: APIKey value: '{{SAP_SD_API_KEY}}' placement: header resources: - name: sales-orders path: /A_SalesOrder description: Sales order header collection operations: - name: list-sales-orders method: GET description: Retrieve a list of sales orders inputParameters: - name: $top in: query type: integer required: false description: Maximum number of records to return - name: $skip in: query type: integer required: false description: Number of records to skip - name: $filter in: query type: string required: false description: OData filter expression - name: $expand in: query type: string required: false description: Navigation properties to expand outputRawFormat: json outputParameters: - name: result type: object value: $. - name: create-sales-order method: POST description: Create a new sales order outputRawFormat: json outputParameters: - name: result type: object value: $. body: type: json data: SalesOrderType: '{{tools.SalesOrderType}}' SalesOrganization: '{{tools.SalesOrganization}}' DistributionChannel: '{{tools.DistributionChannel}}' OrganizationDivision: '{{tools.OrganizationDivision}}' - name: sales-order-by-id path: /A_SalesOrder('{SalesOrder}') description: Single sales order by ID operations: - name: get-sales-order method: GET description: Retrieve a single sales order inputParameters: - name: SalesOrder in: path type: string required: true description: Sales order number outputRawFormat: json outputParameters: - name: result type: object value: $. - name: update-sales-order method: PATCH description: Update a sales order inputParameters: - name: SalesOrder in: path type: string required: true description: Sales order number outputRawFormat: json outputParameters: - name: result type: object value: $. - name: delete-sales-order method: DELETE description: Delete a sales order inputParameters: - name: SalesOrder in: path type: string required: true description: Sales order number outputRawFormat: json outputParameters: - name: result type: object value: $. - name: sales-order-items path: /A_SalesOrder('{SalesOrder}')/to_Item description: Sales order items operations: - name: list-sales-order-items method: GET description: Retrieve items for a sales order inputParameters: - name: SalesOrder in: path type: string required: true description: Sales order number outputRawFormat: json outputParameters: - name: result type: object value: $. - type: http namespace: outbound-delivery baseUri: https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap/API_OUTBOUND_DELIVERY_SRV description: SAP S/4HANA Outbound Delivery OData service authentication: type: apikey key: APIKey value: '{{SAP_SD_API_KEY}}' placement: header resources: - name: deliveries path: /A_OutbDeliveryHeader description: Outbound delivery collection operations: - name: list-outbound-deliveries method: GET description: Retrieve a list of outbound deliveries inputParameters: - name: $top in: query type: integer required: false description: Maximum number of records to return - name: $filter in: query type: string required: false description: OData filter expression outputRawFormat: json outputParameters: - name: result type: object value: $. - name: create-outbound-delivery method: POST description: Create a new outbound delivery outputRawFormat: json outputParameters: - name: result type: object value: $. body: type: json data: ShipToParty: '{{tools.ShipToParty}}' ShippingPoint: '{{tools.ShippingPoint}}' - name: delivery-by-id path: /A_OutbDeliveryHeader(DeliveryDocument='{DeliveryDocument}') description: Single outbound delivery operations: - name: get-outbound-delivery method: GET description: Retrieve a single outbound delivery inputParameters: - name: DeliveryDocument in: path type: string required: true description: Delivery document number outputRawFormat: json outputParameters: - name: result type: object value: $. - name: post-goods-issue path: /PostGoodsIssue description: Post goods issue for delivery operations: - name: post-goods-issue method: POST description: Post goods issue for an outbound delivery outputRawFormat: json outputParameters: - name: result type: object value: $. body: type: json data: DeliveryDocument: '{{tools.DeliveryDocument}}' - type: http namespace: billing-document baseUri: https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap/API_BILLING_DOCUMENT_SRV description: SAP S/4HANA Billing Document OData service authentication: type: apikey key: APIKey value: '{{SAP_SD_API_KEY}}' placement: header resources: - name: billing-documents path: /A_BillingDocument description: Billing document collection operations: - name: list-billing-documents method: GET description: Retrieve a list of billing documents inputParameters: - name: $top in: query type: integer required: false description: Maximum number of records to return - name: $filter in: query type: string required: false description: OData filter expression outputRawFormat: json outputParameters: - name: result type: object value: $. - name: billing-document-by-id path: /A_BillingDocument('{BillingDocument}') description: Single billing document operations: - name: get-billing-document method: GET description: Retrieve a single billing document inputParameters: - name: BillingDocument in: path type: string required: true description: Billing document number outputRawFormat: json outputParameters: - name: result type: object value: $. - name: cancel-billing-document path: /A_BillingDocument('{BillingDocument}')/Cancel description: Cancel a billing document operations: - name: cancel-billing-document method: POST description: Cancel a billing document inputParameters: - name: BillingDocument in: path type: string required: true description: Billing document number outputRawFormat: json outputParameters: - name: result type: object value: $. - type: http namespace: pricing baseUri: https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap/API_SLSPRCGCONDITIONRECORD_SRV description: SAP S/4HANA Pricing Condition Record OData service authentication: type: apikey key: APIKey value: '{{SAP_SD_API_KEY}}' placement: header resources: - name: pricing-conditions path: /A_SlsPricingConditionRecord description: Pricing condition record collection operations: - name: list-pricing-condition-records method: GET description: Retrieve a list of pricing condition records inputParameters: - name: $top in: query type: integer required: false description: Maximum number of records to return - name: $filter in: query type: string required: false description: OData filter expression outputRawFormat: json outputParameters: - name: result type: object value: $. - name: create-pricing-condition-record method: POST description: Create a pricing condition record outputRawFormat: json outputParameters: - name: result type: object value: $. body: type: json data: ConditionType: '{{tools.ConditionType}}' ConditionRateValue: '{{tools.ConditionRateValue}}' ConditionCurrency: '{{tools.ConditionCurrency}}' - name: pricing-condition-by-id path: /A_SlsPricingConditionRecord('{ConditionRecord}') description: Single pricing condition record operations: - name: get-pricing-condition-record method: GET description: Retrieve a single pricing condition record inputParameters: - name: ConditionRecord in: path type: string required: true description: Condition record number outputRawFormat: json outputParameters: - name: result type: object value: $. - name: update-pricing-condition-record method: PATCH description: Update a pricing condition record inputParameters: - name: ConditionRecord in: path type: string required: true description: Condition record number outputRawFormat: json outputParameters: - name: result type: object value: $. - name: delete-pricing-condition-record method: DELETE description: Delete a pricing condition record inputParameters: - name: ConditionRecord in: path type: string required: true description: Condition record number outputRawFormat: json outputParameters: - name: result type: object value: $. exposes: - type: rest port: 8080 namespace: order-to-cash-api description: Unified REST API for SAP SD order-to-cash workflow management. resources: - path: /v1/sales-orders name: sales-orders description: Sales order management operations: - method: GET name: list-sales-orders description: List all sales orders call: sales-order.list-sales-orders with: $top: rest.$top $filter: rest.$filter outputParameters: - type: object mapping: $. - method: POST name: create-sales-order description: Create a new sales order call: sales-order.create-sales-order outputParameters: - type: object mapping: $. - path: /v1/sales-orders/{id} name: sales-order-by-id description: Single sales order operations operations: - method: GET name: get-sales-order description: Get a specific sales order call: sales-order.get-sales-order with: SalesOrder: rest.id outputParameters: - type: object mapping: $. - method: PATCH name: update-sales-order description: Update a sales order call: sales-order.update-sales-order with: SalesOrder: rest.id outputParameters: - type: object mapping: $. - path: /v1/outbound-deliveries name: outbound-deliveries description: Outbound delivery management operations: - method: GET name: list-outbound-deliveries description: List outbound deliveries call: outbound-delivery.list-outbound-deliveries outputParameters: - type: object mapping: $. - method: POST name: create-outbound-delivery description: Create a new outbound delivery call: outbound-delivery.create-outbound-delivery outputParameters: - type: object mapping: $. - path: /v1/outbound-deliveries/{id}/goods-issue name: goods-issue description: Post goods issue for delivery operations: - method: POST name: post-goods-issue description: Post goods issue for an outbound delivery call: outbound-delivery.post-goods-issue with: DeliveryDocument: rest.id outputParameters: - type: object mapping: $. - path: /v1/billing-documents name: billing-documents description: Billing document management operations: - method: GET name: list-billing-documents description: List billing documents call: billing-document.list-billing-documents outputParameters: - type: object mapping: $. - path: /v1/billing-documents/{id} name: billing-document-by-id description: Single billing document operations operations: - method: GET name: get-billing-document description: Get a specific billing document call: billing-document.get-billing-document with: BillingDocument: rest.id outputParameters: - type: object mapping: $. - path: /v1/pricing-conditions name: pricing-conditions description: Pricing condition management operations: - method: GET name: list-pricing-conditions description: List pricing condition records call: pricing.list-pricing-condition-records outputParameters: - type: object mapping: $. - method: POST name: create-pricing-condition description: Create a new pricing condition record call: pricing.create-pricing-condition-record outputParameters: - type: object mapping: $. - type: mcp port: 9090 namespace: order-to-cash-mcp transport: http description: MCP server for AI-assisted SAP SD order-to-cash workflow management. tools: - name: list-sales-orders description: List sales orders from SAP S/4HANA SD hints: readOnly: true openWorld: true call: sales-order.list-sales-orders outputParameters: - type: object mapping: $. - name: get-sales-order description: Get a specific sales order by number hints: readOnly: true openWorld: false call: sales-order.get-sales-order outputParameters: - type: object mapping: $. - name: create-sales-order description: Create a new sales order in SAP S/4HANA hints: readOnly: false destructive: false call: sales-order.create-sales-order outputParameters: - type: object mapping: $. - name: list-outbound-deliveries description: List outbound deliveries from SAP S/4HANA hints: readOnly: true openWorld: true call: outbound-delivery.list-outbound-deliveries outputParameters: - type: object mapping: $. - name: create-outbound-delivery description: Create a new outbound delivery hints: readOnly: false destructive: false call: outbound-delivery.create-outbound-delivery outputParameters: - type: object mapping: $. - name: post-goods-issue description: Post goods issue to confirm shipment of outbound delivery hints: readOnly: false destructive: false idempotent: false call: outbound-delivery.post-goods-issue outputParameters: - type: object mapping: $. - name: list-billing-documents description: List billing documents and invoices from SAP S/4HANA hints: readOnly: true openWorld: true call: billing-document.list-billing-documents outputParameters: - type: object mapping: $. - name: get-billing-document description: Get a specific billing document or invoice hints: readOnly: true openWorld: false call: billing-document.get-billing-document outputParameters: - type: object mapping: $. - name: cancel-billing-document description: Cancel a billing document hints: readOnly: false destructive: true idempotent: true call: billing-document.cancel-billing-document outputParameters: - type: object mapping: $. - name: list-pricing-conditions description: List pricing condition records hints: readOnly: true openWorld: true call: pricing.list-pricing-condition-records outputParameters: - type: object mapping: $. - name: get-pricing-condition description: Get a specific pricing condition record hints: readOnly: true openWorld: false call: pricing.get-pricing-condition-record outputParameters: - type: object mapping: $. - name: create-pricing-condition description: Create a new pricing condition record hints: readOnly: false destructive: false call: pricing.create-pricing-condition-record outputParameters: - type: object mapping: $.