Create a label ledger entry - Dwolla Developer Portal

Documentation Index

Fetch the complete documentation index at: /llms.txt

Use this file to discover all available pages before exploring further.

API Request

POST

https://api-sandbox.dwolla.com/labels/{id}/ledger-entries

cURL

POST https://api-sandbox.dwolla.com/labels/e217bcac-628a-456d-a375-6cc51230616f/ledger-entries
Content-Type: application/vnd.dwolla.v1.hal+json
Accept: application/vnd.dwolla.v1.hal+json
Authorization: Bearer pBA9fVDBEyYZCEsLf/wKehyh1RTpzjUj5KzIRfDi0wKTii7DqY

{
  "amount": {
    "value": "-5.00",
    "currency": "USD"
  }
}

Node.js Example

// Using dwolla-v2 - https://github.com/Dwolla/dwolla-v2-node
var labelUrl =
  "https://api-sandbox.dwolla.com/labels/e217bcac-628a-456d-a375-6cc51230616f";
var requestBody = {
  amount: {
    currency: "USD",
    value: "-5.00",
  },
};

dwolla
  .post(`${labelUrl}/ledger-entries`, requestBody)
  .then((res) => res.headers.get("location")); // => 'https://api-sandbox.dwolla.com/ledger-entries/76e5541d-18f4-e811-8112-e8dd3bececa8'

Python Example

# Using dwollav2 - https://github.com/Dwolla/dwolla-v2-python
label_url = 'https://api-sandbox.dwolla.com/labels/e217bcac-628a-456d-a375-6cc51230616f'
request_body = {
  'amount': {
    'currency': 'USD',
    'value': '-5.00'
  }
}

ledger_entry = app_token.post('%s/ledger-entries' % label_url, request_body)
ledger_entry.headers['location'] # => 'https://api-sandbox.dwolla.com/ledger-entries/76e5541d-18f4-e811-8112-e8dd3bececa8'

PHP Example

<?php
// Using dwollaswagger - https://github.com/Dwolla/dwolla-swagger-php
$labelsApi = new DwollaSwagger\LabelsApi($apiClient);

$label = $labelsApi->addLedgerEntry([\
  'amount' => [\
    'currency' => 'USD',\
    'value' => '-5.00'\
  ]\
], "https://api-sandbox.dwolla.com/labels/e217bcac-628a-456d-a375-6cc51230616f");
$label; # => "https://api-sandbox.dwolla.com/ledger-entries/76e5541d-18f4-e811-8112-e8dd3bececa8"
?>

Ruby Example

# Using dwolla_v2 - https://github.com/Dwolla/dwolla-v2-ruby
label_url = 'https://api-sandbox.dwolla.com/labels/e217bcac-628a-456d-a375-6cc51230616f'
request_body = {
  :amount => {
    :currency => "USD",
    :value => "-5.00"
  }
}

ledger_entry = app_token.post "#{label_url}/ledger-entries", request_body
ledger_entry.response_headers[:location] # => "https://api-sandbox.dwolla.com/ledger-entries/76e5541d-18f4-e811-8112-e8dd3bececa8"

Status Codes

400

403

404

Error Responses

{
  "code": "BadRequest",
  "message": "The request body contains bad syntax or is incomplete."
}
{
  "code": "Forbidden",
  "message": "The supplied credentials are not authorized for this resource."
}
{
  "code": "NotFound",
  "message": "The requested resource was not found."
}

Authorizations

Authorization
string
header
required

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

Headers

Accept
enum<string>
default:application/vnd.dwolla.v1.hal+json
required

The media type of the response. Must be application/vnd.dwolla.v1.hal+json

Path Parameters

id
string
required

The Id of the Label to update.

Body

amount
object
required

Parameters to create a label ledger entry.