Mailchimp · Capability

Mailchimp Marketing API — Rules

Mailchimp Marketing API — Rules. 10 operations. Lead operation: Mailchimp List Promo Rules. Self-contained Naftiko capability covering one Mailchimp business surface.

Run with Naftiko MailchimpRules

What You Can Do

GET
Getecommercestoresidpromorules — Mailchimp List Promo Rules
/v1/ecommerce/stores/{store-id}/promo-rules
POST
Postecommercestoresidpromorules — Mailchimp Add Promo Rule
/v1/ecommerce/stores/{store-id}/promo-rules
GET
Getecommercestoresidpromorulesid — Mailchimp Get Promo Rule
/v1/ecommerce/stores/{store-id}/promo-rules/{promo-rule-id}
PATCH
Patchecommercestoresidpromorulesid — Mailchimp Update Promo Rule
/v1/ecommerce/stores/{store-id}/promo-rules/{promo-rule-id}
DELETE
Deleteecommercestoresidpromorulesid — Mailchimp Delete Promo Rule
/v1/ecommerce/stores/{store-id}/promo-rules/{promo-rule-id}
GET
Getecommercestoresidpromocodes — Mailchimp List Promo Codes
/v1/ecommerce/stores/{store-id}/promo-rules/{promo-rule-id}/promo-codes
POST
Postecommercestoresidpromocodes — Mailchimp Add Promo Code
/v1/ecommerce/stores/{store-id}/promo-rules/{promo-rule-id}/promo-codes
GET
Getecommercestoresidpromocodesid — Mailchimp Get Promo Code
/v1/ecommerce/stores/{store-id}/promo-rules/{promo-rule-id}/promo-codes/{promo-code-id}
PATCH
Patchecommercestoresidpromocodesid — Mailchimp Update Promo Code
/v1/ecommerce/stores/{store-id}/promo-rules/{promo-rule-id}/promo-codes/{promo-code-id}
DELETE
Deleteecommercestoresidpromocodesid — Mailchimp Delete Promo Code
/v1/ecommerce/stores/{store-id}/promo-rules/{promo-rule-id}/promo-codes/{promo-code-id}

MCP Tools

mailchimp-list-promo-rules

Mailchimp List Promo Rules

read-only idempotent
mailchimp-add-promo-rule

Mailchimp Add Promo Rule

mailchimp-get-promo-rule

Mailchimp Get Promo Rule

read-only idempotent
mailchimp-update-promo-rule

Mailchimp Update Promo Rule

idempotent
mailchimp-delete-promo-rule

Mailchimp Delete Promo Rule

idempotent
mailchimp-list-promo-codes

Mailchimp List Promo Codes

read-only idempotent
mailchimp-add-promo-code

Mailchimp Add Promo Code

mailchimp-get-promo-code

Mailchimp Get Promo Code

read-only idempotent
mailchimp-update-promo-code

Mailchimp Update Promo Code

idempotent
mailchimp-delete-promo-code

Mailchimp Delete Promo Code

idempotent

Capability Spec

