DOCS
API reference

Invoice Metadata

Payments API operations for Invoice Metadata.

Payments API

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/{invoiceId}/metadata/flex

Sets (replaces) the Flex-domain metadata for an invoice. Preserves all other metadata entries.

Parameter In Required Description
invoiceId path yes The invoice identifier.

Request body: FlexInvoiceModel.

FlexInvoiceModel

Field Type Required Description
code FlexLedgerCode
codeDetails string Free-text detail when dhango.Flex.Contracts.Models.FlexInvoiceModel.Code is dhango.Flex.Contracts.Enums.FlexLedgerCode.Other.
isRentDebit boolean Indicates whether this entry represents the main rental cost of the lease (Flex is_rent_debit).
balanceDueInCents integer The remaining balance due for this charge, in cents (Flex balance_due_in_cents). dhango does not track running balances, so the partner supplies it when known.

FlexLedgerCode values: Rent, Security_Deposit, Subsidized_Rent, Utilities, Other. Responses:

Status Description Schema
204 The metadata was saved.
400 The request body is invalid. ValidationProblemDetails
403 The invoice does not belong to the caller's scope. ProblemDetails

GET /v1/invoices/{invoiceId}/metadata/flex

Gets the Flex-domain metadata for an invoice. Returns 404 if no Flex metadata has been set.

Parameter In Required Description
invoiceId path yes The invoice identifier.

Responses:

Status Description Schema
200 The Flex metadata for the invoice. FlexInvoiceModel
404 No Flex metadata exists for the invoice, or the invoice does not exist. ProblemDetails

DELETE /v1/invoices/{invoiceId}/metadata/flex

Removes the Flex-domain metadata from an invoice. Preserves all other metadata entries.

Parameter In Required Description
invoiceId path yes The invoice identifier.

Responses:

Status Description Schema
204 The metadata was removed (or did not exist).