---
updatedAt: 2026-05-27T04:03:45.000Z
agentTools:
  projectIndex: https://transport-freight-management.docs.developers.aeb.com/llms.txt
---

# offsetServiceItems

Offset the service items in the Billing engine.<br> Offsetting a service item will offset all relevant settlement items of this service item, by creating exact copies of the relevant settlement items with reversed sign.<br> Depending on customizing, some settlement items will not take part in offsetting the service item and some settlement items will prevent any offsetting at all, which leads to an error.<br> The processing of all items will be done in one transaction, so in case of any error, nothing will be persisted. Therefore check the errorFlag and error message arrays in the response for any error to detect this case.<br>

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Logistics Cost Management HTTP API",
    "description": "Thank you for using our HTTP API documentation.",
    "version": "2.0"
  },
  "servers": [
    {
      "url": "https://rz3.aeb.de/demo1billing/rest"
    }
  ],
  "security": [
    {
      "SWAGGER_AUTH_KEY": []
    },
    {
      "BASIC_AUTH": []
    }
  ],
  "tags": [
    {
      "name": "Billing",
      "description": "API for the billing of services"
    }
  ],
  "paths": {
    "/BillingBFBean/offsetServiceItems": {
      "post": {
        "tags": [
          "Billing"
        ],
        "summary": "offsetServiceItems",
        "description": "Offset the service items in the Billing engine.<br> Offsetting a service item will offset all relevant settlement items of this service item, by creating exact copies of the relevant settlement items with reversed sign.<br> Depending on customizing, some settlement items will not take part in offsetting the service item and some settlement items will prevent any offsetting at all, which leads to an error.<br> The processing of all items will be done in one transaction, so in case of any error, nothing will be persisted. Therefore check the errorFlag and error message arrays in the response for any error to detect this case.<br>",
        "operationId": "offsetServiceItems",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BReverseServiceItemsRequestDTO"
              }
            },
            "application/xml": {
              "schema": {
                "$ref": "#/components/schemas/BReverseServiceItemsRequestDTO"
              }
            }
          }
        },
        "responses": {
          "default": {
            "description": "default response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BReverseServiceItemsResponseDTO"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/BReverseServiceItemsResponseDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "BASIC_AUTH": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "ResponseMessageDTO": {
        "type": "object",
        "description": "Result messages like errors or warnings.",
        "properties": {
          "messageType": {
            "type": "string",
            "description": "<p>Message type</p><p>If not stated otherwise, the possible types are:</p><ul><li>ERROR</li><li>WARNING</li><li>INFO</li></ul><p>Maximum length: 50</p>",
            "example": "WARNING"
          },
          "messageIdentCode": {
            "type": "string",
            "description": "<p>Optional identification code for further classification of the message type.</p><p>Maximum length: 50</p>",
            "example": 5627
          },
          "messageTexts": {
            "type": "array",
            "description": "<p>Detailed message texts in the requested languages.</p>",
            "items": {
              "$ref": "#/components/schemas/TextInLanguageDTO"
            }
          },
          "indentationLevel": {
            "type": "integer",
            "format": "int32",
            "description": "<p>The indentation level of the message.</p><p>'0' indicates a top level message.</p>",
            "example": 0
          }
        }
      },
      "TextInLanguageDTO": {
        "type": "object",
        "description": "A translated text in one of the specified languages.",
        "properties": {
          "languageISOCode": {
            "type": "string",
            "description": "<p>2-letter ISO code of the language.</p><p>length=2</p>",
            "example": "en"
          },
          "text": {
            "type": "string",
            "description": "The translated text.",
            "example": "Some free-form text"
          }
        }
      },
      "BReverseServiceItemResultDTO": {
        "type": "object",
        "description": "Result for one item. Messages for this particular item, e.g. for errors or warnings.<br> The following messageIdentCodes are used:<br> \"ITEM_RETRANSMISSION_ERROR\": Retransmission of one of the items was detected.<br> \"INVALID_DATA_ERROR\": One of the ident codes send was not recognized by the engine, e.g. an service type was used which was not customized.<br> \"PRICING_ERROR\": An error occured during pricing because of customizing problems. E.g. no price schema was found for an item. <br> \"PRICING_TRACE\": Detailed information about the pricing process (this is no error).<br>",
        "properties": {
          "hasErrors": {
            "type": "boolean",
            "description": "True, if there are any error messages. If an error has occured the messages contain more details about the errors."
          },
          "hasWarnings": {
            "type": "boolean",
            "description": "True, if there are any warning messages."
          },
          "messages": {
            "type": "array",
            "description": "Messages for the whole request, e.g. for errors or warnings.<br>",
            "items": {
              "$ref": "#/components/schemas/ResponseMessageDTO"
            }
          },
          "itemId": {
            "type": "string",
            "description": "<p>ID of the item.</p> <p>length=250</p>"
          }
        }
      },
      "BReverseServiceItemsResponseDTO": {
        "type": "object",
        "description": "Return value for the the method IBillingBF.cancelServiceItems or IBillingBF.offsetServiceItems",
        "properties": {
          "hasErrors": {
            "type": "boolean",
            "description": "<p>True, if there are any error messages.</p><p>An error usually means that the request could not be performed.</p><p>Error details are provided in the messages[] array.</p>",
            "example": false
          },
          "hasOnlyRetryableErrors": {
            "type": "boolean",
            "description": "<p>True, if there are any error messages.</p><p>Error details are provided in the messages[] array.</p>",
            "example": true
          },
          "hasWarnings": {
            "type": "boolean",
            "description": "<p>True, if there are any error messages.</p><p>Error details are provided in the messages[] array.</p>",
            "example": true
          },
          "messages": {
            "type": "array",
            "description": "<p>Error or warning messages at the request level.</p><p>There may be additional messages[] arrays at lower data levels as specified in the documentation.</p>",
            "items": {
              "$ref": "#/components/schemas/ResponseMessageDTO"
            }
          },
          "itemResponses": {
            "type": "array",
            "description": "For every itemId in the request there will be one response with information about the reversal of the item. In case of errors the reverse operation was not possible.",
            "items": {
              "$ref": "#/components/schemas/BReverseServiceItemResultDTO"
            }
          }
        }
      },
      "BReverseServiceItemsRequestDTO": {
        "type": "object",
        "description": "Request parameter for the the method IBillingBF.cancelServiceItems or IBillingBF.offsetServiceItems",
        "properties": {
          "clientSystemId": {
            "type": "string",
            "description": "<p>Id of the sending client system.</p><p>e.g. Installation ID of the sending host or ERP system.</p><p>Maximum length: 20</p>",
            "example": "TEST_ID"
          },
          "clientIdentCode": {
            "type": "string",
            "description": "<p>Client identification code.</p><p>Maximum length: 10</p>",
            "example": "APITEST"
          },
          "userName": {
            "type": "string",
            "description": "<p>User who initiated the request from the client system.</p><p>If the user is found either in the system's user management or in a connected LDAP directory, the request runs under this user's roles.</p><p>If the user is not found, the request is only granted the basic 'I_EVERYONE' role. The user name may be used for logging purposes in this case.</p><p>Actual authentication is handled separately via the request's headers, so no password is required in the request's data.</p>",
            "example": "API_TEST"
          },
          "resultLanguageIsoCodes": {
            "type": "array",
            "description": "<p>2-letter ISO codes of the languages in which texts will be returned.</p><p>English ('en') and German ('de') are typically supported by default. Other languages may be supported.</p><p>Translations will be looked up in the order of the provided language codes. If a translation is not available in one language, the next language is used instead.</p>",
            "example": [
              "en",
              "de"
            ],
            "items": {
              "type": "string"
            }
          },
          "reasonOfReversal": {
            "type": "string",
            "description": "<p>A qualified reason for reversal.</p> <p>length=250</p>"
          },
          "items": {
            "type": "array",
            "description": "An array of items that should be be processed.",
            "items": {
              "$ref": "#/components/schemas/BServiceItemReferenceDTO"
            }
          }
        }
      },
      "BServiceItemReferenceDTO": {
        "type": "object",
        "description": "A reference identifying a serviceItem.<br>",
        "properties": {
          "itemId": {
            "type": "string",
            "description": "<p> ID of the service item which, together with the clientSystemId, uniquely identifies the service item. </p> <p>length=50</p>"
          }
        }
      }
    },
    "securitySchemes": {
      "SWAGGER_AUTH_KEY": {
        "type": "apiKey",
        "name": "X-XNSG_WEB_TOKEN",
        "in": "header"
      },
      "BASIC_AUTH": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "x-proxy-enabled": false
}
```