marketing-rules.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Mailchimp Marketing API  — Rules
  description: 'Mailchimp Marketing API  — Rules. 10 operations. Lead operation: Mailchimp List Promo Rules. Self-contained
    Naftiko capability covering one Mailchimp business surface.'
  tags:
  - Mailchimp
  - Rules
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    MAILCHIMP_API_KEY: MAILCHIMP_API_KEY
capability:
  consumes:
  - type: http
    namespace: marketing-rules
    baseUri: https://server.api.mailchimp.com/3.0
    description: Mailchimp Marketing API  — Rules business capability. Self-contained, no shared references.
    resources:
    - name: ecommerce-stores-store_id-promo-rules
      path: /ecommerce/stores/{store_id}/promo-rules
      operations:
      - name: getecommercestoresidpromorules
        method: GET
        description: Mailchimp List Promo Rules
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: fields
          in: query
          type: array
          description: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
        - name: exclude_fields
          in: query
          type: array
          description: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
        - name: count
          in: query
          type: integer
          description: The number of records to return. Default value is 10. Maximum value is 1000
        - name: offset
          in: query
          type: integer
          description: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination),
            this it the number of records from a collection to skip. D
        - name: store_id
          in: path
          type: string
          description: The store id.
          required: true
      - name: postecommercestoresidpromorules
        method: POST
        description: Mailchimp Add Promo Rule
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: store_id
          in: path
          type: string
          description: The store id.
          required: true
        - name: body
          in: body
          type: object
          required: true
    - name: ecommerce-stores-store_id-promo-rules-promo_rule_id
      path: /ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}
      operations:
      - name: getecommercestoresidpromorulesid
        method: GET
        description: Mailchimp Get Promo Rule
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: fields
          in: query
          type: array
          description: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
        - name: exclude_fields
          in: query
          type: array
          description: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
        - name: store_id
          in: path
          type: string
          description: The store id.
          required: true
        - name: promo_rule_id
          in: path
          type: string
          description: The id for the promo rule of a store.
          required: true
      - name: patchecommercestoresidpromorulesid
        method: PATCH
        description: Mailchimp Update Promo Rule
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: store_id
          in: path
          type: string
          description: The store id.
          required: true
        - name: promo_rule_id
          in: path
          type: string
          description: The id for the promo rule of a store.
          required: true
        - name: body
          in: body
          type: object
          required: true
      - name: deleteecommercestoresidpromorulesid
        method: DELETE
        description: Mailchimp Delete Promo Rule
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: store_id
          in: path
          type: string
          description: The store id.
          required: true
        - name: promo_rule_id
          in: path
          type: string
          description: The id for the promo rule of a store.
          required: true
    - name: ecommerce-stores-store_id-promo-rules-promo_rule_id-promo-codes
      path: /ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}/promo-codes
      operations:
      - name: getecommercestoresidpromocodes
        method: GET
        description: Mailchimp List Promo Codes
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: fields
          in: query
          type: array
          description: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
        - name: exclude_fields
          in: query
          type: array
          description: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
        - name: count
          in: query
          type: integer
          description: The number of records to return. Default value is 10. Maximum value is 1000
        - name: offset
          in: query
          type: integer
          description: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination),
            this it the number of records from a collection to skip. D
        - name: promo_rule_id
          in: path
          type: string
          description: The id for the promo rule of a store.
          required: true
        - name: store_id
          in: path
          type: string
          description: The store id.
          required: true
      - name: postecommercestoresidpromocodes
        method: POST
        description: Mailchimp Add Promo Code
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: store_id
          in: path
          type: string
          description: The store id.
          required: true
        - name: promo_rule_id
          in: path
          type: string
          description: The id for the promo rule of a store.
          required: true
        - name: body
          in: body
          type: object
          required: true
    - name: ecommerce-stores-store_id-promo-rules-promo_rule_id-promo-codes-promo_code_id
      path: /ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}/promo-codes/{promo_code_id}
      operations:
      - name: getecommercestoresidpromocodesid
        method: GET
        description: Mailchimp Get Promo Code
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: fields
          in: query
          type: array
          description: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
        - name: exclude_fields
          in: query
          type: array
          description: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
        - name: store_id
          in: path
          type: string
          description: The store id.
          required: true
        - name: promo_rule_id
          in: path
          type: string
          description: The id for the promo rule of a store.
          required: true
        - name: promo_code_id
          in: path
          type: string
          description: The id for the promo code of a store.
          required: true
      - name: patchecommercestoresidpromocodesid
        method: PATCH
        description: Mailchimp Update Promo Code
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: store_id
          in: path
          type: string
          description: The store id.
          required: true
        - name: promo_rule_id
          in: path
          type: string
          description: The id for the promo rule of a store.
          required: true
        - name: promo_code_id
          in: path
          type: string
          description: The id for the promo code of a store.
          required: true
        - name: body
          in: body
          type: object
          required: true
      - name: deleteecommercestoresidpromocodesid
        method: DELETE
        description: Mailchimp Delete Promo Code
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: store_id
          in: path
          type: string
          description: The store id.
          required: true
        - name: promo_rule_id
          in: path
          type: string
          description: The id for the promo rule of a store.
          required: true
        - name: promo_code_id
          in: path
          type: string
          description: The id for the promo code of a store.
          required: true
  exposes:
  - type: rest
    namespace: marketing-rules-rest
    port: 8080
    description: REST adapter for Mailchimp Marketing API  — Rules. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/ecommerce/stores/{store-id}/promo-rules
      name: ecommerce-stores-store-id-promo-rules
      description: REST surface for ecommerce-stores-store_id-promo-rules.
      operations:
      - method: GET
        name: getecommercestoresidpromorules
        description: Mailchimp List Promo Rules
        call: marketing-rules.getecommercestoresidpromorules
        with:
          fields: rest.fields
          exclude_fields: rest.exclude_fields
          count: rest.count
          offset: rest.offset
          store_id: rest.store_id
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: postecommercestoresidpromorules
        description: Mailchimp Add Promo Rule
        call: marketing-rules.postecommercestoresidpromorules
        with:
          store_id: rest.store_id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/ecommerce/stores/{store-id}/promo-rules/{promo-rule-id}
      name: ecommerce-stores-store-id-promo-rules-promo-rule-id
      description: REST surface for ecommerce-stores-store_id-promo-rules-promo_rule_id.
      operations:
      - method: GET
        name: getecommercestoresidpromorulesid
        description: Mailchimp Get Promo Rule
        call: marketing-rules.getecommercestoresidpromorulesid
        with:
          fields: rest.fields
          exclude_fields: rest.exclude_fields
          store_id: rest.store_id
          promo_rule_id: rest.promo_rule_id
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: patchecommercestoresidpromorulesid
        description: Mailchimp Update Promo Rule
        call: marketing-rules.patchecommercestoresidpromorulesid
        with:
          store_id: rest.store_id
          promo_rule_id: rest.promo_rule_id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deleteecommercestoresidpromorulesid
        description: Mailchimp Delete Promo Rule
        call: marketing-rules.deleteecommercestoresidpromorulesid
        with:
          store_id: rest.store_id
          promo_rule_id: rest.promo_rule_id
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/ecommerce/stores/{store-id}/promo-rules/{promo-rule-id}/promo-codes
      name: ecommerce-stores-store-id-promo-rules-promo-rule-id-promo-codes
      description: REST surface for ecommerce-stores-store_id-promo-rules-promo_rule_id-promo-codes.
      operations:
      - method: GET
        name: getecommercestoresidpromocodes
        description: Mailchimp List Promo Codes
        call: marketing-rules.getecommercestoresidpromocodes
        with:
          fields: rest.fields
          exclude_fields: rest.exclude_fields
          count: rest.count
          offset: rest.offset
          promo_rule_id: rest.promo_rule_id
          store_id: rest.store_id
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: postecommercestoresidpromocodes
        description: Mailchimp Add Promo Code
        call: marketing-rules.postecommercestoresidpromocodes
        with:
          store_id: rest.store_id
          promo_rule_id: rest.promo_rule_id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/ecommerce/stores/{store-id}/promo-rules/{promo-rule-id}/promo-codes/{promo-code-id}
      name: ecommerce-stores-store-id-promo-rules-promo-rule-id-promo-codes-promo-code-id
      description: REST surface for ecommerce-stores-store_id-promo-rules-promo_rule_id-promo-codes-promo_code_id.
      operations:
      - method: GET
        name: getecommercestoresidpromocodesid
        description: Mailchimp Get Promo Code
        call: marketing-rules.getecommercestoresidpromocodesid
        with:
          fields: rest.fields
          exclude_fields: rest.exclude_fields
          store_id: rest.store_id
          promo_rule_id: rest.promo_rule_id
          promo_code_id: rest.promo_code_id
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: patchecommercestoresidpromocodesid
        description: Mailchimp Update Promo Code
        call: marketing-rules.patchecommercestoresidpromocodesid
        with:
          store_id: rest.store_id
          promo_rule_id: rest.promo_rule_id
          promo_code_id: rest.promo_code_id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deleteecommercestoresidpromocodesid
        description: Mailchimp Delete Promo Code
        call: marketing-rules.deleteecommercestoresidpromocodesid
        with:
          store_id: rest.store_id
          promo_rule_id: rest.promo_rule_id
          promo_code_id: rest.promo_code_id
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: marketing-rules-mcp
    port: 9090
    transport: http
    description: MCP adapter for Mailchimp Marketing API  — Rules. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: mailchimp-list-promo-rules
      description: Mailchimp List Promo Rules
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: marketing-rules.getecommercestoresidpromorules
      with:
        fields: tools.fields
        exclude_fields: tools.exclude_fields
        count: tools.count
        offset: tools.offset
        store_id: tools.store_id
      outputParameters:
      - type: object
        mapping: $.
    - name: mailchimp-add-promo-rule
      description: Mailchimp Add Promo Rule
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: marketing-rules.postecommercestoresidpromorules
      with:
        store_id: tools.store_id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: mailchimp-get-promo-rule
      description: Mailchimp Get Promo Rule
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: marketing-rules.getecommercestoresidpromorulesid
      with:
        fields: tools.fields
        exclude_fields: tools.exclude_fields
        store_id: tools.store_id
        promo_rule_id: tools.promo_rule_id
      outputParameters:
      - type: object
        mapping: $.
    - name: mailchimp-update-promo-rule
      description: Mailchimp Update Promo Rule
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: marketing-rules.patchecommercestoresidpromorulesid
      with:
        store_id: tools.store_id
        promo_rule_id: tools.promo_rule_id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: mailchimp-delete-promo-rule
      description: Mailchimp Delete Promo Rule
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: marketing-rules.deleteecommercestoresidpromorulesid
      with:
        store_id: tools.store_id
        promo_rule_id: tools.promo_rule_id
      outputParameters:
      - type: object
        mapping: $.
    - name: mailchimp-list-promo-codes
      description: Mailchimp List Promo Codes
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: marketing-rules.getecommercestoresidpromocodes
      with:
        fields: tools.fields
        exclude_fields: tools.exclude_fields
        count: tools.count
        offset: tools.offset
        promo_rule_id: tools.promo_rule_id
        store_id: tools.store_id
      outputParameters:
      - type: object
        mapping: $.
    - name: mailchimp-add-promo-code
      description: Mailchimp Add Promo Code
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: marketing-rules.postecommercestoresidpromocodes
      with:
        store_id: tools.store_id
        promo_rule_id: tools.promo_rule_id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: mailchimp-get-promo-code
      description: Mailchimp Get Promo Code
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: marketing-rules.getecommercestoresidpromocodesid
      with:
        fields: tools.fields
        exclude_fields: tools.exclude_fields
        store_id: tools.store_id
        promo_rule_id: tools.promo_rule_id
        promo_code_id: tools.promo_code_id
      outputParameters:
      - type: object
        mapping: $.
    - name: mailchimp-update-promo-code
      description: Mailchimp Update Promo Code
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: marketing-rules.patchecommercestoresidpromocodesid
      with:
        store_id: tools.store_id
        promo_rule_id: tools.promo_rule_id
        promo_code_id: tools.promo_code_id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: mailchimp-delete-promo-code
      description: Mailchimp Delete Promo Code
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: marketing-rules.deleteecommercestoresidpromocodesid
      with:
        store_id: tools.store_id
        promo_rule_id: tools.promo_rule_id
        promo_code_id: tools.promo_code_id
      outputParameters:
      - type: object
        mapping: $.