---
title: Retrieve transaction reasons.
slug: fx-api/retrieve-transaction-reasons
docTags: 
createdAt: 2025-05-30T02:39:22.452Z
---

{
  "id": "gnboOyD6hf-Fo3oDfiGZW",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://sand-api.monoova.com/global/v1/transaction_reasons",
    "servers": [
      {
        "url": "https://sand-api.monoova.com/global/v1/transaction_reasons",
        "description": "Monoova Global server"
      }
    ],
    "name": "Retrieve transaction reasons.",
    "description": "<p>Retrieves transaction reasons using rule-based resolution. When called without parameters, returns reasons from the default rule with all applicable countries. When <code>country_code</code> or <code>country_id</code> is supplied, returns reasons for that country's rule with the filtered country in each reason's countries array. If <code>beneficiary_id</code> is supplied, the response is resolved from the beneficiary context instead, which is preferred. When rules more specific than country-only are configured, requests without <code>beneficiary_id</code> return 422 and should switch to beneficiary context.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "beneficiary_id",
          "type": "integer",
          "description": "Resolve reasons from a specific beneficiary context."
        },
        {
          "kind": "optional",
          "name": "name",
          "type": "string",
          "description": "Optional filter by transaction reason name."
        },
        {
          "kind": "optional",
          "name": "country_id",
          "type": "integer",
          "description": "<p>Filter by country ID. When omitted, the default rule is used.</p>"
        },
        {
          "kind": "optional",
          "name": "country_code",
          "type": "object",
          "description": "<p>Filter by country code (2 or 3 letter). When omitted, the default rule is used.</p>",
          "customType": "CountryCode",
          "schema": [],
          "modelRef": "#/components/schemas/CountryCode"
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "A list of transaction reasons.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "required",
                "kind": "optional",
                "type": "boolean",
                "description": "Whether the user must select a transaction reason."
              },
              {
                "name": "regex",
                "kind": "optional",
                "type": "string",
                "nullable": true,
                "description": "<p>Validation pattern for free-text input when user_input_required is true.</p>"
              },
              {
                "name": "transaction_reasons",
                "kind": "optional",
                "type": "array",
                "description": "",
                "modelRef": "#/components/schemas/TransactionReason",
                "customType": "TransactionReason[]",
                "schema": []
              },
              {
                "name": "pagination",
                "kind": "optional",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/Pagination",
                "customType": "Pagination",
                "schema": []
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "422",
        "description": "Beneficiary context is required because the tenant has transaction reason rules with counter party or currency specificity.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "errors",
                "kind": "optional",
                "type": "array",
                "description": "",
                "example": "",
                "itemType": "string",
                "customType": "string[]",
                "itemExample": "",
                "itemDefault": ""
              }
            ],
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "_xt_c8-JyqbUDrPjCbttl",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url 'https://sand-api.monoova.com/global/v1/transaction_reasons?country_code=object' \\\n     --header 'accept: application/json'"
        },
        {
          "id": "6DfQAXJ1Usv7DbGm0TyIa",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://sand-api.monoova.com/global/v1/transaction_reasons?country_code=object\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "rcAjWq7a0DuM1bILvio2i",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://sand-api.monoova.com/global/v1/transaction_reasons?country_code=object\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "T0NOq21zZpOTvgLxsIiG2",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://sand-api.monoova.com/global/v1/transaction_reasons?country_code=object\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "_xt_c8-JyqbUDrPjCbttl"
    },
    "results": {
      "languages": [
        {
          "id": "tvHEHLkMJQVJBZD78Kfmk",
          "language": "200",
          "code": "// A list of transaction reasons.\n{\n  \"required\": false,\n  \"regex\": \"\",\n  \"transaction_reasons\": [\n    \"\"\n  ],\n  \"pagination\": {}\n}"
        },
        {
          "id": "x-l5dgxPH2h_qtPHBDM_b",
          "language": "422",
          "code": "// Beneficiary context is required because the tenant has transaction reason rules with counter party or currency specificity.\n{\n  \"errors\": [\n    \"\"\n  ]\n}"
        }
      ],
      "selectedLanguageId": "tvHEHLkMJQVJBZD78Kfmk"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}