Shell · Capability

Shell Loyalty API — Accounts

Shell Loyalty API — Accounts. 3 operations. Lead operation: Enroll Loyalty Account. Self-contained Naftiko capability covering one Shell business surface.

Run with Naftiko ShellAccounts

What You Can Do

POST
Enrollaccount — Enroll Loyalty Account
/v1/accounts
GET
Getaccount — Get Loyalty Account
/v1/accounts/{accountid}
PUT
Updateaccount — Update Loyalty Account
/v1/accounts/{accountid}

MCP Tools

enroll-loyalty-account

Enroll Loyalty Account

get-loyalty-account

Get Loyalty Account

read-only idempotent
update-loyalty-account

Update Loyalty Account

idempotent

Capability Spec

loyalty-accounts.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Shell Loyalty API — Accounts
  description: 'Shell Loyalty API — Accounts. 3 operations. Lead operation: Enroll Loyalty Account. Self-contained Naftiko
    capability covering one Shell business surface.'
  tags:
  - Shell
  - Accounts
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    SHELL_API_KEY: SHELL_API_KEY
capability:
  consumes:
  - type: http
    namespace: loyalty-accounts
    baseUri: https://api.shell.com/loyalty/v1
    description: Shell Loyalty API — Accounts business capability. Self-contained, no shared references.
    resources:
    - name: accounts
      path: /accounts
      operations:
      - name: enrollaccount
        method: POST
        description: Enroll Loyalty Account
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: accounts-accountId
      path: /accounts/{accountId}
      operations:
      - name: getaccount
        method: GET
        description: Get Loyalty Account
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: accountId
          in: path
          type: string
          required: true
      - name: updateaccount
        method: PUT
        description: Update Loyalty Account
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: accountId
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: bearer
      token: '{{env.SHELL_API_KEY}}'
  exposes:
  - type: rest
    namespace: loyalty-accounts-rest
    port: 8080
    description: REST adapter for Shell Loyalty API — Accounts. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/accounts
      name: accounts
      description: REST surface for accounts.
      operations:
      - method: POST
        name: enrollaccount
        description: Enroll Loyalty Account
        call: loyalty-accounts.enrollaccount
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/accounts/{accountid}
      name: accounts-accountid
      description: REST surface for accounts-accountId.
      operations:
      - method: GET
        name: getaccount
        description: Get Loyalty Account
        call: loyalty-accounts.getaccount
        with:
          accountId: rest.accountId
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: updateaccount
        description: Update Loyalty Account
        call: loyalty-accounts.updateaccount
        with:
          accountId: rest.accountId
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: loyalty-accounts-mcp
    port: 9090
    transport: http
    description: MCP adapter for Shell Loyalty API — Accounts. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: enroll-loyalty-account
      description: Enroll Loyalty Account
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: loyalty-accounts.enrollaccount
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-loyalty-account
      description: Get Loyalty Account
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: loyalty-accounts.getaccount
      with:
        accountId: tools.accountId
      outputParameters:
      - type: object
        mapping: $.
    - name: update-loyalty-account
      description: Update Loyalty Account
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: loyalty-accounts.updateaccount
      with:
        accountId: tools.accountId
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.