Update Due Date Offset

The UpdateDueDateOffset API is used to update the due date offset of a payer in OCS.io.

The attribute Due Date Offset in the OCS.io is not versioned. Any changes to this attribute take effect immediately upon update. Please note that these changes do not have a retrospective effect, meaning they do not alter the due dates of documents that were created prior to the update.

API Overview

Fields Required for Updating Due Date Offset

The following table lists and describes the fields required to update the due date offset through the UpdateDueDateOffset API:

Field Description

account

ID (Ref ID/ External ID ) of the Account.

dueDateOffset

Offset for calculation of Due Date of the Document. If null, document(s) will be created with default offset.

documentType

Type of the Document for which Due Date Offset is updated. If null, Offset is valid for all document types. Document Type must be configured.

Detailed API documentation and endpoint specifics are available here.

Request Validations

The following validations are performed when updating the due date offset:

  • Account must be provided in the request, it must be already created in the system and must not be in Deactivated State.

  • Payer must be already created in the system.

Update Due Date Offset Example

Use the following request’s body to update a due date offset:

{
  "requestId": "{{$guid}}",
  "user": "crm",
  "account": {
    "externalId": "account_external_id"
  },
  "dueDateOffset": 15,
  "documentType": "document_type_code"
}

The outcome of the API call is as follows:

  • It is validated, that the account with External ID account_external_id exists.

  • The due date offset for the account is updated to 15 days.

  • The update is applicable for the configured document type with code document_type_code.