API reference
Customers
Payments API operations for Customers.
These operations are generated from the Payments API Swagger document. Use the sandbox host https://api.dhangodemo.com while testing and https://api.dhango.com in production.
PUT /v1/customers
Performs a full replacement of customers for this account.
| Parameter | In | Required | Description |
|---|---|---|---|
accountKey |
header | Used to make API calls on behalf of another account. | |
culture |
header | The culture to be used when setting the language for error messages. |
Request body: an array of Customer.
Customer
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes | The unique identifier for the customer. |
name |
string | yes | The name of the customer. |
phoneNumber |
string | The phone number. | |
emailAddress |
string | The email address. | |
billingAddress |
Address | ||
dueDate |
string | The due date. | |
amountDue |
number | yes | The amount due. |
currency |
Currency | ||
metadata |
object | A <string, string> dictionary of any application-specific metadata to have stored with the customer. |
Address
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | The name at the address | |
streetAddress |
string | The street address including the street and unit number. | |
city |
string | The city of the address. | |
stateOrProvince |
string | The abbreviated state or province of the address. | |
postalCode |
string | The postal code of the address. | |
country |
string | The two character country code. | |
phoneNumber |
string | The phone number. |
Currency values: USD, CAD, EUR, AUD, GBP, NZD, DKK, NOK, SEK, CHF.
Responses:
| Status | Description | Schema |
|---|---|---|
| 202 | The customers were accepted for storage. | |
| 400 | The customers were not saved successfully. Error messages can be found in the body of the response. | ValidationProblemDetails |
POST /v1/customers
Saves customers to the data store using inserts and updates based on the Id property of each customer. No deletions occur as a part of this operation.
| Parameter | In | Required | Description |
|---|---|---|---|
accountKey |
header | Used to make API calls on behalf of another account. | |
culture |
header | The culture to be used when setting the language for error messages. |
Request body: an array of Customer.
Customer
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes | The unique identifier for the customer. |
name |
string | yes | The name of the customer. |
phoneNumber |
string | The phone number. | |
emailAddress |
string | The email address. | |
billingAddress |
Address | ||
dueDate |
string | The due date. | |
amountDue |
number | yes | The amount due. |
currency |
Currency | ||
metadata |
object | A <string, string> dictionary of any application-specific metadata to have stored with the customer. |
Address
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | The name at the address | |
streetAddress |
string | The street address including the street and unit number. | |
city |
string | The city of the address. | |
stateOrProvince |
string | The abbreviated state or province of the address. | |
postalCode |
string | The postal code of the address. | |
country |
string | The two character country code. | |
phoneNumber |
string | The phone number. |
Currency values: USD, CAD, EUR, AUD, GBP, NZD, DKK, NOK, SEK, CHF.
Responses:
| Status | Description | Schema |
|---|---|---|
| 200 | The customers were processed for updates and inserts. | |
| 400 | The customers were not saved successfully. Error messages can be found in the body of the response. | ValidationProblemDetails |
DELETE /v1/customers/{id}
Deletes an individual customer.
| Parameter | In | Required | Description |
|---|---|---|---|
id |
path | yes | The unique identifier for the customer. |
accountKey |
header | Used to make API calls on behalf of another account. | |
culture |
header | The culture to be used when setting the language for error messages. |
Responses:
| Status | Description | Schema |
|---|---|---|
| 204 | The customer was deleted. |