---
title: /sendTransactionFromCashbox
slug: sendtransactionfromcashbox
createdAt: 2024-01-09T12:30:00.561Z
---

{
  "id": "GzulrM9BNdAQYwNPIGMCj",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "http://1.1.1.1/sendTransactionFromCashbox",
    "servers": [
      {
        "url": "http://1.1.1.1/sendTransactionFromCashbox"
      }
    ],
    "name": "",
    "description": "<ul>\n<li>\n<p>This request will send a cashbox transaction from the Cold Vault to a whitelisted destination address.</p>\n</li>\n<li>\n<p>return -  approvalRequestStatus, AmountToTransfer, DestinationAddress.\n********** NOTE success or failure in this api call does not necessarily means success or failure in the transaction itself.</p>\n<p>********** for example, the transaction may work by the response to the client can be lost in communication (if the internet is down for the client)</p>\n<p>********** another example is that the transaction was approved here but failed in the signing process\nTo know the status of the transaction you can access the function getTransactionByToken.</p>\n<p>To get the token to send those functions you should call getCurrentToken one action BEFORE sendTransaction</p>\n<p>myTokenToStoreInTheDb = user.getCurrentToken()</p>\n<p>sendTransactionFromCashbox(...)</p>\n<p>.....</p>\n<p>user.getTransactionByToken(myTokenToStoreInTheDb,\"BTC\")</p>\n<p>example- sendTransactionFromCashbox(1,1,1,1,[\"LZ47MIRBQC\"])</p>\n</li>\n</ul>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [
        {
          "kind": "required",
          "name": "cashbox_id",
          "type": "integer",
          "example": 1,
          "description": "identifier for the cashbox to use in this operation",
          "default": 1
        },
        {
          "kind": "required",
          "name": "destination_index",
          "type": "integer",
          "example": 1,
          "description": "<p>identifier for the transaction destination starting from 0 (use getCashboxes to get the values beforehand)</p>",
          "default": 1
        },
        {
          "kind": "required",
          "name": "parts_count",
          "type": "integer",
          "example": 1,
          "description": "the cashbox's part count",
          "default": 1
        },
        {
          "kind": "required",
          "name": "fee_index",
          "type": "integer",
          "example": 1,
          "description": "<p>identifier for the fee to pay starting from 0 (use getCashboxes to get the values beforehand)</p>",
          "default": 1
        },
        {
          "kind": "optional",
          "name": "passwords",
          "type": "array",
          "example": "[\"LZ47MIRBQC\"]",
          "description": "list of passwords in case destination is protected with importance to the order",
          "default": [
            "LZ47MIRBQC"
          ],
          "schema": [],
          "itemType": "string",
          "customType": "string[]"
        }
      ],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "Request data for a transaction.",
          "customType": "sendTransactionFromCashboxRequest",
          "schema": [
            {
              "name": "CashboxId",
              "kind": "optional",
              "type": "integer",
              "description": "The ID of the cashbox.",
              "example": 1,
              "default": 1
            },
            {
              "name": "DestinationIndex",
              "kind": "optional",
              "type": "integer",
              "description": "The destination index for the transaction.",
              "example": 1,
              "default": 1
            },
            {
              "name": "FeeIndex",
              "kind": "optional",
              "type": "integer",
              "description": "The fee index for the transaction.",
              "example": 1,
              "default": 1
            },
            {
              "name": "PartsCount",
              "kind": "optional",
              "type": "integer",
              "description": "The number of parts for the transaction.",
              "example": 1,
              "default": 1
            },
            {
              "name": "Passwords",
              "kind": "optional",
              "type": "array",
              "description": "An array of passwords required for the transaction.",
              "example": "",
              "itemType": "string",
              "customType": "string[]",
              "itemExample": "LZ47MIRBQC",
              "itemDefault": "LZ47MIRBQC"
            },
            {
              "name": "Meta",
              "kind": "optional",
              "type": "object",
              "modelRef": "#/components/schemas/MetaTokensendTransactionFromCashbox",
              "customType": "MetaTokensendTransactionFromCashbox",
              "schema": [
                {
                  "name": "FunctionName",
                  "kind": "optional",
                  "type": "string",
                  "description": "The Function to be called",
                  "example": "sendTransactionFromCashbox",
                  "default": "sendTransactionFromCashbox"
                },
                {
                  "name": "RandomData",
                  "kind": "optional",
                  "type": "string",
                  "description": "Random Data",
                  "example": "288cd49d4b8bf00e7d6114b78d5668d5581d6b953fafef779133caa844cd4229",
                  "default": "288cd49d4b8bf00e7d6114b78d5668d5581d6b953fafef779133caa844cd4229"
                },
                {
                  "name": "Destination",
                  "kind": "optional",
                  "type": "string",
                  "description": "Id of the server",
                  "example": "",
                  "default": "b9cb8afe52f1d52521cf2b62dfe12146156ad5328f83c62c20c7da81b263356a61340de745c858998544c041798b01c2f4fac31bebe52a19280a32cd57d6d374ea"
                },
                {
                  "name": "Time",
                  "kind": "optional",
                  "type": "string",
                  "description": "UTC Time of execution",
                  "example": "2021-02-07T18:37:46.948Z",
                  "default": "2021-02-07T18:37:46.948Z"
                },
                {
                  "name": "Source",
                  "kind": "optional",
                  "type": "string",
                  "description": "User public key",
                  "example": "",
                  "default": "048b99461a70a49abe63fd585cb224177a22a92d2e9e4ddfbc0027887bee9d1843388f42a3eb2e740565e115ad8b7981abf59e3b03b771f4b063b53c517d7a9d99"
                },
                {
                  "name": "AccessToken",
                  "kind": "optional",
                  "type": "string",
                  "description": "Token used for authentication purposes",
                  "example": "51311c84d2c8fd2fafbe56ceb1fb30a99d3417abfc55769577338ab286798087",
                  "default": "51311c84d2c8fd2fafbe56ceb1fb30a99d3417abfc55769577338ab286798087"
                }
              ]
            }
          ],
          "modelRef": "#/components/schemas/sendTransactionFromCashboxRequest",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "success",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "schema": [
              {
                "name": "FunctionData",
                "kind": "optional",
                "type": "object",
                "example": "",
                "schema": [
                  {
                    "name": "ApprovalRequestStatus",
                    "kind": "optional",
                    "type": "integer",
                    "description": "Status of the transaction request",
                    "example": 3,
                    "default": 3
                  },
                  {
                    "name": "Transaction",
                    "kind": "optional",
                    "type": "object",
                    "example": "",
                    "schema": [
                      {
                        "name": "AmountToTransfer",
                        "kind": "optional",
                        "type": "string",
                        "description": "Amount to be transferred in the crypto's smallest units (satoshi, wei, drops,...)",
                        "example": "50000000",
                        "default": "50000000"
                      },
                      {
                        "name": "DestinationAddress",
                        "kind": "optional",
                        "type": "string",
                        "description": "The address of the destination",
                        "example": "12Pxiuw1STqszL84kzyb2Jw5dFm541hyDd",
                        "default": "12Pxiuw1STqszL84kzyb2Jw5dFm541hyDd"
                      }
                    ]
                  }
                ]
              },
              {
                "name": "Meta",
                "kind": "optional",
                "type": "object",
                "modelRef": "#/components/schemas/MetaResponse",
                "customType": "MetaResponse",
                "schema": [
                  {
                    "name": "AccessToken",
                    "kind": "optional",
                    "type": "string",
                    "description": "The new access token generated after this operation",
                    "example": "a3e816b5bc04302d99da94705ec2309a4a63fe10d6aed3c5f6fc9e7ff27c6be6",
                    "default": "a3e816b5bc04302d99da94705ec2309a4a63fe10d6aed3c5f6fc9e7ff27c6be6"
                  },
                  {
                    "name": "Destination",
                    "kind": "optional",
                    "type": "string",
                    "description": "Id of the server",
                    "example": "042c671aeb148d9b2bb4918399c4c925f3764248c5ab2d5194ab0f32664132834692699a75e7fafb5af35f183b7d8a68bdc3b3e6ebfaff8ab555b9a3caf8090622",
                    "default": "042c671aeb148d9b2bb4918399c4c925f3764248c5ab2d5194ab0f32664132834692699a75e7fafb5af35f183b7d8a68bdc3b3e6ebfaff8ab555b9a3caf8090622"
                  },
                  {
                    "name": "Source",
                    "kind": "optional",
                    "type": "string",
                    "description": "User public key",
                    "example": "df4b76a23067a9d782d09a7372ed526ec713cf6d771fac4dbdb9610f7af36d570a157eed76986b8e85afde12888d10d10bef461399e490f3d7e4db44cde1b6e355",
                    "default": "df4b76a23067a9d782d09a7372ed526ec713cf6d771fac4dbdb9610f7af36d570a157eed76986b8e85afde12888d10d10bef461399e490f3d7e4db44cde1b6e355"
                  },
                  {
                    "name": "Time",
                    "kind": "optional",
                    "type": "string",
                    "description": "UTC Time of execution",
                    "example": "2021-02-14 09:58:52.320",
                    "default": "2021-02-14 09:58:52.320"
                  }
                ]
              }
            ],
            "isExpanded": true
          }
        ]
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "example-0-curl",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url 'http://1.1.1.1/sendTransactionFromCashbox?cashbox_id=1&destination_index=1&parts_count=1&fee_index=1&passwords=LZ47MIRBQC' \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"CashboxId\": 1,\n     \"DestinationIndex\": 1,\n     \"FeeIndex\": 1,\n     \"PartsCount\": 1,\n     \"Meta\": {\n     \"FunctionName\": \"sendTransactionFromCashbox\",\n     \"RandomData\": \"288cd49d4b8bf00e7d6114b78d5668d5581d6b953fafef779133caa844cd4229\",\n     \"Destination\": \"b9cb8afe52f1d52521cf2b62dfe12146156ad5328f83c62c20c7da81b263356a61340de745c858998544c041798b01c2f4fac31bebe52a19280a32cd57d6d374ea\",\n     \"Time\": \"2021-02-07T18:37:46.948Z\",\n     \"Source\": \"048b99461a70a49abe63fd585cb224177a22a92d2e9e4ddfbc0027887bee9d1843388f42a3eb2e740565e115ad8b7981abf59e3b03b771f4b063b53c517d7a9d99\",\n     \"AccessToken\": \"51311c84d2c8fd2fafbe56ceb1fb30a99d3417abfc55769577338ab286798087\"\n     }\n     }'"
        },
        {
          "id": "example-1-javascript",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"CashboxId\": 1,\n   \"DestinationIndex\": 1,\n   \"FeeIndex\": 1,\n   \"PartsCount\": 1,\n   \"Meta\": {\n      \"FunctionName\": \"sendTransactionFromCashbox\",\n      \"RandomData\": \"288cd49d4b8bf00e7d6114b78d5668d5581d6b953fafef779133caa844cd4229\",\n      \"Destination\": \"b9cb8afe52f1d52521cf2b62dfe12146156ad5328f83c62c20c7da81b263356a61340de745c858998544c041798b01c2f4fac31bebe52a19280a32cd57d6d374ea\",\n      \"Time\": \"2021-02-07T18:37:46.948Z\",\n      \"Source\": \"048b99461a70a49abe63fd585cb224177a22a92d2e9e4ddfbc0027887bee9d1843388f42a3eb2e740565e115ad8b7981abf59e3b03b771f4b063b53c517d7a9d99\",\n      \"AccessToken\": \"51311c84d2c8fd2fafbe56ceb1fb30a99d3417abfc55769577338ab286798087\"\n   }\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"http://1.1.1.1/sendTransactionFromCashbox?cashbox_id=1&destination_index=1&parts_count=1&fee_index=1&passwords=LZ47MIRBQC\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "example-2-ruby",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"http://1.1.1.1/sendTransactionFromCashbox?cashbox_id=1&destination_index=1&parts_count=1&fee_index=1&passwords=LZ47MIRBQC\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"CashboxId\": 1,\n   \"DestinationIndex\": 1,\n   \"FeeIndex\": 1,\n   \"PartsCount\": 1,\n   \"Meta\": {\n      \"FunctionName\": \"sendTransactionFromCashbox\",\n      \"RandomData\": \"288cd49d4b8bf00e7d6114b78d5668d5581d6b953fafef779133caa844cd4229\",\n      \"Destination\": \"b9cb8afe52f1d52521cf2b62dfe12146156ad5328f83c62c20c7da81b263356a61340de745c858998544c041798b01c2f4fac31bebe52a19280a32cd57d6d374ea\",\n      \"Time\": \"2021-02-07T18:37:46.948Z\",\n      \"Source\": \"048b99461a70a49abe63fd585cb224177a22a92d2e9e4ddfbc0027887bee9d1843388f42a3eb2e740565e115ad8b7981abf59e3b03b771f4b063b53c517d7a9d99\",\n      \"AccessToken\": \"51311c84d2c8fd2fafbe56ceb1fb30a99d3417abfc55769577338ab286798087\"\n   }\n})\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "example-3-python",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"http://1.1.1.1/sendTransactionFromCashbox?cashbox_id=1&destination_index=1&parts_count=1&fee_index=1&passwords=LZ47MIRBQC\"\n\npayload = json.dumps({\n   \"CashboxId\": 1,\n   \"DestinationIndex\": 1,\n   \"FeeIndex\": 1,\n   \"PartsCount\": 1,\n   \"Meta\": {\n      \"FunctionName\": \"sendTransactionFromCashbox\",\n      \"RandomData\": \"288cd49d4b8bf00e7d6114b78d5668d5581d6b953fafef779133caa844cd4229\",\n      \"Destination\": \"b9cb8afe52f1d52521cf2b62dfe12146156ad5328f83c62c20c7da81b263356a61340de745c858998544c041798b01c2f4fac31bebe52a19280a32cd57d6d374ea\",\n      \"Time\": \"2021-02-07T18:37:46.948Z\",\n      \"Source\": \"048b99461a70a49abe63fd585cb224177a22a92d2e9e4ddfbc0027887bee9d1843388f42a3eb2e740565e115ad8b7981abf59e3b03b771f4b063b53c517d7a9d99\",\n      \"AccessToken\": \"51311c84d2c8fd2fafbe56ceb1fb30a99d3417abfc55769577338ab286798087\"\n   }\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "example-0-curl"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// success\n{\n  \"FunctionData\": {\n    \"ApprovalRequestStatus\": 3,\n    \"Transaction\": {\n      \"AmountToTransfer\": \"50000000\",\n      \"DestinationAddress\": \"12Pxiuw1STqszL84kzyb2Jw5dFm541hyDd\"\n    }\n  },\n  \"Meta\": {\n    \"AccessToken\": \"a3e816b5bc04302d99da94705ec2309a4a63fe10d6aed3c5f6fc9e7ff27c6be6\",\n    \"Destination\": \"042c671aeb148d9b2bb4918399c4c925f3764248c5ab2d5194ab0f32664132834692699a75e7fafb5af35f183b7d8a68bdc3b3e6ebfaff8ab555b9a3caf8090622\",\n    \"Source\": \"df4b76a23067a9d782d09a7372ed526ec713cf6d771fac4dbdb9610f7af36d570a157eed76986b8e85afde12888d10d10bef461399e490f3d7e4db44cde1b6e355\",\n    \"Time\": \"2021-02-14 09:58:52.320\"\n  }\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "id": "ojZTzVxqLwstwkYcHzBId",
      "type": "bulleted-list",
      "children": [
        {
          "id": "nFDrC9COd8CgkGe3qOq5G",
          "type": "list-item",
          "children": [
            {
              "id": "JWfP_9FulaSiVc272-vCu",
              "type": "list-item-child",
              "children": [
                {
                  "text": "This request will send a cashbox transaction from the Cold Vault to a whitelisted destination address.",
                  "id": "EidAywh-n1GX5ZDRlaqAR"
                },
                {
                  "text": "",
                  "id": "XPfQFmCcsU1Gy7XKHfdkD"
                }
              ]
            }
          ]
        },
        {
          "id": "AOSCwoXQd1qY8Mw7jHGfq",
          "type": "list-item",
          "children": [
            {
              "id": "8QFbURCiZto5-Z1UceNci",
              "type": "list-item-child",
              "children": [
                {
                  "text": "return -  approvalRequestStatus, AmountToTransfer, DestinationAddress.",
                  "id": "-cpowy7u_h8B2OLr3BZ8o"
                },
                {
                  "text": "",
                  "id": "oeSYcBIIJDA6j-mkC-STZ"
                },
                {
                  "text": "\n",
                  "id": "48QFQthnFVmFqr_6qhJu1"
                },
                {
                  "text": "",
                  "bold": true,
                  "id": "ipzteApfH2IciO1o2bx5U"
                },
                {
                  "text": "",
                  "id": "Ujd1lYxHdp2d86AfQi6X1"
                },
                {
                  "text": "",
                  "bold": true,
                  "id": "vwNl0Nb3p3eHXtUkWRbQ_"
                },
                {
                  "text": "** NOTE success or failure in this api call does not necessarily means success or failure in the transaction itself.",
                  "id": "Fh5OvTehigeXm2thQ5T_3"
                },
                {
                  "text": "",
                  "id": "PhEEdxSV41zpRKXaokGaW"
                }
              ]
            },
            {
              "id": "Ef2b7CBAe2x3yggLUWDvq",
              "type": "list-item-child",
              "children": [
                {
                  "text": "",
                  "id": "2v1Ua17_U6o4Nz1t0aqj5"
                },
                {
                  "text": "",
                  "bold": true,
                  "id": "LbEj7PY9rfj2xeAkTwPkD"
                },
                {
                  "text": "",
                  "id": "GmjPsDiC_pQasCXYqDTcl"
                },
                {
                  "text": "",
                  "bold": true,
                  "id": "V3TgNFvv7fd3vwEbZJYTi"
                },
                {
                  "text": "** for example, the transaction may work by the response to the client can be lost in communication (if the internet is down for the client)",
                  "id": "PeKZl3R6um1WS7moea2ds"
                },
                {
                  "text": "",
                  "id": "XP3XxS5X4ABJmBooSSEcv"
                }
              ]
            },
            {
              "id": "FxECJbqPttTpWMNn36_kr",
              "type": "list-item-child",
              "children": [
                {
                  "text": "",
                  "id": "fHpIjMcunOSXKObmc9BUF"
                },
                {
                  "text": "",
                  "bold": true,
                  "id": "Fqvbheea6ms4LOPkBtSI_"
                },
                {
                  "text": "",
                  "id": "4gPxhbjrDQwOAL2qL_3yv"
                },
                {
                  "text": "",
                  "bold": true,
                  "id": "52WsOEpqtmgGmNfLGUmKU"
                },
                {
                  "text": "** another example is that the transaction was approved here but failed in the signing process",
                  "id": "Gxk7YoWnBgqTTyhsAn3r7"
                },
                {
                  "text": "",
                  "id": "lAl-a3pLriQ6sVdH0FZ5n"
                },
                {
                  "text": "\nTo know the status of the transaction you can access the function getTransactionByToken.",
                  "id": "yFJClWXzBXWJuMDVtx9H5"
                },
                {
                  "text": "",
                  "id": "bsdf99LRegp9dcJ3Ehha_"
                }
              ]
            },
            {
              "id": "oZdJO_6LE9XzqLcOjn7yL",
              "type": "list-item-child",
              "children": [
                {
                  "text": "To get the token to send those functions you should call getCurrentToken one action BEFORE sendTransaction",
                  "id": "t5wVyeEM_8Dq86d50kLlg"
                },
                {
                  "text": "",
                  "id": "KAZGLNkIQEqp6uzBrmbrX"
                }
              ]
            },
            {
              "id": "VJp9X7KHZlNAQhkoovDPw",
              "type": "list-item-child",
              "children": [
                {
                  "text": "myTokenToStoreInTheDb = user.getCurrentToken()",
                  "id": "wTfqDWMC_ebpBdwHlYGFp"
                },
                {
                  "text": "",
                  "id": "R1Ynh4d9lUpCQzuvKNgl9"
                }
              ]
            },
            {
              "id": "V4NYhDpxKga0aiMT48Hod",
              "type": "list-item-child",
              "children": [
                {
                  "text": "sendTransactionFromCashbox(...)",
                  "id": "Q6Jyyu-A4VPkVOsx2eRwd"
                },
                {
                  "text": "",
                  "id": "laOBftg3Q5sjOb0NdCq9W"
                }
              ]
            },
            {
              "id": "3DA9-L74-Z5MTKz-11ct7",
              "type": "list-item-child",
              "children": [
                {
                  "text": ".....",
                  "id": "Eqffc_mneAzz4DCl2RuW4"
                },
                {
                  "text": "",
                  "id": "wWmiP7aFGXSbRGJ47USOD"
                }
              ]
            },
            {
              "id": "yUW4hpxH-NhleyxP5kuEv",
              "type": "list-item-child",
              "children": [
                {
                  "text": "user.getTransactionByToken(myTokenToStoreInTheDb,\"BTC\")",
                  "id": "AW8AfxmvN8kL2JF0A_Isa"
                },
                {
                  "text": "",
                  "id": "1YZSwrmUv-ByWptC2qrOh"
                }
              ]
            },
            {
              "id": "2p67-7STxJ3rA0djDTP-P",
              "type": "list-item-child",
              "children": [
                {
                  "text": "example- ",
                  "id": "auTBMN_FeG-CZ_3_AZp0-"
                },
                {
                  "text": "",
                  "id": "Mq_Z7nBvhZCyg-G9d3o8c"
                },
                {
                  "text": "sendTransactionFromCashbox(1,1,1,1,[\"LZ47MIRBQC\"])",
                  "id": "nRnlow0AAQuFeKOW5_YzM"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}