naftiko: 1.0.0-alpha2 info: label: Toast Orders API — Discounts description: 'Toast Orders API — Discounts. 3 operations. Lead operation: Toast Get Applicable Discounts. Self-contained Naftiko capability covering one Toast business surface.' tags: - Toast - Discounts created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: TOAST_API_KEY: TOAST_API_KEY capability: consumes: - type: http namespace: orders-discounts baseUri: https://toast-api-server/orders/v2 description: Toast Orders API — Discounts business capability. Self-contained, no shared references. resources: - name: applicableDiscounts path: /applicableDiscounts operations: - name: applicablediscountspost method: POST description: Toast Get Applicable Discounts outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: Toast-Restaurant-External-ID in: header type: string description: The identifier of the restaurant. required: true - name: body in: body type: string description: A JSON `ApplicableDiscountsRequest` object containing required: true - name: orders-orderGuid-checks-checkGuid-appliedDiscounts path: /orders/{orderGuid}/checks/{checkGuid}/appliedDiscounts operations: - name: orderschecksapplieddiscountspost method: POST description: Toast Add Check-level Discounts outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: orderGuid in: path type: string description: The Toast platform identifier of the order that you are required: true - name: checkGuid in: path type: string description: The Toast platform identifier of the check that you are required: true - name: body in: body type: array description: A JSON array of `AppliedDiscount` objects that identify the discounts you are adding. required: true - name: orders-orderGuid-checks-checkGuid-selections-selectionGuid-appliedDiscounts path: /orders/{orderGuid}/checks/{checkGuid}/selections/{selectionGuid}/appliedDiscounts operations: - name: orderschecksselectionsapplieddiscountspost method: POST description: Toast Add Item-level Discounts outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: orderGuid in: path type: string description: The Toast platform identifier of the order that you are required: true - name: checkGuid in: path type: string description: The Toast platform identifier of the check that you are required: true - name: selectionGuid in: path type: string description: The Toast platform identifier of the menu item selection required: true - name: body in: body type: array description: A JSON array of `AppliedDiscount` objects that identify the discounts you are adding. required: true exposes: - type: rest namespace: orders-discounts-rest port: 8080 description: REST adapter for Toast Orders API — Discounts. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/applicablediscounts name: applicablediscounts description: REST surface for applicableDiscounts. operations: - method: POST name: applicablediscountspost description: Toast Get Applicable Discounts call: orders-discounts.applicablediscountspost with: Toast-Restaurant-External-ID: rest.Toast-Restaurant-External-ID body: rest.body outputParameters: - type: object mapping: $. - path: /v1/orders/{orderguid}/checks/{checkguid}/applieddiscounts name: orders-orderguid-checks-checkguid-applieddiscounts description: REST surface for orders-orderGuid-checks-checkGuid-appliedDiscounts. operations: - method: POST name: orderschecksapplieddiscountspost description: Toast Add Check-level Discounts call: orders-discounts.orderschecksapplieddiscountspost with: orderGuid: rest.orderGuid checkGuid: rest.checkGuid body: rest.body outputParameters: - type: object mapping: $. - path: /v1/orders/{orderguid}/checks/{checkguid}/selections/{selectionguid}/applieddiscounts name: orders-orderguid-checks-checkguid-selections-selectionguid-applieddiscounts description: REST surface for orders-orderGuid-checks-checkGuid-selections-selectionGuid-appliedDiscounts. operations: - method: POST name: orderschecksselectionsapplieddiscountspost description: Toast Add Item-level Discounts call: orders-discounts.orderschecksselectionsapplieddiscountspost with: orderGuid: rest.orderGuid checkGuid: rest.checkGuid selectionGuid: rest.selectionGuid body: rest.body outputParameters: - type: object mapping: $. - type: mcp namespace: orders-discounts-mcp port: 9090 transport: http description: MCP adapter for Toast Orders API — Discounts. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: toast-get-applicable-discounts description: Toast Get Applicable Discounts hints: readOnly: true destructive: false idempotent: false call: orders-discounts.applicablediscountspost with: Toast-Restaurant-External-ID: tools.Toast-Restaurant-External-ID body: tools.body outputParameters: - type: object mapping: $. - name: toast-add-check-level-discounts description: Toast Add Check-level Discounts hints: readOnly: false destructive: false idempotent: false call: orders-discounts.orderschecksapplieddiscountspost with: orderGuid: tools.orderGuid checkGuid: tools.checkGuid body: tools.body outputParameters: - type: object mapping: $. - name: toast-add-item-level-discounts description: Toast Add Item-level Discounts hints: readOnly: false destructive: false idempotent: false call: orders-discounts.orderschecksselectionsapplieddiscountspost with: orderGuid: tools.orderGuid checkGuid: tools.checkGuid selectionGuid: tools.selectionGuid body: tools.body outputParameters: - type: object mapping: $.