SAP Commerce Cloud · Capability

SAP Commerce Cloud Commerce Web Services API — Consents

SAP Commerce Cloud Commerce Web Services API — Consents. 2 operations. Lead operation: SAP Commerce Cloud Give consent. Self-contained Naftiko capability covering one Sap Commerce Cloud business surface.

Run with Naftiko Sap Commerce CloudConsents

What You Can Do

POST
Giveconsent — SAP Commerce Cloud Give consent
/v1/users/{userid}/consents
GET
Getconsenttemplates — SAP Commerce Cloud List consent templates
/v1/users/{userid}/consenttemplates

MCP Tools

sap-commerce-cloud-give-consent

SAP Commerce Cloud Give consent

sap-commerce-cloud-list-consent

SAP Commerce Cloud List consent templates

read-only idempotent

Capability Spec

commerce-web-services-consents.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: SAP Commerce Cloud Commerce Web Services API — Consents
  description: 'SAP Commerce Cloud Commerce Web Services API — Consents. 2 operations. Lead operation: SAP Commerce Cloud
    Give consent. Self-contained Naftiko capability covering one Sap Commerce Cloud business surface.'
  tags:
  - Sap Commerce Cloud
  - Consents
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    SAP_COMMERCE_CLOUD_API_KEY: SAP_COMMERCE_CLOUD_API_KEY
capability:
  consumes:
  - type: http
    namespace: commerce-web-services-consents
    baseUri: https://{tenant}.{region}.commercecloud.sap/occ/v2/{baseSiteId}
    description: SAP Commerce Cloud Commerce Web Services API — Consents business capability. Self-contained, no shared references.
    resources:
    - name: users-userId-consents
      path: /users/{userId}/consents
      operations:
      - name: giveconsent
        method: POST
        description: SAP Commerce Cloud Give consent
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: consentTemplateId
          in: query
          type: string
          description: Consent template identifier
          required: true
        - name: consentTemplateVersion
          in: query
          type: integer
          description: Consent template version
          required: true
    - name: users-userId-consenttemplates
      path: /users/{userId}/consenttemplates
      operations:
      - name: getconsenttemplates
        method: GET
        description: SAP Commerce Cloud List consent templates
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: bearer
      token: '{{env.SAP_COMMERCE_CLOUD_API_KEY}}'
  exposes:
  - type: rest
    namespace: commerce-web-services-consents-rest
    port: 8080
    description: REST adapter for SAP Commerce Cloud Commerce Web Services API — Consents. One Spectral-compliant resource
      per consumed operation, prefixed with /v1.
    resources:
    - path: /v1/users/{userid}/consents
      name: users-userid-consents
      description: REST surface for users-userId-consents.
      operations:
      - method: POST
        name: giveconsent
        description: SAP Commerce Cloud Give consent
        call: commerce-web-services-consents.giveconsent
        with:
          consentTemplateId: rest.consentTemplateId
          consentTemplateVersion: rest.consentTemplateVersion
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/users/{userid}/consenttemplates
      name: users-userid-consenttemplates
      description: REST surface for users-userId-consenttemplates.
      operations:
      - method: GET
        name: getconsenttemplates
        description: SAP Commerce Cloud List consent templates
        call: commerce-web-services-consents.getconsenttemplates
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: commerce-web-services-consents-mcp
    port: 9090
    transport: http
    description: MCP adapter for SAP Commerce Cloud Commerce Web Services API — Consents. One tool per consumed operation,
      routed inline through this capability's consumes block.
    tools:
    - name: sap-commerce-cloud-give-consent
      description: SAP Commerce Cloud Give consent
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: commerce-web-services-consents.giveconsent
      with:
        consentTemplateId: tools.consentTemplateId
        consentTemplateVersion: tools.consentTemplateVersion
      outputParameters:
      - type: object
        mapping: $.
    - name: sap-commerce-cloud-list-consent
      description: SAP Commerce Cloud List consent templates
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: commerce-web-services-consents.getconsenttemplates
      outputParameters:
      - type: object
        mapping: $.