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

Response

200
application/json

OverdueRule resource updated