> ## Documentation Index
> Fetch the complete documentation index at: https://nextgen-docs.enfuce.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create parameters by rule id

> Adds parameter to a rule for a given card. These parameters will be used instead of rule defaults when processing rule for the card.



## OpenAPI

````yaml json-files/standard-spend-control-v1.openapi.json post /v1/rules/{rule-id}/parameters
openapi: 3.0.3
info:
  title: Standard Spend Control API
  description: API for managing standard spend control rules
  version: 1.0.0
servers:
  - url: https://api.{{tenant}}.ext-uat1-sandbox.mycore.enfuce.com/processor
    description: UAT Sandbox
  - url: https://api.{{tenant}}.eu.live.prod.mycore.enfuce.com/processor
    description: Production
security: []
tags:
  - name: RuleSets
    description: Rule Sets are collections of rules bound the entities.
  - name: Rules
    description: >
      Rules define the actual spend control rule that is applied to request.
      Rules can have filter that determine if  the rule should be processed.
  - name: Parameters
paths:
  /v1/rules/{rule-id}/parameters:
    post:
      tags:
        - Rules
      description: >-
        Adds parameter to a rule for a given card. These parameters will be used
        instead of rule defaults when processing rule for the card.
      operationId: createRuleParameter
      parameters:
        - name: rule-id
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/Id'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EntityParameter'
        required: true
      responses:
        '204':
          description: Successful operation
components:
  schemas:
    Id:
      type: integer
      format: int64
    EntityParameter:
      type: object
      properties:
        entity:
          $ref: '#/components/schemas/ExternalEntityReference'
        parameters:
          $ref: '#/components/schemas/RuleParameterList'
      required:
        - entity
        - parameters
    ExternalEntityReference:
      type: object
      properties:
        id:
          type: string
        type:
          $ref: '#/components/schemas/EntityType'
      required:
        - id
        - type
    RuleParameterList:
      type: array
      description: >
        List of parameters. Type of parameters is validated dynamically based on
        the rule they are applied to:

        - AMOUNT: ["100"] - the first parameter is the amount to limit for a
        single transaction

        - CUMULATIVE_AMOUNT (non-rolling / over a fixed period) : ["100",
        "DAILY"] - the first parameter is the cumulative amount to limit for the
        period provided as the second parameter, which must be one of DAILY,
        WEEKLY, MONTHLY, QUARTERLY, YEARLY

        - CUMULATIVE_AMOUNT (rolling / over a moving window):  - ["100",
        "ROLLING_DAILY", "24"] - the first parameter is the cumulative amount to
        limit for the period provided as the second parameter, which must be one
        of ROLLING_HOURLY, ROLLING_DAILY; the third is the duration of the
        period

        - ALLOWED_COUNTRIES: ["246", "752"] - the countries are represented by
        ISO 3166-1 numeric codes

        - BLOCKED_COUNTRIES: ["364", "643"] - the countries are represented by
        ISO 3166-1 numeric codes

        - ALLOWED_CARD_ENTRY_MODES: ["CHIP"] - at least one of UNKNOWN,
        MANUAL_ENTRY, MAGNETIC_STRIPE, CHIP, CHIP_CONTACTLESS, ECOMMERCE,
        WALLET_CONTACTLESS, WALLET_ECOMMERCE, CREDENTIALS_ON_FILE

        - BLOCK_CARD_PRESENT: no parameters

        - BLOCKED_TRANSACTION_TYPES: ["ATM"] - at least one of RETAIL, ATM,
        UNIQUE, CASH_DISBURSEMENT, BALANCE_INQUIRY, P2P_DEBIT, P2P_CREDIT,
        CREDIT, CASHBACK, AFT
      items:
        type: string
      example:
        - '100'
        - MONTHLY
    EntityType:
      type: string
      format: enum
      enum:
        - card
        - program_application
      x-enum-varnames:
        - card
        - program_application

````