Marqeta · Capability

Core API — cards

Core API — cards. 13 operations. Lead operation: Lists cards by the last 4 digits. Self-contained Naftiko capability covering one Marqeta business surface.

Run with Naftiko Marqetacards

What You Can Do

GET
Getcards — Lists cards by the last 4 digits
/v1/cards
POST
Postcards — Creates a card
/v1/cards
GET
Getcardsbarcodebarcode — Returns a card's metadata
/v1/cards/barcode/{barcode}
POST
Postcardsgetbypan — Returns user and card tokens for the specified PAN
/v1/cards/getbypan
GET
Getcardsusertoken — Lists all cards for a specific user
/v1/cards/user/{token}
GET
Getcardstoken — Returns a specific card
/v1/cards/{token}
PUT
Putcardstoken — Updates a specific card
/v1/cards/{token}
GET
Getcardstokenshowpan — Returns a specific card - PAN visible
/v1/cards/{token}/showpan
GET
Getstoporders — Lists all stop orders for a card
/v1/cards/{token}/stoporders
POST
Poststoporders — Creates a stop order for a card transaction
/v1/cards/{token}/stoporders
GET
Getstoporder — Retrieves a specific stop order
/v1/cards/{token}/stoporders/{stop-order-token}
PUT
Putstoporders — Updates a stop order by token
/v1/cards/{token}/stoporders/{stop-order-token}
GET
Getcardtransactions — Returns transactions for a specific card
/v1/cards/{token}/transactions

MCP Tools

lists-cards-last-4-digits

Lists cards by the last 4 digits

read-only idempotent
creates-card

Creates a card

returns-card-s-metadata

Returns a card's metadata

read-only idempotent
returns-user-and-card-tokens

Returns user and card tokens for the specified PAN

lists-all-cards-specific-user

Lists all cards for a specific user

read-only idempotent
returns-specific-card

Returns a specific card

read-only idempotent
updates-specific-card

Updates a specific card

idempotent
returns-specific-card-pan-visible

Returns a specific card - PAN visible

read-only idempotent
lists-all-stop-orders-card

Lists all stop orders for a card

read-only idempotent
creates-stop-order-card-transaction

Creates a stop order for a card transaction

retrieves-specific-stop-order

Retrieves a specific stop order

read-only idempotent
updates-stop-order-token

Updates a stop order by token

idempotent
returns-transactions-specific-card

Returns transactions for a specific card

read-only idempotent

Capability Spec

