API reference
Invoices
Payments API operations for Invoices.
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/invoices
Performs a full replacement of invoices 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 Invoice.
Invoice
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes | The unique identifier for the invoice. |
customerId |
string | The identifier for the customer. | |
name |
string | The name of the entity to which the invoice is addressed. | |
invoiceDate |
string | The date the invoice was created. | |
dueDate |
string | The due date for the invoice. | |
amountDue |
number | yes | The amount due on the invoice. |
currency |
Currency | ||
metadata |
object | A <string, string> dictionary of any application-specific metadata to have stored with the invoice. |
Currency values: USD, CAD, EUR, AUD, GBP, NZD, DKK, NOK, SEK, CHF.
Responses:
| Status | Description | Schema |
|---|---|---|
| 202 | The invoices were accepted for storage. | |
| 400 | The invoices were not saved successfully. Error messages can be found in the body of the response. | ValidationProblemDetails |
POST /v1/invoices
Saves invoices to the data store using inserts and updates based on the Id property of each invoice. 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 Invoice.
Invoice
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes | The unique identifier for the invoice. |
customerId |
string | The identifier for the customer. | |
name |
string | The name of the entity to which the invoice is addressed. | |
invoiceDate |
string | The date the invoice was created. | |
dueDate |
string | The due date for the invoice. | |
amountDue |
number | yes | The amount due on the invoice. |
currency |
Currency | ||
metadata |
object | A <string, string> dictionary of any application-specific metadata to have stored with the invoice. |
Currency values: USD, CAD, EUR, AUD, GBP, NZD, DKK, NOK, SEK, CHF.
Responses:
| Status | Description | Schema |
|---|---|---|
| 200 | The invoices were processed for updates and inserts. | |
| 400 | The invoices were not saved successfully. Error messages can be found in the body of the response. | ValidationProblemDetails |
DELETE /v1/invoices/{id}
Deletes an individual invoice.
| Parameter | In | Required | Description |
|---|---|---|---|
id |
path | yes | The unique identifier for the invoice. |
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 invoice was deleted. |