POST
/
api
/
ledger
/
v2
/
{ledger}
/
_bulk
curl --request POST \
  --url http://localhost:55001/api/ledger/v2/{ledger}/_bulk \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '[
  {
    "action": "<string>",
    "ik": "<string>",
    "data": {
      "timestamp": "2023-11-07T05:31:56Z",
      "postings": [
        {
          "amount": 100,
          "asset": "COIN",
          "destination": "users:002",
          "source": "users:001"
        }
      ],
      "script": {
        "plain": "vars {\naccount $user\n}\nsend [COIN 10] (\n\tsource = @world\n\tdestination = $user\n)\n",
        "vars": {
          "user": "users:042"
        }
      },
      "reference": "ref:001",
      "metadata": {
        "admin": "true"
      }
    }
  }
]'
{
  "data": [
    {
      "responseType": "<string>",
      "logID": 123,
      "data": {
        "insertedAt": "2023-11-07T05:31:56Z",
        "timestamp": "2023-11-07T05:31:56Z",
        "postings": [
          {
            "amount": 100,
            "asset": "COIN",
            "destination": "users:002",
            "source": "users:001"
          }
        ],
        "reference": "ref:001",
        "metadata": {
          "admin": "true"
        },
        "id": 1,
        "reverted": true,
        "revertedAt": "2023-11-07T05:31:56Z",
        "preCommitVolumes": {
          "orders:1": {
            "USD": {
              "input": 100,
              "output": 10,
              "balance": 90
            }
          },
          "orders:2": {
            "USD": {
              "input": 100,
              "output": 10,
              "balance": 90
            }
          }
        },
        "postCommitVolumes": {
          "orders:1": {
            "USD": {
              "input": 100,
              "output": 10,
              "balance": 90
            }
          },
          "orders:2": {
            "USD": {
              "input": 100,
              "output": 10,
              "balance": 90
            }
          }
        },
        "preCommitEffectiveVolumes": {
          "orders:1": {
            "USD": {
              "input": 100,
              "output": 10,
              "balance": 90
            }
          },
          "orders:2": {
            "USD": {
              "input": 100,
              "output": 10,
              "balance": 90
            }
          }
        },
        "postCommitEffectiveVolumes": {
          "orders:1": {
            "USD": {
              "input": 100,
              "output": 10,
              "balance": 90
            }
          },
          "orders:2": {
            "USD": {
              "input": 100,
              "output": 10,
              "balance": 90
            }
          }
        }
      }
    }
  ],
  "errorCode": "VALIDATION",
  "errorMessage": "[VALIDATION] invalid 'cursor' query param"
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

ledger
string
required

Name of the ledger.

Example:

"ledger001"

Query Parameters

continueOnFailure
boolean

Continue on failure

Example:

true

atomic
boolean

Make bulk atomic

Example:

true

parallel
boolean

Process bulk elements in parallel

Example:

true

Body

application/json · object[]

Response

200
application/json

OK

The response is of type object.