core-cards.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Core API — cards
  description: 'Core API — cards. 13 operations. Lead operation: Lists cards by the last 4 digits. Self-contained Naftiko
    capability covering one Marqeta business surface.'
  tags:
  - Marqeta
  - cards
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    MARQETA_API_KEY: MARQETA_API_KEY
capability:
  consumes:
  - type: http
    namespace: core-cards
    baseUri: ''
    description: Core API — cards business capability. Self-contained, no shared references.
    resources:
    - name: cards
      path: /cards
      operations:
      - name: getcards
        method: GET
        description: Lists cards by the last 4 digits
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: count
          in: query
          type: integer
          description: Number of cards to retrieve
        - name: start_index
          in: query
          type: integer
          description: Start index
        - name: last_four
          in: query
          type: string
          description: Last four digits of card number
          required: true
        - name: fields
          in: query
          type: string
          description: Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.
        - name: sort_by
          in: query
          type: string
          description: Sort order
      - name: postcards
        method: POST
        description: Creates a card
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: show_cvv_number
          in: query
          type: boolean
          description: Show CVV
        - name: show_pan
          in: query
          type: boolean
          description: Show PAN
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: cards-barcode-barcode
      path: /cards/barcode/{barcode}
      operations:
      - name: getcardsbarcodebarcode
        method: GET
        description: Returns a card's metadata
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: barcode
          in: path
          type: string
          description: Barcode
          required: true
        - name: fields
          in: query
          type: string
          description: Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.
    - name: cards-getbypan
      path: /cards/getbypan
      operations:
      - name: postcardsgetbypan
        method: POST
        description: Returns user and card tokens for the specified PAN
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: cards-user-token
      path: /cards/user/{token}
      operations:
      - name: getcardsusertoken
        method: GET
        description: Lists all cards for a specific user
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: token
          in: path
          type: string
          description: User token
          required: true
        - name: count
          in: query
          type: integer
          description: Number of items to retrieve
        - name: start_index
          in: query
          type: integer
          description: Start index
        - name: fields
          in: query
          type: string
          description: Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.
        - name: sort_by
          in: query
          type: string
          description: Sort order
    - name: cards-token
      path: /cards/{token}
      operations:
      - name: getcardstoken
        method: GET
        description: Returns a specific card
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: token
          in: path
          type: string
          description: Card token
          required: true
        - name: fields
          in: query
          type: string
          description: Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.
        - name: expand
          in: query
          type: string
          description: Object to expand
      - name: putcardstoken
        method: PUT
        description: Updates a specific card
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: token
          in: path
          type: string
          description: Card token
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: cards-token-showpan
      path: /cards/{token}/showpan
      operations:
      - name: getcardstokenshowpan
        method: GET
        description: Returns a specific card - PAN visible
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: token
          in: path
          type: string
          description: Card token
          required: true
        - name: fields
          in: query
          type: string
          description: Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.
        - name: show_cvv_number
          in: query
          type: boolean
    - name: cards-token-stoporders
      path: /cards/{token}/stoporders
      operations:
      - name: getstoporders
        method: GET
        description: Lists all stop orders for a card
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: token
          in: path
          type: string
          description: Card token
          required: true
        - name: count
          in: query
          type: integer
          description: Number of stop orders to retrieve
        - name: start_index
          in: query
          type: integer
          description: Start index
      - name: poststoporders
        method: POST
        description: Creates a stop order for a card transaction
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: token
          in: path
          type: string
          description: Card token
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: cards-token-stoporders-stop_order_token
      path: /cards/{token}/stoporders/{stop_order_token}
      operations:
      - name: getstoporder
        method: GET
        description: Retrieves a specific stop order
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: token
          in: path
          type: string
          description: Card token
          required: true
        - name: stop_order_token
          in: path
          type: string
          description: Stop order token
          required: true
      - name: putstoporders
        method: PUT
        description: Updates a stop order by token
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: token
          in: path
          type: string
          description: Card token
          required: true
        - name: stop_order_token
          in: path
          type: string
          description: Stop order token
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: cards-token-transactions
      path: /cards/{token}/transactions
      operations:
      - name: getcardtransactions
        method: GET
        description: Returns transactions for a specific card
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: count
          in: query
          type: integer
          description: Number of transactions to retrieve
        - name: start_index
          in: query
          type: integer
          description: Start index
        - name: token
          in: path
          type: string
          description: Card token
          required: true
        - name: user_token
          in: query
          type: string
          description: User token
        - name: start_date
          in: query
          type: string
          description: Start date (yyyy-MM-dd | yyyy-MM-ddTHH:mm:ss.SS)
        - name: end_date
          in: query
          type: string
          description: End date (yyyy-MM-dd | yyyy-MM-ddTHH:mm:ss.SS)
        - name: is_recurring
          in: query
          type: boolean
          description: Filter by recurring transaction flag
    authentication:
      type: basic
      username: '{{env.MARQETA_USER}}'
      password: '{{env.MARQETA_PASS}}'
  exposes:
  - type: rest
    namespace: core-cards-rest
    port: 8080
    description: REST adapter for Core API — cards. One Spectral-compliant resource per consumed operation, prefixed with
      /v1.
    resources:
    - path: /v1/cards
      name: cards
      description: REST surface for cards.
      operations:
      - method: GET
        name: getcards
        description: Lists cards by the last 4 digits
        call: core-cards.getcards
        with:
          count: rest.count
          start_index: rest.start_index
          last_four: rest.last_four
          fields: rest.fields
          sort_by: rest.sort_by
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: postcards
        description: Creates a card
        call: core-cards.postcards
        with:
          show_cvv_number: rest.show_cvv_number
          show_pan: rest.show_pan
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/cards/barcode/{barcode}
      name: cards-barcode-barcode
      description: REST surface for cards-barcode-barcode.
      operations:
      - method: GET
        name: getcardsbarcodebarcode
        description: Returns a card's metadata
        call: core-cards.getcardsbarcodebarcode
        with:
          barcode: rest.barcode
          fields: rest.fields
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/cards/getbypan
      name: cards-getbypan
      description: REST surface for cards-getbypan.
      operations:
      - method: POST
        name: postcardsgetbypan
        description: Returns user and card tokens for the specified PAN
        call: core-cards.postcardsgetbypan
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/cards/user/{token}
      name: cards-user-token
      description: REST surface for cards-user-token.
      operations:
      - method: GET
        name: getcardsusertoken
        description: Lists all cards for a specific user
        call: core-cards.getcardsusertoken
        with:
          token: rest.token
          count: rest.count
          start_index: rest.start_index
          fields: rest.fields
          sort_by: rest.sort_by
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/cards/{token}
      name: cards-token
      description: REST surface for cards-token.
      operations:
      - method: GET
        name: getcardstoken
        description: Returns a specific card
        call: core-cards.getcardstoken
        with:
          token: rest.token
          fields: rest.fields
          expand: rest.expand
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: putcardstoken
        description: Updates a specific card
        call: core-cards.putcardstoken
        with:
          token: rest.token
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/cards/{token}/showpan
      name: cards-token-showpan
      description: REST surface for cards-token-showpan.
      operations:
      - method: GET
        name: getcardstokenshowpan
        description: Returns a specific card - PAN visible
        call: core-cards.getcardstokenshowpan
        with:
          token: rest.token
          fields: rest.fields
          show_cvv_number: rest.show_cvv_number
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/cards/{token}/stoporders
      name: cards-token-stoporders
      description: REST surface for cards-token-stoporders.
      operations:
      - method: GET
        name: getstoporders
        description: Lists all stop orders for a card
        call: core-cards.getstoporders
        with:
          token: rest.token
          count: rest.count
          start_index: rest.start_index
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: poststoporders
        description: Creates a stop order for a card transaction
        call: core-cards.poststoporders
        with:
          token: rest.token
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/cards/{token}/stoporders/{stop-order-token}
      name: cards-token-stoporders-stop-order-token
      description: REST surface for cards-token-stoporders-stop_order_token.
      operations:
      - method: GET
        name: getstoporder
        description: Retrieves a specific stop order
        call: core-cards.getstoporder
        with:
          token: rest.token
          stop_order_token: rest.stop_order_token
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: putstoporders
        description: Updates a stop order by token
        call: core-cards.putstoporders
        with:
          token: rest.token
          stop_order_token: rest.stop_order_token
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/cards/{token}/transactions
      name: cards-token-transactions
      description: REST surface for cards-token-transactions.
      operations:
      - method: GET
        name: getcardtransactions
        description: Returns transactions for a specific card
        call: core-cards.getcardtransactions
        with:
          count: rest.count
          start_index: rest.start_index
          token: rest.token
          user_token: rest.user_token
          start_date: rest.start_date
          end_date: rest.end_date
          is_recurring: rest.is_recurring
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: core-cards-mcp
    port: 9090
    transport: http
    description: MCP adapter for Core API — cards. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: lists-cards-last-4-digits
      description: Lists cards by the last 4 digits
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: core-cards.getcards
      with:
        count: tools.count
        start_index: tools.start_index
        last_four: tools.last_four
        fields: tools.fields
        sort_by: tools.sort_by
      outputParameters:
      - type: object
        mapping: $.
    - name: creates-card
      description: Creates a card
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: core-cards.postcards
      with:
        show_cvv_number: tools.show_cvv_number
        show_pan: tools.show_pan
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: returns-card-s-metadata
      description: Returns a card's metadata
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: core-cards.getcardsbarcodebarcode
      with:
        barcode: tools.barcode
        fields: tools.fields
      outputParameters:
      - type: object
        mapping: $.
    - name: returns-user-and-card-tokens
      description: Returns user and card tokens for the specified PAN
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: core-cards.postcardsgetbypan
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: lists-all-cards-specific-user
      description: Lists all cards for a specific user
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: core-cards.getcardsusertoken
      with:
        token: tools.token
        count: tools.count
        start_index: tools.start_index
        fields: tools.fields
        sort_by: tools.sort_by
      outputParameters:
      - type: object
        mapping: $.
    - name: returns-specific-card
      description: Returns a specific card
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: core-cards.getcardstoken
      with:
        token: tools.token
        fields: tools.fields
        expand: tools.expand
      outputParameters:
      - type: object
        mapping: $.
    - name: updates-specific-card
      description: Updates a specific card
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: core-cards.putcardstoken
      with:
        token: tools.token
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: returns-specific-card-pan-visible
      description: Returns a specific card - PAN visible
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: core-cards.getcardstokenshowpan
      with:
        token: tools.token
        fields: tools.fields
        show_cvv_number: tools.show_cvv_number
      outputParameters:
      - type: object
        mapping: $.
    - name: lists-all-stop-orders-card
      description: Lists all stop orders for a card
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: core-cards.getstoporders
      with:
        token: tools.token
        count: tools.count
        start_index: tools.start_index
      outputParameters:
      - type: object
        mapping: $.
    - name: creates-stop-order-card-transaction
      description: Creates a stop order for a card transaction
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: core-cards.poststoporders
      with:
        token: tools.token
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: retrieves-specific-stop-order
      description: Retrieves a specific stop order
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: core-cards.getstoporder
      with:
        token: tools.token
        stop_order_token: tools.stop_order_token
      outputParameters:
      - type: object
        mapping: $.
    - name: updates-stop-order-token
      description: Updates a stop order by token
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: core-cards.putstoporders
      with:
        token: tools.token
        stop_order_token: tools.stop_order_token
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: returns-transactions-specific-card
      description: Returns transactions for a specific card
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: core-cards.getcardtransactions
      with:
        count: tools.count
        start_index: tools.start_index
        token: tools.token
        user_token: tools.user_token
        start_date: tools.start_date
        end_date: tools.end_date
        is_recurring: tools.is_recurring
      outputParameters:
      - type: object
        mapping: $.