PUT
/
dunning
/
overdue-rules
/
{id}
curl -X PUT \
 /dunning/overdue-rules/{id} \
 --header "Content-Type: application/json" \
 --header "Authorization: Bearer <token>" \
 --data '{
    "daysOverdue": "1",
    "dueInDays": "7",
    "emailTemplate": {
        "subject": "Order confirmation #{{ order.number }}",
        "contentHtml": "<h1>Order confirmation<\/h1><p>Thank you for your order.<\/p>"
    },
    "documentTemplate": {
        "title": "Your invoice $invoice.documentId",
        "introduction": "Thank you for your order.",
        "closing": "Pay this invoice in the next 7 days.",
        "information": [
            {
                "key": "Invoice number",
                "value": "$invoice.documentId"
            }
        ]
    },
    "amountInCents": "100",
    "attachOriginalInvoice": "1",
    "sendLetter": "",
    "isEnabled": "1"
}'
{
  "id": "ad8f3b1c-4f0e-4b9e-8b0a-0e0e0e0e0e0e",
  "level": 1,
  "daysOverdue": 1,
  "dueInDays": 7,
  "type": "<any>",
  "emailTemplate": {
    "id": "8d6b0c3e-0b7a-4b0a-8b1a-3b0b8b2d0b0b",
    "name": "Order confirmation",
    "senderName": "Acme Inc.",
    "senderAddress": "noreply@acme.com",
    "description": "Order confirmation for a new order",
    "subject": "Order confirmation #{{ order.number }}",
    "contentHtml": "<h1>Order confirmation</h1><p>Thank you for your order.</p>",
    "contentPlain": "Order confirmation\\n\\nThank you for your order.",
    "isSystem": true,
    "isEnabled": "true",
    "createdAt": "2021-01-01T00:00:00+00:00",
    "updatedAt": "2021-01-01T00:00:00+00:00",
    "preHeader": "Your order confirmation",
    "versions": [
      {
        "id": "mltplv_1b2nE1a2b3nF4c5d6e7f8g9h0j",
        "version": 1,
        "subject": "Hello {{ name }}",
        "contentHtml": "<h1>Hello {{ name }}</h1>",
        "contentPlain": "Hello {{ name }}",
        "preHeader": "Hello {{ name }}",
        "createdAt": "2021-01-01T00:00:00+00:00",
        "createdBy": "system"
      }
    ],
    "currentVersion": {
      "id": "mltplv_1b2nE1a2b3nF4c5d6e7f8g9h0j",
      "version": 1,
      "subject": "Hello {{ name }}",
      "contentHtml": "<h1>Hello {{ name }}</h1>",
      "contentPlain": "Hello {{ name }}",
      "preHeader": "Hello {{ name }}",
      "createdAt": "2021-01-01T00:00:00+00:00",
      "createdBy": "system"
    }
  },
  "documentTemplate": {
    "id": "00000000-0000-0000-0000-000000000000",
    "brandColor": "#000000",
    "headerBackgroundColor": "#ffffff",
    "logoPosition": "right",
    "type": "invoice",
    "name": "invoice",
    "language": "de",
    "title": "Your invoice $invoice.documentId",
    "logoUrl": "base64",
    "introduction": "Thank you for your order.",
    "closing": "Pay this invoice in the next 7 days.",
    "information": [
      {
        "key": "Invoice number",
        "value": "$invoice.documentId"
      }
    ],
    "footer": [
      {
        "line1": "Company name",
        "line2": "Street",
        "line3": "City",
        "line4": "Country",
        "line5": "VAT number"
      }
    ]
  },
  "amountInCents": 100,
  "attachOriginalInvoice": true,
  "sendLetter": true,
  "isEnabled": true,
  "createdAt": "2021-01-01T00:00:00+00:00",
  "updatedAt": "2021-01-01T00:00:00+00:00"
}

Authorizations

Authorization
string
header
required

Value for the Authorization header parameter.

Path Parameters

id
string
required

OverdueRule identifier

Body

The updated OverdueRule resource
daysOverdue
integer
required

Days after the invoice or last reminder / dunning is overdue.

Required range: x > 0
dueInDays
integer
default:
7
required

Number of days until this reminder / dunning should be paid.

Required range: x > 0
type
any
required

Type of the overdue rule.

Possible values:

  • reminder: Send a reminder to the customer.
  • dunning: Send a dunning to the customer.
emailTemplate
object
required

The email template that is used to send the reminder / dunning.

documentTemplate
object
required

The document template that is used to generate the reminder / dunning. This is required for a dunning and optional for a reminder.

amountInCents
integer | null

Amount in cents that is charged in the currency of the base invoice, for the dunning. This is required for type "dunning".

Required range: x > 0
attachOriginalInvoice
boolean
default:
true

Attach the original invoice additionally to the reminder / dunning.

sendLetter
boolean

Send a letter by mail to the customer.

isEnabled
boolean
default:
true

Enable or disable the overdue rule.

Response

200
application/json
OverdueRule resource updated
level
integer
default:
1
required

Level of the overdue rule. The level is used to sort the overdue rules. The overdue rule with the lowest level is used first.

Required range: 0 < x < 6
daysOverdue
integer
required

Days after the invoice or last reminder / dunning is overdue.

Required range: x > 0
dueInDays
integer
default:
7
required

Number of days until this reminder / dunning should be paid.

Required range: x > 0
type
any
required

Type of the overdue rule.

Possible values:

  • reminder: Send a reminder to the customer.
  • dunning: Send a dunning to the customer.
emailTemplate
object
required

The email template that is used to send the reminder / dunning.

documentTemplate
object
required

The document template that is used to generate the reminder / dunning. This is required for a dunning and optional for a reminder.

id
string
amountInCents
integer | null

Amount in cents that is charged in the currency of the base invoice, for the dunning. This is required for type "dunning".

Required range: x > 0
attachOriginalInvoice
boolean
default:
true

Attach the original invoice additionally to the reminder / dunning.

sendLetter
boolean

Send a letter by mail to the customer.

isEnabled
boolean
default:
true

Enable or disable the overdue rule.

createdAt
string

Date and time when the overdue rule was created.

updatedAt
string

Date and time when the overdue rule was last updated.