Update Invoicing Flag

The UpdateInvoicingFlag API is used to update the invoicing flag of a payer in OCS.io.

Attributes Invoicing Excluded and Invoicing Excluded To 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 are not considered in documents that were created prior to the update.

API Overview

Fields Required for Updating Invoicing Flag

The following table lists and describes the fields required to update the invoicing flag through the UpdateInvoicingFlag API:

Field Description

requestId

Unique ID of the request.

user

Identification of the User performed the operation.

account

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

invoicingExcluded

Indicates whether Payer is excluded from Invoicing.

invoicingExcludedTo

If Payer is excluded from Invoicing, this is optional date till when Payer is excluded.

Detailed API documentation and endpoint specifics are available here.

Request Validations

The following validations are performed when updating the invoicing flag:

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

Set Infinite Exclusion from Invoicing Example

Use the following request’s body to set infinite exclusion from invoicing:

{
  "requestId": "unique_request_id",
  "user": "crm",
  "account": {
    "externalId": "account_external_id"
  },
  "invoicingExcluded": true,
  "invoicingExcludedTo": null
}

The outcome of the API call is as follows:

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

  • The invoicing flag for the account is set to true, indicating exclusion from invoicing

  • As invoicingExcludedTo is null, the exclusion is set to be infinite

Set Exclusion from Invoicing up to Date Example

Use the following request’s body to set exclusion from invoicing up to 1.5.2024:

{
  "requestId": "unique_request_id",
  "account": {
    "externalId": "account_external_id"
  },
  "invoicingExcluded": true,
  "invoicingExcludedTo": "2024-05-01T00:00:00+02:00"
}

The outcome of the API call is as follows:

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

  • The invoicing flag for the account is set to true, indicating exclusion from invoicing

  • The exclusion is set to be valid until 1.5.2024

Remove Exclusion from Invoicing Example

Use the following request’s body to remove any exclusion from invoicing:

{
  "requestId": "unique_request_id",
  "account": {
    "externalId": "account_external_id"
  },
  "invoicingExcluded": false
}

The outcome of the API call is as follows:

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

  • The invoicing flag for the account is set to false, indicating no exclusion from invoicing