Skip to main content
POST
/
customers
/
{id}
/
labels
cURL
POST https://api-sandbox.dwolla.com/customers/AB443D36-3757-44C1-A1B4-29727FB3111C/labels
Content-Type: application/vnd.dwolla.v1.hal+json
Accept: application/vnd.dwolla.v1.hal+json
Authorization: Bearer pBA9fVDBEyYZCEsLf/wKehyh1RTpzjUj5KzIRfDi0wKTii7DqY

{
    "amount": {
        "currency": "USD",
        "value": "10.00"
    }
}
// Using dwolla-v2 - https://github.com/Dwolla/dwolla-v2-node
var customerUrl =
"https://api-sandbox.dwolla.com/customers/AB443D36-3757-44C1-A1B4-29727FB3111C";
var requestBody = {
amount: {
currency: "USD",
value: "10.00",
},
};

dwolla
.post(`${customerUrl}/labels`, requestBody)
.then((res) => res.headers.get("location")); // => 'https://api-sandbox.dwolla.com/labels/375c6781-2a17-476c-84f7-db7d2f6ffb31'
# Using dwollav2 - https://github.com/Dwolla/dwolla-v2-python
customer_url = 'https://api-sandbox.dwolla.com/customers/AB443D36-3757-44C1-A1B4-29727FB3111C'
request_body = {
'amount': {
'currency': 'USD',
'value': '10.00'
}
}

label = app_token.post('%s/labels' % customer_url, request_body)
label.headers['location'] # => 'https://api-sandbox.dwolla.com/labels/375c6781-2a17-476c-84f7-db7d2f6ffb31'
<?php
// Using dwollaswagger - https://github.com/Dwolla/dwolla-swagger-php
$customersApi = new DwollaSwagger\CustomersApi($apiClient);

$label = $customersApi->createLabel([
'amount' => [
'currency' => 'USD',
'value' => '10.00'
]
], "https://api-sandbox.dwolla.com/customers/AB443D36-3757-44C1-A1B4-29727FB3111C");
$label; # => "https://api-sandbox.dwolla.com/labels/375c6781-2a17-476c-84f7-db7d2f6ffb31"
?>
# Using dwolla_v2 - https://github.com/Dwolla/dwolla-v2-ruby
customer_url = 'https://api-sandbox.dwolla.com/customers/AB443D36-3757-44C1-A1B4-29727FB3111C'
request_body = {
:amount => {
:currency => "USD",
:value => "10.00"
}
}

label = app_token.post "#{customer_url}/labels", request_body
label.response_headers[:location] # => "https://api-sandbox.dwolla.com/labels/375c6781-2a17-476c-84f7-db7d2f6ffb31"
{
  "code": "BadRequest",
  "message": "The request body contains bad syntax or is incomplete."
}
{
"code": "Forbidden",
"message": "Not authorized to create customer label"
}
{
"code": "NotFound",
"message": "Customer 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

Available options:
application/vnd.dwolla.v1.hal+json

Path Parameters

id
string
required

ID of customer to create a label for

Body

application/json

Parameters to create a customer label

amount
object
required

Response

create