Mono Colombia

Creates a spending control

You can use this endpoint to create spending controls

POST
/v1/spending_controls

Authorization

authorization

AuthorizationBearer <token>

In: header

Header Parameters

x-idempotency-key?string
Formatuuid
Example"f30f1d0b-795f-49f5-80dc-41a7bffccfde"

Request Body

application/json

Attributes to create a spending control

currency_code?string|null

Spending control currency code

Value in"COP" | "USD" | "MXN" | "CLP" | "BRL" | "PEN" | "EUR"
nickname?string|null

Spending control nickname

Example"Holiday Spending Control"
rulesobject

Configured spending control rules

Properties1 <= properties
target?string

Spending control target

Default"card"
Value in"card" | "card_config_group"

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.cert.monoban.co/v1/spending_controls" \  -H "Content-Type: application/json" \  -d '{    "rules": {}  }'
{
  "currency_code": "COP",
  "id": "spc_5tgliBmzjZ6mpQPRbQjfKj",
  "nickname": "Holiday Spending Control",
  "rules": {
    "card_usage": {
      "disabled_card_usages": [
        "online_purchase"
      ]
    },
    "mcc": {
      "mccs": [
        "5411"
      ],
      "operation": "allow_mccs"
    },
    "merchant_name": {
      "operation": "allow_pattern",
      "regex": "^AMAZON.*"
    },
    "mid": {
      "mids": [
        "012345678"
      ],
      "operation": "allow_mids"
    },
    "velocity": {
      "daily": {
        "amount": 100000000,
        "currency": "COP"
      },
      "monthly": {
        "amount": 100000000,
        "currency": "COP"
      },
      "weekly": {
        "amount": 100000000,
        "currency": "COP"
      }
    },
    "withdrawal_velocity": {
      "daily": {
        "amount": 100000000,
        "currency": "COP"
      },
      "monthly": {
        "amount": 100000000,
        "currency": "COP"
      }
    }
  },
  "target": "card"
}
{
  "code": "400 Bad Request",
  "errors": [
    {
      "error_code": "validation_error",
      "message": "Generic changeset errors",
      "path": null,
      "url": null
    }
  ],
  "id": "log_7MkWaFqvfosB8fzHhb1Eql",
  "message": "Malformed request"
}
{
  "code": "401 Unauthorized",
  "errors": [
    {
      "error_code": "expired_token",
      "message": "The token is expired, inactive, or doesn't exist.",
      "path": null,
      "url": null
    }
  ],
  "id": "log_7MkWaFqvfosB8fzHhb1Eql",
  "message": "Authorization header is missing or invalid."
}
{
  "code": "403 Forbidden",
  "errors": [
    {
      "error_code": "not_authorized",
      "message": "Not authorized to have access to this resource.",
      "path": null,
      "url": null
    }
  ],
  "id": "log_7MkWaFqvfosB8fzHhb1Eql",
  "message": "Not authorized to have access to this resource"
}
{
  "code": "422 Unprocessable Entity",
  "errors": [
    {
      "error_code": "missing_field",
      "message": "The field is missing on the request body or parameters.",
      "path": "#/path/to/field",
      "url": null
    }
  ],
  "id": "log_7MkWaFqvfosB8fzHhb1Eql",
  "message": "Validation errors"
}