Zum Hauptinhalt springen
PUT
/
dunning
/
overdue-rules
/
{id}
cURL
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"
}'
{
  "level": 1,
  "daysOverdue": 1,
  "dueInDays": 7,
  "type": "reminder",
  "emailTemplate": {
    "name": "Order confirmation",
    "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.",
    "id": "8d6b0c3e-0b7a-4b0a-8b1a-3b0b8b2d0b0b",
    "senderName": "Acme Inc.",
    "senderAddress": "[email protected]",
    "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": {
    "type": "invoice",
    "name": "invoice",
    "language": "de",
    "title": "Your invoice $invoice.documentId",
    "introduction": "Thank you for your order.",
    "closing": "Pay this invoice in the next 7 days.",
    "id": "00000000-0000-0000-0000-000000000000",
    "brandColor": "#000000",
    "headerBackgroundColor": "#ffffff",
    "logoPosition": "right",
    "logoUrl": "base64",
    "information": [
      {
        "key": "Invoice number",
        "value": "$invoice.documentId"
      }
    ],
    "footer": [
      {
        "line1": "Company name",
        "line2": "Street",
        "line3": "City",
        "line4": "Country",
        "line5": "VAT number"
      }
    ]
  },
  "id": "ad8f3b1c-4f0e-4b9e-8b0a-0e0e0e0e0e0e",
  "amountInCents": 100,
  "attachOriginalInvoice": true,
  "sendLetter": true,
  "isEnabled": true,
  "createdAt": "2021-01-01T00:00:00+00:00",
  "updatedAt": "2021-01-01T00:00:00+00:00"
}

Autorisierungen

Authorization
string
header
erforderlich

Value for the Authorization header parameter.

Pfadparameter

id
string
erforderlich

OverdueRule identifier

Body

The updated OverdueRule resource

daysOverdue
integer
erforderlich

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

Beispiel:

1

dueInDays
integer
Standard:7
erforderlich

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

Beispiel:

7

type
any
Standard:reminder
erforderlich

Type of the overdue rule.

Possible values:

  • reminder: Send a reminder to the customer.
  • dunning: Send a dunning to the customer.
Beispiel:

"reminder"

emailTemplate
object
erforderlich

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

documentTemplate
object
erforderlich

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".

Erforderlicher Bereich: x >= 0
Beispiel:

100

attachOriginalInvoice
boolean
Standard:true

Attach the original invoice additionally to the reminder / dunning.

Beispiel:

true

sendLetter
boolean

Send a letter by mail to the customer.

isEnabled
boolean
Standard:true

Enable or disable the overdue rule.

Beispiel:

true

Antwort

OverdueRule resource updated

level
integer
Standard:1
erforderlich

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

Erforderlicher Bereich: x <= 6
Beispiel:

1

daysOverdue
integer
erforderlich

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

Beispiel:

1

dueInDays
integer
Standard:7
erforderlich

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

Beispiel:

7

type
any
Standard:reminder
erforderlich

Type of the overdue rule.

Possible values:

  • reminder: Send a reminder to the customer.
  • dunning: Send a dunning to the customer.
Beispiel:

"reminder"

emailTemplate
object
erforderlich

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

documentTemplate
object
erforderlich

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

id
string
Beispiel:

"ad8f3b1c-4f0e-4b9e-8b0a-0e0e0e0e0e0e"

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".

Erforderlicher Bereich: x >= 0
Beispiel:

100

attachOriginalInvoice
boolean
Standard:true

Attach the original invoice additionally to the reminder / dunning.

Beispiel:

true

sendLetter
boolean

Send a letter by mail to the customer.

isEnabled
boolean
Standard:true

Enable or disable the overdue rule.

Beispiel:

true

createdAt
string<date-time>

Date and time when the overdue rule was created.

Beispiel:

"2021-01-01T00:00:00+00:00"

updatedAt
string<date-time>

Date and time when the overdue rule was last updated.

Beispiel:

"2021-01-01T00:00:00+00:00"